anyscale 0.24.86__py3-none-any.whl → 0.24.88__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 (49) hide show
  1. anyscale/__init__.py +10 -0
  2. anyscale/_private/anyscale_client/anyscale_client.py +10 -0
  3. anyscale/_private/anyscale_client/common.py +9 -0
  4. anyscale/_private/anyscale_client/fake_anyscale_client.py +28 -0
  5. anyscale/_private/docgen/__main__.py +12 -0
  6. anyscale/_private/docgen/generator.py +1 -0
  7. anyscale/client/README.md +25 -2
  8. anyscale/client/openapi_client/__init__.py +18 -2
  9. anyscale/client/openapi_client/api/default_api.py +992 -105
  10. anyscale/client/openapi_client/models/__init__.py +18 -2
  11. anyscale/client/openapi_client/models/admin_create_user.py +255 -0
  12. anyscale/client/openapi_client/models/admin_created_user.py +281 -0
  13. anyscale/client/openapi_client/models/admincreateduser_list_response.py +147 -0
  14. anyscale/client/openapi_client/models/{aggregated_instance_usage_with_cost_model.py → aggregated_instance_usage_csv.py} +100 -100
  15. anyscale/client/openapi_client/models/aggregated_usage.py +147 -0
  16. anyscale/client/openapi_client/models/aggregated_usage_query.py +236 -0
  17. anyscale/client/openapi_client/models/{aggregatedinstanceusagewithcostmodel_list_response.py → aggregatedinstanceusagecsv_list_response.py} +15 -15
  18. anyscale/client/openapi_client/models/aggregatedusage_response.py +121 -0
  19. anyscale/client/openapi_client/models/cloud_resource.py +29 -1
  20. anyscale/client/openapi_client/models/cloud_resource_gcp.py +29 -1
  21. anyscale/client/openapi_client/models/create_cloud_resource.py +29 -1
  22. anyscale/client/openapi_client/models/create_cloud_resource_gcp.py +29 -1
  23. anyscale/client/openapi_client/models/usage_by_cloud.py +201 -0
  24. anyscale/client/openapi_client/models/usage_by_cluster.py +544 -0
  25. anyscale/client/openapi_client/models/usage_by_instance_type.py +174 -0
  26. anyscale/client/openapi_client/models/usage_by_project.py +255 -0
  27. anyscale/client/openapi_client/models/usage_by_user.py +201 -0
  28. anyscale/client/openapi_client/models/usagebycloud_list_response.py +147 -0
  29. anyscale/client/openapi_client/models/usagebycluster_list_response.py +147 -0
  30. anyscale/client/openapi_client/models/usagebyinstancetype_list_response.py +147 -0
  31. anyscale/client/openapi_client/models/usagebyproject_list_response.py +147 -0
  32. anyscale/client/openapi_client/models/usagebyuser_list_response.py +147 -0
  33. anyscale/commands/cloud_commands.py +8 -0
  34. anyscale/commands/command_examples.py +6 -0
  35. anyscale/commands/user_commands.py +49 -0
  36. anyscale/controllers/cloud_controller.py +3 -0
  37. anyscale/scripts.py +2 -0
  38. anyscale/user/__init__.py +35 -0
  39. anyscale/user/_private/user_sdk.py +32 -0
  40. anyscale/user/commands.py +42 -0
  41. anyscale/user/models.py +191 -0
  42. anyscale/version.py +1 -1
  43. {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/METADATA +1 -1
  44. {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/RECORD +49 -28
  45. {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/LICENSE +0 -0
  46. {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/NOTICE +0 -0
  47. {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/WHEEL +0 -0
  48. {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/entry_points.txt +0 -0
  49. {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/top_level.txt +0 -0
@@ -152,6 +152,122 @@ class DefaultApi(object):
152
152
  _request_timeout=local_var_params.get('_request_timeout'),
153
153
  collection_formats=collection_formats)
154
154
 
155
+ def admin_batch_create_users_api_v2_users_admin_batch_create_post(self, admin_create_user, **kwargs): # noqa: E501
156
+ """Admin Batch Create Users # noqa: E501
157
+
158
+ This method makes a synchronous HTTP request by default. To make an
159
+ asynchronous HTTP request, please pass async_req=True
160
+ >>> thread = api.admin_batch_create_users_api_v2_users_admin_batch_create_post(admin_create_user, async_req=True)
161
+ >>> result = thread.get()
162
+
163
+ :param async_req bool: execute request asynchronously
164
+ :param list[AdminCreateUser] admin_create_user: (required)
165
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
166
+ be returned without reading/decoding response
167
+ data. Default is True.
168
+ :param _request_timeout: timeout setting for this request. If one
169
+ number provided, it will be total request
170
+ timeout. It can also be a pair (tuple) of
171
+ (connection, read) timeouts.
172
+ :return: AdmincreateduserListResponse
173
+ If the method is called asynchronously,
174
+ returns the request thread.
175
+ """
176
+ kwargs['_return_http_data_only'] = True
177
+ return self.admin_batch_create_users_api_v2_users_admin_batch_create_post_with_http_info(admin_create_user, **kwargs) # noqa: E501
178
+
179
+ def admin_batch_create_users_api_v2_users_admin_batch_create_post_with_http_info(self, admin_create_user, **kwargs): # noqa: E501
180
+ """Admin Batch Create Users # noqa: E501
181
+
182
+ This method makes a synchronous HTTP request by default. To make an
183
+ asynchronous HTTP request, please pass async_req=True
184
+ >>> thread = api.admin_batch_create_users_api_v2_users_admin_batch_create_post_with_http_info(admin_create_user, async_req=True)
185
+ >>> result = thread.get()
186
+
187
+ :param async_req bool: execute request asynchronously
188
+ :param list[AdminCreateUser] admin_create_user: (required)
189
+ :param _return_http_data_only: response data without head status code
190
+ and headers
191
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
192
+ be returned without reading/decoding response
193
+ data. Default is True.
194
+ :param _request_timeout: timeout setting for this request. If one
195
+ number provided, it will be total request
196
+ timeout. It can also be a pair (tuple) of
197
+ (connection, read) timeouts.
198
+ :return: tuple(AdmincreateduserListResponse, status_code(int), headers(HTTPHeaderDict))
199
+ If the method is called asynchronously,
200
+ returns the request thread.
201
+ """
202
+
203
+ local_var_params = locals()
204
+
205
+ all_params = [
206
+ 'admin_create_user'
207
+ ]
208
+ all_params.extend(
209
+ [
210
+ 'async_req',
211
+ '_return_http_data_only',
212
+ '_preload_content',
213
+ '_request_timeout'
214
+ ]
215
+ )
216
+
217
+ for key, val in six.iteritems(local_var_params['kwargs']):
218
+ if key not in all_params:
219
+ raise ApiTypeError(
220
+ "Got an unexpected keyword argument '%s'"
221
+ " to method admin_batch_create_users_api_v2_users_admin_batch_create_post" % key
222
+ )
223
+ local_var_params[key] = val
224
+ del local_var_params['kwargs']
225
+ # verify the required parameter 'admin_create_user' is set
226
+ if self.api_client.client_side_validation and ('admin_create_user' not in local_var_params or # noqa: E501
227
+ local_var_params['admin_create_user'] is None): # noqa: E501
228
+ raise ApiValueError("Missing the required parameter `admin_create_user` when calling `admin_batch_create_users_api_v2_users_admin_batch_create_post`") # noqa: E501
229
+
230
+ collection_formats = {}
231
+
232
+ path_params = {}
233
+
234
+ query_params = []
235
+
236
+ header_params = {}
237
+
238
+ form_params = []
239
+ local_var_files = {}
240
+
241
+ body_params = None
242
+ if 'admin_create_user' in local_var_params:
243
+ body_params = local_var_params['admin_create_user']
244
+ # HTTP header `Accept`
245
+ header_params['Accept'] = self.api_client.select_header_accept(
246
+ ['application/json']) # noqa: E501
247
+
248
+ # HTTP header `Content-Type`
249
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
250
+ ['application/json']) # noqa: E501
251
+
252
+ # Authentication setting
253
+ auth_settings = [] # noqa: E501
254
+
255
+ return self.api_client.call_api(
256
+ '/api/v2/users/admin_batch_create', 'POST',
257
+ path_params,
258
+ query_params,
259
+ header_params,
260
+ body=body_params,
261
+ post_params=form_params,
262
+ files=local_var_files,
263
+ response_type='AdmincreateduserListResponse', # noqa: E501
264
+ auth_settings=auth_settings,
265
+ async_req=local_var_params.get('async_req'),
266
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
267
+ _preload_content=local_var_params.get('_preload_content', True),
268
+ _request_timeout=local_var_params.get('_request_timeout'),
269
+ collection_formats=collection_formats)
270
+
155
271
  def admission_api_v2_kubernetes_manager_admission_cloud_resource_id_post(self, cloud_resource_id, **kwargs): # noqa: E501
156
272
  """Admission # noqa: E501
157
273
 
@@ -9516,7 +9632,7 @@ class DefaultApi(object):
9516
9632
  number provided, it will be total request
9517
9633
  timeout. It can also be a pair (tuple) of
9518
9634
  (connection, read) timeouts.
9519
- :return: AggregatedinstanceusagewithcostmodelListResponse
9635
+ :return: AggregatedinstanceusagecsvListResponse
9520
9636
  If the method is called asynchronously,
9521
9637
  returns the request thread.
9522
9638
  """
@@ -9546,7 +9662,7 @@ class DefaultApi(object):
9546
9662
  number provided, it will be total request
9547
9663
  timeout. It can also be a pair (tuple) of
9548
9664
  (connection, read) timeouts.
9549
- :return: tuple(AggregatedinstanceusagewithcostmodelListResponse, status_code(int), headers(HTTPHeaderDict))
9665
+ :return: tuple(AggregatedinstanceusagecsvListResponse, status_code(int), headers(HTTPHeaderDict))
9550
9666
  If the method is called asynchronously,
9551
9667
  returns the request thread.
9552
9668
  """
@@ -9627,7 +9743,7 @@ class DefaultApi(object):
9627
9743
  body=body_params,
9628
9744
  post_params=form_params,
9629
9745
  files=local_var_files,
9630
- response_type='AggregatedinstanceusagewithcostmodelListResponse', # noqa: E501
9746
+ response_type='AggregatedinstanceusagecsvListResponse', # noqa: E501
9631
9747
  auth_settings=auth_settings,
9632
9748
  async_req=local_var_params.get('async_req'),
9633
9749
  _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
@@ -9827,10 +9943,651 @@ class DefaultApi(object):
9827
9943
  collection_formats = {}
9828
9944
 
9829
9945
  path_params = {}
9830
- if 'cloud_id' in local_var_params:
9831
- path_params['cloud_id'] = local_var_params['cloud_id'] # noqa: E501
9946
+ if 'cloud_id' in local_var_params:
9947
+ path_params['cloud_id'] = local_var_params['cloud_id'] # noqa: E501
9948
+
9949
+ query_params = []
9950
+
9951
+ header_params = {}
9952
+
9953
+ form_params = []
9954
+ local_var_files = {}
9955
+
9956
+ body_params = None
9957
+ if 'editable_cloud_resource_gcp' in local_var_params:
9958
+ body_params = local_var_params['editable_cloud_resource_gcp']
9959
+ # HTTP header `Accept`
9960
+ header_params['Accept'] = self.api_client.select_header_accept(
9961
+ ['application/json']) # noqa: E501
9962
+
9963
+ # HTTP header `Content-Type`
9964
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
9965
+ ['application/json']) # noqa: E501
9966
+
9967
+ # Authentication setting
9968
+ auth_settings = [] # noqa: E501
9969
+
9970
+ return self.api_client.call_api(
9971
+ '/api/v2/clouds_with_cloud_resource_gcp_router/{cloud_id}', 'PATCH',
9972
+ path_params,
9973
+ query_params,
9974
+ header_params,
9975
+ body=body_params,
9976
+ post_params=form_params,
9977
+ files=local_var_files,
9978
+ response_type='CloudresourcegcpResponse', # noqa: E501
9979
+ auth_settings=auth_settings,
9980
+ async_req=local_var_params.get('async_req'),
9981
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
9982
+ _preload_content=local_var_params.get('_preload_content', True),
9983
+ _request_timeout=local_var_params.get('_request_timeout'),
9984
+ collection_formats=collection_formats)
9985
+
9986
+ def edit_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_patch(self, cloud_id, editable_cloud_resource, **kwargs): # noqa: E501
9987
+ """Edit Cloud Resource # noqa: E501
9988
+
9989
+ Edit Cloud. # noqa: E501
9990
+ This method makes a synchronous HTTP request by default. To make an
9991
+ asynchronous HTTP request, please pass async_req=True
9992
+ >>> thread = api.edit_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_patch(cloud_id, editable_cloud_resource, async_req=True)
9993
+ >>> result = thread.get()
9994
+
9995
+ :param async_req bool: execute request asynchronously
9996
+ :param str cloud_id: (required)
9997
+ :param EditableCloudResource editable_cloud_resource: (required)
9998
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
9999
+ be returned without reading/decoding response
10000
+ data. Default is True.
10001
+ :param _request_timeout: timeout setting for this request. If one
10002
+ number provided, it will be total request
10003
+ timeout. It can also be a pair (tuple) of
10004
+ (connection, read) timeouts.
10005
+ :return: CloudresourceResponse
10006
+ If the method is called asynchronously,
10007
+ returns the request thread.
10008
+ """
10009
+ kwargs['_return_http_data_only'] = True
10010
+ return self.edit_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_patch_with_http_info(cloud_id, editable_cloud_resource, **kwargs) # noqa: E501
10011
+
10012
+ def edit_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_patch_with_http_info(self, cloud_id, editable_cloud_resource, **kwargs): # noqa: E501
10013
+ """Edit Cloud Resource # noqa: E501
10014
+
10015
+ Edit Cloud. # noqa: E501
10016
+ This method makes a synchronous HTTP request by default. To make an
10017
+ asynchronous HTTP request, please pass async_req=True
10018
+ >>> thread = api.edit_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_patch_with_http_info(cloud_id, editable_cloud_resource, async_req=True)
10019
+ >>> result = thread.get()
10020
+
10021
+ :param async_req bool: execute request asynchronously
10022
+ :param str cloud_id: (required)
10023
+ :param EditableCloudResource editable_cloud_resource: (required)
10024
+ :param _return_http_data_only: response data without head status code
10025
+ and headers
10026
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
10027
+ be returned without reading/decoding response
10028
+ data. Default is True.
10029
+ :param _request_timeout: timeout setting for this request. If one
10030
+ number provided, it will be total request
10031
+ timeout. It can also be a pair (tuple) of
10032
+ (connection, read) timeouts.
10033
+ :return: tuple(CloudresourceResponse, status_code(int), headers(HTTPHeaderDict))
10034
+ If the method is called asynchronously,
10035
+ returns the request thread.
10036
+ """
10037
+
10038
+ local_var_params = locals()
10039
+
10040
+ all_params = [
10041
+ 'cloud_id',
10042
+ 'editable_cloud_resource'
10043
+ ]
10044
+ all_params.extend(
10045
+ [
10046
+ 'async_req',
10047
+ '_return_http_data_only',
10048
+ '_preload_content',
10049
+ '_request_timeout'
10050
+ ]
10051
+ )
10052
+
10053
+ for key, val in six.iteritems(local_var_params['kwargs']):
10054
+ if key not in all_params:
10055
+ raise ApiTypeError(
10056
+ "Got an unexpected keyword argument '%s'"
10057
+ " to method edit_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_patch" % key
10058
+ )
10059
+ local_var_params[key] = val
10060
+ del local_var_params['kwargs']
10061
+ # verify the required parameter 'cloud_id' is set
10062
+ if self.api_client.client_side_validation and ('cloud_id' not in local_var_params or # noqa: E501
10063
+ local_var_params['cloud_id'] is None): # noqa: E501
10064
+ raise ApiValueError("Missing the required parameter `cloud_id` when calling `edit_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_patch`") # noqa: E501
10065
+ # verify the required parameter 'editable_cloud_resource' is set
10066
+ if self.api_client.client_side_validation and ('editable_cloud_resource' not in local_var_params or # noqa: E501
10067
+ local_var_params['editable_cloud_resource'] is None): # noqa: E501
10068
+ raise ApiValueError("Missing the required parameter `editable_cloud_resource` when calling `edit_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_patch`") # noqa: E501
10069
+
10070
+ collection_formats = {}
10071
+
10072
+ path_params = {}
10073
+ if 'cloud_id' in local_var_params:
10074
+ path_params['cloud_id'] = local_var_params['cloud_id'] # noqa: E501
10075
+
10076
+ query_params = []
10077
+
10078
+ header_params = {}
10079
+
10080
+ form_params = []
10081
+ local_var_files = {}
10082
+
10083
+ body_params = None
10084
+ if 'editable_cloud_resource' in local_var_params:
10085
+ body_params = local_var_params['editable_cloud_resource']
10086
+ # HTTP header `Accept`
10087
+ header_params['Accept'] = self.api_client.select_header_accept(
10088
+ ['application/json']) # noqa: E501
10089
+
10090
+ # HTTP header `Content-Type`
10091
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
10092
+ ['application/json']) # noqa: E501
10093
+
10094
+ # Authentication setting
10095
+ auth_settings = [] # noqa: E501
10096
+
10097
+ return self.api_client.call_api(
10098
+ '/api/v2/clouds_with_cloud_resource_router/{cloud_id}', 'PATCH',
10099
+ path_params,
10100
+ query_params,
10101
+ header_params,
10102
+ body=body_params,
10103
+ post_params=form_params,
10104
+ files=local_var_files,
10105
+ response_type='CloudresourceResponse', # noqa: E501
10106
+ auth_settings=auth_settings,
10107
+ async_req=local_var_params.get('async_req'),
10108
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
10109
+ _preload_content=local_var_params.get('_preload_content', True),
10110
+ _request_timeout=local_var_params.get('_request_timeout'),
10111
+ collection_formats=collection_formats)
10112
+
10113
+ def execute_interactive_command_api_v2_sessions_session_id_execute_interactive_command_post(self, session_id, execute_interactive_command_options, **kwargs): # noqa: E501
10114
+ """Execute Interactive Command # noqa: E501
10115
+
10116
+ Execute an interative command on a session. This endpoint differs with other execute_* since it doesn't actually execute the command. It will just create the command and return auxiliary information for user to ssh into the head node and run their command. # noqa: E501
10117
+ This method makes a synchronous HTTP request by default. To make an
10118
+ asynchronous HTTP request, please pass async_req=True
10119
+ >>> thread = api.execute_interactive_command_api_v2_sessions_session_id_execute_interactive_command_post(session_id, execute_interactive_command_options, async_req=True)
10120
+ >>> result = thread.get()
10121
+
10122
+ :param async_req bool: execute request asynchronously
10123
+ :param str session_id: (required)
10124
+ :param ExecuteInteractiveCommandOptions execute_interactive_command_options: (required)
10125
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
10126
+ be returned without reading/decoding response
10127
+ data. Default is True.
10128
+ :param _request_timeout: timeout setting for this request. If one
10129
+ number provided, it will be total request
10130
+ timeout. It can also be a pair (tuple) of
10131
+ (connection, read) timeouts.
10132
+ :return: ExecutecommandresponseResponse
10133
+ If the method is called asynchronously,
10134
+ returns the request thread.
10135
+ """
10136
+ kwargs['_return_http_data_only'] = True
10137
+ return self.execute_interactive_command_api_v2_sessions_session_id_execute_interactive_command_post_with_http_info(session_id, execute_interactive_command_options, **kwargs) # noqa: E501
10138
+
10139
+ def execute_interactive_command_api_v2_sessions_session_id_execute_interactive_command_post_with_http_info(self, session_id, execute_interactive_command_options, **kwargs): # noqa: E501
10140
+ """Execute Interactive Command # noqa: E501
10141
+
10142
+ Execute an interative command on a session. This endpoint differs with other execute_* since it doesn't actually execute the command. It will just create the command and return auxiliary information for user to ssh into the head node and run their command. # noqa: E501
10143
+ This method makes a synchronous HTTP request by default. To make an
10144
+ asynchronous HTTP request, please pass async_req=True
10145
+ >>> thread = api.execute_interactive_command_api_v2_sessions_session_id_execute_interactive_command_post_with_http_info(session_id, execute_interactive_command_options, async_req=True)
10146
+ >>> result = thread.get()
10147
+
10148
+ :param async_req bool: execute request asynchronously
10149
+ :param str session_id: (required)
10150
+ :param ExecuteInteractiveCommandOptions execute_interactive_command_options: (required)
10151
+ :param _return_http_data_only: response data without head status code
10152
+ and headers
10153
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
10154
+ be returned without reading/decoding response
10155
+ data. Default is True.
10156
+ :param _request_timeout: timeout setting for this request. If one
10157
+ number provided, it will be total request
10158
+ timeout. It can also be a pair (tuple) of
10159
+ (connection, read) timeouts.
10160
+ :return: tuple(ExecutecommandresponseResponse, status_code(int), headers(HTTPHeaderDict))
10161
+ If the method is called asynchronously,
10162
+ returns the request thread.
10163
+ """
10164
+
10165
+ local_var_params = locals()
10166
+
10167
+ all_params = [
10168
+ 'session_id',
10169
+ 'execute_interactive_command_options'
10170
+ ]
10171
+ all_params.extend(
10172
+ [
10173
+ 'async_req',
10174
+ '_return_http_data_only',
10175
+ '_preload_content',
10176
+ '_request_timeout'
10177
+ ]
10178
+ )
10179
+
10180
+ for key, val in six.iteritems(local_var_params['kwargs']):
10181
+ if key not in all_params:
10182
+ raise ApiTypeError(
10183
+ "Got an unexpected keyword argument '%s'"
10184
+ " to method execute_interactive_command_api_v2_sessions_session_id_execute_interactive_command_post" % key
10185
+ )
10186
+ local_var_params[key] = val
10187
+ del local_var_params['kwargs']
10188
+ # verify the required parameter 'session_id' is set
10189
+ if self.api_client.client_side_validation and ('session_id' not in local_var_params or # noqa: E501
10190
+ local_var_params['session_id'] is None): # noqa: E501
10191
+ raise ApiValueError("Missing the required parameter `session_id` when calling `execute_interactive_command_api_v2_sessions_session_id_execute_interactive_command_post`") # noqa: E501
10192
+ # verify the required parameter 'execute_interactive_command_options' is set
10193
+ if self.api_client.client_side_validation and ('execute_interactive_command_options' not in local_var_params or # noqa: E501
10194
+ local_var_params['execute_interactive_command_options'] is None): # noqa: E501
10195
+ raise ApiValueError("Missing the required parameter `execute_interactive_command_options` when calling `execute_interactive_command_api_v2_sessions_session_id_execute_interactive_command_post`") # noqa: E501
10196
+
10197
+ collection_formats = {}
10198
+
10199
+ path_params = {}
10200
+ if 'session_id' in local_var_params:
10201
+ path_params['session_id'] = local_var_params['session_id'] # noqa: E501
10202
+
10203
+ query_params = []
10204
+
10205
+ header_params = {}
10206
+
10207
+ form_params = []
10208
+ local_var_files = {}
10209
+
10210
+ body_params = None
10211
+ if 'execute_interactive_command_options' in local_var_params:
10212
+ body_params = local_var_params['execute_interactive_command_options']
10213
+ # HTTP header `Accept`
10214
+ header_params['Accept'] = self.api_client.select_header_accept(
10215
+ ['application/json']) # noqa: E501
10216
+
10217
+ # HTTP header `Content-Type`
10218
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
10219
+ ['application/json']) # noqa: E501
10220
+
10221
+ # Authentication setting
10222
+ auth_settings = [] # noqa: E501
10223
+
10224
+ return self.api_client.call_api(
10225
+ '/api/v2/sessions/{session_id}/execute_interactive_command', 'POST',
10226
+ path_params,
10227
+ query_params,
10228
+ header_params,
10229
+ body=body_params,
10230
+ post_params=form_params,
10231
+ files=local_var_files,
10232
+ response_type='ExecutecommandresponseResponse', # noqa: E501
10233
+ auth_settings=auth_settings,
10234
+ async_req=local_var_params.get('async_req'),
10235
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
10236
+ _preload_content=local_var_params.get('_preload_content', True),
10237
+ _request_timeout=local_var_params.get('_request_timeout'),
10238
+ collection_formats=collection_formats)
10239
+
10240
+ def execute_shell_command_api_v2_sessions_session_id_execute_shell_command_post(self, session_id, execute_shell_command_options, **kwargs): # noqa: E501
10241
+ """Execute Shell Command # noqa: E501
10242
+
10243
+ DEPRECATED: This API is no deprecated and will not be supported in Anyscale 2.0 # noqa: E501
10244
+ This method makes a synchronous HTTP request by default. To make an
10245
+ asynchronous HTTP request, please pass async_req=True
10246
+ >>> thread = api.execute_shell_command_api_v2_sessions_session_id_execute_shell_command_post(session_id, execute_shell_command_options, async_req=True)
10247
+ >>> result = thread.get()
10248
+
10249
+ :param async_req bool: execute request asynchronously
10250
+ :param str session_id: (required)
10251
+ :param ExecuteShellCommandOptions execute_shell_command_options: (required)
10252
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
10253
+ be returned without reading/decoding response
10254
+ data. Default is True.
10255
+ :param _request_timeout: timeout setting for this request. If one
10256
+ number provided, it will be total request
10257
+ timeout. It can also be a pair (tuple) of
10258
+ (connection, read) timeouts.
10259
+ :return: SessioncommandidResponse
10260
+ If the method is called asynchronously,
10261
+ returns the request thread.
10262
+ """
10263
+ kwargs['_return_http_data_only'] = True
10264
+ return self.execute_shell_command_api_v2_sessions_session_id_execute_shell_command_post_with_http_info(session_id, execute_shell_command_options, **kwargs) # noqa: E501
10265
+
10266
+ def execute_shell_command_api_v2_sessions_session_id_execute_shell_command_post_with_http_info(self, session_id, execute_shell_command_options, **kwargs): # noqa: E501
10267
+ """Execute Shell Command # noqa: E501
10268
+
10269
+ DEPRECATED: This API is no deprecated and will not be supported in Anyscale 2.0 # noqa: E501
10270
+ This method makes a synchronous HTTP request by default. To make an
10271
+ asynchronous HTTP request, please pass async_req=True
10272
+ >>> thread = api.execute_shell_command_api_v2_sessions_session_id_execute_shell_command_post_with_http_info(session_id, execute_shell_command_options, async_req=True)
10273
+ >>> result = thread.get()
10274
+
10275
+ :param async_req bool: execute request asynchronously
10276
+ :param str session_id: (required)
10277
+ :param ExecuteShellCommandOptions execute_shell_command_options: (required)
10278
+ :param _return_http_data_only: response data without head status code
10279
+ and headers
10280
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
10281
+ be returned without reading/decoding response
10282
+ data. Default is True.
10283
+ :param _request_timeout: timeout setting for this request. If one
10284
+ number provided, it will be total request
10285
+ timeout. It can also be a pair (tuple) of
10286
+ (connection, read) timeouts.
10287
+ :return: tuple(SessioncommandidResponse, status_code(int), headers(HTTPHeaderDict))
10288
+ If the method is called asynchronously,
10289
+ returns the request thread.
10290
+ """
10291
+
10292
+ local_var_params = locals()
10293
+
10294
+ all_params = [
10295
+ 'session_id',
10296
+ 'execute_shell_command_options'
10297
+ ]
10298
+ all_params.extend(
10299
+ [
10300
+ 'async_req',
10301
+ '_return_http_data_only',
10302
+ '_preload_content',
10303
+ '_request_timeout'
10304
+ ]
10305
+ )
10306
+
10307
+ for key, val in six.iteritems(local_var_params['kwargs']):
10308
+ if key not in all_params:
10309
+ raise ApiTypeError(
10310
+ "Got an unexpected keyword argument '%s'"
10311
+ " to method execute_shell_command_api_v2_sessions_session_id_execute_shell_command_post" % key
10312
+ )
10313
+ local_var_params[key] = val
10314
+ del local_var_params['kwargs']
10315
+ # verify the required parameter 'session_id' is set
10316
+ if self.api_client.client_side_validation and ('session_id' not in local_var_params or # noqa: E501
10317
+ local_var_params['session_id'] is None): # noqa: E501
10318
+ raise ApiValueError("Missing the required parameter `session_id` when calling `execute_shell_command_api_v2_sessions_session_id_execute_shell_command_post`") # noqa: E501
10319
+ # verify the required parameter 'execute_shell_command_options' is set
10320
+ if self.api_client.client_side_validation and ('execute_shell_command_options' not in local_var_params or # noqa: E501
10321
+ local_var_params['execute_shell_command_options'] is None): # noqa: E501
10322
+ raise ApiValueError("Missing the required parameter `execute_shell_command_options` when calling `execute_shell_command_api_v2_sessions_session_id_execute_shell_command_post`") # noqa: E501
10323
+
10324
+ collection_formats = {}
10325
+
10326
+ path_params = {}
10327
+ if 'session_id' in local_var_params:
10328
+ path_params['session_id'] = local_var_params['session_id'] # noqa: E501
10329
+
10330
+ query_params = []
10331
+
10332
+ header_params = {}
10333
+
10334
+ form_params = []
10335
+ local_var_files = {}
10336
+
10337
+ body_params = None
10338
+ if 'execute_shell_command_options' in local_var_params:
10339
+ body_params = local_var_params['execute_shell_command_options']
10340
+ # HTTP header `Accept`
10341
+ header_params['Accept'] = self.api_client.select_header_accept(
10342
+ ['application/json']) # noqa: E501
10343
+
10344
+ # HTTP header `Content-Type`
10345
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
10346
+ ['application/json']) # noqa: E501
10347
+
10348
+ # Authentication setting
10349
+ auth_settings = [] # noqa: E501
10350
+
10351
+ return self.api_client.call_api(
10352
+ '/api/v2/sessions/{session_id}/execute_shell_command', 'POST',
10353
+ path_params,
10354
+ query_params,
10355
+ header_params,
10356
+ body=body_params,
10357
+ post_params=form_params,
10358
+ files=local_var_files,
10359
+ response_type='SessioncommandidResponse', # noqa: E501
10360
+ auth_settings=auth_settings,
10361
+ async_req=local_var_params.get('async_req'),
10362
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
10363
+ _preload_content=local_var_params.get('_preload_content', True),
10364
+ _request_timeout=local_var_params.get('_request_timeout'),
10365
+ collection_formats=collection_formats)
10366
+
10367
+ def fetch_usage_group_by_cloud_api_v2_aggregated_instance_usage_cloud_post(self, aggregated_usage_query, **kwargs): # noqa: E501
10368
+ """Fetch Usage Group By Cloud # noqa: E501
10369
+
10370
+ This method makes a synchronous HTTP request by default. To make an
10371
+ asynchronous HTTP request, please pass async_req=True
10372
+ >>> thread = api.fetch_usage_group_by_cloud_api_v2_aggregated_instance_usage_cloud_post(aggregated_usage_query, async_req=True)
10373
+ >>> result = thread.get()
10374
+
10375
+ :param async_req bool: execute request asynchronously
10376
+ :param AggregatedUsageQuery aggregated_usage_query: (required)
10377
+ :param str paging_token:
10378
+ :param int count:
10379
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
10380
+ be returned without reading/decoding response
10381
+ data. Default is True.
10382
+ :param _request_timeout: timeout setting for this request. If one
10383
+ number provided, it will be total request
10384
+ timeout. It can also be a pair (tuple) of
10385
+ (connection, read) timeouts.
10386
+ :return: UsagebycloudListResponse
10387
+ If the method is called asynchronously,
10388
+ returns the request thread.
10389
+ """
10390
+ kwargs['_return_http_data_only'] = True
10391
+ return self.fetch_usage_group_by_cloud_api_v2_aggregated_instance_usage_cloud_post_with_http_info(aggregated_usage_query, **kwargs) # noqa: E501
10392
+
10393
+ def fetch_usage_group_by_cloud_api_v2_aggregated_instance_usage_cloud_post_with_http_info(self, aggregated_usage_query, **kwargs): # noqa: E501
10394
+ """Fetch Usage Group By Cloud # noqa: E501
10395
+
10396
+ This method makes a synchronous HTTP request by default. To make an
10397
+ asynchronous HTTP request, please pass async_req=True
10398
+ >>> thread = api.fetch_usage_group_by_cloud_api_v2_aggregated_instance_usage_cloud_post_with_http_info(aggregated_usage_query, async_req=True)
10399
+ >>> result = thread.get()
10400
+
10401
+ :param async_req bool: execute request asynchronously
10402
+ :param AggregatedUsageQuery aggregated_usage_query: (required)
10403
+ :param str paging_token:
10404
+ :param int count:
10405
+ :param _return_http_data_only: response data without head status code
10406
+ and headers
10407
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
10408
+ be returned without reading/decoding response
10409
+ data. Default is True.
10410
+ :param _request_timeout: timeout setting for this request. If one
10411
+ number provided, it will be total request
10412
+ timeout. It can also be a pair (tuple) of
10413
+ (connection, read) timeouts.
10414
+ :return: tuple(UsagebycloudListResponse, status_code(int), headers(HTTPHeaderDict))
10415
+ If the method is called asynchronously,
10416
+ returns the request thread.
10417
+ """
10418
+
10419
+ local_var_params = locals()
10420
+
10421
+ all_params = [
10422
+ 'aggregated_usage_query',
10423
+ 'paging_token',
10424
+ 'count'
10425
+ ]
10426
+ all_params.extend(
10427
+ [
10428
+ 'async_req',
10429
+ '_return_http_data_only',
10430
+ '_preload_content',
10431
+ '_request_timeout'
10432
+ ]
10433
+ )
10434
+
10435
+ for key, val in six.iteritems(local_var_params['kwargs']):
10436
+ if key not in all_params:
10437
+ raise ApiTypeError(
10438
+ "Got an unexpected keyword argument '%s'"
10439
+ " to method fetch_usage_group_by_cloud_api_v2_aggregated_instance_usage_cloud_post" % key
10440
+ )
10441
+ local_var_params[key] = val
10442
+ del local_var_params['kwargs']
10443
+ # verify the required parameter 'aggregated_usage_query' is set
10444
+ if self.api_client.client_side_validation and ('aggregated_usage_query' not in local_var_params or # noqa: E501
10445
+ local_var_params['aggregated_usage_query'] is None): # noqa: E501
10446
+ raise ApiValueError("Missing the required parameter `aggregated_usage_query` when calling `fetch_usage_group_by_cloud_api_v2_aggregated_instance_usage_cloud_post`") # noqa: E501
10447
+
10448
+ if self.api_client.client_side_validation and 'count' in local_var_params and local_var_params['count'] > 50: # noqa: E501
10449
+ raise ApiValueError("Invalid value for parameter `count` when calling `fetch_usage_group_by_cloud_api_v2_aggregated_instance_usage_cloud_post`, must be a value less than or equal to `50`") # noqa: E501
10450
+ if self.api_client.client_side_validation and 'count' in local_var_params and local_var_params['count'] < 0: # noqa: E501
10451
+ raise ApiValueError("Invalid value for parameter `count` when calling `fetch_usage_group_by_cloud_api_v2_aggregated_instance_usage_cloud_post`, must be a value greater than or equal to `0`") # noqa: E501
10452
+ collection_formats = {}
10453
+
10454
+ path_params = {}
10455
+
10456
+ query_params = []
10457
+ if 'paging_token' in local_var_params and local_var_params['paging_token'] is not None: # noqa: E501
10458
+ query_params.append(('paging_token', local_var_params['paging_token'])) # noqa: E501
10459
+ if 'count' in local_var_params and local_var_params['count'] is not None: # noqa: E501
10460
+ query_params.append(('count', local_var_params['count'])) # noqa: E501
10461
+
10462
+ header_params = {}
10463
+
10464
+ form_params = []
10465
+ local_var_files = {}
10466
+
10467
+ body_params = None
10468
+ if 'aggregated_usage_query' in local_var_params:
10469
+ body_params = local_var_params['aggregated_usage_query']
10470
+ # HTTP header `Accept`
10471
+ header_params['Accept'] = self.api_client.select_header_accept(
10472
+ ['application/json']) # noqa: E501
10473
+
10474
+ # HTTP header `Content-Type`
10475
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
10476
+ ['application/json']) # noqa: E501
10477
+
10478
+ # Authentication setting
10479
+ auth_settings = [] # noqa: E501
10480
+
10481
+ return self.api_client.call_api(
10482
+ '/api/v2/aggregated_instance_usage/cloud', 'POST',
10483
+ path_params,
10484
+ query_params,
10485
+ header_params,
10486
+ body=body_params,
10487
+ post_params=form_params,
10488
+ files=local_var_files,
10489
+ response_type='UsagebycloudListResponse', # noqa: E501
10490
+ auth_settings=auth_settings,
10491
+ async_req=local_var_params.get('async_req'),
10492
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
10493
+ _preload_content=local_var_params.get('_preload_content', True),
10494
+ _request_timeout=local_var_params.get('_request_timeout'),
10495
+ collection_formats=collection_formats)
10496
+
10497
+ def fetch_usage_group_by_cluster_api_v2_aggregated_instance_usage_cluster_post(self, aggregated_usage_query, **kwargs): # noqa: E501
10498
+ """Fetch Usage Group By Cluster # noqa: E501
10499
+
10500
+ This method makes a synchronous HTTP request by default. To make an
10501
+ asynchronous HTTP request, please pass async_req=True
10502
+ >>> thread = api.fetch_usage_group_by_cluster_api_v2_aggregated_instance_usage_cluster_post(aggregated_usage_query, async_req=True)
10503
+ >>> result = thread.get()
10504
+
10505
+ :param async_req bool: execute request asynchronously
10506
+ :param AggregatedUsageQuery aggregated_usage_query: (required)
10507
+ :param str paging_token:
10508
+ :param int count:
10509
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
10510
+ be returned without reading/decoding response
10511
+ data. Default is True.
10512
+ :param _request_timeout: timeout setting for this request. If one
10513
+ number provided, it will be total request
10514
+ timeout. It can also be a pair (tuple) of
10515
+ (connection, read) timeouts.
10516
+ :return: UsagebyclusterListResponse
10517
+ If the method is called asynchronously,
10518
+ returns the request thread.
10519
+ """
10520
+ kwargs['_return_http_data_only'] = True
10521
+ return self.fetch_usage_group_by_cluster_api_v2_aggregated_instance_usage_cluster_post_with_http_info(aggregated_usage_query, **kwargs) # noqa: E501
10522
+
10523
+ def fetch_usage_group_by_cluster_api_v2_aggregated_instance_usage_cluster_post_with_http_info(self, aggregated_usage_query, **kwargs): # noqa: E501
10524
+ """Fetch Usage Group By Cluster # noqa: E501
10525
+
10526
+ This method makes a synchronous HTTP request by default. To make an
10527
+ asynchronous HTTP request, please pass async_req=True
10528
+ >>> thread = api.fetch_usage_group_by_cluster_api_v2_aggregated_instance_usage_cluster_post_with_http_info(aggregated_usage_query, async_req=True)
10529
+ >>> result = thread.get()
10530
+
10531
+ :param async_req bool: execute request asynchronously
10532
+ :param AggregatedUsageQuery aggregated_usage_query: (required)
10533
+ :param str paging_token:
10534
+ :param int count:
10535
+ :param _return_http_data_only: response data without head status code
10536
+ and headers
10537
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
10538
+ be returned without reading/decoding response
10539
+ data. Default is True.
10540
+ :param _request_timeout: timeout setting for this request. If one
10541
+ number provided, it will be total request
10542
+ timeout. It can also be a pair (tuple) of
10543
+ (connection, read) timeouts.
10544
+ :return: tuple(UsagebyclusterListResponse, status_code(int), headers(HTTPHeaderDict))
10545
+ If the method is called asynchronously,
10546
+ returns the request thread.
10547
+ """
10548
+
10549
+ local_var_params = locals()
10550
+
10551
+ all_params = [
10552
+ 'aggregated_usage_query',
10553
+ 'paging_token',
10554
+ 'count'
10555
+ ]
10556
+ all_params.extend(
10557
+ [
10558
+ 'async_req',
10559
+ '_return_http_data_only',
10560
+ '_preload_content',
10561
+ '_request_timeout'
10562
+ ]
10563
+ )
10564
+
10565
+ for key, val in six.iteritems(local_var_params['kwargs']):
10566
+ if key not in all_params:
10567
+ raise ApiTypeError(
10568
+ "Got an unexpected keyword argument '%s'"
10569
+ " to method fetch_usage_group_by_cluster_api_v2_aggregated_instance_usage_cluster_post" % key
10570
+ )
10571
+ local_var_params[key] = val
10572
+ del local_var_params['kwargs']
10573
+ # verify the required parameter 'aggregated_usage_query' is set
10574
+ if self.api_client.client_side_validation and ('aggregated_usage_query' not in local_var_params or # noqa: E501
10575
+ local_var_params['aggregated_usage_query'] is None): # noqa: E501
10576
+ raise ApiValueError("Missing the required parameter `aggregated_usage_query` when calling `fetch_usage_group_by_cluster_api_v2_aggregated_instance_usage_cluster_post`") # noqa: E501
10577
+
10578
+ if self.api_client.client_side_validation and 'count' in local_var_params and local_var_params['count'] > 50: # noqa: E501
10579
+ raise ApiValueError("Invalid value for parameter `count` when calling `fetch_usage_group_by_cluster_api_v2_aggregated_instance_usage_cluster_post`, must be a value less than or equal to `50`") # noqa: E501
10580
+ if self.api_client.client_side_validation and 'count' in local_var_params and local_var_params['count'] < 0: # noqa: E501
10581
+ raise ApiValueError("Invalid value for parameter `count` when calling `fetch_usage_group_by_cluster_api_v2_aggregated_instance_usage_cluster_post`, must be a value greater than or equal to `0`") # noqa: E501
10582
+ collection_formats = {}
10583
+
10584
+ path_params = {}
9832
10585
 
9833
10586
  query_params = []
10587
+ if 'paging_token' in local_var_params and local_var_params['paging_token'] is not None: # noqa: E501
10588
+ query_params.append(('paging_token', local_var_params['paging_token'])) # noqa: E501
10589
+ if 'count' in local_var_params and local_var_params['count'] is not None: # noqa: E501
10590
+ query_params.append(('count', local_var_params['count'])) # noqa: E501
9834
10591
 
9835
10592
  header_params = {}
9836
10593
 
@@ -9838,8 +10595,8 @@ class DefaultApi(object):
9838
10595
  local_var_files = {}
9839
10596
 
9840
10597
  body_params = None
9841
- if 'editable_cloud_resource_gcp' in local_var_params:
9842
- body_params = local_var_params['editable_cloud_resource_gcp']
10598
+ if 'aggregated_usage_query' in local_var_params:
10599
+ body_params = local_var_params['aggregated_usage_query']
9843
10600
  # HTTP header `Accept`
9844
10601
  header_params['Accept'] = self.api_client.select_header_accept(
9845
10602
  ['application/json']) # noqa: E501
@@ -9852,14 +10609,14 @@ class DefaultApi(object):
9852
10609
  auth_settings = [] # noqa: E501
9853
10610
 
9854
10611
  return self.api_client.call_api(
9855
- '/api/v2/clouds_with_cloud_resource_gcp_router/{cloud_id}', 'PATCH',
10612
+ '/api/v2/aggregated_instance_usage/cluster', 'POST',
9856
10613
  path_params,
9857
10614
  query_params,
9858
10615
  header_params,
9859
10616
  body=body_params,
9860
10617
  post_params=form_params,
9861
10618
  files=local_var_files,
9862
- response_type='CloudresourcegcpResponse', # noqa: E501
10619
+ response_type='UsagebyclusterListResponse', # noqa: E501
9863
10620
  auth_settings=auth_settings,
9864
10621
  async_req=local_var_params.get('async_req'),
9865
10622
  _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
@@ -9867,18 +10624,18 @@ class DefaultApi(object):
9867
10624
  _request_timeout=local_var_params.get('_request_timeout'),
9868
10625
  collection_formats=collection_formats)
9869
10626
 
9870
- def edit_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_patch(self, cloud_id, editable_cloud_resource, **kwargs): # noqa: E501
9871
- """Edit Cloud Resource # noqa: E501
10627
+ def fetch_usage_group_by_instance_type_api_v2_aggregated_instance_usage_instance_type_post(self, aggregated_usage_query, **kwargs): # noqa: E501
10628
+ """Fetch Usage Group By Instance Type # noqa: E501
9872
10629
 
9873
- Edit Cloud. # noqa: E501
9874
10630
  This method makes a synchronous HTTP request by default. To make an
9875
10631
  asynchronous HTTP request, please pass async_req=True
9876
- >>> thread = api.edit_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_patch(cloud_id, editable_cloud_resource, async_req=True)
10632
+ >>> thread = api.fetch_usage_group_by_instance_type_api_v2_aggregated_instance_usage_instance_type_post(aggregated_usage_query, async_req=True)
9877
10633
  >>> result = thread.get()
9878
10634
 
9879
10635
  :param async_req bool: execute request asynchronously
9880
- :param str cloud_id: (required)
9881
- :param EditableCloudResource editable_cloud_resource: (required)
10636
+ :param AggregatedUsageQuery aggregated_usage_query: (required)
10637
+ :param str paging_token:
10638
+ :param int count:
9882
10639
  :param _preload_content: if False, the urllib3.HTTPResponse object will
9883
10640
  be returned without reading/decoding response
9884
10641
  data. Default is True.
@@ -9886,25 +10643,25 @@ class DefaultApi(object):
9886
10643
  number provided, it will be total request
9887
10644
  timeout. It can also be a pair (tuple) of
9888
10645
  (connection, read) timeouts.
9889
- :return: CloudresourceResponse
10646
+ :return: UsagebyinstancetypeListResponse
9890
10647
  If the method is called asynchronously,
9891
10648
  returns the request thread.
9892
10649
  """
9893
10650
  kwargs['_return_http_data_only'] = True
9894
- return self.edit_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_patch_with_http_info(cloud_id, editable_cloud_resource, **kwargs) # noqa: E501
10651
+ return self.fetch_usage_group_by_instance_type_api_v2_aggregated_instance_usage_instance_type_post_with_http_info(aggregated_usage_query, **kwargs) # noqa: E501
9895
10652
 
9896
- def edit_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_patch_with_http_info(self, cloud_id, editable_cloud_resource, **kwargs): # noqa: E501
9897
- """Edit Cloud Resource # noqa: E501
10653
+ def fetch_usage_group_by_instance_type_api_v2_aggregated_instance_usage_instance_type_post_with_http_info(self, aggregated_usage_query, **kwargs): # noqa: E501
10654
+ """Fetch Usage Group By Instance Type # noqa: E501
9898
10655
 
9899
- Edit Cloud. # noqa: E501
9900
10656
  This method makes a synchronous HTTP request by default. To make an
9901
10657
  asynchronous HTTP request, please pass async_req=True
9902
- >>> thread = api.edit_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_patch_with_http_info(cloud_id, editable_cloud_resource, async_req=True)
10658
+ >>> thread = api.fetch_usage_group_by_instance_type_api_v2_aggregated_instance_usage_instance_type_post_with_http_info(aggregated_usage_query, async_req=True)
9903
10659
  >>> result = thread.get()
9904
10660
 
9905
10661
  :param async_req bool: execute request asynchronously
9906
- :param str cloud_id: (required)
9907
- :param EditableCloudResource editable_cloud_resource: (required)
10662
+ :param AggregatedUsageQuery aggregated_usage_query: (required)
10663
+ :param str paging_token:
10664
+ :param int count:
9908
10665
  :param _return_http_data_only: response data without head status code
9909
10666
  and headers
9910
10667
  :param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -9914,7 +10671,7 @@ class DefaultApi(object):
9914
10671
  number provided, it will be total request
9915
10672
  timeout. It can also be a pair (tuple) of
9916
10673
  (connection, read) timeouts.
9917
- :return: tuple(CloudresourceResponse, status_code(int), headers(HTTPHeaderDict))
10674
+ :return: tuple(UsagebyinstancetypeListResponse, status_code(int), headers(HTTPHeaderDict))
9918
10675
  If the method is called asynchronously,
9919
10676
  returns the request thread.
9920
10677
  """
@@ -9922,8 +10679,9 @@ class DefaultApi(object):
9922
10679
  local_var_params = locals()
9923
10680
 
9924
10681
  all_params = [
9925
- 'cloud_id',
9926
- 'editable_cloud_resource'
10682
+ 'aggregated_usage_query',
10683
+ 'paging_token',
10684
+ 'count'
9927
10685
  ]
9928
10686
  all_params.extend(
9929
10687
  [
@@ -9938,26 +10696,28 @@ class DefaultApi(object):
9938
10696
  if key not in all_params:
9939
10697
  raise ApiTypeError(
9940
10698
  "Got an unexpected keyword argument '%s'"
9941
- " to method edit_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_patch" % key
10699
+ " to method fetch_usage_group_by_instance_type_api_v2_aggregated_instance_usage_instance_type_post" % key
9942
10700
  )
9943
10701
  local_var_params[key] = val
9944
10702
  del local_var_params['kwargs']
9945
- # verify the required parameter 'cloud_id' is set
9946
- if self.api_client.client_side_validation and ('cloud_id' not in local_var_params or # noqa: E501
9947
- local_var_params['cloud_id'] is None): # noqa: E501
9948
- raise ApiValueError("Missing the required parameter `cloud_id` when calling `edit_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_patch`") # noqa: E501
9949
- # verify the required parameter 'editable_cloud_resource' is set
9950
- if self.api_client.client_side_validation and ('editable_cloud_resource' not in local_var_params or # noqa: E501
9951
- local_var_params['editable_cloud_resource'] is None): # noqa: E501
9952
- raise ApiValueError("Missing the required parameter `editable_cloud_resource` when calling `edit_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_patch`") # noqa: E501
10703
+ # verify the required parameter 'aggregated_usage_query' is set
10704
+ if self.api_client.client_side_validation and ('aggregated_usage_query' not in local_var_params or # noqa: E501
10705
+ local_var_params['aggregated_usage_query'] is None): # noqa: E501
10706
+ raise ApiValueError("Missing the required parameter `aggregated_usage_query` when calling `fetch_usage_group_by_instance_type_api_v2_aggregated_instance_usage_instance_type_post`") # noqa: E501
9953
10707
 
10708
+ if self.api_client.client_side_validation and 'count' in local_var_params and local_var_params['count'] > 50: # noqa: E501
10709
+ raise ApiValueError("Invalid value for parameter `count` when calling `fetch_usage_group_by_instance_type_api_v2_aggregated_instance_usage_instance_type_post`, must be a value less than or equal to `50`") # noqa: E501
10710
+ if self.api_client.client_side_validation and 'count' in local_var_params and local_var_params['count'] < 0: # noqa: E501
10711
+ raise ApiValueError("Invalid value for parameter `count` when calling `fetch_usage_group_by_instance_type_api_v2_aggregated_instance_usage_instance_type_post`, must be a value greater than or equal to `0`") # noqa: E501
9954
10712
  collection_formats = {}
9955
10713
 
9956
10714
  path_params = {}
9957
- if 'cloud_id' in local_var_params:
9958
- path_params['cloud_id'] = local_var_params['cloud_id'] # noqa: E501
9959
10715
 
9960
10716
  query_params = []
10717
+ if 'paging_token' in local_var_params and local_var_params['paging_token'] is not None: # noqa: E501
10718
+ query_params.append(('paging_token', local_var_params['paging_token'])) # noqa: E501
10719
+ if 'count' in local_var_params and local_var_params['count'] is not None: # noqa: E501
10720
+ query_params.append(('count', local_var_params['count'])) # noqa: E501
9961
10721
 
9962
10722
  header_params = {}
9963
10723
 
@@ -9965,8 +10725,8 @@ class DefaultApi(object):
9965
10725
  local_var_files = {}
9966
10726
 
9967
10727
  body_params = None
9968
- if 'editable_cloud_resource' in local_var_params:
9969
- body_params = local_var_params['editable_cloud_resource']
10728
+ if 'aggregated_usage_query' in local_var_params:
10729
+ body_params = local_var_params['aggregated_usage_query']
9970
10730
  # HTTP header `Accept`
9971
10731
  header_params['Accept'] = self.api_client.select_header_accept(
9972
10732
  ['application/json']) # noqa: E501
@@ -9979,14 +10739,14 @@ class DefaultApi(object):
9979
10739
  auth_settings = [] # noqa: E501
9980
10740
 
9981
10741
  return self.api_client.call_api(
9982
- '/api/v2/clouds_with_cloud_resource_router/{cloud_id}', 'PATCH',
10742
+ '/api/v2/aggregated_instance_usage/instance_type', 'POST',
9983
10743
  path_params,
9984
10744
  query_params,
9985
10745
  header_params,
9986
10746
  body=body_params,
9987
10747
  post_params=form_params,
9988
10748
  files=local_var_files,
9989
- response_type='CloudresourceResponse', # noqa: E501
10749
+ response_type='UsagebyinstancetypeListResponse', # noqa: E501
9990
10750
  auth_settings=auth_settings,
9991
10751
  async_req=local_var_params.get('async_req'),
9992
10752
  _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
@@ -9994,18 +10754,18 @@ class DefaultApi(object):
9994
10754
  _request_timeout=local_var_params.get('_request_timeout'),
9995
10755
  collection_formats=collection_formats)
9996
10756
 
9997
- def execute_interactive_command_api_v2_sessions_session_id_execute_interactive_command_post(self, session_id, execute_interactive_command_options, **kwargs): # noqa: E501
9998
- """Execute Interactive Command # noqa: E501
10757
+ def fetch_usage_group_by_project_api_v2_aggregated_instance_usage_project_post(self, aggregated_usage_query, **kwargs): # noqa: E501
10758
+ """Fetch Usage Group By Project # noqa: E501
9999
10759
 
10000
- Execute an interative command on a session. This endpoint differs with other execute_* since it doesn't actually execute the command. It will just create the command and return auxiliary information for user to ssh into the head node and run their command. # noqa: E501
10001
10760
  This method makes a synchronous HTTP request by default. To make an
10002
10761
  asynchronous HTTP request, please pass async_req=True
10003
- >>> thread = api.execute_interactive_command_api_v2_sessions_session_id_execute_interactive_command_post(session_id, execute_interactive_command_options, async_req=True)
10762
+ >>> thread = api.fetch_usage_group_by_project_api_v2_aggregated_instance_usage_project_post(aggregated_usage_query, async_req=True)
10004
10763
  >>> result = thread.get()
10005
10764
 
10006
10765
  :param async_req bool: execute request asynchronously
10007
- :param str session_id: (required)
10008
- :param ExecuteInteractiveCommandOptions execute_interactive_command_options: (required)
10766
+ :param AggregatedUsageQuery aggregated_usage_query: (required)
10767
+ :param str paging_token:
10768
+ :param int count:
10009
10769
  :param _preload_content: if False, the urllib3.HTTPResponse object will
10010
10770
  be returned without reading/decoding response
10011
10771
  data. Default is True.
@@ -10013,25 +10773,25 @@ class DefaultApi(object):
10013
10773
  number provided, it will be total request
10014
10774
  timeout. It can also be a pair (tuple) of
10015
10775
  (connection, read) timeouts.
10016
- :return: ExecutecommandresponseResponse
10776
+ :return: UsagebyprojectListResponse
10017
10777
  If the method is called asynchronously,
10018
10778
  returns the request thread.
10019
10779
  """
10020
10780
  kwargs['_return_http_data_only'] = True
10021
- return self.execute_interactive_command_api_v2_sessions_session_id_execute_interactive_command_post_with_http_info(session_id, execute_interactive_command_options, **kwargs) # noqa: E501
10781
+ return self.fetch_usage_group_by_project_api_v2_aggregated_instance_usage_project_post_with_http_info(aggregated_usage_query, **kwargs) # noqa: E501
10022
10782
 
10023
- def execute_interactive_command_api_v2_sessions_session_id_execute_interactive_command_post_with_http_info(self, session_id, execute_interactive_command_options, **kwargs): # noqa: E501
10024
- """Execute Interactive Command # noqa: E501
10783
+ def fetch_usage_group_by_project_api_v2_aggregated_instance_usage_project_post_with_http_info(self, aggregated_usage_query, **kwargs): # noqa: E501
10784
+ """Fetch Usage Group By Project # noqa: E501
10025
10785
 
10026
- Execute an interative command on a session. This endpoint differs with other execute_* since it doesn't actually execute the command. It will just create the command and return auxiliary information for user to ssh into the head node and run their command. # noqa: E501
10027
10786
  This method makes a synchronous HTTP request by default. To make an
10028
10787
  asynchronous HTTP request, please pass async_req=True
10029
- >>> thread = api.execute_interactive_command_api_v2_sessions_session_id_execute_interactive_command_post_with_http_info(session_id, execute_interactive_command_options, async_req=True)
10788
+ >>> thread = api.fetch_usage_group_by_project_api_v2_aggregated_instance_usage_project_post_with_http_info(aggregated_usage_query, async_req=True)
10030
10789
  >>> result = thread.get()
10031
10790
 
10032
10791
  :param async_req bool: execute request asynchronously
10033
- :param str session_id: (required)
10034
- :param ExecuteInteractiveCommandOptions execute_interactive_command_options: (required)
10792
+ :param AggregatedUsageQuery aggregated_usage_query: (required)
10793
+ :param str paging_token:
10794
+ :param int count:
10035
10795
  :param _return_http_data_only: response data without head status code
10036
10796
  and headers
10037
10797
  :param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -10041,7 +10801,7 @@ class DefaultApi(object):
10041
10801
  number provided, it will be total request
10042
10802
  timeout. It can also be a pair (tuple) of
10043
10803
  (connection, read) timeouts.
10044
- :return: tuple(ExecutecommandresponseResponse, status_code(int), headers(HTTPHeaderDict))
10804
+ :return: tuple(UsagebyprojectListResponse, status_code(int), headers(HTTPHeaderDict))
10045
10805
  If the method is called asynchronously,
10046
10806
  returns the request thread.
10047
10807
  """
@@ -10049,8 +10809,9 @@ class DefaultApi(object):
10049
10809
  local_var_params = locals()
10050
10810
 
10051
10811
  all_params = [
10052
- 'session_id',
10053
- 'execute_interactive_command_options'
10812
+ 'aggregated_usage_query',
10813
+ 'paging_token',
10814
+ 'count'
10054
10815
  ]
10055
10816
  all_params.extend(
10056
10817
  [
@@ -10065,26 +10826,28 @@ class DefaultApi(object):
10065
10826
  if key not in all_params:
10066
10827
  raise ApiTypeError(
10067
10828
  "Got an unexpected keyword argument '%s'"
10068
- " to method execute_interactive_command_api_v2_sessions_session_id_execute_interactive_command_post" % key
10829
+ " to method fetch_usage_group_by_project_api_v2_aggregated_instance_usage_project_post" % key
10069
10830
  )
10070
10831
  local_var_params[key] = val
10071
10832
  del local_var_params['kwargs']
10072
- # verify the required parameter 'session_id' is set
10073
- if self.api_client.client_side_validation and ('session_id' not in local_var_params or # noqa: E501
10074
- local_var_params['session_id'] is None): # noqa: E501
10075
- raise ApiValueError("Missing the required parameter `session_id` when calling `execute_interactive_command_api_v2_sessions_session_id_execute_interactive_command_post`") # noqa: E501
10076
- # verify the required parameter 'execute_interactive_command_options' is set
10077
- if self.api_client.client_side_validation and ('execute_interactive_command_options' not in local_var_params or # noqa: E501
10078
- local_var_params['execute_interactive_command_options'] is None): # noqa: E501
10079
- raise ApiValueError("Missing the required parameter `execute_interactive_command_options` when calling `execute_interactive_command_api_v2_sessions_session_id_execute_interactive_command_post`") # noqa: E501
10833
+ # verify the required parameter 'aggregated_usage_query' is set
10834
+ if self.api_client.client_side_validation and ('aggregated_usage_query' not in local_var_params or # noqa: E501
10835
+ local_var_params['aggregated_usage_query'] is None): # noqa: E501
10836
+ raise ApiValueError("Missing the required parameter `aggregated_usage_query` when calling `fetch_usage_group_by_project_api_v2_aggregated_instance_usage_project_post`") # noqa: E501
10080
10837
 
10838
+ if self.api_client.client_side_validation and 'count' in local_var_params and local_var_params['count'] > 50: # noqa: E501
10839
+ raise ApiValueError("Invalid value for parameter `count` when calling `fetch_usage_group_by_project_api_v2_aggregated_instance_usage_project_post`, must be a value less than or equal to `50`") # noqa: E501
10840
+ if self.api_client.client_side_validation and 'count' in local_var_params and local_var_params['count'] < 0: # noqa: E501
10841
+ raise ApiValueError("Invalid value for parameter `count` when calling `fetch_usage_group_by_project_api_v2_aggregated_instance_usage_project_post`, must be a value greater than or equal to `0`") # noqa: E501
10081
10842
  collection_formats = {}
10082
10843
 
10083
10844
  path_params = {}
10084
- if 'session_id' in local_var_params:
10085
- path_params['session_id'] = local_var_params['session_id'] # noqa: E501
10086
10845
 
10087
10846
  query_params = []
10847
+ if 'paging_token' in local_var_params and local_var_params['paging_token'] is not None: # noqa: E501
10848
+ query_params.append(('paging_token', local_var_params['paging_token'])) # noqa: E501
10849
+ if 'count' in local_var_params and local_var_params['count'] is not None: # noqa: E501
10850
+ query_params.append(('count', local_var_params['count'])) # noqa: E501
10088
10851
 
10089
10852
  header_params = {}
10090
10853
 
@@ -10092,8 +10855,8 @@ class DefaultApi(object):
10092
10855
  local_var_files = {}
10093
10856
 
10094
10857
  body_params = None
10095
- if 'execute_interactive_command_options' in local_var_params:
10096
- body_params = local_var_params['execute_interactive_command_options']
10858
+ if 'aggregated_usage_query' in local_var_params:
10859
+ body_params = local_var_params['aggregated_usage_query']
10097
10860
  # HTTP header `Accept`
10098
10861
  header_params['Accept'] = self.api_client.select_header_accept(
10099
10862
  ['application/json']) # noqa: E501
@@ -10106,14 +10869,14 @@ class DefaultApi(object):
10106
10869
  auth_settings = [] # noqa: E501
10107
10870
 
10108
10871
  return self.api_client.call_api(
10109
- '/api/v2/sessions/{session_id}/execute_interactive_command', 'POST',
10872
+ '/api/v2/aggregated_instance_usage/project', 'POST',
10110
10873
  path_params,
10111
10874
  query_params,
10112
10875
  header_params,
10113
10876
  body=body_params,
10114
10877
  post_params=form_params,
10115
10878
  files=local_var_files,
10116
- response_type='ExecutecommandresponseResponse', # noqa: E501
10879
+ response_type='UsagebyprojectListResponse', # noqa: E501
10117
10880
  auth_settings=auth_settings,
10118
10881
  async_req=local_var_params.get('async_req'),
10119
10882
  _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
@@ -10121,18 +10884,18 @@ class DefaultApi(object):
10121
10884
  _request_timeout=local_var_params.get('_request_timeout'),
10122
10885
  collection_formats=collection_formats)
10123
10886
 
10124
- def execute_shell_command_api_v2_sessions_session_id_execute_shell_command_post(self, session_id, execute_shell_command_options, **kwargs): # noqa: E501
10125
- """Execute Shell Command # noqa: E501
10887
+ def fetch_usage_group_by_user_api_v2_aggregated_instance_usage_user_post(self, aggregated_usage_query, **kwargs): # noqa: E501
10888
+ """Fetch Usage Group By User # noqa: E501
10126
10889
 
10127
- DEPRECATED: This API is no deprecated and will not be supported in Anyscale 2.0 # noqa: E501
10128
10890
  This method makes a synchronous HTTP request by default. To make an
10129
10891
  asynchronous HTTP request, please pass async_req=True
10130
- >>> thread = api.execute_shell_command_api_v2_sessions_session_id_execute_shell_command_post(session_id, execute_shell_command_options, async_req=True)
10892
+ >>> thread = api.fetch_usage_group_by_user_api_v2_aggregated_instance_usage_user_post(aggregated_usage_query, async_req=True)
10131
10893
  >>> result = thread.get()
10132
10894
 
10133
10895
  :param async_req bool: execute request asynchronously
10134
- :param str session_id: (required)
10135
- :param ExecuteShellCommandOptions execute_shell_command_options: (required)
10896
+ :param AggregatedUsageQuery aggregated_usage_query: (required)
10897
+ :param str paging_token:
10898
+ :param int count:
10136
10899
  :param _preload_content: if False, the urllib3.HTTPResponse object will
10137
10900
  be returned without reading/decoding response
10138
10901
  data. Default is True.
@@ -10140,25 +10903,25 @@ class DefaultApi(object):
10140
10903
  number provided, it will be total request
10141
10904
  timeout. It can also be a pair (tuple) of
10142
10905
  (connection, read) timeouts.
10143
- :return: SessioncommandidResponse
10906
+ :return: UsagebyuserListResponse
10144
10907
  If the method is called asynchronously,
10145
10908
  returns the request thread.
10146
10909
  """
10147
10910
  kwargs['_return_http_data_only'] = True
10148
- return self.execute_shell_command_api_v2_sessions_session_id_execute_shell_command_post_with_http_info(session_id, execute_shell_command_options, **kwargs) # noqa: E501
10911
+ return self.fetch_usage_group_by_user_api_v2_aggregated_instance_usage_user_post_with_http_info(aggregated_usage_query, **kwargs) # noqa: E501
10149
10912
 
10150
- def execute_shell_command_api_v2_sessions_session_id_execute_shell_command_post_with_http_info(self, session_id, execute_shell_command_options, **kwargs): # noqa: E501
10151
- """Execute Shell Command # noqa: E501
10913
+ def fetch_usage_group_by_user_api_v2_aggregated_instance_usage_user_post_with_http_info(self, aggregated_usage_query, **kwargs): # noqa: E501
10914
+ """Fetch Usage Group By User # noqa: E501
10152
10915
 
10153
- DEPRECATED: This API is no deprecated and will not be supported in Anyscale 2.0 # noqa: E501
10154
10916
  This method makes a synchronous HTTP request by default. To make an
10155
10917
  asynchronous HTTP request, please pass async_req=True
10156
- >>> thread = api.execute_shell_command_api_v2_sessions_session_id_execute_shell_command_post_with_http_info(session_id, execute_shell_command_options, async_req=True)
10918
+ >>> thread = api.fetch_usage_group_by_user_api_v2_aggregated_instance_usage_user_post_with_http_info(aggregated_usage_query, async_req=True)
10157
10919
  >>> result = thread.get()
10158
10920
 
10159
10921
  :param async_req bool: execute request asynchronously
10160
- :param str session_id: (required)
10161
- :param ExecuteShellCommandOptions execute_shell_command_options: (required)
10922
+ :param AggregatedUsageQuery aggregated_usage_query: (required)
10923
+ :param str paging_token:
10924
+ :param int count:
10162
10925
  :param _return_http_data_only: response data without head status code
10163
10926
  and headers
10164
10927
  :param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -10168,7 +10931,7 @@ class DefaultApi(object):
10168
10931
  number provided, it will be total request
10169
10932
  timeout. It can also be a pair (tuple) of
10170
10933
  (connection, read) timeouts.
10171
- :return: tuple(SessioncommandidResponse, status_code(int), headers(HTTPHeaderDict))
10934
+ :return: tuple(UsagebyuserListResponse, status_code(int), headers(HTTPHeaderDict))
10172
10935
  If the method is called asynchronously,
10173
10936
  returns the request thread.
10174
10937
  """
@@ -10176,8 +10939,9 @@ class DefaultApi(object):
10176
10939
  local_var_params = locals()
10177
10940
 
10178
10941
  all_params = [
10179
- 'session_id',
10180
- 'execute_shell_command_options'
10942
+ 'aggregated_usage_query',
10943
+ 'paging_token',
10944
+ 'count'
10181
10945
  ]
10182
10946
  all_params.extend(
10183
10947
  [
@@ -10192,26 +10956,28 @@ class DefaultApi(object):
10192
10956
  if key not in all_params:
10193
10957
  raise ApiTypeError(
10194
10958
  "Got an unexpected keyword argument '%s'"
10195
- " to method execute_shell_command_api_v2_sessions_session_id_execute_shell_command_post" % key
10959
+ " to method fetch_usage_group_by_user_api_v2_aggregated_instance_usage_user_post" % key
10196
10960
  )
10197
10961
  local_var_params[key] = val
10198
10962
  del local_var_params['kwargs']
10199
- # verify the required parameter 'session_id' is set
10200
- if self.api_client.client_side_validation and ('session_id' not in local_var_params or # noqa: E501
10201
- local_var_params['session_id'] is None): # noqa: E501
10202
- raise ApiValueError("Missing the required parameter `session_id` when calling `execute_shell_command_api_v2_sessions_session_id_execute_shell_command_post`") # noqa: E501
10203
- # verify the required parameter 'execute_shell_command_options' is set
10204
- if self.api_client.client_side_validation and ('execute_shell_command_options' not in local_var_params or # noqa: E501
10205
- local_var_params['execute_shell_command_options'] is None): # noqa: E501
10206
- raise ApiValueError("Missing the required parameter `execute_shell_command_options` when calling `execute_shell_command_api_v2_sessions_session_id_execute_shell_command_post`") # noqa: E501
10963
+ # verify the required parameter 'aggregated_usage_query' is set
10964
+ if self.api_client.client_side_validation and ('aggregated_usage_query' not in local_var_params or # noqa: E501
10965
+ local_var_params['aggregated_usage_query'] is None): # noqa: E501
10966
+ raise ApiValueError("Missing the required parameter `aggregated_usage_query` when calling `fetch_usage_group_by_user_api_v2_aggregated_instance_usage_user_post`") # noqa: E501
10207
10967
 
10968
+ if self.api_client.client_side_validation and 'count' in local_var_params and local_var_params['count'] > 50: # noqa: E501
10969
+ raise ApiValueError("Invalid value for parameter `count` when calling `fetch_usage_group_by_user_api_v2_aggregated_instance_usage_user_post`, must be a value less than or equal to `50`") # noqa: E501
10970
+ if self.api_client.client_side_validation and 'count' in local_var_params and local_var_params['count'] < 0: # noqa: E501
10971
+ raise ApiValueError("Invalid value for parameter `count` when calling `fetch_usage_group_by_user_api_v2_aggregated_instance_usage_user_post`, must be a value greater than or equal to `0`") # noqa: E501
10208
10972
  collection_formats = {}
10209
10973
 
10210
10974
  path_params = {}
10211
- if 'session_id' in local_var_params:
10212
- path_params['session_id'] = local_var_params['session_id'] # noqa: E501
10213
10975
 
10214
10976
  query_params = []
10977
+ if 'paging_token' in local_var_params and local_var_params['paging_token'] is not None: # noqa: E501
10978
+ query_params.append(('paging_token', local_var_params['paging_token'])) # noqa: E501
10979
+ if 'count' in local_var_params and local_var_params['count'] is not None: # noqa: E501
10980
+ query_params.append(('count', local_var_params['count'])) # noqa: E501
10215
10981
 
10216
10982
  header_params = {}
10217
10983
 
@@ -10219,8 +10985,8 @@ class DefaultApi(object):
10219
10985
  local_var_files = {}
10220
10986
 
10221
10987
  body_params = None
10222
- if 'execute_shell_command_options' in local_var_params:
10223
- body_params = local_var_params['execute_shell_command_options']
10988
+ if 'aggregated_usage_query' in local_var_params:
10989
+ body_params = local_var_params['aggregated_usage_query']
10224
10990
  # HTTP header `Accept`
10225
10991
  header_params['Accept'] = self.api_client.select_header_accept(
10226
10992
  ['application/json']) # noqa: E501
@@ -10233,14 +10999,14 @@ class DefaultApi(object):
10233
10999
  auth_settings = [] # noqa: E501
10234
11000
 
10235
11001
  return self.api_client.call_api(
10236
- '/api/v2/sessions/{session_id}/execute_shell_command', 'POST',
11002
+ '/api/v2/aggregated_instance_usage/user', 'POST',
10237
11003
  path_params,
10238
11004
  query_params,
10239
11005
  header_params,
10240
11006
  body=body_params,
10241
11007
  post_params=form_params,
10242
11008
  files=local_var_files,
10243
- response_type='SessioncommandidResponse', # noqa: E501
11009
+ response_type='UsagebyuserListResponse', # noqa: E501
10244
11010
  auth_settings=auth_settings,
10245
11011
  async_req=local_var_params.get('async_req'),
10246
11012
  _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
@@ -23657,6 +24423,127 @@ class DefaultApi(object):
23657
24423
  _request_timeout=local_var_params.get('_request_timeout'),
23658
24424
  collection_formats=collection_formats)
23659
24425
 
24426
+ def get_total_usage_api_v2_aggregated_instance_usage_get(self, start_date, end_date, **kwargs): # noqa: E501
24427
+ """Get Total Usage # noqa: E501
24428
+
24429
+ This method makes a synchronous HTTP request by default. To make an
24430
+ asynchronous HTTP request, please pass async_req=True
24431
+ >>> thread = api.get_total_usage_api_v2_aggregated_instance_usage_get(start_date, end_date, async_req=True)
24432
+ >>> result = thread.get()
24433
+
24434
+ :param async_req bool: execute request asynchronously
24435
+ :param date start_date: (required)
24436
+ :param date end_date: (required)
24437
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
24438
+ be returned without reading/decoding response
24439
+ data. Default is True.
24440
+ :param _request_timeout: timeout setting for this request. If one
24441
+ number provided, it will be total request
24442
+ timeout. It can also be a pair (tuple) of
24443
+ (connection, read) timeouts.
24444
+ :return: AggregatedusageResponse
24445
+ If the method is called asynchronously,
24446
+ returns the request thread.
24447
+ """
24448
+ kwargs['_return_http_data_only'] = True
24449
+ return self.get_total_usage_api_v2_aggregated_instance_usage_get_with_http_info(start_date, end_date, **kwargs) # noqa: E501
24450
+
24451
+ def get_total_usage_api_v2_aggregated_instance_usage_get_with_http_info(self, start_date, end_date, **kwargs): # noqa: E501
24452
+ """Get Total Usage # noqa: E501
24453
+
24454
+ This method makes a synchronous HTTP request by default. To make an
24455
+ asynchronous HTTP request, please pass async_req=True
24456
+ >>> thread = api.get_total_usage_api_v2_aggregated_instance_usage_get_with_http_info(start_date, end_date, async_req=True)
24457
+ >>> result = thread.get()
24458
+
24459
+ :param async_req bool: execute request asynchronously
24460
+ :param date start_date: (required)
24461
+ :param date end_date: (required)
24462
+ :param _return_http_data_only: response data without head status code
24463
+ and headers
24464
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
24465
+ be returned without reading/decoding response
24466
+ data. Default is True.
24467
+ :param _request_timeout: timeout setting for this request. If one
24468
+ number provided, it will be total request
24469
+ timeout. It can also be a pair (tuple) of
24470
+ (connection, read) timeouts.
24471
+ :return: tuple(AggregatedusageResponse, status_code(int), headers(HTTPHeaderDict))
24472
+ If the method is called asynchronously,
24473
+ returns the request thread.
24474
+ """
24475
+
24476
+ local_var_params = locals()
24477
+
24478
+ all_params = [
24479
+ 'start_date',
24480
+ 'end_date'
24481
+ ]
24482
+ all_params.extend(
24483
+ [
24484
+ 'async_req',
24485
+ '_return_http_data_only',
24486
+ '_preload_content',
24487
+ '_request_timeout'
24488
+ ]
24489
+ )
24490
+
24491
+ for key, val in six.iteritems(local_var_params['kwargs']):
24492
+ if key not in all_params:
24493
+ raise ApiTypeError(
24494
+ "Got an unexpected keyword argument '%s'"
24495
+ " to method get_total_usage_api_v2_aggregated_instance_usage_get" % key
24496
+ )
24497
+ local_var_params[key] = val
24498
+ del local_var_params['kwargs']
24499
+ # verify the required parameter 'start_date' is set
24500
+ if self.api_client.client_side_validation and ('start_date' not in local_var_params or # noqa: E501
24501
+ local_var_params['start_date'] is None): # noqa: E501
24502
+ raise ApiValueError("Missing the required parameter `start_date` when calling `get_total_usage_api_v2_aggregated_instance_usage_get`") # noqa: E501
24503
+ # verify the required parameter 'end_date' is set
24504
+ if self.api_client.client_side_validation and ('end_date' not in local_var_params or # noqa: E501
24505
+ local_var_params['end_date'] is None): # noqa: E501
24506
+ raise ApiValueError("Missing the required parameter `end_date` when calling `get_total_usage_api_v2_aggregated_instance_usage_get`") # noqa: E501
24507
+
24508
+ collection_formats = {}
24509
+
24510
+ path_params = {}
24511
+
24512
+ query_params = []
24513
+ if 'start_date' in local_var_params and local_var_params['start_date'] is not None: # noqa: E501
24514
+ query_params.append(('start_date', local_var_params['start_date'])) # noqa: E501
24515
+ if 'end_date' in local_var_params and local_var_params['end_date'] is not None: # noqa: E501
24516
+ query_params.append(('end_date', local_var_params['end_date'])) # noqa: E501
24517
+
24518
+ header_params = {}
24519
+
24520
+ form_params = []
24521
+ local_var_files = {}
24522
+
24523
+ body_params = None
24524
+ # HTTP header `Accept`
24525
+ header_params['Accept'] = self.api_client.select_header_accept(
24526
+ ['application/json']) # noqa: E501
24527
+
24528
+ # Authentication setting
24529
+ auth_settings = [] # noqa: E501
24530
+
24531
+ return self.api_client.call_api(
24532
+ '/api/v2/aggregated_instance_usage/', 'GET',
24533
+ path_params,
24534
+ query_params,
24535
+ header_params,
24536
+ body=body_params,
24537
+ post_params=form_params,
24538
+ files=local_var_files,
24539
+ response_type='AggregatedusageResponse', # noqa: E501
24540
+ auth_settings=auth_settings,
24541
+ async_req=local_var_params.get('async_req'),
24542
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
24543
+ _preload_content=local_var_params.get('_preload_content', True),
24544
+ _request_timeout=local_var_params.get('_request_timeout'),
24545
+ collection_formats=collection_formats)
24546
+
23660
24547
  def get_user_info_api_v2_userinfo_get(self, **kwargs): # noqa: E501
23661
24548
  """Get User Info # noqa: E501
23662
24549