anyscale 0.26.50__py3-none-any.whl → 0.26.52__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. anyscale/_private/anyscale_client/README.md +1 -1
  2. anyscale/_private/anyscale_client/anyscale_client.py +178 -46
  3. anyscale/_private/anyscale_client/common.py +61 -2
  4. anyscale/_private/anyscale_client/fake_anyscale_client.py +145 -8
  5. anyscale/_private/docgen/__main__.py +34 -23
  6. anyscale/_private/docgen/generator.py +15 -18
  7. anyscale/_private/docgen/models.md +4 -2
  8. anyscale/_private/workload/workload_sdk.py +103 -8
  9. anyscale/client/README.md +5 -0
  10. anyscale/client/openapi_client/__init__.py +1 -0
  11. anyscale/client/openapi_client/api/default_api.py +538 -0
  12. anyscale/client/openapi_client/models/__init__.py +1 -0
  13. anyscale/client/openapi_client/models/baseimagesenum.py +83 -1
  14. anyscale/client/openapi_client/models/cloud_resource.py +59 -3
  15. anyscale/client/openapi_client/models/cloud_resource_gcp.py +59 -3
  16. anyscale/client/openapi_client/models/clouddeployment_response.py +121 -0
  17. anyscale/client/openapi_client/models/create_cloud_resource.py +59 -3
  18. anyscale/client/openapi_client/models/create_cloud_resource_gcp.py +59 -3
  19. anyscale/client/openapi_client/models/object_storage.py +2 -2
  20. anyscale/client/openapi_client/models/ray_runtime_env_config.py +57 -1
  21. anyscale/client/openapi_client/models/supportedbaseimagesenum.py +80 -1
  22. anyscale/cloud/models.py +1 -1
  23. anyscale/commands/cloud_commands.py +73 -70
  24. anyscale/commands/command_examples.py +28 -40
  25. anyscale/commands/project_commands.py +377 -106
  26. anyscale/commands/workspace_commands_v2.py +62 -29
  27. anyscale/controllers/cloud_controller.py +91 -91
  28. anyscale/job/_private/job_sdk.py +38 -20
  29. anyscale/project/__init__.py +101 -1
  30. anyscale/project/_private/project_sdk.py +90 -2
  31. anyscale/project/commands.py +188 -1
  32. anyscale/project/models.py +198 -2
  33. anyscale/sdk/anyscale_client/models/baseimagesenum.py +83 -1
  34. anyscale/sdk/anyscale_client/models/ray_runtime_env_config.py +57 -1
  35. anyscale/sdk/anyscale_client/models/supportedbaseimagesenum.py +80 -1
  36. anyscale/service/_private/service_sdk.py +2 -1
  37. anyscale/shared_anyscale_utils/latest_ray_version.py +1 -1
  38. anyscale/util.py +3 -0
  39. anyscale/utils/cloud_utils.py +20 -0
  40. anyscale/utils/runtime_env.py +3 -1
  41. anyscale/version.py +1 -1
  42. {anyscale-0.26.50.dist-info → anyscale-0.26.52.dist-info}/METADATA +1 -1
  43. {anyscale-0.26.50.dist-info → anyscale-0.26.52.dist-info}/RECORD +48 -47
  44. {anyscale-0.26.50.dist-info → anyscale-0.26.52.dist-info}/WHEEL +0 -0
  45. {anyscale-0.26.50.dist-info → anyscale-0.26.52.dist-info}/entry_points.txt +0 -0
  46. {anyscale-0.26.50.dist-info → anyscale-0.26.52.dist-info}/licenses/LICENSE +0 -0
  47. {anyscale-0.26.50.dist-info → anyscale-0.26.52.dist-info}/licenses/NOTICE +0 -0
  48. {anyscale-0.26.50.dist-info → anyscale-0.26.52.dist-info}/top_level.txt +0 -0
@@ -15899,6 +15899,120 @@ class DefaultApi(object):
15899
15899
  _request_timeout=local_var_params.get('_request_timeout'),
15900
15900
  collection_formats=collection_formats)
15901
15901
 
15902
+ def get_latest_cloud_deployment_api_v2_sessions_cluster_id_latest_cloud_deployment_get(self, cluster_id, **kwargs): # noqa: E501
15903
+ """Get Latest Cloud Deployment # noqa: E501
15904
+
15905
+ Fetches the current cloud deployment of a cluster. # noqa: E501
15906
+ This method makes a synchronous HTTP request by default. To make an
15907
+ asynchronous HTTP request, please pass async_req=True
15908
+ >>> thread = api.get_latest_cloud_deployment_api_v2_sessions_cluster_id_latest_cloud_deployment_get(cluster_id, async_req=True)
15909
+ >>> result = thread.get()
15910
+
15911
+ :param async_req bool: execute request asynchronously
15912
+ :param str cluster_id: (required)
15913
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
15914
+ be returned without reading/decoding response
15915
+ data. Default is True.
15916
+ :param _request_timeout: timeout setting for this request. If one
15917
+ number provided, it will be total request
15918
+ timeout. It can also be a pair (tuple) of
15919
+ (connection, read) timeouts.
15920
+ :return: ClouddeploymentResponse
15921
+ If the method is called asynchronously,
15922
+ returns the request thread.
15923
+ """
15924
+ kwargs['_return_http_data_only'] = True
15925
+ return self.get_latest_cloud_deployment_api_v2_sessions_cluster_id_latest_cloud_deployment_get_with_http_info(cluster_id, **kwargs) # noqa: E501
15926
+
15927
+ def get_latest_cloud_deployment_api_v2_sessions_cluster_id_latest_cloud_deployment_get_with_http_info(self, cluster_id, **kwargs): # noqa: E501
15928
+ """Get Latest Cloud Deployment # noqa: E501
15929
+
15930
+ Fetches the current cloud deployment of a cluster. # noqa: E501
15931
+ This method makes a synchronous HTTP request by default. To make an
15932
+ asynchronous HTTP request, please pass async_req=True
15933
+ >>> thread = api.get_latest_cloud_deployment_api_v2_sessions_cluster_id_latest_cloud_deployment_get_with_http_info(cluster_id, async_req=True)
15934
+ >>> result = thread.get()
15935
+
15936
+ :param async_req bool: execute request asynchronously
15937
+ :param str cluster_id: (required)
15938
+ :param _return_http_data_only: response data without head status code
15939
+ and headers
15940
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
15941
+ be returned without reading/decoding response
15942
+ data. Default is True.
15943
+ :param _request_timeout: timeout setting for this request. If one
15944
+ number provided, it will be total request
15945
+ timeout. It can also be a pair (tuple) of
15946
+ (connection, read) timeouts.
15947
+ :return: tuple(ClouddeploymentResponse, status_code(int), headers(HTTPHeaderDict))
15948
+ If the method is called asynchronously,
15949
+ returns the request thread.
15950
+ """
15951
+
15952
+ local_var_params = locals()
15953
+
15954
+ all_params = [
15955
+ 'cluster_id'
15956
+ ]
15957
+ all_params.extend(
15958
+ [
15959
+ 'async_req',
15960
+ '_return_http_data_only',
15961
+ '_preload_content',
15962
+ '_request_timeout'
15963
+ ]
15964
+ )
15965
+
15966
+ for key, val in six.iteritems(local_var_params['kwargs']):
15967
+ if key not in all_params:
15968
+ raise ApiTypeError(
15969
+ "Got an unexpected keyword argument '%s'"
15970
+ " to method get_latest_cloud_deployment_api_v2_sessions_cluster_id_latest_cloud_deployment_get" % key
15971
+ )
15972
+ local_var_params[key] = val
15973
+ del local_var_params['kwargs']
15974
+ # verify the required parameter 'cluster_id' is set
15975
+ if self.api_client.client_side_validation and ('cluster_id' not in local_var_params or # noqa: E501
15976
+ local_var_params['cluster_id'] is None): # noqa: E501
15977
+ raise ApiValueError("Missing the required parameter `cluster_id` when calling `get_latest_cloud_deployment_api_v2_sessions_cluster_id_latest_cloud_deployment_get`") # noqa: E501
15978
+
15979
+ collection_formats = {}
15980
+
15981
+ path_params = {}
15982
+ if 'cluster_id' in local_var_params:
15983
+ path_params['cluster_id'] = local_var_params['cluster_id'] # noqa: E501
15984
+
15985
+ query_params = []
15986
+
15987
+ header_params = {}
15988
+
15989
+ form_params = []
15990
+ local_var_files = {}
15991
+
15992
+ body_params = None
15993
+ # HTTP header `Accept`
15994
+ header_params['Accept'] = self.api_client.select_header_accept(
15995
+ ['application/json']) # noqa: E501
15996
+
15997
+ # Authentication setting
15998
+ auth_settings = [] # noqa: E501
15999
+
16000
+ return self.api_client.call_api(
16001
+ '/api/v2/sessions/{cluster_id}/latest_cloud_deployment', 'GET',
16002
+ path_params,
16003
+ query_params,
16004
+ header_params,
16005
+ body=body_params,
16006
+ post_params=form_params,
16007
+ files=local_var_files,
16008
+ response_type='ClouddeploymentResponse', # noqa: E501
16009
+ auth_settings=auth_settings,
16010
+ async_req=local_var_params.get('async_req'),
16011
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
16012
+ _preload_content=local_var_params.get('_preload_content', True),
16013
+ _request_timeout=local_var_params.get('_request_timeout'),
16014
+ collection_formats=collection_formats)
16015
+
15902
16016
  def get_lb_resource_api_v2_clouds_with_cloud_resource_gcp_router_cloud_id_get_lb_resource_post(self, cloud_id, **kwargs): # noqa: E501
15903
16017
  """Get Lb Resource # noqa: E501
15904
16018
 
@@ -16013,6 +16127,120 @@ class DefaultApi(object):
16013
16127
  _request_timeout=local_var_params.get('_request_timeout'),
16014
16128
  collection_formats=collection_formats)
16015
16129
 
16130
+ def get_lb_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_get_lb_resource_post(self, cloud_id, **kwargs): # noqa: E501
16131
+ """Get Lb Resource # noqa: E501
16132
+
16133
+ Get lb resources for the cloud. # noqa: E501
16134
+ This method makes a synchronous HTTP request by default. To make an
16135
+ asynchronous HTTP request, please pass async_req=True
16136
+ >>> thread = api.get_lb_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_get_lb_resource_post(cloud_id, async_req=True)
16137
+ >>> result = thread.get()
16138
+
16139
+ :param async_req bool: execute request asynchronously
16140
+ :param str cloud_id: (required)
16141
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
16142
+ be returned without reading/decoding response
16143
+ data. Default is True.
16144
+ :param _request_timeout: timeout setting for this request. If one
16145
+ number provided, it will be total request
16146
+ timeout. It can also be a pair (tuple) of
16147
+ (connection, read) timeouts.
16148
+ :return: LbresourceResponse
16149
+ If the method is called asynchronously,
16150
+ returns the request thread.
16151
+ """
16152
+ kwargs['_return_http_data_only'] = True
16153
+ return self.get_lb_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_get_lb_resource_post_with_http_info(cloud_id, **kwargs) # noqa: E501
16154
+
16155
+ def get_lb_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_get_lb_resource_post_with_http_info(self, cloud_id, **kwargs): # noqa: E501
16156
+ """Get Lb Resource # noqa: E501
16157
+
16158
+ Get lb resources for the cloud. # noqa: E501
16159
+ This method makes a synchronous HTTP request by default. To make an
16160
+ asynchronous HTTP request, please pass async_req=True
16161
+ >>> thread = api.get_lb_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_get_lb_resource_post_with_http_info(cloud_id, async_req=True)
16162
+ >>> result = thread.get()
16163
+
16164
+ :param async_req bool: execute request asynchronously
16165
+ :param str cloud_id: (required)
16166
+ :param _return_http_data_only: response data without head status code
16167
+ and headers
16168
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
16169
+ be returned without reading/decoding response
16170
+ data. Default is True.
16171
+ :param _request_timeout: timeout setting for this request. If one
16172
+ number provided, it will be total request
16173
+ timeout. It can also be a pair (tuple) of
16174
+ (connection, read) timeouts.
16175
+ :return: tuple(LbresourceResponse, status_code(int), headers(HTTPHeaderDict))
16176
+ If the method is called asynchronously,
16177
+ returns the request thread.
16178
+ """
16179
+
16180
+ local_var_params = locals()
16181
+
16182
+ all_params = [
16183
+ 'cloud_id'
16184
+ ]
16185
+ all_params.extend(
16186
+ [
16187
+ 'async_req',
16188
+ '_return_http_data_only',
16189
+ '_preload_content',
16190
+ '_request_timeout'
16191
+ ]
16192
+ )
16193
+
16194
+ for key, val in six.iteritems(local_var_params['kwargs']):
16195
+ if key not in all_params:
16196
+ raise ApiTypeError(
16197
+ "Got an unexpected keyword argument '%s'"
16198
+ " to method get_lb_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_get_lb_resource_post" % key
16199
+ )
16200
+ local_var_params[key] = val
16201
+ del local_var_params['kwargs']
16202
+ # verify the required parameter 'cloud_id' is set
16203
+ if self.api_client.client_side_validation and ('cloud_id' not in local_var_params or # noqa: E501
16204
+ local_var_params['cloud_id'] is None): # noqa: E501
16205
+ raise ApiValueError("Missing the required parameter `cloud_id` when calling `get_lb_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_get_lb_resource_post`") # noqa: E501
16206
+
16207
+ collection_formats = {}
16208
+
16209
+ path_params = {}
16210
+ if 'cloud_id' in local_var_params:
16211
+ path_params['cloud_id'] = local_var_params['cloud_id'] # noqa: E501
16212
+
16213
+ query_params = []
16214
+
16215
+ header_params = {}
16216
+
16217
+ form_params = []
16218
+ local_var_files = {}
16219
+
16220
+ body_params = None
16221
+ # HTTP header `Accept`
16222
+ header_params['Accept'] = self.api_client.select_header_accept(
16223
+ ['application/json']) # noqa: E501
16224
+
16225
+ # Authentication setting
16226
+ auth_settings = [] # noqa: E501
16227
+
16228
+ return self.api_client.call_api(
16229
+ '/api/v2/clouds_with_cloud_resource_router/{cloud_id}/get_lb_resource', 'POST',
16230
+ path_params,
16231
+ query_params,
16232
+ header_params,
16233
+ body=body_params,
16234
+ post_params=form_params,
16235
+ files=local_var_files,
16236
+ response_type='LbresourceResponse', # noqa: E501
16237
+ auth_settings=auth_settings,
16238
+ async_req=local_var_params.get('async_req'),
16239
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
16240
+ _preload_content=local_var_params.get('_preload_content', True),
16241
+ _request_timeout=local_var_params.get('_request_timeout'),
16242
+ collection_formats=collection_formats)
16243
+
16016
16244
  def get_log_files_api_v2_logs_get_log_files_post(self, **kwargs): # noqa: E501
16017
16245
  """Get Log Files # noqa: E501
16018
16246
 
@@ -16232,6 +16460,141 @@ class DefaultApi(object):
16232
16460
  _request_timeout=local_var_params.get('_request_timeout'),
16233
16461
  collection_formats=collection_formats)
16234
16462
 
16463
+ def get_metric_names_api_v2_metrics_names_get(self, **kwargs): # noqa: E501
16464
+ """Get Metric Names # noqa: E501
16465
+
16466
+ Return all available metric names for the specified resource # noqa: E501
16467
+ This method makes a synchronous HTTP request by default. To make an
16468
+ asynchronous HTTP request, please pass async_req=True
16469
+ >>> thread = api.get_metric_names_api_v2_metrics_names_get(async_req=True)
16470
+ >>> result = thread.get()
16471
+
16472
+ :param async_req bool: execute request asynchronously
16473
+ :param str cluster_id: The cluster id used to query metrics. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
16474
+ :param str workspace_id: The workspace id used to query metrics. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
16475
+ :param str ha_job_id: The production job id used to query metrics. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
16476
+ :param str service_id: The service id used to query metrics. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
16477
+ :param float start: Optional start timestamp (Unix). If provided, filters metric names to those present in [start, end].
16478
+ :param float end: Optional end timestamp (Unix). If provided with start, filters metric names present in [start, end].
16479
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
16480
+ be returned without reading/decoding response
16481
+ data. Default is True.
16482
+ :param _request_timeout: timeout setting for this request. If one
16483
+ number provided, it will be total request
16484
+ timeout. It can also be a pair (tuple) of
16485
+ (connection, read) timeouts.
16486
+ :return: MetricsqueryresponseResponse
16487
+ If the method is called asynchronously,
16488
+ returns the request thread.
16489
+ """
16490
+ kwargs['_return_http_data_only'] = True
16491
+ return self.get_metric_names_api_v2_metrics_names_get_with_http_info(**kwargs) # noqa: E501
16492
+
16493
+ def get_metric_names_api_v2_metrics_names_get_with_http_info(self, **kwargs): # noqa: E501
16494
+ """Get Metric Names # noqa: E501
16495
+
16496
+ Return all available metric names for the specified resource # noqa: E501
16497
+ This method makes a synchronous HTTP request by default. To make an
16498
+ asynchronous HTTP request, please pass async_req=True
16499
+ >>> thread = api.get_metric_names_api_v2_metrics_names_get_with_http_info(async_req=True)
16500
+ >>> result = thread.get()
16501
+
16502
+ :param async_req bool: execute request asynchronously
16503
+ :param str cluster_id: The cluster id used to query metrics. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
16504
+ :param str workspace_id: The workspace id used to query metrics. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
16505
+ :param str ha_job_id: The production job id used to query metrics. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
16506
+ :param str service_id: The service id used to query metrics. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
16507
+ :param float start: Optional start timestamp (Unix). If provided, filters metric names to those present in [start, end].
16508
+ :param float end: Optional end timestamp (Unix). If provided with start, filters metric names present in [start, end].
16509
+ :param _return_http_data_only: response data without head status code
16510
+ and headers
16511
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
16512
+ be returned without reading/decoding response
16513
+ data. Default is True.
16514
+ :param _request_timeout: timeout setting for this request. If one
16515
+ number provided, it will be total request
16516
+ timeout. It can also be a pair (tuple) of
16517
+ (connection, read) timeouts.
16518
+ :return: tuple(MetricsqueryresponseResponse, status_code(int), headers(HTTPHeaderDict))
16519
+ If the method is called asynchronously,
16520
+ returns the request thread.
16521
+ """
16522
+
16523
+ local_var_params = locals()
16524
+
16525
+ all_params = [
16526
+ 'cluster_id',
16527
+ 'workspace_id',
16528
+ 'ha_job_id',
16529
+ 'service_id',
16530
+ 'start',
16531
+ 'end'
16532
+ ]
16533
+ all_params.extend(
16534
+ [
16535
+ 'async_req',
16536
+ '_return_http_data_only',
16537
+ '_preload_content',
16538
+ '_request_timeout'
16539
+ ]
16540
+ )
16541
+
16542
+ for key, val in six.iteritems(local_var_params['kwargs']):
16543
+ if key not in all_params:
16544
+ raise ApiTypeError(
16545
+ "Got an unexpected keyword argument '%s'"
16546
+ " to method get_metric_names_api_v2_metrics_names_get" % key
16547
+ )
16548
+ local_var_params[key] = val
16549
+ del local_var_params['kwargs']
16550
+
16551
+ collection_formats = {}
16552
+
16553
+ path_params = {}
16554
+
16555
+ query_params = []
16556
+ if 'cluster_id' in local_var_params and local_var_params['cluster_id'] is not None: # noqa: E501
16557
+ query_params.append(('cluster_id', local_var_params['cluster_id'])) # noqa: E501
16558
+ if 'workspace_id' in local_var_params and local_var_params['workspace_id'] is not None: # noqa: E501
16559
+ query_params.append(('workspace_id', local_var_params['workspace_id'])) # noqa: E501
16560
+ if 'ha_job_id' in local_var_params and local_var_params['ha_job_id'] is not None: # noqa: E501
16561
+ query_params.append(('ha_job_id', local_var_params['ha_job_id'])) # noqa: E501
16562
+ if 'service_id' in local_var_params and local_var_params['service_id'] is not None: # noqa: E501
16563
+ query_params.append(('service_id', local_var_params['service_id'])) # noqa: E501
16564
+ if 'start' in local_var_params and local_var_params['start'] is not None: # noqa: E501
16565
+ query_params.append(('start', local_var_params['start'])) # noqa: E501
16566
+ if 'end' in local_var_params and local_var_params['end'] is not None: # noqa: E501
16567
+ query_params.append(('end', local_var_params['end'])) # noqa: E501
16568
+
16569
+ header_params = {}
16570
+
16571
+ form_params = []
16572
+ local_var_files = {}
16573
+
16574
+ body_params = None
16575
+ # HTTP header `Accept`
16576
+ header_params['Accept'] = self.api_client.select_header_accept(
16577
+ ['application/json']) # noqa: E501
16578
+
16579
+ # Authentication setting
16580
+ auth_settings = [] # noqa: E501
16581
+
16582
+ return self.api_client.call_api(
16583
+ '/api/v2/metrics/names', 'GET',
16584
+ path_params,
16585
+ query_params,
16586
+ header_params,
16587
+ body=body_params,
16588
+ post_params=form_params,
16589
+ files=local_var_files,
16590
+ response_type='MetricsqueryresponseResponse', # noqa: E501
16591
+ auth_settings=auth_settings,
16592
+ async_req=local_var_params.get('async_req'),
16593
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
16594
+ _preload_content=local_var_params.get('_preload_content', True),
16595
+ _request_timeout=local_var_params.get('_request_timeout'),
16596
+ collection_formats=collection_formats)
16597
+
16235
16598
  def get_metronome_customer_info_api_v2_metronome_customer_info_organization_id_get(self, organization_id, **kwargs): # noqa: E501
16236
16599
  """Get Metronome Customer Info # noqa: E501
16237
16600
 
@@ -28219,6 +28582,181 @@ class DefaultApi(object):
28219
28582
  _request_timeout=local_var_params.get('_request_timeout'),
28220
28583
  collection_formats=collection_formats)
28221
28584
 
28585
+ def query_api_v2_logs_query_get(self, logql_query, start, end, source_type, **kwargs): # noqa: E501
28586
+ """Query # noqa: E501
28587
+
28588
+ Fetching logs using LogQL queries. # noqa: E501
28589
+ This method makes a synchronous HTTP request by default. To make an
28590
+ asynchronous HTTP request, please pass async_req=True
28591
+ >>> thread = api.query_api_v2_logs_query_get(logql_query, start, end, source_type, async_req=True)
28592
+ >>> result = thread.get()
28593
+
28594
+ :param async_req bool: execute request asynchronously
28595
+ :param str logql_query: LogQL query string to execute against the logs. This should be a valid Loki LogQL expression. (required)
28596
+ :param float start: The start time for the query as a nanosecond Unix epoch. (required)
28597
+ :param float end: The end time for the query as a nanosecond Unix epoch. (required)
28598
+ :param str source_type: The type of logs to query. Must be one of \"application\" or \"system\". (required)
28599
+ :param str cluster_id: The cluster id used to fetch logs. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
28600
+ :param str workspace_id: The workspace id used to fetch logs. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
28601
+ :param str ha_job_id: The production job id used to fetch logs. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
28602
+ :param str service_id: The service id used to fetch logs. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
28603
+ :param int page_size: Number of chunks to fetch. Defaults to 400. Max of 1000.
28604
+ :param bool reverse_sort: Whether the result should be sorted by descending timestamp. Also determines the query direction. When false, it will start to query from the start and return results until it reaches the page_size or the end. When true, it will start to query from the end and return results until it reaches the page_size or the start. Default to false.
28605
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
28606
+ be returned without reading/decoding response
28607
+ data. Default is True.
28608
+ :param _request_timeout: timeout setting for this request. If one
28609
+ number provided, it will be total request
28610
+ timeout. It can also be a pair (tuple) of
28611
+ (connection, read) timeouts.
28612
+ :return: LogitembatchResponse
28613
+ If the method is called asynchronously,
28614
+ returns the request thread.
28615
+ """
28616
+ kwargs['_return_http_data_only'] = True
28617
+ return self.query_api_v2_logs_query_get_with_http_info(logql_query, start, end, source_type, **kwargs) # noqa: E501
28618
+
28619
+ def query_api_v2_logs_query_get_with_http_info(self, logql_query, start, end, source_type, **kwargs): # noqa: E501
28620
+ """Query # noqa: E501
28621
+
28622
+ Fetching logs using LogQL queries. # noqa: E501
28623
+ This method makes a synchronous HTTP request by default. To make an
28624
+ asynchronous HTTP request, please pass async_req=True
28625
+ >>> thread = api.query_api_v2_logs_query_get_with_http_info(logql_query, start, end, source_type, async_req=True)
28626
+ >>> result = thread.get()
28627
+
28628
+ :param async_req bool: execute request asynchronously
28629
+ :param str logql_query: LogQL query string to execute against the logs. This should be a valid Loki LogQL expression. (required)
28630
+ :param float start: The start time for the query as a nanosecond Unix epoch. (required)
28631
+ :param float end: The end time for the query as a nanosecond Unix epoch. (required)
28632
+ :param str source_type: The type of logs to query. Must be one of \"application\" or \"system\". (required)
28633
+ :param str cluster_id: The cluster id used to fetch logs. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
28634
+ :param str workspace_id: The workspace id used to fetch logs. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
28635
+ :param str ha_job_id: The production job id used to fetch logs. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
28636
+ :param str service_id: The service id used to fetch logs. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
28637
+ :param int page_size: Number of chunks to fetch. Defaults to 400. Max of 1000.
28638
+ :param bool reverse_sort: Whether the result should be sorted by descending timestamp. Also determines the query direction. When false, it will start to query from the start and return results until it reaches the page_size or the end. When true, it will start to query from the end and return results until it reaches the page_size or the start. Default to false.
28639
+ :param _return_http_data_only: response data without head status code
28640
+ and headers
28641
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
28642
+ be returned without reading/decoding response
28643
+ data. Default is True.
28644
+ :param _request_timeout: timeout setting for this request. If one
28645
+ number provided, it will be total request
28646
+ timeout. It can also be a pair (tuple) of
28647
+ (connection, read) timeouts.
28648
+ :return: tuple(LogitembatchResponse, status_code(int), headers(HTTPHeaderDict))
28649
+ If the method is called asynchronously,
28650
+ returns the request thread.
28651
+ """
28652
+
28653
+ local_var_params = locals()
28654
+
28655
+ all_params = [
28656
+ 'logql_query',
28657
+ 'start',
28658
+ 'end',
28659
+ 'source_type',
28660
+ 'cluster_id',
28661
+ 'workspace_id',
28662
+ 'ha_job_id',
28663
+ 'service_id',
28664
+ 'page_size',
28665
+ 'reverse_sort'
28666
+ ]
28667
+ all_params.extend(
28668
+ [
28669
+ 'async_req',
28670
+ '_return_http_data_only',
28671
+ '_preload_content',
28672
+ '_request_timeout'
28673
+ ]
28674
+ )
28675
+
28676
+ for key, val in six.iteritems(local_var_params['kwargs']):
28677
+ if key not in all_params:
28678
+ raise ApiTypeError(
28679
+ "Got an unexpected keyword argument '%s'"
28680
+ " to method query_api_v2_logs_query_get" % key
28681
+ )
28682
+ local_var_params[key] = val
28683
+ del local_var_params['kwargs']
28684
+ # verify the required parameter 'logql_query' is set
28685
+ if self.api_client.client_side_validation and ('logql_query' not in local_var_params or # noqa: E501
28686
+ local_var_params['logql_query'] is None): # noqa: E501
28687
+ raise ApiValueError("Missing the required parameter `logql_query` when calling `query_api_v2_logs_query_get`") # noqa: E501
28688
+ # verify the required parameter 'start' is set
28689
+ if self.api_client.client_side_validation and ('start' not in local_var_params or # noqa: E501
28690
+ local_var_params['start'] is None): # noqa: E501
28691
+ raise ApiValueError("Missing the required parameter `start` when calling `query_api_v2_logs_query_get`") # noqa: E501
28692
+ # verify the required parameter 'end' is set
28693
+ if self.api_client.client_side_validation and ('end' not in local_var_params or # noqa: E501
28694
+ local_var_params['end'] is None): # noqa: E501
28695
+ raise ApiValueError("Missing the required parameter `end` when calling `query_api_v2_logs_query_get`") # noqa: E501
28696
+ # verify the required parameter 'source_type' is set
28697
+ if self.api_client.client_side_validation and ('source_type' not in local_var_params or # noqa: E501
28698
+ local_var_params['source_type'] is None): # noqa: E501
28699
+ raise ApiValueError("Missing the required parameter `source_type` when calling `query_api_v2_logs_query_get`") # noqa: E501
28700
+
28701
+ if self.api_client.client_side_validation and 'source_type' in local_var_params and not re.search(r'^(application|system)$', local_var_params['source_type']): # noqa: E501
28702
+ raise ApiValueError("Invalid value for parameter `source_type` when calling `query_api_v2_logs_query_get`, must conform to the pattern `/^(application|system)$/`") # noqa: E501
28703
+ if self.api_client.client_side_validation and 'page_size' in local_var_params and local_var_params['page_size'] > 1000: # noqa: E501
28704
+ raise ApiValueError("Invalid value for parameter `page_size` when calling `query_api_v2_logs_query_get`, must be a value less than or equal to `1000`") # noqa: E501
28705
+ collection_formats = {}
28706
+
28707
+ path_params = {}
28708
+
28709
+ query_params = []
28710
+ if 'logql_query' in local_var_params and local_var_params['logql_query'] is not None: # noqa: E501
28711
+ query_params.append(('logql_query', local_var_params['logql_query'])) # noqa: E501
28712
+ if 'start' in local_var_params and local_var_params['start'] is not None: # noqa: E501
28713
+ query_params.append(('start', local_var_params['start'])) # noqa: E501
28714
+ if 'end' in local_var_params and local_var_params['end'] is not None: # noqa: E501
28715
+ query_params.append(('end', local_var_params['end'])) # noqa: E501
28716
+ if 'source_type' in local_var_params and local_var_params['source_type'] is not None: # noqa: E501
28717
+ query_params.append(('source_type', local_var_params['source_type'])) # noqa: E501
28718
+ if 'cluster_id' in local_var_params and local_var_params['cluster_id'] is not None: # noqa: E501
28719
+ query_params.append(('cluster_id', local_var_params['cluster_id'])) # noqa: E501
28720
+ if 'workspace_id' in local_var_params and local_var_params['workspace_id'] is not None: # noqa: E501
28721
+ query_params.append(('workspace_id', local_var_params['workspace_id'])) # noqa: E501
28722
+ if 'ha_job_id' in local_var_params and local_var_params['ha_job_id'] is not None: # noqa: E501
28723
+ query_params.append(('ha_job_id', local_var_params['ha_job_id'])) # noqa: E501
28724
+ if 'service_id' in local_var_params and local_var_params['service_id'] is not None: # noqa: E501
28725
+ query_params.append(('service_id', local_var_params['service_id'])) # noqa: E501
28726
+ if 'page_size' in local_var_params and local_var_params['page_size'] is not None: # noqa: E501
28727
+ query_params.append(('page_size', local_var_params['page_size'])) # noqa: E501
28728
+ if 'reverse_sort' in local_var_params and local_var_params['reverse_sort'] is not None: # noqa: E501
28729
+ query_params.append(('reverse_sort', local_var_params['reverse_sort'])) # noqa: E501
28730
+
28731
+ header_params = {}
28732
+
28733
+ form_params = []
28734
+ local_var_files = {}
28735
+
28736
+ body_params = None
28737
+ # HTTP header `Accept`
28738
+ header_params['Accept'] = self.api_client.select_header_accept(
28739
+ ['application/json']) # noqa: E501
28740
+
28741
+ # Authentication setting
28742
+ auth_settings = [] # noqa: E501
28743
+
28744
+ return self.api_client.call_api(
28745
+ '/api/v2/logs/query', 'GET',
28746
+ path_params,
28747
+ query_params,
28748
+ header_params,
28749
+ body=body_params,
28750
+ post_params=form_params,
28751
+ files=local_var_files,
28752
+ response_type='LogitembatchResponse', # noqa: E501
28753
+ auth_settings=auth_settings,
28754
+ async_req=local_var_params.get('async_req'),
28755
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
28756
+ _preload_content=local_var_params.get('_preload_content', True),
28757
+ _request_timeout=local_var_params.get('_request_timeout'),
28758
+ collection_formats=collection_formats)
28759
+
28222
28760
  def query_api_v2_metrics_query_get(self, promql_query, **kwargs): # noqa: E501
28223
28761
  """Query # noqa: E501
28224
28762
 
@@ -116,6 +116,7 @@ from openapi_client.models.cloudcollaborator_list_response import Cloudcollabora
116
116
  from openapi_client.models.clouddatabucketpresigneduploadinfo_response import ClouddatabucketpresigneduploadinfoResponse
117
117
  from openapi_client.models.clouddatabucketpresignedurlresponse_response import ClouddatabucketpresignedurlresponseResponse
118
118
  from openapi_client.models.clouddeployment_list_response import ClouddeploymentListResponse
119
+ from openapi_client.models.clouddeployment_response import ClouddeploymentResponse
119
120
  from openapi_client.models.clouddeploymentconfig_response import ClouddeploymentconfigResponse
120
121
  from openapi_client.models.cloudoverviewdashboard_response import CloudoverviewdashboardResponse
121
122
  from openapi_client.models.cloudregionandzones_response import CloudregionandzonesResponse