diff --git a/CHANGELOG.md b/CHANGELOG.md index 17cbbcce..4e007b99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,9 +12,20 @@ async with InfluxDBClientAsync(url="http://localhost:8086", token="my-token", or client_session_kwargs={'trust_env': True}) as client: pass ``` + +This release introduces a support for new version of InfluxDB API definitions with following breaking changes: + +- `User`, `UserResponse`, `ResourceMember` and `ResourceOwner` classes no longer supports `oauth_id` field +- `Task` class no longer supports `type` field +- `ScriptUpdateRequest` class no longer supports `name` field +- `UsersService.get_flags` operation is moved to `ConfigService` + ### Features 1. [#586](https://github.com/influxdata/influxdb-client-python/pull/586): Add `config_name` key argument for ``from_config_file`` function to allow loading a specific configuration from a config file +### API +1. [#588](https://github.com/influxdata/influxdb-client-python/pull/588): Use the latest InfluxDB API definitions for generated APIs + ### Bug Fixes 1. [#583](https://github.com/influxdata/influxdb-client-python/pull/583): Async HTTP client doesn't always use `HTTP_PROXY`/`HTTPS_PROXY` environment variables. [async/await] 1. [#584](https://github.com/influxdata/influxdb-client-python/pull/584): Parsing empty query result value as `numpy.NaN` diff --git a/influxdb_client/domain/add_resource_member_request_body.py b/influxdb_client/domain/add_resource_member_request_body.py index ea399905..ffcddd86 100644 --- a/influxdb_client/domain/add_resource_member_request_body.py +++ b/influxdb_client/domain/add_resource_member_request_body.py @@ -53,6 +53,8 @@ def __init__(self, id=None, name=None): # noqa: E501,D401,D403 def id(self): """Get the id of this AddResourceMemberRequestBody. + The ID of the user to add to the resource. + :return: The id of this AddResourceMemberRequestBody. :rtype: str """ # noqa: E501 @@ -62,6 +64,8 @@ def id(self): def id(self, id): """Set the id of this AddResourceMemberRequestBody. + The ID of the user to add to the resource. + :param id: The id of this AddResourceMemberRequestBody. :type: str """ # noqa: E501 @@ -73,6 +77,8 @@ def id(self, id): def name(self): """Get the name of this AddResourceMemberRequestBody. + The name of the user to add to the resource. + :return: The name of this AddResourceMemberRequestBody. :rtype: str """ # noqa: E501 @@ -82,6 +88,8 @@ def name(self): def name(self, name): """Set the name of this AddResourceMemberRequestBody. + The name of the user to add to the resource. + :param name: The name of this AddResourceMemberRequestBody. :type: str """ # noqa: E501 diff --git a/influxdb_client/domain/authorization.py b/influxdb_client/domain/authorization.py index f0146c1e..67a0bfd3 100644 --- a/influxdb_client/domain/authorization.py +++ b/influxdb_client/domain/authorization.py @@ -138,7 +138,7 @@ def updated_at(self, updated_at): def org_id(self): """Get the org_id of this Authorization. - ID of the organization that the authorization is scoped to. + The organization ID. Specifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that the authorization is scoped to. :return: The org_id of this Authorization. :rtype: str @@ -149,7 +149,7 @@ def org_id(self): def org_id(self, org_id): """Set the org_id of this Authorization. - ID of the organization that the authorization is scoped to. + The organization ID. Specifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that the authorization is scoped to. :param org_id: The org_id of this Authorization. :type: str @@ -160,7 +160,7 @@ def org_id(self, org_id): def permissions(self): """Get the permissions of this Authorization. - List of permissions for an authorization. An authorization must have at least one permission. + The list of permissions. An authorization must have at least one permission. :return: The permissions of this Authorization. :rtype: list[Permission] @@ -171,7 +171,7 @@ def permissions(self): def permissions(self, permissions): """Set the permissions of this Authorization. - List of permissions for an authorization. An authorization must have at least one permission. + The list of permissions. An authorization must have at least one permission. :param permissions: The permissions of this Authorization. :type: list[Permission] @@ -182,6 +182,8 @@ def permissions(self, permissions): def id(self): """Get the id of this Authorization. + The authorization ID. + :return: The id of this Authorization. :rtype: str """ # noqa: E501 @@ -191,6 +193,8 @@ def id(self): def id(self, id): """Set the id of this Authorization. + The authorization ID. + :param id: The id of this Authorization. :type: str """ # noqa: E501 @@ -200,7 +204,7 @@ def id(self, id): def token(self): """Get the token of this Authorization. - Token used to authenticate API requests. + The API token. The token value is unique to the authorization. [API tokens](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) are used to authenticate and authorize InfluxDB API requests and `influx` CLI commands--after receiving the request, InfluxDB checks that the token is valid and that the `permissions` allow the requested action(s). :return: The token of this Authorization. :rtype: str @@ -211,7 +215,7 @@ def token(self): def token(self, token): """Set the token of this Authorization. - Token used to authenticate API requests. + The API token. The token value is unique to the authorization. [API tokens](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) are used to authenticate and authorize InfluxDB API requests and `influx` CLI commands--after receiving the request, InfluxDB checks that the token is valid and that the `permissions` allow the requested action(s). :param token: The token of this Authorization. :type: str @@ -222,7 +226,7 @@ def token(self, token): def user_id(self): """Get the user_id of this Authorization. - ID of the user that created and owns the token. + The user ID. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) that owns the authorization. If _scoped_, the user that the authorization is scoped to; otherwise, the creator of the authorization. :return: The user_id of this Authorization. :rtype: str @@ -233,7 +237,7 @@ def user_id(self): def user_id(self, user_id): """Set the user_id of this Authorization. - ID of the user that created and owns the token. + The user ID. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) that owns the authorization. If _scoped_, the user that the authorization is scoped to; otherwise, the creator of the authorization. :param user_id: The user_id of this Authorization. :type: str @@ -244,7 +248,7 @@ def user_id(self, user_id): def user(self): """Get the user of this Authorization. - Name of the user that created and owns the token. + The user name. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) that owns the authorization. If the authorization is _scoped_ to a user, the user; otherwise, the creator of the authorization. :return: The user of this Authorization. :rtype: str @@ -255,7 +259,7 @@ def user(self): def user(self, user): """Set the user of this Authorization. - Name of the user that created and owns the token. + The user name. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) that owns the authorization. If the authorization is _scoped_ to a user, the user; otherwise, the creator of the authorization. :param user: The user of this Authorization. :type: str @@ -266,7 +270,7 @@ def user(self, user): def org(self): """Get the org of this Authorization. - Name of the organization that the token is scoped to. + The organization name. Specifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that the token is scoped to. :return: The org of this Authorization. :rtype: str @@ -277,7 +281,7 @@ def org(self): def org(self, org): """Set the org of this Authorization. - Name of the organization that the token is scoped to. + The organization name. Specifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that the token is scoped to. :param org: The org of this Authorization. :type: str diff --git a/influxdb_client/domain/authorization_post_request.py b/influxdb_client/domain/authorization_post_request.py index 7932e618..94bcd96f 100644 --- a/influxdb_client/domain/authorization_post_request.py +++ b/influxdb_client/domain/authorization_post_request.py @@ -67,7 +67,7 @@ def __init__(self, org_id=None, user_id=None, permissions=None, status='active', def org_id(self): """Get the org_id of this AuthorizationPostRequest. - ID of org that authorization is scoped to. + An organization ID. Specifies the organization that owns the authorization. :return: The org_id of this AuthorizationPostRequest. :rtype: str @@ -78,7 +78,7 @@ def org_id(self): def org_id(self, org_id): """Set the org_id of this AuthorizationPostRequest. - ID of org that authorization is scoped to. + An organization ID. Specifies the organization that owns the authorization. :param org_id: The org_id of this AuthorizationPostRequest. :type: str @@ -89,7 +89,7 @@ def org_id(self, org_id): def user_id(self): """Get the user_id of this AuthorizationPostRequest. - ID of user that authorization is scoped to. + A user ID. Specifies the user that the authorization is scoped to. When a user authenticates with username and password, InfluxDB generates a _user session_ with all the permissions specified by all the user's authorizations. :return: The user_id of this AuthorizationPostRequest. :rtype: str @@ -100,7 +100,7 @@ def user_id(self): def user_id(self, user_id): """Set the user_id of this AuthorizationPostRequest. - ID of user that authorization is scoped to. + A user ID. Specifies the user that the authorization is scoped to. When a user authenticates with username and password, InfluxDB generates a _user session_ with all the permissions specified by all the user's authorizations. :param user_id: The user_id of this AuthorizationPostRequest. :type: str @@ -111,7 +111,7 @@ def user_id(self, user_id): def permissions(self): """Get the permissions of this AuthorizationPostRequest. - List of permissions for an auth. An auth must have at least one Permission. + A list of permissions for an authorization. In the list, provide at least one `permission` object. In a `permission`, the `resource.type` property grants access to all resources of the specified type. To grant access to only a specific resource, specify the `resource.id` property. :return: The permissions of this AuthorizationPostRequest. :rtype: list[Permission] @@ -122,7 +122,7 @@ def permissions(self): def permissions(self, permissions): """Set the permissions of this AuthorizationPostRequest. - List of permissions for an auth. An auth must have at least one Permission. + A list of permissions for an authorization. In the list, provide at least one `permission` object. In a `permission`, the `resource.type` property grants access to all resources of the specified type. To grant access to only a specific resource, specify the `resource.id` property. :param permissions: The permissions of this AuthorizationPostRequest. :type: list[Permission] diff --git a/influxdb_client/domain/authorization_update_request.py b/influxdb_client/domain/authorization_update_request.py index 82c60fe5..097d9654 100644 --- a/influxdb_client/domain/authorization_update_request.py +++ b/influxdb_client/domain/authorization_update_request.py @@ -54,7 +54,7 @@ def __init__(self, status='active', description=None): # noqa: E501,D401,D403 def status(self): """Get the status of this AuthorizationUpdateRequest. - Status of the token. If `inactive`, requests using the token will be rejected. + Status of the token. If `inactive`, InfluxDB rejects requests that use the token. :return: The status of this AuthorizationUpdateRequest. :rtype: str @@ -65,7 +65,7 @@ def status(self): def status(self, status): """Set the status of this AuthorizationUpdateRequest. - Status of the token. If `inactive`, requests using the token will be rejected. + Status of the token. If `inactive`, InfluxDB rejects requests that use the token. :param status: The status of this AuthorizationUpdateRequest. :type: str diff --git a/influxdb_client/domain/band_view_properties.py b/influxdb_client/domain/band_view_properties.py index aa1250bf..1b03b7b4 100644 --- a/influxdb_client/domain/band_view_properties.py +++ b/influxdb_client/domain/band_view_properties.py @@ -32,6 +32,7 @@ class BandViewProperties(ViewProperties): and the value is json key in definition. """ openapi_types = { + 'adaptive_zoom_hide': 'bool', 'time_format': 'str', 'type': 'str', 'queries': 'list[DashboardQuery]', @@ -63,6 +64,7 @@ class BandViewProperties(ViewProperties): } attribute_map = { + 'adaptive_zoom_hide': 'adaptiveZoomHide', 'time_format': 'timeFormat', 'type': 'type', 'queries': 'queries', @@ -93,10 +95,11 @@ class BandViewProperties(ViewProperties): 'legend_orientation_threshold': 'legendOrientationThreshold' } - def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, axes=None, static_legend=None, x_column=None, generate_x_axis_ticks=None, x_total_ticks=None, x_tick_start=None, x_tick_step=None, y_column=None, generate_y_axis_ticks=None, y_total_ticks=None, y_tick_start=None, y_tick_step=None, upper_column=None, main_column=None, lower_column=None, hover_dimension=None, geom=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 + def __init__(self, adaptive_zoom_hide=None, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, axes=None, static_legend=None, x_column=None, generate_x_axis_ticks=None, x_total_ticks=None, x_tick_start=None, x_tick_step=None, y_column=None, generate_y_axis_ticks=None, y_total_ticks=None, y_tick_start=None, y_tick_step=None, upper_column=None, main_column=None, lower_column=None, hover_dimension=None, geom=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 """BandViewProperties - a model defined in OpenAPI.""" # noqa: E501 ViewProperties.__init__(self) # noqa: E501 + self._adaptive_zoom_hide = None self._time_format = None self._type = None self._queries = None @@ -127,6 +130,8 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape self._legend_orientation_threshold = None self.discriminator = None + if adaptive_zoom_hide is not None: + self.adaptive_zoom_hide = adaptive_zoom_hide if time_format is not None: self.time_format = time_format self.type = type @@ -176,6 +181,24 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape if legend_orientation_threshold is not None: self.legend_orientation_threshold = legend_orientation_threshold + @property + def adaptive_zoom_hide(self): + """Get the adaptive_zoom_hide of this BandViewProperties. + + :return: The adaptive_zoom_hide of this BandViewProperties. + :rtype: bool + """ # noqa: E501 + return self._adaptive_zoom_hide + + @adaptive_zoom_hide.setter + def adaptive_zoom_hide(self, adaptive_zoom_hide): + """Set the adaptive_zoom_hide of this BandViewProperties. + + :param adaptive_zoom_hide: The adaptive_zoom_hide of this BandViewProperties. + :type: bool + """ # noqa: E501 + self._adaptive_zoom_hide = adaptive_zoom_hide + @property def time_format(self): """Get the time_format of this BandViewProperties. diff --git a/influxdb_client/domain/bucket.py b/influxdb_client/domain/bucket.py index 9ca86648..fe7d3d6b 100644 --- a/influxdb_client/domain/bucket.py +++ b/influxdb_client/domain/bucket.py @@ -284,7 +284,7 @@ def updated_at(self, updated_at): def retention_rules(self): """Get the retention_rules of this Bucket. - Rules to expire or retain data. No rules means data never expires. + Retention rules to expire or retain data. The InfluxDB `/api/v2` API uses `RetentionRules` to configure the [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period). #### InfluxDB Cloud - `retentionRules` is required. #### InfluxDB OSS - `retentionRules` isn't required. :return: The retention_rules of this Bucket. :rtype: list[BucketRetentionRules] @@ -295,7 +295,7 @@ def retention_rules(self): def retention_rules(self, retention_rules): """Set the retention_rules of this Bucket. - Rules to expire or retain data. No rules means data never expires. + Retention rules to expire or retain data. The InfluxDB `/api/v2` API uses `RetentionRules` to configure the [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period). #### InfluxDB Cloud - `retentionRules` is required. #### InfluxDB OSS - `retentionRules` isn't required. :param retention_rules: The retention_rules of this Bucket. :type: list[BucketRetentionRules] diff --git a/influxdb_client/domain/bucket_retention_rules.py b/influxdb_client/domain/bucket_retention_rules.py index e70c7d84..2359eb73 100644 --- a/influxdb_client/domain/bucket_retention_rules.py +++ b/influxdb_client/domain/bucket_retention_rules.py @@ -41,14 +41,15 @@ class BucketRetentionRules(object): 'shard_group_duration_seconds': 'shardGroupDurationSeconds' } - def __init__(self, type='expire', every_seconds=None, shard_group_duration_seconds=None): # noqa: E501,D401,D403 + def __init__(self, type='expire', every_seconds=2592000, shard_group_duration_seconds=None): # noqa: E501,D401,D403 """BucketRetentionRules - a model defined in OpenAPI.""" # noqa: E501 self._type = None self._every_seconds = None self._shard_group_duration_seconds = None self.discriminator = None - self.type = type + if type is not None: + self.type = type self.every_seconds = every_seconds if shard_group_duration_seconds is not None: self.shard_group_duration_seconds = shard_group_duration_seconds @@ -69,15 +70,13 @@ def type(self, type): :param type: The type of this BucketRetentionRules. :type: str """ # noqa: E501 - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type @property def every_seconds(self): """Get the every_seconds of this BucketRetentionRules. - Duration in seconds for how long data will be kept in the database. 0 means infinite. + The duration in seconds for how long data will be kept in the database. The default duration is 2592000 (30 days). 0 represents infinite retention. :return: The every_seconds of this BucketRetentionRules. :rtype: int @@ -88,7 +87,7 @@ def every_seconds(self): def every_seconds(self, every_seconds): """Set the every_seconds of this BucketRetentionRules. - Duration in seconds for how long data will be kept in the database. 0 means infinite. + The duration in seconds for how long data will be kept in the database. The default duration is 2592000 (30 days). 0 represents infinite retention. :param every_seconds: The every_seconds of this BucketRetentionRules. :type: int @@ -103,7 +102,7 @@ def every_seconds(self, every_seconds): def shard_group_duration_seconds(self): """Get the shard_group_duration_seconds of this BucketRetentionRules. - Shard duration measured in seconds. + The shard group duration. The duration or interval (in seconds) that each shard group covers. #### InfluxDB Cloud - Does not use `shardGroupDurationsSeconds`. #### InfluxDB OSS - Default value depends on the [bucket retention period](https://docs.influxdata.com/influxdb/latest/reference/internals/shards/#shard-group-duration). :return: The shard_group_duration_seconds of this BucketRetentionRules. :rtype: int @@ -114,7 +113,7 @@ def shard_group_duration_seconds(self): def shard_group_duration_seconds(self, shard_group_duration_seconds): """Set the shard_group_duration_seconds of this BucketRetentionRules. - Shard duration measured in seconds. + The shard group duration. The duration or interval (in seconds) that each shard group covers. #### InfluxDB Cloud - Does not use `shardGroupDurationsSeconds`. #### InfluxDB OSS - Default value depends on the [bucket retention period](https://docs.influxdata.com/influxdb/latest/reference/internals/shards/#shard-group-duration). :param shard_group_duration_seconds: The shard_group_duration_seconds of this BucketRetentionRules. :type: int diff --git a/influxdb_client/domain/check_base.py b/influxdb_client/domain/check_base.py index 00964fc2..b54921a1 100644 --- a/influxdb_client/domain/check_base.py +++ b/influxdb_client/domain/check_base.py @@ -318,7 +318,7 @@ def description(self, description): def latest_completed(self): """Get the latest_completed of this CheckBase. - Timestamp (in RFC3339 date/time format](https://datatracker.ietf.org/doc/html/rfc3339)) of the latest scheduled and completed run. + A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. :return: The latest_completed of this CheckBase. :rtype: datetime @@ -329,7 +329,7 @@ def latest_completed(self): def latest_completed(self, latest_completed): """Set the latest_completed of this CheckBase. - Timestamp (in RFC3339 date/time format](https://datatracker.ietf.org/doc/html/rfc3339)) of the latest scheduled and completed run. + A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. :param latest_completed: The latest_completed of this CheckBase. :type: datetime diff --git a/influxdb_client/domain/check_view_properties.py b/influxdb_client/domain/check_view_properties.py index 9e96fea8..5226c490 100644 --- a/influxdb_client/domain/check_view_properties.py +++ b/influxdb_client/domain/check_view_properties.py @@ -32,6 +32,7 @@ class CheckViewProperties(ViewProperties): and the value is json key in definition. """ openapi_types = { + 'adaptive_zoom_hide': 'bool', 'type': 'str', 'shape': 'str', 'check_id': 'str', @@ -45,6 +46,7 @@ class CheckViewProperties(ViewProperties): } attribute_map = { + 'adaptive_zoom_hide': 'adaptiveZoomHide', 'type': 'type', 'shape': 'shape', 'check_id': 'checkID', @@ -57,10 +59,11 @@ class CheckViewProperties(ViewProperties): 'legend_orientation_threshold': 'legendOrientationThreshold' } - def __init__(self, type=None, shape=None, check_id=None, check=None, queries=None, colors=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 + def __init__(self, adaptive_zoom_hide=None, type=None, shape=None, check_id=None, check=None, queries=None, colors=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 """CheckViewProperties - a model defined in OpenAPI.""" # noqa: E501 ViewProperties.__init__(self) # noqa: E501 + self._adaptive_zoom_hide = None self._type = None self._shape = None self._check_id = None @@ -73,6 +76,8 @@ def __init__(self, type=None, shape=None, check_id=None, check=None, queries=Non self._legend_orientation_threshold = None self.discriminator = None + if adaptive_zoom_hide is not None: + self.adaptive_zoom_hide = adaptive_zoom_hide self.type = type self.shape = shape self.check_id = check_id @@ -89,6 +94,24 @@ def __init__(self, type=None, shape=None, check_id=None, check=None, queries=Non if legend_orientation_threshold is not None: self.legend_orientation_threshold = legend_orientation_threshold + @property + def adaptive_zoom_hide(self): + """Get the adaptive_zoom_hide of this CheckViewProperties. + + :return: The adaptive_zoom_hide of this CheckViewProperties. + :rtype: bool + """ # noqa: E501 + return self._adaptive_zoom_hide + + @adaptive_zoom_hide.setter + def adaptive_zoom_hide(self, adaptive_zoom_hide): + """Set the adaptive_zoom_hide of this CheckViewProperties. + + :param adaptive_zoom_hide: The adaptive_zoom_hide of this CheckViewProperties. + :type: bool + """ # noqa: E501 + self._adaptive_zoom_hide = adaptive_zoom_hide + @property def type(self): """Get the type of this CheckViewProperties. diff --git a/influxdb_client/domain/dbrp.py b/influxdb_client/domain/dbrp.py index e74c2435..1bb74ecf 100644 --- a/influxdb_client/domain/dbrp.py +++ b/influxdb_client/domain/dbrp.py @@ -36,6 +36,7 @@ class DBRP(object): 'database': 'str', 'retention_policy': 'str', 'default': 'bool', + 'virtual': 'bool', 'links': 'Links' } @@ -46,10 +47,11 @@ class DBRP(object): 'database': 'database', 'retention_policy': 'retention_policy', 'default': 'default', + 'virtual': 'virtual', 'links': 'links' } - def __init__(self, id=None, org_id=None, bucket_id=None, database=None, retention_policy=None, default=None, links=None): # noqa: E501,D401,D403 + def __init__(self, id=None, org_id=None, bucket_id=None, database=None, retention_policy=None, default=None, virtual=None, links=None): # noqa: E501,D401,D403 """DBRP - a model defined in OpenAPI.""" # noqa: E501 self._id = None self._org_id = None @@ -57,6 +59,7 @@ def __init__(self, id=None, org_id=None, bucket_id=None, database=None, retentio self._database = None self._retention_policy = None self._default = None + self._virtual = None self._links = None self.discriminator = None @@ -66,6 +69,8 @@ def __init__(self, id=None, org_id=None, bucket_id=None, database=None, retentio self.database = database self.retention_policy = retention_policy self.default = default + if virtual is not None: + self.virtual = virtual if links is not None: self.links = links @@ -73,7 +78,7 @@ def __init__(self, id=None, org_id=None, bucket_id=None, database=None, retentio def id(self): """Get the id of this DBRP. - ID of the DBRP mapping. + The resource ID that InfluxDB uses to uniquely identify the database retention policy (DBRP) mapping. :return: The id of this DBRP. :rtype: str @@ -84,7 +89,7 @@ def id(self): def id(self, id): """Set the id of this DBRP. - ID of the DBRP mapping. + The resource ID that InfluxDB uses to uniquely identify the database retention policy (DBRP) mapping. :param id: The id of this DBRP. :type: str @@ -97,7 +102,7 @@ def id(self, id): def org_id(self): """Get the org_id of this DBRP. - ID of the organization that owns this mapping. + An organization ID. Identifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that owns the mapping. :return: The org_id of this DBRP. :rtype: str @@ -108,7 +113,7 @@ def org_id(self): def org_id(self, org_id): """Set the org_id of this DBRP. - ID of the organization that owns this mapping. + An organization ID. Identifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that owns the mapping. :param org_id: The org_id of this DBRP. :type: str @@ -121,7 +126,7 @@ def org_id(self, org_id): def bucket_id(self): """Get the bucket_id of this DBRP. - ID of the bucket used as the target for the translation. + A bucket ID. Identifies the bucket used as the target for the translation. :return: The bucket_id of this DBRP. :rtype: str @@ -132,7 +137,7 @@ def bucket_id(self): def bucket_id(self, bucket_id): """Set the bucket_id of this DBRP. - ID of the bucket used as the target for the translation. + A bucket ID. Identifies the bucket used as the target for the translation. :param bucket_id: The bucket_id of this DBRP. :type: str @@ -145,7 +150,7 @@ def bucket_id(self, bucket_id): def database(self): """Get the database of this DBRP. - InfluxDB v1 database + A database name. Identifies the InfluxDB v1 database. :return: The database of this DBRP. :rtype: str @@ -156,7 +161,7 @@ def database(self): def database(self, database): """Set the database of this DBRP. - InfluxDB v1 database + A database name. Identifies the InfluxDB v1 database. :param database: The database of this DBRP. :type: str @@ -169,7 +174,7 @@ def database(self, database): def retention_policy(self): """Get the retention_policy of this DBRP. - InfluxDB v1 retention policy + A [retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. :return: The retention_policy of this DBRP. :rtype: str @@ -180,7 +185,7 @@ def retention_policy(self): def retention_policy(self, retention_policy): """Set the retention_policy of this DBRP. - InfluxDB v1 retention policy + A [retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. :param retention_policy: The retention_policy of this DBRP. :type: str @@ -193,7 +198,7 @@ def retention_policy(self, retention_policy): def default(self): """Get the default of this DBRP. - Mapping represents the default retention policy for the database specified. + If set to `true`, this DBRP mapping is the default retention policy for the database (specified by the `database` property's value). :return: The default of this DBRP. :rtype: bool @@ -204,7 +209,7 @@ def default(self): def default(self, default): """Set the default of this DBRP. - Mapping represents the default retention policy for the database specified. + If set to `true`, this DBRP mapping is the default retention policy for the database (specified by the `database` property's value). :param default: The default of this DBRP. :type: bool @@ -213,6 +218,28 @@ def default(self, default): raise ValueError("Invalid value for `default`, must not be `None`") # noqa: E501 self._default = default + @property + def virtual(self): + """Get the virtual of this DBRP. + + Indicates an autogenerated, virtual mapping based on the bucket name. Currently only available in OSS. + + :return: The virtual of this DBRP. + :rtype: bool + """ # noqa: E501 + return self._virtual + + @virtual.setter + def virtual(self, virtual): + """Set the virtual of this DBRP. + + Indicates an autogenerated, virtual mapping based on the bucket name. Currently only available in OSS. + + :param virtual: The virtual of this DBRP. + :type: bool + """ # noqa: E501 + self._virtual = virtual + @property def links(self): """Get the links of this DBRP. diff --git a/influxdb_client/domain/dbrp_create.py b/influxdb_client/domain/dbrp_create.py index 995efe5c..e69183ff 100644 --- a/influxdb_client/domain/dbrp_create.py +++ b/influxdb_client/domain/dbrp_create.py @@ -30,8 +30,8 @@ class DBRPCreate(object): and the value is json key in definition. """ openapi_types = { - 'org_id': 'str', 'org': 'str', + 'org_id': 'str', 'bucket_id': 'str', 'database': 'str', 'retention_policy': 'str', @@ -39,28 +39,28 @@ class DBRPCreate(object): } attribute_map = { - 'org_id': 'orgID', 'org': 'org', + 'org_id': 'orgID', 'bucket_id': 'bucketID', 'database': 'database', 'retention_policy': 'retention_policy', 'default': 'default' } - def __init__(self, org_id=None, org=None, bucket_id=None, database=None, retention_policy=None, default=None): # noqa: E501,D401,D403 + def __init__(self, org=None, org_id=None, bucket_id=None, database=None, retention_policy=None, default=None): # noqa: E501,D401,D403 """DBRPCreate - a model defined in OpenAPI.""" # noqa: E501 - self._org_id = None self._org = None + self._org_id = None self._bucket_id = None self._database = None self._retention_policy = None self._default = None self.discriminator = None - if org_id is not None: - self.org_id = org_id if org is not None: self.org = org + if org_id is not None: + self.org_id = org_id self.bucket_id = bucket_id self.database = database self.retention_policy = retention_policy @@ -68,54 +68,54 @@ def __init__(self, org_id=None, org=None, bucket_id=None, database=None, retenti self.default = default @property - def org_id(self): - """Get the org_id of this DBRPCreate. + def org(self): + """Get the org of this DBRPCreate. - ID of the organization that owns this mapping. + An organization name. Identifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that owns the mapping. - :return: The org_id of this DBRPCreate. + :return: The org of this DBRPCreate. :rtype: str """ # noqa: E501 - return self._org_id + return self._org - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this DBRPCreate. + @org.setter + def org(self, org): + """Set the org of this DBRPCreate. - ID of the organization that owns this mapping. + An organization name. Identifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that owns the mapping. - :param org_id: The org_id of this DBRPCreate. + :param org: The org of this DBRPCreate. :type: str """ # noqa: E501 - self._org_id = org_id + self._org = org @property - def org(self): - """Get the org of this DBRPCreate. + def org_id(self): + """Get the org_id of this DBRPCreate. - Name of the organization that owns this mapping. + An organization ID. Identifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that owns the mapping. - :return: The org of this DBRPCreate. + :return: The org_id of this DBRPCreate. :rtype: str """ # noqa: E501 - return self._org + return self._org_id - @org.setter - def org(self, org): - """Set the org of this DBRPCreate. + @org_id.setter + def org_id(self, org_id): + """Set the org_id of this DBRPCreate. - Name of the organization that owns this mapping. + An organization ID. Identifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that owns the mapping. - :param org: The org of this DBRPCreate. + :param org_id: The org_id of this DBRPCreate. :type: str """ # noqa: E501 - self._org = org + self._org_id = org_id @property def bucket_id(self): """Get the bucket_id of this DBRPCreate. - ID of the bucket used as the target for the translation. + A bucket ID. Identifies the bucket used as the target for the translation. :return: The bucket_id of this DBRPCreate. :rtype: str @@ -126,7 +126,7 @@ def bucket_id(self): def bucket_id(self, bucket_id): """Set the bucket_id of this DBRPCreate. - ID of the bucket used as the target for the translation. + A bucket ID. Identifies the bucket used as the target for the translation. :param bucket_id: The bucket_id of this DBRPCreate. :type: str @@ -139,7 +139,7 @@ def bucket_id(self, bucket_id): def database(self): """Get the database of this DBRPCreate. - InfluxDB v1 database + A database name. Identifies the InfluxDB v1 database. :return: The database of this DBRPCreate. :rtype: str @@ -150,7 +150,7 @@ def database(self): def database(self, database): """Set the database of this DBRPCreate. - InfluxDB v1 database + A database name. Identifies the InfluxDB v1 database. :param database: The database of this DBRPCreate. :type: str @@ -163,7 +163,7 @@ def database(self, database): def retention_policy(self): """Get the retention_policy of this DBRPCreate. - InfluxDB v1 retention policy + A [retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. :return: The retention_policy of this DBRPCreate. :rtype: str @@ -174,7 +174,7 @@ def retention_policy(self): def retention_policy(self, retention_policy): """Set the retention_policy of this DBRPCreate. - InfluxDB v1 retention policy + A [retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. :param retention_policy: The retention_policy of this DBRPCreate. :type: str @@ -187,7 +187,7 @@ def retention_policy(self, retention_policy): def default(self): """Get the default of this DBRPCreate. - Mapping represents the default retention policy for the database specified. + Set to `true` to use this DBRP mapping as the default retention policy for the database (specified by the `database` property's value). :return: The default of this DBRPCreate. :rtype: bool @@ -198,7 +198,7 @@ def default(self): def default(self, default): """Set the default of this DBRPCreate. - Mapping represents the default retention policy for the database specified. + Set to `true` to use this DBRP mapping as the default retention policy for the database (specified by the `database` property's value). :param default: The default of this DBRPCreate. :type: bool diff --git a/influxdb_client/domain/dbrp_update.py b/influxdb_client/domain/dbrp_update.py index 7e8da0bd..4b0c5bae 100644 --- a/influxdb_client/domain/dbrp_update.py +++ b/influxdb_client/domain/dbrp_update.py @@ -54,7 +54,7 @@ def __init__(self, retention_policy=None, default=None): # noqa: E501,D401,D403 def retention_policy(self): """Get the retention_policy of this DBRPUpdate. - InfluxDB v1 retention policy + A [retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. :return: The retention_policy of this DBRPUpdate. :rtype: str @@ -65,7 +65,7 @@ def retention_policy(self): def retention_policy(self, retention_policy): """Set the retention_policy of this DBRPUpdate. - InfluxDB v1 retention policy + A [retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. :param retention_policy: The retention_policy of this DBRPUpdate. :type: str @@ -76,6 +76,8 @@ def retention_policy(self, retention_policy): def default(self): """Get the default of this DBRPUpdate. + Set to `true` to use this DBRP mapping as the default retention policy for the database (specified by the `database` property's value). To remove the default mapping, set to `false`. + :return: The default of this DBRPUpdate. :rtype: bool """ # noqa: E501 @@ -85,6 +87,8 @@ def default(self): def default(self, default): """Set the default of this DBRPUpdate. + Set to `true` to use this DBRP mapping as the default retention policy for the database (specified by the `database` property's value). To remove the default mapping, set to `false`. + :param default: The default of this DBRPUpdate. :type: bool """ # noqa: E501 diff --git a/influxdb_client/domain/delete_predicate_request.py b/influxdb_client/domain/delete_predicate_request.py index 1fbb5cd2..13202910 100644 --- a/influxdb_client/domain/delete_predicate_request.py +++ b/influxdb_client/domain/delete_predicate_request.py @@ -57,7 +57,7 @@ def __init__(self, start=None, stop=None, predicate=None): # noqa: E501,D401,D4 def start(self): """Get the start of this DeletePredicateRequest. - A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/flux/v0.x/data-types/basic/time/#time-syntax)). + A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). The earliest time to delete from. :return: The start of this DeletePredicateRequest. :rtype: datetime @@ -68,7 +68,7 @@ def start(self): def start(self, start): """Set the start of this DeletePredicateRequest. - A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/flux/v0.x/data-types/basic/time/#time-syntax)). + A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). The earliest time to delete from. :param start: The start of this DeletePredicateRequest. :type: datetime @@ -81,7 +81,7 @@ def start(self, start): def stop(self): """Get the stop of this DeletePredicateRequest. - A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/flux/v0.x/data-types/basic/time/#time-syntax)). + A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). The latest time to delete from. :return: The stop of this DeletePredicateRequest. :rtype: datetime @@ -92,7 +92,7 @@ def stop(self): def stop(self, stop): """Set the stop of this DeletePredicateRequest. - A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/flux/v0.x/data-types/basic/time/#time-syntax)). + A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). The latest time to delete from. :param stop: The stop of this DeletePredicateRequest. :type: datetime @@ -105,7 +105,7 @@ def stop(self, stop): def predicate(self): """Get the predicate of this DeletePredicateRequest. - An expression in [delete predicate syntax](https://docs.influxdata.com/influxdb/v2.2/reference/syntax/delete-predicate/). + An expression in [delete predicate syntax](https://docs.influxdata.com/influxdb/latest/reference/syntax/delete-predicate/). :return: The predicate of this DeletePredicateRequest. :rtype: str @@ -116,7 +116,7 @@ def predicate(self): def predicate(self, predicate): """Set the predicate of this DeletePredicateRequest. - An expression in [delete predicate syntax](https://docs.influxdata.com/influxdb/v2.2/reference/syntax/delete-predicate/). + An expression in [delete predicate syntax](https://docs.influxdata.com/influxdb/latest/reference/syntax/delete-predicate/). :param predicate: The predicate of this DeletePredicateRequest. :type: str diff --git a/influxdb_client/domain/dialect.py b/influxdb_client/domain/dialect.py index 648e66b7..18bc7532 100644 --- a/influxdb_client/domain/dialect.py +++ b/influxdb_client/domain/dialect.py @@ -69,7 +69,7 @@ def __init__(self, header=True, delimiter=',', annotations=None, comment_prefix= def header(self): """Get the header of this Dialect. - If true, the results will contain a header row + If true, the results contain a header row. :return: The header of this Dialect. :rtype: bool @@ -80,7 +80,7 @@ def header(self): def header(self, header): """Set the header of this Dialect. - If true, the results will contain a header row + If true, the results contain a header row. :param header: The header of this Dialect. :type: bool @@ -91,7 +91,7 @@ def header(self, header): def delimiter(self): """Get the delimiter of this Dialect. - Separator between cells; the default is , + The separator used between cells. Default is a comma (`,`). :return: The delimiter of this Dialect. :rtype: str @@ -102,7 +102,7 @@ def delimiter(self): def delimiter(self, delimiter): """Set the delimiter of this Dialect. - Separator between cells; the default is , + The separator used between cells. Default is a comma (`,`). :param delimiter: The delimiter of this Dialect. :type: str @@ -117,7 +117,7 @@ def delimiter(self, delimiter): def annotations(self): """Get the annotations of this Dialect. - https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns + Annotation rows to include in the results. An _annotation_ is metadata associated with an object (column) in the data model. #### Related guides - See [Annotated CSV annotations](https://docs.influxdata.com/influxdb/latest/reference/syntax/annotated-csv/#annotations) for examples and more information. For more information about **annotations** in tabular data, see [W3 metadata vocabulary for tabular data](https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns). :return: The annotations of this Dialect. :rtype: list[str] @@ -128,7 +128,7 @@ def annotations(self): def annotations(self, annotations): """Set the annotations of this Dialect. - https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns + Annotation rows to include in the results. An _annotation_ is metadata associated with an object (column) in the data model. #### Related guides - See [Annotated CSV annotations](https://docs.influxdata.com/influxdb/latest/reference/syntax/annotated-csv/#annotations) for examples and more information. For more information about **annotations** in tabular data, see [W3 metadata vocabulary for tabular data](https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns). :param annotations: The annotations of this Dialect. :type: list[str] @@ -146,7 +146,7 @@ def annotations(self, annotations): def comment_prefix(self): """Get the comment_prefix of this Dialect. - Character prefixed to comment strings + The character prefixed to comment strings. Default is a number sign (`#`). :return: The comment_prefix of this Dialect. :rtype: str @@ -157,7 +157,7 @@ def comment_prefix(self): def comment_prefix(self, comment_prefix): """Set the comment_prefix of this Dialect. - Character prefixed to comment strings + The character prefixed to comment strings. Default is a number sign (`#`). :param comment_prefix: The comment_prefix of this Dialect. :type: str @@ -172,7 +172,7 @@ def comment_prefix(self, comment_prefix): def date_time_format(self): """Get the date_time_format of this Dialect. - Format of timestamps + The format for timestamps in results. Default is [`RFC3339` date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp). To include nanoseconds in timestamps, use `RFC3339Nano`. #### Example formatted date/time values | Format | Value | |:------------|:----------------------------| | `RFC3339` | `"2006-01-02T15:04:05Z07:00"` | | `RFC3339Nano` | `"2006-01-02T15:04:05.999999999Z07:00"` | :return: The date_time_format of this Dialect. :rtype: str @@ -183,7 +183,7 @@ def date_time_format(self): def date_time_format(self, date_time_format): """Set the date_time_format of this Dialect. - Format of timestamps + The format for timestamps in results. Default is [`RFC3339` date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp). To include nanoseconds in timestamps, use `RFC3339Nano`. #### Example formatted date/time values | Format | Value | |:------------|:----------------------------| | `RFC3339` | `"2006-01-02T15:04:05Z07:00"` | | `RFC3339Nano` | `"2006-01-02T15:04:05.999999999Z07:00"` | :param date_time_format: The date_time_format of this Dialect. :type: str diff --git a/influxdb_client/domain/heatmap_view_properties.py b/influxdb_client/domain/heatmap_view_properties.py index c94ae277..c4061b18 100644 --- a/influxdb_client/domain/heatmap_view_properties.py +++ b/influxdb_client/domain/heatmap_view_properties.py @@ -32,6 +32,7 @@ class HeatmapViewProperties(ViewProperties): and the value is json key in definition. """ openapi_types = { + 'adaptive_zoom_hide': 'bool', 'time_format': 'str', 'type': 'str', 'queries': 'list[DashboardQuery]', @@ -65,6 +66,7 @@ class HeatmapViewProperties(ViewProperties): } attribute_map = { + 'adaptive_zoom_hide': 'adaptiveZoomHide', 'time_format': 'timeFormat', 'type': 'type', 'queries': 'queries', @@ -97,10 +99,11 @@ class HeatmapViewProperties(ViewProperties): 'legend_orientation_threshold': 'legendOrientationThreshold' } - def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, x_column=None, generate_x_axis_ticks=None, x_total_ticks=None, x_tick_start=None, x_tick_step=None, y_column=None, generate_y_axis_ticks=None, y_total_ticks=None, y_tick_start=None, y_tick_step=None, x_domain=None, y_domain=None, x_axis_label=None, y_axis_label=None, x_prefix=None, x_suffix=None, y_prefix=None, y_suffix=None, bin_size=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 + def __init__(self, adaptive_zoom_hide=None, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, x_column=None, generate_x_axis_ticks=None, x_total_ticks=None, x_tick_start=None, x_tick_step=None, y_column=None, generate_y_axis_ticks=None, y_total_ticks=None, y_tick_start=None, y_tick_step=None, x_domain=None, y_domain=None, x_axis_label=None, y_axis_label=None, x_prefix=None, x_suffix=None, y_prefix=None, y_suffix=None, bin_size=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 """HeatmapViewProperties - a model defined in OpenAPI.""" # noqa: E501 ViewProperties.__init__(self) # noqa: E501 + self._adaptive_zoom_hide = None self._time_format = None self._type = None self._queries = None @@ -133,6 +136,8 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape self._legend_orientation_threshold = None self.discriminator = None + if adaptive_zoom_hide is not None: + self.adaptive_zoom_hide = adaptive_zoom_hide if time_format is not None: self.time_format = time_format self.type = type @@ -177,6 +182,24 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape if legend_orientation_threshold is not None: self.legend_orientation_threshold = legend_orientation_threshold + @property + def adaptive_zoom_hide(self): + """Get the adaptive_zoom_hide of this HeatmapViewProperties. + + :return: The adaptive_zoom_hide of this HeatmapViewProperties. + :rtype: bool + """ # noqa: E501 + return self._adaptive_zoom_hide + + @adaptive_zoom_hide.setter + def adaptive_zoom_hide(self, adaptive_zoom_hide): + """Set the adaptive_zoom_hide of this HeatmapViewProperties. + + :param adaptive_zoom_hide: The adaptive_zoom_hide of this HeatmapViewProperties. + :type: bool + """ # noqa: E501 + self._adaptive_zoom_hide = adaptive_zoom_hide + @property def time_format(self): """Get the time_format of this HeatmapViewProperties. diff --git a/influxdb_client/domain/is_onboarding.py b/influxdb_client/domain/is_onboarding.py index c5989a8a..0e14abdb 100644 --- a/influxdb_client/domain/is_onboarding.py +++ b/influxdb_client/domain/is_onboarding.py @@ -49,7 +49,7 @@ def __init__(self, allowed=None): # noqa: E501,D401,D403 def allowed(self): """Get the allowed of this IsOnboarding. - True means that the influxdb instance has NOT had initial setup; false means that the database has been setup. + If `true`, the InfluxDB instance hasn't had initial setup; `false` otherwise. :return: The allowed of this IsOnboarding. :rtype: bool @@ -60,7 +60,7 @@ def allowed(self): def allowed(self, allowed): """Set the allowed of this IsOnboarding. - True means that the influxdb instance has NOT had initial setup; false means that the database has been setup. + If `true`, the InfluxDB instance hasn't had initial setup; `false` otherwise. :param allowed: The allowed of this IsOnboarding. :type: bool diff --git a/influxdb_client/domain/label.py b/influxdb_client/domain/label.py index f417dd10..cceaab95 100644 --- a/influxdb_client/domain/label.py +++ b/influxdb_client/domain/label.py @@ -118,7 +118,7 @@ def name(self, name): def properties(self): """Get the properties of this Label. - Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. + Key-value pairs associated with this label. To remove a property, send an update with an empty value (`""`) for the key. :return: The properties of this Label. :rtype: dict(str, str) @@ -129,7 +129,7 @@ def properties(self): def properties(self, properties): """Set the properties of this Label. - Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. + Key-value pairs associated with this label. To remove a property, send an update with an empty value (`""`) for the key. :param properties: The properties of this Label. :type: dict(str, str) diff --git a/influxdb_client/domain/label_create_request.py b/influxdb_client/domain/label_create_request.py index 24a63b92..73259eea 100644 --- a/influxdb_client/domain/label_create_request.py +++ b/influxdb_client/domain/label_create_request.py @@ -97,7 +97,7 @@ def name(self, name): def properties(self): """Get the properties of this LabelCreateRequest. - Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. + Key-value pairs associated with this label. To remove a property, send an update with an empty value (`""`) for the key. :return: The properties of this LabelCreateRequest. :rtype: dict(str, str) @@ -108,7 +108,7 @@ def properties(self): def properties(self, properties): """Set the properties of this LabelCreateRequest. - Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. + Key-value pairs associated with this label. To remove a property, send an update with an empty value (`""`) for the key. :param properties: The properties of this LabelCreateRequest. :type: dict(str, str) diff --git a/influxdb_client/domain/label_mapping.py b/influxdb_client/domain/label_mapping.py index ab0691d6..909d1b38 100644 --- a/influxdb_client/domain/label_mapping.py +++ b/influxdb_client/domain/label_mapping.py @@ -42,13 +42,14 @@ def __init__(self, label_id=None): # noqa: E501,D401,D403 self._label_id = None self.discriminator = None - if label_id is not None: - self.label_id = label_id + self.label_id = label_id @property def label_id(self): """Get the label_id of this LabelMapping. + A label ID. Specifies the label to attach. + :return: The label_id of this LabelMapping. :rtype: str """ # noqa: E501 @@ -58,9 +59,13 @@ def label_id(self): def label_id(self, label_id): """Set the label_id of this LabelMapping. + A label ID. Specifies the label to attach. + :param label_id: The label_id of this LabelMapping. :type: str """ # noqa: E501 + if label_id is None: + raise ValueError("Invalid value for `label_id`, must not be `None`") # noqa: E501 self._label_id = label_id def to_dict(self): diff --git a/influxdb_client/domain/label_update.py b/influxdb_client/domain/label_update.py index 31c79558..c1a7c7ee 100644 --- a/influxdb_client/domain/label_update.py +++ b/influxdb_client/domain/label_update.py @@ -72,8 +72,6 @@ def name(self, name): def properties(self): """Get the properties of this LabelUpdate. - Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. - :return: The properties of this LabelUpdate. :rtype: dict(str, str) """ # noqa: E501 @@ -83,8 +81,6 @@ def properties(self): def properties(self, properties): """Set the properties of this LabelUpdate. - Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. - :param properties: The properties of this LabelUpdate. :type: dict(str, str) """ # noqa: E501 diff --git a/influxdb_client/domain/language_request.py b/influxdb_client/domain/language_request.py index 87dde6b7..083e70a2 100644 --- a/influxdb_client/domain/language_request.py +++ b/influxdb_client/domain/language_request.py @@ -48,7 +48,7 @@ def __init__(self, query=None): # noqa: E501,D401,D403 def query(self): """Get the query of this LanguageRequest. - Flux query script to be analyzed + The Flux query script to be analyzed. :return: The query of this LanguageRequest. :rtype: str @@ -59,7 +59,7 @@ def query(self): def query(self, query): """Set the query of this LanguageRequest. - Flux query script to be analyzed + The Flux query script to be analyzed. :param query: The query of this LanguageRequest. :type: str diff --git a/influxdb_client/domain/line_plus_single_stat_properties.py b/influxdb_client/domain/line_plus_single_stat_properties.py index ca236249..5196ba03 100644 --- a/influxdb_client/domain/line_plus_single_stat_properties.py +++ b/influxdb_client/domain/line_plus_single_stat_properties.py @@ -32,6 +32,7 @@ class LinePlusSingleStatProperties(ViewProperties): and the value is json key in definition. """ openapi_types = { + 'adaptive_zoom_hide': 'bool', 'time_format': 'str', 'type': 'str', 'queries': 'list[DashboardQuery]', @@ -64,6 +65,7 @@ class LinePlusSingleStatProperties(ViewProperties): } attribute_map = { + 'adaptive_zoom_hide': 'adaptiveZoomHide', 'time_format': 'timeFormat', 'type': 'type', 'queries': 'queries', @@ -95,10 +97,11 @@ class LinePlusSingleStatProperties(ViewProperties): 'legend_orientation_threshold': 'legendOrientationThreshold' } - def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, axes=None, static_legend=None, x_column=None, generate_x_axis_ticks=None, x_total_ticks=None, x_tick_start=None, x_tick_step=None, y_column=None, generate_y_axis_ticks=None, y_total_ticks=None, y_tick_start=None, y_tick_step=None, shade_below=None, hover_dimension=None, position=None, prefix=None, suffix=None, decimal_places=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 + def __init__(self, adaptive_zoom_hide=None, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, axes=None, static_legend=None, x_column=None, generate_x_axis_ticks=None, x_total_ticks=None, x_tick_start=None, x_tick_step=None, y_column=None, generate_y_axis_ticks=None, y_total_ticks=None, y_tick_start=None, y_tick_step=None, shade_below=None, hover_dimension=None, position=None, prefix=None, suffix=None, decimal_places=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 """LinePlusSingleStatProperties - a model defined in OpenAPI.""" # noqa: E501 ViewProperties.__init__(self) # noqa: E501 + self._adaptive_zoom_hide = None self._time_format = None self._type = None self._queries = None @@ -130,6 +133,8 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape self._legend_orientation_threshold = None self.discriminator = None + if adaptive_zoom_hide is not None: + self.adaptive_zoom_hide = adaptive_zoom_hide if time_format is not None: self.time_format = time_format self.type = type @@ -178,6 +183,24 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape if legend_orientation_threshold is not None: self.legend_orientation_threshold = legend_orientation_threshold + @property + def adaptive_zoom_hide(self): + """Get the adaptive_zoom_hide of this LinePlusSingleStatProperties. + + :return: The adaptive_zoom_hide of this LinePlusSingleStatProperties. + :rtype: bool + """ # noqa: E501 + return self._adaptive_zoom_hide + + @adaptive_zoom_hide.setter + def adaptive_zoom_hide(self, adaptive_zoom_hide): + """Set the adaptive_zoom_hide of this LinePlusSingleStatProperties. + + :param adaptive_zoom_hide: The adaptive_zoom_hide of this LinePlusSingleStatProperties. + :type: bool + """ # noqa: E501 + self._adaptive_zoom_hide = adaptive_zoom_hide + @property def time_format(self): """Get the time_format of this LinePlusSingleStatProperties. diff --git a/influxdb_client/domain/log_event.py b/influxdb_client/domain/log_event.py index 3eede677..336736e8 100644 --- a/influxdb_client/domain/log_event.py +++ b/influxdb_client/domain/log_event.py @@ -59,7 +59,7 @@ def __init__(self, time=None, message=None, run_id=None): # noqa: E501,D401,D40 def time(self): """Get the time of this LogEvent. - Time event occurred, RFC3339Nano. + The time ([RFC3339Nano date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339nano-timestamp)) that the event occurred. :return: The time of this LogEvent. :rtype: datetime @@ -70,7 +70,7 @@ def time(self): def time(self, time): """Set the time of this LogEvent. - Time event occurred, RFC3339Nano. + The time ([RFC3339Nano date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339nano-timestamp)) that the event occurred. :param time: The time of this LogEvent. :type: datetime @@ -103,7 +103,7 @@ def message(self, message): def run_id(self): """Get the run_id of this LogEvent. - the ID of the task that logged + The ID of the task run that generated the event. :return: The run_id of this LogEvent. :rtype: str @@ -114,7 +114,7 @@ def run_id(self): def run_id(self, run_id): """Set the run_id of this LogEvent. - the ID of the task that logged + The ID of the task run that generated the event. :param run_id: The run_id of this LogEvent. :type: str diff --git a/influxdb_client/domain/notification_rule_base.py b/influxdb_client/domain/notification_rule_base.py index 08efbf26..6f3de002 100644 --- a/influxdb_client/domain/notification_rule_base.py +++ b/influxdb_client/domain/notification_rule_base.py @@ -154,7 +154,7 @@ def __init__(self, latest_completed=None, last_run_status=None, last_run_error=N def latest_completed(self): """Get the latest_completed of this NotificationRuleBase. - Timestamp (in RFC3339 date/time format](https://datatracker.ietf.org/doc/html/rfc3339)) of the latest scheduled and completed run. + A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. :return: The latest_completed of this NotificationRuleBase. :rtype: datetime @@ -165,7 +165,7 @@ def latest_completed(self): def latest_completed(self, latest_completed): """Set the latest_completed of this NotificationRuleBase. - Timestamp (in RFC3339 date/time format](https://datatracker.ietf.org/doc/html/rfc3339)) of the latest scheduled and completed run. + A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. :param latest_completed: The latest_completed of this NotificationRuleBase. :type: datetime diff --git a/influxdb_client/domain/organization.py b/influxdb_client/domain/organization.py index 78cc5af8..4071964c 100644 --- a/influxdb_client/domain/organization.py +++ b/influxdb_client/domain/organization.py @@ -33,6 +33,7 @@ class Organization(object): 'links': 'OrganizationLinks', 'id': 'str', 'name': 'str', + 'default_storage_type': 'str', 'description': 'str', 'created_at': 'datetime', 'updated_at': 'datetime', @@ -43,17 +44,19 @@ class Organization(object): 'links': 'links', 'id': 'id', 'name': 'name', + 'default_storage_type': 'defaultStorageType', 'description': 'description', 'created_at': 'createdAt', 'updated_at': 'updatedAt', 'status': 'status' } - def __init__(self, links=None, id=None, name=None, description=None, created_at=None, updated_at=None, status='active'): # noqa: E501,D401,D403 + def __init__(self, links=None, id=None, name=None, default_storage_type=None, description=None, created_at=None, updated_at=None, status='active'): # noqa: E501,D401,D403 """Organization - a model defined in OpenAPI.""" # noqa: E501 self._links = None self._id = None self._name = None + self._default_storage_type = None self._description = None self._created_at = None self._updated_at = None @@ -65,6 +68,8 @@ def __init__(self, links=None, id=None, name=None, description=None, created_at= if id is not None: self.id = id self.name = name + if default_storage_type is not None: + self.default_storage_type = default_storage_type if description is not None: self.description = description if created_at is not None: @@ -130,6 +135,28 @@ def name(self, name): raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name + @property + def default_storage_type(self): + """Get the default_storage_type of this Organization. + + Discloses whether the organization uses TSM or IOx. + + :return: The default_storage_type of this Organization. + :rtype: str + """ # noqa: E501 + return self._default_storage_type + + @default_storage_type.setter + def default_storage_type(self, default_storage_type): + """Set the default_storage_type of this Organization. + + Discloses whether the organization uses TSM or IOx. + + :param default_storage_type: The default_storage_type of this Organization. + :type: str + """ # noqa: E501 + self._default_storage_type = default_storage_type + @property def description(self): """Get the description of this Organization. @@ -188,7 +215,7 @@ def updated_at(self, updated_at): def status(self): """Get the status of this Organization. - If inactive the organization is inactive. + If inactive, the organization is inactive. :return: The status of this Organization. :rtype: str @@ -199,7 +226,7 @@ def status(self): def status(self, status): """Set the status of this Organization. - If inactive the organization is inactive. + If inactive, the organization is inactive. :param status: The status of this Organization. :type: str diff --git a/influxdb_client/domain/patch_bucket_request.py b/influxdb_client/domain/patch_bucket_request.py index 93b4d16d..d2416a54 100644 --- a/influxdb_client/domain/patch_bucket_request.py +++ b/influxdb_client/domain/patch_bucket_request.py @@ -59,6 +59,8 @@ def __init__(self, name=None, description=None, retention_rules=None): # noqa: def name(self): """Get the name of this PatchBucketRequest. + The name of the bucket. + :return: The name of this PatchBucketRequest. :rtype: str """ # noqa: E501 @@ -68,6 +70,8 @@ def name(self): def name(self, name): """Set the name of this PatchBucketRequest. + The name of the bucket. + :param name: The name of this PatchBucketRequest. :type: str """ # noqa: E501 @@ -77,6 +81,8 @@ def name(self, name): def description(self): """Get the description of this PatchBucketRequest. + A description of the bucket. + :return: The description of this PatchBucketRequest. :rtype: str """ # noqa: E501 @@ -86,6 +92,8 @@ def description(self): def description(self, description): """Set the description of this PatchBucketRequest. + A description of the bucket. + :param description: The description of this PatchBucketRequest. :type: str """ # noqa: E501 diff --git a/influxdb_client/domain/patch_organization_request.py b/influxdb_client/domain/patch_organization_request.py index 0ee93fbe..ff74e17b 100644 --- a/influxdb_client/domain/patch_organization_request.py +++ b/influxdb_client/domain/patch_organization_request.py @@ -54,7 +54,7 @@ def __init__(self, name=None, description=None): # noqa: E501,D401,D403 def name(self): """Get the name of this PatchOrganizationRequest. - New name to set on the organization + The name of the organization. :return: The name of this PatchOrganizationRequest. :rtype: str @@ -65,7 +65,7 @@ def name(self): def name(self, name): """Set the name of this PatchOrganizationRequest. - New name to set on the organization + The name of the organization. :param name: The name of this PatchOrganizationRequest. :type: str @@ -76,7 +76,7 @@ def name(self, name): def description(self): """Get the description of this PatchOrganizationRequest. - New description to set on the organization + The description of the organization. :return: The description of this PatchOrganizationRequest. :rtype: str @@ -87,7 +87,7 @@ def description(self): def description(self, description): """Set the description of this PatchOrganizationRequest. - New description to set on the organization + The description of the organization. :param description: The description of this PatchOrganizationRequest. :type: str diff --git a/influxdb_client/domain/patch_retention_rule.py b/influxdb_client/domain/patch_retention_rule.py index 49754105..d02335a1 100644 --- a/influxdb_client/domain/patch_retention_rule.py +++ b/influxdb_client/domain/patch_retention_rule.py @@ -41,16 +41,16 @@ class PatchRetentionRule(object): 'shard_group_duration_seconds': 'shardGroupDurationSeconds' } - def __init__(self, type='expire', every_seconds=None, shard_group_duration_seconds=None): # noqa: E501,D401,D403 + def __init__(self, type='expire', every_seconds=2592000, shard_group_duration_seconds=None): # noqa: E501,D401,D403 """PatchRetentionRule - a model defined in OpenAPI.""" # noqa: E501 self._type = None self._every_seconds = None self._shard_group_duration_seconds = None self.discriminator = None - self.type = type - if every_seconds is not None: - self.every_seconds = every_seconds + if type is not None: + self.type = type + self.every_seconds = every_seconds if shard_group_duration_seconds is not None: self.shard_group_duration_seconds = shard_group_duration_seconds @@ -70,15 +70,13 @@ def type(self, type): :param type: The type of this PatchRetentionRule. :type: str """ # noqa: E501 - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type @property def every_seconds(self): """Get the every_seconds of this PatchRetentionRule. - Duration in seconds for how long data will be kept in the database. 0 means infinite. + The number of seconds to keep data. Default duration is `2592000` (30 days). `0` represents infinite retention. :return: The every_seconds of this PatchRetentionRule. :rtype: int @@ -89,11 +87,13 @@ def every_seconds(self): def every_seconds(self, every_seconds): """Set the every_seconds of this PatchRetentionRule. - Duration in seconds for how long data will be kept in the database. 0 means infinite. + The number of seconds to keep data. Default duration is `2592000` (30 days). `0` represents infinite retention. :param every_seconds: The every_seconds of this PatchRetentionRule. :type: int """ # noqa: E501 + if every_seconds is None: + raise ValueError("Invalid value for `every_seconds`, must not be `None`") # noqa: E501 if every_seconds is not None and every_seconds < 0: # noqa: E501 raise ValueError("Invalid value for `every_seconds`, must be a value greater than or equal to `0`") # noqa: E501 self._every_seconds = every_seconds @@ -102,7 +102,7 @@ def every_seconds(self, every_seconds): def shard_group_duration_seconds(self): """Get the shard_group_duration_seconds of this PatchRetentionRule. - Shard duration measured in seconds. + The [shard group duration](https://docs.influxdata.com/influxdb/latest/reference/glossary/#shard). The number of seconds that each shard group covers. #### InfluxDB Cloud - Doesn't use `shardGroupDurationsSeconds`. #### InfluxDB OSS - Default value depends on the [bucket retention period](https://docs.influxdata.com/influxdb/latest/reference/internals/shards/#shard-group-duration). #### Related guides - InfluxDB [shards and shard groups](https://docs.influxdata.com/influxdb/latest/reference/internals/shards/) :return: The shard_group_duration_seconds of this PatchRetentionRule. :rtype: int @@ -113,7 +113,7 @@ def shard_group_duration_seconds(self): def shard_group_duration_seconds(self, shard_group_duration_seconds): """Set the shard_group_duration_seconds of this PatchRetentionRule. - Shard duration measured in seconds. + The [shard group duration](https://docs.influxdata.com/influxdb/latest/reference/glossary/#shard). The number of seconds that each shard group covers. #### InfluxDB Cloud - Doesn't use `shardGroupDurationsSeconds`. #### InfluxDB OSS - Default value depends on the [bucket retention period](https://docs.influxdata.com/influxdb/latest/reference/internals/shards/#shard-group-duration). #### Related guides - InfluxDB [shards and shard groups](https://docs.influxdata.com/influxdb/latest/reference/internals/shards/) :param shard_group_duration_seconds: The shard_group_duration_seconds of this PatchRetentionRule. :type: int diff --git a/influxdb_client/domain/permission_resource.py b/influxdb_client/domain/permission_resource.py index 75363ae1..07634a03 100644 --- a/influxdb_client/domain/permission_resource.py +++ b/influxdb_client/domain/permission_resource.py @@ -68,6 +68,8 @@ def __init__(self, type=None, id=None, name=None, org_id=None, org=None): # noq def type(self): """Get the type of this PermissionResource. + A resource type. Identifies the API resource's type (or _kind_). + :return: The type of this PermissionResource. :rtype: str """ # noqa: E501 @@ -77,6 +79,8 @@ def type(self): def type(self, type): """Set the type of this PermissionResource. + A resource type. Identifies the API resource's type (or _kind_). + :param type: The type of this PermissionResource. :type: str """ # noqa: E501 @@ -88,7 +92,7 @@ def type(self, type): def id(self): """Get the id of this PermissionResource. - If ID is set that is a permission for a specific resource. if it is not set it is a permission for all resources of that resource type. + A resource ID. Identifies a specific resource. :return: The id of this PermissionResource. :rtype: str @@ -99,7 +103,7 @@ def id(self): def id(self, id): """Set the id of this PermissionResource. - If ID is set that is a permission for a specific resource. if it is not set it is a permission for all resources of that resource type. + A resource ID. Identifies a specific resource. :param id: The id of this PermissionResource. :type: str @@ -110,7 +114,7 @@ def id(self, id): def name(self): """Get the name of this PermissionResource. - Optional name of the resource if the resource has a name field. + The name of the resource. _Note: not all resource types have a `name` property_. :return: The name of this PermissionResource. :rtype: str @@ -121,7 +125,7 @@ def name(self): def name(self, name): """Set the name of this PermissionResource. - Optional name of the resource if the resource has a name field. + The name of the resource. _Note: not all resource types have a `name` property_. :param name: The name of this PermissionResource. :type: str @@ -132,7 +136,7 @@ def name(self, name): def org_id(self): """Get the org_id of this PermissionResource. - If orgID is set that is a permission for all resources owned my that org. if it is not set it is a permission for all resources of that resource type. + An organization ID. Identifies the organization that owns the resource. :return: The org_id of this PermissionResource. :rtype: str @@ -143,7 +147,7 @@ def org_id(self): def org_id(self, org_id): """Set the org_id of this PermissionResource. - If orgID is set that is a permission for all resources owned my that org. if it is not set it is a permission for all resources of that resource type. + An organization ID. Identifies the organization that owns the resource. :param org_id: The org_id of this PermissionResource. :type: str @@ -154,7 +158,7 @@ def org_id(self, org_id): def org(self): """Get the org of this PermissionResource. - Optional name of the organization of the organization with orgID. + An organization name. The organization that owns the resource. :return: The org of this PermissionResource. :rtype: str @@ -165,7 +169,7 @@ def org(self): def org(self, org): """Set the org of this PermissionResource. - Optional name of the organization of the organization with orgID. + An organization name. The organization that owns the resource. :param org: The org of this PermissionResource. :type: str diff --git a/influxdb_client/domain/post_bucket_request.py b/influxdb_client/domain/post_bucket_request.py index fe694434..83215a70 100644 --- a/influxdb_client/domain/post_bucket_request.py +++ b/influxdb_client/domain/post_bucket_request.py @@ -47,7 +47,7 @@ class PostBucketRequest(object): 'schema_type': 'schemaType' } - def __init__(self, org_id=None, name=None, description=None, rp=None, retention_rules=None, schema_type=None): # noqa: E501,D401,D403 + def __init__(self, org_id=None, name=None, description=None, rp='0', retention_rules=None, schema_type=None): # noqa: E501,D401,D403 """PostBucketRequest - a model defined in OpenAPI.""" # noqa: E501 self._org_id = None self._name = None @@ -63,7 +63,8 @@ def __init__(self, org_id=None, name=None, description=None, rp=None, retention_ self.description = description if rp is not None: self.rp = rp - self.retention_rules = retention_rules + if retention_rules is not None: + self.retention_rules = retention_rules if schema_type is not None: self.schema_type = schema_type @@ -71,6 +72,8 @@ def __init__(self, org_id=None, name=None, description=None, rp=None, retention_ def org_id(self): """Get the org_id of this PostBucketRequest. + The organization ID. Specifies the organization that owns the bucket. + :return: The org_id of this PostBucketRequest. :rtype: str """ # noqa: E501 @@ -80,6 +83,8 @@ def org_id(self): def org_id(self, org_id): """Set the org_id of this PostBucketRequest. + The organization ID. Specifies the organization that owns the bucket. + :param org_id: The org_id of this PostBucketRequest. :type: str """ # noqa: E501 @@ -91,6 +96,8 @@ def org_id(self, org_id): def name(self): """Get the name of this PostBucketRequest. + The bucket name. + :return: The name of this PostBucketRequest. :rtype: str """ # noqa: E501 @@ -100,6 +107,8 @@ def name(self): def name(self, name): """Set the name of this PostBucketRequest. + The bucket name. + :param name: The name of this PostBucketRequest. :type: str """ # noqa: E501 @@ -111,6 +120,8 @@ def name(self, name): def description(self): """Get the description of this PostBucketRequest. + A description of the bucket. + :return: The description of this PostBucketRequest. :rtype: str """ # noqa: E501 @@ -120,6 +131,8 @@ def description(self): def description(self, description): """Set the description of this PostBucketRequest. + A description of the bucket. + :param description: The description of this PostBucketRequest. :type: str """ # noqa: E501 @@ -129,6 +142,8 @@ def description(self, description): def rp(self): """Get the rp of this PostBucketRequest. + The retention policy for the bucket. For InfluxDB 1.x, specifies the duration of time that each data point in the retention policy persists. If you need compatibility with InfluxDB 1.x, specify a value for the `rp` property; otherwise, see the `retentionRules` property. [Retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp) is an InfluxDB 1.x concept. The InfluxDB 2.x and Cloud equivalent is [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period). The InfluxDB `/api/v2` API uses `RetentionRules` to configure the retention period. + :return: The rp of this PostBucketRequest. :rtype: str """ # noqa: E501 @@ -138,6 +153,8 @@ def rp(self): def rp(self, rp): """Set the rp of this PostBucketRequest. + The retention policy for the bucket. For InfluxDB 1.x, specifies the duration of time that each data point in the retention policy persists. If you need compatibility with InfluxDB 1.x, specify a value for the `rp` property; otherwise, see the `retentionRules` property. [Retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp) is an InfluxDB 1.x concept. The InfluxDB 2.x and Cloud equivalent is [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period). The InfluxDB `/api/v2` API uses `RetentionRules` to configure the retention period. + :param rp: The rp of this PostBucketRequest. :type: str """ # noqa: E501 @@ -147,7 +164,7 @@ def rp(self, rp): def retention_rules(self): """Get the retention_rules of this PostBucketRequest. - Rules to expire or retain data. No rules means data never expires. + Retention rules to expire or retain data. The InfluxDB `/api/v2` API uses `RetentionRules` to configure the [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period). #### InfluxDB Cloud - `retentionRules` is required. #### InfluxDB OSS - `retentionRules` isn't required. :return: The retention_rules of this PostBucketRequest. :rtype: list[BucketRetentionRules] @@ -158,13 +175,11 @@ def retention_rules(self): def retention_rules(self, retention_rules): """Set the retention_rules of this PostBucketRequest. - Rules to expire or retain data. No rules means data never expires. + Retention rules to expire or retain data. The InfluxDB `/api/v2` API uses `RetentionRules` to configure the [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period). #### InfluxDB Cloud - `retentionRules` is required. #### InfluxDB OSS - `retentionRules` isn't required. :param retention_rules: The retention_rules of this PostBucketRequest. :type: list[BucketRetentionRules] """ # noqa: E501 - if retention_rules is None: - raise ValueError("Invalid value for `retention_rules`, must not be `None`") # noqa: E501 self._retention_rules = retention_rules @property diff --git a/influxdb_client/domain/post_organization_request.py b/influxdb_client/domain/post_organization_request.py index 8e795da2..5e152d37 100644 --- a/influxdb_client/domain/post_organization_request.py +++ b/influxdb_client/domain/post_organization_request.py @@ -53,6 +53,8 @@ def __init__(self, name=None, description=None): # noqa: E501,D401,D403 def name(self): """Get the name of this PostOrganizationRequest. + The name of the organization. + :return: The name of this PostOrganizationRequest. :rtype: str """ # noqa: E501 @@ -62,6 +64,8 @@ def name(self): def name(self, name): """Set the name of this PostOrganizationRequest. + The name of the organization. + :param name: The name of this PostOrganizationRequest. :type: str """ # noqa: E501 @@ -73,6 +77,8 @@ def name(self, name): def description(self): """Get the description of this PostOrganizationRequest. + The description of the organization. + :return: The description of this PostOrganizationRequest. :rtype: str """ # noqa: E501 @@ -82,6 +88,8 @@ def description(self): def description(self, description): """Set the description of this PostOrganizationRequest. + The description of the organization. + :param description: The description of this PostOrganizationRequest. :type: str """ # noqa: E501 diff --git a/influxdb_client/domain/query.py b/influxdb_client/domain/query.py index 5dffaeb0..9b69972c 100644 --- a/influxdb_client/domain/query.py +++ b/influxdb_client/domain/query.py @@ -91,7 +91,7 @@ def extern(self, extern): def query(self): """Get the query of this Query. - Query script to execute. + The query script to execute. :return: The query of this Query. :rtype: str @@ -102,7 +102,7 @@ def query(self): def query(self, query): """Set the query of this Query. - Query script to execute. + The query script to execute. :param query: The query of this Query. :type: str @@ -135,9 +135,9 @@ def type(self, type): @property def params(self): - """Get the params of this Query. + r"""Get the params of this Query. - Enumeration of key/value pairs that respresent parameters to be injected into query (can only specify either this field or extern and not both) + Key-value pairs passed as parameters during query execution. To use parameters in your query, pass a _`query`_ with `params` references (in dot notation)--for example: ```json query: "from(bucket: params.mybucket)\\ |> range(start: params.rangeStart) |> limit(n:1)" ``` and pass _`params`_ with the key-value pairs--for example: ```json params: { "mybucket": "environment", "rangeStart": "-30d" } ``` During query execution, InfluxDB passes _`params`_ to your script and substitutes the values. #### Limitations - If you use _`params`_, you can't use _`extern`_. :return: The params of this Query. :rtype: dict(str, object) @@ -146,9 +146,9 @@ def params(self): @params.setter def params(self, params): - """Set the params of this Query. + r"""Set the params of this Query. - Enumeration of key/value pairs that respresent parameters to be injected into query (can only specify either this field or extern and not both) + Key-value pairs passed as parameters during query execution. To use parameters in your query, pass a _`query`_ with `params` references (in dot notation)--for example: ```json query: "from(bucket: params.mybucket)\\ |> range(start: params.rangeStart) |> limit(n:1)" ``` and pass _`params`_ with the key-value pairs--for example: ```json params: { "mybucket": "environment", "rangeStart": "-30d" } ``` During query execution, InfluxDB passes _`params`_ to your script and substitutes the values. #### Limitations - If you use _`params`_, you can't use _`extern`_. :param params: The params of this Query. :type: dict(str, object) @@ -177,7 +177,7 @@ def dialect(self, dialect): def now(self): """Get the now of this Query. - Specifies the time that should be reported as "now" in the query. Default is the server's now time. + Specifies the time that should be reported as `now` in the query. Default is the server `now` time. :return: The now of this Query. :rtype: datetime @@ -188,7 +188,7 @@ def now(self): def now(self, now): """Set the now of this Query. - Specifies the time that should be reported as "now" in the query. Default is the server's now time. + Specifies the time that should be reported as `now` in the query. Default is the server `now` time. :param now: The now of this Query. :type: datetime diff --git a/influxdb_client/domain/remote_connection.py b/influxdb_client/domain/remote_connection.py index b9ad0fd1..e0c1785c 100644 --- a/influxdb_client/domain/remote_connection.py +++ b/influxdb_client/domain/remote_connection.py @@ -66,7 +66,8 @@ def __init__(self, id=None, name=None, org_id=None, description=None, remote_url if description is not None: self.description = description self.remote_url = remote_url - self.remote_org_id = remote_org_id + if remote_org_id is not None: + self.remote_org_id = remote_org_id self.allow_insecure_tls = allow_insecure_tls @property @@ -183,8 +184,6 @@ def remote_org_id(self, remote_org_id): :param remote_org_id: The remote_org_id of this RemoteConnection. :type: str """ # noqa: E501 - if remote_org_id is None: - raise ValueError("Invalid value for `remote_org_id`, must not be `None`") # noqa: E501 self._remote_org_id = remote_org_id @property diff --git a/influxdb_client/domain/remote_connection_creation_request.py b/influxdb_client/domain/remote_connection_creation_request.py index c0173369..ba775362 100644 --- a/influxdb_client/domain/remote_connection_creation_request.py +++ b/influxdb_client/domain/remote_connection_creation_request.py @@ -66,7 +66,8 @@ def __init__(self, name=None, description=None, org_id=None, remote_url=None, re self.org_id = org_id self.remote_url = remote_url self.remote_api_token = remote_api_token - self.remote_org_id = remote_org_id + if remote_org_id is not None: + self.remote_org_id = remote_org_id self.allow_insecure_tls = allow_insecure_tls @property @@ -183,8 +184,6 @@ def remote_org_id(self, remote_org_id): :param remote_org_id: The remote_org_id of this RemoteConnectionCreationRequest. :type: str """ # noqa: E501 - if remote_org_id is None: - raise ValueError("Invalid value for `remote_org_id`, must not be `None`") # noqa: E501 self._remote_org_id = remote_org_id @property diff --git a/influxdb_client/domain/replication.py b/influxdb_client/domain/replication.py index 8fe46eb7..fea45ca3 100644 --- a/influxdb_client/domain/replication.py +++ b/influxdb_client/domain/replication.py @@ -37,8 +37,10 @@ class Replication(object): 'remote_id': 'str', 'local_bucket_id': 'str', 'remote_bucket_id': 'str', + 'remote_bucket_name': 'str', 'max_queue_size_bytes': 'int', 'current_queue_size_bytes': 'int', + 'remaining_bytes_to_be_synced': 'int', 'latest_response_code': 'int', 'latest_error_message': 'str', 'drop_non_retryable_data': 'bool' @@ -52,14 +54,16 @@ class Replication(object): 'remote_id': 'remoteID', 'local_bucket_id': 'localBucketID', 'remote_bucket_id': 'remoteBucketID', + 'remote_bucket_name': 'remoteBucketName', 'max_queue_size_bytes': 'maxQueueSizeBytes', 'current_queue_size_bytes': 'currentQueueSizeBytes', + 'remaining_bytes_to_be_synced': 'remainingBytesToBeSynced', 'latest_response_code': 'latestResponseCode', 'latest_error_message': 'latestErrorMessage', 'drop_non_retryable_data': 'dropNonRetryableData' } - def __init__(self, id=None, name=None, description=None, org_id=None, remote_id=None, local_bucket_id=None, remote_bucket_id=None, max_queue_size_bytes=None, current_queue_size_bytes=None, latest_response_code=None, latest_error_message=None, drop_non_retryable_data=None): # noqa: E501,D401,D403 + def __init__(self, id=None, name=None, description=None, org_id=None, remote_id=None, local_bucket_id=None, remote_bucket_id=None, remote_bucket_name=None, max_queue_size_bytes=None, current_queue_size_bytes=None, remaining_bytes_to_be_synced=None, latest_response_code=None, latest_error_message=None, drop_non_retryable_data=None): # noqa: E501,D401,D403 """Replication - a model defined in OpenAPI.""" # noqa: E501 self._id = None self._name = None @@ -68,8 +72,10 @@ def __init__(self, id=None, name=None, description=None, org_id=None, remote_id= self._remote_id = None self._local_bucket_id = None self._remote_bucket_id = None + self._remote_bucket_name = None self._max_queue_size_bytes = None self._current_queue_size_bytes = None + self._remaining_bytes_to_be_synced = None self._latest_response_code = None self._latest_error_message = None self._drop_non_retryable_data = None @@ -82,9 +88,15 @@ def __init__(self, id=None, name=None, description=None, org_id=None, remote_id= self.org_id = org_id self.remote_id = remote_id self.local_bucket_id = local_bucket_id - self.remote_bucket_id = remote_bucket_id + if remote_bucket_id is not None: + self.remote_bucket_id = remote_bucket_id + if remote_bucket_name is not None: + self.remote_bucket_name = remote_bucket_name self.max_queue_size_bytes = max_queue_size_bytes - self.current_queue_size_bytes = current_queue_size_bytes + if current_queue_size_bytes is not None: + self.current_queue_size_bytes = current_queue_size_bytes + if remaining_bytes_to_be_synced is not None: + self.remaining_bytes_to_be_synced = remaining_bytes_to_be_synced if latest_response_code is not None: self.latest_response_code = latest_response_code if latest_error_message is not None: @@ -226,10 +238,26 @@ def remote_bucket_id(self, remote_bucket_id): :param remote_bucket_id: The remote_bucket_id of this Replication. :type: str """ # noqa: E501 - if remote_bucket_id is None: - raise ValueError("Invalid value for `remote_bucket_id`, must not be `None`") # noqa: E501 self._remote_bucket_id = remote_bucket_id + @property + def remote_bucket_name(self): + """Get the remote_bucket_name of this Replication. + + :return: The remote_bucket_name of this Replication. + :rtype: str + """ # noqa: E501 + return self._remote_bucket_name + + @remote_bucket_name.setter + def remote_bucket_name(self, remote_bucket_name): + """Set the remote_bucket_name of this Replication. + + :param remote_bucket_name: The remote_bucket_name of this Replication. + :type: str + """ # noqa: E501 + self._remote_bucket_name = remote_bucket_name + @property def max_queue_size_bytes(self): """Get the max_queue_size_bytes of this Replication. @@ -266,10 +294,26 @@ def current_queue_size_bytes(self, current_queue_size_bytes): :param current_queue_size_bytes: The current_queue_size_bytes of this Replication. :type: int """ # noqa: E501 - if current_queue_size_bytes is None: - raise ValueError("Invalid value for `current_queue_size_bytes`, must not be `None`") # noqa: E501 self._current_queue_size_bytes = current_queue_size_bytes + @property + def remaining_bytes_to_be_synced(self): + """Get the remaining_bytes_to_be_synced of this Replication. + + :return: The remaining_bytes_to_be_synced of this Replication. + :rtype: int + """ # noqa: E501 + return self._remaining_bytes_to_be_synced + + @remaining_bytes_to_be_synced.setter + def remaining_bytes_to_be_synced(self, remaining_bytes_to_be_synced): + """Set the remaining_bytes_to_be_synced of this Replication. + + :param remaining_bytes_to_be_synced: The remaining_bytes_to_be_synced of this Replication. + :type: int + """ # noqa: E501 + self._remaining_bytes_to_be_synced = remaining_bytes_to_be_synced + @property def latest_response_code(self): """Get the latest_response_code of this Replication. diff --git a/influxdb_client/domain/replication_creation_request.py b/influxdb_client/domain/replication_creation_request.py index 000486d5..946f2c96 100644 --- a/influxdb_client/domain/replication_creation_request.py +++ b/influxdb_client/domain/replication_creation_request.py @@ -36,8 +36,10 @@ class ReplicationCreationRequest(object): 'remote_id': 'str', 'local_bucket_id': 'str', 'remote_bucket_id': 'str', + 'remote_bucket_name': 'str', 'max_queue_size_bytes': 'int', - 'drop_non_retryable_data': 'bool' + 'drop_non_retryable_data': 'bool', + 'max_age_seconds': 'int' } attribute_map = { @@ -47,11 +49,13 @@ class ReplicationCreationRequest(object): 'remote_id': 'remoteID', 'local_bucket_id': 'localBucketID', 'remote_bucket_id': 'remoteBucketID', + 'remote_bucket_name': 'remoteBucketName', 'max_queue_size_bytes': 'maxQueueSizeBytes', - 'drop_non_retryable_data': 'dropNonRetryableData' + 'drop_non_retryable_data': 'dropNonRetryableData', + 'max_age_seconds': 'maxAgeSeconds' } - def __init__(self, name=None, description=None, org_id=None, remote_id=None, local_bucket_id=None, remote_bucket_id=None, max_queue_size_bytes=67108860, drop_non_retryable_data=False): # noqa: E501,D401,D403 + def __init__(self, name=None, description=None, org_id=None, remote_id=None, local_bucket_id=None, remote_bucket_id=None, remote_bucket_name=None, max_queue_size_bytes=67108860, drop_non_retryable_data=False, max_age_seconds=604800): # noqa: E501,D401,D403 """ReplicationCreationRequest - a model defined in OpenAPI.""" # noqa: E501 self._name = None self._description = None @@ -59,8 +63,10 @@ def __init__(self, name=None, description=None, org_id=None, remote_id=None, loc self._remote_id = None self._local_bucket_id = None self._remote_bucket_id = None + self._remote_bucket_name = None self._max_queue_size_bytes = None self._drop_non_retryable_data = None + self._max_age_seconds = None self.discriminator = None self.name = name @@ -69,10 +75,14 @@ def __init__(self, name=None, description=None, org_id=None, remote_id=None, loc self.org_id = org_id self.remote_id = remote_id self.local_bucket_id = local_bucket_id - self.remote_bucket_id = remote_bucket_id + if remote_bucket_id is not None: + self.remote_bucket_id = remote_bucket_id + if remote_bucket_name is not None: + self.remote_bucket_name = remote_bucket_name self.max_queue_size_bytes = max_queue_size_bytes if drop_non_retryable_data is not None: self.drop_non_retryable_data = drop_non_retryable_data + self.max_age_seconds = max_age_seconds @property def name(self): @@ -188,10 +198,26 @@ def remote_bucket_id(self, remote_bucket_id): :param remote_bucket_id: The remote_bucket_id of this ReplicationCreationRequest. :type: str """ # noqa: E501 - if remote_bucket_id is None: - raise ValueError("Invalid value for `remote_bucket_id`, must not be `None`") # noqa: E501 self._remote_bucket_id = remote_bucket_id + @property + def remote_bucket_name(self): + """Get the remote_bucket_name of this ReplicationCreationRequest. + + :return: The remote_bucket_name of this ReplicationCreationRequest. + :rtype: str + """ # noqa: E501 + return self._remote_bucket_name + + @remote_bucket_name.setter + def remote_bucket_name(self, remote_bucket_name): + """Set the remote_bucket_name of this ReplicationCreationRequest. + + :param remote_bucket_name: The remote_bucket_name of this ReplicationCreationRequest. + :type: str + """ # noqa: E501 + self._remote_bucket_name = remote_bucket_name + @property def max_queue_size_bytes(self): """Get the max_queue_size_bytes of this ReplicationCreationRequest. @@ -232,6 +258,28 @@ def drop_non_retryable_data(self, drop_non_retryable_data): """ # noqa: E501 self._drop_non_retryable_data = drop_non_retryable_data + @property + def max_age_seconds(self): + """Get the max_age_seconds of this ReplicationCreationRequest. + + :return: The max_age_seconds of this ReplicationCreationRequest. + :rtype: int + """ # noqa: E501 + return self._max_age_seconds + + @max_age_seconds.setter + def max_age_seconds(self, max_age_seconds): + """Set the max_age_seconds of this ReplicationCreationRequest. + + :param max_age_seconds: The max_age_seconds of this ReplicationCreationRequest. + :type: int + """ # noqa: E501 + if max_age_seconds is None: + raise ValueError("Invalid value for `max_age_seconds`, must not be `None`") # noqa: E501 + if max_age_seconds is not None and max_age_seconds < 0: # noqa: E501 + raise ValueError("Invalid value for `max_age_seconds`, must be a value greater than or equal to `0`") # noqa: E501 + self._max_age_seconds = max_age_seconds + def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/domain/replication_update_request.py b/influxdb_client/domain/replication_update_request.py index 801b76ca..0c40c117 100644 --- a/influxdb_client/domain/replication_update_request.py +++ b/influxdb_client/domain/replication_update_request.py @@ -34,8 +34,10 @@ class ReplicationUpdateRequest(object): 'description': 'str', 'remote_id': 'str', 'remote_bucket_id': 'str', + 'remote_bucket_name': 'str', 'max_queue_size_bytes': 'int', - 'drop_non_retryable_data': 'bool' + 'drop_non_retryable_data': 'bool', + 'max_age_seconds': 'int' } attribute_map = { @@ -43,18 +45,22 @@ class ReplicationUpdateRequest(object): 'description': 'description', 'remote_id': 'remoteID', 'remote_bucket_id': 'remoteBucketID', + 'remote_bucket_name': 'remoteBucketName', 'max_queue_size_bytes': 'maxQueueSizeBytes', - 'drop_non_retryable_data': 'dropNonRetryableData' + 'drop_non_retryable_data': 'dropNonRetryableData', + 'max_age_seconds': 'maxAgeSeconds' } - def __init__(self, name=None, description=None, remote_id=None, remote_bucket_id=None, max_queue_size_bytes=None, drop_non_retryable_data=None): # noqa: E501,D401,D403 + def __init__(self, name=None, description=None, remote_id=None, remote_bucket_id=None, remote_bucket_name=None, max_queue_size_bytes=None, drop_non_retryable_data=None, max_age_seconds=None): # noqa: E501,D401,D403 """ReplicationUpdateRequest - a model defined in OpenAPI.""" # noqa: E501 self._name = None self._description = None self._remote_id = None self._remote_bucket_id = None + self._remote_bucket_name = None self._max_queue_size_bytes = None self._drop_non_retryable_data = None + self._max_age_seconds = None self.discriminator = None if name is not None: @@ -65,10 +71,14 @@ def __init__(self, name=None, description=None, remote_id=None, remote_bucket_id self.remote_id = remote_id if remote_bucket_id is not None: self.remote_bucket_id = remote_bucket_id + if remote_bucket_name is not None: + self.remote_bucket_name = remote_bucket_name if max_queue_size_bytes is not None: self.max_queue_size_bytes = max_queue_size_bytes if drop_non_retryable_data is not None: self.drop_non_retryable_data = drop_non_retryable_data + if max_age_seconds is not None: + self.max_age_seconds = max_age_seconds @property def name(self): @@ -142,6 +152,24 @@ def remote_bucket_id(self, remote_bucket_id): """ # noqa: E501 self._remote_bucket_id = remote_bucket_id + @property + def remote_bucket_name(self): + """Get the remote_bucket_name of this ReplicationUpdateRequest. + + :return: The remote_bucket_name of this ReplicationUpdateRequest. + :rtype: str + """ # noqa: E501 + return self._remote_bucket_name + + @remote_bucket_name.setter + def remote_bucket_name(self, remote_bucket_name): + """Set the remote_bucket_name of this ReplicationUpdateRequest. + + :param remote_bucket_name: The remote_bucket_name of this ReplicationUpdateRequest. + :type: str + """ # noqa: E501 + self._remote_bucket_name = remote_bucket_name + @property def max_queue_size_bytes(self): """Get the max_queue_size_bytes of this ReplicationUpdateRequest. @@ -180,6 +208,26 @@ def drop_non_retryable_data(self, drop_non_retryable_data): """ # noqa: E501 self._drop_non_retryable_data = drop_non_retryable_data + @property + def max_age_seconds(self): + """Get the max_age_seconds of this ReplicationUpdateRequest. + + :return: The max_age_seconds of this ReplicationUpdateRequest. + :rtype: int + """ # noqa: E501 + return self._max_age_seconds + + @max_age_seconds.setter + def max_age_seconds(self, max_age_seconds): + """Set the max_age_seconds of this ReplicationUpdateRequest. + + :param max_age_seconds: The max_age_seconds of this ReplicationUpdateRequest. + :type: int + """ # noqa: E501 + if max_age_seconds is not None and max_age_seconds < 0: # noqa: E501 + raise ValueError("Invalid value for `max_age_seconds`, must be a value greater than or equal to `0`") # noqa: E501 + self._max_age_seconds = max_age_seconds + def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/domain/resource_member.py b/influxdb_client/domain/resource_member.py index d83ea8b3..26e26d73 100644 --- a/influxdb_client/domain/resource_member.py +++ b/influxdb_client/domain/resource_member.py @@ -34,7 +34,6 @@ class ResourceMember(UserResponse): openapi_types = { 'role': 'str', 'id': 'str', - 'oauth_id': 'str', 'name': 'str', 'status': 'str', 'links': 'UserResponseLinks' @@ -43,15 +42,14 @@ class ResourceMember(UserResponse): attribute_map = { 'role': 'role', 'id': 'id', - 'oauth_id': 'oauthID', 'name': 'name', 'status': 'status', 'links': 'links' } - def __init__(self, role='member', id=None, oauth_id=None, name=None, status='active', links=None): # noqa: E501,D401,D403 + def __init__(self, role='member', id=None, name=None, status='active', links=None): # noqa: E501,D401,D403 """ResourceMember - a model defined in OpenAPI.""" # noqa: E501 - UserResponse.__init__(self, id=id, oauth_id=oauth_id, name=name, status=status, links=links) # noqa: E501 + UserResponse.__init__(self, id=id, name=name, status=status, links=links) # noqa: E501 self._role = None self.discriminator = None diff --git a/influxdb_client/domain/resource_owner.py b/influxdb_client/domain/resource_owner.py index 4e4886b8..2f73cd7b 100644 --- a/influxdb_client/domain/resource_owner.py +++ b/influxdb_client/domain/resource_owner.py @@ -34,7 +34,6 @@ class ResourceOwner(UserResponse): openapi_types = { 'role': 'str', 'id': 'str', - 'oauth_id': 'str', 'name': 'str', 'status': 'str', 'links': 'UserResponseLinks' @@ -43,15 +42,14 @@ class ResourceOwner(UserResponse): attribute_map = { 'role': 'role', 'id': 'id', - 'oauth_id': 'oauthID', 'name': 'name', 'status': 'status', 'links': 'links' } - def __init__(self, role='owner', id=None, oauth_id=None, name=None, status='active', links=None): # noqa: E501,D401,D403 + def __init__(self, role='owner', id=None, name=None, status='active', links=None): # noqa: E501,D401,D403 """ResourceOwner - a model defined in OpenAPI.""" # noqa: E501 - UserResponse.__init__(self, id=id, oauth_id=oauth_id, name=name, status=status, links=links) # noqa: E501 + UserResponse.__init__(self, id=id, name=name, status=status, links=links) # noqa: E501 self._role = None self.discriminator = None diff --git a/influxdb_client/domain/run.py b/influxdb_client/domain/run.py index 7bc89597..32634aca 100644 --- a/influxdb_client/domain/run.py +++ b/influxdb_client/domain/run.py @@ -35,6 +35,7 @@ class Run(object): 'status': 'str', 'scheduled_for': 'datetime', 'log': 'list[LogEvent]', + 'flux': 'str', 'started_at': 'datetime', 'finished_at': 'datetime', 'requested_at': 'datetime', @@ -47,19 +48,21 @@ class Run(object): 'status': 'status', 'scheduled_for': 'scheduledFor', 'log': 'log', + 'flux': 'flux', 'started_at': 'startedAt', 'finished_at': 'finishedAt', 'requested_at': 'requestedAt', 'links': 'links' } - def __init__(self, id=None, task_id=None, status=None, scheduled_for=None, log=None, started_at=None, finished_at=None, requested_at=None, links=None): # noqa: E501,D401,D403 + def __init__(self, id=None, task_id=None, status=None, scheduled_for=None, log=None, flux=None, started_at=None, finished_at=None, requested_at=None, links=None): # noqa: E501,D401,D403 """Run - a model defined in OpenAPI.""" # noqa: E501 self._id = None self._task_id = None self._status = None self._scheduled_for = None self._log = None + self._flux = None self._started_at = None self._finished_at = None self._requested_at = None @@ -76,6 +79,8 @@ def __init__(self, id=None, task_id=None, status=None, scheduled_for=None, log=N self.scheduled_for = scheduled_for if log is not None: self.log = log + if flux is not None: + self.flux = flux if started_at is not None: self.started_at = started_at if finished_at is not None: @@ -143,7 +148,7 @@ def status(self, status): def scheduled_for(self): """Get the scheduled_for of this Run. - Time used for run's "now" option, RFC3339. + The time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp) used for the run's `now` option. :return: The scheduled_for of this Run. :rtype: datetime @@ -154,7 +159,7 @@ def scheduled_for(self): def scheduled_for(self, scheduled_for): """Set the scheduled_for of this Run. - Time used for run's "now" option, RFC3339. + The time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp) used for the run's `now` option. :param scheduled_for: The scheduled_for of this Run. :type: datetime @@ -183,11 +188,33 @@ def log(self, log): """ # noqa: E501 self._log = log + @property + def flux(self): + """Get the flux of this Run. + + Flux used for the task + + :return: The flux of this Run. + :rtype: str + """ # noqa: E501 + return self._flux + + @flux.setter + def flux(self, flux): + """Set the flux of this Run. + + Flux used for the task + + :param flux: The flux of this Run. + :type: str + """ # noqa: E501 + self._flux = flux + @property def started_at(self): """Get the started_at of this Run. - Time run started executing, RFC3339Nano. + The time ([RFC3339Nano date/time format](https://go.dev/src/time/format.go)) the run started executing. :return: The started_at of this Run. :rtype: datetime @@ -198,7 +225,7 @@ def started_at(self): def started_at(self, started_at): """Set the started_at of this Run. - Time run started executing, RFC3339Nano. + The time ([RFC3339Nano date/time format](https://go.dev/src/time/format.go)) the run started executing. :param started_at: The started_at of this Run. :type: datetime @@ -209,7 +236,7 @@ def started_at(self, started_at): def finished_at(self): """Get the finished_at of this Run. - Time run finished executing, RFC3339Nano. + The time ([RFC3339Nano date/time format](https://go.dev/src/time/format.go)) the run finished executing. :return: The finished_at of this Run. :rtype: datetime @@ -220,7 +247,7 @@ def finished_at(self): def finished_at(self, finished_at): """Set the finished_at of this Run. - Time run finished executing, RFC3339Nano. + The time ([RFC3339Nano date/time format](https://go.dev/src/time/format.go)) the run finished executing. :param finished_at: The finished_at of this Run. :type: datetime @@ -231,7 +258,7 @@ def finished_at(self, finished_at): def requested_at(self): """Get the requested_at of this Run. - Time run was manually requested, RFC3339Nano. + The time ([RFC3339Nano date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339nano-timestamp)) the run was manually requested. :return: The requested_at of this Run. :rtype: datetime @@ -242,7 +269,7 @@ def requested_at(self): def requested_at(self, requested_at): """Set the requested_at of this Run. - Time run was manually requested, RFC3339Nano. + The time ([RFC3339Nano date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339nano-timestamp)) the run was manually requested. :param requested_at: The requested_at of this Run. :type: datetime diff --git a/influxdb_client/domain/run_manually.py b/influxdb_client/domain/run_manually.py index 55b6a219..c3260831 100644 --- a/influxdb_client/domain/run_manually.py +++ b/influxdb_client/domain/run_manually.py @@ -48,7 +48,7 @@ def __init__(self, scheduled_for=None): # noqa: E501,D401,D403 def scheduled_for(self): """Get the scheduled_for of this RunManually. - Time used for run's "now" option, RFC3339. Default is the server's now time. + The time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp) used for the run's `now` option. Default is the server _now_ time. :return: The scheduled_for of this RunManually. :rtype: datetime @@ -59,7 +59,7 @@ def scheduled_for(self): def scheduled_for(self, scheduled_for): """Set the scheduled_for of this RunManually. - Time used for run's "now" option, RFC3339. Default is the server's now time. + The time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp) used for the run's `now` option. Default is the server _now_ time. :param scheduled_for: The scheduled_for of this RunManually. :type: datetime diff --git a/influxdb_client/domain/scatter_view_properties.py b/influxdb_client/domain/scatter_view_properties.py index 38b076f5..783a87cb 100644 --- a/influxdb_client/domain/scatter_view_properties.py +++ b/influxdb_client/domain/scatter_view_properties.py @@ -32,6 +32,7 @@ class ScatterViewProperties(ViewProperties): and the value is json key in definition. """ openapi_types = { + 'adaptive_zoom_hide': 'bool', 'time_format': 'str', 'type': 'str', 'queries': 'list[DashboardQuery]', @@ -66,6 +67,7 @@ class ScatterViewProperties(ViewProperties): } attribute_map = { + 'adaptive_zoom_hide': 'adaptiveZoomHide', 'time_format': 'timeFormat', 'type': 'type', 'queries': 'queries', @@ -99,10 +101,11 @@ class ScatterViewProperties(ViewProperties): 'legend_orientation_threshold': 'legendOrientationThreshold' } - def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, x_column=None, generate_x_axis_ticks=None, x_total_ticks=None, x_tick_start=None, x_tick_step=None, y_column=None, generate_y_axis_ticks=None, y_total_ticks=None, y_tick_start=None, y_tick_step=None, fill_columns=None, symbol_columns=None, x_domain=None, y_domain=None, x_axis_label=None, y_axis_label=None, x_prefix=None, x_suffix=None, y_prefix=None, y_suffix=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 + def __init__(self, adaptive_zoom_hide=None, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, x_column=None, generate_x_axis_ticks=None, x_total_ticks=None, x_tick_start=None, x_tick_step=None, y_column=None, generate_y_axis_ticks=None, y_total_ticks=None, y_tick_start=None, y_tick_step=None, fill_columns=None, symbol_columns=None, x_domain=None, y_domain=None, x_axis_label=None, y_axis_label=None, x_prefix=None, x_suffix=None, y_prefix=None, y_suffix=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 """ScatterViewProperties - a model defined in OpenAPI.""" # noqa: E501 ViewProperties.__init__(self) # noqa: E501 + self._adaptive_zoom_hide = None self._time_format = None self._type = None self._queries = None @@ -136,6 +139,8 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape self._legend_orientation_threshold = None self.discriminator = None + if adaptive_zoom_hide is not None: + self.adaptive_zoom_hide = adaptive_zoom_hide if time_format is not None: self.time_format = time_format self.type = type @@ -181,6 +186,24 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape if legend_orientation_threshold is not None: self.legend_orientation_threshold = legend_orientation_threshold + @property + def adaptive_zoom_hide(self): + """Get the adaptive_zoom_hide of this ScatterViewProperties. + + :return: The adaptive_zoom_hide of this ScatterViewProperties. + :rtype: bool + """ # noqa: E501 + return self._adaptive_zoom_hide + + @adaptive_zoom_hide.setter + def adaptive_zoom_hide(self, adaptive_zoom_hide): + """Set the adaptive_zoom_hide of this ScatterViewProperties. + + :param adaptive_zoom_hide: The adaptive_zoom_hide of this ScatterViewProperties. + :type: bool + """ # noqa: E501 + self._adaptive_zoom_hide = adaptive_zoom_hide + @property def time_format(self): """Get the time_format of this ScatterViewProperties. diff --git a/influxdb_client/domain/script.py b/influxdb_client/domain/script.py index b1b0bc96..ea2296f7 100644 --- a/influxdb_client/domain/script.py +++ b/influxdb_client/domain/script.py @@ -162,7 +162,7 @@ def org_id(self, org_id): def script(self): """Get the script of this Script. - script to be executed + The script to execute. :return: The script of this Script. :rtype: str @@ -173,7 +173,7 @@ def script(self): def script(self, script): """Set the script of this Script. - script to be executed + The script to execute. :param script: The script of this Script. :type: str @@ -204,7 +204,7 @@ def language(self, language): def url(self): """Get the url of this Script. - invocation endpoint address + The invocation endpoint address. :return: The url of this Script. :rtype: str @@ -215,7 +215,7 @@ def url(self): def url(self, url): """Set the url of this Script. - invocation endpoint address + The invocation endpoint address. :param url: The url of this Script. :type: str diff --git a/influxdb_client/domain/script_create_request.py b/influxdb_client/domain/script_create_request.py index 2438d5ce..5af2b5d1 100644 --- a/influxdb_client/domain/script_create_request.py +++ b/influxdb_client/domain/script_create_request.py @@ -60,7 +60,7 @@ def __init__(self, name=None, description=None, script=None, language=None): # def name(self): """Get the name of this ScriptCreateRequest. - The name of the script. The name must be unique within the organization. + Script name. The name must be unique within the organization. :return: The name of this ScriptCreateRequest. :rtype: str @@ -71,7 +71,7 @@ def name(self): def name(self, name): """Set the name of this ScriptCreateRequest. - The name of the script. The name must be unique within the organization. + Script name. The name must be unique within the organization. :param name: The name of this ScriptCreateRequest. :type: str @@ -84,6 +84,8 @@ def name(self, name): def description(self): """Get the description of this ScriptCreateRequest. + Script description. A description of the script. + :return: The description of this ScriptCreateRequest. :rtype: str """ # noqa: E501 @@ -93,6 +95,8 @@ def description(self): def description(self, description): """Set the description of this ScriptCreateRequest. + Script description. A description of the script. + :param description: The description of this ScriptCreateRequest. :type: str """ # noqa: E501 diff --git a/influxdb_client/domain/script_invocation_params.py b/influxdb_client/domain/script_invocation_params.py index 0c6c9ac6..1849280f 100644 --- a/influxdb_client/domain/script_invocation_params.py +++ b/influxdb_client/domain/script_invocation_params.py @@ -49,6 +49,8 @@ def __init__(self, params=None): # noqa: E501,D401,D403 def params(self): """Get the params of this ScriptInvocationParams. + The script parameters. `params` contains key-value pairs that map values to the **params.keys** in a script. When you invoke a script with `params`, InfluxDB passes the values as invocation parameters to the script. + :return: The params of this ScriptInvocationParams. :rtype: dict(str, object) """ # noqa: E501 @@ -58,6 +60,8 @@ def params(self): def params(self, params): """Set the params of this ScriptInvocationParams. + The script parameters. `params` contains key-value pairs that map values to the **params.keys** in a script. When you invoke a script with `params`, InfluxDB passes the values as invocation parameters to the script. + :param params: The params of this ScriptInvocationParams. :type: dict(str, object) """ # noqa: E501 diff --git a/influxdb_client/domain/script_language.py b/influxdb_client/domain/script_language.py index 886b2b48..473055e0 100644 --- a/influxdb_client/domain/script_language.py +++ b/influxdb_client/domain/script_language.py @@ -26,6 +26,8 @@ class ScriptLanguage(object): allowed enum values """ FLUX = "flux" + SQL = "sql" + INFLUXQL = "influxql" """ Attributes: diff --git a/influxdb_client/domain/script_update_request.py b/influxdb_client/domain/script_update_request.py index 388e61ef..36444c71 100644 --- a/influxdb_client/domain/script_update_request.py +++ b/influxdb_client/domain/script_update_request.py @@ -30,53 +30,32 @@ class ScriptUpdateRequest(object): and the value is json key in definition. """ openapi_types = { - 'name': 'str', 'description': 'str', 'script': 'str' } attribute_map = { - 'name': 'name', 'description': 'description', 'script': 'script' } - def __init__(self, name=None, description=None, script=None): # noqa: E501,D401,D403 + def __init__(self, description=None, script=None): # noqa: E501,D401,D403 """ScriptUpdateRequest - a model defined in OpenAPI.""" # noqa: E501 - self._name = None self._description = None self._script = None self.discriminator = None - if name is not None: - self.name = name if description is not None: self.description = description if script is not None: self.script = script - @property - def name(self): - """Get the name of this ScriptUpdateRequest. - - :return: The name of this ScriptUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this ScriptUpdateRequest. - - :param name: The name of this ScriptUpdateRequest. - :type: str - """ # noqa: E501 - self._name = name - @property def description(self): """Get the description of this ScriptUpdateRequest. + A description of the script. + :return: The description of this ScriptUpdateRequest. :rtype: str """ # noqa: E501 @@ -86,6 +65,8 @@ def description(self): def description(self, description): """Set the description of this ScriptUpdateRequest. + A description of the script. + :param description: The description of this ScriptUpdateRequest. :type: str """ # noqa: E501 @@ -95,7 +76,7 @@ def description(self, description): def script(self): """Get the script of this ScriptUpdateRequest. - script is script to be executed + The script to execute. :return: The script of this ScriptUpdateRequest. :rtype: str @@ -106,7 +87,7 @@ def script(self): def script(self, script): """Set the script of this ScriptUpdateRequest. - script is script to be executed + The script to execute. :param script: The script of this ScriptUpdateRequest. :type: str diff --git a/influxdb_client/domain/shard_owner.py b/influxdb_client/domain/shard_owner.py index 423e02a6..3c8232a2 100644 --- a/influxdb_client/domain/shard_owner.py +++ b/influxdb_client/domain/shard_owner.py @@ -48,7 +48,7 @@ def __init__(self, node_id=None): # noqa: E501,D401,D403 def node_id(self): """Get the node_id of this ShardOwner. - ID of the node that owns a shard. + The ID of the node that owns the shard. :return: The node_id of this ShardOwner. :rtype: int @@ -59,7 +59,7 @@ def node_id(self): def node_id(self, node_id): """Set the node_id of this ShardOwner. - ID of the node that owns a shard. + The ID of the node that owns the shard. :param node_id: The node_id of this ShardOwner. :type: int diff --git a/influxdb_client/domain/task.py b/influxdb_client/domain/task.py index 56b88467..531babca 100644 --- a/influxdb_client/domain/task.py +++ b/influxdb_client/domain/task.py @@ -31,7 +31,6 @@ class Task(object): """ openapi_types = { 'id': 'str', - 'type': 'str', 'org_id': 'str', 'org': 'str', 'name': 'str', @@ -54,7 +53,6 @@ class Task(object): attribute_map = { 'id': 'id', - 'type': 'type', 'org_id': 'orgID', 'org': 'org', 'name': 'name', @@ -75,10 +73,9 @@ class Task(object): 'links': 'links' } - def __init__(self, id=None, type=None, org_id=None, org=None, name=None, owner_id=None, description=None, status=None, labels=None, authorization_id=None, flux=None, every=None, cron=None, offset=None, latest_completed=None, last_run_status=None, last_run_error=None, created_at=None, updated_at=None, links=None): # noqa: E501,D401,D403 + def __init__(self, id=None, org_id=None, org=None, name=None, owner_id=None, description=None, status=None, labels=None, authorization_id=None, flux=None, every=None, cron=None, offset=None, latest_completed=None, last_run_status=None, last_run_error=None, created_at=None, updated_at=None, links=None): # noqa: E501,D401,D403 """Task - a model defined in OpenAPI.""" # noqa: E501 self._id = None - self._type = None self._org_id = None self._org = None self._name = None @@ -100,8 +97,6 @@ def __init__(self, id=None, type=None, org_id=None, org=None, name=None, owner_i self.discriminator = None self.id = id - if type is not None: - self.type = type self.org_id = org_id if org is not None: self.org = org @@ -156,33 +151,11 @@ def id(self, id): raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 self._id = id - @property - def type(self): - """Get the type of this Task. - - The type of the task, useful for filtering a task list. - - :return: The type of this Task. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this Task. - - The type of the task, useful for filtering a task list. - - :param type: The type of this Task. - :type: str - """ # noqa: E501 - self._type = type - @property def org_id(self): """Get the org_id of this Task. - The ID of the organization that owns the task. + An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) ID. Specifies the organization that owns the task. :return: The org_id of this Task. :rtype: str @@ -193,7 +166,7 @@ def org_id(self): def org_id(self, org_id): """Set the org_id of this Task. - The ID of the organization that owns the task. + An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) ID. Specifies the organization that owns the task. :param org_id: The org_id of this Task. :type: str @@ -206,7 +179,7 @@ def org_id(self, org_id): def org(self): """Get the org of this Task. - The name of the organization that owns the task. + An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) name. Specifies the organization that owns the task. :return: The org of this Task. :rtype: str @@ -217,7 +190,7 @@ def org(self): def org(self, org): """Set the org of this Task. - The name of the organization that owns the task. + An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) name. Specifies the organization that owns the task. :param org: The org of this Task. :type: str @@ -252,7 +225,7 @@ def name(self, name): def owner_id(self): """Get the owner_id of this Task. - The ID of the user who owns this Task. + A [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) ID. Specifies the owner of the task. To find a user ID, you can use the [`GET /api/v2/users` endpoint](#operation/GetUsers) to list users. :return: The owner_id of this Task. :rtype: str @@ -263,7 +236,7 @@ def owner_id(self): def owner_id(self, owner_id): """Set the owner_id of this Task. - The ID of the user who owns this Task. + A [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) ID. Specifies the owner of the task. To find a user ID, you can use the [`GET /api/v2/users` endpoint](#operation/GetUsers) to list users. :param owner_id: The owner_id of this Task. :type: str @@ -274,7 +247,7 @@ def owner_id(self, owner_id): def description(self): """Get the description of this Task. - The description of the task. + A description of the task. :return: The description of this Task. :rtype: str @@ -285,7 +258,7 @@ def description(self): def description(self, description): """Set the description of this Task. - The description of the task. + A description of the task. :param description: The description of this Task. :type: str @@ -332,7 +305,7 @@ def labels(self, labels): def authorization_id(self): """Get the authorization_id of this Task. - The ID of the authorization used when the task communicates with the query engine. + An authorization ID. Specifies the authorization used when the task communicates with the query engine. To find an authorization ID, use the [`GET /api/v2/authorizations` endpoint](#operation/GetAuthorizations) to list authorizations. :return: The authorization_id of this Task. :rtype: str @@ -343,7 +316,7 @@ def authorization_id(self): def authorization_id(self, authorization_id): """Set the authorization_id of this Task. - The ID of the authorization used when the task communicates with the query engine. + An authorization ID. Specifies the authorization used when the task communicates with the query engine. To find an authorization ID, use the [`GET /api/v2/authorizations` endpoint](#operation/GetAuthorizations) to list authorizations. :param authorization_id: The authorization_id of this Task. :type: str @@ -354,7 +327,7 @@ def authorization_id(self, authorization_id): def flux(self): """Get the flux of this Task. - The Flux script to run for this task. + The Flux script that the task executes. :return: The flux of this Task. :rtype: str @@ -365,7 +338,7 @@ def flux(self): def flux(self, flux): """Set the flux of this Task. - The Flux script to run for this task. + The Flux script that the task executes. :param flux: The flux of this Task. :type: str @@ -378,7 +351,7 @@ def flux(self, flux): def every(self): """Get the every of this Task. - An interval ([duration literal](https://docs.influxdata.com/flux/v0.x/spec/lexical-elements/#duration-literals))) at which the task runs. `every` also determines when the task first runs, depending on the specified time. + The interval ([duration literal](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) at which the task runs. `every` also determines when the task first runs, depending on the specified time. :return: The every of this Task. :rtype: str @@ -389,7 +362,7 @@ def every(self): def every(self, every): """Set the every of this Task. - An interval ([duration literal](https://docs.influxdata.com/flux/v0.x/spec/lexical-elements/#duration-literals))) at which the task runs. `every` also determines when the task first runs, depending on the specified time. + The interval ([duration literal](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) at which the task runs. `every` also determines when the task first runs, depending on the specified time. :param every: The every of this Task. :type: str @@ -400,7 +373,7 @@ def every(self, every): def cron(self): """Get the cron of this Task. - [Cron expression](https://en.wikipedia.org/wiki/Cron#Overview) that defines the schedule on which the task runs. InfluxDB bases cron runs on the system time. + A [Cron expression](https://en.wikipedia.org/wiki/Cron#Overview) that defines the schedule on which the task runs. InfluxDB uses the system time when evaluating Cron expressions. :return: The cron of this Task. :rtype: str @@ -411,7 +384,7 @@ def cron(self): def cron(self, cron): """Set the cron of this Task. - [Cron expression](https://en.wikipedia.org/wiki/Cron#Overview) that defines the schedule on which the task runs. InfluxDB bases cron runs on the system time. + A [Cron expression](https://en.wikipedia.org/wiki/Cron#Overview) that defines the schedule on which the task runs. InfluxDB uses the system time when evaluating Cron expressions. :param cron: The cron of this Task. :type: str @@ -444,7 +417,7 @@ def offset(self, offset): def latest_completed(self): """Get the latest_completed of this Task. - A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/flux/v0.x/data-types/basic/time/#time-syntax)) of the latest scheduled and completed run. + A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. :return: The latest_completed of this Task. :rtype: datetime @@ -455,7 +428,7 @@ def latest_completed(self): def latest_completed(self, latest_completed): """Set the latest_completed of this Task. - A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/flux/v0.x/data-types/basic/time/#time-syntax)) of the latest scheduled and completed run. + A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. :param latest_completed: The latest_completed of this Task. :type: datetime diff --git a/influxdb_client/domain/task_update_request.py b/influxdb_client/domain/task_update_request.py index 3745b3b3..1755a43f 100644 --- a/influxdb_client/domain/task_update_request.py +++ b/influxdb_client/domain/task_update_request.py @@ -97,7 +97,7 @@ def status(self, status): def flux(self): """Get the flux of this TaskUpdateRequest. - The Flux script to run for this task. + The Flux script that the task runs. :return: The flux of this TaskUpdateRequest. :rtype: str @@ -108,7 +108,7 @@ def flux(self): def flux(self, flux): """Set the flux of this TaskUpdateRequest. - The Flux script to run for this task. + The Flux script that the task runs. :param flux: The flux of this TaskUpdateRequest. :type: str @@ -119,7 +119,7 @@ def flux(self, flux): def name(self): """Get the name of this TaskUpdateRequest. - Override the 'name' option in the flux script. + Update the 'name' option in the flux script. :return: The name of this TaskUpdateRequest. :rtype: str @@ -130,7 +130,7 @@ def name(self): def name(self, name): """Set the name of this TaskUpdateRequest. - Override the 'name' option in the flux script. + Update the 'name' option in the flux script. :param name: The name of this TaskUpdateRequest. :type: str @@ -141,7 +141,7 @@ def name(self, name): def every(self): """Get the every of this TaskUpdateRequest. - Override the 'every' option in the flux script. + Update the 'every' option in the flux script. :return: The every of this TaskUpdateRequest. :rtype: str @@ -152,7 +152,7 @@ def every(self): def every(self, every): """Set the every of this TaskUpdateRequest. - Override the 'every' option in the flux script. + Update the 'every' option in the flux script. :param every: The every of this TaskUpdateRequest. :type: str @@ -163,7 +163,7 @@ def every(self, every): def cron(self): """Get the cron of this TaskUpdateRequest. - Override the 'cron' option in the flux script. + Update the 'cron' option in the flux script. :return: The cron of this TaskUpdateRequest. :rtype: str @@ -174,7 +174,7 @@ def cron(self): def cron(self, cron): """Set the cron of this TaskUpdateRequest. - Override the 'cron' option in the flux script. + Update the 'cron' option in the flux script. :param cron: The cron of this TaskUpdateRequest. :type: str @@ -185,7 +185,7 @@ def cron(self, cron): def offset(self): """Get the offset of this TaskUpdateRequest. - Override the 'offset' option in the flux script. + Update the 'offset' option in the flux script. :return: The offset of this TaskUpdateRequest. :rtype: str @@ -196,7 +196,7 @@ def offset(self): def offset(self, offset): """Set the offset of this TaskUpdateRequest. - Override the 'offset' option in the flux script. + Update the 'offset' option in the flux script. :param offset: The offset of this TaskUpdateRequest. :type: str @@ -207,7 +207,7 @@ def offset(self, offset): def description(self): """Get the description of this TaskUpdateRequest. - An optional description of the task. + Update the description of the task. :return: The description of this TaskUpdateRequest. :rtype: str @@ -218,7 +218,7 @@ def description(self): def description(self, description): """Set the description of this TaskUpdateRequest. - An optional description of the task. + Update the description of the task. :param description: The description of this TaskUpdateRequest. :type: str diff --git a/influxdb_client/domain/telegram_notification_endpoint.py b/influxdb_client/domain/telegram_notification_endpoint.py index 86d44aff..44c22dff 100644 --- a/influxdb_client/domain/telegram_notification_endpoint.py +++ b/influxdb_client/domain/telegram_notification_endpoint.py @@ -102,7 +102,7 @@ def token(self, token): def channel(self): """Get the channel of this TelegramNotificationEndpoint. - ID of the telegram channel, a chat_id in https://core.telegram.org/bots/api#sendmessage . + The ID of the telegram channel; a chat_id in https://core.telegram.org/bots/api#sendmessage . :return: The channel of this TelegramNotificationEndpoint. :rtype: str @@ -113,7 +113,7 @@ def channel(self): def channel(self, channel): """Set the channel of this TelegramNotificationEndpoint. - ID of the telegram channel, a chat_id in https://core.telegram.org/bots/api#sendmessage . + The ID of the telegram channel; a chat_id in https://core.telegram.org/bots/api#sendmessage . :param channel: The channel of this TelegramNotificationEndpoint. :type: str diff --git a/influxdb_client/domain/telegram_notification_rule_base.py b/influxdb_client/domain/telegram_notification_rule_base.py index 48b7ba47..8d3aeb1b 100644 --- a/influxdb_client/domain/telegram_notification_rule_base.py +++ b/influxdb_client/domain/telegram_notification_rule_base.py @@ -160,7 +160,7 @@ def message_template(self, message_template): def parse_mode(self): """Get the parse_mode of this TelegramNotificationRuleBase. - Parse mode of the message text per https://core.telegram.org/bots/api#formatting-options . Defaults to "MarkdownV2" . + Parse mode of the message text per https://core.telegram.org/bots/api#formatting-options. Defaults to "MarkdownV2". :return: The parse_mode of this TelegramNotificationRuleBase. :rtype: str @@ -171,7 +171,7 @@ def parse_mode(self): def parse_mode(self, parse_mode): """Set the parse_mode of this TelegramNotificationRuleBase. - Parse mode of the message text per https://core.telegram.org/bots/api#formatting-options . Defaults to "MarkdownV2" . + Parse mode of the message text per https://core.telegram.org/bots/api#formatting-options. Defaults to "MarkdownV2". :param parse_mode: The parse_mode of this TelegramNotificationRuleBase. :type: str @@ -182,7 +182,7 @@ def parse_mode(self, parse_mode): def disable_web_page_preview(self): """Get the disable_web_page_preview of this TelegramNotificationRuleBase. - Disables preview of web links in the sent messages when "true". Defaults to "false" . + Disables preview of web links in the sent messages when "true". Defaults to "false". :return: The disable_web_page_preview of this TelegramNotificationRuleBase. :rtype: bool @@ -193,7 +193,7 @@ def disable_web_page_preview(self): def disable_web_page_preview(self, disable_web_page_preview): """Set the disable_web_page_preview of this TelegramNotificationRuleBase. - Disables preview of web links in the sent messages when "true". Defaults to "false" . + Disables preview of web links in the sent messages when "true". Defaults to "false". :param disable_web_page_preview: The disable_web_page_preview of this TelegramNotificationRuleBase. :type: bool diff --git a/influxdb_client/domain/template_apply.py b/influxdb_client/domain/template_apply.py index 45199517..6f8d5e40 100644 --- a/influxdb_client/domain/template_apply.py +++ b/influxdb_client/domain/template_apply.py @@ -89,6 +89,8 @@ def __init__(self, dry_run=None, org_id=None, stack_id=None, template=None, temp def dry_run(self): """Get the dry_run of this TemplateApply. + Only applies a dry run of the templates passed in the request. - Validates the template and generates a resource diff and summary. - Doesn't install templates or make changes to the InfluxDB instance. + :return: The dry_run of this TemplateApply. :rtype: bool """ # noqa: E501 @@ -98,6 +100,8 @@ def dry_run(self): def dry_run(self, dry_run): """Set the dry_run of this TemplateApply. + Only applies a dry run of the templates passed in the request. - Validates the template and generates a resource diff and summary. - Doesn't install templates or make changes to the InfluxDB instance. + :param dry_run: The dry_run of this TemplateApply. :type: bool """ # noqa: E501 @@ -107,6 +111,8 @@ def dry_run(self, dry_run): def org_id(self): """Get the org_id of this TemplateApply. + Organization ID. InfluxDB applies templates to this organization. The organization owns all resources created by the template. To find your organization, see how to [view organizations](https://docs.influxdata.com/influxdb/latest/organizations/view-orgs/). + :return: The org_id of this TemplateApply. :rtype: str """ # noqa: E501 @@ -116,6 +122,8 @@ def org_id(self): def org_id(self, org_id): """Set the org_id of this TemplateApply. + Organization ID. InfluxDB applies templates to this organization. The organization owns all resources created by the template. To find your organization, see how to [view organizations](https://docs.influxdata.com/influxdb/latest/organizations/view-orgs/). + :param org_id: The org_id of this TemplateApply. :type: str """ # noqa: E501 @@ -125,6 +133,8 @@ def org_id(self, org_id): def stack_id(self): """Get the stack_id of this TemplateApply. + ID of the stack to update. To apply templates to an existing stack in the organization, use the `stackID` parameter. If you apply templates without providing a stack ID, InfluxDB initializes a new stack with all new resources. To find a stack ID, use the InfluxDB [`/api/v2/stacks` API endpoint](#operation/ListStacks) to list stacks. #### Related guides - [Stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/) - [View stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/view/) + :return: The stack_id of this TemplateApply. :rtype: str """ # noqa: E501 @@ -134,6 +144,8 @@ def stack_id(self): def stack_id(self, stack_id): """Set the stack_id of this TemplateApply. + ID of the stack to update. To apply templates to an existing stack in the organization, use the `stackID` parameter. If you apply templates without providing a stack ID, InfluxDB initializes a new stack with all new resources. To find a stack ID, use the InfluxDB [`/api/v2/stacks` API endpoint](#operation/ListStacks) to list stacks. #### Related guides - [Stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/) - [View stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/view/) + :param stack_id: The stack_id of this TemplateApply. :type: str """ # noqa: E501 @@ -161,6 +173,8 @@ def template(self, template): def templates(self): """Get the templates of this TemplateApply. + A list of template objects to apply. A template object has a `contents` property with an array of InfluxDB resource configurations. Use the `templates` parameter to apply multiple template objects. If you use `templates`, you can't use the `template` parameter. + :return: The templates of this TemplateApply. :rtype: list[TemplateApplyTemplate] """ # noqa: E501 @@ -170,6 +184,8 @@ def templates(self): def templates(self, templates): """Set the templates of this TemplateApply. + A list of template objects to apply. A template object has a `contents` property with an array of InfluxDB resource configurations. Use the `templates` parameter to apply multiple template objects. If you use `templates`, you can't use the `template` parameter. + :param templates: The templates of this TemplateApply. :type: list[TemplateApplyTemplate] """ # noqa: E501 @@ -179,6 +195,8 @@ def templates(self, templates): def env_refs(self): """Get the env_refs of this TemplateApply. + An object with key-value pairs that map to **environment references** in templates. Environment references in templates are `envRef` objects with an `envRef.key` property. To substitute a custom environment reference value when applying templates, pass `envRefs` with the `envRef.key` and the value. When you apply a template, InfluxDB replaces `envRef` objects in the template with the values that you provide in the `envRefs` parameter. For more examples, see how to [define environment references](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#define-environment-references). The following template fields may use environment references: - `metadata.name` - `spec.endpointName` - `spec.associations.name` For more information about including environment references in template fields, see how to [include user-definable resource names](https://docs.influxdata.com/influxdb/latest/influxdb-templates/create/#include-user-definable-resource-names). + :return: The env_refs of this TemplateApply. :rtype: dict(str, object) """ # noqa: E501 @@ -188,6 +206,8 @@ def env_refs(self): def env_refs(self, env_refs): """Set the env_refs of this TemplateApply. + An object with key-value pairs that map to **environment references** in templates. Environment references in templates are `envRef` objects with an `envRef.key` property. To substitute a custom environment reference value when applying templates, pass `envRefs` with the `envRef.key` and the value. When you apply a template, InfluxDB replaces `envRef` objects in the template with the values that you provide in the `envRefs` parameter. For more examples, see how to [define environment references](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#define-environment-references). The following template fields may use environment references: - `metadata.name` - `spec.endpointName` - `spec.associations.name` For more information about including environment references in template fields, see how to [include user-definable resource names](https://docs.influxdata.com/influxdb/latest/influxdb-templates/create/#include-user-definable-resource-names). + :param env_refs: The env_refs of this TemplateApply. :type: dict(str, object) """ # noqa: E501 @@ -197,6 +217,8 @@ def env_refs(self, env_refs): def secrets(self): """Get the secrets of this TemplateApply. + An object with key-value pairs that map to **secrets** in queries. Queries may reference secrets stored in InfluxDB--for example, the following Flux script retrieves `POSTGRES_USERNAME` and `POSTGRES_PASSWORD` secrets and then uses them to connect to a PostgreSQL database: ```js import "sql" import "influxdata/influxdb/secrets" username = secrets.get(key: "POSTGRES_USERNAME") password = secrets.get(key: "POSTGRES_PASSWORD") sql.from( driverName: "postgres", dataSourceName: "postgresql://${username}:${password}@localhost:5432", query: "SELECT * FROM example_table", ) ``` To define secret values in your `/api/v2/templates/apply` request, pass the `secrets` parameter with key-value pairs--for example: ```json { ... "secrets": { "POSTGRES_USERNAME": "pguser", "POSTGRES_PASSWORD": "foo" } ... } ``` InfluxDB stores the key-value pairs as secrets that you can access with `secrets.get()`. Once stored, you can't view secret values in InfluxDB. #### Related guides - [How to pass secrets when installing a template](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#pass-secrets-when-installing-a-template) + :return: The secrets of this TemplateApply. :rtype: dict(str, str) """ # noqa: E501 @@ -206,6 +228,8 @@ def secrets(self): def secrets(self, secrets): """Set the secrets of this TemplateApply. + An object with key-value pairs that map to **secrets** in queries. Queries may reference secrets stored in InfluxDB--for example, the following Flux script retrieves `POSTGRES_USERNAME` and `POSTGRES_PASSWORD` secrets and then uses them to connect to a PostgreSQL database: ```js import "sql" import "influxdata/influxdb/secrets" username = secrets.get(key: "POSTGRES_USERNAME") password = secrets.get(key: "POSTGRES_PASSWORD") sql.from( driverName: "postgres", dataSourceName: "postgresql://${username}:${password}@localhost:5432", query: "SELECT * FROM example_table", ) ``` To define secret values in your `/api/v2/templates/apply` request, pass the `secrets` parameter with key-value pairs--for example: ```json { ... "secrets": { "POSTGRES_USERNAME": "pguser", "POSTGRES_PASSWORD": "foo" } ... } ``` InfluxDB stores the key-value pairs as secrets that you can access with `secrets.get()`. Once stored, you can't view secret values in InfluxDB. #### Related guides - [How to pass secrets when installing a template](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#pass-secrets-when-installing-a-template) + :param secrets: The secrets of this TemplateApply. :type: dict(str, str) """ # noqa: E501 @@ -215,6 +239,8 @@ def secrets(self, secrets): def remotes(self): """Get the remotes of this TemplateApply. + A list of URLs for template files. To apply a template manifest file located at a URL, pass `remotes` with an array that contains the URL. + :return: The remotes of this TemplateApply. :rtype: list[TemplateApplyRemotes] """ # noqa: E501 @@ -224,6 +250,8 @@ def remotes(self): def remotes(self, remotes): """Set the remotes of this TemplateApply. + A list of URLs for template files. To apply a template manifest file located at a URL, pass `remotes` with an array that contains the URL. + :param remotes: The remotes of this TemplateApply. :type: list[TemplateApplyRemotes] """ # noqa: E501 @@ -233,6 +261,8 @@ def remotes(self, remotes): def actions(self): """Get the actions of this TemplateApply. + A list of `action` objects. Actions let you customize how InfluxDB applies templates in the request. You can use the following actions to prevent creating or updating resources: - A `skipKind` action skips template resources of a specified `kind`. - A `skipResource` action skips template resources with a specified `metadata.name` and `kind`. + :return: The actions of this TemplateApply. :rtype: list[object] """ # noqa: E501 @@ -242,6 +272,8 @@ def actions(self): def actions(self, actions): """Set the actions of this TemplateApply. + A list of `action` objects. Actions let you customize how InfluxDB applies templates in the request. You can use the following actions to prevent creating or updating resources: - A `skipKind` action skips template resources of a specified `kind`. - A `skipResource` action skips template resources with a specified `metadata.name` and `kind`. + :param actions: The actions of this TemplateApply. :type: list[object] """ # noqa: E501 diff --git a/influxdb_client/domain/template_summary_diff_buckets_new_old.py b/influxdb_client/domain/template_summary_diff_buckets_new_old.py index 64fa8f7f..7caf2791 100644 --- a/influxdb_client/domain/template_summary_diff_buckets_new_old.py +++ b/influxdb_client/domain/template_summary_diff_buckets_new_old.py @@ -95,7 +95,7 @@ def description(self, description): def retention_rules(self): """Get the retention_rules of this TemplateSummaryDiffBucketsNewOld. - Rules to expire or retain data. No rules means data never expires. + Retention rules to expire or retain data. The InfluxDB `/api/v2` API uses `RetentionRules` to configure the [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period). #### InfluxDB Cloud - `retentionRules` is required. #### InfluxDB OSS - `retentionRules` isn't required. :return: The retention_rules of this TemplateSummaryDiffBucketsNewOld. :rtype: list[BucketRetentionRules] @@ -106,7 +106,7 @@ def retention_rules(self): def retention_rules(self, retention_rules): """Set the retention_rules of this TemplateSummaryDiffBucketsNewOld. - Rules to expire or retain data. No rules means data never expires. + Retention rules to expire or retain data. The InfluxDB `/api/v2` API uses `RetentionRules` to configure the [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period). #### InfluxDB Cloud - `retentionRules` is required. #### InfluxDB OSS - `retentionRules` isn't required. :param retention_rules: The retention_rules of this TemplateSummaryDiffBucketsNewOld. :type: list[BucketRetentionRules] diff --git a/influxdb_client/domain/user.py b/influxdb_client/domain/user.py index 7232abd4..6b7a28c6 100644 --- a/influxdb_client/domain/user.py +++ b/influxdb_client/domain/user.py @@ -31,30 +31,25 @@ class User(object): """ openapi_types = { 'id': 'str', - 'oauth_id': 'str', 'name': 'str', 'status': 'str' } attribute_map = { 'id': 'id', - 'oauth_id': 'oauthID', 'name': 'name', 'status': 'status' } - def __init__(self, id=None, oauth_id=None, name=None, status='active'): # noqa: E501,D401,D403 + def __init__(self, id=None, name=None, status='active'): # noqa: E501,D401,D403 """User - a model defined in OpenAPI.""" # noqa: E501 self._id = None - self._oauth_id = None self._name = None self._status = None self.discriminator = None if id is not None: self.id = id - if oauth_id is not None: - self.oauth_id = oauth_id self.name = name if status is not None: self.status = status @@ -63,6 +58,8 @@ def __init__(self, id=None, oauth_id=None, name=None, status='active'): # noqa: def id(self): """Get the id of this User. + The user ID. + :return: The id of this User. :rtype: str """ # noqa: E501 @@ -72,33 +69,19 @@ def id(self): def id(self, id): """Set the id of this User. + The user ID. + :param id: The id of this User. :type: str """ # noqa: E501 self._id = id - @property - def oauth_id(self): - """Get the oauth_id of this User. - - :return: The oauth_id of this User. - :rtype: str - """ # noqa: E501 - return self._oauth_id - - @oauth_id.setter - def oauth_id(self, oauth_id): - """Set the oauth_id of this User. - - :param oauth_id: The oauth_id of this User. - :type: str - """ # noqa: E501 - self._oauth_id = oauth_id - @property def name(self): """Get the name of this User. + The user name. + :return: The name of this User. :rtype: str """ # noqa: E501 @@ -108,6 +91,8 @@ def name(self): def name(self, name): """Set the name of this User. + The user name. + :param name: The name of this User. :type: str """ # noqa: E501 @@ -119,7 +104,7 @@ def name(self, name): def status(self): """Get the status of this User. - If inactive the user is inactive. + If `inactive`, the user is inactive. Default is `active`. :return: The status of this User. :rtype: str @@ -130,7 +115,7 @@ def status(self): def status(self, status): """Set the status of this User. - If inactive the user is inactive. + If `inactive`, the user is inactive. Default is `active`. :param status: The status of this User. :type: str diff --git a/influxdb_client/domain/user_response.py b/influxdb_client/domain/user_response.py index 6a6215e3..a4a163f7 100644 --- a/influxdb_client/domain/user_response.py +++ b/influxdb_client/domain/user_response.py @@ -31,7 +31,6 @@ class UserResponse(object): """ openapi_types = { 'id': 'str', - 'oauth_id': 'str', 'name': 'str', 'status': 'str', 'links': 'UserResponseLinks' @@ -39,16 +38,14 @@ class UserResponse(object): attribute_map = { 'id': 'id', - 'oauth_id': 'oauthID', 'name': 'name', 'status': 'status', 'links': 'links' } - def __init__(self, id=None, oauth_id=None, name=None, status='active', links=None): # noqa: E501,D401,D403 + def __init__(self, id=None, name=None, status='active', links=None): # noqa: E501,D401,D403 """UserResponse - a model defined in OpenAPI.""" # noqa: E501 self._id = None - self._oauth_id = None self._name = None self._status = None self._links = None @@ -56,8 +53,6 @@ def __init__(self, id=None, oauth_id=None, name=None, status='active', links=Non if id is not None: self.id = id - if oauth_id is not None: - self.oauth_id = oauth_id self.name = name if status is not None: self.status = status @@ -68,6 +63,8 @@ def __init__(self, id=None, oauth_id=None, name=None, status='active', links=Non def id(self): """Get the id of this UserResponse. + The user ID. + :return: The id of this UserResponse. :rtype: str """ # noqa: E501 @@ -77,33 +74,19 @@ def id(self): def id(self, id): """Set the id of this UserResponse. + The user ID. + :param id: The id of this UserResponse. :type: str """ # noqa: E501 self._id = id - @property - def oauth_id(self): - """Get the oauth_id of this UserResponse. - - :return: The oauth_id of this UserResponse. - :rtype: str - """ # noqa: E501 - return self._oauth_id - - @oauth_id.setter - def oauth_id(self, oauth_id): - """Set the oauth_id of this UserResponse. - - :param oauth_id: The oauth_id of this UserResponse. - :type: str - """ # noqa: E501 - self._oauth_id = oauth_id - @property def name(self): """Get the name of this UserResponse. + The user name. + :return: The name of this UserResponse. :rtype: str """ # noqa: E501 @@ -113,6 +96,8 @@ def name(self): def name(self, name): """Set the name of this UserResponse. + The user name. + :param name: The name of this UserResponse. :type: str """ # noqa: E501 @@ -124,7 +109,7 @@ def name(self, name): def status(self): """Get the status of this UserResponse. - If inactive the user is inactive. + The status of a user. An inactive user can't read or write resources. :return: The status of this UserResponse. :rtype: str @@ -135,7 +120,7 @@ def status(self): def status(self, status): """Set the status of this UserResponse. - If inactive the user is inactive. + The status of a user. An inactive user can't read or write resources. :param status: The status of this UserResponse. :type: str diff --git a/influxdb_client/domain/xy_view_properties.py b/influxdb_client/domain/xy_view_properties.py index d598cbc0..817967c2 100644 --- a/influxdb_client/domain/xy_view_properties.py +++ b/influxdb_client/domain/xy_view_properties.py @@ -32,6 +32,7 @@ class XYViewProperties(ViewProperties): and the value is json key in definition. """ openapi_types = { + 'adaptive_zoom_hide': 'bool', 'time_format': 'str', 'type': 'str', 'queries': 'list[DashboardQuery]', @@ -63,6 +64,7 @@ class XYViewProperties(ViewProperties): } attribute_map = { + 'adaptive_zoom_hide': 'adaptiveZoomHide', 'time_format': 'timeFormat', 'type': 'type', 'queries': 'queries', @@ -93,10 +95,11 @@ class XYViewProperties(ViewProperties): 'legend_orientation_threshold': 'legendOrientationThreshold' } - def __init__(self, time_format=None, type=None, queries=None, colors=None, color_mapping=None, shape=None, note=None, show_note_when_empty=None, axes=None, static_legend=None, x_column=None, generate_x_axis_ticks=None, x_total_ticks=None, x_tick_start=None, x_tick_step=None, y_column=None, generate_y_axis_ticks=None, y_total_ticks=None, y_tick_start=None, y_tick_step=None, shade_below=None, hover_dimension=None, position=None, geom=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 + def __init__(self, adaptive_zoom_hide=None, time_format=None, type=None, queries=None, colors=None, color_mapping=None, shape=None, note=None, show_note_when_empty=None, axes=None, static_legend=None, x_column=None, generate_x_axis_ticks=None, x_total_ticks=None, x_tick_start=None, x_tick_step=None, y_column=None, generate_y_axis_ticks=None, y_total_ticks=None, y_tick_start=None, y_tick_step=None, shade_below=None, hover_dimension=None, position=None, geom=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 """XYViewProperties - a model defined in OpenAPI.""" # noqa: E501 ViewProperties.__init__(self) # noqa: E501 + self._adaptive_zoom_hide = None self._time_format = None self._type = None self._queries = None @@ -127,6 +130,8 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, color self._legend_orientation_threshold = None self.discriminator = None + if adaptive_zoom_hide is not None: + self.adaptive_zoom_hide = adaptive_zoom_hide if time_format is not None: self.time_format = time_format self.type = type @@ -175,6 +180,24 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, color if legend_orientation_threshold is not None: self.legend_orientation_threshold = legend_orientation_threshold + @property + def adaptive_zoom_hide(self): + """Get the adaptive_zoom_hide of this XYViewProperties. + + :return: The adaptive_zoom_hide of this XYViewProperties. + :rtype: bool + """ # noqa: E501 + return self._adaptive_zoom_hide + + @adaptive_zoom_hide.setter + def adaptive_zoom_hide(self, adaptive_zoom_hide): + """Set the adaptive_zoom_hide of this XYViewProperties. + + :param adaptive_zoom_hide: The adaptive_zoom_hide of this XYViewProperties. + :type: bool + """ # noqa: E501 + self._adaptive_zoom_hide = adaptive_zoom_hide + @property def time_format(self): """Get the time_format of this XYViewProperties. diff --git a/influxdb_client/service/authorizations_service.py b/influxdb_client/service/authorizations_service.py index ed2311a1..100160e2 100644 --- a/influxdb_client/service/authorizations_service.py +++ b/influxdb_client/service/authorizations_service.py @@ -32,13 +32,14 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 def delete_authorizations_id(self, auth_id, **kwargs): # noqa: E501,D401,D403 """Delete an authorization. + Deletes an authorization. Use the endpoint to delete an API token. If you want to disable an API token instead of delete it, [update the authorization's status to `inactive`](#operation/PatchAuthorizationsID). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_authorizations_id(auth_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str auth_id: The ID of the authorization to delete. (required) + :param str auth_id: An authorization ID. Specifies the authorization to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, @@ -54,20 +55,21 @@ def delete_authorizations_id(self, auth_id, **kwargs): # noqa: E501,D401,D403 def delete_authorizations_id_with_http_info(self, auth_id, **kwargs): # noqa: E501,D401,D403 """Delete an authorization. + Deletes an authorization. Use the endpoint to delete an API token. If you want to disable an API token instead of delete it, [update the authorization's status to `inactive`](#operation/PatchAuthorizationsID). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_authorizations_id_with_http_info(auth_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str auth_id: The ID of the authorization to delete. (required) + :param str auth_id: An authorization ID. Specifies the authorization to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_authorizations_id_prepare(auth_id, **kwargs) + self._delete_authorizations_id_prepare(auth_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/authorizations/{authID}', 'DELETE', @@ -89,17 +91,18 @@ def delete_authorizations_id_with_http_info(self, auth_id, **kwargs): # noqa: E async def delete_authorizations_id_async(self, auth_id, **kwargs): # noqa: E501,D401,D403 """Delete an authorization. + Deletes an authorization. Use the endpoint to delete an API token. If you want to disable an API token instead of delete it, [update the authorization's status to `inactive`](#operation/PatchAuthorizationsID). This method makes an asynchronous HTTP request. :param async_req bool - :param str auth_id: The ID of the authorization to delete. (required) + :param str auth_id: An authorization ID. Specifies the authorization to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_authorizations_id_prepare(auth_id, **kwargs) + self._delete_authorizations_id_prepare(auth_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/authorizations/{authID}', 'DELETE', @@ -146,8 +149,9 @@ def _delete_authorizations_id_prepare(self, auth_id, **kwargs): # noqa: E501,D4 return local_var_params, path_params, query_params, header_params, body_params def get_authorizations(self, **kwargs): # noqa: E501,D401,D403 - """List all authorizations. + """List authorizations. + Lists authorizations. To limit which authorizations are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all authorizations. #### InfluxDB Cloud - InfluxDB Cloud doesn't expose [API token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) values in `GET /api/v2/authorizations` responses; returns `token: redacted` for all authorizations. #### Required permissions To retrieve an authorization, the request must use an API token that has the following permissions: - `read-authorizations` - `read-user` for the user that the authorization is scoped to #### Related guides - [View tokens](https://docs.influxdata.com/influxdb/latest/security/tokens/view-tokens/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_authorizations(async_req=True) @@ -155,10 +159,11 @@ def get_authorizations(self, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str zap_trace_span: OpenTracing span context - :param str user_id: Only show authorizations that belong to a user ID. - :param str user: Only show authorizations that belong to a user name. - :param str org_id: Only show authorizations that belong to an organization ID. - :param str org: Only show authorizations that belong to a organization name. + :param str user_id: A user ID. Only returns authorizations scoped to the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). + :param str user: A user name. Only returns authorizations scoped to the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). + :param str org_id: An organization ID. Only returns authorizations that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). + :param str org: An organization name. Only returns authorizations that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). + :param str token: An API [token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) value. Specifies an authorization by its `token` property value and returns the authorization. #### InfluxDB OSS - Doesn't support this parameter. InfluxDB OSS ignores the `token=` parameter, applies other parameters, and then returns the result. #### Limitations - The parameter is non-repeatable. If you specify more than one, only the first one is used. If a resource with the specified property value doesn't exist, then the response body contains an empty list. :return: Authorizations If the method is called asynchronously, returns the request thread. @@ -171,8 +176,9 @@ def get_authorizations(self, **kwargs): # noqa: E501,D401,D403 return data def get_authorizations_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List all authorizations. + """List authorizations. + Lists authorizations. To limit which authorizations are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all authorizations. #### InfluxDB Cloud - InfluxDB Cloud doesn't expose [API token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) values in `GET /api/v2/authorizations` responses; returns `token: redacted` for all authorizations. #### Required permissions To retrieve an authorization, the request must use an API token that has the following permissions: - `read-authorizations` - `read-user` for the user that the authorization is scoped to #### Related guides - [View tokens](https://docs.influxdata.com/influxdb/latest/security/tokens/view-tokens/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_authorizations_with_http_info(async_req=True) @@ -180,16 +186,17 @@ def get_authorizations_with_http_info(self, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str zap_trace_span: OpenTracing span context - :param str user_id: Only show authorizations that belong to a user ID. - :param str user: Only show authorizations that belong to a user name. - :param str org_id: Only show authorizations that belong to an organization ID. - :param str org: Only show authorizations that belong to a organization name. + :param str user_id: A user ID. Only returns authorizations scoped to the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). + :param str user: A user name. Only returns authorizations scoped to the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). + :param str org_id: An organization ID. Only returns authorizations that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). + :param str org: An organization name. Only returns authorizations that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). + :param str token: An API [token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) value. Specifies an authorization by its `token` property value and returns the authorization. #### InfluxDB OSS - Doesn't support this parameter. InfluxDB OSS ignores the `token=` parameter, applies other parameters, and then returns the result. #### Limitations - The parameter is non-repeatable. If you specify more than one, only the first one is used. If a resource with the specified property value doesn't exist, then the response body contains an empty list. :return: Authorizations If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_authorizations_prepare(**kwargs) + self._get_authorizations_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/authorizations', 'GET', @@ -209,22 +216,24 @@ def get_authorizations_with_http_info(self, **kwargs): # noqa: E501,D401,D403 urlopen_kw=kwargs.get('urlopen_kw', None)) async def get_authorizations_async(self, **kwargs): # noqa: E501,D401,D403 - """List all authorizations. + """List authorizations. + Lists authorizations. To limit which authorizations are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all authorizations. #### InfluxDB Cloud - InfluxDB Cloud doesn't expose [API token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) values in `GET /api/v2/authorizations` responses; returns `token: redacted` for all authorizations. #### Required permissions To retrieve an authorization, the request must use an API token that has the following permissions: - `read-authorizations` - `read-user` for the user that the authorization is scoped to #### Related guides - [View tokens](https://docs.influxdata.com/influxdb/latest/security/tokens/view-tokens/) This method makes an asynchronous HTTP request. :param async_req bool :param str zap_trace_span: OpenTracing span context - :param str user_id: Only show authorizations that belong to a user ID. - :param str user: Only show authorizations that belong to a user name. - :param str org_id: Only show authorizations that belong to an organization ID. - :param str org: Only show authorizations that belong to a organization name. + :param str user_id: A user ID. Only returns authorizations scoped to the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). + :param str user: A user name. Only returns authorizations scoped to the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). + :param str org_id: An organization ID. Only returns authorizations that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). + :param str org: An organization name. Only returns authorizations that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). + :param str token: An API [token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) value. Specifies an authorization by its `token` property value and returns the authorization. #### InfluxDB OSS - Doesn't support this parameter. InfluxDB OSS ignores the `token=` parameter, applies other parameters, and then returns the result. #### Limitations - The parameter is non-repeatable. If you specify more than one, only the first one is used. If a resource with the specified property value doesn't exist, then the response body contains an empty list. :return: Authorizations If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_authorizations_prepare(**kwargs) + self._get_authorizations_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/authorizations', 'GET', @@ -246,7 +255,7 @@ async def get_authorizations_async(self, **kwargs): # noqa: E501,D401,D403 def _get_authorizations_prepare(self, **kwargs): # noqa: E501,D401,D403 local_var_params = locals() - all_params = ['zap_trace_span', 'user_id', 'user', 'org_id', 'org'] # noqa: E501 + all_params = ['zap_trace_span', 'user_id', 'user', 'org_id', 'org', 'token'] # noqa: E501 self._check_operation_params('get_authorizations', all_params, local_var_params) path_params = {} @@ -260,6 +269,8 @@ def _get_authorizations_prepare(self, **kwargs): # noqa: E501,D401,D403 query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 if 'org' in local_var_params: query_params.append(('org', local_var_params['org'])) # noqa: E501 + if 'token' in local_var_params: + query_params.append(('token', local_var_params['token'])) # noqa: E501 header_params = {} if 'zap_trace_span' in local_var_params: @@ -275,13 +286,14 @@ def _get_authorizations_prepare(self, **kwargs): # noqa: E501,D401,D403 def get_authorizations_id(self, auth_id, **kwargs): # noqa: E501,D401,D403 """Retrieve an authorization. + Retrieves an authorization. Use this endpoint to retrieve information about an API token, including the token's permissions and the user that the token is scoped to. #### InfluxDB OSS - InfluxDB OSS returns [API token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) values in authorizations. - If the request uses an _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_, InfluxDB OSS returns authorizations for all organizations in the instance. #### Related guides - [View tokens](https://docs.influxdata.com/influxdb/latest/security/tokens/view-tokens/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_authorizations_id(auth_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str auth_id: The ID of the authorization to get. (required) + :param str auth_id: An authorization ID. Specifies the authorization to retrieve. (required) :param str zap_trace_span: OpenTracing span context :return: Authorization If the method is called asynchronously, @@ -297,20 +309,21 @@ def get_authorizations_id(self, auth_id, **kwargs): # noqa: E501,D401,D403 def get_authorizations_id_with_http_info(self, auth_id, **kwargs): # noqa: E501,D401,D403 """Retrieve an authorization. + Retrieves an authorization. Use this endpoint to retrieve information about an API token, including the token's permissions and the user that the token is scoped to. #### InfluxDB OSS - InfluxDB OSS returns [API token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) values in authorizations. - If the request uses an _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_, InfluxDB OSS returns authorizations for all organizations in the instance. #### Related guides - [View tokens](https://docs.influxdata.com/influxdb/latest/security/tokens/view-tokens/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_authorizations_id_with_http_info(auth_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str auth_id: The ID of the authorization to get. (required) + :param str auth_id: An authorization ID. Specifies the authorization to retrieve. (required) :param str zap_trace_span: OpenTracing span context :return: Authorization If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_authorizations_id_prepare(auth_id, **kwargs) + self._get_authorizations_id_prepare(auth_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/authorizations/{authID}', 'GET', @@ -332,17 +345,18 @@ def get_authorizations_id_with_http_info(self, auth_id, **kwargs): # noqa: E501 async def get_authorizations_id_async(self, auth_id, **kwargs): # noqa: E501,D401,D403 """Retrieve an authorization. + Retrieves an authorization. Use this endpoint to retrieve information about an API token, including the token's permissions and the user that the token is scoped to. #### InfluxDB OSS - InfluxDB OSS returns [API token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) values in authorizations. - If the request uses an _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_, InfluxDB OSS returns authorizations for all organizations in the instance. #### Related guides - [View tokens](https://docs.influxdata.com/influxdb/latest/security/tokens/view-tokens/) This method makes an asynchronous HTTP request. :param async_req bool - :param str auth_id: The ID of the authorization to get. (required) + :param str auth_id: An authorization ID. Specifies the authorization to retrieve. (required) :param str zap_trace_span: OpenTracing span context :return: Authorization If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_authorizations_id_prepare(auth_id, **kwargs) + self._get_authorizations_id_prepare(auth_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/authorizations/{authID}', 'GET', @@ -389,16 +403,17 @@ def _get_authorizations_id_prepare(self, auth_id, **kwargs): # noqa: E501,D401, return local_var_params, path_params, query_params, header_params, body_params def patch_authorizations_id(self, auth_id, authorization_update_request, **kwargs): # noqa: E501,D401,D403 - """Update an authorization to be active or inactive. + """Update an API token to be active or inactive. + Updates an authorization. Use this endpoint to set an API token's status to be _active_ or _inactive_. InfluxDB rejects requests that use inactive API tokens. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_authorizations_id(auth_id, authorization_update_request, async_req=True) >>> result = thread.get() :param async_req bool - :param str auth_id: The ID of the authorization to update. (required) - :param AuthorizationUpdateRequest authorization_update_request: Authorization to update (required) + :param str auth_id: An authorization ID. Specifies the authorization to update. (required) + :param AuthorizationUpdateRequest authorization_update_request: In the request body, provide the authorization properties to update. (required) :param str zap_trace_span: OpenTracing span context :return: Authorization If the method is called asynchronously, @@ -412,23 +427,24 @@ def patch_authorizations_id(self, auth_id, authorization_update_request, **kwarg return data def patch_authorizations_id_with_http_info(self, auth_id, authorization_update_request, **kwargs): # noqa: E501,D401,D403 - """Update an authorization to be active or inactive. + """Update an API token to be active or inactive. + Updates an authorization. Use this endpoint to set an API token's status to be _active_ or _inactive_. InfluxDB rejects requests that use inactive API tokens. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_authorizations_id_with_http_info(auth_id, authorization_update_request, async_req=True) >>> result = thread.get() :param async_req bool - :param str auth_id: The ID of the authorization to update. (required) - :param AuthorizationUpdateRequest authorization_update_request: Authorization to update (required) + :param str auth_id: An authorization ID. Specifies the authorization to update. (required) + :param AuthorizationUpdateRequest authorization_update_request: In the request body, provide the authorization properties to update. (required) :param str zap_trace_span: OpenTracing span context :return: Authorization If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_authorizations_id_prepare(auth_id, authorization_update_request, **kwargs) + self._patch_authorizations_id_prepare(auth_id, authorization_update_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/authorizations/{authID}', 'PATCH', @@ -448,20 +464,21 @@ def patch_authorizations_id_with_http_info(self, auth_id, authorization_update_r urlopen_kw=kwargs.get('urlopen_kw', None)) async def patch_authorizations_id_async(self, auth_id, authorization_update_request, **kwargs): # noqa: E501,D401,D403 - """Update an authorization to be active or inactive. + """Update an API token to be active or inactive. + Updates an authorization. Use this endpoint to set an API token's status to be _active_ or _inactive_. InfluxDB rejects requests that use inactive API tokens. This method makes an asynchronous HTTP request. :param async_req bool - :param str auth_id: The ID of the authorization to update. (required) - :param AuthorizationUpdateRequest authorization_update_request: Authorization to update (required) + :param str auth_id: An authorization ID. Specifies the authorization to update. (required) + :param AuthorizationUpdateRequest authorization_update_request: In the request body, provide the authorization properties to update. (required) :param str zap_trace_span: OpenTracing span context :return: Authorization If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_authorizations_id_prepare(auth_id, authorization_update_request, **kwargs) + self._patch_authorizations_id_prepare(auth_id, authorization_update_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/authorizations/{authID}', 'PATCH', @@ -520,13 +537,14 @@ def _patch_authorizations_id_prepare(self, auth_id, authorization_update_request def post_authorizations(self, authorization_post_request, **kwargs): # noqa: E501,D401,D403 """Create an authorization. + Creates an authorization and returns the authorization with the generated API [token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token). Use this endpoint to create an authorization, which generates an API token with permissions to `read` or `write` to a specific resource or `type` of resource. The API token is the authorization's `token` property value. To follow best practices for secure API token generation and retrieval, InfluxDB enforces access restrictions on API tokens. - InfluxDB allows access to the API token value immediately after the authorization is created. - You can’t change access (read/write) permissions for an API token after it’s created. - Tokens stop working when the user who created the token is deleted. We recommend the following for managing your tokens: - Create a generic user to create and manage tokens for writing data. - Store your tokens in a secure password vault for future access. #### Required permissions - `write-authorizations` - `write-user` for the user that the authorization is scoped to #### Related guides - [Create a token](https://docs.influxdata.com/influxdb/latest/security/tokens/create-token/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_authorizations(authorization_post_request, async_req=True) >>> result = thread.get() :param async_req bool - :param AuthorizationPostRequest authorization_post_request: Authorization to create (required) + :param AuthorizationPostRequest authorization_post_request: The authorization to create. (required) :param str zap_trace_span: OpenTracing span context :return: Authorization If the method is called asynchronously, @@ -542,20 +560,21 @@ def post_authorizations(self, authorization_post_request, **kwargs): # noqa: E5 def post_authorizations_with_http_info(self, authorization_post_request, **kwargs): # noqa: E501,D401,D403 """Create an authorization. + Creates an authorization and returns the authorization with the generated API [token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token). Use this endpoint to create an authorization, which generates an API token with permissions to `read` or `write` to a specific resource or `type` of resource. The API token is the authorization's `token` property value. To follow best practices for secure API token generation and retrieval, InfluxDB enforces access restrictions on API tokens. - InfluxDB allows access to the API token value immediately after the authorization is created. - You can’t change access (read/write) permissions for an API token after it’s created. - Tokens stop working when the user who created the token is deleted. We recommend the following for managing your tokens: - Create a generic user to create and manage tokens for writing data. - Store your tokens in a secure password vault for future access. #### Required permissions - `write-authorizations` - `write-user` for the user that the authorization is scoped to #### Related guides - [Create a token](https://docs.influxdata.com/influxdb/latest/security/tokens/create-token/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_authorizations_with_http_info(authorization_post_request, async_req=True) >>> result = thread.get() :param async_req bool - :param AuthorizationPostRequest authorization_post_request: Authorization to create (required) + :param AuthorizationPostRequest authorization_post_request: The authorization to create. (required) :param str zap_trace_span: OpenTracing span context :return: Authorization If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_authorizations_prepare(authorization_post_request, **kwargs) + self._post_authorizations_prepare(authorization_post_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/authorizations', 'POST', @@ -577,17 +596,18 @@ def post_authorizations_with_http_info(self, authorization_post_request, **kwarg async def post_authorizations_async(self, authorization_post_request, **kwargs): # noqa: E501,D401,D403 """Create an authorization. + Creates an authorization and returns the authorization with the generated API [token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token). Use this endpoint to create an authorization, which generates an API token with permissions to `read` or `write` to a specific resource or `type` of resource. The API token is the authorization's `token` property value. To follow best practices for secure API token generation and retrieval, InfluxDB enforces access restrictions on API tokens. - InfluxDB allows access to the API token value immediately after the authorization is created. - You can’t change access (read/write) permissions for an API token after it’s created. - Tokens stop working when the user who created the token is deleted. We recommend the following for managing your tokens: - Create a generic user to create and manage tokens for writing data. - Store your tokens in a secure password vault for future access. #### Required permissions - `write-authorizations` - `write-user` for the user that the authorization is scoped to #### Related guides - [Create a token](https://docs.influxdata.com/influxdb/latest/security/tokens/create-token/) This method makes an asynchronous HTTP request. :param async_req bool - :param AuthorizationPostRequest authorization_post_request: Authorization to create (required) + :param AuthorizationPostRequest authorization_post_request: The authorization to create. (required) :param str zap_trace_span: OpenTracing span context :return: Authorization If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_authorizations_prepare(authorization_post_request, **kwargs) + self._post_authorizations_prepare(authorization_post_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/authorizations', 'POST', diff --git a/influxdb_client/service/backup_service.py b/influxdb_client/service/backup_service.py index 324dbca3..0bc520c9 100644 --- a/influxdb_client/service/backup_service.py +++ b/influxdb_client/service/backup_service.py @@ -30,8 +30,9 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 super().__init__(api_client) def get_backup_kv(self, **kwargs): # noqa: E501,D401,D403 - """Download snapshot of metadata stored in the server's embedded KV store. Should not be used in versions greater than 2.1.x, as it doesn't include metadata stored in embedded SQL.. + """Download snapshot of metadata stored in the server's embedded KV store. Don't use with InfluxDB versions greater than InfluxDB 2.1.x.. + Retrieves a snapshot of metadata stored in the server's embedded KV store. InfluxDB versions greater than 2.1.x don't include metadata stored in embedded SQL; avoid using this endpoint with versions greater than 2.1.x. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_backup_kv(async_req=True) @@ -51,8 +52,9 @@ def get_backup_kv(self, **kwargs): # noqa: E501,D401,D403 return data def get_backup_kv_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Download snapshot of metadata stored in the server's embedded KV store. Should not be used in versions greater than 2.1.x, as it doesn't include metadata stored in embedded SQL.. + """Download snapshot of metadata stored in the server's embedded KV store. Don't use with InfluxDB versions greater than InfluxDB 2.1.x.. + Retrieves a snapshot of metadata stored in the server's embedded KV store. InfluxDB versions greater than 2.1.x don't include metadata stored in embedded SQL; avoid using this endpoint with versions greater than 2.1.x. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_backup_kv_with_http_info(async_req=True) @@ -65,7 +67,7 @@ def get_backup_kv_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_backup_kv_prepare(**kwargs) + self._get_backup_kv_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/backup/kv', 'GET', @@ -85,8 +87,9 @@ def get_backup_kv_with_http_info(self, **kwargs): # noqa: E501,D401,D403 urlopen_kw=kwargs.get('urlopen_kw', None)) async def get_backup_kv_async(self, **kwargs): # noqa: E501,D401,D403 - """Download snapshot of metadata stored in the server's embedded KV store. Should not be used in versions greater than 2.1.x, as it doesn't include metadata stored in embedded SQL.. + """Download snapshot of metadata stored in the server's embedded KV store. Don't use with InfluxDB versions greater than InfluxDB 2.1.x.. + Retrieves a snapshot of metadata stored in the server's embedded KV store. InfluxDB versions greater than 2.1.x don't include metadata stored in embedded SQL; avoid using this endpoint with versions greater than 2.1.x. This method makes an asynchronous HTTP request. :param async_req bool @@ -96,7 +99,7 @@ async def get_backup_kv_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_backup_kv_prepare(**kwargs) + self._get_backup_kv_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/backup/kv', 'GET', @@ -174,7 +177,7 @@ def get_backup_metadata_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_backup_metadata_prepare(**kwargs) + self._get_backup_metadata_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/backup/metadata', 'GET', @@ -206,7 +209,7 @@ async def get_backup_metadata_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_backup_metadata_prepare(**kwargs) + self._get_backup_metadata_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/backup/metadata', 'GET', @@ -260,7 +263,7 @@ def get_backup_shard_id(self, shard_id, **kwargs): # noqa: E501,D401,D403 :param int shard_id: The shard ID. (required) :param str zap_trace_span: OpenTracing span context :param str accept_encoding: Indicates the content encoding (usually a compression algorithm) that the client can understand. - :param datetime since: Earliest time to include in the snapshot. RFC3339 format. + :param datetime since: The earliest time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp) to include in the snapshot. :return: file If the method is called asynchronously, returns the request thread. @@ -284,13 +287,13 @@ def get_backup_shard_id_with_http_info(self, shard_id, **kwargs): # noqa: E501, :param int shard_id: The shard ID. (required) :param str zap_trace_span: OpenTracing span context :param str accept_encoding: Indicates the content encoding (usually a compression algorithm) that the client can understand. - :param datetime since: Earliest time to include in the snapshot. RFC3339 format. + :param datetime since: The earliest time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp) to include in the snapshot. :return: file If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_backup_shard_id_prepare(shard_id, **kwargs) + self._get_backup_shard_id_prepare(shard_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/backup/shards/{shardID}', 'GET', @@ -318,13 +321,13 @@ async def get_backup_shard_id_async(self, shard_id, **kwargs): # noqa: E501,D40 :param int shard_id: The shard ID. (required) :param str zap_trace_span: OpenTracing span context :param str accept_encoding: Indicates the content encoding (usually a compression algorithm) that the client can understand. - :param datetime since: Earliest time to include in the snapshot. RFC3339 format. + :param datetime since: The earliest time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp) to include in the snapshot. :return: file If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_backup_shard_id_prepare(shard_id, **kwargs) + self._get_backup_shard_id_prepare(shard_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/backup/shards/{shardID}', 'GET', diff --git a/influxdb_client/service/buckets_service.py b/influxdb_client/service/buckets_service.py index 1232f0c1..05cf0e1f 100644 --- a/influxdb_client/service/buckets_service.py +++ b/influxdb_client/service/buckets_service.py @@ -32,13 +32,14 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 def delete_buckets_id(self, bucket_id, **kwargs): # noqa: E501,D401,D403 """Delete a bucket. + Deletes a bucket and all associated records. #### 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 bucket can be deleted per request. #### Related Guides - [Delete a bucket](https://docs.influxdata.com/influxdb/latest/organizations/buckets/delete-bucket/#delete-a-bucket-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.delete_buckets_id(bucket_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str bucket_id: The ID of the bucket to delete. (required) + :param str bucket_id: Bucket ID. The ID of the bucket to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, @@ -54,20 +55,21 @@ def delete_buckets_id(self, bucket_id, **kwargs): # noqa: E501,D401,D403 def delete_buckets_id_with_http_info(self, bucket_id, **kwargs): # noqa: E501,D401,D403 """Delete a bucket. + Deletes a bucket and all associated records. #### 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 bucket can be deleted per request. #### Related Guides - [Delete a bucket](https://docs.influxdata.com/influxdb/latest/organizations/buckets/delete-bucket/#delete-a-bucket-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.delete_buckets_id_with_http_info(bucket_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str bucket_id: The ID of the bucket to delete. (required) + :param str bucket_id: Bucket ID. The ID of the bucket to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_buckets_id_prepare(bucket_id, **kwargs) + self._delete_buckets_id_prepare(bucket_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/buckets/{bucketID}', 'DELETE', @@ -89,17 +91,18 @@ def delete_buckets_id_with_http_info(self, bucket_id, **kwargs): # noqa: E501,D async def delete_buckets_id_async(self, bucket_id, **kwargs): # noqa: E501,D401,D403 """Delete a bucket. + Deletes a bucket and all associated records. #### 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 bucket can be deleted per request. #### Related Guides - [Delete a bucket](https://docs.influxdata.com/influxdb/latest/organizations/buckets/delete-bucket/#delete-a-bucket-in-the-influxdb-ui) This method makes an asynchronous HTTP request. :param async_req bool - :param str bucket_id: The ID of the bucket to delete. (required) + :param str bucket_id: Bucket ID. The ID of the bucket to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_buckets_id_prepare(bucket_id, **kwargs) + self._delete_buckets_id_prepare(bucket_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/buckets/{bucketID}', 'DELETE', @@ -185,7 +188,7 @@ def delete_buckets_id_labels_id_with_http_info(self, bucket_id, label_id, **kwar returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_buckets_id_labels_id_prepare(bucket_id, label_id, **kwargs) + self._delete_buckets_id_labels_id_prepare(bucket_id, label_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/buckets/{bucketID}/labels/{labelID}', 'DELETE', @@ -218,7 +221,7 @@ async def delete_buckets_id_labels_id_async(self, bucket_id, label_id, **kwargs) returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_buckets_id_labels_id_prepare(bucket_id, label_id, **kwargs) + self._delete_buckets_id_labels_id_prepare(bucket_id, label_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/buckets/{bucketID}/labels/{labelID}', 'DELETE', @@ -273,14 +276,15 @@ def _delete_buckets_id_labels_id_prepare(self, bucket_id, label_id, **kwargs): def delete_buckets_id_members_id(self, user_id, bucket_id, **kwargs): # noqa: E501,D401,D403 """Remove a member from a bucket. + Removes a member from a bucket. Use this endpoint to remove a user's member privileges from a bucket. This removes the user's `read` and `write` permissions for the bucket. #### 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.delete_buckets_id_members_id(user_id, bucket_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 bucket_id: The bucket ID. (required) + :param str user_id: The ID of the user to remove. (required) + :param str bucket_id: The ID of the bucket to remove a user from. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, @@ -296,21 +300,22 @@ def delete_buckets_id_members_id(self, user_id, bucket_id, **kwargs): # noqa: E def delete_buckets_id_members_id_with_http_info(self, user_id, bucket_id, **kwargs): # noqa: E501,D401,D403 """Remove a member from a bucket. + Removes a member from a bucket. Use this endpoint to remove a user's member privileges from a bucket. This removes the user's `read` and `write` permissions for the bucket. #### 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.delete_buckets_id_members_id_with_http_info(user_id, bucket_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 bucket_id: The bucket ID. (required) + :param str user_id: The ID of the user to remove. (required) + :param str bucket_id: The ID of the bucket 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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_buckets_id_members_id_prepare(user_id, bucket_id, **kwargs) + self._delete_buckets_id_members_id_prepare(user_id, bucket_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/buckets/{bucketID}/members/{userID}', 'DELETE', @@ -332,18 +337,19 @@ def delete_buckets_id_members_id_with_http_info(self, user_id, bucket_id, **kwar async def delete_buckets_id_members_id_async(self, user_id, bucket_id, **kwargs): # noqa: E501,D401,D403 """Remove a member from a bucket. + Removes a member from a bucket. Use this endpoint to remove a user's member privileges from a bucket. This removes the user's `read` and `write` permissions for the bucket. #### 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 user_id: The ID of the member to remove. (required) - :param str bucket_id: The bucket ID. (required) + :param str user_id: The ID of the user to remove. (required) + :param str bucket_id: The ID of the bucket 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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_buckets_id_members_id_prepare(user_id, bucket_id, **kwargs) + self._delete_buckets_id_members_id_prepare(user_id, bucket_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/buckets/{bucketID}/members/{userID}', 'DELETE', @@ -398,6 +404,7 @@ def _delete_buckets_id_members_id_prepare(self, user_id, bucket_id, **kwargs): def delete_buckets_id_owners_id(self, user_id, bucket_id, **kwargs): # noqa: E501,D401,D403 """Remove an owner from a bucket. + Removes an owner from a bucket. Use this endpoint to remove a user's `owner` role for a bucket. #### 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)) #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_buckets_id_owners_id(user_id, bucket_id, async_req=True) @@ -405,7 +412,7 @@ def delete_buckets_id_owners_id(self, user_id, bucket_id, **kwargs): # noqa: E5 :param async_req bool :param str user_id: The ID of the owner to remove. (required) - :param str bucket_id: The bucket ID. (required) + :param str bucket_id: The ID of the bucket to remove an owner from. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, @@ -421,6 +428,7 @@ def delete_buckets_id_owners_id(self, user_id, bucket_id, **kwargs): # noqa: E5 def delete_buckets_id_owners_id_with_http_info(self, user_id, bucket_id, **kwargs): # noqa: E501,D401,D403 """Remove an owner from a bucket. + Removes an owner from a bucket. Use this endpoint to remove a user's `owner` role for a bucket. #### 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)) #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_buckets_id_owners_id_with_http_info(user_id, bucket_id, async_req=True) @@ -428,14 +436,14 @@ def delete_buckets_id_owners_id_with_http_info(self, user_id, bucket_id, **kwarg :param async_req bool :param str user_id: The ID of the owner to remove. (required) - :param str bucket_id: The bucket ID. (required) + :param str bucket_id: The ID of the bucket 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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_buckets_id_owners_id_prepare(user_id, bucket_id, **kwargs) + self._delete_buckets_id_owners_id_prepare(user_id, bucket_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/buckets/{bucketID}/owners/{userID}', 'DELETE', @@ -457,18 +465,19 @@ def delete_buckets_id_owners_id_with_http_info(self, user_id, bucket_id, **kwarg async def delete_buckets_id_owners_id_async(self, user_id, bucket_id, **kwargs): # noqa: E501,D401,D403 """Remove an owner from a bucket. + Removes an owner from a bucket. Use this endpoint to remove a user's `owner` role for a bucket. #### 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)) #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) 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 bucket_id: The bucket ID. (required) + :param str bucket_id: The ID of the bucket 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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_buckets_id_owners_id_prepare(user_id, bucket_id, **kwargs) + self._delete_buckets_id_owners_id_prepare(user_id, bucket_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/buckets/{bucketID}/owners/{userID}', 'DELETE', @@ -521,8 +530,9 @@ def _delete_buckets_id_owners_id_prepare(self, user_id, bucket_id, **kwargs): # return local_var_params, path_params, query_params, header_params, body_params def get_buckets(self, **kwargs): # noqa: E501,D401,D403 - """List all buckets. + """List buckets. + Lists [buckets](https://docs.influxdata.com/influxdb/latest/reference/glossary/#bucket). InfluxDB retrieves buckets owned by the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) associated with the authorization ([API token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token)). To limit which buckets are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all buckets up to the default `limit`. #### InfluxDB OSS - If you use an _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_ to authenticate your request, InfluxDB retrieves resources for _all organizations_ in the instance. To retrieve resources for only a specific organization, use the `org` parameter or the `orgID` parameter to specify the organization. #### Required permissions | Action | Permission required | |:--------------------------|:--------------------| | Retrieve _user buckets_ | `read-buckets` | | Retrieve [_system buckets_](https://docs.influxdata.com/influxdb/latest/reference/internals/system-buckets/) | `read-orgs` | #### Related Guides - [Manage buckets](https://docs.influxdata.com/influxdb/latest/organizations/buckets/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_buckets(async_req=True) @@ -530,13 +540,13 @@ def get_buckets(self, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: - :param str after: Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. - :param str org: The name of the organization. - :param str org_id: The organization ID. - :param str name: Only returns buckets with a specific name. - :param str id: Only returns buckets with a specific ID. + :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 str after: A resource ID to seek from. Returns records created after the specified record; results don't include the specified record. Use `after` instead of the `offset` parameter. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). + :param str org: An organization name. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Lists buckets for the organization associated with the authorization (API token). #### InfluxDB OSS - Lists buckets for the specified organization. + :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Lists buckets for the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Lists buckets for the specified organization. + :param str name: A bucket name. Only returns buckets with the specified name. + :param str id: A bucket ID. Only returns the bucket with the specified ID. :return: Buckets If the method is called asynchronously, returns the request thread. @@ -549,8 +559,9 @@ def get_buckets(self, **kwargs): # noqa: E501,D401,D403 return data def get_buckets_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List all buckets. + """List buckets. + Lists [buckets](https://docs.influxdata.com/influxdb/latest/reference/glossary/#bucket). InfluxDB retrieves buckets owned by the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) associated with the authorization ([API token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token)). To limit which buckets are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all buckets up to the default `limit`. #### InfluxDB OSS - If you use an _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_ to authenticate your request, InfluxDB retrieves resources for _all organizations_ in the instance. To retrieve resources for only a specific organization, use the `org` parameter or the `orgID` parameter to specify the organization. #### Required permissions | Action | Permission required | |:--------------------------|:--------------------| | Retrieve _user buckets_ | `read-buckets` | | Retrieve [_system buckets_](https://docs.influxdata.com/influxdb/latest/reference/internals/system-buckets/) | `read-orgs` | #### Related Guides - [Manage buckets](https://docs.influxdata.com/influxdb/latest/organizations/buckets/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_buckets_with_http_info(async_req=True) @@ -558,19 +569,19 @@ def get_buckets_with_http_info(self, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: - :param str after: Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. - :param str org: The name of the organization. - :param str org_id: The organization ID. - :param str name: Only returns buckets with a specific name. - :param str id: Only returns buckets with a specific ID. + :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 str after: A resource ID to seek from. Returns records created after the specified record; results don't include the specified record. Use `after` instead of the `offset` parameter. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). + :param str org: An organization name. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Lists buckets for the organization associated with the authorization (API token). #### InfluxDB OSS - Lists buckets for the specified organization. + :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Lists buckets for the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Lists buckets for the specified organization. + :param str name: A bucket name. Only returns buckets with the specified name. + :param str id: A bucket ID. Only returns the bucket with the specified ID. :return: Buckets If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_buckets_prepare(**kwargs) + self._get_buckets_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/buckets', 'GET', @@ -590,25 +601,26 @@ def get_buckets_with_http_info(self, **kwargs): # noqa: E501,D401,D403 urlopen_kw=kwargs.get('urlopen_kw', None)) async def get_buckets_async(self, **kwargs): # noqa: E501,D401,D403 - """List all buckets. + """List buckets. + Lists [buckets](https://docs.influxdata.com/influxdb/latest/reference/glossary/#bucket). InfluxDB retrieves buckets owned by the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) associated with the authorization ([API token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token)). To limit which buckets are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all buckets up to the default `limit`. #### InfluxDB OSS - If you use an _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_ to authenticate your request, InfluxDB retrieves resources for _all organizations_ in the instance. To retrieve resources for only a specific organization, use the `org` parameter or the `orgID` parameter to specify the organization. #### Required permissions | Action | Permission required | |:--------------------------|:--------------------| | Retrieve _user buckets_ | `read-buckets` | | Retrieve [_system buckets_](https://docs.influxdata.com/influxdb/latest/reference/internals/system-buckets/) | `read-orgs` | #### Related Guides - [Manage buckets](https://docs.influxdata.com/influxdb/latest/organizations/buckets/) This method makes an asynchronous HTTP request. :param async_req bool :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: - :param str after: Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. - :param str org: The name of the organization. - :param str org_id: The organization ID. - :param str name: Only returns buckets with a specific name. - :param str id: Only returns buckets with a specific ID. + :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 str after: A resource ID to seek from. Returns records created after the specified record; results don't include the specified record. Use `after` instead of the `offset` parameter. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). + :param str org: An organization name. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Lists buckets for the organization associated with the authorization (API token). #### InfluxDB OSS - Lists buckets for the specified organization. + :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Lists buckets for the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Lists buckets for the specified organization. + :param str name: A bucket name. Only returns buckets with the specified name. + :param str id: A bucket ID. Only returns the bucket with the specified ID. :return: Buckets If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_buckets_prepare(**kwargs) + self._get_buckets_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/buckets', 'GET', @@ -671,13 +683,14 @@ def _get_buckets_prepare(self, **kwargs): # noqa: E501,D401,D403 def get_buckets_id(self, bucket_id, **kwargs): # noqa: E501,D401,D403 """Retrieve a bucket. + Retrieves a bucket. Use this endpoint to retrieve information for a specific bucket. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_buckets_id(bucket_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str bucket_id: The bucket ID. (required) + :param str bucket_id: The ID of the bucket to retrieve. (required) :param str zap_trace_span: OpenTracing span context :return: Bucket If the method is called asynchronously, @@ -693,20 +706,21 @@ def get_buckets_id(self, bucket_id, **kwargs): # noqa: E501,D401,D403 def get_buckets_id_with_http_info(self, bucket_id, **kwargs): # noqa: E501,D401,D403 """Retrieve a bucket. + Retrieves a bucket. Use this endpoint to retrieve information for a specific bucket. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_buckets_id_with_http_info(bucket_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str bucket_id: The bucket ID. (required) + :param str bucket_id: The ID of the bucket to retrieve. (required) :param str zap_trace_span: OpenTracing span context :return: Bucket If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_buckets_id_prepare(bucket_id, **kwargs) + self._get_buckets_id_prepare(bucket_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/buckets/{bucketID}', 'GET', @@ -728,17 +742,18 @@ def get_buckets_id_with_http_info(self, bucket_id, **kwargs): # noqa: E501,D401 async def get_buckets_id_async(self, bucket_id, **kwargs): # noqa: E501,D401,D403 """Retrieve a bucket. + Retrieves a bucket. Use this endpoint to retrieve information for a specific bucket. This method makes an asynchronous HTTP request. :param async_req bool - :param str bucket_id: The bucket ID. (required) + :param str bucket_id: The ID of the bucket to retrieve. (required) :param str zap_trace_span: OpenTracing span context :return: Bucket If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_buckets_id_prepare(bucket_id, **kwargs) + self._get_buckets_id_prepare(bucket_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/buckets/{bucketID}', 'GET', @@ -787,13 +802,14 @@ def _get_buckets_id_prepare(self, bucket_id, **kwargs): # noqa: E501,D401,D403 def get_buckets_id_labels(self, bucket_id, **kwargs): # noqa: E501,D401,D403 """List all labels for a bucket. + Lists all labels for a bucket. Labels are objects that contain `labelID`, `name`, `description`, and `color` key-value pairs. They may be used for grouping and filtering InfluxDB resources. Labels are also capable of grouping across different resources--for example, you can apply a label named `air_sensor` to a bucket and a task to quickly organize resources. #### Related guides - Use the [`/api/v2/labels` InfluxDB API endpoint](#tag/Labels) to retrieve and manage labels. - [Manage labels in the InfluxDB UI](https://docs.influxdata.com/influxdb/latest/visualize-data/labels/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_buckets_id_labels(bucket_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str bucket_id: The bucket ID. (required) + :param str bucket_id: The ID of the bucket to retrieve labels for. (required) :param str zap_trace_span: OpenTracing span context :return: LabelsResponse If the method is called asynchronously, @@ -809,20 +825,21 @@ def get_buckets_id_labels(self, bucket_id, **kwargs): # noqa: E501,D401,D403 def get_buckets_id_labels_with_http_info(self, bucket_id, **kwargs): # noqa: E501,D401,D403 """List all labels for a bucket. + Lists all labels for a bucket. Labels are objects that contain `labelID`, `name`, `description`, and `color` key-value pairs. They may be used for grouping and filtering InfluxDB resources. Labels are also capable of grouping across different resources--for example, you can apply a label named `air_sensor` to a bucket and a task to quickly organize resources. #### Related guides - Use the [`/api/v2/labels` InfluxDB API endpoint](#tag/Labels) to retrieve and manage labels. - [Manage labels in the InfluxDB UI](https://docs.influxdata.com/influxdb/latest/visualize-data/labels/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_buckets_id_labels_with_http_info(bucket_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str bucket_id: The bucket ID. (required) + :param str bucket_id: The ID of the bucket 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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_buckets_id_labels_prepare(bucket_id, **kwargs) + self._get_buckets_id_labels_prepare(bucket_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/buckets/{bucketID}/labels', 'GET', @@ -844,17 +861,18 @@ def get_buckets_id_labels_with_http_info(self, bucket_id, **kwargs): # noqa: E5 async def get_buckets_id_labels_async(self, bucket_id, **kwargs): # noqa: E501,D401,D403 """List all labels for a bucket. + Lists all labels for a bucket. Labels are objects that contain `labelID`, `name`, `description`, and `color` key-value pairs. They may be used for grouping and filtering InfluxDB resources. Labels are also capable of grouping across different resources--for example, you can apply a label named `air_sensor` to a bucket and a task to quickly organize resources. #### Related guides - Use the [`/api/v2/labels` InfluxDB API endpoint](#tag/Labels) to retrieve and manage labels. - [Manage labels in the InfluxDB UI](https://docs.influxdata.com/influxdb/latest/visualize-data/labels/) This method makes an asynchronous HTTP request. :param async_req bool - :param str bucket_id: The bucket ID. (required) + :param str bucket_id: The ID of the bucket 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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_buckets_id_labels_prepare(bucket_id, **kwargs) + self._get_buckets_id_labels_prepare(bucket_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/buckets/{bucketID}/labels', 'GET', @@ -903,13 +921,14 @@ def _get_buckets_id_labels_prepare(self, bucket_id, **kwargs): # noqa: E501,D40 def get_buckets_id_members(self, bucket_id, **kwargs): # noqa: E501,D401,D403 """List all users with member privileges for a bucket. + Lists all users for a bucket. 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 in an organization with access to the specified resource. Use this endpoint to retrieve all users with access to a bucket. #### 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_buckets_id_members(bucket_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str bucket_id: The bucket ID. (required) + :param str bucket_id: The ID of the bucket to retrieve users for. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceMembers If the method is called asynchronously, @@ -925,20 +944,21 @@ def get_buckets_id_members(self, bucket_id, **kwargs): # noqa: E501,D401,D403 def get_buckets_id_members_with_http_info(self, bucket_id, **kwargs): # noqa: E501,D401,D403 """List all users with member privileges for a bucket. + Lists all users for a bucket. 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 in an organization with access to the specified resource. Use this endpoint to retrieve all users with access to a bucket. #### 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_buckets_id_members_with_http_info(bucket_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str bucket_id: The bucket ID. (required) + :param str bucket_id: The ID of the bucket 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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_buckets_id_members_prepare(bucket_id, **kwargs) + self._get_buckets_id_members_prepare(bucket_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/buckets/{bucketID}/members', 'GET', @@ -960,17 +980,18 @@ def get_buckets_id_members_with_http_info(self, bucket_id, **kwargs): # noqa: E async def get_buckets_id_members_async(self, bucket_id, **kwargs): # noqa: E501,D401,D403 """List all users with member privileges for a bucket. + Lists all users for a bucket. 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 in an organization with access to the specified resource. Use this endpoint to retrieve all users with access to a bucket. #### 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 bucket_id: The bucket ID. (required) + :param str bucket_id: The ID of the bucket 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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_buckets_id_members_prepare(bucket_id, **kwargs) + self._get_buckets_id_members_prepare(bucket_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/buckets/{bucketID}/members', 'GET', @@ -1019,13 +1040,14 @@ def _get_buckets_id_members_prepare(self, bucket_id, **kwargs): # noqa: E501,D4 def get_buckets_id_owners(self, bucket_id, **kwargs): # noqa: E501,D401,D403 """List all owners of a bucket. + Lists all [owners](https://docs.influxdata.com/influxdb/latest/reference/glossary/#owner) of a bucket. Bucket owners have permission to delete buckets and remove user and member permissions from the bucket. #### 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 - `read-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve a list of owners for. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_buckets_id_owners(bucket_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str bucket_id: The bucket ID. (required) + :param str bucket_id: The ID of the bucket to retrieve owners for. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceOwners If the method is called asynchronously, @@ -1041,20 +1063,21 @@ def get_buckets_id_owners(self, bucket_id, **kwargs): # noqa: E501,D401,D403 def get_buckets_id_owners_with_http_info(self, bucket_id, **kwargs): # noqa: E501,D401,D403 """List all owners of a bucket. + Lists all [owners](https://docs.influxdata.com/influxdb/latest/reference/glossary/#owner) of a bucket. Bucket owners have permission to delete buckets and remove user and member permissions from the bucket. #### 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 - `read-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve a list of owners for. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_buckets_id_owners_with_http_info(bucket_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str bucket_id: The bucket ID. (required) + :param str bucket_id: The ID of the bucket 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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_buckets_id_owners_prepare(bucket_id, **kwargs) + self._get_buckets_id_owners_prepare(bucket_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/buckets/{bucketID}/owners', 'GET', @@ -1076,17 +1099,18 @@ def get_buckets_id_owners_with_http_info(self, bucket_id, **kwargs): # noqa: E5 async def get_buckets_id_owners_async(self, bucket_id, **kwargs): # noqa: E501,D401,D403 """List all owners of a bucket. + Lists all [owners](https://docs.influxdata.com/influxdb/latest/reference/glossary/#owner) of a bucket. Bucket owners have permission to delete buckets and remove user and member permissions from the bucket. #### 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 - `read-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve a list of owners for. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) This method makes an asynchronous HTTP request. :param async_req bool - :param str bucket_id: The bucket ID. (required) + :param str bucket_id: The ID of the bucket 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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_buckets_id_owners_prepare(bucket_id, **kwargs) + self._get_buckets_id_owners_prepare(bucket_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/buckets/{bucketID}/owners', 'GET', @@ -1172,7 +1196,7 @@ def get_sources_id_buckets_with_http_info(self, source_id, **kwargs): # noqa: E returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_id_buckets_prepare(source_id, **kwargs) + self._get_sources_id_buckets_prepare(source_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/sources/{sourceID}/buckets', 'GET', @@ -1205,7 +1229,7 @@ async def get_sources_id_buckets_async(self, source_id, **kwargs): # noqa: E501 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_id_buckets_prepare(source_id, **kwargs) + self._get_sources_id_buckets_prepare(source_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/sources/{sourceID}/buckets', 'GET', @@ -1256,6 +1280,7 @@ def _get_sources_id_buckets_prepare(self, source_id, **kwargs): # noqa: E501,D4 def patch_buckets_id(self, bucket_id, patch_bucket_request, **kwargs): # noqa: E501,D401,D403 """Update a bucket. + Updates a bucket. Use this endpoint to update properties (`name`, `description`, and `retentionRules`) of a bucket. #### InfluxDB Cloud - Requires the `retentionRules` property in the request body. If you don't provide `retentionRules`, InfluxDB responds with an HTTP `403` status code. #### InfluxDB OSS - Doesn't require `retentionRules`. #### Related Guides - [Update a bucket](https://docs.influxdata.com/influxdb/latest/organizations/buckets/update-bucket/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_buckets_id(bucket_id, patch_bucket_request, async_req=True) @@ -1263,7 +1288,7 @@ def patch_buckets_id(self, bucket_id, patch_bucket_request, **kwargs): # noqa: :param async_req bool :param str bucket_id: The bucket ID. (required) - :param PatchBucketRequest patch_bucket_request: Bucket update to apply (required) + :param PatchBucketRequest patch_bucket_request: The bucket update to apply. (required) :param str zap_trace_span: OpenTracing span context :return: Bucket If the method is called asynchronously, @@ -1279,6 +1304,7 @@ def patch_buckets_id(self, bucket_id, patch_bucket_request, **kwargs): # noqa: def patch_buckets_id_with_http_info(self, bucket_id, patch_bucket_request, **kwargs): # noqa: E501,D401,D403 """Update a bucket. + Updates a bucket. Use this endpoint to update properties (`name`, `description`, and `retentionRules`) of a bucket. #### InfluxDB Cloud - Requires the `retentionRules` property in the request body. If you don't provide `retentionRules`, InfluxDB responds with an HTTP `403` status code. #### InfluxDB OSS - Doesn't require `retentionRules`. #### Related Guides - [Update a bucket](https://docs.influxdata.com/influxdb/latest/organizations/buckets/update-bucket/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_buckets_id_with_http_info(bucket_id, patch_bucket_request, async_req=True) @@ -1286,14 +1312,14 @@ def patch_buckets_id_with_http_info(self, bucket_id, patch_bucket_request, **kwa :param async_req bool :param str bucket_id: The bucket ID. (required) - :param PatchBucketRequest patch_bucket_request: Bucket update to apply (required) + :param PatchBucketRequest patch_bucket_request: The bucket update to apply. (required) :param str zap_trace_span: OpenTracing span context :return: Bucket If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_buckets_id_prepare(bucket_id, patch_bucket_request, **kwargs) + self._patch_buckets_id_prepare(bucket_id, patch_bucket_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/buckets/{bucketID}', 'PATCH', @@ -1315,18 +1341,19 @@ def patch_buckets_id_with_http_info(self, bucket_id, patch_bucket_request, **kwa async def patch_buckets_id_async(self, bucket_id, patch_bucket_request, **kwargs): # noqa: E501,D401,D403 """Update a bucket. + Updates a bucket. Use this endpoint to update properties (`name`, `description`, and `retentionRules`) of a bucket. #### InfluxDB Cloud - Requires the `retentionRules` property in the request body. If you don't provide `retentionRules`, InfluxDB responds with an HTTP `403` status code. #### InfluxDB OSS - Doesn't require `retentionRules`. #### Related Guides - [Update a bucket](https://docs.influxdata.com/influxdb/latest/organizations/buckets/update-bucket/) This method makes an asynchronous HTTP request. :param async_req bool :param str bucket_id: The bucket ID. (required) - :param PatchBucketRequest patch_bucket_request: Bucket update to apply (required) + :param PatchBucketRequest patch_bucket_request: The bucket update to apply. (required) :param str zap_trace_span: OpenTracing span context :return: Bucket If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_buckets_id_prepare(bucket_id, patch_bucket_request, **kwargs) + self._patch_buckets_id_prepare(bucket_id, patch_bucket_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/buckets/{bucketID}', 'PATCH', @@ -1385,13 +1412,14 @@ def _patch_buckets_id_prepare(self, bucket_id, patch_bucket_request, **kwargs): def post_buckets(self, post_bucket_request, **kwargs): # noqa: E501,D401,D403 """Create a bucket. + Creates a [bucket](https://docs.influxdata.com/influxdb/latest/reference/glossary/#bucket) and returns the bucket resource. The default data [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period) is 30 days. #### InfluxDB OSS - A single InfluxDB OSS instance supports active writes or queries for approximately 20 buckets across all organizations at a given time. Reading or writing to more than 20 buckets at a time can adversely affect performance. #### Limitations - InfluxDB Cloud Free Plan allows users to create up to two buckets. Exceeding the bucket quota will result in an HTTP `403` status code. For additional information regarding InfluxDB Cloud offerings, see [InfluxDB Cloud Pricing](https://www.influxdata.com/influxdb-cloud-pricing/). #### Related Guides - [Create a bucket](https://docs.influxdata.com/influxdb/latest/organizations/buckets/create-bucket/) - [Create bucket CLI reference](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/bucket/create) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_buckets(post_bucket_request, async_req=True) >>> result = thread.get() :param async_req bool - :param PostBucketRequest post_bucket_request: Bucket to create (required) + :param PostBucketRequest post_bucket_request: The bucket to create. (required) :param str zap_trace_span: OpenTracing span context :return: Bucket If the method is called asynchronously, @@ -1407,20 +1435,21 @@ def post_buckets(self, post_bucket_request, **kwargs): # noqa: E501,D401,D403 def post_buckets_with_http_info(self, post_bucket_request, **kwargs): # noqa: E501,D401,D403 """Create a bucket. + Creates a [bucket](https://docs.influxdata.com/influxdb/latest/reference/glossary/#bucket) and returns the bucket resource. The default data [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period) is 30 days. #### InfluxDB OSS - A single InfluxDB OSS instance supports active writes or queries for approximately 20 buckets across all organizations at a given time. Reading or writing to more than 20 buckets at a time can adversely affect performance. #### Limitations - InfluxDB Cloud Free Plan allows users to create up to two buckets. Exceeding the bucket quota will result in an HTTP `403` status code. For additional information regarding InfluxDB Cloud offerings, see [InfluxDB Cloud Pricing](https://www.influxdata.com/influxdb-cloud-pricing/). #### Related Guides - [Create a bucket](https://docs.influxdata.com/influxdb/latest/organizations/buckets/create-bucket/) - [Create bucket CLI reference](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/bucket/create) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_buckets_with_http_info(post_bucket_request, async_req=True) >>> result = thread.get() :param async_req bool - :param PostBucketRequest post_bucket_request: Bucket to create (required) + :param PostBucketRequest post_bucket_request: The bucket to create. (required) :param str zap_trace_span: OpenTracing span context :return: Bucket If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_buckets_prepare(post_bucket_request, **kwargs) + self._post_buckets_prepare(post_bucket_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/buckets', 'POST', @@ -1442,17 +1471,18 @@ def post_buckets_with_http_info(self, post_bucket_request, **kwargs): # noqa: E async def post_buckets_async(self, post_bucket_request, **kwargs): # noqa: E501,D401,D403 """Create a bucket. + Creates a [bucket](https://docs.influxdata.com/influxdb/latest/reference/glossary/#bucket) and returns the bucket resource. The default data [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period) is 30 days. #### InfluxDB OSS - A single InfluxDB OSS instance supports active writes or queries for approximately 20 buckets across all organizations at a given time. Reading or writing to more than 20 buckets at a time can adversely affect performance. #### Limitations - InfluxDB Cloud Free Plan allows users to create up to two buckets. Exceeding the bucket quota will result in an HTTP `403` status code. For additional information regarding InfluxDB Cloud offerings, see [InfluxDB Cloud Pricing](https://www.influxdata.com/influxdb-cloud-pricing/). #### Related Guides - [Create a bucket](https://docs.influxdata.com/influxdb/latest/organizations/buckets/create-bucket/) - [Create bucket CLI reference](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/bucket/create) This method makes an asynchronous HTTP request. :param async_req bool - :param PostBucketRequest post_bucket_request: Bucket to create (required) + :param PostBucketRequest post_bucket_request: The bucket to create. (required) :param str zap_trace_span: OpenTracing span context :return: Bucket If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_buckets_prepare(post_bucket_request, **kwargs) + self._post_buckets_prepare(post_bucket_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/buckets', 'POST', @@ -1505,14 +1535,15 @@ def _post_buckets_prepare(self, post_bucket_request, **kwargs): # noqa: E501,D4 def post_buckets_id_labels(self, bucket_id, label_mapping, **kwargs): # noqa: E501,D401,D403 """Add a label to a bucket. + Adds a label to a bucket and returns the new label information. Labels are objects that contain `labelID`, `name`, `description`, and `color` key-value pairs. They may be used for grouping and filtering across one or more kinds of **resources**--for example, you can apply a label named `air_sensor` to a bucket and a task to quickly organize resources. #### Limitations - Before adding a label to a bucket, you must create the label if you haven't already. To create a label with the InfluxDB API, send a `POST` request to the [`/api/v2/labels` endpoint](#operation/PostLabels)). #### Related guides - Use the [`/api/v2/labels` InfluxDB API endpoint](#tag/Labels) to retrieve and manage labels. - [Manage labels in the InfluxDB UI](https://docs.influxdata.com/influxdb/latest/visualize-data/labels/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_buckets_id_labels(bucket_id, label_mapping, async_req=True) >>> result = thread.get() :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param LabelMapping label_mapping: Label to add (required) + :param str bucket_id: Bucket ID. The ID of the bucket to label. (required) + :param LabelMapping label_mapping: An object that contains a _`labelID`_ to add to the bucket. (required) :param str zap_trace_span: OpenTracing span context :return: LabelResponse If the method is called asynchronously, @@ -1528,21 +1559,22 @@ def post_buckets_id_labels(self, bucket_id, label_mapping, **kwargs): # noqa: E def post_buckets_id_labels_with_http_info(self, bucket_id, label_mapping, **kwargs): # noqa: E501,D401,D403 """Add a label to a bucket. + Adds a label to a bucket and returns the new label information. Labels are objects that contain `labelID`, `name`, `description`, and `color` key-value pairs. They may be used for grouping and filtering across one or more kinds of **resources**--for example, you can apply a label named `air_sensor` to a bucket and a task to quickly organize resources. #### Limitations - Before adding a label to a bucket, you must create the label if you haven't already. To create a label with the InfluxDB API, send a `POST` request to the [`/api/v2/labels` endpoint](#operation/PostLabels)). #### Related guides - Use the [`/api/v2/labels` InfluxDB API endpoint](#tag/Labels) to retrieve and manage labels. - [Manage labels in the InfluxDB UI](https://docs.influxdata.com/influxdb/latest/visualize-data/labels/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_buckets_id_labels_with_http_info(bucket_id, label_mapping, async_req=True) >>> result = thread.get() :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param LabelMapping label_mapping: Label to add (required) + :param str bucket_id: Bucket ID. The ID of the bucket to label. (required) + :param LabelMapping label_mapping: An object that contains a _`labelID`_ to add to the bucket. (required) :param str zap_trace_span: OpenTracing span context :return: LabelResponse If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_buckets_id_labels_prepare(bucket_id, label_mapping, **kwargs) + self._post_buckets_id_labels_prepare(bucket_id, label_mapping, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/buckets/{bucketID}/labels', 'POST', @@ -1564,18 +1596,19 @@ def post_buckets_id_labels_with_http_info(self, bucket_id, label_mapping, **kwar async def post_buckets_id_labels_async(self, bucket_id, label_mapping, **kwargs): # noqa: E501,D401,D403 """Add a label to a bucket. + Adds a label to a bucket and returns the new label information. Labels are objects that contain `labelID`, `name`, `description`, and `color` key-value pairs. They may be used for grouping and filtering across one or more kinds of **resources**--for example, you can apply a label named `air_sensor` to a bucket and a task to quickly organize resources. #### Limitations - Before adding a label to a bucket, you must create the label if you haven't already. To create a label with the InfluxDB API, send a `POST` request to the [`/api/v2/labels` endpoint](#operation/PostLabels)). #### Related guides - Use the [`/api/v2/labels` InfluxDB API endpoint](#tag/Labels) to retrieve and manage labels. - [Manage labels in the InfluxDB UI](https://docs.influxdata.com/influxdb/latest/visualize-data/labels/) This method makes an asynchronous HTTP request. :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param LabelMapping label_mapping: Label to add (required) + :param str bucket_id: Bucket ID. The ID of the bucket to label. (required) + :param LabelMapping label_mapping: An object that contains a _`labelID`_ to add to the bucket. (required) :param str zap_trace_span: OpenTracing span context :return: LabelResponse If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_buckets_id_labels_prepare(bucket_id, label_mapping, **kwargs) + self._post_buckets_id_labels_prepare(bucket_id, label_mapping, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/buckets/{bucketID}/labels', 'POST', @@ -1634,14 +1667,15 @@ def _post_buckets_id_labels_prepare(self, bucket_id, label_mapping, **kwargs): def post_buckets_id_members(self, bucket_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 """Add a member to a bucket. + Add a user to a bucket and return the new user information. 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 in an organization. Use this endpoint to give a user member privileges to a bucket. #### 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_buckets_id_members(bucket_id, add_resource_member_request_body, async_req=True) >>> result = thread.get() :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (required) + :param str bucket_id: The ID of the bucket to retrieve users for. (required) + :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as a member to the bucket. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceMember If the method is called asynchronously, @@ -1657,21 +1691,22 @@ def post_buckets_id_members(self, bucket_id, add_resource_member_request_body, * def post_buckets_id_members_with_http_info(self, bucket_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 """Add a member to a bucket. + Add a user to a bucket and return the new user information. 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 in an organization. Use this endpoint to give a user member privileges to a bucket. #### 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_buckets_id_members_with_http_info(bucket_id, add_resource_member_request_body, async_req=True) >>> result = thread.get() :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (required) + :param str bucket_id: The ID of the bucket to retrieve users for. (required) + :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as a member to the bucket. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceMember If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_buckets_id_members_prepare(bucket_id, add_resource_member_request_body, **kwargs) + self._post_buckets_id_members_prepare(bucket_id, add_resource_member_request_body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/buckets/{bucketID}/members', 'POST', @@ -1693,18 +1728,19 @@ def post_buckets_id_members_with_http_info(self, bucket_id, add_resource_member_ async def post_buckets_id_members_async(self, bucket_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 """Add a member to a bucket. + Add a user to a bucket and return the new user information. 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 in an organization. Use this endpoint to give a user member privileges to a bucket. #### 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 bucket_id: The bucket ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (required) + :param str bucket_id: The ID of the bucket to retrieve users for. (required) + :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as a member to the bucket. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceMember If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_buckets_id_members_prepare(bucket_id, add_resource_member_request_body, **kwargs) + self._post_buckets_id_members_prepare(bucket_id, add_resource_member_request_body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/buckets/{bucketID}/members', 'POST', @@ -1763,14 +1799,15 @@ def _post_buckets_id_members_prepare(self, bucket_id, add_resource_member_reques def post_buckets_id_owners(self, bucket_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 """Add an owner to a bucket. + Adds an owner to a bucket and returns the [owners](https://docs.influxdata.com/influxdb/latest/reference/glossary/#owner) with role and user detail. Use this endpoint to create a _resource owner_ for the bucket. Bucket owners have permission to delete buckets and remove user and member permissions from the bucket. #### 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 add an owner for. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_buckets_id_owners(bucket_id, add_resource_member_request_body, async_req=True) >>> result = thread.get() :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (required) + :param str bucket_id: The ID of the bucket to add an owner for. (required) + :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as an owner for the bucket. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceOwner If the method is called asynchronously, @@ -1786,21 +1823,22 @@ def post_buckets_id_owners(self, bucket_id, add_resource_member_request_body, ** def post_buckets_id_owners_with_http_info(self, bucket_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 """Add an owner to a bucket. + Adds an owner to a bucket and returns the [owners](https://docs.influxdata.com/influxdb/latest/reference/glossary/#owner) with role and user detail. Use this endpoint to create a _resource owner_ for the bucket. Bucket owners have permission to delete buckets and remove user and member permissions from the bucket. #### 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 add an owner for. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_buckets_id_owners_with_http_info(bucket_id, add_resource_member_request_body, async_req=True) >>> result = thread.get() :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (required) + :param str bucket_id: The ID of the bucket to add an owner for. (required) + :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as an owner for the bucket. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceOwner If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_buckets_id_owners_prepare(bucket_id, add_resource_member_request_body, **kwargs) + self._post_buckets_id_owners_prepare(bucket_id, add_resource_member_request_body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/buckets/{bucketID}/owners', 'POST', @@ -1822,18 +1860,19 @@ def post_buckets_id_owners_with_http_info(self, bucket_id, add_resource_member_r async def post_buckets_id_owners_async(self, bucket_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 """Add an owner to a bucket. + Adds an owner to a bucket and returns the [owners](https://docs.influxdata.com/influxdb/latest/reference/glossary/#owner) with role and user detail. Use this endpoint to create a _resource owner_ for the bucket. Bucket owners have permission to delete buckets and remove user and member permissions from the bucket. #### 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 add an owner for. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) This method makes an asynchronous HTTP request. :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (required) + :param str bucket_id: The ID of the bucket to add an owner for. (required) + :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as an owner for the bucket. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceOwner If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_buckets_id_owners_prepare(bucket_id, add_resource_member_request_body, **kwargs) + self._post_buckets_id_owners_prepare(bucket_id, add_resource_member_request_body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/buckets/{bucketID}/owners', 'POST', diff --git a/influxdb_client/service/cells_service.py b/influxdb_client/service/cells_service.py index 6a1ae8ce..13c811b5 100644 --- a/influxdb_client/service/cells_service.py +++ b/influxdb_client/service/cells_service.py @@ -69,7 +69,7 @@ def delete_dashboards_id_cells_id_with_http_info(self, dashboard_id, cell_id, ** returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_cells_id_prepare(dashboard_id, cell_id, **kwargs) + self._delete_dashboards_id_cells_id_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}', 'DELETE', @@ -102,7 +102,7 @@ async def delete_dashboards_id_cells_id_async(self, dashboard_id, cell_id, **kwa returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_cells_id_prepare(dashboard_id, cell_id, **kwargs) + self._delete_dashboards_id_cells_id_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}', 'DELETE', @@ -194,7 +194,7 @@ def get_dashboards_id_cells_id_view_with_http_info(self, dashboard_id, cell_id, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, **kwargs) + self._get_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'GET', @@ -227,7 +227,7 @@ async def get_dashboards_id_cells_id_view_async(self, dashboard_id, cell_id, **k returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, **kwargs) + self._get_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'GET', @@ -323,7 +323,7 @@ def patch_dashboards_id_cells_id_with_http_info(self, dashboard_id, cell_id, cel returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_prepare(dashboard_id, cell_id, cell_update, **kwargs) + self._patch_dashboards_id_cells_id_prepare(dashboard_id, cell_id, cell_update, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}', 'PATCH', @@ -358,7 +358,7 @@ async def patch_dashboards_id_cells_id_async(self, dashboard_id, cell_id, cell_u returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_prepare(dashboard_id, cell_id, cell_update, **kwargs) + self._patch_dashboards_id_cells_id_prepare(dashboard_id, cell_id, cell_update, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}', 'PATCH', @@ -462,7 +462,7 @@ def patch_dashboards_id_cells_id_view_with_http_info(self, dashboard_id, cell_id returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, view, **kwargs) + self._patch_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, view, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'PATCH', @@ -496,7 +496,7 @@ async def patch_dashboards_id_cells_id_view_async(self, dashboard_id, cell_id, v returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, view, **kwargs) + self._patch_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, view, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'PATCH', @@ -598,7 +598,7 @@ def post_dashboards_id_cells_with_http_info(self, dashboard_id, create_cell, **k returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_cells_prepare(dashboard_id, create_cell, **kwargs) + self._post_dashboards_id_cells_prepare(dashboard_id, create_cell, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells', 'POST', @@ -631,7 +631,7 @@ async def post_dashboards_id_cells_async(self, dashboard_id, create_cell, **kwar returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_cells_prepare(dashboard_id, create_cell, **kwargs) + self._post_dashboards_id_cells_prepare(dashboard_id, create_cell, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells', 'POST', @@ -729,7 +729,7 @@ def put_dashboards_id_cells_with_http_info(self, dashboard_id, cell, **kwargs): returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._put_dashboards_id_cells_prepare(dashboard_id, cell, **kwargs) + self._put_dashboards_id_cells_prepare(dashboard_id, cell, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells', 'PUT', @@ -763,7 +763,7 @@ async def put_dashboards_id_cells_async(self, dashboard_id, cell, **kwargs): # returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._put_dashboards_id_cells_prepare(dashboard_id, cell, **kwargs) + self._put_dashboards_id_cells_prepare(dashboard_id, cell, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells', 'PUT', diff --git a/influxdb_client/service/checks_service.py b/influxdb_client/service/checks_service.py index 9af0c361..2c780f35 100644 --- a/influxdb_client/service/checks_service.py +++ b/influxdb_client/service/checks_service.py @@ -65,7 +65,7 @@ def create_check_with_http_info(self, post_check, **kwargs): # noqa: E501,D401, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._create_check_prepare(post_check, **kwargs) + self._create_check_prepare(post_check, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/checks', 'POST', @@ -96,7 +96,7 @@ async def create_check_async(self, post_check, **kwargs): # noqa: E501,D401,D40 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._create_check_prepare(post_check, **kwargs) + self._create_check_prepare(post_check, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/checks', 'POST', @@ -182,7 +182,7 @@ def delete_checks_id_with_http_info(self, check_id, **kwargs): # noqa: E501,D40 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_checks_id_prepare(check_id, **kwargs) + self._delete_checks_id_prepare(check_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/checks/{checkID}', 'DELETE', @@ -214,7 +214,7 @@ async def delete_checks_id_async(self, check_id, **kwargs): # noqa: E501,D401,D returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_checks_id_prepare(check_id, **kwargs) + self._delete_checks_id_prepare(check_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/checks/{checkID}', 'DELETE', @@ -300,7 +300,7 @@ def delete_checks_id_labels_id_with_http_info(self, check_id, label_id, **kwargs returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_checks_id_labels_id_prepare(check_id, label_id, **kwargs) + self._delete_checks_id_labels_id_prepare(check_id, label_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/checks/{checkID}/labels/{labelID}', 'DELETE', @@ -333,7 +333,7 @@ async def delete_checks_id_labels_id_async(self, check_id, label_id, **kwargs): returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_checks_id_labels_id_prepare(check_id, label_id, **kwargs) + self._delete_checks_id_labels_id_prepare(check_id, label_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/checks/{checkID}/labels/{labelID}', 'DELETE', @@ -396,8 +396,8 @@ def get_checks(self, org_id, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str org_id: Only show checks that belong to a specific organization ID. (required) :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: + :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`. :return: Checks If the method is called asynchronously, returns the request thread. @@ -420,14 +420,14 @@ def get_checks_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str org_id: Only show checks that belong to a specific organization ID. (required) :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: + :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`. :return: Checks If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_checks_prepare(org_id, **kwargs) + self._get_checks_prepare(org_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/checks', 'GET', @@ -454,14 +454,14 @@ async def get_checks_async(self, org_id, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str org_id: Only show checks that belong to a specific organization ID. (required) :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: + :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`. :return: Checks If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_checks_prepare(org_id, **kwargs) + self._get_checks_prepare(org_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/checks', 'GET', @@ -555,7 +555,7 @@ def get_checks_id_with_http_info(self, check_id, **kwargs): # noqa: E501,D401,D returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_checks_id_prepare(check_id, **kwargs) + self._get_checks_id_prepare(check_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/checks/{checkID}', 'GET', @@ -587,7 +587,7 @@ async def get_checks_id_async(self, check_id, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_checks_id_prepare(check_id, **kwargs) + self._get_checks_id_prepare(check_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/checks/{checkID}', 'GET', @@ -671,7 +671,7 @@ def get_checks_id_labels_with_http_info(self, check_id, **kwargs): # noqa: E501 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_checks_id_labels_prepare(check_id, **kwargs) + self._get_checks_id_labels_prepare(check_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/checks/{checkID}/labels', 'GET', @@ -703,7 +703,7 @@ async def get_checks_id_labels_async(self, check_id, **kwargs): # noqa: E501,D4 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_checks_id_labels_prepare(check_id, **kwargs) + self._get_checks_id_labels_prepare(check_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/checks/{checkID}/labels', 'GET', @@ -787,7 +787,7 @@ def get_checks_id_query_with_http_info(self, check_id, **kwargs): # noqa: E501, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_checks_id_query_prepare(check_id, **kwargs) + self._get_checks_id_query_prepare(check_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/checks/{checkID}/query', 'GET', @@ -819,7 +819,7 @@ async def get_checks_id_query_async(self, check_id, **kwargs): # noqa: E501,D40 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_checks_id_query_prepare(check_id, **kwargs) + self._get_checks_id_query_prepare(check_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/checks/{checkID}/query', 'GET', @@ -905,7 +905,7 @@ def patch_checks_id_with_http_info(self, check_id, check_patch, **kwargs): # no returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_checks_id_prepare(check_id, check_patch, **kwargs) + self._patch_checks_id_prepare(check_id, check_patch, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/checks/{checkID}', 'PATCH', @@ -938,7 +938,7 @@ async def patch_checks_id_async(self, check_id, check_patch, **kwargs): # noqa: returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_checks_id_prepare(check_id, check_patch, **kwargs) + self._patch_checks_id_prepare(check_id, check_patch, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/checks/{checkID}', 'PATCH', @@ -1034,7 +1034,7 @@ def post_checks_id_labels_with_http_info(self, check_id, label_mapping, **kwargs returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_checks_id_labels_prepare(check_id, label_mapping, **kwargs) + self._post_checks_id_labels_prepare(check_id, label_mapping, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/checks/{checkID}/labels', 'POST', @@ -1067,7 +1067,7 @@ async def post_checks_id_labels_async(self, check_id, label_mapping, **kwargs): returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_checks_id_labels_prepare(check_id, label_mapping, **kwargs) + self._post_checks_id_labels_prepare(check_id, label_mapping, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/checks/{checkID}/labels', 'POST', @@ -1163,7 +1163,7 @@ def put_checks_id_with_http_info(self, check_id, check, **kwargs): # noqa: E501 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._put_checks_id_prepare(check_id, check, **kwargs) + self._put_checks_id_prepare(check_id, check, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/checks/{checkID}', 'PUT', @@ -1196,7 +1196,7 @@ async def put_checks_id_async(self, check_id, check, **kwargs): # noqa: E501,D4 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._put_checks_id_prepare(check_id, check, **kwargs) + self._put_checks_id_prepare(check_id, check, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/checks/{checkID}', 'PUT', diff --git a/influxdb_client/service/config_service.py b/influxdb_client/service/config_service.py index 17c5e6cf..2dd85d67 100644 --- a/influxdb_client/service/config_service.py +++ b/influxdb_client/service/config_service.py @@ -32,7 +32,7 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 def get_config(self, **kwargs): # noqa: E501,D401,D403 """Retrieve runtime configuration. - Returns the active runtime configuration of the InfluxDB instance. In InfluxDB v2.2+, use this endpoint to view your active runtime configuration, including flags and environment variables. #### Related guides - [View your runtime server configuration](https://docs.influxdata.com/influxdb/v2.2/reference/config-options/#view-your-runtime-server-configuration) + Returns the active runtime configuration of the InfluxDB instance. In InfluxDB v2.2+, use this endpoint to view your active runtime configuration, including flags and environment variables. #### Related guides - [View your runtime server configuration](https://docs.influxdata.com/influxdb/latest/reference/config-options/#view-your-runtime-server-configuration) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_config(async_req=True) @@ -54,7 +54,7 @@ def get_config(self, **kwargs): # noqa: E501,D401,D403 def get_config_with_http_info(self, **kwargs): # noqa: E501,D401,D403 """Retrieve runtime configuration. - Returns the active runtime configuration of the InfluxDB instance. In InfluxDB v2.2+, use this endpoint to view your active runtime configuration, including flags and environment variables. #### Related guides - [View your runtime server configuration](https://docs.influxdata.com/influxdb/v2.2/reference/config-options/#view-your-runtime-server-configuration) + Returns the active runtime configuration of the InfluxDB instance. In InfluxDB v2.2+, use this endpoint to view your active runtime configuration, including flags and environment variables. #### Related guides - [View your runtime server configuration](https://docs.influxdata.com/influxdb/latest/reference/config-options/#view-your-runtime-server-configuration) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_config_with_http_info(async_req=True) @@ -67,7 +67,7 @@ def get_config_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_config_prepare(**kwargs) + self._get_config_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/config', 'GET', @@ -89,7 +89,7 @@ def get_config_with_http_info(self, **kwargs): # noqa: E501,D401,D403 async def get_config_async(self, **kwargs): # noqa: E501,D401,D403 """Retrieve runtime configuration. - Returns the active runtime configuration of the InfluxDB instance. In InfluxDB v2.2+, use this endpoint to view your active runtime configuration, including flags and environment variables. #### Related guides - [View your runtime server configuration](https://docs.influxdata.com/influxdb/v2.2/reference/config-options/#view-your-runtime-server-configuration) + Returns the active runtime configuration of the InfluxDB instance. In InfluxDB v2.2+, use this endpoint to view your active runtime configuration, including flags and environment variables. #### Related guides - [View your runtime server configuration](https://docs.influxdata.com/influxdb/latest/reference/config-options/#view-your-runtime-server-configuration) This method makes an asynchronous HTTP request. :param async_req bool @@ -99,7 +99,7 @@ async def get_config_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_config_prepare(**kwargs) + self._get_config_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/config', 'GET', @@ -138,3 +138,113 @@ def _get_config_prepare(self, **kwargs): # noqa: E501,D401,D403 ['application/json']) # noqa: E501 return local_var_params, path_params, query_params, header_params, body_params + + def get_flags(self, **kwargs): # noqa: E501,D401,D403 + """Retrieve feature flags. + + Retrieves the feature flag key-value pairs configured for the InfluxDB instance. _Feature flags_ are configuration options used to develop and test experimental InfluxDB features and are intended for internal use only. This endpoint represents the first step in the following three-step process to configure feature flags: 1. Use [token authentication](#section/Authentication/TokenAuthentication) or a [user session](#tag/Signin) with this endpoint to retrieve feature flags and their values. 2. Follow the instructions to [enable, disable, or override values for feature flags](https://docs.influxdata.com/influxdb/latest/reference/config-options/#feature-flags). 3. **Optional**: To confirm that your change is applied, do one of the following: - Send a request to this endpoint to retrieve the current feature flag values. - Send a request to the [`GET /api/v2/config` endpoint](#operation/GetConfig) to retrieve the current runtime server configuration. #### Related guides - [InfluxDB configuration options](https://docs.influxdata.com/influxdb/latest/reference/config-options/) + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_flags(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str zap_trace_span: OpenTracing span context + :return: dict(str, object) + If the method is called asynchronously, + returns the request thread. + """ # noqa: E501 + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_flags_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_flags_with_http_info(**kwargs) # noqa: E501 + return data + + def get_flags_with_http_info(self, **kwargs): # noqa: E501,D401,D403 + """Retrieve feature flags. + + Retrieves the feature flag key-value pairs configured for the InfluxDB instance. _Feature flags_ are configuration options used to develop and test experimental InfluxDB features and are intended for internal use only. This endpoint represents the first step in the following three-step process to configure feature flags: 1. Use [token authentication](#section/Authentication/TokenAuthentication) or a [user session](#tag/Signin) with this endpoint to retrieve feature flags and their values. 2. Follow the instructions to [enable, disable, or override values for feature flags](https://docs.influxdata.com/influxdb/latest/reference/config-options/#feature-flags). 3. **Optional**: To confirm that your change is applied, do one of the following: - Send a request to this endpoint to retrieve the current feature flag values. - Send a request to the [`GET /api/v2/config` endpoint](#operation/GetConfig) to retrieve the current runtime server configuration. #### Related guides - [InfluxDB configuration options](https://docs.influxdata.com/influxdb/latest/reference/config-options/) + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_flags_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str zap_trace_span: OpenTracing span context + :return: dict(str, object) + If the method is called asynchronously, + returns the request thread. + """ # noqa: E501 + local_var_params, path_params, query_params, header_params, body_params = \ + self._get_flags_prepare(**kwargs) # noqa: E501 + + return self.api_client.call_api( + '/api/v2/flags', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=[], + files={}, + response_type='dict(str, object)', # noqa: E501 + auth_settings=[], + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats={}, + urlopen_kw=kwargs.get('urlopen_kw', None)) + + async def get_flags_async(self, **kwargs): # noqa: E501,D401,D403 + """Retrieve feature flags. + + Retrieves the feature flag key-value pairs configured for the InfluxDB instance. _Feature flags_ are configuration options used to develop and test experimental InfluxDB features and are intended for internal use only. This endpoint represents the first step in the following three-step process to configure feature flags: 1. Use [token authentication](#section/Authentication/TokenAuthentication) or a [user session](#tag/Signin) with this endpoint to retrieve feature flags and their values. 2. Follow the instructions to [enable, disable, or override values for feature flags](https://docs.influxdata.com/influxdb/latest/reference/config-options/#feature-flags). 3. **Optional**: To confirm that your change is applied, do one of the following: - Send a request to this endpoint to retrieve the current feature flag values. - Send a request to the [`GET /api/v2/config` endpoint](#operation/GetConfig) to retrieve the current runtime server configuration. #### Related guides - [InfluxDB configuration options](https://docs.influxdata.com/influxdb/latest/reference/config-options/) + This method makes an asynchronous HTTP request. + + :param async_req bool + :param str zap_trace_span: OpenTracing span context + :return: dict(str, object) + If the method is called asynchronously, + returns the request thread. + """ # noqa: E501 + local_var_params, path_params, query_params, header_params, body_params = \ + self._get_flags_prepare(**kwargs) # noqa: E501 + + return await self.api_client.call_api( + '/api/v2/flags', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=[], + files={}, + response_type='dict(str, object)', # noqa: E501 + auth_settings=[], + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats={}, + urlopen_kw=kwargs.get('urlopen_kw', None)) + + def _get_flags_prepare(self, **kwargs): # noqa: E501,D401,D403 + local_var_params = locals() + + all_params = ['zap_trace_span'] # noqa: E501 + self._check_operation_params('get_flags', all_params, local_var_params) + + path_params = {} + + query_params = [] + + header_params = {} + if 'zap_trace_span' in local_var_params: + header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + return local_var_params, path_params, query_params, header_params, body_params diff --git a/influxdb_client/service/dashboards_service.py b/influxdb_client/service/dashboards_service.py index 4b413de9..801c6c76 100644 --- a/influxdb_client/service/dashboards_service.py +++ b/influxdb_client/service/dashboards_service.py @@ -67,7 +67,7 @@ def delete_dashboards_id_with_http_info(self, dashboard_id, **kwargs): # noqa: returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_prepare(dashboard_id, **kwargs) + self._delete_dashboards_id_prepare(dashboard_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}', 'DELETE', @@ -99,7 +99,7 @@ async def delete_dashboards_id_async(self, dashboard_id, **kwargs): # noqa: E50 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_prepare(dashboard_id, **kwargs) + self._delete_dashboards_id_prepare(dashboard_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}', 'DELETE', @@ -185,7 +185,7 @@ def delete_dashboards_id_cells_id_with_http_info(self, dashboard_id, cell_id, ** returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_cells_id_prepare(dashboard_id, cell_id, **kwargs) + self._delete_dashboards_id_cells_id_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}', 'DELETE', @@ -218,7 +218,7 @@ async def delete_dashboards_id_cells_id_async(self, dashboard_id, cell_id, **kwa returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_cells_id_prepare(dashboard_id, cell_id, **kwargs) + self._delete_dashboards_id_cells_id_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}', 'DELETE', @@ -310,7 +310,7 @@ def delete_dashboards_id_labels_id_with_http_info(self, dashboard_id, label_id, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_labels_id_prepare(dashboard_id, label_id, **kwargs) + self._delete_dashboards_id_labels_id_prepare(dashboard_id, label_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/labels/{labelID}', 'DELETE', @@ -343,7 +343,7 @@ async def delete_dashboards_id_labels_id_async(self, dashboard_id, label_id, **k returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_labels_id_prepare(dashboard_id, label_id, **kwargs) + self._delete_dashboards_id_labels_id_prepare(dashboard_id, label_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/labels/{labelID}', 'DELETE', @@ -435,7 +435,7 @@ def delete_dashboards_id_members_id_with_http_info(self, user_id, dashboard_id, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_members_id_prepare(user_id, dashboard_id, **kwargs) + self._delete_dashboards_id_members_id_prepare(user_id, dashboard_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/members/{userID}', 'DELETE', @@ -468,7 +468,7 @@ async def delete_dashboards_id_members_id_async(self, user_id, dashboard_id, **k returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_members_id_prepare(user_id, dashboard_id, **kwargs) + self._delete_dashboards_id_members_id_prepare(user_id, dashboard_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/members/{userID}', 'DELETE', @@ -560,7 +560,7 @@ def delete_dashboards_id_owners_id_with_http_info(self, user_id, dashboard_id, * returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_owners_id_prepare(user_id, dashboard_id, **kwargs) + self._delete_dashboards_id_owners_id_prepare(user_id, dashboard_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/owners/{userID}', 'DELETE', @@ -593,7 +593,7 @@ async def delete_dashboards_id_owners_id_async(self, user_id, dashboard_id, **kw returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_owners_id_prepare(user_id, dashboard_id, **kwargs) + self._delete_dashboards_id_owners_id_prepare(user_id, dashboard_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/owners/{userID}', 'DELETE', @@ -646,8 +646,9 @@ def _delete_dashboards_id_owners_id_prepare(self, user_id, dashboard_id, **kwarg return local_var_params, path_params, query_params, header_params, body_params def get_dashboards(self, **kwargs): # noqa: E501,D401,D403 - """List all dashboards. + """List dashboards. + Lists [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard). #### Related guides - [Manage dashboards](https://docs.influxdata.com/influxdb/latest/visualize-data/dashboards/). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_dashboards(async_req=True) @@ -655,14 +656,14 @@ def get_dashboards(self, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: + :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 owner: A user identifier. Returns only dashboards where this user has the `owner` role. + :param str owner: A user ID. Only returns [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard) where the specified user has the `owner` role. :param str sort_by: The column to sort by. - :param list[str] id: A list of dashboard identifiers. Returns only the listed dashboards. If both `id` and `owner` are specified, only `id` is used. - :param str org_id: The identifier of the organization. - :param str org: The name of the organization. + :param list[str] id: A list of dashboard IDs. Returns only the specified [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard). If you specify `id` and `owner`, only `id` is used. + :param str org_id: An organization ID. Only returns [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard) that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). + :param str org: An organization name. Only returns [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard) that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). :return: Dashboards If the method is called asynchronously, returns the request thread. @@ -675,8 +676,9 @@ def get_dashboards(self, **kwargs): # noqa: E501,D401,D403 return data def get_dashboards_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List all dashboards. + """List dashboards. + Lists [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard). #### Related guides - [Manage dashboards](https://docs.influxdata.com/influxdb/latest/visualize-data/dashboards/). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_dashboards_with_http_info(async_req=True) @@ -684,20 +686,20 @@ def get_dashboards_with_http_info(self, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: + :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 owner: A user identifier. Returns only dashboards where this user has the `owner` role. + :param str owner: A user ID. Only returns [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard) where the specified user has the `owner` role. :param str sort_by: The column to sort by. - :param list[str] id: A list of dashboard identifiers. Returns only the listed dashboards. If both `id` and `owner` are specified, only `id` is used. - :param str org_id: The identifier of the organization. - :param str org: The name of the organization. + :param list[str] id: A list of dashboard IDs. Returns only the specified [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard). If you specify `id` and `owner`, only `id` is used. + :param str org_id: An organization ID. Only returns [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard) that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). + :param str org: An organization name. Only returns [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard) that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). :return: Dashboards If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_prepare(**kwargs) + self._get_dashboards_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards', 'GET', @@ -717,26 +719,27 @@ def get_dashboards_with_http_info(self, **kwargs): # noqa: E501,D401,D403 urlopen_kw=kwargs.get('urlopen_kw', None)) async def get_dashboards_async(self, **kwargs): # noqa: E501,D401,D403 - """List all dashboards. + """List dashboards. + Lists [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard). #### Related guides - [Manage dashboards](https://docs.influxdata.com/influxdb/latest/visualize-data/dashboards/). This method makes an asynchronous HTTP request. :param async_req bool :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: + :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 owner: A user identifier. Returns only dashboards where this user has the `owner` role. + :param str owner: A user ID. Only returns [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard) where the specified user has the `owner` role. :param str sort_by: The column to sort by. - :param list[str] id: A list of dashboard identifiers. Returns only the listed dashboards. If both `id` and `owner` are specified, only `id` is used. - :param str org_id: The identifier of the organization. - :param str org: The name of the organization. + :param list[str] id: A list of dashboard IDs. Returns only the specified [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard). If you specify `id` and `owner`, only `id` is used. + :param str org_id: An organization ID. Only returns [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard) that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). + :param str org: An organization name. Only returns [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard) that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). :return: Dashboards If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_prepare(**kwargs) + self._get_dashboards_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards', 'GET', @@ -838,7 +841,7 @@ def get_dashboards_id_with_http_info(self, dashboard_id, **kwargs): # noqa: E50 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_prepare(dashboard_id, **kwargs) + self._get_dashboards_id_prepare(dashboard_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}', 'GET', @@ -871,7 +874,7 @@ async def get_dashboards_id_async(self, dashboard_id, **kwargs): # noqa: E501,D returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_prepare(dashboard_id, **kwargs) + self._get_dashboards_id_prepare(dashboard_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}', 'GET', @@ -959,7 +962,7 @@ def get_dashboards_id_cells_id_view_with_http_info(self, dashboard_id, cell_id, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, **kwargs) + self._get_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'GET', @@ -992,7 +995,7 @@ async def get_dashboards_id_cells_id_view_async(self, dashboard_id, cell_id, **k returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, **kwargs) + self._get_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'GET', @@ -1082,7 +1085,7 @@ def get_dashboards_id_labels_with_http_info(self, dashboard_id, **kwargs): # no returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_labels_prepare(dashboard_id, **kwargs) + self._get_dashboards_id_labels_prepare(dashboard_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/labels', 'GET', @@ -1114,7 +1117,7 @@ async def get_dashboards_id_labels_async(self, dashboard_id, **kwargs): # noqa: returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_labels_prepare(dashboard_id, **kwargs) + self._get_dashboards_id_labels_prepare(dashboard_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/labels', 'GET', @@ -1198,7 +1201,7 @@ def get_dashboards_id_members_with_http_info(self, dashboard_id, **kwargs): # n returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_members_prepare(dashboard_id, **kwargs) + self._get_dashboards_id_members_prepare(dashboard_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/members', 'GET', @@ -1230,7 +1233,7 @@ async def get_dashboards_id_members_async(self, dashboard_id, **kwargs): # noqa returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_members_prepare(dashboard_id, **kwargs) + self._get_dashboards_id_members_prepare(dashboard_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/members', 'GET', @@ -1314,7 +1317,7 @@ def get_dashboards_id_owners_with_http_info(self, dashboard_id, **kwargs): # no returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_owners_prepare(dashboard_id, **kwargs) + self._get_dashboards_id_owners_prepare(dashboard_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/owners', 'GET', @@ -1346,7 +1349,7 @@ async def get_dashboards_id_owners_async(self, dashboard_id, **kwargs): # noqa: returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_owners_prepare(dashboard_id, **kwargs) + self._get_dashboards_id_owners_prepare(dashboard_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/owners', 'GET', @@ -1432,7 +1435,7 @@ def patch_dashboards_id_with_http_info(self, dashboard_id, **kwargs): # noqa: E returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_prepare(dashboard_id, **kwargs) + self._patch_dashboards_id_prepare(dashboard_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}', 'PATCH', @@ -1465,7 +1468,7 @@ async def patch_dashboards_id_async(self, dashboard_id, **kwargs): # noqa: E501 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_prepare(dashboard_id, **kwargs) + self._patch_dashboards_id_prepare(dashboard_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}', 'PATCH', @@ -1561,7 +1564,7 @@ def patch_dashboards_id_cells_id_with_http_info(self, dashboard_id, cell_id, cel returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_prepare(dashboard_id, cell_id, cell_update, **kwargs) + self._patch_dashboards_id_cells_id_prepare(dashboard_id, cell_id, cell_update, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}', 'PATCH', @@ -1596,7 +1599,7 @@ async def patch_dashboards_id_cells_id_async(self, dashboard_id, cell_id, cell_u returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_prepare(dashboard_id, cell_id, cell_update, **kwargs) + self._patch_dashboards_id_cells_id_prepare(dashboard_id, cell_id, cell_update, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}', 'PATCH', @@ -1700,7 +1703,7 @@ def patch_dashboards_id_cells_id_view_with_http_info(self, dashboard_id, cell_id returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, view, **kwargs) + self._patch_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, view, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'PATCH', @@ -1734,7 +1737,7 @@ async def patch_dashboards_id_cells_id_view_async(self, dashboard_id, cell_id, v returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, view, **kwargs) + self._patch_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, view, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'PATCH', @@ -1834,7 +1837,7 @@ def post_dashboards_with_http_info(self, create_dashboard_request, **kwargs): # returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_prepare(create_dashboard_request, **kwargs) + self._post_dashboards_prepare(create_dashboard_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards', 'POST', @@ -1866,7 +1869,7 @@ async def post_dashboards_async(self, create_dashboard_request, **kwargs): # no returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_prepare(create_dashboard_request, **kwargs) + self._post_dashboards_prepare(create_dashboard_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards', 'POST', @@ -1956,7 +1959,7 @@ def post_dashboards_id_cells_with_http_info(self, dashboard_id, create_cell, **k returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_cells_prepare(dashboard_id, create_cell, **kwargs) + self._post_dashboards_id_cells_prepare(dashboard_id, create_cell, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells', 'POST', @@ -1989,7 +1992,7 @@ async def post_dashboards_id_cells_async(self, dashboard_id, create_cell, **kwar returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_cells_prepare(dashboard_id, create_cell, **kwargs) + self._post_dashboards_id_cells_prepare(dashboard_id, create_cell, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells', 'POST', @@ -2085,7 +2088,7 @@ def post_dashboards_id_labels_with_http_info(self, dashboard_id, label_mapping, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_labels_prepare(dashboard_id, label_mapping, **kwargs) + self._post_dashboards_id_labels_prepare(dashboard_id, label_mapping, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/labels', 'POST', @@ -2118,7 +2121,7 @@ async def post_dashboards_id_labels_async(self, dashboard_id, label_mapping, **k returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_labels_prepare(dashboard_id, label_mapping, **kwargs) + self._post_dashboards_id_labels_prepare(dashboard_id, label_mapping, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/labels', 'POST', @@ -2214,7 +2217,7 @@ def post_dashboards_id_members_with_http_info(self, dashboard_id, add_resource_m returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_members_prepare(dashboard_id, add_resource_member_request_body, **kwargs) + self._post_dashboards_id_members_prepare(dashboard_id, add_resource_member_request_body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/members', 'POST', @@ -2247,7 +2250,7 @@ async def post_dashboards_id_members_async(self, dashboard_id, add_resource_memb returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_members_prepare(dashboard_id, add_resource_member_request_body, **kwargs) + self._post_dashboards_id_members_prepare(dashboard_id, add_resource_member_request_body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/members', 'POST', @@ -2343,7 +2346,7 @@ def post_dashboards_id_owners_with_http_info(self, dashboard_id, add_resource_me returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_owners_prepare(dashboard_id, add_resource_member_request_body, **kwargs) + self._post_dashboards_id_owners_prepare(dashboard_id, add_resource_member_request_body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/owners', 'POST', @@ -2376,7 +2379,7 @@ async def post_dashboards_id_owners_async(self, dashboard_id, add_resource_membe returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_owners_prepare(dashboard_id, add_resource_member_request_body, **kwargs) + self._post_dashboards_id_owners_prepare(dashboard_id, add_resource_member_request_body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/owners', 'POST', @@ -2474,7 +2477,7 @@ def put_dashboards_id_cells_with_http_info(self, dashboard_id, cell, **kwargs): returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._put_dashboards_id_cells_prepare(dashboard_id, cell, **kwargs) + self._put_dashboards_id_cells_prepare(dashboard_id, cell, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells', 'PUT', @@ -2508,7 +2511,7 @@ async def put_dashboards_id_cells_async(self, dashboard_id, cell, **kwargs): # returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._put_dashboards_id_cells_prepare(dashboard_id, cell, **kwargs) + self._put_dashboards_id_cells_prepare(dashboard_id, cell, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells', 'PUT', diff --git a/influxdb_client/service/dbr_ps_service.py b/influxdb_client/service/dbr_ps_service.py index bc2bb50f..4fb20aef 100644 --- a/influxdb_client/service/dbr_ps_service.py +++ b/influxdb_client/service/dbr_ps_service.py @@ -32,16 +32,17 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 def delete_dbrpid(self, dbrp_id, **kwargs): # noqa: E501,D401,D403 """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: The database retention policy mapping (required) + :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: Specifies the organization ID of the mapping - :param str org: Specifies the organization name of the mapping + :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. @@ -56,22 +57,23 @@ def delete_dbrpid(self, dbrp_id, **kwargs): # noqa: E501,D401,D403 def delete_dbrpid_with_http_info(self, dbrp_id, **kwargs): # noqa: E501,D401,D403 """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_with_http_info(dbrp_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str dbrp_id: The database retention policy mapping (required) + :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: Specifies the organization ID of the mapping - :param str org: Specifies the organization name of the mapping + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dbrpid_prepare(dbrp_id, **kwargs) + self._delete_dbrpid_prepare(dbrp_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dbrps/{dbrpID}', 'DELETE', @@ -93,19 +95,20 @@ def delete_dbrpid_with_http_info(self, dbrp_id, **kwargs): # noqa: E501,D401,D4 async def delete_dbrpid_async(self, dbrp_id, **kwargs): # noqa: E501,D401,D403 """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: The database retention policy mapping (required) + :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: Specifies the organization ID of the mapping - :param str org: Specifies the organization name of the mapping + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dbrpid_prepare(dbrp_id, **kwargs) + self._delete_dbrpid_prepare(dbrp_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dbrps/{dbrpID}', 'DELETE', @@ -158,6 +161,7 @@ def _delete_dbrpid_prepare(self, dbrp_id, **kwargs): # noqa: E501,D401,D403 def get_dbr_ps(self, **kwargs): # noqa: E501,D401,D403 """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(async_req=True) @@ -165,13 +169,13 @@ def get_dbr_ps(self, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str zap_trace_span: OpenTracing span context - :param str org_id: Specifies the organization ID to filter on - :param str org: Specifies the organization name to filter on - :param str id: Specifies the mapping ID to filter on - :param str bucket_id: Specifies the bucket ID to filter on + :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: Specifies the database to filter on - :param str rp: Specifies the retention policy to filter on + :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. @@ -186,6 +190,7 @@ def get_dbr_ps(self, **kwargs): # noqa: E501,D401,D403 def get_dbr_ps_with_http_info(self, **kwargs): # noqa: E501,D401,D403 """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) @@ -193,19 +198,19 @@ def get_dbr_ps_with_http_info(self, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str zap_trace_span: OpenTracing span context - :param str org_id: Specifies the organization ID to filter on - :param str org: Specifies the organization name to filter on - :param str id: Specifies the mapping ID to filter on - :param str bucket_id: Specifies the bucket ID to filter on + :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: Specifies the database to filter on - :param str rp: Specifies the retention policy to filter on + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dbr_ps_prepare(**kwargs) + self._get_dbr_ps_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dbrps', 'GET', @@ -227,23 +232,24 @@ def get_dbr_ps_with_http_info(self, **kwargs): # noqa: E501,D401,D403 async def get_dbr_ps_async(self, **kwargs): # noqa: E501,D401,D403 """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: Specifies the organization ID to filter on - :param str org: Specifies the organization name to filter on - :param str id: Specifies the mapping ID to filter on - :param str bucket_id: Specifies the bucket ID to filter on + :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: Specifies the database to filter on - :param str rp: Specifies the retention policy to filter on + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dbr_ps_prepare(**kwargs) + self._get_dbr_ps_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dbrps', 'GET', @@ -300,16 +306,17 @@ def _get_dbr_ps_prepare(self, **kwargs): # noqa: E501,D401,D403 def get_dbr_ps_id(self, dbrp_id, **kwargs): # noqa: E501,D401,D403 """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: The database retention policy mapping ID (required) + :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: Specifies the organization ID of the mapping - :param str org: Specifies the organization name of the mapping + :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. @@ -324,22 +331,23 @@ def get_dbr_ps_id(self, dbrp_id, **kwargs): # noqa: E501,D401,D403 def get_dbr_ps_id_with_http_info(self, dbrp_id, **kwargs): # noqa: E501,D401,D403 """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: The database retention policy mapping ID (required) + :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: Specifies the organization ID of the mapping - :param str org: Specifies the organization name of the mapping + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dbr_ps_id_prepare(dbrp_id, **kwargs) + self._get_dbr_ps_id_prepare(dbrp_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dbrps/{dbrpID}', 'GET', @@ -361,19 +369,20 @@ def get_dbr_ps_id_with_http_info(self, dbrp_id, **kwargs): # noqa: E501,D401,D4 async def get_dbr_ps_id_async(self, dbrp_id, **kwargs): # noqa: E501,D401,D403 """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 an asynchronous HTTP request. :param async_req bool - :param str dbrp_id: The database retention policy mapping ID (required) + :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: Specifies the organization ID of the mapping - :param str org: Specifies the organization name of the mapping + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dbr_ps_id_prepare(dbrp_id, **kwargs) + self._get_dbr_ps_id_prepare(dbrp_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dbrps/{dbrpID}', 'GET', @@ -432,11 +441,11 @@ def patch_dbrpid(self, dbrp_id, dbrp_update, **kwargs): # noqa: E501,D401,D403 >>> result = thread.get() :param async_req bool - :param str dbrp_id: The database retention policy mapping. (required) - :param DBRPUpdate dbrp_update: Database retention policy update to apply (required) + :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: Specifies the organization ID of the mapping - :param str org: Specifies the organization name of the mapping + :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. @@ -457,17 +466,17 @@ def patch_dbrpid_with_http_info(self, dbrp_id, dbrp_update, **kwargs): # noqa: >>> result = thread.get() :param async_req bool - :param str dbrp_id: The database retention policy mapping. (required) - :param DBRPUpdate dbrp_update: Database retention policy update to apply (required) + :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: Specifies the organization ID of the mapping - :param str org: Specifies the organization name of the mapping + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dbrpid_prepare(dbrp_id, dbrp_update, **kwargs) + self._patch_dbrpid_prepare(dbrp_id, dbrp_update, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dbrps/{dbrpID}', 'PATCH', @@ -492,17 +501,17 @@ async def patch_dbrpid_async(self, dbrp_id, dbrp_update, **kwargs): # noqa: E50 This method makes an asynchronous HTTP request. :param async_req bool - :param str dbrp_id: The database retention policy mapping. (required) - :param DBRPUpdate dbrp_update: Database retention policy update to apply (required) + :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: Specifies the organization ID of the mapping - :param str org: Specifies the organization name of the mapping + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dbrpid_prepare(dbrp_id, dbrp_update, **kwargs) + self._patch_dbrpid_prepare(dbrp_id, dbrp_update, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dbrps/{dbrpID}', 'PATCH', @@ -565,13 +574,14 @@ def _patch_dbrpid_prepare(self, dbrp_id, dbrp_update, **kwargs): # noqa: E501,D def post_dbrp(self, dbrp_create, **kwargs): # noqa: E501,D401,D403 """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(dbrp_create, async_req=True) >>> result = thread.get() :param async_req bool - :param DBRPCreate dbrp_create: The database retention policy mapping to add (required) + :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, @@ -587,20 +597,21 @@ def post_dbrp(self, dbrp_create, **kwargs): # noqa: E501,D401,D403 def post_dbrp_with_http_info(self, dbrp_create, **kwargs): # noqa: E501,D401,D403 """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 (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dbrp_prepare(dbrp_create, **kwargs) + self._post_dbrp_prepare(dbrp_create, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dbrps', 'POST', @@ -622,17 +633,18 @@ def post_dbrp_with_http_info(self, dbrp_create, **kwargs): # noqa: E501,D401,D4 async def post_dbrp_async(self, dbrp_create, **kwargs): # noqa: E501,D401,D403 """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 (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dbrp_prepare(dbrp_create, **kwargs) + self._post_dbrp_prepare(dbrp_create, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dbrps', 'POST', diff --git a/influxdb_client/service/delete_service.py b/influxdb_client/service/delete_service.py index 4ad40dd8..7fef4ea9 100644 --- a/influxdb_client/service/delete_service.py +++ b/influxdb_client/service/delete_service.py @@ -32,19 +32,19 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 def post_delete(self, delete_predicate_request, **kwargs): # noqa: E501,D401,D403 """Delete data. - Deletes data from a bucket. Use this endpoint to delete points from a bucket in a specified time range. #### InfluxDB Cloud - Does the following when you send a delete request: 1. Validates the request and queues the delete. 2. Returns _success_ 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. #### Required permissions - `write-buckets` or `write-bucket BUCKET_ID`. `BUCKET_ID` is the ID of the destination bucket. #### Rate limits (with InfluxDB Cloud) `write` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/v2.2/write-data/delete-data/). - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/v2.2/reference/syntax/delete-predicate/). - Learn how InfluxDB handles [deleted tags](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagkeys/) and [deleted fields](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementfieldkeys/). + Deletes data from a bucket. Use this endpoint to delete points from a bucket in a specified time range. #### InfluxDB Cloud - Does the following when you send a delete request: 1. Validates the request and queues the delete. 2. If queued, responds with _success_ (HTTP `2xx` status code); _error_ otherwise. 3. Handles the delete asynchronously and reaches eventual consistency. To ensure that InfluxDB Cloud handles writes and deletes in the order you request them, wait for a success response (HTTP `2xx` status code) before you send the next request. Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response. #### InfluxDB OSS - Validates the request, handles the delete synchronously, and then responds with success or failure. #### Required permissions - `write-buckets` or `write-bucket BUCKET_ID`. *`BUCKET_ID`* is the ID of the destination bucket. #### Rate limits (with InfluxDB Cloud) `write` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/latest/write-data/delete-data/) - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/latest/reference/syntax/delete-predicate/). - Learn how InfluxDB handles [deleted tags](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagkeys/) and [deleted fields](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementfieldkeys/). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_delete(delete_predicate_request, async_req=True) >>> result = thread.get() :param async_req bool - :param DeletePredicateRequest delete_predicate_request: Time range parameters and an optional **delete predicate expression**. To select points to delete within the specified time range, pass a **delete predicate expression** in the `predicate` property of the request body. If you don't pass a `predicate`, InfluxDB deletes all data with timestamps in the specified time range. #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/v2.2/write-data/delete-data/). - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/v2.2/reference/syntax/delete-predicate/). (required) + :param DeletePredicateRequest delete_predicate_request: Time range parameters and an optional **delete predicate expression**. To select points to delete within the specified time range, pass a **delete predicate expression** in the `predicate` property of the request body. If you don't pass a `predicate`, InfluxDB deletes all data with timestamps in the specified time range. #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/latest/write-data/delete-data/) - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/latest/reference/syntax/delete-predicate/). (required) :param str zap_trace_span: OpenTracing span context - :param str org: The organization to delete data from. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - :param str bucket: The name or ID of the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. - :param str org_id: The ID of the organization to delete data from. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - :param str bucket_id: The ID of the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. + :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - Deletes data from the bucket in the specified organization. - If you pass both `orgID` and `org`, they must both be valid. + :param str bucket: A bucket name or ID. Specifies the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. + :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - Deletes data from the bucket in the specified organization. - If you pass both `orgID` and `org`, they must both be valid. + :param str bucket_id: A bucket ID. Specifies the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. :return: None If the method is called asynchronously, returns the request thread. @@ -59,25 +59,25 @@ def post_delete(self, delete_predicate_request, **kwargs): # noqa: E501,D401,D4 def post_delete_with_http_info(self, delete_predicate_request, **kwargs): # noqa: E501,D401,D403 """Delete data. - Deletes data from a bucket. Use this endpoint to delete points from a bucket in a specified time range. #### InfluxDB Cloud - Does the following when you send a delete request: 1. Validates the request and queues the delete. 2. Returns _success_ 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. #### Required permissions - `write-buckets` or `write-bucket BUCKET_ID`. `BUCKET_ID` is the ID of the destination bucket. #### Rate limits (with InfluxDB Cloud) `write` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/v2.2/write-data/delete-data/). - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/v2.2/reference/syntax/delete-predicate/). - Learn how InfluxDB handles [deleted tags](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagkeys/) and [deleted fields](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementfieldkeys/). + Deletes data from a bucket. Use this endpoint to delete points from a bucket in a specified time range. #### InfluxDB Cloud - Does the following when you send a delete request: 1. Validates the request and queues the delete. 2. If queued, responds with _success_ (HTTP `2xx` status code); _error_ otherwise. 3. Handles the delete asynchronously and reaches eventual consistency. To ensure that InfluxDB Cloud handles writes and deletes in the order you request them, wait for a success response (HTTP `2xx` status code) before you send the next request. Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response. #### InfluxDB OSS - Validates the request, handles the delete synchronously, and then responds with success or failure. #### Required permissions - `write-buckets` or `write-bucket BUCKET_ID`. *`BUCKET_ID`* is the ID of the destination bucket. #### Rate limits (with InfluxDB Cloud) `write` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/latest/write-data/delete-data/) - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/latest/reference/syntax/delete-predicate/). - Learn how InfluxDB handles [deleted tags](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagkeys/) and [deleted fields](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementfieldkeys/). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_delete_with_http_info(delete_predicate_request, async_req=True) >>> result = thread.get() :param async_req bool - :param DeletePredicateRequest delete_predicate_request: Time range parameters and an optional **delete predicate expression**. To select points to delete within the specified time range, pass a **delete predicate expression** in the `predicate` property of the request body. If you don't pass a `predicate`, InfluxDB deletes all data with timestamps in the specified time range. #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/v2.2/write-data/delete-data/). - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/v2.2/reference/syntax/delete-predicate/). (required) + :param DeletePredicateRequest delete_predicate_request: Time range parameters and an optional **delete predicate expression**. To select points to delete within the specified time range, pass a **delete predicate expression** in the `predicate` property of the request body. If you don't pass a `predicate`, InfluxDB deletes all data with timestamps in the specified time range. #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/latest/write-data/delete-data/) - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/latest/reference/syntax/delete-predicate/). (required) :param str zap_trace_span: OpenTracing span context - :param str org: The organization to delete data from. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - :param str bucket: The name or ID of the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. - :param str org_id: The ID of the organization to delete data from. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - :param str bucket_id: The ID of the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. + :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - Deletes data from the bucket in the specified organization. - If you pass both `orgID` and `org`, they must both be valid. + :param str bucket: A bucket name or ID. Specifies the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. + :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - Deletes data from the bucket in the specified organization. - If you pass both `orgID` and `org`, they must both be valid. + :param str bucket_id: A bucket ID. Specifies the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. :return: None If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_delete_prepare(delete_predicate_request, **kwargs) + self._post_delete_prepare(delete_predicate_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/delete', 'POST', @@ -99,22 +99,22 @@ def post_delete_with_http_info(self, delete_predicate_request, **kwargs): # noq async def post_delete_async(self, delete_predicate_request, **kwargs): # noqa: E501,D401,D403 """Delete data. - Deletes data from a bucket. Use this endpoint to delete points from a bucket in a specified time range. #### InfluxDB Cloud - Does the following when you send a delete request: 1. Validates the request and queues the delete. 2. Returns _success_ 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. #### Required permissions - `write-buckets` or `write-bucket BUCKET_ID`. `BUCKET_ID` is the ID of the destination bucket. #### Rate limits (with InfluxDB Cloud) `write` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/v2.2/write-data/delete-data/). - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/v2.2/reference/syntax/delete-predicate/). - Learn how InfluxDB handles [deleted tags](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagkeys/) and [deleted fields](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementfieldkeys/). + Deletes data from a bucket. Use this endpoint to delete points from a bucket in a specified time range. #### InfluxDB Cloud - Does the following when you send a delete request: 1. Validates the request and queues the delete. 2. If queued, responds with _success_ (HTTP `2xx` status code); _error_ otherwise. 3. Handles the delete asynchronously and reaches eventual consistency. To ensure that InfluxDB Cloud handles writes and deletes in the order you request them, wait for a success response (HTTP `2xx` status code) before you send the next request. Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response. #### InfluxDB OSS - Validates the request, handles the delete synchronously, and then responds with success or failure. #### Required permissions - `write-buckets` or `write-bucket BUCKET_ID`. *`BUCKET_ID`* is the ID of the destination bucket. #### Rate limits (with InfluxDB Cloud) `write` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/latest/write-data/delete-data/) - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/latest/reference/syntax/delete-predicate/). - Learn how InfluxDB handles [deleted tags](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagkeys/) and [deleted fields](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementfieldkeys/). This method makes an asynchronous HTTP request. :param async_req bool - :param DeletePredicateRequest delete_predicate_request: Time range parameters and an optional **delete predicate expression**. To select points to delete within the specified time range, pass a **delete predicate expression** in the `predicate` property of the request body. If you don't pass a `predicate`, InfluxDB deletes all data with timestamps in the specified time range. #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/v2.2/write-data/delete-data/). - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/v2.2/reference/syntax/delete-predicate/). (required) + :param DeletePredicateRequest delete_predicate_request: Time range parameters and an optional **delete predicate expression**. To select points to delete within the specified time range, pass a **delete predicate expression** in the `predicate` property of the request body. If you don't pass a `predicate`, InfluxDB deletes all data with timestamps in the specified time range. #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/latest/write-data/delete-data/) - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/latest/reference/syntax/delete-predicate/). (required) :param str zap_trace_span: OpenTracing span context - :param str org: The organization to delete data from. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - :param str bucket: The name or ID of the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. - :param str org_id: The ID of the organization to delete data from. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - :param str bucket_id: The ID of the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. + :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - Deletes data from the bucket in the specified organization. - If you pass both `orgID` and `org`, they must both be valid. + :param str bucket: A bucket name or ID. Specifies the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. + :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - Deletes data from the bucket in the specified organization. - If you pass both `orgID` and `org`, they must both be valid. + :param str bucket_id: A bucket ID. Specifies the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. :return: None If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_delete_prepare(delete_predicate_request, **kwargs) + self._post_delete_prepare(delete_predicate_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/delete', 'POST', diff --git a/influxdb_client/service/health_service.py b/influxdb_client/service/health_service.py index b5ff4263..6a87da7a 100644 --- a/influxdb_client/service/health_service.py +++ b/influxdb_client/service/health_service.py @@ -67,7 +67,7 @@ def get_health_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_health_prepare(**kwargs) + self._get_health_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/health', 'GET', @@ -99,7 +99,7 @@ async def get_health_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_health_prepare(**kwargs) + self._get_health_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/health', 'GET', diff --git a/influxdb_client/service/invokable_scripts_service.py b/influxdb_client/service/invokable_scripts_service.py index 7dbfa7ad..9c84503d 100644 --- a/influxdb_client/service/invokable_scripts_service.py +++ b/influxdb_client/service/invokable_scripts_service.py @@ -32,14 +32,14 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 def delete_scripts_id(self, script_id, **kwargs): # noqa: E501,D401,D403 """Delete a script. - Deletes a script and all associated records. + Deletes a [script](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) and all associated records. #### Limitations - You can delete only one script per request. - If the script ID you provide doesn't exist for the organization, InfluxDB responds with an HTTP `204` status code. #### Related Guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_scripts_id(script_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str script_id: The ID of the script to delete. (required) + :param str script_id: A script ID. Deletes the specified script. (required) :return: None If the method is called asynchronously, returns the request thread. @@ -54,20 +54,24 @@ def delete_scripts_id(self, script_id, **kwargs): # noqa: E501,D401,D403 def delete_scripts_id_with_http_info(self, script_id, **kwargs): # noqa: E501,D401,D403 """Delete a script. - Deletes a script and all associated records. + Deletes a [script](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) and all associated records. #### Limitations - You can delete only one script per request. - If the script ID you provide doesn't exist for the organization, InfluxDB responds with an HTTP `204` status code. #### Related Guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_scripts_id_with_http_info(script_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str script_id: The ID of the script to delete. (required) + :param str script_id: A script ID. Deletes the specified script. (required) :return: None If the method is called asynchronously, returns the request thread. """ # noqa: E501 + if not self._is_cloud_instance(): + from influxdb_client.client.warnings import CloudOnlyWarning + CloudOnlyWarning.print_warning('InvokableScriptsService', + 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_scripts_id_prepare(script_id, **kwargs) + self._delete_scripts_id_prepare(script_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scripts/{scriptID}', 'DELETE', @@ -89,11 +93,11 @@ def delete_scripts_id_with_http_info(self, script_id, **kwargs): # noqa: E501,D async def delete_scripts_id_async(self, script_id, **kwargs): # noqa: E501,D401,D403 """Delete a script. - Deletes a script and all associated records. + Deletes a [script](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) and all associated records. #### Limitations - You can delete only one script per request. - If the script ID you provide doesn't exist for the organization, InfluxDB responds with an HTTP `204` status code. #### Related Guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) This method makes an asynchronous HTTP request. :param async_req bool - :param str script_id: The ID of the script to delete. (required) + :param str script_id: A script ID. Deletes the specified script. (required) :return: None If the method is called asynchronously, returns the request thread. @@ -103,7 +107,7 @@ async def delete_scripts_id_async(self, script_id, **kwargs): # noqa: E501,D401 CloudOnlyWarning.print_warning('InvokableScriptsService', 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_scripts_id_prepare(script_id, **kwargs) + self._delete_scripts_id_prepare(script_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scripts/{scriptID}', 'DELETE', @@ -141,19 +145,25 @@ def _delete_scripts_id_prepare(self, script_id, **kwargs): # noqa: E501,D401,D4 header_params = {} body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + return local_var_params, path_params, query_params, header_params, body_params def get_scripts(self, **kwargs): # noqa: E501,D401,D403 """List scripts. + Lists [scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/). #### Related guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_scripts(async_req=True) >>> result = thread.get() :param async_req bool - :param int limit: The number of scripts to return. - :param int offset: The offset for pagination. + :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination]({{% INFLUXDB_DOCS_URL %}}/api/#tag/Pagination). + :param int limit: The maximum number of scripts to return. Default is `100`. + :param str name: The script name. Lists scripts with the specified name. :return: Scripts If the method is called asynchronously, returns the request thread. @@ -168,14 +178,16 @@ def get_scripts(self, **kwargs): # noqa: E501,D401,D403 def get_scripts_with_http_info(self, **kwargs): # noqa: E501,D401,D403 """List scripts. + Lists [scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/). #### Related guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_scripts_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param int limit: The number of scripts to return. - :param int offset: The offset for pagination. + :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination]({{% INFLUXDB_DOCS_URL %}}/api/#tag/Pagination). + :param int limit: The maximum number of scripts to return. Default is `100`. + :param str name: The script name. Lists scripts with the specified name. :return: Scripts If the method is called asynchronously, returns the request thread. @@ -185,7 +197,7 @@ def get_scripts_with_http_info(self, **kwargs): # noqa: E501,D401,D403 CloudOnlyWarning.print_warning('InvokableScriptsService', 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scripts_prepare(**kwargs) + self._get_scripts_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scripts', 'GET', @@ -207,11 +219,13 @@ def get_scripts_with_http_info(self, **kwargs): # noqa: E501,D401,D403 async def get_scripts_async(self, **kwargs): # noqa: E501,D401,D403 """List scripts. + Lists [scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/). #### Related guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) This method makes an asynchronous HTTP request. :param async_req bool - :param int limit: The number of scripts to return. - :param int offset: The offset for pagination. + :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination]({{% INFLUXDB_DOCS_URL %}}/api/#tag/Pagination). + :param int limit: The maximum number of scripts to return. Default is `100`. + :param str name: The script name. Lists scripts with the specified name. :return: Scripts If the method is called asynchronously, returns the request thread. @@ -221,7 +235,7 @@ async def get_scripts_async(self, **kwargs): # noqa: E501,D401,D403 CloudOnlyWarning.print_warning('InvokableScriptsService', 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scripts_prepare(**kwargs) + self._get_scripts_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scripts', 'GET', @@ -243,16 +257,24 @@ async def get_scripts_async(self, **kwargs): # noqa: E501,D401,D403 def _get_scripts_prepare(self, **kwargs): # noqa: E501,D401,D403 local_var_params = locals() - all_params = ['limit', 'offset'] # noqa: E501 + all_params = ['offset', 'limit', 'name'] # noqa: E501 self._check_operation_params('get_scripts', all_params, local_var_params) + if 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ValueError("Invalid value for parameter `offset` when calling `get_scripts`, must be a value greater than or equal to `0`") # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] > 500: # noqa: E501 + raise ValueError("Invalid value for parameter `limit` when calling `get_scripts`, must be a value less than or equal to `500`") # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] < 0: # noqa: E501 + raise ValueError("Invalid value for parameter `limit` when calling `get_scripts`, must be a value greater than or equal to `0`") # noqa: E501 path_params = {} query_params = [] - if 'limit' in local_var_params: - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 if 'offset' in local_var_params: query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'name' in local_var_params: + query_params.append(('name', local_var_params['name'])) # noqa: E501 header_params = {} @@ -266,14 +288,14 @@ def _get_scripts_prepare(self, **kwargs): # noqa: E501,D401,D403 def get_scripts_id(self, script_id, **kwargs): # noqa: E501,D401,D403 """Retrieve a script. - Uses script ID to retrieve details of an invokable script. + Retrieves a [script](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/). #### Related Guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_scripts_id(script_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str script_id: The script ID. (required) + :param str script_id: A script ID. Retrieves the specified script. (required) :return: Script If the method is called asynchronously, returns the request thread. @@ -288,14 +310,14 @@ def get_scripts_id(self, script_id, **kwargs): # noqa: E501,D401,D403 def get_scripts_id_with_http_info(self, script_id, **kwargs): # noqa: E501,D401,D403 """Retrieve a script. - Uses script ID to retrieve details of an invokable script. + Retrieves a [script](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/). #### Related Guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_scripts_id_with_http_info(script_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str script_id: The script ID. (required) + :param str script_id: A script ID. Retrieves the specified script. (required) :return: Script If the method is called asynchronously, returns the request thread. @@ -305,7 +327,7 @@ def get_scripts_id_with_http_info(self, script_id, **kwargs): # noqa: E501,D401 CloudOnlyWarning.print_warning('InvokableScriptsService', 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scripts_id_prepare(script_id, **kwargs) + self._get_scripts_id_prepare(script_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scripts/{scriptID}', 'GET', @@ -327,11 +349,11 @@ def get_scripts_id_with_http_info(self, script_id, **kwargs): # noqa: E501,D401 async def get_scripts_id_async(self, script_id, **kwargs): # noqa: E501,D401,D403 """Retrieve a script. - Uses script ID to retrieve details of an invokable script. + Retrieves a [script](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/). #### Related Guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) This method makes an asynchronous HTTP request. :param async_req bool - :param str script_id: The script ID. (required) + :param str script_id: A script ID. Retrieves the specified script. (required) :return: Script If the method is called asynchronously, returns the request thread. @@ -341,7 +363,7 @@ async def get_scripts_id_async(self, script_id, **kwargs): # noqa: E501,D401,D4 CloudOnlyWarning.print_warning('InvokableScriptsService', 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scripts_id_prepare(script_id, **kwargs) + self._get_scripts_id_prepare(script_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scripts/{scriptID}', 'GET', @@ -385,18 +407,140 @@ def _get_scripts_id_prepare(self, script_id, **kwargs): # noqa: E501,D401,D403 return local_var_params, path_params, query_params, header_params, body_params + def get_scripts_id_params(self, script_id, **kwargs): # noqa: E501,D401,D403 + """Find script parameters.. + + Analyzes a script and determines required parameters. Find all `params` keys referenced in a script and return a list of keys. If it is possible to determine the type of the value from the context then the type is also returned -- for example: The following sample script contains a _`mybucket`_ parameter : ```json "script": "from(bucket: params.mybucket) |> range(start: -7d) |> limit(n:1)" ``` Requesting the parameters using `GET /api/v2/scripts/SCRIPT_ID/params` returns the following: ```json { "params": { "mybucket": "string" } } ``` The type name returned for a parameter will be one of: - `any` - `bool` - `duration` - `float` - `int` - `string` - `time` - `uint` The type name `any` is used when the type of a parameter cannot be determined from the context, or the type is determined to be a structured type such as an array or record. #### Related guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_scripts_id_params(script_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str script_id: A script ID. The script to analyze for params. (required) + :return: Params + If the method is called asynchronously, + returns the request thread. + """ # noqa: E501 + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_scripts_id_params_with_http_info(script_id, **kwargs) # noqa: E501 + else: + (data) = self.get_scripts_id_params_with_http_info(script_id, **kwargs) # noqa: E501 + return data + + def get_scripts_id_params_with_http_info(self, script_id, **kwargs): # noqa: E501,D401,D403 + """Find script parameters.. + + Analyzes a script and determines required parameters. Find all `params` keys referenced in a script and return a list of keys. If it is possible to determine the type of the value from the context then the type is also returned -- for example: The following sample script contains a _`mybucket`_ parameter : ```json "script": "from(bucket: params.mybucket) |> range(start: -7d) |> limit(n:1)" ``` Requesting the parameters using `GET /api/v2/scripts/SCRIPT_ID/params` returns the following: ```json { "params": { "mybucket": "string" } } ``` The type name returned for a parameter will be one of: - `any` - `bool` - `duration` - `float` - `int` - `string` - `time` - `uint` The type name `any` is used when the type of a parameter cannot be determined from the context, or the type is determined to be a structured type such as an array or record. #### Related guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_scripts_id_params_with_http_info(script_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str script_id: A script ID. The script to analyze for params. (required) + :return: Params + If the method is called asynchronously, + returns the request thread. + """ # noqa: E501 + if not self._is_cloud_instance(): + from influxdb_client.client.warnings import CloudOnlyWarning + CloudOnlyWarning.print_warning('InvokableScriptsService', + 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 + local_var_params, path_params, query_params, header_params, body_params = \ + self._get_scripts_id_params_prepare(script_id, **kwargs) # noqa: E501 + + return self.api_client.call_api( + '/api/v2/scripts/{scriptID}/params', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=[], + files={}, + response_type='Params', # noqa: E501 + auth_settings=[], + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats={}, + urlopen_kw=kwargs.get('urlopen_kw', None)) + + async def get_scripts_id_params_async(self, script_id, **kwargs): # noqa: E501,D401,D403 + """Find script parameters.. + + Analyzes a script and determines required parameters. Find all `params` keys referenced in a script and return a list of keys. If it is possible to determine the type of the value from the context then the type is also returned -- for example: The following sample script contains a _`mybucket`_ parameter : ```json "script": "from(bucket: params.mybucket) |> range(start: -7d) |> limit(n:1)" ``` Requesting the parameters using `GET /api/v2/scripts/SCRIPT_ID/params` returns the following: ```json { "params": { "mybucket": "string" } } ``` The type name returned for a parameter will be one of: - `any` - `bool` - `duration` - `float` - `int` - `string` - `time` - `uint` The type name `any` is used when the type of a parameter cannot be determined from the context, or the type is determined to be a structured type such as an array or record. #### Related guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) + This method makes an asynchronous HTTP request. + + :param async_req bool + :param str script_id: A script ID. The script to analyze for params. (required) + :return: Params + If the method is called asynchronously, + returns the request thread. + """ # noqa: E501 + if not await self._is_cloud_instance_async(): + from influxdb_client.client.warnings import CloudOnlyWarning + CloudOnlyWarning.print_warning('InvokableScriptsService', + 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 + local_var_params, path_params, query_params, header_params, body_params = \ + self._get_scripts_id_params_prepare(script_id, **kwargs) # noqa: E501 + + return await self.api_client.call_api( + '/api/v2/scripts/{scriptID}/params', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=[], + files={}, + response_type='Params', # noqa: E501 + auth_settings=[], + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats={}, + urlopen_kw=kwargs.get('urlopen_kw', None)) + + def _get_scripts_id_params_prepare(self, script_id, **kwargs): # noqa: E501,D401,D403 + local_var_params = locals() + + all_params = ['script_id'] # noqa: E501 + self._check_operation_params('get_scripts_id_params', all_params, local_var_params) + # verify the required parameter 'script_id' is set + if ('script_id' not in local_var_params or + local_var_params['script_id'] is None): + raise ValueError("Missing the required parameter `script_id` when calling `get_scripts_id_params`") # noqa: E501 + + path_params = {} + if 'script_id' in local_var_params: + path_params['scriptID'] = local_var_params['script_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + return local_var_params, path_params, query_params, header_params, body_params + def patch_scripts_id(self, script_id, script_update_request, **kwargs): # noqa: E501,D401,D403 """Update a script. - Updates properties (`name`, `description`, and `script`) of an invokable script. + Updates an invokable script. Use this endpoint to modify values for script properties (`description` and `script`). To update a script, pass an object that contains the updated key-value pairs. #### Limitations - If you send an empty request body, the script will neither update nor store an empty script, but InfluxDB will respond with an HTTP `200` status code. #### Related Guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_scripts_id(script_id, script_update_request, async_req=True) >>> result = thread.get() :param async_req bool - :param str script_id: The script ID. (required) - :param ScriptUpdateRequest script_update_request: Script update to apply (required) + :param str script_id: A script ID. Updates the specified script. (required) + :param ScriptUpdateRequest script_update_request: An object that contains the updated script properties to apply. (required) :return: Script If the method is called asynchronously, returns the request thread. @@ -411,15 +555,15 @@ def patch_scripts_id(self, script_id, script_update_request, **kwargs): # noqa: def patch_scripts_id_with_http_info(self, script_id, script_update_request, **kwargs): # noqa: E501,D401,D403 """Update a script. - Updates properties (`name`, `description`, and `script`) of an invokable script. + Updates an invokable script. Use this endpoint to modify values for script properties (`description` and `script`). To update a script, pass an object that contains the updated key-value pairs. #### Limitations - If you send an empty request body, the script will neither update nor store an empty script, but InfluxDB will respond with an HTTP `200` status code. #### Related Guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_scripts_id_with_http_info(script_id, script_update_request, async_req=True) >>> result = thread.get() :param async_req bool - :param str script_id: The script ID. (required) - :param ScriptUpdateRequest script_update_request: Script update to apply (required) + :param str script_id: A script ID. Updates the specified script. (required) + :param ScriptUpdateRequest script_update_request: An object that contains the updated script properties to apply. (required) :return: Script If the method is called asynchronously, returns the request thread. @@ -429,7 +573,7 @@ def patch_scripts_id_with_http_info(self, script_id, script_update_request, **kw CloudOnlyWarning.print_warning('InvokableScriptsService', 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_scripts_id_prepare(script_id, script_update_request, **kwargs) + self._patch_scripts_id_prepare(script_id, script_update_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scripts/{scriptID}', 'PATCH', @@ -451,12 +595,12 @@ def patch_scripts_id_with_http_info(self, script_id, script_update_request, **kw async def patch_scripts_id_async(self, script_id, script_update_request, **kwargs): # noqa: E501,D401,D403 """Update a script. - Updates properties (`name`, `description`, and `script`) of an invokable script. + Updates an invokable script. Use this endpoint to modify values for script properties (`description` and `script`). To update a script, pass an object that contains the updated key-value pairs. #### Limitations - If you send an empty request body, the script will neither update nor store an empty script, but InfluxDB will respond with an HTTP `200` status code. #### Related Guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) This method makes an asynchronous HTTP request. :param async_req bool - :param str script_id: The script ID. (required) - :param ScriptUpdateRequest script_update_request: Script update to apply (required) + :param str script_id: A script ID. Updates the specified script. (required) + :param ScriptUpdateRequest script_update_request: An object that contains the updated script properties to apply. (required) :return: Script If the method is called asynchronously, returns the request thread. @@ -466,7 +610,7 @@ async def patch_scripts_id_async(self, script_id, script_update_request, **kwarg CloudOnlyWarning.print_warning('InvokableScriptsService', 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_scripts_id_prepare(script_id, script_update_request, **kwargs) + self._patch_scripts_id_prepare(script_id, script_update_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scripts/{scriptID}', 'PATCH', @@ -523,6 +667,7 @@ def _patch_scripts_id_prepare(self, script_id, script_update_request, **kwargs): def post_scripts(self, script_create_request, **kwargs): # noqa: E501,D401,D403 """Create a script. + Creates an [invokable script](https://docs.influxdata.com/resources/videos/api-invokable-scripts/) and returns the script. #### Related guides - [Invokable scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - [Creating custom InfluxDB endpoints](https://docs.influxdata.com/resources/videos/api-invokable-scripts/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_scripts(script_create_request, async_req=True) @@ -544,6 +689,7 @@ def post_scripts(self, script_create_request, **kwargs): # noqa: E501,D401,D403 def post_scripts_with_http_info(self, script_create_request, **kwargs): # noqa: E501,D401,D403 """Create a script. + Creates an [invokable script](https://docs.influxdata.com/resources/videos/api-invokable-scripts/) and returns the script. #### Related guides - [Invokable scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - [Creating custom InfluxDB endpoints](https://docs.influxdata.com/resources/videos/api-invokable-scripts/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_scripts_with_http_info(script_create_request, async_req=True) @@ -560,7 +706,7 @@ def post_scripts_with_http_info(self, script_create_request, **kwargs): # noqa: CloudOnlyWarning.print_warning('InvokableScriptsService', 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scripts_prepare(script_create_request, **kwargs) + self._post_scripts_prepare(script_create_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scripts', 'POST', @@ -582,6 +728,7 @@ def post_scripts_with_http_info(self, script_create_request, **kwargs): # noqa: async def post_scripts_async(self, script_create_request, **kwargs): # noqa: E501,D401,D403 """Create a script. + Creates an [invokable script](https://docs.influxdata.com/resources/videos/api-invokable-scripts/) and returns the script. #### Related guides - [Invokable scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - [Creating custom InfluxDB endpoints](https://docs.influxdata.com/resources/videos/api-invokable-scripts/) This method makes an asynchronous HTTP request. :param async_req bool @@ -595,7 +742,7 @@ async def post_scripts_async(self, script_create_request, **kwargs): # noqa: E5 CloudOnlyWarning.print_warning('InvokableScriptsService', 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scripts_prepare(script_create_request, **kwargs) + self._post_scripts_prepare(script_create_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scripts', 'POST', @@ -646,16 +793,16 @@ def _post_scripts_prepare(self, script_create_request, **kwargs): # noqa: E501, def post_scripts_id_invoke(self, script_id, **kwargs): # noqa: E501,D401,D403 """Invoke a script. - Invokes a script and substitutes `params` keys referenced in the script with `params` key-values sent in the request body. + Runs a script and returns the result. When the script runs, InfluxDB replaces `params` keys referenced in the script with `params` key-values passed in the request body--for example: The following sample script contains a _`mybucket`_ parameter : ```json "script": "from(bucket: params.mybucket) |> range(start: -7d) |> limit(n:1)" ``` The following example `POST /api/v2/scripts/SCRIPT_ID/invoke` request body passes a value for the _`mybucket`_ parameter: ```json { "params": { "mybucket": "air_sensor" } } ``` #### Related guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_scripts_id_invoke(script_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str script_id: (required) + :param str script_id: A script ID. Runs the specified script. (required) :param ScriptInvocationParams script_invocation_params: - :return: str + :return: file If the method is called asynchronously, returns the request thread. """ # noqa: E501 @@ -669,16 +816,16 @@ def post_scripts_id_invoke(self, script_id, **kwargs): # noqa: E501,D401,D403 def post_scripts_id_invoke_with_http_info(self, script_id, **kwargs): # noqa: E501,D401,D403 """Invoke a script. - Invokes a script and substitutes `params` keys referenced in the script with `params` key-values sent in the request body. + Runs a script and returns the result. When the script runs, InfluxDB replaces `params` keys referenced in the script with `params` key-values passed in the request body--for example: The following sample script contains a _`mybucket`_ parameter : ```json "script": "from(bucket: params.mybucket) |> range(start: -7d) |> limit(n:1)" ``` The following example `POST /api/v2/scripts/SCRIPT_ID/invoke` request body passes a value for the _`mybucket`_ parameter: ```json { "params": { "mybucket": "air_sensor" } } ``` #### Related guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_scripts_id_invoke_with_http_info(script_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str script_id: (required) + :param str script_id: A script ID. Runs the specified script. (required) :param ScriptInvocationParams script_invocation_params: - :return: str + :return: file If the method is called asynchronously, returns the request thread. """ # noqa: E501 @@ -687,7 +834,7 @@ def post_scripts_id_invoke_with_http_info(self, script_id, **kwargs): # noqa: E CloudOnlyWarning.print_warning('InvokableScriptsService', 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scripts_id_invoke_prepare(script_id, **kwargs) + self._post_scripts_id_invoke_prepare(script_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scripts/{scriptID}/invoke', 'POST', @@ -697,7 +844,7 @@ def post_scripts_id_invoke_with_http_info(self, script_id, **kwargs): # noqa: E body=body_params, post_params=[], files={}, - response_type='str', # noqa: E501 + response_type='file', # noqa: E501 auth_settings=[], async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -709,13 +856,13 @@ def post_scripts_id_invoke_with_http_info(self, script_id, **kwargs): # noqa: E async def post_scripts_id_invoke_async(self, script_id, **kwargs): # noqa: E501,D401,D403 """Invoke a script. - Invokes a script and substitutes `params` keys referenced in the script with `params` key-values sent in the request body. + Runs a script and returns the result. When the script runs, InfluxDB replaces `params` keys referenced in the script with `params` key-values passed in the request body--for example: The following sample script contains a _`mybucket`_ parameter : ```json "script": "from(bucket: params.mybucket) |> range(start: -7d) |> limit(n:1)" ``` The following example `POST /api/v2/scripts/SCRIPT_ID/invoke` request body passes a value for the _`mybucket`_ parameter: ```json { "params": { "mybucket": "air_sensor" } } ``` #### Related guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) This method makes an asynchronous HTTP request. :param async_req bool - :param str script_id: (required) + :param str script_id: A script ID. Runs the specified script. (required) :param ScriptInvocationParams script_invocation_params: - :return: str + :return: file If the method is called asynchronously, returns the request thread. """ # noqa: E501 @@ -724,7 +871,7 @@ async def post_scripts_id_invoke_async(self, script_id, **kwargs): # noqa: E501 CloudOnlyWarning.print_warning('InvokableScriptsService', 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scripts_id_invoke_prepare(script_id, **kwargs) + self._post_scripts_id_invoke_prepare(script_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scripts/{scriptID}/invoke', 'POST', @@ -734,7 +881,7 @@ async def post_scripts_id_invoke_async(self, script_id, **kwargs): # noqa: E501 body=body_params, post_params=[], files={}, - response_type='str', # noqa: E501 + response_type='file', # noqa: E501 auth_settings=[], async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -766,7 +913,7 @@ def _post_scripts_id_invoke_prepare(self, script_id, **kwargs): # noqa: E501,D4 body_params = local_var_params['script_invocation_params'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 + ['text/csv', 'application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 diff --git a/influxdb_client/service/labels_service.py b/influxdb_client/service/labels_service.py index d33a4dbe..aa88f41d 100644 --- a/influxdb_client/service/labels_service.py +++ b/influxdb_client/service/labels_service.py @@ -67,7 +67,7 @@ def delete_labels_id_with_http_info(self, label_id, **kwargs): # noqa: E501,D40 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_labels_id_prepare(label_id, **kwargs) + self._delete_labels_id_prepare(label_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/labels/{labelID}', 'DELETE', @@ -99,7 +99,7 @@ async def delete_labels_id_async(self, label_id, **kwargs): # noqa: E501,D401,D returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_labels_id_prepare(label_id, **kwargs) + self._delete_labels_id_prepare(label_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/labels/{labelID}', 'DELETE', @@ -183,7 +183,7 @@ def get_labels_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_labels_prepare(**kwargs) + self._get_labels_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/labels', 'GET', @@ -215,7 +215,7 @@ async def get_labels_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_labels_prepare(**kwargs) + self._get_labels_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/labels', 'GET', @@ -295,7 +295,7 @@ def get_labels_id_with_http_info(self, label_id, **kwargs): # noqa: E501,D401,D returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_labels_id_prepare(label_id, **kwargs) + self._get_labels_id_prepare(label_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/labels/{labelID}', 'GET', @@ -327,7 +327,7 @@ async def get_labels_id_async(self, label_id, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_labels_id_prepare(label_id, **kwargs) + self._get_labels_id_prepare(label_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/labels/{labelID}', 'GET', @@ -413,7 +413,7 @@ def patch_labels_id_with_http_info(self, label_id, label_update, **kwargs): # n returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_labels_id_prepare(label_id, label_update, **kwargs) + self._patch_labels_id_prepare(label_id, label_update, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/labels/{labelID}', 'PATCH', @@ -446,7 +446,7 @@ async def patch_labels_id_async(self, label_id, label_update, **kwargs): # noqa returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_labels_id_prepare(label_id, label_update, **kwargs) + self._patch_labels_id_prepare(label_id, label_update, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/labels/{labelID}', 'PATCH', @@ -538,7 +538,7 @@ def post_labels_with_http_info(self, label_create_request, **kwargs): # noqa: E returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_labels_prepare(label_create_request, **kwargs) + self._post_labels_prepare(label_create_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/labels', 'POST', @@ -569,7 +569,7 @@ async def post_labels_async(self, label_create_request, **kwargs): # noqa: E501 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_labels_prepare(label_create_request, **kwargs) + self._post_labels_prepare(label_create_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/labels', 'POST', diff --git a/influxdb_client/service/metrics_service.py b/influxdb_client/service/metrics_service.py index fc790d73..9e99de03 100644 --- a/influxdb_client/service/metrics_service.py +++ b/influxdb_client/service/metrics_service.py @@ -32,7 +32,7 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 def get_metrics(self, **kwargs): # noqa: E501,D401,D403 """Retrieve workload performance metrics. - Returns metrics about the workload performance of an InfluxDB instance. Use this endpoint to get performance, resource, and usage metrics. #### Related guides - For the list of metrics categories, see [InfluxDB OSS metrics](https://docs.influxdata.com/influxdb/v2.2/reference/internals/metrics/). - Learn how to use InfluxDB to [scrape Prometheus metrics](https://docs.influxdata.com/influxdb/v2.2write-data/developer-tools/scrape-prometheus-metrics/). - Learn how InfluxDB [parses the Prometheus exposition format](https://docs.influxdata.com/influxdb/v2.2/reference/prometheus-metrics/). + Returns metrics about the workload performance of an InfluxDB instance. Use this endpoint to get performance, resource, and usage metrics. #### Related guides - For the list of metrics categories, see [InfluxDB OSS metrics](https://docs.influxdata.com/influxdb/latest/reference/internals/metrics/). - Learn how to use InfluxDB to [scrape Prometheus metrics](https://docs.influxdata.com/influxdb/latest/write-data/developer-tools/scrape-prometheus-metrics/). - Learn how InfluxDB [parses the Prometheus exposition format](https://docs.influxdata.com/influxdb/latest/reference/prometheus-metrics/). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_metrics(async_req=True) @@ -54,7 +54,7 @@ def get_metrics(self, **kwargs): # noqa: E501,D401,D403 def get_metrics_with_http_info(self, **kwargs): # noqa: E501,D401,D403 """Retrieve workload performance metrics. - Returns metrics about the workload performance of an InfluxDB instance. Use this endpoint to get performance, resource, and usage metrics. #### Related guides - For the list of metrics categories, see [InfluxDB OSS metrics](https://docs.influxdata.com/influxdb/v2.2/reference/internals/metrics/). - Learn how to use InfluxDB to [scrape Prometheus metrics](https://docs.influxdata.com/influxdb/v2.2write-data/developer-tools/scrape-prometheus-metrics/). - Learn how InfluxDB [parses the Prometheus exposition format](https://docs.influxdata.com/influxdb/v2.2/reference/prometheus-metrics/). + Returns metrics about the workload performance of an InfluxDB instance. Use this endpoint to get performance, resource, and usage metrics. #### Related guides - For the list of metrics categories, see [InfluxDB OSS metrics](https://docs.influxdata.com/influxdb/latest/reference/internals/metrics/). - Learn how to use InfluxDB to [scrape Prometheus metrics](https://docs.influxdata.com/influxdb/latest/write-data/developer-tools/scrape-prometheus-metrics/). - Learn how InfluxDB [parses the Prometheus exposition format](https://docs.influxdata.com/influxdb/latest/reference/prometheus-metrics/). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_metrics_with_http_info(async_req=True) @@ -67,7 +67,7 @@ def get_metrics_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_metrics_prepare(**kwargs) + self._get_metrics_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/metrics', 'GET', @@ -89,7 +89,7 @@ def get_metrics_with_http_info(self, **kwargs): # noqa: E501,D401,D403 async def get_metrics_async(self, **kwargs): # noqa: E501,D401,D403 """Retrieve workload performance metrics. - Returns metrics about the workload performance of an InfluxDB instance. Use this endpoint to get performance, resource, and usage metrics. #### Related guides - For the list of metrics categories, see [InfluxDB OSS metrics](https://docs.influxdata.com/influxdb/v2.2/reference/internals/metrics/). - Learn how to use InfluxDB to [scrape Prometheus metrics](https://docs.influxdata.com/influxdb/v2.2write-data/developer-tools/scrape-prometheus-metrics/). - Learn how InfluxDB [parses the Prometheus exposition format](https://docs.influxdata.com/influxdb/v2.2/reference/prometheus-metrics/). + Returns metrics about the workload performance of an InfluxDB instance. Use this endpoint to get performance, resource, and usage metrics. #### Related guides - For the list of metrics categories, see [InfluxDB OSS metrics](https://docs.influxdata.com/influxdb/latest/reference/internals/metrics/). - Learn how to use InfluxDB to [scrape Prometheus metrics](https://docs.influxdata.com/influxdb/latest/write-data/developer-tools/scrape-prometheus-metrics/). - Learn how InfluxDB [parses the Prometheus exposition format](https://docs.influxdata.com/influxdb/latest/reference/prometheus-metrics/). This method makes an asynchronous HTTP request. :param async_req bool @@ -99,7 +99,7 @@ async def get_metrics_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_metrics_prepare(**kwargs) + self._get_metrics_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/metrics', 'GET', diff --git a/influxdb_client/service/notification_endpoints_service.py b/influxdb_client/service/notification_endpoints_service.py index 8b9bb174..151b486a 100644 --- a/influxdb_client/service/notification_endpoints_service.py +++ b/influxdb_client/service/notification_endpoints_service.py @@ -65,7 +65,7 @@ def create_notification_endpoint_with_http_info(self, post_notification_endpoint returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._create_notification_endpoint_prepare(post_notification_endpoint, **kwargs) + self._create_notification_endpoint_prepare(post_notification_endpoint, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/notificationEndpoints', 'POST', @@ -96,7 +96,7 @@ async def create_notification_endpoint_async(self, post_notification_endpoint, * returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._create_notification_endpoint_prepare(post_notification_endpoint, **kwargs) + self._create_notification_endpoint_prepare(post_notification_endpoint, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/notificationEndpoints', 'POST', @@ -182,7 +182,7 @@ def delete_notification_endpoints_id_with_http_info(self, endpoint_id, **kwargs) returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_notification_endpoints_id_prepare(endpoint_id, **kwargs) + self._delete_notification_endpoints_id_prepare(endpoint_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/notificationEndpoints/{endpointID}', 'DELETE', @@ -214,7 +214,7 @@ async def delete_notification_endpoints_id_async(self, endpoint_id, **kwargs): returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_notification_endpoints_id_prepare(endpoint_id, **kwargs) + self._delete_notification_endpoints_id_prepare(endpoint_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/notificationEndpoints/{endpointID}', 'DELETE', @@ -300,7 +300,7 @@ def delete_notification_endpoints_id_labels_id_with_http_info(self, endpoint_id, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_notification_endpoints_id_labels_id_prepare(endpoint_id, label_id, **kwargs) + self._delete_notification_endpoints_id_labels_id_prepare(endpoint_id, label_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/notificationEndpoints/{endpointID}/labels/{labelID}', 'DELETE', @@ -333,7 +333,7 @@ async def delete_notification_endpoints_id_labels_id_async(self, endpoint_id, la returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_notification_endpoints_id_labels_id_prepare(endpoint_id, label_id, **kwargs) + self._delete_notification_endpoints_id_labels_id_prepare(endpoint_id, label_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/notificationEndpoints/{endpointID}/labels/{labelID}', 'DELETE', @@ -396,8 +396,8 @@ def get_notification_endpoints(self, org_id, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str org_id: Only show notification endpoints that belong to specific organization ID. (required) :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: + :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`. :return: NotificationEndpoints If the method is called asynchronously, returns the request thread. @@ -420,14 +420,14 @@ def get_notification_endpoints_with_http_info(self, org_id, **kwargs): # noqa: :param async_req bool :param str org_id: Only show notification endpoints that belong to specific organization ID. (required) :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: + :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`. :return: NotificationEndpoints If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_endpoints_prepare(org_id, **kwargs) + self._get_notification_endpoints_prepare(org_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/notificationEndpoints', 'GET', @@ -454,14 +454,14 @@ async def get_notification_endpoints_async(self, org_id, **kwargs): # noqa: E50 :param async_req bool :param str org_id: Only show notification endpoints that belong to specific organization ID. (required) :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: + :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`. :return: NotificationEndpoints If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_endpoints_prepare(org_id, **kwargs) + self._get_notification_endpoints_prepare(org_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/notificationEndpoints', 'GET', @@ -555,7 +555,7 @@ def get_notification_endpoints_id_with_http_info(self, endpoint_id, **kwargs): returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_endpoints_id_prepare(endpoint_id, **kwargs) + self._get_notification_endpoints_id_prepare(endpoint_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/notificationEndpoints/{endpointID}', 'GET', @@ -587,7 +587,7 @@ async def get_notification_endpoints_id_async(self, endpoint_id, **kwargs): # n returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_endpoints_id_prepare(endpoint_id, **kwargs) + self._get_notification_endpoints_id_prepare(endpoint_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/notificationEndpoints/{endpointID}', 'GET', @@ -671,7 +671,7 @@ def get_notification_endpoints_id_labels_with_http_info(self, endpoint_id, **kwa returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_endpoints_id_labels_prepare(endpoint_id, **kwargs) + self._get_notification_endpoints_id_labels_prepare(endpoint_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/notificationEndpoints/{endpointID}/labels', 'GET', @@ -703,7 +703,7 @@ async def get_notification_endpoints_id_labels_async(self, endpoint_id, **kwargs returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_endpoints_id_labels_prepare(endpoint_id, **kwargs) + self._get_notification_endpoints_id_labels_prepare(endpoint_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/notificationEndpoints/{endpointID}/labels', 'GET', @@ -789,7 +789,7 @@ def patch_notification_endpoints_id_with_http_info(self, endpoint_id, notificati returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_notification_endpoints_id_prepare(endpoint_id, notification_endpoint_update, **kwargs) + self._patch_notification_endpoints_id_prepare(endpoint_id, notification_endpoint_update, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/notificationEndpoints/{endpointID}', 'PATCH', @@ -822,7 +822,7 @@ async def patch_notification_endpoints_id_async(self, endpoint_id, notification_ returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_notification_endpoints_id_prepare(endpoint_id, notification_endpoint_update, **kwargs) + self._patch_notification_endpoints_id_prepare(endpoint_id, notification_endpoint_update, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/notificationEndpoints/{endpointID}', 'PATCH', @@ -918,7 +918,7 @@ def post_notification_endpoint_id_labels_with_http_info(self, endpoint_id, label returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_notification_endpoint_id_labels_prepare(endpoint_id, label_mapping, **kwargs) + self._post_notification_endpoint_id_labels_prepare(endpoint_id, label_mapping, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/notificationEndpoints/{endpointID}/labels', 'POST', @@ -951,7 +951,7 @@ async def post_notification_endpoint_id_labels_async(self, endpoint_id, label_ma returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_notification_endpoint_id_labels_prepare(endpoint_id, label_mapping, **kwargs) + self._post_notification_endpoint_id_labels_prepare(endpoint_id, label_mapping, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/notificationEndpoints/{endpointID}/labels', 'POST', @@ -1047,7 +1047,7 @@ def put_notification_endpoints_id_with_http_info(self, endpoint_id, notification returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._put_notification_endpoints_id_prepare(endpoint_id, notification_endpoint, **kwargs) + self._put_notification_endpoints_id_prepare(endpoint_id, notification_endpoint, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/notificationEndpoints/{endpointID}', 'PUT', @@ -1080,7 +1080,7 @@ async def put_notification_endpoints_id_async(self, endpoint_id, notification_en returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._put_notification_endpoints_id_prepare(endpoint_id, notification_endpoint, **kwargs) + self._put_notification_endpoints_id_prepare(endpoint_id, notification_endpoint, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/notificationEndpoints/{endpointID}', 'PUT', diff --git a/influxdb_client/service/notification_rules_service.py b/influxdb_client/service/notification_rules_service.py index 7af5dd38..208feebb 100644 --- a/influxdb_client/service/notification_rules_service.py +++ b/influxdb_client/service/notification_rules_service.py @@ -65,7 +65,7 @@ def create_notification_rule_with_http_info(self, post_notification_rule, **kwar returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._create_notification_rule_prepare(post_notification_rule, **kwargs) + self._create_notification_rule_prepare(post_notification_rule, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/notificationRules', 'POST', @@ -96,7 +96,7 @@ async def create_notification_rule_async(self, post_notification_rule, **kwargs) returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._create_notification_rule_prepare(post_notification_rule, **kwargs) + self._create_notification_rule_prepare(post_notification_rule, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/notificationRules', 'POST', @@ -182,7 +182,7 @@ def delete_notification_rules_id_with_http_info(self, rule_id, **kwargs): # noq returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_notification_rules_id_prepare(rule_id, **kwargs) + self._delete_notification_rules_id_prepare(rule_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/notificationRules/{ruleID}', 'DELETE', @@ -214,7 +214,7 @@ async def delete_notification_rules_id_async(self, rule_id, **kwargs): # noqa: returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_notification_rules_id_prepare(rule_id, **kwargs) + self._delete_notification_rules_id_prepare(rule_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/notificationRules/{ruleID}', 'DELETE', @@ -300,7 +300,7 @@ def delete_notification_rules_id_labels_id_with_http_info(self, rule_id, label_i returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_notification_rules_id_labels_id_prepare(rule_id, label_id, **kwargs) + self._delete_notification_rules_id_labels_id_prepare(rule_id, label_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/notificationRules/{ruleID}/labels/{labelID}', 'DELETE', @@ -333,7 +333,7 @@ async def delete_notification_rules_id_labels_id_async(self, rule_id, label_id, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_notification_rules_id_labels_id_prepare(rule_id, label_id, **kwargs) + self._delete_notification_rules_id_labels_id_prepare(rule_id, label_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/notificationRules/{ruleID}/labels/{labelID}', 'DELETE', @@ -396,8 +396,8 @@ def get_notification_rules(self, org_id, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str org_id: Only show notification rules that belong to a specific organization ID. (required) :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: + :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 str check_id: Only show notifications that belong to the specific check ID. :param str tag: Only return notification rules that "would match" statuses which contain the tag key value pairs provided. :return: NotificationRules @@ -422,8 +422,8 @@ def get_notification_rules_with_http_info(self, org_id, **kwargs): # noqa: E501 :param async_req bool :param str org_id: Only show notification rules that belong to a specific organization ID. (required) :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: + :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 str check_id: Only show notifications that belong to the specific check ID. :param str tag: Only return notification rules that "would match" statuses which contain the tag key value pairs provided. :return: NotificationRules @@ -431,7 +431,7 @@ def get_notification_rules_with_http_info(self, org_id, **kwargs): # noqa: E501 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_rules_prepare(org_id, **kwargs) + self._get_notification_rules_prepare(org_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/notificationRules', 'GET', @@ -458,8 +458,8 @@ async def get_notification_rules_async(self, org_id, **kwargs): # noqa: E501,D4 :param async_req bool :param str org_id: Only show notification rules that belong to a specific organization ID. (required) :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: + :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 str check_id: Only show notifications that belong to the specific check ID. :param str tag: Only return notification rules that "would match" statuses which contain the tag key value pairs provided. :return: NotificationRules @@ -467,7 +467,7 @@ async def get_notification_rules_async(self, org_id, **kwargs): # noqa: E501,D4 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_rules_prepare(org_id, **kwargs) + self._get_notification_rules_prepare(org_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/notificationRules', 'GET', @@ -567,7 +567,7 @@ def get_notification_rules_id_with_http_info(self, rule_id, **kwargs): # noqa: returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_rules_id_prepare(rule_id, **kwargs) + self._get_notification_rules_id_prepare(rule_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/notificationRules/{ruleID}', 'GET', @@ -599,7 +599,7 @@ async def get_notification_rules_id_async(self, rule_id, **kwargs): # noqa: E50 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_rules_id_prepare(rule_id, **kwargs) + self._get_notification_rules_id_prepare(rule_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/notificationRules/{ruleID}', 'GET', @@ -683,7 +683,7 @@ def get_notification_rules_id_labels_with_http_info(self, rule_id, **kwargs): # returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_rules_id_labels_prepare(rule_id, **kwargs) + self._get_notification_rules_id_labels_prepare(rule_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/notificationRules/{ruleID}/labels', 'GET', @@ -715,7 +715,7 @@ async def get_notification_rules_id_labels_async(self, rule_id, **kwargs): # no returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_rules_id_labels_prepare(rule_id, **kwargs) + self._get_notification_rules_id_labels_prepare(rule_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/notificationRules/{ruleID}/labels', 'GET', @@ -801,7 +801,7 @@ def patch_notification_rules_id_with_http_info(self, rule_id, notification_rule_ returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_notification_rules_id_prepare(rule_id, notification_rule_update, **kwargs) + self._patch_notification_rules_id_prepare(rule_id, notification_rule_update, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/notificationRules/{ruleID}', 'PATCH', @@ -834,7 +834,7 @@ async def patch_notification_rules_id_async(self, rule_id, notification_rule_upd returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_notification_rules_id_prepare(rule_id, notification_rule_update, **kwargs) + self._patch_notification_rules_id_prepare(rule_id, notification_rule_update, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/notificationRules/{ruleID}', 'PATCH', @@ -930,7 +930,7 @@ def post_notification_rule_id_labels_with_http_info(self, rule_id, label_mapping returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_notification_rule_id_labels_prepare(rule_id, label_mapping, **kwargs) + self._post_notification_rule_id_labels_prepare(rule_id, label_mapping, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/notificationRules/{ruleID}/labels', 'POST', @@ -963,7 +963,7 @@ async def post_notification_rule_id_labels_async(self, rule_id, label_mapping, * returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_notification_rule_id_labels_prepare(rule_id, label_mapping, **kwargs) + self._post_notification_rule_id_labels_prepare(rule_id, label_mapping, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/notificationRules/{ruleID}/labels', 'POST', @@ -1059,7 +1059,7 @@ def put_notification_rules_id_with_http_info(self, rule_id, notification_rule, * returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._put_notification_rules_id_prepare(rule_id, notification_rule, **kwargs) + self._put_notification_rules_id_prepare(rule_id, notification_rule, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/notificationRules/{ruleID}', 'PUT', @@ -1092,7 +1092,7 @@ async def put_notification_rules_id_async(self, rule_id, notification_rule, **kw returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._put_notification_rules_id_prepare(rule_id, notification_rule, **kwargs) + self._put_notification_rules_id_prepare(rule_id, notification_rule, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/notificationRules/{ruleID}', 'PUT', diff --git a/influxdb_client/service/organizations_service.py b/influxdb_client/service/organizations_service.py index d8bddadb..6d845a31 100644 --- a/influxdb_client/service/organizations_service.py +++ b/influxdb_client/service/organizations_service.py @@ -32,6 +32,7 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 def delete_orgs_id(self, org_id, **kwargs): # noqa: E501,D401,D403 """Delete 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) @@ -54,6 +55,7 @@ def delete_orgs_id(self, org_id, **kwargs): # noqa: E501,D401,D403 def delete_orgs_id_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D403 """Delete 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) @@ -67,7 +69,7 @@ def delete_orgs_id_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D4 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_orgs_id_prepare(org_id, **kwargs) + self._delete_orgs_id_prepare(org_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/orgs/{orgID}', 'DELETE', @@ -89,6 +91,7 @@ def delete_orgs_id_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D4 async def delete_orgs_id_async(self, org_id, **kwargs): # noqa: E501,D401,D403 """Delete 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 @@ -99,7 +102,7 @@ async def delete_orgs_id_async(self, org_id, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_orgs_id_prepare(org_id, **kwargs) + self._delete_orgs_id_prepare(org_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/orgs/{orgID}', 'DELETE', @@ -148,14 +151,15 @@ def _delete_orgs_id_prepare(self, org_id, **kwargs): # noqa: E501,D401,D403 def delete_orgs_id_members_id(self, user_id, org_id, **kwargs): # noqa: E501,D401,D403 """Remove 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 member to remove. (required) - :param str org_id: The organization ID. (required) + :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, @@ -171,21 +175,22 @@ def delete_orgs_id_members_id(self, user_id, org_id, **kwargs): # noqa: E501,D4 def delete_orgs_id_members_id_with_http_info(self, user_id, org_id, **kwargs): # noqa: E501,D401,D403 """Remove 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 member to remove. (required) - :param str org_id: The organization ID. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_orgs_id_members_id_prepare(user_id, org_id, **kwargs) + self._delete_orgs_id_members_id_prepare(user_id, org_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/orgs/{orgID}/members/{userID}', 'DELETE', @@ -207,18 +212,19 @@ def delete_orgs_id_members_id_with_http_info(self, user_id, org_id, **kwargs): async def delete_orgs_id_members_id_async(self, user_id, org_id, **kwargs): # noqa: E501,D401,D403 """Remove 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 member to remove. (required) - :param str org_id: The organization ID. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_orgs_id_members_id_prepare(user_id, org_id, **kwargs) + self._delete_orgs_id_members_id_prepare(user_id, org_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/orgs/{orgID}/members/{userID}', 'DELETE', @@ -273,14 +279,15 @@ def _delete_orgs_id_members_id_prepare(self, user_id, org_id, **kwargs): # noqa def delete_orgs_id_owners_id(self, user_id, org_id, **kwargs): # noqa: E501,D401,D403 """Remove 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 owner to remove. (required) - :param str org_id: The organization ID. (required) + :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, @@ -296,21 +303,22 @@ def delete_orgs_id_owners_id(self, user_id, org_id, **kwargs): # noqa: E501,D40 def delete_orgs_id_owners_id_with_http_info(self, user_id, org_id, **kwargs): # noqa: E501,D401,D403 """Remove 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 owner to remove. (required) - :param str org_id: The organization ID. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_orgs_id_owners_id_prepare(user_id, org_id, **kwargs) + self._delete_orgs_id_owners_id_prepare(user_id, org_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/orgs/{orgID}/owners/{userID}', 'DELETE', @@ -332,18 +340,19 @@ def delete_orgs_id_owners_id_with_http_info(self, user_id, org_id, **kwargs): # async def delete_orgs_id_owners_id_async(self, user_id, org_id, **kwargs): # noqa: E501,D401,D403 """Remove 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 an asynchronous HTTP request. :param async_req bool - :param str user_id: The ID of the owner to remove. (required) - :param str org_id: The organization ID. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_orgs_id_owners_id_prepare(user_id, org_id, **kwargs) + self._delete_orgs_id_owners_id_prepare(user_id, org_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/orgs/{orgID}/owners/{userID}', 'DELETE', @@ -396,8 +405,9 @@ def _delete_orgs_id_owners_id_prepare(self, user_id, org_id, **kwargs): # noqa: return local_var_params, path_params, query_params, header_params, body_params def get_orgs(self, **kwargs): # noqa: E501,D401,D403 - """List all organizations. + """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) @@ -405,12 +415,12 @@ def get_orgs(self, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: + :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: Filter organizations to a specific organization name. - :param str org_id: Filter organizations to a specific organization ID. - :param str user_id: Filter organizations to a specific user ID. + :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. @@ -423,8 +433,9 @@ def get_orgs(self, **kwargs): # noqa: E501,D401,D403 return data def get_orgs_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List all organizations. + """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_with_http_info(async_req=True) @@ -432,18 +443,18 @@ def get_orgs_with_http_info(self, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: + :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: Filter organizations to a specific organization name. - :param str org_id: Filter organizations to a specific organization ID. - :param str user_id: Filter organizations to a specific user ID. + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_orgs_prepare(**kwargs) + self._get_orgs_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/orgs', 'GET', @@ -463,24 +474,25 @@ def get_orgs_with_http_info(self, **kwargs): # noqa: E501,D401,D403 urlopen_kw=kwargs.get('urlopen_kw', None)) async def get_orgs_async(self, **kwargs): # noqa: E501,D401,D403 - """List all organizations. + """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 an asynchronous HTTP request. :param async_req bool :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: + :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: Filter organizations to a specific organization name. - :param str org_id: Filter organizations to a specific organization ID. - :param str user_id: Filter organizations to a specific user ID. + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_orgs_prepare(**kwargs) + self._get_orgs_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/orgs', 'GET', @@ -541,13 +553,14 @@ def _get_orgs_prepare(self, **kwargs): # noqa: E501,D401,D403 def get_orgs_id(self, org_id, **kwargs): # noqa: E501,D401,D403 """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(org_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str org_id: The ID of the organization to get. (required) + :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, @@ -563,20 +576,21 @@ def get_orgs_id(self, org_id, **kwargs): # noqa: E501,D401,D403 def get_orgs_id_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D403 """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 get. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_orgs_id_prepare(org_id, **kwargs) + self._get_orgs_id_prepare(org_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/orgs/{orgID}', 'GET', @@ -598,17 +612,18 @@ def get_orgs_id_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D403 async def get_orgs_id_async(self, org_id, **kwargs): # noqa: E501,D401,D403 """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 an asynchronous HTTP request. :param async_req bool - :param str org_id: The ID of the organization to get. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_orgs_id_prepare(org_id, **kwargs) + self._get_orgs_id_prepare(org_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/orgs/{orgID}', 'GET', @@ -657,13 +672,14 @@ def _get_orgs_id_prepare(self, org_id, **kwargs): # noqa: E501,D401,D403 def get_orgs_id_members(self, org_id, **kwargs): # noqa: E501,D401,D403 """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 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 organization ID. (required) + :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, @@ -679,20 +695,21 @@ def get_orgs_id_members(self, org_id, **kwargs): # noqa: E501,D401,D403 def get_orgs_id_members_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D403 """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 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 organization ID. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_orgs_id_members_prepare(org_id, **kwargs) + self._get_orgs_id_members_prepare(org_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/orgs/{orgID}/members', 'GET', @@ -714,17 +731,18 @@ def get_orgs_id_members_with_http_info(self, org_id, **kwargs): # noqa: E501,D4 async def get_orgs_id_members_async(self, org_id, **kwargs): # noqa: E501,D401,D403 """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 organization ID. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_orgs_id_members_prepare(org_id, **kwargs) + self._get_orgs_id_members_prepare(org_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/orgs/{orgID}/members', 'GET', @@ -773,13 +791,14 @@ def _get_orgs_id_members_prepare(self, org_id, **kwargs): # noqa: E501,D401,D40 def get_orgs_id_owners(self, org_id, **kwargs): # noqa: E501,D401,D403 """List 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 organization ID. (required) + :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, @@ -795,20 +814,21 @@ def get_orgs_id_owners(self, org_id, **kwargs): # noqa: E501,D401,D403 def get_orgs_id_owners_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D403 """List 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 organization ID. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_orgs_id_owners_prepare(org_id, **kwargs) + self._get_orgs_id_owners_prepare(org_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/orgs/{orgID}/owners', 'GET', @@ -830,17 +850,18 @@ def get_orgs_id_owners_with_http_info(self, org_id, **kwargs): # noqa: E501,D40 async def get_orgs_id_owners_async(self, org_id, **kwargs): # noqa: E501,D401,D403 """List 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 organization ID. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_orgs_id_owners_prepare(org_id, **kwargs) + self._get_orgs_id_owners_prepare(org_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/orgs/{orgID}/owners', 'GET', @@ -889,14 +910,15 @@ def _get_orgs_id_owners_prepare(self, org_id, **kwargs): # noqa: E501,D401,D403 def patch_orgs_id(self, org_id, patch_organization_request, **kwargs): # noqa: E501,D401,D403 """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 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 get. (required) - :param PatchOrganizationRequest patch_organization_request: Organization update to apply (required) + :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, @@ -912,21 +934,22 @@ def patch_orgs_id(self, org_id, patch_organization_request, **kwargs): # noqa: def patch_orgs_id_with_http_info(self, org_id, patch_organization_request, **kwargs): # noqa: E501,D401,D403 """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 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 get. (required) - :param PatchOrganizationRequest patch_organization_request: Organization update to apply (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_orgs_id_prepare(org_id, patch_organization_request, **kwargs) + self._patch_orgs_id_prepare(org_id, patch_organization_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/orgs/{orgID}', 'PATCH', @@ -948,18 +971,19 @@ def patch_orgs_id_with_http_info(self, org_id, patch_organization_request, **kwa async def patch_orgs_id_async(self, org_id, patch_organization_request, **kwargs): # noqa: E501,D401,D403 """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 get. (required) - :param PatchOrganizationRequest patch_organization_request: Organization update to apply (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_orgs_id_prepare(org_id, patch_organization_request, **kwargs) + self._patch_orgs_id_prepare(org_id, patch_organization_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/orgs/{orgID}', 'PATCH', @@ -1018,13 +1042,14 @@ def _patch_orgs_id_prepare(self, org_id, patch_organization_request, **kwargs): def post_orgs(self, post_organization_request, **kwargs): # noqa: E501,D401,D403 """Create 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: Organization to create (required) + :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, @@ -1040,20 +1065,21 @@ def post_orgs(self, post_organization_request, **kwargs): # noqa: E501,D401,D40 def post_orgs_with_http_info(self, post_organization_request, **kwargs): # noqa: E501,D401,D403 """Create 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: Organization to create (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_orgs_prepare(post_organization_request, **kwargs) + self._post_orgs_prepare(post_organization_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/orgs', 'POST', @@ -1075,17 +1101,18 @@ def post_orgs_with_http_info(self, post_organization_request, **kwargs): # noqa async def post_orgs_async(self, post_organization_request, **kwargs): # noqa: E501,D401,D403 """Create 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: Organization to create (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_orgs_prepare(post_organization_request, **kwargs) + self._post_orgs_prepare(post_organization_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/orgs', 'POST', @@ -1138,14 +1165,15 @@ def _post_orgs_prepare(self, post_organization_request, **kwargs): # noqa: E501 def post_orgs_id_members(self, org_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 """Add 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 organization ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (required) + :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, @@ -1161,21 +1189,22 @@ def post_orgs_id_members(self, org_id, add_resource_member_request_body, **kwarg def post_orgs_id_members_with_http_info(self, org_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 """Add 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 organization ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_orgs_id_members_prepare(org_id, add_resource_member_request_body, **kwargs) + self._post_orgs_id_members_prepare(org_id, add_resource_member_request_body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/orgs/{orgID}/members', 'POST', @@ -1197,18 +1226,19 @@ def post_orgs_id_members_with_http_info(self, org_id, add_resource_member_reques async def post_orgs_id_members_async(self, org_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 """Add 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 organization ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_orgs_id_members_prepare(org_id, add_resource_member_request_body, **kwargs) + self._post_orgs_id_members_prepare(org_id, add_resource_member_request_body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/orgs/{orgID}/members', 'POST', @@ -1267,14 +1297,15 @@ def _post_orgs_id_members_prepare(self, org_id, add_resource_member_request_body def post_orgs_id_owners(self, org_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 """Add 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 organization ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (required) + :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, @@ -1290,21 +1321,22 @@ def post_orgs_id_owners(self, org_id, add_resource_member_request_body, **kwargs def post_orgs_id_owners_with_http_info(self, org_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 """Add 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 organization ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_orgs_id_owners_prepare(org_id, add_resource_member_request_body, **kwargs) + self._post_orgs_id_owners_prepare(org_id, add_resource_member_request_body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/orgs/{orgID}/owners', 'POST', @@ -1326,18 +1358,19 @@ def post_orgs_id_owners_with_http_info(self, org_id, add_resource_member_request async def post_orgs_id_owners_async(self, org_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 """Add 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 organization ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_orgs_id_owners_prepare(org_id, add_resource_member_request_body, **kwargs) + self._post_orgs_id_owners_prepare(org_id, add_resource_member_request_body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/orgs/{orgID}/owners', 'POST', diff --git a/influxdb_client/service/ping_service.py b/influxdb_client/service/ping_service.py index a75854b0..2d89a745 100644 --- a/influxdb_client/service/ping_service.py +++ b/influxdb_client/service/ping_service.py @@ -30,9 +30,9 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 super().__init__(api_client) def get_ping(self, **kwargs): # noqa: E501,D401,D403 - """Get the status and version of the instance. + """Get the status of the instance. - Returns the status and InfluxDB version of the instance. + Retrieves the status and InfluxDB version of the instance. Use this endpoint to monitor uptime for the InfluxDB instance. The response returns a HTTP `204` status code to inform you the instance is available. #### InfluxDB Cloud - Isn't versioned and doesn't return `X-Influxdb-Version` in the headers. #### Related guides - [Influx ping](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/ping/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_ping(async_req=True) @@ -51,9 +51,9 @@ def get_ping(self, **kwargs): # noqa: E501,D401,D403 return data def get_ping_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Get the status and version of the instance. + """Get the status of the instance. - Returns the status and InfluxDB version of the instance. + Retrieves the status and InfluxDB version of the instance. Use this endpoint to monitor uptime for the InfluxDB instance. The response returns a HTTP `204` status code to inform you the instance is available. #### InfluxDB Cloud - Isn't versioned and doesn't return `X-Influxdb-Version` in the headers. #### Related guides - [Influx ping](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/ping/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_ping_with_http_info(async_req=True) @@ -65,7 +65,7 @@ def get_ping_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_ping_prepare(**kwargs) + self._get_ping_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/ping', 'GET', @@ -85,9 +85,9 @@ def get_ping_with_http_info(self, **kwargs): # noqa: E501,D401,D403 urlopen_kw=kwargs.get('urlopen_kw', None)) async def get_ping_async(self, **kwargs): # noqa: E501,D401,D403 - """Get the status and version of the instance. + """Get the status of the instance. - Returns the status and InfluxDB version of the instance. + Retrieves the status and InfluxDB version of the instance. Use this endpoint to monitor uptime for the InfluxDB instance. The response returns a HTTP `204` status code to inform you the instance is available. #### InfluxDB Cloud - Isn't versioned and doesn't return `X-Influxdb-Version` in the headers. #### Related guides - [Influx ping](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/ping/) This method makes an asynchronous HTTP request. :param async_req bool @@ -96,7 +96,7 @@ async def get_ping_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_ping_prepare(**kwargs) + self._get_ping_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/ping', 'GET', @@ -131,9 +131,9 @@ def _get_ping_prepare(self, **kwargs): # noqa: E501,D401,D403 return local_var_params, path_params, query_params, header_params, body_params def head_ping(self, **kwargs): # noqa: E501,D401,D403 - """Get the status and version of the instance. + """Get the status of the instance. - Returns the status and InfluxDB version of the instance. + Returns the status and InfluxDB version of the instance. Use this endpoint to monitor uptime for the InfluxDB instance. The response returns a HTTP `204` status code to inform you the instance is available. #### InfluxDB Cloud - Isn't versioned and doesn't return `X-Influxdb-Version` in the headers. #### Related guides - [Influx ping](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/ping/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.head_ping(async_req=True) @@ -152,9 +152,9 @@ def head_ping(self, **kwargs): # noqa: E501,D401,D403 return data def head_ping_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Get the status and version of the instance. + """Get the status of the instance. - Returns the status and InfluxDB version of the instance. + Returns the status and InfluxDB version of the instance. Use this endpoint to monitor uptime for the InfluxDB instance. The response returns a HTTP `204` status code to inform you the instance is available. #### InfluxDB Cloud - Isn't versioned and doesn't return `X-Influxdb-Version` in the headers. #### Related guides - [Influx ping](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/ping/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.head_ping_with_http_info(async_req=True) @@ -166,7 +166,7 @@ def head_ping_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._head_ping_prepare(**kwargs) + self._head_ping_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/ping', 'HEAD', @@ -186,9 +186,9 @@ def head_ping_with_http_info(self, **kwargs): # noqa: E501,D401,D403 urlopen_kw=kwargs.get('urlopen_kw', None)) async def head_ping_async(self, **kwargs): # noqa: E501,D401,D403 - """Get the status and version of the instance. + """Get the status of the instance. - Returns the status and InfluxDB version of the instance. + Returns the status and InfluxDB version of the instance. Use this endpoint to monitor uptime for the InfluxDB instance. The response returns a HTTP `204` status code to inform you the instance is available. #### InfluxDB Cloud - Isn't versioned and doesn't return `X-Influxdb-Version` in the headers. #### Related guides - [Influx ping](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/ping/) This method makes an asynchronous HTTP request. :param async_req bool @@ -197,7 +197,7 @@ async def head_ping_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._head_ping_prepare(**kwargs) + self._head_ping_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/ping', 'HEAD', diff --git a/influxdb_client/service/query_service.py b/influxdb_client/service/query_service.py index c0e7351a..0be81222 100644 --- a/influxdb_client/service/query_service.py +++ b/influxdb_client/service/query_service.py @@ -30,8 +30,9 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 super().__init__(api_client) def get_query_suggestions(self, **kwargs): # noqa: E501,D401,D403 - """Retrieve query suggestions. + """List Flux query suggestions. + Lists Flux query suggestions. Each suggestion contains a [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) name and parameters. Use this endpoint to retrieve a list of Flux query suggestions used in the InfluxDB Flux Query Builder. #### Limitations - When writing a query, avoid using `_functionName()` helper functions exposed by this endpoint. Helper function names have an underscore (`_`) prefix and aren't meant to be used directly in queries--for example: - To sort on a column and keep the top n records, use the `top(n, columns=["_value"], tables=<-)` function instead of the `_sortLimit` helper function. `top` uses `_sortLimit`. #### Related Guides - [List of all Flux functions](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_query_suggestions(async_req=True) @@ -51,8 +52,9 @@ def get_query_suggestions(self, **kwargs): # noqa: E501,D401,D403 return data def get_query_suggestions_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Retrieve query suggestions. + """List Flux query suggestions. + Lists Flux query suggestions. Each suggestion contains a [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) name and parameters. Use this endpoint to retrieve a list of Flux query suggestions used in the InfluxDB Flux Query Builder. #### Limitations - When writing a query, avoid using `_functionName()` helper functions exposed by this endpoint. Helper function names have an underscore (`_`) prefix and aren't meant to be used directly in queries--for example: - To sort on a column and keep the top n records, use the `top(n, columns=["_value"], tables=<-)` function instead of the `_sortLimit` helper function. `top` uses `_sortLimit`. #### Related Guides - [List of all Flux functions](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_query_suggestions_with_http_info(async_req=True) @@ -65,7 +67,7 @@ def get_query_suggestions_with_http_info(self, **kwargs): # noqa: E501,D401,D40 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_query_suggestions_prepare(**kwargs) + self._get_query_suggestions_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/query/suggestions', 'GET', @@ -85,8 +87,9 @@ def get_query_suggestions_with_http_info(self, **kwargs): # noqa: E501,D401,D40 urlopen_kw=kwargs.get('urlopen_kw', None)) async def get_query_suggestions_async(self, **kwargs): # noqa: E501,D401,D403 - """Retrieve query suggestions. + """List Flux query suggestions. + Lists Flux query suggestions. Each suggestion contains a [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) name and parameters. Use this endpoint to retrieve a list of Flux query suggestions used in the InfluxDB Flux Query Builder. #### Limitations - When writing a query, avoid using `_functionName()` helper functions exposed by this endpoint. Helper function names have an underscore (`_`) prefix and aren't meant to be used directly in queries--for example: - To sort on a column and keep the top n records, use the `top(n, columns=["_value"], tables=<-)` function instead of the `_sortLimit` helper function. `top` uses `_sortLimit`. #### Related Guides - [List of all Flux functions](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) This method makes an asynchronous HTTP request. :param async_req bool @@ -96,7 +99,7 @@ async def get_query_suggestions_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_query_suggestions_prepare(**kwargs) + self._get_query_suggestions_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/query/suggestions', 'GET', @@ -132,20 +135,21 @@ def _get_query_suggestions_prepare(self, **kwargs): # noqa: E501,D401,D403 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 + ['application/json', 'text/html']) # noqa: E501 return local_var_params, path_params, query_params, header_params, body_params def get_query_suggestions_name(self, name, **kwargs): # noqa: E501,D401,D403 - """Retrieve query suggestions for a branching suggestion. + """Retrieve a query suggestion for a branching suggestion. + Retrieves a query suggestion that contains the name and parameters of the requested function. Use this endpoint to pass a branching suggestion (a Flux function name) and retrieve the parameters of the requested function. #### Limitations - Use `/api/v2/query/suggestions/{name}` (without a trailing slash). `/api/v2/query/suggestions/{name}/` (note the trailing slash) results in a HTTP `301 Moved Permanently` status. - The function `name` must exist and must be spelled correctly. #### Related Guides - [List of all Flux functions](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_query_suggestions_name(name, async_req=True) >>> result = thread.get() :param async_req bool - :param str name: The name of the branching suggestion. (required) + :param str name: A [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) name. (required) :param str zap_trace_span: OpenTracing span context :return: FluxSuggestion If the method is called asynchronously, @@ -159,22 +163,23 @@ def get_query_suggestions_name(self, name, **kwargs): # noqa: E501,D401,D403 return data def get_query_suggestions_name_with_http_info(self, name, **kwargs): # noqa: E501,D401,D403 - """Retrieve query suggestions for a branching suggestion. + """Retrieve a query suggestion for a branching suggestion. + Retrieves a query suggestion that contains the name and parameters of the requested function. Use this endpoint to pass a branching suggestion (a Flux function name) and retrieve the parameters of the requested function. #### Limitations - Use `/api/v2/query/suggestions/{name}` (without a trailing slash). `/api/v2/query/suggestions/{name}/` (note the trailing slash) results in a HTTP `301 Moved Permanently` status. - The function `name` must exist and must be spelled correctly. #### Related Guides - [List of all Flux functions](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_query_suggestions_name_with_http_info(name, async_req=True) >>> result = thread.get() :param async_req bool - :param str name: The name of the branching suggestion. (required) + :param str name: A [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) name. (required) :param str zap_trace_span: OpenTracing span context :return: FluxSuggestion If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_query_suggestions_name_prepare(name, **kwargs) + self._get_query_suggestions_name_prepare(name, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/query/suggestions/{name}', 'GET', @@ -194,19 +199,20 @@ def get_query_suggestions_name_with_http_info(self, name, **kwargs): # noqa: E5 urlopen_kw=kwargs.get('urlopen_kw', None)) async def get_query_suggestions_name_async(self, name, **kwargs): # noqa: E501,D401,D403 - """Retrieve query suggestions for a branching suggestion. + """Retrieve a query suggestion for a branching suggestion. + Retrieves a query suggestion that contains the name and parameters of the requested function. Use this endpoint to pass a branching suggestion (a Flux function name) and retrieve the parameters of the requested function. #### Limitations - Use `/api/v2/query/suggestions/{name}` (without a trailing slash). `/api/v2/query/suggestions/{name}/` (note the trailing slash) results in a HTTP `301 Moved Permanently` status. - The function `name` must exist and must be spelled correctly. #### Related Guides - [List of all Flux functions](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) This method makes an asynchronous HTTP request. :param async_req bool - :param str name: The name of the branching suggestion. (required) + :param str name: A [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) name. (required) :param str zap_trace_span: OpenTracing span context :return: FluxSuggestion If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_query_suggestions_name_prepare(name, **kwargs) + self._get_query_suggestions_name_prepare(name, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/query/suggestions/{name}', 'GET', @@ -255,7 +261,7 @@ def _get_query_suggestions_name_prepare(self, name, **kwargs): # noqa: E501,D40 def post_query(self, **kwargs): # noqa: E501,D401,D403 """Query data. - Retrieves data from buckets. Use this endpoint to send a Flux query request and retreive data from a bucket. #### Rate limits (with InfluxDB Cloud) `read` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Query with the InfluxDB API](https://docs.influxdata.com/influxdb/v2.2/query-data/execute-queries/influx-api/). - [Get started with Flux](https://docs.influxdata.com/flux/v0.x/get-started/) + Retrieves data from buckets. Use this endpoint to send a Flux query request and retrieve data from a bucket. #### Rate limits (with InfluxDB Cloud) `read` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Query with the InfluxDB API](https://docs.influxdata.com/influxdb/latest/query-data/execute-queries/influx-api/) - [Get started with Flux](https://docs.influxdata.com/flux/v0.x/get-started/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_query(async_req=True) @@ -265,8 +271,8 @@ def post_query(self, **kwargs): # noqa: E501,D401,D403 :param str zap_trace_span: OpenTracing span context :param str accept_encoding: The content encoding (usually a compression algorithm) that the client can understand. :param str content_type: - :param str org: The name or ID of the organization executing the query. #### InfluxDB Cloud - Doesn't use `org` or `orgID`. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - :param str org_id: The ID of the organization executing the query. #### InfluxDB Cloud - Doesn't use `org` or `orgID`. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. + :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. + :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. :param Query query: Flux query or specification to execute :return: str If the method is called asynchronously, @@ -282,7 +288,7 @@ def post_query(self, **kwargs): # noqa: E501,D401,D403 def post_query_with_http_info(self, **kwargs): # noqa: E501,D401,D403 """Query data. - Retrieves data from buckets. Use this endpoint to send a Flux query request and retreive data from a bucket. #### Rate limits (with InfluxDB Cloud) `read` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Query with the InfluxDB API](https://docs.influxdata.com/influxdb/v2.2/query-data/execute-queries/influx-api/). - [Get started with Flux](https://docs.influxdata.com/flux/v0.x/get-started/) + Retrieves data from buckets. Use this endpoint to send a Flux query request and retrieve data from a bucket. #### Rate limits (with InfluxDB Cloud) `read` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Query with the InfluxDB API](https://docs.influxdata.com/influxdb/latest/query-data/execute-queries/influx-api/) - [Get started with Flux](https://docs.influxdata.com/flux/v0.x/get-started/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_query_with_http_info(async_req=True) @@ -292,15 +298,15 @@ def post_query_with_http_info(self, **kwargs): # noqa: E501,D401,D403 :param str zap_trace_span: OpenTracing span context :param str accept_encoding: The content encoding (usually a compression algorithm) that the client can understand. :param str content_type: - :param str org: The name or ID of the organization executing the query. #### InfluxDB Cloud - Doesn't use `org` or `orgID`. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - :param str org_id: The ID of the organization executing the query. #### InfluxDB Cloud - Doesn't use `org` or `orgID`. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. + :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. + :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. :param Query query: Flux query or specification to execute :return: str If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_query_prepare(**kwargs) + self._post_query_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/query', 'POST', @@ -322,22 +328,22 @@ def post_query_with_http_info(self, **kwargs): # noqa: E501,D401,D403 async def post_query_async(self, **kwargs): # noqa: E501,D401,D403 """Query data. - Retrieves data from buckets. Use this endpoint to send a Flux query request and retreive data from a bucket. #### Rate limits (with InfluxDB Cloud) `read` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Query with the InfluxDB API](https://docs.influxdata.com/influxdb/v2.2/query-data/execute-queries/influx-api/). - [Get started with Flux](https://docs.influxdata.com/flux/v0.x/get-started/) + Retrieves data from buckets. Use this endpoint to send a Flux query request and retrieve data from a bucket. #### Rate limits (with InfluxDB Cloud) `read` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Query with the InfluxDB API](https://docs.influxdata.com/influxdb/latest/query-data/execute-queries/influx-api/) - [Get started with Flux](https://docs.influxdata.com/flux/v0.x/get-started/) This method makes an asynchronous HTTP request. :param async_req bool :param str zap_trace_span: OpenTracing span context :param str accept_encoding: The content encoding (usually a compression algorithm) that the client can understand. :param str content_type: - :param str org: The name or ID of the organization executing the query. #### InfluxDB Cloud - Doesn't use `org` or `orgID`. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - :param str org_id: The ID of the organization executing the query. #### InfluxDB Cloud - Doesn't use `org` or `orgID`. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. + :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. + :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. :param Query query: Flux query or specification to execute :return: str If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_query_prepare(**kwargs) + self._post_query_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/query', 'POST', @@ -383,7 +389,7 @@ def _post_query_prepare(self, **kwargs): # noqa: E501,D401,D403 body_params = local_var_params['query'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['text/csv', 'application/json']) # noqa: E501 + ['application/csv', 'application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 @@ -392,8 +398,9 @@ def _post_query_prepare(self, **kwargs): # noqa: E501,D401,D403 return local_var_params, path_params, query_params, header_params, body_params def post_query_analyze(self, **kwargs): # noqa: E501,D401,D403 - """Analyze a Flux query. + r"""Analyze a Flux query. + Analyzes a [Flux query](https://docs.influxdata.com/flux/v0.x/) for syntax errors and returns the list of errors. In the following sample query, `from()` is missing the property key. ```json { "query": "from(: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")", "type": "flux" } ``` If you pass this in a request to the `/api/v2/analyze` endpoint, InfluxDB returns an `errors` list that contains an error object for the missing key. #### Limitations - The endpoint doesn't validate values in the query--for example: - The following sample query has correct syntax, but contains an incorrect `from()` property key: ```json { "query": "from(foo: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")", "type": "flux" } ``` If you pass this in a request to the `/api/v2/analyze` endpoint, InfluxDB returns an empty `errors` list. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_query_analyze(async_req=True) @@ -415,8 +422,9 @@ def post_query_analyze(self, **kwargs): # noqa: E501,D401,D403 return data def post_query_analyze_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Analyze a Flux query. + r"""Analyze a Flux query. + Analyzes a [Flux query](https://docs.influxdata.com/flux/v0.x/) for syntax errors and returns the list of errors. In the following sample query, `from()` is missing the property key. ```json { "query": "from(: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")", "type": "flux" } ``` If you pass this in a request to the `/api/v2/analyze` endpoint, InfluxDB returns an `errors` list that contains an error object for the missing key. #### Limitations - The endpoint doesn't validate values in the query--for example: - The following sample query has correct syntax, but contains an incorrect `from()` property key: ```json { "query": "from(foo: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")", "type": "flux" } ``` If you pass this in a request to the `/api/v2/analyze` endpoint, InfluxDB returns an empty `errors` list. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_query_analyze_with_http_info(async_req=True) @@ -431,7 +439,7 @@ def post_query_analyze_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_query_analyze_prepare(**kwargs) + self._post_query_analyze_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/query/analyze', 'POST', @@ -451,8 +459,9 @@ def post_query_analyze_with_http_info(self, **kwargs): # noqa: E501,D401,D403 urlopen_kw=kwargs.get('urlopen_kw', None)) async def post_query_analyze_async(self, **kwargs): # noqa: E501,D401,D403 - """Analyze a Flux query. + r"""Analyze a Flux query. + Analyzes a [Flux query](https://docs.influxdata.com/flux/v0.x/) for syntax errors and returns the list of errors. In the following sample query, `from()` is missing the property key. ```json { "query": "from(: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")", "type": "flux" } ``` If you pass this in a request to the `/api/v2/analyze` endpoint, InfluxDB returns an `errors` list that contains an error object for the missing key. #### Limitations - The endpoint doesn't validate values in the query--for example: - The following sample query has correct syntax, but contains an incorrect `from()` property key: ```json { "query": "from(foo: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")", "type": "flux" } ``` If you pass this in a request to the `/api/v2/analyze` endpoint, InfluxDB returns an empty `errors` list. This method makes an asynchronous HTTP request. :param async_req bool @@ -464,7 +473,7 @@ async def post_query_analyze_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_query_analyze_prepare(**kwargs) + self._post_query_analyze_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/query/analyze', 'POST', @@ -513,9 +522,9 @@ def _post_query_analyze_prepare(self, **kwargs): # noqa: E501,D401,D403 return local_var_params, path_params, query_params, header_params, body_params def post_query_ast(self, **kwargs): # noqa: E501,D401,D403 - """Generate an Abstract Syntax Tree (AST) from a query. + r"""Generate a query Abstract Syntax Tree (AST). - Analyzes flux query and generates a query specification. + Analyzes a Flux query and returns a complete package source [Abstract Syntax Tree (AST)](https://docs.influxdata.com/influxdb/latest/reference/glossary/#abstract-syntax-tree-ast) for the query. Use this endpoint for deep query analysis such as debugging unexpected query results. A Flux query AST provides a semantic, tree-like representation with contextual information about the query. The AST illustrates how the query is distributed into different components for execution. #### Limitations - The endpoint doesn't validate values in the query--for example: The following sample Flux query has correct syntax, but contains an incorrect `from()` property key: ```js from(foo: "iot_center") |> range(start: -90d) |> filter(fn: (r) => r._measurement == "environment") ``` The following sample JSON shows how to pass the query in the request body: ```js from(foo: "iot_center") |> range(start: -90d) |> filter(fn: (r) => r._measurement == "environment") ``` The following code sample shows how to pass the query as JSON in the request body: ```json { "query": "from(foo: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")" } ``` Passing this to `/api/v2/query/ast` will return a successful response with a generated AST. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_query_ast(async_req=True) @@ -524,7 +533,7 @@ def post_query_ast(self, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str zap_trace_span: OpenTracing span context :param str content_type: - :param LanguageRequest language_request: Analyzed Flux query to generate abstract syntax tree. + :param LanguageRequest language_request: The Flux query to analyze. :return: ASTResponse If the method is called asynchronously, returns the request thread. @@ -537,9 +546,9 @@ def post_query_ast(self, **kwargs): # noqa: E501,D401,D403 return data def post_query_ast_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Generate an Abstract Syntax Tree (AST) from a query. + r"""Generate a query Abstract Syntax Tree (AST). - Analyzes flux query and generates a query specification. + Analyzes a Flux query and returns a complete package source [Abstract Syntax Tree (AST)](https://docs.influxdata.com/influxdb/latest/reference/glossary/#abstract-syntax-tree-ast) for the query. Use this endpoint for deep query analysis such as debugging unexpected query results. A Flux query AST provides a semantic, tree-like representation with contextual information about the query. The AST illustrates how the query is distributed into different components for execution. #### Limitations - The endpoint doesn't validate values in the query--for example: The following sample Flux query has correct syntax, but contains an incorrect `from()` property key: ```js from(foo: "iot_center") |> range(start: -90d) |> filter(fn: (r) => r._measurement == "environment") ``` The following sample JSON shows how to pass the query in the request body: ```js from(foo: "iot_center") |> range(start: -90d) |> filter(fn: (r) => r._measurement == "environment") ``` The following code sample shows how to pass the query as JSON in the request body: ```json { "query": "from(foo: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")" } ``` Passing this to `/api/v2/query/ast` will return a successful response with a generated AST. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_query_ast_with_http_info(async_req=True) @@ -548,13 +557,13 @@ def post_query_ast_with_http_info(self, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str zap_trace_span: OpenTracing span context :param str content_type: - :param LanguageRequest language_request: Analyzed Flux query to generate abstract syntax tree. + :param LanguageRequest language_request: The Flux query to analyze. :return: ASTResponse If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_query_ast_prepare(**kwargs) + self._post_query_ast_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/query/ast', 'POST', @@ -574,21 +583,21 @@ def post_query_ast_with_http_info(self, **kwargs): # noqa: E501,D401,D403 urlopen_kw=kwargs.get('urlopen_kw', None)) async def post_query_ast_async(self, **kwargs): # noqa: E501,D401,D403 - """Generate an Abstract Syntax Tree (AST) from a query. + r"""Generate a query Abstract Syntax Tree (AST). - Analyzes flux query and generates a query specification. + Analyzes a Flux query and returns a complete package source [Abstract Syntax Tree (AST)](https://docs.influxdata.com/influxdb/latest/reference/glossary/#abstract-syntax-tree-ast) for the query. Use this endpoint for deep query analysis such as debugging unexpected query results. A Flux query AST provides a semantic, tree-like representation with contextual information about the query. The AST illustrates how the query is distributed into different components for execution. #### Limitations - The endpoint doesn't validate values in the query--for example: The following sample Flux query has correct syntax, but contains an incorrect `from()` property key: ```js from(foo: "iot_center") |> range(start: -90d) |> filter(fn: (r) => r._measurement == "environment") ``` The following sample JSON shows how to pass the query in the request body: ```js from(foo: "iot_center") |> range(start: -90d) |> filter(fn: (r) => r._measurement == "environment") ``` The following code sample shows how to pass the query as JSON in the request body: ```json { "query": "from(foo: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")" } ``` Passing this to `/api/v2/query/ast` will return a successful response with a generated AST. This method makes an asynchronous HTTP request. :param async_req bool :param str zap_trace_span: OpenTracing span context :param str content_type: - :param LanguageRequest language_request: Analyzed Flux query to generate abstract syntax tree. + :param LanguageRequest language_request: The Flux query to analyze. :return: ASTResponse If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_query_ast_prepare(**kwargs) + self._post_query_ast_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/query/ast', 'POST', diff --git a/influxdb_client/service/ready_service.py b/influxdb_client/service/ready_service.py index 864ebe73..407435ba 100644 --- a/influxdb_client/service/ready_service.py +++ b/influxdb_client/service/ready_service.py @@ -65,7 +65,7 @@ def get_ready_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_ready_prepare(**kwargs) + self._get_ready_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/ready', 'GET', @@ -96,7 +96,7 @@ async def get_ready_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_ready_prepare(**kwargs) + self._get_ready_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/ready', 'GET', diff --git a/influxdb_client/service/remote_connections_service.py b/influxdb_client/service/remote_connections_service.py index 9f50bd3c..7c591078 100644 --- a/influxdb_client/service/remote_connections_service.py +++ b/influxdb_client/service/remote_connections_service.py @@ -67,7 +67,7 @@ def delete_remote_connection_by_id_with_http_info(self, remote_id, **kwargs): # returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_remote_connection_by_id_prepare(remote_id, **kwargs) + self._delete_remote_connection_by_id_prepare(remote_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/remotes/{remoteID}', 'DELETE', @@ -99,7 +99,7 @@ async def delete_remote_connection_by_id_async(self, remote_id, **kwargs): # no returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_remote_connection_by_id_prepare(remote_id, **kwargs) + self._delete_remote_connection_by_id_prepare(remote_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/remotes/{remoteID}', 'DELETE', @@ -183,7 +183,7 @@ def get_remote_connection_by_id_with_http_info(self, remote_id, **kwargs): # no returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_remote_connection_by_id_prepare(remote_id, **kwargs) + self._get_remote_connection_by_id_prepare(remote_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/remotes/{remoteID}', 'GET', @@ -215,7 +215,7 @@ async def get_remote_connection_by_id_async(self, remote_id, **kwargs): # noqa: returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_remote_connection_by_id_prepare(remote_id, **kwargs) + self._get_remote_connection_by_id_prepare(remote_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/remotes/{remoteID}', 'GET', @@ -303,7 +303,7 @@ def get_remote_connections_with_http_info(self, org_id, **kwargs): # noqa: E501 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_remote_connections_prepare(org_id, **kwargs) + self._get_remote_connections_prepare(org_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/remotes', 'GET', @@ -337,7 +337,7 @@ async def get_remote_connections_async(self, org_id, **kwargs): # noqa: E501,D4 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_remote_connections_prepare(org_id, **kwargs) + self._get_remote_connections_prepare(org_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/remotes', 'GET', @@ -427,7 +427,7 @@ def patch_remote_connection_by_id_with_http_info(self, remote_id, remote_connect returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_remote_connection_by_id_prepare(remote_id, remote_connection_update_request, **kwargs) + self._patch_remote_connection_by_id_prepare(remote_id, remote_connection_update_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/remotes/{remoteID}', 'PATCH', @@ -460,7 +460,7 @@ async def patch_remote_connection_by_id_async(self, remote_id, remote_connection returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_remote_connection_by_id_prepare(remote_id, remote_connection_update_request, **kwargs) + self._patch_remote_connection_by_id_prepare(remote_id, remote_connection_update_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/remotes/{remoteID}', 'PATCH', @@ -552,7 +552,7 @@ def post_remote_connection_with_http_info(self, remote_connection_creation_reque returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_remote_connection_prepare(remote_connection_creation_request, **kwargs) + self._post_remote_connection_prepare(remote_connection_creation_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/remotes', 'POST', @@ -583,7 +583,7 @@ async def post_remote_connection_async(self, remote_connection_creation_request, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_remote_connection_prepare(remote_connection_creation_request, **kwargs) + self._post_remote_connection_prepare(remote_connection_creation_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/remotes', 'POST', diff --git a/influxdb_client/service/replications_service.py b/influxdb_client/service/replications_service.py index de76f24b..2130490a 100644 --- a/influxdb_client/service/replications_service.py +++ b/influxdb_client/service/replications_service.py @@ -67,7 +67,7 @@ def delete_replication_by_id_with_http_info(self, replication_id, **kwargs): # returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_replication_by_id_prepare(replication_id, **kwargs) + self._delete_replication_by_id_prepare(replication_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/replications/{replicationID}', 'DELETE', @@ -99,7 +99,7 @@ async def delete_replication_by_id_async(self, replication_id, **kwargs): # noq returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_replication_by_id_prepare(replication_id, **kwargs) + self._delete_replication_by_id_prepare(replication_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/replications/{replicationID}', 'DELETE', @@ -183,7 +183,7 @@ def get_replication_by_id_with_http_info(self, replication_id, **kwargs): # noq returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_replication_by_id_prepare(replication_id, **kwargs) + self._get_replication_by_id_prepare(replication_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/replications/{replicationID}', 'GET', @@ -215,7 +215,7 @@ async def get_replication_by_id_async(self, replication_id, **kwargs): # noqa: returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_replication_by_id_prepare(replication_id, **kwargs) + self._get_replication_by_id_prepare(replication_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/replications/{replicationID}', 'GET', @@ -305,7 +305,7 @@ def get_replications_with_http_info(self, org_id, **kwargs): # noqa: E501,D401, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_replications_prepare(org_id, **kwargs) + self._get_replications_prepare(org_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/replications', 'GET', @@ -340,7 +340,7 @@ async def get_replications_async(self, org_id, **kwargs): # noqa: E501,D401,D40 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_replications_prepare(org_id, **kwargs) + self._get_replications_prepare(org_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/replications', 'GET', @@ -434,7 +434,7 @@ def patch_replication_by_id_with_http_info(self, replication_id, replication_upd returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_replication_by_id_prepare(replication_id, replication_update_request, **kwargs) + self._patch_replication_by_id_prepare(replication_id, replication_update_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/replications/{replicationID}', 'PATCH', @@ -468,7 +468,7 @@ async def patch_replication_by_id_async(self, replication_id, replication_update returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_replication_by_id_prepare(replication_id, replication_update_request, **kwargs) + self._patch_replication_by_id_prepare(replication_id, replication_update_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/replications/{replicationID}', 'PATCH', @@ -566,7 +566,7 @@ def post_replication_with_http_info(self, replication_creation_request, **kwargs returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_replication_prepare(replication_creation_request, **kwargs) + self._post_replication_prepare(replication_creation_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/replications', 'POST', @@ -599,7 +599,7 @@ async def post_replication_async(self, replication_creation_request, **kwargs): returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_replication_prepare(replication_creation_request, **kwargs) + self._post_replication_prepare(replication_creation_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/replications', 'POST', @@ -689,7 +689,7 @@ def post_validate_replication_by_id_with_http_info(self, replication_id, **kwarg returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_validate_replication_by_id_prepare(replication_id, **kwargs) + self._post_validate_replication_by_id_prepare(replication_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/replications/{replicationID}/validate', 'POST', @@ -721,7 +721,7 @@ async def post_validate_replication_by_id_async(self, replication_id, **kwargs): returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_validate_replication_by_id_prepare(replication_id, **kwargs) + self._post_validate_replication_by_id_prepare(replication_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/replications/{replicationID}/validate', 'POST', diff --git a/influxdb_client/service/resources_service.py b/influxdb_client/service/resources_service.py index ac1af1bd..d86cfe39 100644 --- a/influxdb_client/service/resources_service.py +++ b/influxdb_client/service/resources_service.py @@ -65,7 +65,7 @@ def get_resources_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_resources_prepare(**kwargs) + self._get_resources_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/resources', 'GET', @@ -96,7 +96,7 @@ async def get_resources_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_resources_prepare(**kwargs) + self._get_resources_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/resources', 'GET', diff --git a/influxdb_client/service/restore_service.py b/influxdb_client/service/restore_service.py index 9c6e5681..6275ed01 100644 --- a/influxdb_client/service/restore_service.py +++ b/influxdb_client/service/restore_service.py @@ -71,7 +71,7 @@ def post_restore_bucket_id_with_http_info(self, bucket_id, body, **kwargs): # n returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_bucket_id_prepare(bucket_id, body, **kwargs) + self._post_restore_bucket_id_prepare(bucket_id, body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/restore/bucket/{bucketID}', 'POST', @@ -105,7 +105,7 @@ async def post_restore_bucket_id_async(self, bucket_id, body, **kwargs): # noqa returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_bucket_id_prepare(bucket_id, body, **kwargs) + self._post_restore_bucket_id_prepare(bucket_id, body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/restore/bucket/{bucketID}', 'POST', @@ -201,7 +201,7 @@ def post_restore_bucket_metadata_with_http_info(self, bucket_metadata_manifest, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_bucket_metadata_prepare(bucket_metadata_manifest, **kwargs) + self._post_restore_bucket_metadata_prepare(bucket_metadata_manifest, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/restore/bucketMetadata', 'POST', @@ -233,7 +233,7 @@ async def post_restore_bucket_metadata_async(self, bucket_metadata_manifest, **k returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_bucket_metadata_prepare(bucket_metadata_manifest, **kwargs) + self._post_restore_bucket_metadata_prepare(bucket_metadata_manifest, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/restore/bucketMetadata', 'POST', @@ -325,7 +325,7 @@ def post_restore_kv_with_http_info(self, body, **kwargs): # noqa: E501,D401,D40 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_kv_prepare(body, **kwargs) + self._post_restore_kv_prepare(body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/restore/kv', 'POST', @@ -359,7 +359,7 @@ async def post_restore_kv_async(self, body, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_kv_prepare(body, **kwargs) + self._post_restore_kv_prepare(body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/restore/kv', 'POST', @@ -457,7 +457,7 @@ def post_restore_shard_id_with_http_info(self, shard_id, body, **kwargs): # noq returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_shard_id_prepare(shard_id, body, **kwargs) + self._post_restore_shard_id_prepare(shard_id, body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/restore/shards/{shardID}', 'POST', @@ -492,7 +492,7 @@ async def post_restore_shard_id_async(self, shard_id, body, **kwargs): # noqa: returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_shard_id_prepare(shard_id, body, **kwargs) + self._post_restore_shard_id_prepare(shard_id, body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/restore/shards/{shardID}', 'POST', @@ -594,7 +594,7 @@ def post_restore_sql_with_http_info(self, body, **kwargs): # noqa: E501,D401,D4 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_sql_prepare(body, **kwargs) + self._post_restore_sql_prepare(body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/restore/sql', 'POST', @@ -628,7 +628,7 @@ async def post_restore_sql_async(self, body, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_sql_prepare(body, **kwargs) + self._post_restore_sql_prepare(body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/restore/sql', 'POST', diff --git a/influxdb_client/service/routes_service.py b/influxdb_client/service/routes_service.py index d29acd85..8b79c4f6 100644 --- a/influxdb_client/service/routes_service.py +++ b/influxdb_client/service/routes_service.py @@ -32,6 +32,7 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 def get_routes(self, **kwargs): # noqa: E501,D401,D403 """List all top level routes. + Retrieves all the top level routes for the InfluxDB API. #### Limitations - Only returns top level routes--for example, the response contains `"tasks":"/api/v2/tasks"`, and doesn't contain resource-specific routes for tasks (`/api/v2/tasks/TASK_ID/...`). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_routes(async_req=True) @@ -53,6 +54,7 @@ def get_routes(self, **kwargs): # noqa: E501,D401,D403 def get_routes_with_http_info(self, **kwargs): # noqa: E501,D401,D403 """List all top level routes. + Retrieves all the top level routes for the InfluxDB API. #### Limitations - Only returns top level routes--for example, the response contains `"tasks":"/api/v2/tasks"`, and doesn't contain resource-specific routes for tasks (`/api/v2/tasks/TASK_ID/...`). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_routes_with_http_info(async_req=True) @@ -65,7 +67,7 @@ def get_routes_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_routes_prepare(**kwargs) + self._get_routes_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/', 'GET', @@ -87,6 +89,7 @@ def get_routes_with_http_info(self, **kwargs): # noqa: E501,D401,D403 async def get_routes_async(self, **kwargs): # noqa: E501,D401,D403 """List all top level routes. + Retrieves all the top level routes for the InfluxDB API. #### Limitations - Only returns top level routes--for example, the response contains `"tasks":"/api/v2/tasks"`, and doesn't contain resource-specific routes for tasks (`/api/v2/tasks/TASK_ID/...`). This method makes an asynchronous HTTP request. :param async_req bool @@ -96,7 +99,7 @@ async def get_routes_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_routes_prepare(**kwargs) + self._get_routes_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/', 'GET', diff --git a/influxdb_client/service/rules_service.py b/influxdb_client/service/rules_service.py index 884553af..38a74f4a 100644 --- a/influxdb_client/service/rules_service.py +++ b/influxdb_client/service/rules_service.py @@ -67,7 +67,7 @@ def get_notification_rules_id_query_with_http_info(self, rule_id, **kwargs): # returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_rules_id_query_prepare(rule_id, **kwargs) + self._get_notification_rules_id_query_prepare(rule_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/notificationRules/{ruleID}/query', 'GET', @@ -99,7 +99,7 @@ async def get_notification_rules_id_query_async(self, rule_id, **kwargs): # noq returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_rules_id_query_prepare(rule_id, **kwargs) + self._get_notification_rules_id_query_prepare(rule_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/notificationRules/{ruleID}/query', 'GET', diff --git a/influxdb_client/service/scraper_targets_service.py b/influxdb_client/service/scraper_targets_service.py index 6d6e97c8..144a3931 100644 --- a/influxdb_client/service/scraper_targets_service.py +++ b/influxdb_client/service/scraper_targets_service.py @@ -67,7 +67,7 @@ def delete_scrapers_id_with_http_info(self, scraper_target_id, **kwargs): # noq returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_scrapers_id_prepare(scraper_target_id, **kwargs) + self._delete_scrapers_id_prepare(scraper_target_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}', 'DELETE', @@ -99,7 +99,7 @@ async def delete_scrapers_id_async(self, scraper_target_id, **kwargs): # noqa: returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_scrapers_id_prepare(scraper_target_id, **kwargs) + self._delete_scrapers_id_prepare(scraper_target_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}', 'DELETE', @@ -185,7 +185,7 @@ def delete_scrapers_id_labels_id_with_http_info(self, scraper_target_id, label_i returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_scrapers_id_labels_id_prepare(scraper_target_id, label_id, **kwargs) + self._delete_scrapers_id_labels_id_prepare(scraper_target_id, label_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}/labels/{labelID}', 'DELETE', @@ -218,7 +218,7 @@ async def delete_scrapers_id_labels_id_async(self, scraper_target_id, label_id, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_scrapers_id_labels_id_prepare(scraper_target_id, label_id, **kwargs) + self._delete_scrapers_id_labels_id_prepare(scraper_target_id, label_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}/labels/{labelID}', 'DELETE', @@ -310,7 +310,7 @@ def delete_scrapers_id_members_id_with_http_info(self, user_id, scraper_target_i returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_scrapers_id_members_id_prepare(user_id, scraper_target_id, **kwargs) + self._delete_scrapers_id_members_id_prepare(user_id, scraper_target_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}/members/{userID}', 'DELETE', @@ -343,7 +343,7 @@ async def delete_scrapers_id_members_id_async(self, user_id, scraper_target_id, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_scrapers_id_members_id_prepare(user_id, scraper_target_id, **kwargs) + self._delete_scrapers_id_members_id_prepare(user_id, scraper_target_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}/members/{userID}', 'DELETE', @@ -435,7 +435,7 @@ def delete_scrapers_id_owners_id_with_http_info(self, user_id, scraper_target_id returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_scrapers_id_owners_id_prepare(user_id, scraper_target_id, **kwargs) + self._delete_scrapers_id_owners_id_prepare(user_id, scraper_target_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}/owners/{userID}', 'DELETE', @@ -468,7 +468,7 @@ async def delete_scrapers_id_owners_id_async(self, user_id, scraper_target_id, * returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_scrapers_id_owners_id_prepare(user_id, scraper_target_id, **kwargs) + self._delete_scrapers_id_owners_id_prepare(user_id, scraper_target_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}/owners/{userID}', 'DELETE', @@ -564,7 +564,7 @@ def get_scrapers_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scrapers_prepare(**kwargs) + self._get_scrapers_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scrapers', 'GET', @@ -599,7 +599,7 @@ async def get_scrapers_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scrapers_prepare(**kwargs) + self._get_scrapers_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scrapers', 'GET', @@ -685,7 +685,7 @@ def get_scrapers_id_with_http_info(self, scraper_target_id, **kwargs): # noqa: returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scrapers_id_prepare(scraper_target_id, **kwargs) + self._get_scrapers_id_prepare(scraper_target_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}', 'GET', @@ -717,7 +717,7 @@ async def get_scrapers_id_async(self, scraper_target_id, **kwargs): # noqa: E50 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scrapers_id_prepare(scraper_target_id, **kwargs) + self._get_scrapers_id_prepare(scraper_target_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}', 'GET', @@ -801,7 +801,7 @@ def get_scrapers_id_labels_with_http_info(self, scraper_target_id, **kwargs): # returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scrapers_id_labels_prepare(scraper_target_id, **kwargs) + self._get_scrapers_id_labels_prepare(scraper_target_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}/labels', 'GET', @@ -833,7 +833,7 @@ async def get_scrapers_id_labels_async(self, scraper_target_id, **kwargs): # no returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scrapers_id_labels_prepare(scraper_target_id, **kwargs) + self._get_scrapers_id_labels_prepare(scraper_target_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}/labels', 'GET', @@ -917,7 +917,7 @@ def get_scrapers_id_members_with_http_info(self, scraper_target_id, **kwargs): returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scrapers_id_members_prepare(scraper_target_id, **kwargs) + self._get_scrapers_id_members_prepare(scraper_target_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}/members', 'GET', @@ -949,7 +949,7 @@ async def get_scrapers_id_members_async(self, scraper_target_id, **kwargs): # n returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scrapers_id_members_prepare(scraper_target_id, **kwargs) + self._get_scrapers_id_members_prepare(scraper_target_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}/members', 'GET', @@ -1033,7 +1033,7 @@ def get_scrapers_id_owners_with_http_info(self, scraper_target_id, **kwargs): # returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scrapers_id_owners_prepare(scraper_target_id, **kwargs) + self._get_scrapers_id_owners_prepare(scraper_target_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}/owners', 'GET', @@ -1065,7 +1065,7 @@ async def get_scrapers_id_owners_async(self, scraper_target_id, **kwargs): # no returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scrapers_id_owners_prepare(scraper_target_id, **kwargs) + self._get_scrapers_id_owners_prepare(scraper_target_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}/owners', 'GET', @@ -1151,7 +1151,7 @@ def patch_scrapers_id_with_http_info(self, scraper_target_id, scraper_target_req returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_scrapers_id_prepare(scraper_target_id, scraper_target_request, **kwargs) + self._patch_scrapers_id_prepare(scraper_target_id, scraper_target_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}', 'PATCH', @@ -1184,7 +1184,7 @@ async def patch_scrapers_id_async(self, scraper_target_id, scraper_target_reques returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_scrapers_id_prepare(scraper_target_id, scraper_target_request, **kwargs) + self._patch_scrapers_id_prepare(scraper_target_id, scraper_target_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}', 'PATCH', @@ -1278,7 +1278,7 @@ def post_scrapers_with_http_info(self, scraper_target_request, **kwargs): # noq returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scrapers_prepare(scraper_target_request, **kwargs) + self._post_scrapers_prepare(scraper_target_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scrapers', 'POST', @@ -1310,7 +1310,7 @@ async def post_scrapers_async(self, scraper_target_request, **kwargs): # noqa: returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scrapers_prepare(scraper_target_request, **kwargs) + self._post_scrapers_prepare(scraper_target_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scrapers', 'POST', @@ -1400,7 +1400,7 @@ def post_scrapers_id_labels_with_http_info(self, scraper_target_id, label_mappin returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scrapers_id_labels_prepare(scraper_target_id, label_mapping, **kwargs) + self._post_scrapers_id_labels_prepare(scraper_target_id, label_mapping, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}/labels', 'POST', @@ -1433,7 +1433,7 @@ async def post_scrapers_id_labels_async(self, scraper_target_id, label_mapping, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scrapers_id_labels_prepare(scraper_target_id, label_mapping, **kwargs) + self._post_scrapers_id_labels_prepare(scraper_target_id, label_mapping, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}/labels', 'POST', @@ -1529,7 +1529,7 @@ def post_scrapers_id_members_with_http_info(self, scraper_target_id, add_resourc returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scrapers_id_members_prepare(scraper_target_id, add_resource_member_request_body, **kwargs) + self._post_scrapers_id_members_prepare(scraper_target_id, add_resource_member_request_body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}/members', 'POST', @@ -1562,7 +1562,7 @@ async def post_scrapers_id_members_async(self, scraper_target_id, add_resource_m returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scrapers_id_members_prepare(scraper_target_id, add_resource_member_request_body, **kwargs) + self._post_scrapers_id_members_prepare(scraper_target_id, add_resource_member_request_body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}/members', 'POST', @@ -1658,7 +1658,7 @@ def post_scrapers_id_owners_with_http_info(self, scraper_target_id, add_resource returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scrapers_id_owners_prepare(scraper_target_id, add_resource_member_request_body, **kwargs) + self._post_scrapers_id_owners_prepare(scraper_target_id, add_resource_member_request_body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}/owners', 'POST', @@ -1691,7 +1691,7 @@ async def post_scrapers_id_owners_async(self, scraper_target_id, add_resource_me returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scrapers_id_owners_prepare(scraper_target_id, add_resource_member_request_body, **kwargs) + self._post_scrapers_id_owners_prepare(scraper_target_id, add_resource_member_request_body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/scrapers/{scraperTargetID}/owners', 'POST', diff --git a/influxdb_client/service/secrets_service.py b/influxdb_client/service/secrets_service.py index 8a7db884..495ac952 100644 --- a/influxdb_client/service/secrets_service.py +++ b/influxdb_client/service/secrets_service.py @@ -69,7 +69,7 @@ def delete_orgs_id_secrets_id_with_http_info(self, org_id, secret_id, **kwargs): returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_orgs_id_secrets_id_prepare(org_id, secret_id, **kwargs) + self._delete_orgs_id_secrets_id_prepare(org_id, secret_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/orgs/{orgID}/secrets/{secretID}', 'DELETE', @@ -102,7 +102,7 @@ async def delete_orgs_id_secrets_id_async(self, org_id, secret_id, **kwargs): # returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_orgs_id_secrets_id_prepare(org_id, secret_id, **kwargs) + self._delete_orgs_id_secrets_id_prepare(org_id, secret_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/orgs/{orgID}/secrets/{secretID}', 'DELETE', @@ -192,7 +192,7 @@ def get_orgs_id_secrets_with_http_info(self, org_id, **kwargs): # noqa: E501,D4 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_orgs_id_secrets_prepare(org_id, **kwargs) + self._get_orgs_id_secrets_prepare(org_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/orgs/{orgID}/secrets', 'GET', @@ -224,7 +224,7 @@ async def get_orgs_id_secrets_async(self, org_id, **kwargs): # noqa: E501,D401, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_orgs_id_secrets_prepare(org_id, **kwargs) + self._get_orgs_id_secrets_prepare(org_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/orgs/{orgID}/secrets', 'GET', @@ -310,7 +310,7 @@ def patch_orgs_id_secrets_with_http_info(self, org_id, request_body, **kwargs): returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_orgs_id_secrets_prepare(org_id, request_body, **kwargs) + self._patch_orgs_id_secrets_prepare(org_id, request_body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/orgs/{orgID}/secrets', 'PATCH', @@ -343,7 +343,7 @@ async def patch_orgs_id_secrets_async(self, org_id, request_body, **kwargs): # returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_orgs_id_secrets_prepare(org_id, request_body, **kwargs) + self._patch_orgs_id_secrets_prepare(org_id, request_body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/orgs/{orgID}/secrets', 'PATCH', @@ -439,7 +439,7 @@ def post_orgs_id_secrets_with_http_info(self, org_id, secret_keys, **kwargs): # returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_orgs_id_secrets_prepare(org_id, secret_keys, **kwargs) + self._post_orgs_id_secrets_prepare(org_id, secret_keys, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/orgs/{orgID}/secrets/delete', 'POST', @@ -472,7 +472,7 @@ async def post_orgs_id_secrets_async(self, org_id, secret_keys, **kwargs): # no returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_orgs_id_secrets_prepare(org_id, secret_keys, **kwargs) + self._post_orgs_id_secrets_prepare(org_id, secret_keys, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/orgs/{orgID}/secrets/delete', 'POST', diff --git a/influxdb_client/service/setup_service.py b/influxdb_client/service/setup_service.py index 8c28a412..ed12bde0 100644 --- a/influxdb_client/service/setup_service.py +++ b/influxdb_client/service/setup_service.py @@ -67,7 +67,7 @@ def get_setup_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_setup_prepare(**kwargs) + self._get_setup_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/setup', 'GET', @@ -99,7 +99,7 @@ async def get_setup_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_setup_prepare(**kwargs) + self._get_setup_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/setup', 'GET', @@ -179,7 +179,7 @@ def post_setup_with_http_info(self, onboarding_request, **kwargs): # noqa: E501 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_setup_prepare(onboarding_request, **kwargs) + self._post_setup_prepare(onboarding_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/setup', 'POST', @@ -212,7 +212,7 @@ async def post_setup_async(self, onboarding_request, **kwargs): # noqa: E501,D4 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_setup_prepare(onboarding_request, **kwargs) + self._post_setup_prepare(onboarding_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/setup', 'POST', diff --git a/influxdb_client/service/signin_service.py b/influxdb_client/service/signin_service.py index 91d84c0a..f3ca698a 100644 --- a/influxdb_client/service/signin_service.py +++ b/influxdb_client/service/signin_service.py @@ -32,7 +32,7 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 def post_signin(self, **kwargs): # noqa: E501,D401,D403 """Create a user session.. - Authenticates ***Basic Auth*** credentials for a user. If successful, creates a new UI session for the user. + Authenticates [Basic authentication credentials](#section/Authentication/BasicAuthentication) for a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user), and then, if successful, generates a user session. To authenticate a user, pass the HTTP `Authorization` header with the `Basic` scheme and the base64-encoded username and password. For syntax and more information, see [Basic Authentication](#section/Authentication/BasicAuthentication) for syntax and more information. If authentication is successful, InfluxDB creates a new session for the user and then returns the session cookie in the `Set-Cookie` response header. InfluxDB stores user sessions in memory only. They expire within ten minutes and during restarts of the InfluxDB instance. #### User sessions with authorizations - In InfluxDB Cloud, a user session inherits all the user's permissions for the organization. - In InfluxDB OSS, a user session inherits all the user's permissions for all the organizations that the user belongs to. #### Related endpoints - [Signout](#tag/Signout) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_signin(async_req=True) @@ -55,7 +55,7 @@ def post_signin(self, **kwargs): # noqa: E501,D401,D403 def post_signin_with_http_info(self, **kwargs): # noqa: E501,D401,D403 """Create a user session.. - Authenticates ***Basic Auth*** credentials for a user. If successful, creates a new UI session for the user. + Authenticates [Basic authentication credentials](#section/Authentication/BasicAuthentication) for a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user), and then, if successful, generates a user session. To authenticate a user, pass the HTTP `Authorization` header with the `Basic` scheme and the base64-encoded username and password. For syntax and more information, see [Basic Authentication](#section/Authentication/BasicAuthentication) for syntax and more information. If authentication is successful, InfluxDB creates a new session for the user and then returns the session cookie in the `Set-Cookie` response header. InfluxDB stores user sessions in memory only. They expire within ten minutes and during restarts of the InfluxDB instance. #### User sessions with authorizations - In InfluxDB Cloud, a user session inherits all the user's permissions for the organization. - In InfluxDB OSS, a user session inherits all the user's permissions for all the organizations that the user belongs to. #### Related endpoints - [Signout](#tag/Signout) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_signin_with_http_info(async_req=True) @@ -69,7 +69,7 @@ def post_signin_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_signin_prepare(**kwargs) + self._post_signin_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/signin', 'POST', @@ -91,7 +91,7 @@ def post_signin_with_http_info(self, **kwargs): # noqa: E501,D401,D403 async def post_signin_async(self, **kwargs): # noqa: E501,D401,D403 """Create a user session.. - Authenticates ***Basic Auth*** credentials for a user. If successful, creates a new UI session for the user. + Authenticates [Basic authentication credentials](#section/Authentication/BasicAuthentication) for a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user), and then, if successful, generates a user session. To authenticate a user, pass the HTTP `Authorization` header with the `Basic` scheme and the base64-encoded username and password. For syntax and more information, see [Basic Authentication](#section/Authentication/BasicAuthentication) for syntax and more information. If authentication is successful, InfluxDB creates a new session for the user and then returns the session cookie in the `Set-Cookie` response header. InfluxDB stores user sessions in memory only. They expire within ten minutes and during restarts of the InfluxDB instance. #### User sessions with authorizations - In InfluxDB Cloud, a user session inherits all the user's permissions for the organization. - In InfluxDB OSS, a user session inherits all the user's permissions for all the organizations that the user belongs to. #### Related endpoints - [Signout](#tag/Signout) This method makes an asynchronous HTTP request. :param async_req bool @@ -102,7 +102,7 @@ async def post_signin_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_signin_prepare(**kwargs) + self._post_signin_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/signin', 'POST', diff --git a/influxdb_client/service/signout_service.py b/influxdb_client/service/signout_service.py index 9c5949ad..882e7873 100644 --- a/influxdb_client/service/signout_service.py +++ b/influxdb_client/service/signout_service.py @@ -30,9 +30,9 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 super().__init__(api_client) def post_signout(self, **kwargs): # noqa: E501,D401,D403 - """Expire the current UI session. + """Expire a user session. - Expires the current UI session for the user. + Expires a user session specified by a session cookie. Use this endpoint to expire a user session that was generated when the user authenticated with the InfluxDB Developer Console (UI) or the `POST /api/v2/signin` endpoint. For example, the `POST /api/v2/signout` endpoint represents the third step in the following three-step process to authenticate a user, retrieve the `user` resource, and then expire the session: 1. Send a request with the user's [Basic authentication credentials](#section/Authentication/BasicAuthentication) to the `POST /api/v2/signin` endpoint to create a user session and generate a session cookie. 2. Send a request to the `GET /api/v2/me` endpoint, passing the stored session cookie from step 1 to retrieve user information. 3. Send a request to the `POST /api/v2/signout` endpoint, passing the stored session cookie to expire the session. _See the complete example in request samples._ InfluxDB stores user sessions in memory only. If a user doesn't sign out, then the user session automatically expires within ten minutes or during a restart of the InfluxDB instance. To learn more about cookies in HTTP requests, see [Mozilla Developer Network (MDN) Web Docs, HTTP cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies). #### Related endpoints - [Signin](#tag/Signin) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_signout(async_req=True) @@ -52,9 +52,9 @@ def post_signout(self, **kwargs): # noqa: E501,D401,D403 return data def post_signout_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Expire the current UI session. + """Expire a user session. - Expires the current UI session for the user. + Expires a user session specified by a session cookie. Use this endpoint to expire a user session that was generated when the user authenticated with the InfluxDB Developer Console (UI) or the `POST /api/v2/signin` endpoint. For example, the `POST /api/v2/signout` endpoint represents the third step in the following three-step process to authenticate a user, retrieve the `user` resource, and then expire the session: 1. Send a request with the user's [Basic authentication credentials](#section/Authentication/BasicAuthentication) to the `POST /api/v2/signin` endpoint to create a user session and generate a session cookie. 2. Send a request to the `GET /api/v2/me` endpoint, passing the stored session cookie from step 1 to retrieve user information. 3. Send a request to the `POST /api/v2/signout` endpoint, passing the stored session cookie to expire the session. _See the complete example in request samples._ InfluxDB stores user sessions in memory only. If a user doesn't sign out, then the user session automatically expires within ten minutes or during a restart of the InfluxDB instance. To learn more about cookies in HTTP requests, see [Mozilla Developer Network (MDN) Web Docs, HTTP cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies). #### Related endpoints - [Signin](#tag/Signin) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_signout_with_http_info(async_req=True) @@ -67,7 +67,7 @@ def post_signout_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_signout_prepare(**kwargs) + self._post_signout_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/signout', 'POST', @@ -87,9 +87,9 @@ def post_signout_with_http_info(self, **kwargs): # noqa: E501,D401,D403 urlopen_kw=kwargs.get('urlopen_kw', None)) async def post_signout_async(self, **kwargs): # noqa: E501,D401,D403 - """Expire the current UI session. + """Expire a user session. - Expires the current UI session for the user. + Expires a user session specified by a session cookie. Use this endpoint to expire a user session that was generated when the user authenticated with the InfluxDB Developer Console (UI) or the `POST /api/v2/signin` endpoint. For example, the `POST /api/v2/signout` endpoint represents the third step in the following three-step process to authenticate a user, retrieve the `user` resource, and then expire the session: 1. Send a request with the user's [Basic authentication credentials](#section/Authentication/BasicAuthentication) to the `POST /api/v2/signin` endpoint to create a user session and generate a session cookie. 2. Send a request to the `GET /api/v2/me` endpoint, passing the stored session cookie from step 1 to retrieve user information. 3. Send a request to the `POST /api/v2/signout` endpoint, passing the stored session cookie to expire the session. _See the complete example in request samples._ InfluxDB stores user sessions in memory only. If a user doesn't sign out, then the user session automatically expires within ten minutes or during a restart of the InfluxDB instance. To learn more about cookies in HTTP requests, see [Mozilla Developer Network (MDN) Web Docs, HTTP cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies). #### Related endpoints - [Signin](#tag/Signin) This method makes an asynchronous HTTP request. :param async_req bool @@ -99,7 +99,7 @@ async def post_signout_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_signout_prepare(**kwargs) + self._post_signout_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/signout', 'POST', diff --git a/influxdb_client/service/sources_service.py b/influxdb_client/service/sources_service.py index 48580ead..5bb381f1 100644 --- a/influxdb_client/service/sources_service.py +++ b/influxdb_client/service/sources_service.py @@ -67,7 +67,7 @@ def delete_sources_id_with_http_info(self, source_id, **kwargs): # noqa: E501,D returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_sources_id_prepare(source_id, **kwargs) + self._delete_sources_id_prepare(source_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/sources/{sourceID}', 'DELETE', @@ -99,7 +99,7 @@ async def delete_sources_id_async(self, source_id, **kwargs): # noqa: E501,D401 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_sources_id_prepare(source_id, **kwargs) + self._delete_sources_id_prepare(source_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/sources/{sourceID}', 'DELETE', @@ -183,7 +183,7 @@ def get_sources_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_prepare(**kwargs) + self._get_sources_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/sources', 'GET', @@ -215,7 +215,7 @@ async def get_sources_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_prepare(**kwargs) + self._get_sources_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/sources', 'GET', @@ -295,7 +295,7 @@ def get_sources_id_with_http_info(self, source_id, **kwargs): # noqa: E501,D401 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_id_prepare(source_id, **kwargs) + self._get_sources_id_prepare(source_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/sources/{sourceID}', 'GET', @@ -327,7 +327,7 @@ async def get_sources_id_async(self, source_id, **kwargs): # noqa: E501,D401,D4 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_id_prepare(source_id, **kwargs) + self._get_sources_id_prepare(source_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/sources/{sourceID}', 'GET', @@ -413,7 +413,7 @@ def get_sources_id_buckets_with_http_info(self, source_id, **kwargs): # noqa: E returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_id_buckets_prepare(source_id, **kwargs) + self._get_sources_id_buckets_prepare(source_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/sources/{sourceID}/buckets', 'GET', @@ -446,7 +446,7 @@ async def get_sources_id_buckets_async(self, source_id, **kwargs): # noqa: E501 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_id_buckets_prepare(source_id, **kwargs) + self._get_sources_id_buckets_prepare(source_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/sources/{sourceID}/buckets', 'GET', @@ -532,7 +532,7 @@ def get_sources_id_health_with_http_info(self, source_id, **kwargs): # noqa: E5 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_id_health_prepare(source_id, **kwargs) + self._get_sources_id_health_prepare(source_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/sources/{sourceID}/health', 'GET', @@ -564,7 +564,7 @@ async def get_sources_id_health_async(self, source_id, **kwargs): # noqa: E501, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_id_health_prepare(source_id, **kwargs) + self._get_sources_id_health_prepare(source_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/sources/{sourceID}/health', 'GET', @@ -650,7 +650,7 @@ def patch_sources_id_with_http_info(self, source_id, source, **kwargs): # noqa: returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_sources_id_prepare(source_id, source, **kwargs) + self._patch_sources_id_prepare(source_id, source, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/sources/{sourceID}', 'PATCH', @@ -683,7 +683,7 @@ async def patch_sources_id_async(self, source_id, source, **kwargs): # noqa: E5 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_sources_id_prepare(source_id, source, **kwargs) + self._patch_sources_id_prepare(source_id, source, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/sources/{sourceID}', 'PATCH', @@ -777,7 +777,7 @@ def post_sources_with_http_info(self, source, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_sources_prepare(source, **kwargs) + self._post_sources_prepare(source, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/sources', 'POST', @@ -809,7 +809,7 @@ async def post_sources_async(self, source, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_sources_prepare(source, **kwargs) + self._post_sources_prepare(source, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/sources', 'POST', diff --git a/influxdb_client/service/tasks_service.py b/influxdb_client/service/tasks_service.py index 0bc85d42..91429514 100644 --- a/influxdb_client/service/tasks_service.py +++ b/influxdb_client/service/tasks_service.py @@ -32,7 +32,7 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 def delete_tasks_id(self, task_id, **kwargs): # noqa: E501,D401,D403 """Delete a task. - Deletes a task and all associated records + 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) @@ -55,7 +55,7 @@ def delete_tasks_id(self, task_id, **kwargs): # noqa: E501,D401,D403 def delete_tasks_id_with_http_info(self, task_id, **kwargs): # noqa: E501,D401,D403 """Delete a task. - Deletes a task and all associated records + 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) @@ -69,7 +69,7 @@ def delete_tasks_id_with_http_info(self, task_id, **kwargs): # noqa: E501,D401, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_prepare(task_id, **kwargs) + self._delete_tasks_id_prepare(task_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks/{taskID}', 'DELETE', @@ -91,7 +91,7 @@ def delete_tasks_id_with_http_info(self, task_id, **kwargs): # noqa: E501,D401, async def delete_tasks_id_async(self, task_id, **kwargs): # noqa: E501,D401,D403 """Delete a task. - Deletes a task and all associated records + 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 @@ -102,7 +102,7 @@ async def delete_tasks_id_async(self, task_id, **kwargs): # noqa: E501,D401,D40 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_prepare(task_id, **kwargs) + self._delete_tasks_id_prepare(task_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks/{taskID}', 'DELETE', @@ -151,14 +151,15 @@ def _delete_tasks_id_prepare(self, task_id, **kwargs): # noqa: E501,D401,D403 def delete_tasks_id_labels_id(self, task_id, label_id, **kwargs): # noqa: E501,D401,D403 """Delete 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 task ID. (required) - :param str label_id: The label ID. (required) + :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, @@ -174,21 +175,22 @@ def delete_tasks_id_labels_id(self, task_id, label_id, **kwargs): # noqa: E501, def delete_tasks_id_labels_id_with_http_info(self, task_id, label_id, **kwargs): # noqa: E501,D401,D403 """Delete 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 task ID. (required) - :param str label_id: The label ID. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_labels_id_prepare(task_id, label_id, **kwargs) + self._delete_tasks_id_labels_id_prepare(task_id, label_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks/{taskID}/labels/{labelID}', 'DELETE', @@ -210,18 +212,19 @@ def delete_tasks_id_labels_id_with_http_info(self, task_id, label_id, **kwargs): async def delete_tasks_id_labels_id_async(self, task_id, label_id, **kwargs): # noqa: E501,D401,D403 """Delete 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 task ID. (required) - :param str label_id: The label ID. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_labels_id_prepare(task_id, label_id, **kwargs) + self._delete_tasks_id_labels_id_prepare(task_id, label_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks/{taskID}/labels/{labelID}', 'DELETE', @@ -276,6 +279,7 @@ def _delete_tasks_id_labels_id_prepare(self, task_id, label_id, **kwargs): # no def delete_tasks_id_members_id(self, user_id, task_id, **kwargs): # noqa: E501,D401,D403 """Remove 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) @@ -299,6 +303,7 @@ def delete_tasks_id_members_id(self, user_id, task_id, **kwargs): # noqa: E501, def delete_tasks_id_members_id_with_http_info(self, user_id, task_id, **kwargs): # noqa: E501,D401,D403 """Remove 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) @@ -313,7 +318,7 @@ def delete_tasks_id_members_id_with_http_info(self, user_id, task_id, **kwargs): returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_members_id_prepare(user_id, task_id, **kwargs) + self._delete_tasks_id_members_id_prepare(user_id, task_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks/{taskID}/members/{userID}', 'DELETE', @@ -335,6 +340,7 @@ def delete_tasks_id_members_id_with_http_info(self, user_id, task_id, **kwargs): async def delete_tasks_id_members_id_async(self, user_id, task_id, **kwargs): # noqa: E501,D401,D403 """Remove 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 @@ -346,7 +352,7 @@ async def delete_tasks_id_members_id_async(self, user_id, task_id, **kwargs): # returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_members_id_prepare(user_id, task_id, **kwargs) + self._delete_tasks_id_members_id_prepare(user_id, task_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks/{taskID}/members/{userID}', 'DELETE', @@ -401,6 +407,7 @@ def _delete_tasks_id_members_id_prepare(self, user_id, task_id, **kwargs): # no def delete_tasks_id_owners_id(self, user_id, task_id, **kwargs): # noqa: E501,D401,D403 """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(user_id, task_id, async_req=True) @@ -424,6 +431,7 @@ def delete_tasks_id_owners_id(self, user_id, task_id, **kwargs): # noqa: E501,D def delete_tasks_id_owners_id_with_http_info(self, user_id, task_id, **kwargs): # noqa: E501,D401,D403 """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) @@ -438,7 +446,7 @@ def delete_tasks_id_owners_id_with_http_info(self, user_id, task_id, **kwargs): returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_owners_id_prepare(user_id, task_id, **kwargs) + self._delete_tasks_id_owners_id_prepare(user_id, task_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks/{taskID}/owners/{userID}', 'DELETE', @@ -460,6 +468,7 @@ def delete_tasks_id_owners_id_with_http_info(self, user_id, task_id, **kwargs): async def delete_tasks_id_owners_id_async(self, user_id, task_id, **kwargs): # noqa: E501,D401,D403 """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 an asynchronous HTTP request. :param async_req bool @@ -471,7 +480,7 @@ async def delete_tasks_id_owners_id_async(self, user_id, task_id, **kwargs): # returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_owners_id_prepare(user_id, task_id, **kwargs) + self._delete_tasks_id_owners_id_prepare(user_id, task_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks/{taskID}/owners/{userID}', 'DELETE', @@ -524,16 +533,17 @@ def _delete_tasks_id_owners_id_prepare(self, user_id, task_id, **kwargs): # noq return local_var_params, path_params, query_params, header_params, body_params def delete_tasks_id_runs_id(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - """Cancel a running task. #### InfluxDB Cloud - Doesn't support this operation. . + """Cancel 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 task ID. (required) - :param str run_id: The run ID. (required) + :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, @@ -547,23 +557,24 @@ def delete_tasks_id_runs_id(self, task_id, run_id, **kwargs): # noqa: E501,D401 return data def delete_tasks_id_runs_id_with_http_info(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - """Cancel a running task. #### InfluxDB Cloud - Doesn't support this operation. . + """Cancel 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 task ID. (required) - :param str run_id: The run ID. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_runs_id_prepare(task_id, run_id, **kwargs) + self._delete_tasks_id_runs_id_prepare(task_id, run_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks/{taskID}/runs/{runID}', 'DELETE', @@ -583,20 +594,21 @@ def delete_tasks_id_runs_id_with_http_info(self, task_id, run_id, **kwargs): # urlopen_kw=kwargs.get('urlopen_kw', None)) async def delete_tasks_id_runs_id_async(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - """Cancel a running task. #### InfluxDB Cloud - Doesn't support this operation. . + """Cancel 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 task ID. (required) - :param str run_id: The run ID. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_runs_id_prepare(task_id, run_id, **kwargs) + self._delete_tasks_id_runs_id_prepare(task_id, run_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks/{taskID}/runs/{runID}', 'DELETE', @@ -649,8 +661,9 @@ def _delete_tasks_id_runs_id_prepare(self, task_id, run_id, **kwargs): # noqa: return local_var_params, path_params, query_params, header_params, body_params def get_tasks(self, **kwargs): # noqa: E501,D401,D403 - """List all tasks. + """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) @@ -658,14 +671,14 @@ def get_tasks(self, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str zap_trace_span: OpenTracing span context - :param str name: Returns task with a specific name. - :param str after: Return tasks after a specified ID. - :param str user: Filter tasks to a specific user ID. - :param str org: Filter tasks to a specific organization name. - :param str org_id: Filter tasks to a specific organization ID. - :param str status: Filter tasks by a status--"inactive" or "active". - :param int limit: The number of tasks to return - :param str type: Type of task, unset by default. + :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. @@ -678,8 +691,9 @@ def get_tasks(self, **kwargs): # noqa: E501,D401,D403 return data def get_tasks_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List all tasks. + """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) @@ -687,20 +701,20 @@ def get_tasks_with_http_info(self, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str zap_trace_span: OpenTracing span context - :param str name: Returns task with a specific name. - :param str after: Return tasks after a specified ID. - :param str user: Filter tasks to a specific user ID. - :param str org: Filter tasks to a specific organization name. - :param str org_id: Filter tasks to a specific organization ID. - :param str status: Filter tasks by a status--"inactive" or "active". - :param int limit: The number of tasks to return - :param str type: Type of task, unset by default. + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_prepare(**kwargs) + self._get_tasks_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks', 'GET', @@ -720,26 +734,27 @@ def get_tasks_with_http_info(self, **kwargs): # noqa: E501,D401,D403 urlopen_kw=kwargs.get('urlopen_kw', None)) async def get_tasks_async(self, **kwargs): # noqa: E501,D401,D403 - """List all tasks. + """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: Returns task with a specific name. - :param str after: Return tasks after a specified ID. - :param str user: Filter tasks to a specific user ID. - :param str org: Filter tasks to a specific organization name. - :param str org_id: Filter tasks to a specific organization ID. - :param str status: Filter tasks by a status--"inactive" or "active". - :param int limit: The number of tasks to return - :param str type: Type of task, unset by default. + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_prepare(**kwargs) + self._get_tasks_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks', 'GET', @@ -802,13 +817,14 @@ def _get_tasks_prepare(self, **kwargs): # noqa: E501,D401,D403 def get_tasks_id(self, task_id, **kwargs): # noqa: E501,D401,D403 """Retrieve 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 task ID. (required) + :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, @@ -824,20 +840,21 @@ def get_tasks_id(self, task_id, **kwargs): # noqa: E501,D401,D403 def get_tasks_id_with_http_info(self, task_id, **kwargs): # noqa: E501,D401,D403 """Retrieve 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 task ID. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_prepare(task_id, **kwargs) + self._get_tasks_id_prepare(task_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks/{taskID}', 'GET', @@ -859,17 +876,18 @@ def get_tasks_id_with_http_info(self, task_id, **kwargs): # noqa: E501,D401,D40 async def get_tasks_id_async(self, task_id, **kwargs): # noqa: E501,D401,D403 """Retrieve 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 task ID. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_prepare(task_id, **kwargs) + self._get_tasks_id_prepare(task_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks/{taskID}', 'GET', @@ -916,15 +934,16 @@ def _get_tasks_id_prepare(self, task_id, **kwargs): # noqa: E501,D401,D403 return local_var_params, path_params, query_params, header_params, body_params def get_tasks_id_labels(self, task_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a task. + """List 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 task ID. (required) + :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, @@ -938,22 +957,23 @@ def get_tasks_id_labels(self, task_id, **kwargs): # noqa: E501,D401,D403 return data def get_tasks_id_labels_with_http_info(self, task_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a task. + """List 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 task ID. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_labels_prepare(task_id, **kwargs) + self._get_tasks_id_labels_prepare(task_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks/{taskID}/labels', 'GET', @@ -973,19 +993,20 @@ def get_tasks_id_labels_with_http_info(self, task_id, **kwargs): # noqa: E501,D urlopen_kw=kwargs.get('urlopen_kw', None)) async def get_tasks_id_labels_async(self, task_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a task. + """List 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 task ID. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_labels_prepare(task_id, **kwargs) + self._get_tasks_id_labels_prepare(task_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks/{taskID}/labels', 'GET', @@ -1034,6 +1055,7 @@ def _get_tasks_id_labels_prepare(self, task_id, **kwargs): # noqa: E501,D401,D4 def get_tasks_id_logs(self, task_id, **kwargs): # noqa: E501,D401,D403 """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 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) @@ -1056,6 +1078,7 @@ def get_tasks_id_logs(self, task_id, **kwargs): # noqa: E501,D401,D403 def get_tasks_id_logs_with_http_info(self, task_id, **kwargs): # noqa: E501,D401,D403 """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 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) @@ -1069,7 +1092,7 @@ def get_tasks_id_logs_with_http_info(self, task_id, **kwargs): # noqa: E501,D40 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_logs_prepare(task_id, **kwargs) + self._get_tasks_id_logs_prepare(task_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks/{taskID}/logs', 'GET', @@ -1091,6 +1114,7 @@ def get_tasks_id_logs_with_http_info(self, task_id, **kwargs): # noqa: E501,D40 async def get_tasks_id_logs_async(self, task_id, **kwargs): # noqa: E501,D401,D403 """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 @@ -1101,7 +1125,7 @@ async def get_tasks_id_logs_async(self, task_id, **kwargs): # noqa: E501,D401,D returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_logs_prepare(task_id, **kwargs) + self._get_tasks_id_logs_prepare(task_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks/{taskID}/logs', 'GET', @@ -1150,6 +1174,7 @@ def _get_tasks_id_logs_prepare(self, task_id, **kwargs): # noqa: E501,D401,D403 def get_tasks_id_members(self, task_id, **kwargs): # noqa: E501,D401,D403 """List 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) @@ -1172,6 +1197,7 @@ def get_tasks_id_members(self, task_id, **kwargs): # noqa: E501,D401,D403 def get_tasks_id_members_with_http_info(self, task_id, **kwargs): # noqa: E501,D401,D403 """List 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) @@ -1185,7 +1211,7 @@ def get_tasks_id_members_with_http_info(self, task_id, **kwargs): # noqa: E501, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_members_prepare(task_id, **kwargs) + self._get_tasks_id_members_prepare(task_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks/{taskID}/members', 'GET', @@ -1207,6 +1233,7 @@ def get_tasks_id_members_with_http_info(self, task_id, **kwargs): # noqa: E501, async def get_tasks_id_members_async(self, task_id, **kwargs): # noqa: E501,D401,D403 """List 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 @@ -1217,7 +1244,7 @@ async def get_tasks_id_members_async(self, task_id, **kwargs): # noqa: E501,D40 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_members_prepare(task_id, **kwargs) + self._get_tasks_id_members_prepare(task_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks/{taskID}/members', 'GET', @@ -1266,13 +1293,14 @@ def _get_tasks_id_members_prepare(self, task_id, **kwargs): # noqa: E501,D401,D def get_tasks_id_owners(self, task_id, **kwargs): # noqa: E501,D401,D403 """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 task ID. (required) + :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, @@ -1288,20 +1316,21 @@ def get_tasks_id_owners(self, task_id, **kwargs): # noqa: E501,D401,D403 def get_tasks_id_owners_with_http_info(self, task_id, **kwargs): # noqa: E501,D401,D403 """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_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 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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_owners_prepare(task_id, **kwargs) + self._get_tasks_id_owners_prepare(task_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks/{taskID}/owners', 'GET', @@ -1323,17 +1352,18 @@ def get_tasks_id_owners_with_http_info(self, task_id, **kwargs): # noqa: E501,D async def get_tasks_id_owners_async(self, task_id, **kwargs): # noqa: E501,D401,D403 """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 an asynchronous HTTP request. :param async_req bool - :param str task_id: The task ID. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_owners_prepare(task_id, **kwargs) + self._get_tasks_id_owners_prepare(task_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks/{taskID}/owners', 'GET', @@ -1382,18 +1412,19 @@ def _get_tasks_id_owners_prepare(self, task_id, **kwargs): # noqa: E501,D401,D4 def get_tasks_id_runs(self, task_id, **kwargs): # noqa: E501,D401,D403 """List 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. (required) + :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: Returns runs after a specific ID. - :param int limit: The number of runs to return - :param datetime after_time: Filter runs to those scheduled after this time, RFC3339 - :param datetime before_time: Filter runs to those scheduled before this time, RFC3339 + :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. @@ -1408,24 +1439,25 @@ def get_tasks_id_runs(self, task_id, **kwargs): # noqa: E501,D401,D403 def get_tasks_id_runs_with_http_info(self, task_id, **kwargs): # noqa: E501,D401,D403 """List 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. (required) + :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: Returns runs after a specific ID. - :param int limit: The number of runs to return - :param datetime after_time: Filter runs to those scheduled after this time, RFC3339 - :param datetime before_time: Filter runs to those scheduled before this time, RFC3339 + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_runs_prepare(task_id, **kwargs) + self._get_tasks_id_runs_prepare(task_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks/{taskID}/runs', 'GET', @@ -1447,21 +1479,22 @@ def get_tasks_id_runs_with_http_info(self, task_id, **kwargs): # noqa: E501,D40 async def get_tasks_id_runs_async(self, task_id, **kwargs): # noqa: E501,D401,D403 """List 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. (required) + :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: Returns runs after a specific ID. - :param int limit: The number of runs to return - :param datetime after_time: Filter runs to those scheduled after this time, RFC3339 - :param datetime before_time: Filter runs to those scheduled before this time, RFC3339 + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_runs_prepare(task_id, **kwargs) + self._get_tasks_id_runs_prepare(task_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks/{taskID}/runs', 'GET', @@ -1520,16 +1553,17 @@ def _get_tasks_id_runs_prepare(self, task_id, **kwargs): # noqa: E501,D401,D403 return local_var_params, path_params, query_params, header_params, body_params def get_tasks_id_runs_id(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a single run for a task. + """Retrieve 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 task ID. (required) - :param str run_id: The run ID. (required) + :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, @@ -1543,23 +1577,24 @@ def get_tasks_id_runs_id(self, task_id, run_id, **kwargs): # noqa: E501,D401,D4 return data def get_tasks_id_runs_id_with_http_info(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a single run for a task. + """Retrieve 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 task ID. (required) - :param str run_id: The run ID. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_runs_id_prepare(task_id, run_id, **kwargs) + self._get_tasks_id_runs_id_prepare(task_id, run_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks/{taskID}/runs/{runID}', 'GET', @@ -1579,20 +1614,21 @@ def get_tasks_id_runs_id_with_http_info(self, task_id, run_id, **kwargs): # noq urlopen_kw=kwargs.get('urlopen_kw', None)) async def get_tasks_id_runs_id_async(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a single run for a task. + """Retrieve 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 task ID. (required) - :param str run_id: The run ID. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_runs_id_prepare(task_id, run_id, **kwargs) + self._get_tasks_id_runs_id_prepare(task_id, run_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks/{taskID}/runs/{runID}', 'GET', @@ -1647,14 +1683,15 @@ def _get_tasks_id_runs_id_prepare(self, task_id, run_id, **kwargs): # noqa: E50 def get_tasks_id_runs_id_logs(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 """Retrieve 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: ID of task to get logs for. (required) - :param str run_id: ID of run to get logs for. (required) + :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, @@ -1670,21 +1707,22 @@ def get_tasks_id_runs_id_logs(self, task_id, run_id, **kwargs): # noqa: E501,D4 def get_tasks_id_runs_id_logs_with_http_info(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 """Retrieve 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: ID of task to get logs for. (required) - :param str run_id: ID of run to get logs for. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_runs_id_logs_prepare(task_id, run_id, **kwargs) + self._get_tasks_id_runs_id_logs_prepare(task_id, run_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks/{taskID}/runs/{runID}/logs', 'GET', @@ -1706,18 +1744,19 @@ def get_tasks_id_runs_id_logs_with_http_info(self, task_id, run_id, **kwargs): async def get_tasks_id_runs_id_logs_async(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 """Retrieve 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: ID of task to get logs for. (required) - :param str run_id: ID of run to get logs for. (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_runs_id_logs_prepare(task_id, run_id, **kwargs) + self._get_tasks_id_runs_id_logs_prepare(task_id, run_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks/{taskID}/runs/{runID}/logs', 'GET', @@ -1772,15 +1811,15 @@ def _get_tasks_id_runs_id_logs_prepare(self, task_id, run_id, **kwargs): # noqa def patch_tasks_id(self, task_id, task_update_request, **kwargs): # noqa: E501,D401,D403 """Update a task. - Update a task. This will cancel all queued runs. + 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 task ID. (required) - :param TaskUpdateRequest task_update_request: Task update to apply (required) + :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, @@ -1796,22 +1835,22 @@ def patch_tasks_id(self, task_id, task_update_request, **kwargs): # noqa: E501, def patch_tasks_id_with_http_info(self, task_id, task_update_request, **kwargs): # noqa: E501,D401,D403 """Update a task. - Update a task. This will cancel all queued runs. + 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 task ID. (required) - :param TaskUpdateRequest task_update_request: Task update to apply (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_tasks_id_prepare(task_id, task_update_request, **kwargs) + self._patch_tasks_id_prepare(task_id, task_update_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks/{taskID}', 'PATCH', @@ -1833,19 +1872,19 @@ def patch_tasks_id_with_http_info(self, task_id, task_update_request, **kwargs): async def patch_tasks_id_async(self, task_id, task_update_request, **kwargs): # noqa: E501,D401,D403 """Update a task. - Update a task. This will cancel all queued runs. + 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 task ID. (required) - :param TaskUpdateRequest task_update_request: Task update to apply (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_tasks_id_prepare(task_id, task_update_request, **kwargs) + self._patch_tasks_id_prepare(task_id, task_update_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks/{taskID}', 'PATCH', @@ -1902,15 +1941,16 @@ def _patch_tasks_id_prepare(self, task_id, task_update_request, **kwargs): # no return local_var_params, path_params, query_params, header_params, body_params def post_tasks(self, task_create_request, **kwargs): # noqa: E501,D401,D403 - """Create a new task. + """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(task_create_request, async_req=True) >>> result = thread.get() :param async_req bool - :param TaskCreateRequest task_create_request: Task to create (required) + :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, @@ -1924,22 +1964,23 @@ def post_tasks(self, task_create_request, **kwargs): # noqa: E501,D401,D403 return data def post_tasks_with_http_info(self, task_create_request, **kwargs): # noqa: E501,D401,D403 - """Create a new task. + """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: Task to create (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_tasks_prepare(task_create_request, **kwargs) + self._post_tasks_prepare(task_create_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks', 'POST', @@ -1959,19 +2000,20 @@ def post_tasks_with_http_info(self, task_create_request, **kwargs): # noqa: E50 urlopen_kw=kwargs.get('urlopen_kw', None)) async def post_tasks_async(self, task_create_request, **kwargs): # noqa: E501,D401,D403 - """Create a new task. + """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 an asynchronous HTTP request. :param async_req bool - :param TaskCreateRequest task_create_request: Task to create (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_tasks_prepare(task_create_request, **kwargs) + self._post_tasks_prepare(task_create_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks', 'POST', @@ -2024,14 +2066,15 @@ def _post_tasks_prepare(self, task_create_request, **kwargs): # noqa: E501,D401 def post_tasks_id_labels(self, task_id, label_mapping, **kwargs): # noqa: E501,D401,D403 """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 task ID. (required) - :param LabelMapping label_mapping: Label to add (required) + :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, @@ -2047,21 +2090,22 @@ def post_tasks_id_labels(self, task_id, label_mapping, **kwargs): # noqa: E501, def post_tasks_id_labels_with_http_info(self, task_id, label_mapping, **kwargs): # noqa: E501,D401,D403 """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 task ID. (required) - :param LabelMapping label_mapping: Label to add (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_labels_prepare(task_id, label_mapping, **kwargs) + self._post_tasks_id_labels_prepare(task_id, label_mapping, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks/{taskID}/labels', 'POST', @@ -2083,18 +2127,19 @@ def post_tasks_id_labels_with_http_info(self, task_id, label_mapping, **kwargs): async def post_tasks_id_labels_async(self, task_id, label_mapping, **kwargs): # noqa: E501,D401,D403 """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 an asynchronous HTTP request. :param async_req bool - :param str task_id: The task ID. (required) - :param LabelMapping label_mapping: Label to add (required) + :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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_labels_prepare(task_id, label_mapping, **kwargs) + self._post_tasks_id_labels_prepare(task_id, label_mapping, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks/{taskID}/labels', 'POST', @@ -2153,6 +2198,7 @@ def _post_tasks_id_labels_prepare(self, task_id, label_mapping, **kwargs): # no def post_tasks_id_members(self, task_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 """Add 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) @@ -2160,7 +2206,7 @@ def post_tasks_id_members(self, task_id, add_resource_member_request_body, **kwa :param async_req bool :param str task_id: The task ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (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, @@ -2176,6 +2222,7 @@ def post_tasks_id_members(self, task_id, add_resource_member_request_body, **kwa def post_tasks_id_members_with_http_info(self, task_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 """Add 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) @@ -2183,14 +2230,14 @@ def post_tasks_id_members_with_http_info(self, task_id, add_resource_member_requ :param async_req bool :param str task_id: The task ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_members_prepare(task_id, add_resource_member_request_body, **kwargs) + self._post_tasks_id_members_prepare(task_id, add_resource_member_request_body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks/{taskID}/members', 'POST', @@ -2212,18 +2259,19 @@ def post_tasks_id_members_with_http_info(self, task_id, add_resource_member_requ async def post_tasks_id_members_async(self, task_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 """Add 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: User to add as member (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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_members_prepare(task_id, add_resource_member_request_body, **kwargs) + self._post_tasks_id_members_prepare(task_id, add_resource_member_request_body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks/{taskID}/members', 'POST', @@ -2280,8 +2328,9 @@ def _post_tasks_id_members_prepare(self, task_id, add_resource_member_request_bo return local_var_params, path_params, query_params, header_params, body_params def post_tasks_id_owners(self, task_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to a task. + """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(task_id, add_resource_member_request_body, async_req=True) @@ -2289,7 +2338,7 @@ def post_tasks_id_owners(self, task_id, add_resource_member_request_body, **kwar :param async_req bool :param str task_id: The task ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (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, @@ -2303,8 +2352,9 @@ def post_tasks_id_owners(self, task_id, add_resource_member_request_body, **kwar return data def post_tasks_id_owners_with_http_info(self, task_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to a task. + """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) @@ -2312,14 +2362,14 @@ def post_tasks_id_owners_with_http_info(self, task_id, add_resource_member_reque :param async_req bool :param str task_id: The task ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_owners_prepare(task_id, add_resource_member_request_body, **kwargs) + self._post_tasks_id_owners_prepare(task_id, add_resource_member_request_body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks/{taskID}/owners', 'POST', @@ -2339,20 +2389,21 @@ def post_tasks_id_owners_with_http_info(self, task_id, add_resource_member_reque urlopen_kw=kwargs.get('urlopen_kw', None)) async def post_tasks_id_owners_async(self, task_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to a task. + """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: User to add as owner (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. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_owners_prepare(task_id, add_resource_member_request_body, **kwargs) + self._post_tasks_id_owners_prepare(task_id, add_resource_member_request_body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks/{taskID}/owners', 'POST', @@ -2409,8 +2460,9 @@ def _post_tasks_id_owners_prepare(self, task_id, add_resource_member_request_bod return local_var_params, path_params, query_params, header_params, body_params def post_tasks_id_runs(self, task_id, **kwargs): # noqa: E501,D401,D403 - """Manually start a task run, overriding the current schedule. + """Start 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) @@ -2432,8 +2484,9 @@ def post_tasks_id_runs(self, task_id, **kwargs): # noqa: E501,D401,D403 return data def post_tasks_id_runs_with_http_info(self, task_id, **kwargs): # noqa: E501,D401,D403 - """Manually start a task run, overriding the current schedule. + """Start 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) @@ -2448,7 +2501,7 @@ def post_tasks_id_runs_with_http_info(self, task_id, **kwargs): # noqa: E501,D4 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_runs_prepare(task_id, **kwargs) + self._post_tasks_id_runs_prepare(task_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks/{taskID}/runs', 'POST', @@ -2468,8 +2521,9 @@ def post_tasks_id_runs_with_http_info(self, task_id, **kwargs): # noqa: E501,D4 urlopen_kw=kwargs.get('urlopen_kw', None)) async def post_tasks_id_runs_async(self, task_id, **kwargs): # noqa: E501,D401,D403 - """Manually start a task run, overriding the current schedule. + """Start 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 @@ -2481,7 +2535,7 @@ async def post_tasks_id_runs_async(self, task_id, **kwargs): # noqa: E501,D401, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_runs_prepare(task_id, **kwargs) + self._post_tasks_id_runs_prepare(task_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks/{taskID}/runs', 'POST', @@ -2536,14 +2590,15 @@ def _post_tasks_id_runs_prepare(self, task_id, **kwargs): # noqa: E501,D401,D40 def post_tasks_id_runs_id_retry(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 """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 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: The task ID. (required) - :param str run_id: The run ID. (required) + :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 @@ -2560,14 +2615,15 @@ def post_tasks_id_runs_id_retry(self, task_id, run_id, **kwargs): # noqa: E501, def post_tasks_id_runs_id_retry_with_http_info(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 """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 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: The task ID. (required) - :param str run_id: The run ID. (required) + :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 @@ -2575,7 +2631,7 @@ def post_tasks_id_runs_id_retry_with_http_info(self, task_id, run_id, **kwargs): returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_runs_id_retry_prepare(task_id, run_id, **kwargs) + self._post_tasks_id_runs_id_retry_prepare(task_id, run_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/tasks/{taskID}/runs/{runID}/retry', 'POST', @@ -2597,11 +2653,12 @@ def post_tasks_id_runs_id_retry_with_http_info(self, task_id, run_id, **kwargs): async def post_tasks_id_runs_id_retry_async(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 """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: The task ID. (required) - :param str run_id: The run ID. (required) + :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 @@ -2609,7 +2666,7 @@ async def post_tasks_id_runs_id_retry_async(self, task_id, run_id, **kwargs): # returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_runs_id_retry_prepare(task_id, run_id, **kwargs) + self._post_tasks_id_runs_id_retry_prepare(task_id, run_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/tasks/{taskID}/runs/{runID}/retry', 'POST', diff --git a/influxdb_client/service/telegraf_plugins_service.py b/influxdb_client/service/telegraf_plugins_service.py index 4ac4964e..905fdd34 100644 --- a/influxdb_client/service/telegraf_plugins_service.py +++ b/influxdb_client/service/telegraf_plugins_service.py @@ -67,7 +67,7 @@ def get_telegraf_plugins_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_telegraf_plugins_prepare(**kwargs) + self._get_telegraf_plugins_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/telegraf/plugins', 'GET', @@ -99,7 +99,7 @@ async def get_telegraf_plugins_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_telegraf_plugins_prepare(**kwargs) + self._get_telegraf_plugins_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/telegraf/plugins', 'GET', diff --git a/influxdb_client/service/telegrafs_service.py b/influxdb_client/service/telegrafs_service.py index 113495c8..4c3bfe9e 100644 --- a/influxdb_client/service/telegrafs_service.py +++ b/influxdb_client/service/telegrafs_service.py @@ -67,7 +67,7 @@ def delete_telegrafs_id_with_http_info(self, telegraf_id, **kwargs): # noqa: E5 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_telegrafs_id_prepare(telegraf_id, **kwargs) + self._delete_telegrafs_id_prepare(telegraf_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}', 'DELETE', @@ -99,7 +99,7 @@ async def delete_telegrafs_id_async(self, telegraf_id, **kwargs): # noqa: E501, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_telegrafs_id_prepare(telegraf_id, **kwargs) + self._delete_telegrafs_id_prepare(telegraf_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}', 'DELETE', @@ -185,7 +185,7 @@ def delete_telegrafs_id_labels_id_with_http_info(self, telegraf_id, label_id, ** returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_telegrafs_id_labels_id_prepare(telegraf_id, label_id, **kwargs) + self._delete_telegrafs_id_labels_id_prepare(telegraf_id, label_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}/labels/{labelID}', 'DELETE', @@ -218,7 +218,7 @@ async def delete_telegrafs_id_labels_id_async(self, telegraf_id, label_id, **kwa returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_telegrafs_id_labels_id_prepare(telegraf_id, label_id, **kwargs) + self._delete_telegrafs_id_labels_id_prepare(telegraf_id, label_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}/labels/{labelID}', 'DELETE', @@ -310,7 +310,7 @@ def delete_telegrafs_id_members_id_with_http_info(self, user_id, telegraf_id, ** returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_telegrafs_id_members_id_prepare(user_id, telegraf_id, **kwargs) + self._delete_telegrafs_id_members_id_prepare(user_id, telegraf_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}/members/{userID}', 'DELETE', @@ -343,7 +343,7 @@ async def delete_telegrafs_id_members_id_async(self, user_id, telegraf_id, **kwa returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_telegrafs_id_members_id_prepare(user_id, telegraf_id, **kwargs) + self._delete_telegrafs_id_members_id_prepare(user_id, telegraf_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}/members/{userID}', 'DELETE', @@ -435,7 +435,7 @@ def delete_telegrafs_id_owners_id_with_http_info(self, user_id, telegraf_id, **k returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_telegrafs_id_owners_id_prepare(user_id, telegraf_id, **kwargs) + self._delete_telegrafs_id_owners_id_prepare(user_id, telegraf_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}/owners/{userID}', 'DELETE', @@ -468,7 +468,7 @@ async def delete_telegrafs_id_owners_id_async(self, user_id, telegraf_id, **kwar returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_telegrafs_id_owners_id_prepare(user_id, telegraf_id, **kwargs) + self._delete_telegrafs_id_owners_id_prepare(user_id, telegraf_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}/owners/{userID}', 'DELETE', @@ -558,7 +558,7 @@ def get_telegrafs_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_prepare(**kwargs) + self._get_telegrafs_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/telegrafs', 'GET', @@ -590,7 +590,7 @@ async def get_telegrafs_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_prepare(**kwargs) + self._get_telegrafs_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/telegrafs', 'GET', @@ -672,7 +672,7 @@ def get_telegrafs_id_with_http_info(self, telegraf_id, **kwargs): # noqa: E501, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_id_prepare(telegraf_id, **kwargs) + self._get_telegrafs_id_prepare(telegraf_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}', 'GET', @@ -705,7 +705,7 @@ async def get_telegrafs_id_async(self, telegraf_id, **kwargs): # noqa: E501,D40 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_id_prepare(telegraf_id, **kwargs) + self._get_telegrafs_id_prepare(telegraf_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}', 'GET', @@ -791,7 +791,7 @@ def get_telegrafs_id_labels_with_http_info(self, telegraf_id, **kwargs): # noqa returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_id_labels_prepare(telegraf_id, **kwargs) + self._get_telegrafs_id_labels_prepare(telegraf_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}/labels', 'GET', @@ -823,7 +823,7 @@ async def get_telegrafs_id_labels_async(self, telegraf_id, **kwargs): # noqa: E returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_id_labels_prepare(telegraf_id, **kwargs) + self._get_telegrafs_id_labels_prepare(telegraf_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}/labels', 'GET', @@ -907,7 +907,7 @@ def get_telegrafs_id_members_with_http_info(self, telegraf_id, **kwargs): # noq returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_id_members_prepare(telegraf_id, **kwargs) + self._get_telegrafs_id_members_prepare(telegraf_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}/members', 'GET', @@ -939,7 +939,7 @@ async def get_telegrafs_id_members_async(self, telegraf_id, **kwargs): # noqa: returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_id_members_prepare(telegraf_id, **kwargs) + self._get_telegrafs_id_members_prepare(telegraf_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}/members', 'GET', @@ -1023,7 +1023,7 @@ def get_telegrafs_id_owners_with_http_info(self, telegraf_id, **kwargs): # noqa returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_id_owners_prepare(telegraf_id, **kwargs) + self._get_telegrafs_id_owners_prepare(telegraf_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}/owners', 'GET', @@ -1055,7 +1055,7 @@ async def get_telegrafs_id_owners_async(self, telegraf_id, **kwargs): # noqa: E returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_id_owners_prepare(telegraf_id, **kwargs) + self._get_telegrafs_id_owners_prepare(telegraf_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}/owners', 'GET', @@ -1139,7 +1139,7 @@ def post_telegrafs_with_http_info(self, telegraf_plugin_request, **kwargs): # n returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_telegrafs_prepare(telegraf_plugin_request, **kwargs) + self._post_telegrafs_prepare(telegraf_plugin_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/telegrafs', 'POST', @@ -1171,7 +1171,7 @@ async def post_telegrafs_async(self, telegraf_plugin_request, **kwargs): # noqa returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_telegrafs_prepare(telegraf_plugin_request, **kwargs) + self._post_telegrafs_prepare(telegraf_plugin_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/telegrafs', 'POST', @@ -1261,7 +1261,7 @@ def post_telegrafs_id_labels_with_http_info(self, telegraf_id, label_mapping, ** returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_telegrafs_id_labels_prepare(telegraf_id, label_mapping, **kwargs) + self._post_telegrafs_id_labels_prepare(telegraf_id, label_mapping, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}/labels', 'POST', @@ -1294,7 +1294,7 @@ async def post_telegrafs_id_labels_async(self, telegraf_id, label_mapping, **kwa returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_telegrafs_id_labels_prepare(telegraf_id, label_mapping, **kwargs) + self._post_telegrafs_id_labels_prepare(telegraf_id, label_mapping, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}/labels', 'POST', @@ -1390,7 +1390,7 @@ def post_telegrafs_id_members_with_http_info(self, telegraf_id, add_resource_mem returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_telegrafs_id_members_prepare(telegraf_id, add_resource_member_request_body, **kwargs) + self._post_telegrafs_id_members_prepare(telegraf_id, add_resource_member_request_body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}/members', 'POST', @@ -1423,7 +1423,7 @@ async def post_telegrafs_id_members_async(self, telegraf_id, add_resource_member returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_telegrafs_id_members_prepare(telegraf_id, add_resource_member_request_body, **kwargs) + self._post_telegrafs_id_members_prepare(telegraf_id, add_resource_member_request_body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}/members', 'POST', @@ -1519,7 +1519,7 @@ def post_telegrafs_id_owners_with_http_info(self, telegraf_id, add_resource_memb returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_telegrafs_id_owners_prepare(telegraf_id, add_resource_member_request_body, **kwargs) + self._post_telegrafs_id_owners_prepare(telegraf_id, add_resource_member_request_body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}/owners', 'POST', @@ -1552,7 +1552,7 @@ async def post_telegrafs_id_owners_async(self, telegraf_id, add_resource_member_ returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_telegrafs_id_owners_prepare(telegraf_id, add_resource_member_request_body, **kwargs) + self._post_telegrafs_id_owners_prepare(telegraf_id, add_resource_member_request_body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}/owners', 'POST', @@ -1648,7 +1648,7 @@ def put_telegrafs_id_with_http_info(self, telegraf_id, telegraf_plugin_request, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._put_telegrafs_id_prepare(telegraf_id, telegraf_plugin_request, **kwargs) + self._put_telegrafs_id_prepare(telegraf_id, telegraf_plugin_request, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}', 'PUT', @@ -1681,7 +1681,7 @@ async def put_telegrafs_id_async(self, telegraf_id, telegraf_plugin_request, **k returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._put_telegrafs_id_prepare(telegraf_id, telegraf_plugin_request, **kwargs) + self._put_telegrafs_id_prepare(telegraf_id, telegraf_plugin_request, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/telegrafs/{telegrafID}', 'PUT', diff --git a/influxdb_client/service/templates_service.py b/influxdb_client/service/templates_service.py index 11110c43..92780a0c 100644 --- a/influxdb_client/service/templates_service.py +++ b/influxdb_client/service/templates_service.py @@ -32,14 +32,14 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 def apply_template(self, template_apply, **kwargs): # noqa: E501,D401,D403 """Apply or dry-run a template. - Applies or performs a dry-run of template in an organization. + Applies a template to create or update a [stack](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/) of InfluxDB [resources](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/export/all/#resources). The response contains the diff of changes and the stack ID. Use this endpoint to install an InfluxDB template to an organization. Provide template URLs or template objects in your request. To customize which template resources are installed, use the `actions` parameter. By default, when you apply a template, InfluxDB installs the template to create and update stack resources and then generates a diff of the changes. If you pass `dryRun: true` in the request body, InfluxDB validates the template and generates the resource diff, but doesn’t make any changes to your instance. #### Custom values for templates - Some templates may contain [environment references](https://docs.influxdata.com/influxdb/latest/influxdb-templates/create/#include-user-definable-resource-names) for custom metadata. To provide custom values for environment references, pass the _`envRefs`_ property in the request body. For more information and examples, see how to [define environment references](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#define-environment-references). - Some templates may contain queries that use [secrets](https://docs.influxdata.com/influxdb/latest/security/secrets/). To provide custom secret values, pass the _`secrets`_ property in the request body. Don't expose secret values in templates. For more information, see [how to pass secrets when installing a template](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#pass-secrets-when-installing-a-template). #### Required permissions - `write` permissions for resource types in the template. #### Rate limits (with InfluxDB Cloud) - Adjustable service quotas apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Use templates](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/) - [Stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.apply_template(template_apply, async_req=True) >>> result = thread.get() :param async_req bool - :param TemplateApply template_apply: (required) + :param TemplateApply template_apply: Parameters for applying templates. (required) :return: TemplateSummary If the method is called asynchronously, returns the request thread. @@ -54,20 +54,20 @@ def apply_template(self, template_apply, **kwargs): # noqa: E501,D401,D403 def apply_template_with_http_info(self, template_apply, **kwargs): # noqa: E501,D401,D403 """Apply or dry-run a template. - Applies or performs a dry-run of template in an organization. + Applies a template to create or update a [stack](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/) of InfluxDB [resources](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/export/all/#resources). The response contains the diff of changes and the stack ID. Use this endpoint to install an InfluxDB template to an organization. Provide template URLs or template objects in your request. To customize which template resources are installed, use the `actions` parameter. By default, when you apply a template, InfluxDB installs the template to create and update stack resources and then generates a diff of the changes. If you pass `dryRun: true` in the request body, InfluxDB validates the template and generates the resource diff, but doesn’t make any changes to your instance. #### Custom values for templates - Some templates may contain [environment references](https://docs.influxdata.com/influxdb/latest/influxdb-templates/create/#include-user-definable-resource-names) for custom metadata. To provide custom values for environment references, pass the _`envRefs`_ property in the request body. For more information and examples, see how to [define environment references](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#define-environment-references). - Some templates may contain queries that use [secrets](https://docs.influxdata.com/influxdb/latest/security/secrets/). To provide custom secret values, pass the _`secrets`_ property in the request body. Don't expose secret values in templates. For more information, see [how to pass secrets when installing a template](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#pass-secrets-when-installing-a-template). #### Required permissions - `write` permissions for resource types in the template. #### Rate limits (with InfluxDB Cloud) - Adjustable service quotas apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Use templates](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/) - [Stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.apply_template_with_http_info(template_apply, async_req=True) >>> result = thread.get() :param async_req bool - :param TemplateApply template_apply: (required) + :param TemplateApply template_apply: Parameters for applying templates. (required) :return: TemplateSummary If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._apply_template_prepare(template_apply, **kwargs) + self._apply_template_prepare(template_apply, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/templates/apply', 'POST', @@ -89,17 +89,17 @@ def apply_template_with_http_info(self, template_apply, **kwargs): # noqa: E501 async def apply_template_async(self, template_apply, **kwargs): # noqa: E501,D401,D403 """Apply or dry-run a template. - Applies or performs a dry-run of template in an organization. + Applies a template to create or update a [stack](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/) of InfluxDB [resources](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/export/all/#resources). The response contains the diff of changes and the stack ID. Use this endpoint to install an InfluxDB template to an organization. Provide template URLs or template objects in your request. To customize which template resources are installed, use the `actions` parameter. By default, when you apply a template, InfluxDB installs the template to create and update stack resources and then generates a diff of the changes. If you pass `dryRun: true` in the request body, InfluxDB validates the template and generates the resource diff, but doesn’t make any changes to your instance. #### Custom values for templates - Some templates may contain [environment references](https://docs.influxdata.com/influxdb/latest/influxdb-templates/create/#include-user-definable-resource-names) for custom metadata. To provide custom values for environment references, pass the _`envRefs`_ property in the request body. For more information and examples, see how to [define environment references](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#define-environment-references). - Some templates may contain queries that use [secrets](https://docs.influxdata.com/influxdb/latest/security/secrets/). To provide custom secret values, pass the _`secrets`_ property in the request body. Don't expose secret values in templates. For more information, see [how to pass secrets when installing a template](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#pass-secrets-when-installing-a-template). #### Required permissions - `write` permissions for resource types in the template. #### Rate limits (with InfluxDB Cloud) - Adjustable service quotas apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Use templates](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/) - [Stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/) This method makes an asynchronous HTTP request. :param async_req bool - :param TemplateApply template_apply: (required) + :param TemplateApply template_apply: Parameters for applying templates. (required) :return: TemplateSummary If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._apply_template_prepare(template_apply, **kwargs) + self._apply_template_prepare(template_apply, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/templates/apply', 'POST', @@ -148,8 +148,9 @@ def _apply_template_prepare(self, template_apply, **kwargs): # noqa: E501,D401, return local_var_params, path_params, query_params, header_params, body_params def create_stack(self, **kwargs): # noqa: E501,D401,D403 - """Create a new stack. + """Create a stack. + Creates or initializes a stack. Use this endpoint to _manually_ initialize a new stack with the following optional information: - Stack name - Stack description - URLs for template manifest files To automatically create a stack when applying templates, use the [/api/v2/templates/apply endpoint](#operation/ApplyTemplate). #### Required permissions - `write` permission for the organization #### Related guides - [Initialize an InfluxDB stack](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/init/). - [Use InfluxDB templates](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#apply-templates-to-an-influxdb-instance). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_stack(async_req=True) @@ -169,8 +170,9 @@ def create_stack(self, **kwargs): # noqa: E501,D401,D403 return data def create_stack_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Create a new stack. + """Create a stack. + Creates or initializes a stack. Use this endpoint to _manually_ initialize a new stack with the following optional information: - Stack name - Stack description - URLs for template manifest files To automatically create a stack when applying templates, use the [/api/v2/templates/apply endpoint](#operation/ApplyTemplate). #### Required permissions - `write` permission for the organization #### Related guides - [Initialize an InfluxDB stack](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/init/). - [Use InfluxDB templates](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#apply-templates-to-an-influxdb-instance). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_stack_with_http_info(async_req=True) @@ -183,7 +185,7 @@ def create_stack_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._create_stack_prepare(**kwargs) + self._create_stack_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/stacks', 'POST', @@ -203,8 +205,9 @@ def create_stack_with_http_info(self, **kwargs): # noqa: E501,D401,D403 urlopen_kw=kwargs.get('urlopen_kw', None)) async def create_stack_async(self, **kwargs): # noqa: E501,D401,D403 - """Create a new stack. + """Create a stack. + Creates or initializes a stack. Use this endpoint to _manually_ initialize a new stack with the following optional information: - Stack name - Stack description - URLs for template manifest files To automatically create a stack when applying templates, use the [/api/v2/templates/apply endpoint](#operation/ApplyTemplate). #### Required permissions - `write` permission for the organization #### Related guides - [Initialize an InfluxDB stack](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/init/). - [Use InfluxDB templates](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#apply-templates-to-an-influxdb-instance). This method makes an asynchronous HTTP request. :param async_req bool @@ -214,7 +217,7 @@ async def create_stack_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._create_stack_prepare(**kwargs) + self._create_stack_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/stacks', 'POST', @@ -296,7 +299,7 @@ def delete_stack_with_http_info(self, stack_id, org_id, **kwargs): # noqa: E501 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_stack_prepare(stack_id, org_id, **kwargs) + self._delete_stack_prepare(stack_id, org_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/stacks/{stack_id}', 'DELETE', @@ -328,7 +331,7 @@ async def delete_stack_async(self, stack_id, org_id, **kwargs): # noqa: E501,D4 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_stack_prepare(stack_id, org_id, **kwargs) + self._delete_stack_prepare(stack_id, org_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/stacks/{stack_id}', 'DELETE', @@ -414,7 +417,7 @@ def export_template_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._export_template_prepare(**kwargs) + self._export_template_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/templates/export', 'POST', @@ -445,7 +448,7 @@ async def export_template_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._export_template_prepare(**kwargs) + self._export_template_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/templates/export', 'POST', @@ -490,17 +493,18 @@ def _export_template_prepare(self, **kwargs): # noqa: E501,D401,D403 return local_var_params, path_params, query_params, header_params, body_params def list_stacks(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List installed templates. + """List installed stacks. + Lists installed InfluxDB stacks. To limit stacks in the response, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all installed stacks for the organization. #### Related guides - [View InfluxDB stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_stacks(org_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str org_id: The organization ID of the stacks (required) - :param str name: A collection of names to filter the list by. - :param str stack_id: A collection of stackIDs to filter the list by. + :param str org_id: An organization ID. Only returns stacks owned by the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). #### InfluxDB Cloud - Doesn't require this parameter; InfluxDB only returns resources allowed by the API token. (required) + :param str name: A stack name. Finds stack `events` with this name and returns the stacks. Repeatable. To filter for more than one stack name, repeat this parameter with each name--for example: - `INFLUX_URL/api/v2/stacks?&orgID=INFLUX_ORG_ID&name=project-stack-0&name=project-stack-1` + :param str stack_id: A stack ID. Only returns the specified stack. Repeatable. To filter for more than one stack ID, repeat this parameter with each ID--for example: - `INFLUX_URL/api/v2/stacks?&orgID=INFLUX_ORG_ID&stackID=09bd87cd33be3000&stackID=09bef35081fe3000` :return: ListStacksResponse If the method is called asynchronously, returns the request thread. @@ -513,23 +517,24 @@ def list_stacks(self, org_id, **kwargs): # noqa: E501,D401,D403 return data def list_stacks_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List installed templates. + """List installed stacks. + Lists installed InfluxDB stacks. To limit stacks in the response, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all installed stacks for the organization. #### Related guides - [View InfluxDB stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_stacks_with_http_info(org_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str org_id: The organization ID of the stacks (required) - :param str name: A collection of names to filter the list by. - :param str stack_id: A collection of stackIDs to filter the list by. + :param str org_id: An organization ID. Only returns stacks owned by the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). #### InfluxDB Cloud - Doesn't require this parameter; InfluxDB only returns resources allowed by the API token. (required) + :param str name: A stack name. Finds stack `events` with this name and returns the stacks. Repeatable. To filter for more than one stack name, repeat this parameter with each name--for example: - `INFLUX_URL/api/v2/stacks?&orgID=INFLUX_ORG_ID&name=project-stack-0&name=project-stack-1` + :param str stack_id: A stack ID. Only returns the specified stack. Repeatable. To filter for more than one stack ID, repeat this parameter with each ID--for example: - `INFLUX_URL/api/v2/stacks?&orgID=INFLUX_ORG_ID&stackID=09bd87cd33be3000&stackID=09bef35081fe3000` :return: ListStacksResponse If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._list_stacks_prepare(org_id, **kwargs) + self._list_stacks_prepare(org_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/stacks', 'GET', @@ -549,20 +554,21 @@ def list_stacks_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D403 urlopen_kw=kwargs.get('urlopen_kw', None)) async def list_stacks_async(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List installed templates. + """List installed stacks. + Lists installed InfluxDB stacks. To limit stacks in the response, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all installed stacks for the organization. #### Related guides - [View InfluxDB stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/). This method makes an asynchronous HTTP request. :param async_req bool - :param str org_id: The organization ID of the stacks (required) - :param str name: A collection of names to filter the list by. - :param str stack_id: A collection of stackIDs to filter the list by. + :param str org_id: An organization ID. Only returns stacks owned by the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). #### InfluxDB Cloud - Doesn't require this parameter; InfluxDB only returns resources allowed by the API token. (required) + :param str name: A stack name. Finds stack `events` with this name and returns the stacks. Repeatable. To filter for more than one stack name, repeat this parameter with each name--for example: - `INFLUX_URL/api/v2/stacks?&orgID=INFLUX_ORG_ID&name=project-stack-0&name=project-stack-1` + :param str stack_id: A stack ID. Only returns the specified stack. Repeatable. To filter for more than one stack ID, repeat this parameter with each ID--for example: - `INFLUX_URL/api/v2/stacks?&orgID=INFLUX_ORG_ID&stackID=09bd87cd33be3000&stackID=09bef35081fe3000` :return: ListStacksResponse If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._list_stacks_prepare(org_id, **kwargs) + self._list_stacks_prepare(org_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/stacks', 'GET', @@ -646,7 +652,7 @@ def read_stack_with_http_info(self, stack_id, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._read_stack_prepare(stack_id, **kwargs) + self._read_stack_prepare(stack_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/stacks/{stack_id}', 'GET', @@ -677,7 +683,7 @@ async def read_stack_async(self, stack_id, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._read_stack_prepare(stack_id, **kwargs) + self._read_stack_prepare(stack_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/stacks/{stack_id}', 'GET', @@ -757,7 +763,7 @@ def uninstall_stack_with_http_info(self, stack_id, **kwargs): # noqa: E501,D401 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._uninstall_stack_prepare(stack_id, **kwargs) + self._uninstall_stack_prepare(stack_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/stacks/{stack_id}/uninstall', 'POST', @@ -788,7 +794,7 @@ async def uninstall_stack_async(self, stack_id, **kwargs): # noqa: E501,D401,D4 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._uninstall_stack_prepare(stack_id, **kwargs) + self._uninstall_stack_prepare(stack_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/stacks/{stack_id}/uninstall', 'POST', @@ -870,7 +876,7 @@ def update_stack_with_http_info(self, stack_id, **kwargs): # noqa: E501,D401,D4 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._update_stack_prepare(stack_id, **kwargs) + self._update_stack_prepare(stack_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/stacks/{stack_id}', 'PATCH', @@ -902,7 +908,7 @@ async def update_stack_async(self, stack_id, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._update_stack_prepare(stack_id, **kwargs) + self._update_stack_prepare(stack_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/stacks/{stack_id}', 'PATCH', diff --git a/influxdb_client/service/users_service.py b/influxdb_client/service/users_service.py index eae1ffe1..b5323244 100644 --- a/influxdb_client/service/users_service.py +++ b/influxdb_client/service/users_service.py @@ -32,13 +32,14 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 def delete_users_id(self, user_id, **kwargs): # noqa: E501,D401,D403 """Delete a user. + Deletes a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). #### Required permissions | Action | Permission required | |:------------|:-----------------------------------------------| | Delete a user | `write-users` or `write-user USER_ID` | *`USER_ID`* is the ID of the user that you want to delete. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/organizations/users/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_users_id(user_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The ID of the user to delete. (required) + :param str user_id: A user ID. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, @@ -54,20 +55,21 @@ def delete_users_id(self, user_id, **kwargs): # noqa: E501,D401,D403 def delete_users_id_with_http_info(self, user_id, **kwargs): # noqa: E501,D401,D403 """Delete a user. + Deletes a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). #### Required permissions | Action | Permission required | |:------------|:-----------------------------------------------| | Delete a user | `write-users` or `write-user USER_ID` | *`USER_ID`* is the ID of the user that you want to delete. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/organizations/users/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_users_id_with_http_info(user_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The ID of the user to delete. (required) + :param str user_id: A user ID. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_users_id_prepare(user_id, **kwargs) + self._delete_users_id_prepare(user_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/users/{userID}', 'DELETE', @@ -89,17 +91,18 @@ def delete_users_id_with_http_info(self, user_id, **kwargs): # noqa: E501,D401, async def delete_users_id_async(self, user_id, **kwargs): # noqa: E501,D401,D403 """Delete a user. + Deletes a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). #### Required permissions | Action | Permission required | |:------------|:-----------------------------------------------| | Delete a user | `write-users` or `write-user USER_ID` | *`USER_ID`* is the ID of the user that you want to delete. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/organizations/users/) This method makes an asynchronous HTTP request. :param async_req bool - :param str user_id: The ID of the user to delete. (required) + :param str user_id: A user ID. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_users_id_prepare(user_id, **kwargs) + self._delete_users_id_prepare(user_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/users/{userID}', 'DELETE', @@ -145,113 +148,6 @@ def _delete_users_id_prepare(self, user_id, **kwargs): # noqa: E501,D401,D403 return local_var_params, path_params, query_params, header_params, body_params - def get_flags(self, **kwargs): # noqa: E501,D401,D403 - """Return the feature flags for the currently authenticated user. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_flags(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: dict(str, object) - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_flags_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_flags_with_http_info(**kwargs) # noqa: E501 - return data - - def get_flags_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Return the feature flags for the currently authenticated user. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_flags_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: dict(str, object) - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_flags_prepare(**kwargs) - - return self.api_client.call_api( - '/api/v2/flags', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='dict(str, object)', # noqa: E501 - auth_settings=[], - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_flags_async(self, **kwargs): # noqa: E501,D401,D403 - """Return the feature flags for the currently authenticated user. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: dict(str, object) - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_flags_prepare(**kwargs) - - return await self.api_client.call_api( - '/api/v2/flags', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='dict(str, object)', # noqa: E501 - auth_settings=[], - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_flags_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span'] # noqa: E501 - self._check_operation_params('get_flags', all_params, local_var_params) - - path_params = {} - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - def get_me(self, **kwargs): # noqa: E501,D401,D403 """Retrieve the currently authenticated user. @@ -288,7 +184,7 @@ def get_me_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_me_prepare(**kwargs) + self._get_me_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/me', 'GET', @@ -319,7 +215,7 @@ async def get_me_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_me_prepare(**kwargs) + self._get_me_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/me', 'GET', @@ -362,7 +258,7 @@ def _get_me_prepare(self, **kwargs): # noqa: E501,D401,D403 def get_users(self, **kwargs): # noqa: E501,D401,D403 """List users. - Retrieves a list of users. Default limit is `20`. To limit which users are returned, pass query parameters in your request. #### Required permissions - `read-user USER_ID` permission. `USER_ID` is the ID of the user that you want to list. - InfluxDB OSS requires an _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token))_ to list all users. + Lists [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). Default limit is `20`. To limit which users are returned, pass query parameters in your request. #### Required permissions for InfluxDB OSS | Action | Permission required | Restriction | |:-------|:--------------------|:------------| | List all users | _[Operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_ | | | List a specific user | `read-users` or `read-user USER_ID` | | *`USER_ID`* is the ID of the user that you want to retrieve. #### Related guides - [View users](https://docs.influxdata.com/influxdb/latest/users/view-users/). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_users(async_req=True) @@ -370,11 +266,11 @@ def get_users(self, **kwargs): # noqa: E501,D401,D403 :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. + :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 str after: Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. - :param str name: - :param str id: + :param str after: A resource ID to seek from. Returns records created after the specified record; results don't include the specified record. Use `after` instead of the `offset` parameter. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). + :param str name: A user name. Only lists the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). + :param str id: A user ID. Only lists the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). :return: Users If the method is called asynchronously, returns the request thread. @@ -389,7 +285,7 @@ def get_users(self, **kwargs): # noqa: E501,D401,D403 def get_users_with_http_info(self, **kwargs): # noqa: E501,D401,D403 """List users. - Retrieves a list of users. Default limit is `20`. To limit which users are returned, pass query parameters in your request. #### Required permissions - `read-user USER_ID` permission. `USER_ID` is the ID of the user that you want to list. - InfluxDB OSS requires an _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token))_ to list all users. + Lists [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). Default limit is `20`. To limit which users are returned, pass query parameters in your request. #### Required permissions for InfluxDB OSS | Action | Permission required | Restriction | |:-------|:--------------------|:------------| | List all users | _[Operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_ | | | List a specific user | `read-users` or `read-user USER_ID` | | *`USER_ID`* is the ID of the user that you want to retrieve. #### Related guides - [View users](https://docs.influxdata.com/influxdb/latest/users/view-users/). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_users_with_http_info(async_req=True) @@ -397,17 +293,17 @@ def get_users_with_http_info(self, **kwargs): # noqa: E501,D401,D403 :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. + :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 str after: Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. - :param str name: - :param str id: + :param str after: A resource ID to seek from. Returns records created after the specified record; results don't include the specified record. Use `after` instead of the `offset` parameter. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). + :param str name: A user name. Only lists the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). + :param str id: A user ID. Only lists the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). :return: Users If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_users_prepare(**kwargs) + self._get_users_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/users', 'GET', @@ -429,22 +325,22 @@ def get_users_with_http_info(self, **kwargs): # noqa: E501,D401,D403 async def get_users_async(self, **kwargs): # noqa: E501,D401,D403 """List users. - Retrieves a list of users. Default limit is `20`. To limit which users are returned, pass query parameters in your request. #### Required permissions - `read-user USER_ID` permission. `USER_ID` is the ID of the user that you want to list. - InfluxDB OSS requires an _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token))_ to list all users. + Lists [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). Default limit is `20`. To limit which users are returned, pass query parameters in your request. #### Required permissions for InfluxDB OSS | Action | Permission required | Restriction | |:-------|:--------------------|:------------| | List all users | _[Operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_ | | | List a specific user | `read-users` or `read-user USER_ID` | | *`USER_ID`* is the ID of the user that you want to retrieve. #### Related guides - [View users](https://docs.influxdata.com/influxdb/latest/users/view-users/). 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. + :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 str after: Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. - :param str name: - :param str id: + :param str after: A resource ID to seek from. Returns records created after the specified record; results don't include the specified record. Use `after` instead of the `offset` parameter. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). + :param str name: A user name. Only lists the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). + :param str id: A user ID. Only lists the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). :return: Users If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_users_prepare(**kwargs) + self._get_users_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/users', 'GET', @@ -503,13 +399,14 @@ def _get_users_prepare(self, **kwargs): # noqa: E501,D401,D403 def get_users_id(self, user_id, **kwargs): # noqa: E501,D401,D403 """Retrieve a user. + Retrieves a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/organizations/users/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_users_id(user_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The user ID. (required) + :param str user_id: A user ID. Retrieves the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). (required) :param str zap_trace_span: OpenTracing span context :return: UserResponse If the method is called asynchronously, @@ -525,20 +422,21 @@ def get_users_id(self, user_id, **kwargs): # noqa: E501,D401,D403 def get_users_id_with_http_info(self, user_id, **kwargs): # noqa: E501,D401,D403 """Retrieve a user. + Retrieves a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/organizations/users/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_users_id_with_http_info(user_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The user ID. (required) + :param str user_id: A user ID. Retrieves the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). (required) :param str zap_trace_span: OpenTracing span context :return: UserResponse If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_users_id_prepare(user_id, **kwargs) + self._get_users_id_prepare(user_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/users/{userID}', 'GET', @@ -560,17 +458,18 @@ def get_users_id_with_http_info(self, user_id, **kwargs): # noqa: E501,D401,D40 async def get_users_id_async(self, user_id, **kwargs): # noqa: E501,D401,D403 """Retrieve a user. + Retrieves a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/organizations/users/) This method makes an asynchronous HTTP request. :param async_req bool - :param str user_id: The user ID. (required) + :param str user_id: A user ID. Retrieves the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). (required) :param str zap_trace_span: OpenTracing span context :return: UserResponse If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_users_id_prepare(user_id, **kwargs) + self._get_users_id_prepare(user_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/users/{userID}', 'GET', @@ -619,14 +518,15 @@ def _get_users_id_prepare(self, user_id, **kwargs): # noqa: E501,D401,D403 def patch_users_id(self, user_id, user, **kwargs): # noqa: E501,D401,D403 """Update a user. + Updates a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) and returns the user. #### Required permissions | Action | Permission required | |:------------|:-----------------------------------------------| | Update a user | `write-users` or `write-user USER_ID` | *`USER_ID`* is the ID of the user that you want to update. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/organizations/users/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_users_id(user_id, user, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The ID of the user to update. (required) - :param User user: User update to apply (required) + :param str user_id: A user ID. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) to update. (required) + :param User user: In the request body, provide the user properties to update. (required) :param str zap_trace_span: OpenTracing span context :return: UserResponse If the method is called asynchronously, @@ -642,21 +542,22 @@ def patch_users_id(self, user_id, user, **kwargs): # noqa: E501,D401,D403 def patch_users_id_with_http_info(self, user_id, user, **kwargs): # noqa: E501,D401,D403 """Update a user. + Updates a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) and returns the user. #### Required permissions | Action | Permission required | |:------------|:-----------------------------------------------| | Update a user | `write-users` or `write-user USER_ID` | *`USER_ID`* is the ID of the user that you want to update. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/organizations/users/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_users_id_with_http_info(user_id, user, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The ID of the user to update. (required) - :param User user: User update to apply (required) + :param str user_id: A user ID. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) to update. (required) + :param User user: In the request body, provide the user properties to update. (required) :param str zap_trace_span: OpenTracing span context :return: UserResponse If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_users_id_prepare(user_id, user, **kwargs) + self._patch_users_id_prepare(user_id, user, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/users/{userID}', 'PATCH', @@ -678,18 +579,19 @@ def patch_users_id_with_http_info(self, user_id, user, **kwargs): # noqa: E501, async def patch_users_id_async(self, user_id, user, **kwargs): # noqa: E501,D401,D403 """Update a user. + Updates a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) and returns the user. #### Required permissions | Action | Permission required | |:------------|:-----------------------------------------------| | Update a user | `write-users` or `write-user USER_ID` | *`USER_ID`* is the ID of the user that you want to update. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/organizations/users/) This method makes an asynchronous HTTP request. :param async_req bool - :param str user_id: The ID of the user to update. (required) - :param User user: User update to apply (required) + :param str user_id: A user ID. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) to update. (required) + :param User user: In the request body, provide the user properties to update. (required) :param str zap_trace_span: OpenTracing span context :return: UserResponse If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_users_id_prepare(user_id, user, **kwargs) + self._patch_users_id_prepare(user_id, user, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/users/{userID}', 'PATCH', @@ -748,7 +650,7 @@ def _patch_users_id_prepare(self, user_id, user, **kwargs): # noqa: E501,D401,D def post_users(self, user, **kwargs): # noqa: E501,D401,D403 """Create a user. - Creates a user and returns the newly created user. #### Required permissions - `write-users`. Requires an InfluxDB API **Op** token. + Creates a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) that can access InfluxDB. Returns the user. Use this endpoint to create a user that can sign in to start a user session through one of the following interfaces: - InfluxDB UI - `/api/v2/signin` InfluxDB API endpoint - InfluxDB CLI This endpoint represents the first two steps in a four-step process to allow a user to authenticate with a username and password, and then access data in an organization: 1. Create a user: send a `POST` request to `POST /api/v2/users`. The `name` property is required. 2. Extract the user ID (`id` property) value from the API response for _step 1_. 3. Create an authorization (and API token) for the user: send a `POST` request to [`POST /api/v2/authorizations`](#operation/PostAuthorizations), passing the user ID (`id`) from _step 2_. 4. Create a password for the user: send a `POST` request to [`POST /api/v2/users/USER_ID/password`](#operation/PostUsersIDPassword), passing the user ID from _step 2_. #### Required permissions | Action | Permission required | Restriction | |:-------|:--------------------|:------------| | Create a user | _[Operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_ | | #### Related guides - [Create a user](https://docs.influxdata.com/influxdb/latest/users/create-user/) - [Create an API token scoped to a user](https://docs.influxdata.com/influxdb/latest/security/tokens/create-token/#create-a-token-scoped-to-a-user) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_users(user, async_req=True) @@ -771,7 +673,7 @@ def post_users(self, user, **kwargs): # noqa: E501,D401,D403 def post_users_with_http_info(self, user, **kwargs): # noqa: E501,D401,D403 """Create a user. - Creates a user and returns the newly created user. #### Required permissions - `write-users`. Requires an InfluxDB API **Op** token. + Creates a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) that can access InfluxDB. Returns the user. Use this endpoint to create a user that can sign in to start a user session through one of the following interfaces: - InfluxDB UI - `/api/v2/signin` InfluxDB API endpoint - InfluxDB CLI This endpoint represents the first two steps in a four-step process to allow a user to authenticate with a username and password, and then access data in an organization: 1. Create a user: send a `POST` request to `POST /api/v2/users`. The `name` property is required. 2. Extract the user ID (`id` property) value from the API response for _step 1_. 3. Create an authorization (and API token) for the user: send a `POST` request to [`POST /api/v2/authorizations`](#operation/PostAuthorizations), passing the user ID (`id`) from _step 2_. 4. Create a password for the user: send a `POST` request to [`POST /api/v2/users/USER_ID/password`](#operation/PostUsersIDPassword), passing the user ID from _step 2_. #### Required permissions | Action | Permission required | Restriction | |:-------|:--------------------|:------------| | Create a user | _[Operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_ | | #### Related guides - [Create a user](https://docs.influxdata.com/influxdb/latest/users/create-user/) - [Create an API token scoped to a user](https://docs.influxdata.com/influxdb/latest/security/tokens/create-token/#create-a-token-scoped-to-a-user) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_users_with_http_info(user, async_req=True) @@ -785,7 +687,7 @@ def post_users_with_http_info(self, user, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_users_prepare(user, **kwargs) + self._post_users_prepare(user, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/users', 'POST', @@ -807,7 +709,7 @@ def post_users_with_http_info(self, user, **kwargs): # noqa: E501,D401,D403 async def post_users_async(self, user, **kwargs): # noqa: E501,D401,D403 """Create a user. - Creates a user and returns the newly created user. #### Required permissions - `write-users`. Requires an InfluxDB API **Op** token. + Creates a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) that can access InfluxDB. Returns the user. Use this endpoint to create a user that can sign in to start a user session through one of the following interfaces: - InfluxDB UI - `/api/v2/signin` InfluxDB API endpoint - InfluxDB CLI This endpoint represents the first two steps in a four-step process to allow a user to authenticate with a username and password, and then access data in an organization: 1. Create a user: send a `POST` request to `POST /api/v2/users`. The `name` property is required. 2. Extract the user ID (`id` property) value from the API response for _step 1_. 3. Create an authorization (and API token) for the user: send a `POST` request to [`POST /api/v2/authorizations`](#operation/PostAuthorizations), passing the user ID (`id`) from _step 2_. 4. Create a password for the user: send a `POST` request to [`POST /api/v2/users/USER_ID/password`](#operation/PostUsersIDPassword), passing the user ID from _step 2_. #### Required permissions | Action | Permission required | Restriction | |:-------|:--------------------|:------------| | Create a user | _[Operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_ | | #### Related guides - [Create a user](https://docs.influxdata.com/influxdb/latest/users/create-user/) - [Create an API token scoped to a user](https://docs.influxdata.com/influxdb/latest/security/tokens/create-token/#create-a-token-scoped-to-a-user) This method makes an asynchronous HTTP request. :param async_req bool @@ -818,7 +720,7 @@ async def post_users_async(self, user, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_users_prepare(user, **kwargs) + self._post_users_prepare(user, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/users', 'POST', @@ -871,15 +773,15 @@ def _post_users_prepare(self, user, **kwargs): # noqa: E501,D401,D403 def post_users_id_password(self, user_id, password_reset_body, **kwargs): # noqa: E501,D401,D403 """Update a password. - #### InfluxDB Cloud InfluxDB Cloud doesn't support changing user passwords through the API. Use the InfluxDB Cloud user interface to update your password. + Updates a user password. #### InfluxDB Cloud - Doesn't allow you to manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update a password. #### Related guides - [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/) - [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_users_id_password(user_id, password_reset_body, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The user ID. (required) - :param PasswordResetBody password_reset_body: New password (required) + :param str user_id: The ID of the user to set the password for. (required) + :param PasswordResetBody password_reset_body: The new password to set for the user. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, @@ -895,22 +797,22 @@ def post_users_id_password(self, user_id, password_reset_body, **kwargs): # noq def post_users_id_password_with_http_info(self, user_id, password_reset_body, **kwargs): # noqa: E501,D401,D403 """Update a password. - #### InfluxDB Cloud InfluxDB Cloud doesn't support changing user passwords through the API. Use the InfluxDB Cloud user interface to update your password. + Updates a user password. #### InfluxDB Cloud - Doesn't allow you to manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update a password. #### Related guides - [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/) - [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_users_id_password_with_http_info(user_id, password_reset_body, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The user ID. (required) - :param PasswordResetBody password_reset_body: New password (required) + :param str user_id: The ID of the user to set the password for. (required) + :param PasswordResetBody password_reset_body: The new password to set for the user. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_users_id_password_prepare(user_id, password_reset_body, **kwargs) + self._post_users_id_password_prepare(user_id, password_reset_body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/users/{userID}/password', 'POST', @@ -932,19 +834,19 @@ def post_users_id_password_with_http_info(self, user_id, password_reset_body, ** async def post_users_id_password_async(self, user_id, password_reset_body, **kwargs): # noqa: E501,D401,D403 """Update a password. - #### InfluxDB Cloud InfluxDB Cloud doesn't support changing user passwords through the API. Use the InfluxDB Cloud user interface to update your password. + Updates a user password. #### InfluxDB Cloud - Doesn't allow you to manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update a password. #### Related guides - [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/) - [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/) This method makes an asynchronous HTTP request. :param async_req bool - :param str user_id: The user ID. (required) - :param PasswordResetBody password_reset_body: New password (required) + :param str user_id: The ID of the user to set the password for. (required) + :param PasswordResetBody password_reset_body: The new password to set for the user. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_users_id_password_prepare(user_id, password_reset_body, **kwargs) + self._post_users_id_password_prepare(user_id, password_reset_body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/users/{userID}/password', 'POST', @@ -1003,7 +905,7 @@ def _post_users_id_password_prepare(self, user_id, password_reset_body, **kwargs def put_me_password(self, password_reset_body, **kwargs): # noqa: E501,D401,D403 """Update a password. - #### InfluxDB Cloud InfluxDB Cloud doesn't support changing user passwords through the API. Use the InfluxDB Cloud user interface to update your password. + Updates the password for the signed-in [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). This endpoint represents the third step in the following three-step process to let a user with a user session update their password: 1. Pass the user's [Basic authentication credentials](#section/Authentication/BasicAuthentication) to the `POST /api/v2/signin` endpoint to create a user session and generate a session cookie. 2. From the response in the first step, extract the session cookie (`Set-Cookie`) header. 3. Pass the following in a request to the `PUT /api/v2/me/password` endpoint: - The `Set-Cookie` header from the second step - The `Authorization Basic` header with the user's _Basic authentication_ credentials - `{"password": "NEW_PASSWORD"}` in the request body #### InfluxDB Cloud - Doesn't let you manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update your password. #### Related endpoints - [Signin](#tag/Signin) - [Signout](#tag/Signout) - [Users](#tag/Users) #### Related guides - [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/) - [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.put_me_password(password_reset_body, async_req=True) @@ -1027,7 +929,7 @@ def put_me_password(self, password_reset_body, **kwargs): # noqa: E501,D401,D40 def put_me_password_with_http_info(self, password_reset_body, **kwargs): # noqa: E501,D401,D403 """Update a password. - #### InfluxDB Cloud InfluxDB Cloud doesn't support changing user passwords through the API. Use the InfluxDB Cloud user interface to update your password. + Updates the password for the signed-in [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). This endpoint represents the third step in the following three-step process to let a user with a user session update their password: 1. Pass the user's [Basic authentication credentials](#section/Authentication/BasicAuthentication) to the `POST /api/v2/signin` endpoint to create a user session and generate a session cookie. 2. From the response in the first step, extract the session cookie (`Set-Cookie`) header. 3. Pass the following in a request to the `PUT /api/v2/me/password` endpoint: - The `Set-Cookie` header from the second step - The `Authorization Basic` header with the user's _Basic authentication_ credentials - `{"password": "NEW_PASSWORD"}` in the request body #### InfluxDB Cloud - Doesn't let you manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update your password. #### Related endpoints - [Signin](#tag/Signin) - [Signout](#tag/Signout) - [Users](#tag/Users) #### Related guides - [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/) - [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.put_me_password_with_http_info(password_reset_body, async_req=True) @@ -1042,7 +944,7 @@ def put_me_password_with_http_info(self, password_reset_body, **kwargs): # noqa returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._put_me_password_prepare(password_reset_body, **kwargs) + self._put_me_password_prepare(password_reset_body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/me/password', 'PUT', @@ -1064,7 +966,7 @@ def put_me_password_with_http_info(self, password_reset_body, **kwargs): # noqa async def put_me_password_async(self, password_reset_body, **kwargs): # noqa: E501,D401,D403 """Update a password. - #### InfluxDB Cloud InfluxDB Cloud doesn't support changing user passwords through the API. Use the InfluxDB Cloud user interface to update your password. + Updates the password for the signed-in [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). This endpoint represents the third step in the following three-step process to let a user with a user session update their password: 1. Pass the user's [Basic authentication credentials](#section/Authentication/BasicAuthentication) to the `POST /api/v2/signin` endpoint to create a user session and generate a session cookie. 2. From the response in the first step, extract the session cookie (`Set-Cookie`) header. 3. Pass the following in a request to the `PUT /api/v2/me/password` endpoint: - The `Set-Cookie` header from the second step - The `Authorization Basic` header with the user's _Basic authentication_ credentials - `{"password": "NEW_PASSWORD"}` in the request body #### InfluxDB Cloud - Doesn't let you manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update your password. #### Related endpoints - [Signin](#tag/Signin) - [Signout](#tag/Signout) - [Users](#tag/Users) #### Related guides - [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/) - [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/) This method makes an asynchronous HTTP request. :param async_req bool @@ -1076,7 +978,7 @@ async def put_me_password_async(self, password_reset_body, **kwargs): # noqa: E returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._put_me_password_prepare(password_reset_body, **kwargs) + self._put_me_password_prepare(password_reset_body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/me/password', 'PUT', @@ -1131,15 +1033,15 @@ def _put_me_password_prepare(self, password_reset_body, **kwargs): # noqa: E501 def put_users_id_password(self, user_id, password_reset_body, **kwargs): # noqa: E501,D401,D403 """Update a password. - #### InfluxDB Cloud InfluxDB Cloud doesn't support changing user passwords through the API. Use the InfluxDB Cloud user interface to update your password. + Updates a user password. Use this endpoint to let a user authenticate with [Basic authentication credentials](#section/Authentication/BasicAuthentication) and set a new password. #### InfluxDB Cloud - Doesn't allow you to manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update a password. #### Related guides - [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/) - [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.put_users_id_password(user_id, password_reset_body, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The user ID. (required) - :param PasswordResetBody password_reset_body: New password (required) + :param str user_id: The ID of the user to set the password for. (required) + :param PasswordResetBody password_reset_body: The new password to set for the user. (required) :param str zap_trace_span: OpenTracing span context :param str authorization: An auth credential for the Basic scheme :return: None @@ -1156,15 +1058,15 @@ def put_users_id_password(self, user_id, password_reset_body, **kwargs): # noqa def put_users_id_password_with_http_info(self, user_id, password_reset_body, **kwargs): # noqa: E501,D401,D403 """Update a password. - #### InfluxDB Cloud InfluxDB Cloud doesn't support changing user passwords through the API. Use the InfluxDB Cloud user interface to update your password. + Updates a user password. Use this endpoint to let a user authenticate with [Basic authentication credentials](#section/Authentication/BasicAuthentication) and set a new password. #### InfluxDB Cloud - Doesn't allow you to manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update a password. #### Related guides - [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/) - [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.put_users_id_password_with_http_info(user_id, password_reset_body, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The user ID. (required) - :param PasswordResetBody password_reset_body: New password (required) + :param str user_id: The ID of the user to set the password for. (required) + :param PasswordResetBody password_reset_body: The new password to set for the user. (required) :param str zap_trace_span: OpenTracing span context :param str authorization: An auth credential for the Basic scheme :return: None @@ -1172,7 +1074,7 @@ def put_users_id_password_with_http_info(self, user_id, password_reset_body, **k returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._put_users_id_password_prepare(user_id, password_reset_body, **kwargs) + self._put_users_id_password_prepare(user_id, password_reset_body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/users/{userID}/password', 'PUT', @@ -1194,12 +1096,12 @@ def put_users_id_password_with_http_info(self, user_id, password_reset_body, **k async def put_users_id_password_async(self, user_id, password_reset_body, **kwargs): # noqa: E501,D401,D403 """Update a password. - #### InfluxDB Cloud InfluxDB Cloud doesn't support changing user passwords through the API. Use the InfluxDB Cloud user interface to update your password. + Updates a user password. Use this endpoint to let a user authenticate with [Basic authentication credentials](#section/Authentication/BasicAuthentication) and set a new password. #### InfluxDB Cloud - Doesn't allow you to manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update a password. #### Related guides - [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/) - [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/) This method makes an asynchronous HTTP request. :param async_req bool - :param str user_id: The user ID. (required) - :param PasswordResetBody password_reset_body: New password (required) + :param str user_id: The ID of the user to set the password for. (required) + :param PasswordResetBody password_reset_body: The new password to set for the user. (required) :param str zap_trace_span: OpenTracing span context :param str authorization: An auth credential for the Basic scheme :return: None @@ -1207,7 +1109,7 @@ async def put_users_id_password_async(self, user_id, password_reset_body, **kwar returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._put_users_id_password_prepare(user_id, password_reset_body, **kwargs) + self._put_users_id_password_prepare(user_id, password_reset_body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/users/{userID}/password', 'PUT', diff --git a/influxdb_client/service/variables_service.py b/influxdb_client/service/variables_service.py index 9e7778b1..143bd7cc 100644 --- a/influxdb_client/service/variables_service.py +++ b/influxdb_client/service/variables_service.py @@ -67,7 +67,7 @@ def delete_variables_id_with_http_info(self, variable_id, **kwargs): # noqa: E5 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_variables_id_prepare(variable_id, **kwargs) + self._delete_variables_id_prepare(variable_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/variables/{variableID}', 'DELETE', @@ -99,7 +99,7 @@ async def delete_variables_id_async(self, variable_id, **kwargs): # noqa: E501, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_variables_id_prepare(variable_id, **kwargs) + self._delete_variables_id_prepare(variable_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/variables/{variableID}', 'DELETE', @@ -185,7 +185,7 @@ def delete_variables_id_labels_id_with_http_info(self, variable_id, label_id, ** returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_variables_id_labels_id_prepare(variable_id, label_id, **kwargs) + self._delete_variables_id_labels_id_prepare(variable_id, label_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/variables/{variableID}/labels/{labelID}', 'DELETE', @@ -218,7 +218,7 @@ async def delete_variables_id_labels_id_async(self, variable_id, label_id, **kwa returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_variables_id_labels_id_prepare(variable_id, label_id, **kwargs) + self._delete_variables_id_labels_id_prepare(variable_id, label_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/variables/{variableID}/labels/{labelID}', 'DELETE', @@ -310,7 +310,7 @@ def get_variables_with_http_info(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_variables_prepare(**kwargs) + self._get_variables_prepare(**kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/variables', 'GET', @@ -343,7 +343,7 @@ async def get_variables_async(self, **kwargs): # noqa: E501,D401,D403 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_variables_prepare(**kwargs) + self._get_variables_prepare(**kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/variables', 'GET', @@ -425,7 +425,7 @@ def get_variables_id_with_http_info(self, variable_id, **kwargs): # noqa: E501, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_variables_id_prepare(variable_id, **kwargs) + self._get_variables_id_prepare(variable_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/variables/{variableID}', 'GET', @@ -457,7 +457,7 @@ async def get_variables_id_async(self, variable_id, **kwargs): # noqa: E501,D40 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_variables_id_prepare(variable_id, **kwargs) + self._get_variables_id_prepare(variable_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/variables/{variableID}', 'GET', @@ -541,7 +541,7 @@ def get_variables_id_labels_with_http_info(self, variable_id, **kwargs): # noqa returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_variables_id_labels_prepare(variable_id, **kwargs) + self._get_variables_id_labels_prepare(variable_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/variables/{variableID}/labels', 'GET', @@ -573,7 +573,7 @@ async def get_variables_id_labels_async(self, variable_id, **kwargs): # noqa: E returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_variables_id_labels_prepare(variable_id, **kwargs) + self._get_variables_id_labels_prepare(variable_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/variables/{variableID}/labels', 'GET', @@ -659,7 +659,7 @@ def patch_variables_id_with_http_info(self, variable_id, variable, **kwargs): # returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_variables_id_prepare(variable_id, variable, **kwargs) + self._patch_variables_id_prepare(variable_id, variable, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/variables/{variableID}', 'PATCH', @@ -692,7 +692,7 @@ async def patch_variables_id_async(self, variable_id, variable, **kwargs): # no returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_variables_id_prepare(variable_id, variable, **kwargs) + self._patch_variables_id_prepare(variable_id, variable, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/variables/{variableID}', 'PATCH', @@ -786,7 +786,7 @@ def post_variables_with_http_info(self, variable, **kwargs): # noqa: E501,D401, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_variables_prepare(variable, **kwargs) + self._post_variables_prepare(variable, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/variables', 'POST', @@ -818,7 +818,7 @@ async def post_variables_async(self, variable, **kwargs): # noqa: E501,D401,D40 returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_variables_prepare(variable, **kwargs) + self._post_variables_prepare(variable, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/variables', 'POST', @@ -908,7 +908,7 @@ def post_variables_id_labels_with_http_info(self, variable_id, label_mapping, ** returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_variables_id_labels_prepare(variable_id, label_mapping, **kwargs) + self._post_variables_id_labels_prepare(variable_id, label_mapping, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/variables/{variableID}/labels', 'POST', @@ -941,7 +941,7 @@ async def post_variables_id_labels_async(self, variable_id, label_mapping, **kwa returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_variables_id_labels_prepare(variable_id, label_mapping, **kwargs) + self._post_variables_id_labels_prepare(variable_id, label_mapping, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/variables/{variableID}/labels', 'POST', @@ -1037,7 +1037,7 @@ def put_variables_id_with_http_info(self, variable_id, variable, **kwargs): # n returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._put_variables_id_prepare(variable_id, variable, **kwargs) + self._put_variables_id_prepare(variable_id, variable, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/variables/{variableID}', 'PUT', @@ -1070,7 +1070,7 @@ async def put_variables_id_async(self, variable_id, variable, **kwargs): # noqa returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._put_variables_id_prepare(variable_id, variable, **kwargs) + self._put_variables_id_prepare(variable_id, variable, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/variables/{variableID}', 'PUT', diff --git a/influxdb_client/service/views_service.py b/influxdb_client/service/views_service.py index db17788c..203f6c64 100644 --- a/influxdb_client/service/views_service.py +++ b/influxdb_client/service/views_service.py @@ -69,7 +69,7 @@ def get_dashboards_id_cells_id_view_with_http_info(self, dashboard_id, cell_id, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, **kwargs) + self._get_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'GET', @@ -102,7 +102,7 @@ async def get_dashboards_id_cells_id_view_async(self, dashboard_id, cell_id, **k returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, **kwargs) + self._get_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'GET', @@ -196,7 +196,7 @@ def patch_dashboards_id_cells_id_view_with_http_info(self, dashboard_id, cell_id returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, view, **kwargs) + self._patch_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, view, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'PATCH', @@ -230,7 +230,7 @@ async def patch_dashboards_id_cells_id_view_async(self, dashboard_id, cell_id, v returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, view, **kwargs) + self._patch_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, view, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'PATCH', diff --git a/influxdb_client/service/write_service.py b/influxdb_client/service/write_service.py index 8c7103bb..bcd970db 100644 --- a/influxdb_client/service/write_service.py +++ b/influxdb_client/service/write_service.py @@ -32,22 +32,22 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 def post_write(self, org, bucket, body, **kwargs): # noqa: E501,D401,D403 """Write data. - Writes data to a bucket. Use this endpoint to send data in [line protocol](https://docs.influxdata.com/influxdb/v2.2/reference/syntax/line-protocol/) format to InfluxDB. #### InfluxDB Cloud - Takes the following steps when you send a write request: 1. Validates the request and queues the write. 2. If the write is queued, responds with an HTTP `204` status code. 3. Handles the write asynchronously and reaches eventual consistency. An HTTP `2xx` status code acknowledges that the write or delete is queued. To ensure that InfluxDB Cloud handles writes and deletes in the order you request them, wait for a response before you send the next request. Because writes are asynchronous, data might not yet be written when you receive the response. #### InfluxDB OSS - Validates the request, handles the write synchronously, and then responds with success or failure. - If all points were written successfully, returns `204`, otherwise returns the first line that failed. #### Required permissions - `write-buckets` or `write-bucket BUCKET_ID`. `BUCKET_ID` is the ID of the destination bucket. #### Rate limits (with InfluxDB Cloud) `write` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Write data with the InfluxDB API](https://docs.influxdata.com/influxdb/v2.2/write-data/developer-tools/api). - [Optimize writes to InfluxDB](https://docs.influxdata.com/influxdb/v2.2/write-data/best-practices/optimize-writes/). - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/v2.2/write-data/troubleshoot/) + Writes data to a bucket. Use this endpoint to send data in [line protocol](https://docs.influxdata.com/influxdb/latest/reference/syntax/line-protocol/) format to InfluxDB. #### InfluxDB Cloud - Does the following when you send a write request: 1. Validates the request and queues the write. 2. If queued, responds with _success_ (HTTP `2xx` status code); _error_ otherwise. 3. Handles the delete asynchronously and reaches eventual consistency. To ensure that InfluxDB Cloud handles writes and deletes in the order you request them, wait for a success response (HTTP `2xx` status code) before you send the next request. Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response. #### InfluxDB OSS - Validates the request and handles the write synchronously. - If all points were written successfully, responds with HTTP `2xx` status code; otherwise, returns the first line that failed. #### Required permissions - `write-buckets` or `write-bucket BUCKET_ID`. *`BUCKET_ID`* is the ID of the destination bucket. #### Rate limits (with InfluxDB Cloud) `write` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Write data with the InfluxDB API](https://docs.influxdata.com/influxdb/latest/write-data/developer-tools/api) - [Optimize writes to InfluxDB](https://docs.influxdata.com/influxdb/latest/write-data/best-practices/optimize-writes/) - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/latest/write-data/troubleshoot/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_write(org, bucket, body, async_req=True) >>> result = thread.get() :param async_req bool - :param str org: The destination organization for writes. InfluxDB writes all points in the batch to this organization. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Writes to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - InfluxDB writes all points in the batch to this organization. (required) - :param str bucket: The destination bucket for writes. InfluxDB writes all points in the batch to this bucket. (required) - :param str body: Data in line protocol format. To send compressed data, do the following: 1. Use [GZIP](https://www.gzip.org/) to compress the line protocol data. 2. In your request, send the compressed data and the `Content-Encoding: gzip` header. #### Related guides - [Best practices for optimizing writes](https://docs.influxdata.com/influxdb/v2.2/write-data/best-practices/optimize-writes/). (required) + :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Writes data to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - If you pass both `orgID` and `org`, they must both be valid. - Writes data to the bucket in the specified organization. (required) + :param str bucket: A bucket name or ID. InfluxDB writes all points in the batch to the specified bucket. (required) + :param str body: In the request body, provide data in [line protocol format](https://docs.influxdata.com/influxdb/latest/reference/syntax/line-protocol/). To send compressed data, do the following: 1. Use [GZIP](https://www.gzip.org/) to compress the line protocol data. 2. In your request, send the compressed data and the `Content-Encoding: gzip` header. #### Related guides - [Best practices for optimizing writes](https://docs.influxdata.com/influxdb/latest/write-data/best-practices/optimize-writes/) (required) :param str zap_trace_span: OpenTracing span context :param str content_encoding: The compression applied to the line protocol in the request payload. To send a GZIP payload, pass `Content-Encoding: gzip` header. :param str content_type: The format of the data in the request body. To send a line protocol payload, pass `Content-Type: text/plain; charset=utf-8`. :param int content_length: The size of the entity-body, in bytes, sent to InfluxDB. If the length is greater than the `max body` configuration option, the server responds with status code `413`. - :param str accept: The content type that the client can understand. Writes only return a response body if they fail--for example, due to a formatting problem or quota limit. #### InfluxDB Cloud - Returns only `application/json` for format and limit errors. - Returns only `text/html` for some quota limit errors. #### InfluxDB OSS - Returns only `application/json` for format and limit errors. #### Related guides - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/v2.2/write-data/troubleshoot/). - :param str org_id: The ID of the destination organization for writes. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Writes to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - InfluxDB writes all points in the batch to this organization. + :param str accept: The content type that the client can understand. Writes only return a response body if they fail--for example, due to a formatting problem or quota limit. #### InfluxDB Cloud - Returns only `application/json` for format and limit errors. - Returns only `text/html` for some quota limit errors. #### InfluxDB OSS - Returns only `application/json` for format and limit errors. #### Related guides - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/latest/write-data/troubleshoot/) + :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Writes data to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - If you pass both `orgID` and `org`, they must both be valid. - Writes data to the bucket in the specified organization. :param WritePrecision precision: The precision for unix timestamps in the line protocol batch. :return: None If the method is called asynchronously, @@ -63,29 +63,29 @@ def post_write(self, org, bucket, body, **kwargs): # noqa: E501,D401,D403 def post_write_with_http_info(self, org, bucket, body, **kwargs): # noqa: E501,D401,D403 """Write data. - Writes data to a bucket. Use this endpoint to send data in [line protocol](https://docs.influxdata.com/influxdb/v2.2/reference/syntax/line-protocol/) format to InfluxDB. #### InfluxDB Cloud - Takes the following steps when you send a write request: 1. Validates the request and queues the write. 2. If the write is queued, responds with an HTTP `204` status code. 3. Handles the write asynchronously and reaches eventual consistency. An HTTP `2xx` status code acknowledges that the write or delete is queued. To ensure that InfluxDB Cloud handles writes and deletes in the order you request them, wait for a response before you send the next request. Because writes are asynchronous, data might not yet be written when you receive the response. #### InfluxDB OSS - Validates the request, handles the write synchronously, and then responds with success or failure. - If all points were written successfully, returns `204`, otherwise returns the first line that failed. #### Required permissions - `write-buckets` or `write-bucket BUCKET_ID`. `BUCKET_ID` is the ID of the destination bucket. #### Rate limits (with InfluxDB Cloud) `write` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Write data with the InfluxDB API](https://docs.influxdata.com/influxdb/v2.2/write-data/developer-tools/api). - [Optimize writes to InfluxDB](https://docs.influxdata.com/influxdb/v2.2/write-data/best-practices/optimize-writes/). - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/v2.2/write-data/troubleshoot/) + Writes data to a bucket. Use this endpoint to send data in [line protocol](https://docs.influxdata.com/influxdb/latest/reference/syntax/line-protocol/) format to InfluxDB. #### InfluxDB Cloud - Does the following when you send a write request: 1. Validates the request and queues the write. 2. If queued, responds with _success_ (HTTP `2xx` status code); _error_ otherwise. 3. Handles the delete asynchronously and reaches eventual consistency. To ensure that InfluxDB Cloud handles writes and deletes in the order you request them, wait for a success response (HTTP `2xx` status code) before you send the next request. Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response. #### InfluxDB OSS - Validates the request and handles the write synchronously. - If all points were written successfully, responds with HTTP `2xx` status code; otherwise, returns the first line that failed. #### Required permissions - `write-buckets` or `write-bucket BUCKET_ID`. *`BUCKET_ID`* is the ID of the destination bucket. #### Rate limits (with InfluxDB Cloud) `write` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Write data with the InfluxDB API](https://docs.influxdata.com/influxdb/latest/write-data/developer-tools/api) - [Optimize writes to InfluxDB](https://docs.influxdata.com/influxdb/latest/write-data/best-practices/optimize-writes/) - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/latest/write-data/troubleshoot/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_write_with_http_info(org, bucket, body, async_req=True) >>> result = thread.get() :param async_req bool - :param str org: The destination organization for writes. InfluxDB writes all points in the batch to this organization. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Writes to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - InfluxDB writes all points in the batch to this organization. (required) - :param str bucket: The destination bucket for writes. InfluxDB writes all points in the batch to this bucket. (required) - :param str body: Data in line protocol format. To send compressed data, do the following: 1. Use [GZIP](https://www.gzip.org/) to compress the line protocol data. 2. In your request, send the compressed data and the `Content-Encoding: gzip` header. #### Related guides - [Best practices for optimizing writes](https://docs.influxdata.com/influxdb/v2.2/write-data/best-practices/optimize-writes/). (required) + :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Writes data to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - If you pass both `orgID` and `org`, they must both be valid. - Writes data to the bucket in the specified organization. (required) + :param str bucket: A bucket name or ID. InfluxDB writes all points in the batch to the specified bucket. (required) + :param str body: In the request body, provide data in [line protocol format](https://docs.influxdata.com/influxdb/latest/reference/syntax/line-protocol/). To send compressed data, do the following: 1. Use [GZIP](https://www.gzip.org/) to compress the line protocol data. 2. In your request, send the compressed data and the `Content-Encoding: gzip` header. #### Related guides - [Best practices for optimizing writes](https://docs.influxdata.com/influxdb/latest/write-data/best-practices/optimize-writes/) (required) :param str zap_trace_span: OpenTracing span context :param str content_encoding: The compression applied to the line protocol in the request payload. To send a GZIP payload, pass `Content-Encoding: gzip` header. :param str content_type: The format of the data in the request body. To send a line protocol payload, pass `Content-Type: text/plain; charset=utf-8`. :param int content_length: The size of the entity-body, in bytes, sent to InfluxDB. If the length is greater than the `max body` configuration option, the server responds with status code `413`. - :param str accept: The content type that the client can understand. Writes only return a response body if they fail--for example, due to a formatting problem or quota limit. #### InfluxDB Cloud - Returns only `application/json` for format and limit errors. - Returns only `text/html` for some quota limit errors. #### InfluxDB OSS - Returns only `application/json` for format and limit errors. #### Related guides - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/v2.2/write-data/troubleshoot/). - :param str org_id: The ID of the destination organization for writes. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Writes to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - InfluxDB writes all points in the batch to this organization. + :param str accept: The content type that the client can understand. Writes only return a response body if they fail--for example, due to a formatting problem or quota limit. #### InfluxDB Cloud - Returns only `application/json` for format and limit errors. - Returns only `text/html` for some quota limit errors. #### InfluxDB OSS - Returns only `application/json` for format and limit errors. #### Related guides - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/latest/write-data/troubleshoot/) + :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Writes data to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - If you pass both `orgID` and `org`, they must both be valid. - Writes data to the bucket in the specified organization. :param WritePrecision precision: The precision for unix timestamps in the line protocol batch. :return: None If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_write_prepare(org, bucket, body, **kwargs) + self._post_write_prepare(org, bucket, body, **kwargs) # noqa: E501 return self.api_client.call_api( '/api/v2/write', 'POST', @@ -107,26 +107,26 @@ def post_write_with_http_info(self, org, bucket, body, **kwargs): # noqa: E501, async def post_write_async(self, org, bucket, body, **kwargs): # noqa: E501,D401,D403 """Write data. - Writes data to a bucket. Use this endpoint to send data in [line protocol](https://docs.influxdata.com/influxdb/v2.2/reference/syntax/line-protocol/) format to InfluxDB. #### InfluxDB Cloud - Takes the following steps when you send a write request: 1. Validates the request and queues the write. 2. If the write is queued, responds with an HTTP `204` status code. 3. Handles the write asynchronously and reaches eventual consistency. An HTTP `2xx` status code acknowledges that the write or delete is queued. To ensure that InfluxDB Cloud handles writes and deletes in the order you request them, wait for a response before you send the next request. Because writes are asynchronous, data might not yet be written when you receive the response. #### InfluxDB OSS - Validates the request, handles the write synchronously, and then responds with success or failure. - If all points were written successfully, returns `204`, otherwise returns the first line that failed. #### Required permissions - `write-buckets` or `write-bucket BUCKET_ID`. `BUCKET_ID` is the ID of the destination bucket. #### Rate limits (with InfluxDB Cloud) `write` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Write data with the InfluxDB API](https://docs.influxdata.com/influxdb/v2.2/write-data/developer-tools/api). - [Optimize writes to InfluxDB](https://docs.influxdata.com/influxdb/v2.2/write-data/best-practices/optimize-writes/). - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/v2.2/write-data/troubleshoot/) + Writes data to a bucket. Use this endpoint to send data in [line protocol](https://docs.influxdata.com/influxdb/latest/reference/syntax/line-protocol/) format to InfluxDB. #### InfluxDB Cloud - Does the following when you send a write request: 1. Validates the request and queues the write. 2. If queued, responds with _success_ (HTTP `2xx` status code); _error_ otherwise. 3. Handles the delete asynchronously and reaches eventual consistency. To ensure that InfluxDB Cloud handles writes and deletes in the order you request them, wait for a success response (HTTP `2xx` status code) before you send the next request. Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response. #### InfluxDB OSS - Validates the request and handles the write synchronously. - If all points were written successfully, responds with HTTP `2xx` status code; otherwise, returns the first line that failed. #### Required permissions - `write-buckets` or `write-bucket BUCKET_ID`. *`BUCKET_ID`* is the ID of the destination bucket. #### Rate limits (with InfluxDB Cloud) `write` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Write data with the InfluxDB API](https://docs.influxdata.com/influxdb/latest/write-data/developer-tools/api) - [Optimize writes to InfluxDB](https://docs.influxdata.com/influxdb/latest/write-data/best-practices/optimize-writes/) - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/latest/write-data/troubleshoot/) This method makes an asynchronous HTTP request. :param async_req bool - :param str org: The destination organization for writes. InfluxDB writes all points in the batch to this organization. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Writes to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - InfluxDB writes all points in the batch to this organization. (required) - :param str bucket: The destination bucket for writes. InfluxDB writes all points in the batch to this bucket. (required) - :param str body: Data in line protocol format. To send compressed data, do the following: 1. Use [GZIP](https://www.gzip.org/) to compress the line protocol data. 2. In your request, send the compressed data and the `Content-Encoding: gzip` header. #### Related guides - [Best practices for optimizing writes](https://docs.influxdata.com/influxdb/v2.2/write-data/best-practices/optimize-writes/). (required) + :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Writes data to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - If you pass both `orgID` and `org`, they must both be valid. - Writes data to the bucket in the specified organization. (required) + :param str bucket: A bucket name or ID. InfluxDB writes all points in the batch to the specified bucket. (required) + :param str body: In the request body, provide data in [line protocol format](https://docs.influxdata.com/influxdb/latest/reference/syntax/line-protocol/). To send compressed data, do the following: 1. Use [GZIP](https://www.gzip.org/) to compress the line protocol data. 2. In your request, send the compressed data and the `Content-Encoding: gzip` header. #### Related guides - [Best practices for optimizing writes](https://docs.influxdata.com/influxdb/latest/write-data/best-practices/optimize-writes/) (required) :param str zap_trace_span: OpenTracing span context :param str content_encoding: The compression applied to the line protocol in the request payload. To send a GZIP payload, pass `Content-Encoding: gzip` header. :param str content_type: The format of the data in the request body. To send a line protocol payload, pass `Content-Type: text/plain; charset=utf-8`. :param int content_length: The size of the entity-body, in bytes, sent to InfluxDB. If the length is greater than the `max body` configuration option, the server responds with status code `413`. - :param str accept: The content type that the client can understand. Writes only return a response body if they fail--for example, due to a formatting problem or quota limit. #### InfluxDB Cloud - Returns only `application/json` for format and limit errors. - Returns only `text/html` for some quota limit errors. #### InfluxDB OSS - Returns only `application/json` for format and limit errors. #### Related guides - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/v2.2/write-data/troubleshoot/). - :param str org_id: The ID of the destination organization for writes. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Writes to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - InfluxDB writes all points in the batch to this organization. + :param str accept: The content type that the client can understand. Writes only return a response body if they fail--for example, due to a formatting problem or quota limit. #### InfluxDB Cloud - Returns only `application/json` for format and limit errors. - Returns only `text/html` for some quota limit errors. #### InfluxDB OSS - Returns only `application/json` for format and limit errors. #### Related guides - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/latest/write-data/troubleshoot/) + :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Writes data to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - If you pass both `orgID` and `org`, they must both be valid. - Writes data to the bucket in the specified organization. :param WritePrecision precision: The precision for unix timestamps in the line protocol batch. :return: None If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params, path_params, query_params, header_params, body_params = \ - self._post_write_prepare(org, bucket, body, **kwargs) + self._post_write_prepare(org, bucket, body, **kwargs) # noqa: E501 return await self.api_client.call_api( '/api/v2/write', 'POST',