@@ -29,11 +29,6 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403
29
29
"""InvokableScriptsService - a operation defined in OpenAPI."""
30
30
super ().__init__ (api_client )
31
31
32
- from influxdb_client .client .warnings import CloudOnlyWarning
33
- CloudOnlyWarning .print_warning ('InvokableScriptsService' ,
34
- 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/' ,
35
- api_client ) # noqa: E501
36
-
37
32
def delete_scripts_id (self , script_id , ** kwargs ): # noqa: E501,D401,D403
38
33
"""Delete a script.
39
34
@@ -103,6 +98,10 @@ async def delete_scripts_id_async(self, script_id, **kwargs): # noqa: E501,D401
103
98
If the method is called asynchronously,
104
99
returns the request thread.
105
100
""" # noqa: E501
101
+ if not await self ._is_cloud_instance_async ():
102
+ from influxdb_client .client .warnings import CloudOnlyWarning
103
+ CloudOnlyWarning .print_warning ('InvokableScriptsService' ,
104
+ 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/' ) # noqa: E501
106
105
local_var_params , path_params , query_params , header_params , body_params = \
107
106
self ._delete_scripts_id_prepare (script_id , ** kwargs )
108
107
@@ -181,6 +180,10 @@ def get_scripts_with_http_info(self, **kwargs): # noqa: E501,D401,D403
181
180
If the method is called asynchronously,
182
181
returns the request thread.
183
182
""" # noqa: E501
183
+ if not self ._is_cloud_instance ():
184
+ from influxdb_client .client .warnings import CloudOnlyWarning
185
+ CloudOnlyWarning .print_warning ('InvokableScriptsService' ,
186
+ 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/' ) # noqa: E501
184
187
local_var_params , path_params , query_params , header_params , body_params = \
185
188
self ._get_scripts_prepare (** kwargs )
186
189
@@ -213,6 +216,10 @@ async def get_scripts_async(self, **kwargs): # noqa: E501,D401,D403
213
216
If the method is called asynchronously,
214
217
returns the request thread.
215
218
""" # noqa: E501
219
+ if not await self ._is_cloud_instance_async ():
220
+ from influxdb_client .client .warnings import CloudOnlyWarning
221
+ CloudOnlyWarning .print_warning ('InvokableScriptsService' ,
222
+ 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/' ) # noqa: E501
216
223
local_var_params , path_params , query_params , header_params , body_params = \
217
224
self ._get_scripts_prepare (** kwargs )
218
225
@@ -293,6 +300,10 @@ def get_scripts_id_with_http_info(self, script_id, **kwargs): # noqa: E501,D401
293
300
If the method is called asynchronously,
294
301
returns the request thread.
295
302
""" # noqa: E501
303
+ if not self ._is_cloud_instance ():
304
+ from influxdb_client .client .warnings import CloudOnlyWarning
305
+ CloudOnlyWarning .print_warning ('InvokableScriptsService' ,
306
+ 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/' ) # noqa: E501
296
307
local_var_params , path_params , query_params , header_params , body_params = \
297
308
self ._get_scripts_id_prepare (script_id , ** kwargs )
298
309
@@ -325,6 +336,10 @@ async def get_scripts_id_async(self, script_id, **kwargs): # noqa: E501,D401,D4
325
336
If the method is called asynchronously,
326
337
returns the request thread.
327
338
""" # noqa: E501
339
+ if not await self ._is_cloud_instance_async ():
340
+ from influxdb_client .client .warnings import CloudOnlyWarning
341
+ CloudOnlyWarning .print_warning ('InvokableScriptsService' ,
342
+ 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/' ) # noqa: E501
328
343
local_var_params , path_params , query_params , header_params , body_params = \
329
344
self ._get_scripts_id_prepare (script_id , ** kwargs )
330
345
@@ -409,6 +424,10 @@ def patch_scripts_id_with_http_info(self, script_id, script_update_request, **kw
409
424
If the method is called asynchronously,
410
425
returns the request thread.
411
426
""" # noqa: E501
427
+ if not self ._is_cloud_instance ():
428
+ from influxdb_client .client .warnings import CloudOnlyWarning
429
+ CloudOnlyWarning .print_warning ('InvokableScriptsService' ,
430
+ 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/' ) # noqa: E501
412
431
local_var_params , path_params , query_params , header_params , body_params = \
413
432
self ._patch_scripts_id_prepare (script_id , script_update_request , ** kwargs )
414
433
@@ -442,6 +461,10 @@ async def patch_scripts_id_async(self, script_id, script_update_request, **kwarg
442
461
If the method is called asynchronously,
443
462
returns the request thread.
444
463
""" # noqa: E501
464
+ if not await self ._is_cloud_instance_async ():
465
+ from influxdb_client .client .warnings import CloudOnlyWarning
466
+ CloudOnlyWarning .print_warning ('InvokableScriptsService' ,
467
+ 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/' ) # noqa: E501
445
468
local_var_params , path_params , query_params , header_params , body_params = \
446
469
self ._patch_scripts_id_prepare (script_id , script_update_request , ** kwargs )
447
470
@@ -532,6 +555,10 @@ def post_scripts_with_http_info(self, script_create_request, **kwargs): # noqa:
532
555
If the method is called asynchronously,
533
556
returns the request thread.
534
557
""" # noqa: E501
558
+ if not self ._is_cloud_instance ():
559
+ from influxdb_client .client .warnings import CloudOnlyWarning
560
+ CloudOnlyWarning .print_warning ('InvokableScriptsService' ,
561
+ 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/' ) # noqa: E501
535
562
local_var_params , path_params , query_params , header_params , body_params = \
536
563
self ._post_scripts_prepare (script_create_request , ** kwargs )
537
564
@@ -563,6 +590,10 @@ async def post_scripts_async(self, script_create_request, **kwargs): # noqa: E5
563
590
If the method is called asynchronously,
564
591
returns the request thread.
565
592
""" # noqa: E501
593
+ if not await self ._is_cloud_instance_async ():
594
+ from influxdb_client .client .warnings import CloudOnlyWarning
595
+ CloudOnlyWarning .print_warning ('InvokableScriptsService' ,
596
+ 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/' ) # noqa: E501
566
597
local_var_params , path_params , query_params , header_params , body_params = \
567
598
self ._post_scripts_prepare (script_create_request , ** kwargs )
568
599
@@ -651,6 +682,10 @@ def post_scripts_id_invoke_with_http_info(self, script_id, **kwargs): # noqa: E
651
682
If the method is called asynchronously,
652
683
returns the request thread.
653
684
""" # noqa: E501
685
+ if not self ._is_cloud_instance ():
686
+ from influxdb_client .client .warnings import CloudOnlyWarning
687
+ CloudOnlyWarning .print_warning ('InvokableScriptsService' ,
688
+ 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/' ) # noqa: E501
654
689
local_var_params , path_params , query_params , header_params , body_params = \
655
690
self ._post_scripts_id_invoke_prepare (script_id , ** kwargs )
656
691
@@ -684,6 +719,10 @@ async def post_scripts_id_invoke_async(self, script_id, **kwargs): # noqa: E501
684
719
If the method is called asynchronously,
685
720
returns the request thread.
686
721
""" # noqa: E501
722
+ if not await self ._is_cloud_instance_async ():
723
+ from influxdb_client .client .warnings import CloudOnlyWarning
724
+ CloudOnlyWarning .print_warning ('InvokableScriptsService' ,
725
+ 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/' ) # noqa: E501
687
726
local_var_params , path_params , query_params , header_params , body_params = \
688
727
self ._post_scripts_id_invoke_prepare (script_id , ** kwargs )
689
728
0 commit comments