anyscale 0.25.1__py3-none-any.whl → 0.25.3__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 (50) hide show
  1. anyscale/__init__.py +10 -0
  2. anyscale/_private/anyscale_client/anyscale_client.py +40 -9
  3. anyscale/_private/anyscale_client/common.py +37 -3
  4. anyscale/_private/anyscale_client/fake_anyscale_client.py +80 -6
  5. anyscale/_private/docgen/__main__.py +9 -2
  6. anyscale/_private/docgen/api.md +13 -0
  7. anyscale/_private/docgen/models.md +3 -3
  8. anyscale/_private/workload/workload_config.py +20 -6
  9. anyscale/client/README.md +6 -0
  10. anyscale/client/openapi_client/__init__.py +3 -0
  11. anyscale/client/openapi_client/api/default_api.py +391 -2
  12. anyscale/client/openapi_client/models/__init__.py +3 -0
  13. anyscale/client/openapi_client/models/baseimagesenum.py +43 -1
  14. anyscale/client/openapi_client/models/cluster_event_source.py +105 -0
  15. anyscale/client/openapi_client/models/clusterevent_list_response.py +147 -0
  16. anyscale/client/openapi_client/models/jobs_sort_field.py +1 -2
  17. anyscale/client/openapi_client/models/sessions_sort_field.py +1 -2
  18. anyscale/client/openapi_client/models/supportedbaseimagesenum.py +43 -1
  19. anyscale/client/openapi_client/models/update_cloud_collaborator.py +121 -0
  20. anyscale/commands/cloud_commands.py +49 -12
  21. anyscale/commands/command_examples.py +4 -0
  22. anyscale/commands/service_account_commands.py +65 -8
  23. anyscale/commands/service_commands.py +60 -0
  24. anyscale/controllers/cloud_controller.py +58 -25
  25. anyscale/controllers/cluster_controller.py +1 -9
  26. anyscale/controllers/job_controller.py +0 -3
  27. anyscale/resource_quota/_private/resource_quota_sdk.py +15 -6
  28. anyscale/sdk/anyscale_client/api/default_api.py +119 -0
  29. anyscale/sdk/anyscale_client/models/baseimagesenum.py +43 -1
  30. anyscale/sdk/anyscale_client/models/jobs_sort_field.py +1 -2
  31. anyscale/sdk/anyscale_client/models/supportedbaseimagesenum.py +43 -1
  32. anyscale/service/__init__.py +21 -0
  33. anyscale/service/_private/service_sdk.py +13 -0
  34. anyscale/service/commands.py +35 -0
  35. anyscale/service_account/__init__.py +88 -0
  36. anyscale/service_account/_private/service_account_sdk.py +101 -0
  37. anyscale/service_account/commands.py +147 -0
  38. anyscale/service_account/models.py +66 -0
  39. anyscale/shared_anyscale_utils/latest_ray_version.py +1 -1
  40. anyscale/shared_anyscale_utils/utils/id_gen.py +2 -0
  41. anyscale/util.py +8 -0
  42. anyscale/version.py +1 -1
  43. {anyscale-0.25.1.dist-info → anyscale-0.25.3.dist-info}/METADATA +1 -1
  44. {anyscale-0.25.1.dist-info → anyscale-0.25.3.dist-info}/RECORD +49 -43
  45. anyscale/controllers/service_account_controller.py +0 -168
  46. {anyscale-0.25.1.dist-info → anyscale-0.25.3.dist-info}/LICENSE +0 -0
  47. {anyscale-0.25.1.dist-info → anyscale-0.25.3.dist-info}/NOTICE +0 -0
  48. {anyscale-0.25.1.dist-info → anyscale-0.25.3.dist-info}/WHEEL +0 -0
  49. {anyscale-0.25.1.dist-info → anyscale-0.25.3.dist-info}/entry_points.txt +0 -0
  50. {anyscale-0.25.1.dist-info → anyscale-0.25.3.dist-info}/top_level.txt +0 -0
@@ -117,13 +117,27 @@ class WorkloadConfig(ModelBase):
117
117
  )
118
118
 
119
119
  def _validate_env_vars(self, env_vars: Optional[Dict[str, str]]):
120
- if env_vars is not None and (
121
- not isinstance(env_vars, dict)
122
- or not all(
123
- isinstance(k, str) and isinstance(v, str) for k, v in env_vars.items()
120
+ if env_vars is None:
121
+ return
122
+
123
+ if not isinstance(env_vars, dict):
124
+ raise TypeError(
125
+ "'env_vars' must be a Dict[str, str], "
126
+ f"but got type {type(env_vars)}."
124
127
  )
125
- ):
126
- raise TypeError("'env_vars' must be a Dict[str, str].")
128
+
129
+ for k, v in env_vars.items():
130
+ if not isinstance(k, str):
131
+ raise TypeError(
132
+ "'env_vars' must be a Dict[str, str], "
133
+ f"but got key of type {type(k)}: {k}."
134
+ )
135
+
136
+ if not isinstance(v, str):
137
+ raise TypeError(
138
+ "'env_vars' must be a Dict[str, str], "
139
+ f"but got value of type {type(v)} for key '{k}': {v}."
140
+ )
127
141
 
128
142
  py_modules: Optional[List[str]] = field(
129
143
  default=None,
anyscale/client/README.md CHANGED
@@ -78,6 +78,7 @@ Class | Method | HTTP request | Description
78
78
  *DefaultApi* | [**add_to_waitlist_api_v2_aioa_cloud_waitlist_post**](docs/DefaultApi.md#add_to_waitlist_api_v2_aioa_cloud_waitlist_post) | **POST** /api/v2/aioa_cloud_waitlist/ | Add To Waitlist
79
79
  *DefaultApi* | [**admin_batch_create_users_api_v2_users_admin_batch_create_post**](docs/DefaultApi.md#admin_batch_create_users_api_v2_users_admin_batch_create_post) | **POST** /api/v2/users/admin_batch_create | Admin Batch Create Users
80
80
  *DefaultApi* | [**admission_api_v2_kubernetes_manager_admission_cloud_resource_id_post**](docs/DefaultApi.md#admission_api_v2_kubernetes_manager_admission_cloud_resource_id_post) | **POST** /api/v2/kubernetes_manager/admission/{cloud_resource_id} | Admission
81
+ *DefaultApi* | [**alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put**](docs/DefaultApi.md#alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put) | **PUT** /api/v2/clouds/{cloud_id}/collaborators/users/{identity_id} | Alter Cloud Collaborator
81
82
  *DefaultApi* | [**alter_organization_collaborator_api_v2_organization_collaborators_identity_id_put**](docs/DefaultApi.md#alter_organization_collaborator_api_v2_organization_collaborators_identity_id_put) | **PUT** /api/v2/organization_collaborators/{identity_id} | Alter Organization Collaborator
82
83
  *DefaultApi* | [**alter_project_collaborator_api_v2_projects_project_id_collaborators_role_or_identity_id_put**](docs/DefaultApi.md#alter_project_collaborator_api_v2_projects_project_id_collaborators_role_or_identity_id_put) | **PUT** /api/v2/projects/{project_id}/collaborators/{role_or_identity_id} | Alter Project Collaborator
83
84
  *DefaultApi* | [**apply_service_api_v2_services_v2_apply_put**](docs/DefaultApi.md#apply_service_api_v2_services_v2_apply_put) | **PUT** /api/v2/services-v2/apply | Apply Service
@@ -86,6 +87,7 @@ Class | Method | HTTP request | Description
86
87
  *DefaultApi* | [**archive_cluster_environment_api_v2_application_templates_application_template_id_archive_post**](docs/DefaultApi.md#archive_cluster_environment_api_v2_application_templates_application_template_id_archive_post) | **POST** /api/v2/application_templates/{application_template_id}/archive | Archive Cluster Environment
87
88
  *DefaultApi* | [**archive_compute_template_api_v2_compute_templates_compute_template_id_archive_post**](docs/DefaultApi.md#archive_compute_template_api_v2_compute_templates_compute_template_id_archive_post) | **POST** /api/v2/compute_templates/{compute_template_id}/archive | Archive Compute Template
88
89
  *DefaultApi* | [**archive_job_api_v2_decorated_ha_jobs_production_job_id_archive_post**](docs/DefaultApi.md#archive_job_api_v2_decorated_ha_jobs_production_job_id_archive_post) | **POST** /api/v2/decorated_ha_jobs/{production_job_id}/archive | Archive Job
90
+ *DefaultApi* | [**archive_service_api_v2_services_v2_service_id_archive_post**](docs/DefaultApi.md#archive_service_api_v2_services_v2_service_id_archive_post) | **POST** /api/v2/services-v2/{service_id}/archive | Archive Service
89
91
  *DefaultApi* | [**attach_machine_pool_to_cloud_api_v2_machine_pools_attach_post**](docs/DefaultApi.md#attach_machine_pool_to_cloud_api_v2_machine_pools_attach_post) | **POST** /api/v2/machine_pools/attach | Attach Machine Pool To Cloud
90
92
  *DefaultApi* | [**aws_marketplace_registration_api_v2_organization_billing_aws_marketplace_registration_post**](docs/DefaultApi.md#aws_marketplace_registration_api_v2_organization_billing_aws_marketplace_registration_post) | **POST** /api/v2/organization_billing/aws_marketplace_registration | Aws Marketplace Registration
91
93
  *DefaultApi* | [**ban_organization_api_v2_organizations_organization_id_ban_put**](docs/DefaultApi.md#ban_organization_api_v2_organizations_organization_id_ban_put) | **PUT** /api/v2/organizations/{organization_id}/ban | Ban Organization
@@ -194,6 +196,7 @@ Class | Method | HTTP request | Description
194
196
  *DefaultApi* | [**get_cloud_project_collaborator_api_v2_projects_project_id_collaborators_clouds_get**](docs/DefaultApi.md#get_cloud_project_collaborator_api_v2_projects_project_id_collaborators_clouds_get) | **GET** /api/v2/projects/{project_id}/collaborators/clouds | Get Cloud Project Collaborator
195
197
  *DefaultApi* | [**get_cloud_with_cloud_resource_api_v2_clouds_with_cloud_resource_gcp_router_cloud_id_get**](docs/DefaultApi.md#get_cloud_with_cloud_resource_api_v2_clouds_with_cloud_resource_gcp_router_cloud_id_get) | **GET** /api/v2/clouds_with_cloud_resource_gcp_router/{cloud_id} | Get Cloud With Cloud Resource
196
198
  *DefaultApi* | [**get_cloud_with_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_get**](docs/DefaultApi.md#get_cloud_with_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_get) | **GET** /api/v2/clouds_with_cloud_resource_router/{cloud_id} | Get Cloud With Cloud Resource
199
+ *DefaultApi* | [**get_cluster_events_api_v2_sessions_session_id_cluster_events_get**](docs/DefaultApi.md#get_cluster_events_api_v2_sessions_session_id_cluster_events_get) | **GET** /api/v2/sessions/{session_id}/cluster_events | Get Cluster Events
197
200
  *DefaultApi* | [**get_cluster_product_autoscaler_flag_api_v2_logs_cluster_product_autoscaler_flag_session_id_get**](docs/DefaultApi.md#get_cluster_product_autoscaler_flag_api_v2_logs_cluster_product_autoscaler_flag_session_id_get) | **GET** /api/v2/logs/cluster_product_autoscaler_flag/{session_id} | Get Cluster Product Autoscaler Flag
198
201
  *DefaultApi* | [**get_compute_template_api_v2_compute_templates_template_id_get**](docs/DefaultApi.md#get_compute_template_api_v2_compute_templates_template_id_get) | **GET** /api/v2/compute_templates/{template_id} | Get Compute Template
199
202
  *DefaultApi* | [**get_cron_job_api_v2_experimental_cron_jobs_cron_job_id_get**](docs/DefaultApi.md#get_cron_job_api_v2_experimental_cron_jobs_cron_job_id_get) | **GET** /api/v2/experimental_cron_jobs/{cron_job_id} | Get Cron Job
@@ -558,6 +561,7 @@ Class | Method | HTTP request | Description
558
561
  - [ClusterConfigWithSessionIdleTimeout](docs/ClusterConfigWithSessionIdleTimeout.md)
559
562
  - [ClusterEnvironmentsQuery](docs/ClusterEnvironmentsQuery.md)
560
563
  - [ClusterEvent](docs/ClusterEvent.md)
564
+ - [ClusterEventSource](docs/ClusterEventSource.md)
561
565
  - [ClusterEventsOutput](docs/ClusterEventsOutput.md)
562
566
  - [ClusterFeatures](docs/ClusterFeatures.md)
563
567
  - [ClusterManagementStackVersions](docs/ClusterManagementStackVersions.md)
@@ -568,6 +572,7 @@ Class | Method | HTTP request | Description
568
572
  - [ClusterauthresponseResponse](docs/ClusterauthresponseResponse.md)
569
573
  - [ClusterconfigResponse](docs/ClusterconfigResponse.md)
570
574
  - [ClusterconfigwithsessionidletimeoutResponse](docs/ClusterconfigwithsessionidletimeoutResponse.md)
575
+ - [ClustereventListResponse](docs/ClustereventListResponse.md)
571
576
  - [ClustereventsoutputResponse](docs/ClustereventsoutputResponse.md)
572
577
  - [ClusterfeaturesResponse](docs/ClusterfeaturesResponse.md)
573
578
  - [ComputeNodeType](docs/ComputeNodeType.md)
@@ -1011,6 +1016,7 @@ Class | Method | HTTP request | Description
1011
1016
  - [UnifiedJobSortField](docs/UnifiedJobSortField.md)
1012
1017
  - [UnifiedJobStatus](docs/UnifiedJobStatus.md)
1013
1018
  - [UnifiedJobType](docs/UnifiedJobType.md)
1019
+ - [UpdateCloudCollaborator](docs/UpdateCloudCollaborator.md)
1014
1020
  - [UpdateCloudWithCloudResource](docs/UpdateCloudWithCloudResource.md)
1015
1021
  - [UpdateCloudWithCloudResourceGCP](docs/UpdateCloudWithCloudResourceGCP.md)
1016
1022
  - [UpdateClusterDns](docs/UpdateClusterDns.md)
@@ -160,6 +160,7 @@ from openapi_client.models.cluster_config import ClusterConfig
160
160
  from openapi_client.models.cluster_config_with_session_idle_timeout import ClusterConfigWithSessionIdleTimeout
161
161
  from openapi_client.models.cluster_environments_query import ClusterEnvironmentsQuery
162
162
  from openapi_client.models.cluster_event import ClusterEvent
163
+ from openapi_client.models.cluster_event_source import ClusterEventSource
163
164
  from openapi_client.models.cluster_events_output import ClusterEventsOutput
164
165
  from openapi_client.models.cluster_features import ClusterFeatures
165
166
  from openapi_client.models.cluster_management_stack_versions import ClusterManagementStackVersions
@@ -170,6 +171,7 @@ from openapi_client.models.cluster_status_details import ClusterStatusDetails
170
171
  from openapi_client.models.clusterauthresponse_response import ClusterauthresponseResponse
171
172
  from openapi_client.models.clusterconfig_response import ClusterconfigResponse
172
173
  from openapi_client.models.clusterconfigwithsessionidletimeout_response import ClusterconfigwithsessionidletimeoutResponse
174
+ from openapi_client.models.clusterevent_list_response import ClustereventListResponse
173
175
  from openapi_client.models.clustereventsoutput_response import ClustereventsoutputResponse
174
176
  from openapi_client.models.clusterfeatures_response import ClusterfeaturesResponse
175
177
  from openapi_client.models.compute_node_type import ComputeNodeType
@@ -613,6 +615,7 @@ from openapi_client.models.ux_instance import UXInstance
613
615
  from openapi_client.models.unified_job_sort_field import UnifiedJobSortField
614
616
  from openapi_client.models.unified_job_status import UnifiedJobStatus
615
617
  from openapi_client.models.unified_job_type import UnifiedJobType
618
+ from openapi_client.models.update_cloud_collaborator import UpdateCloudCollaborator
616
619
  from openapi_client.models.update_cloud_with_cloud_resource import UpdateCloudWithCloudResource
617
620
  from openapi_client.models.update_cloud_with_cloud_resource_gcp import UpdateCloudWithCloudResourceGCP
618
621
  from openapi_client.models.update_cluster_dns import UpdateClusterDns
@@ -382,6 +382,140 @@ class DefaultApi(object):
382
382
  _request_timeout=local_var_params.get('_request_timeout'),
383
383
  collection_formats=collection_formats)
384
384
 
385
+ def alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put(self, cloud_id, identity_id, update_cloud_collaborator, **kwargs): # noqa: E501
386
+ """Alter Cloud Collaborator # noqa: E501
387
+
388
+ This method makes a synchronous HTTP request by default. To make an
389
+ asynchronous HTTP request, please pass async_req=True
390
+ >>> thread = api.alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put(cloud_id, identity_id, update_cloud_collaborator, async_req=True)
391
+ >>> result = thread.get()
392
+
393
+ :param async_req bool: execute request asynchronously
394
+ :param str cloud_id: (required)
395
+ :param str identity_id: (required)
396
+ :param UpdateCloudCollaborator update_cloud_collaborator: (required)
397
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
398
+ be returned without reading/decoding response
399
+ data. Default is True.
400
+ :param _request_timeout: timeout setting for this request. If one
401
+ number provided, it will be total request
402
+ timeout. It can also be a pair (tuple) of
403
+ (connection, read) timeouts.
404
+ :return: None
405
+ If the method is called asynchronously,
406
+ returns the request thread.
407
+ """
408
+ kwargs['_return_http_data_only'] = True
409
+ return self.alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put_with_http_info(cloud_id, identity_id, update_cloud_collaborator, **kwargs) # noqa: E501
410
+
411
+ def alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put_with_http_info(self, cloud_id, identity_id, update_cloud_collaborator, **kwargs): # noqa: E501
412
+ """Alter Cloud Collaborator # noqa: E501
413
+
414
+ This method makes a synchronous HTTP request by default. To make an
415
+ asynchronous HTTP request, please pass async_req=True
416
+ >>> thread = api.alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put_with_http_info(cloud_id, identity_id, update_cloud_collaborator, async_req=True)
417
+ >>> result = thread.get()
418
+
419
+ :param async_req bool: execute request asynchronously
420
+ :param str cloud_id: (required)
421
+ :param str identity_id: (required)
422
+ :param UpdateCloudCollaborator update_cloud_collaborator: (required)
423
+ :param _return_http_data_only: response data without head status code
424
+ and headers
425
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
426
+ be returned without reading/decoding response
427
+ data. Default is True.
428
+ :param _request_timeout: timeout setting for this request. If one
429
+ number provided, it will be total request
430
+ timeout. It can also be a pair (tuple) of
431
+ (connection, read) timeouts.
432
+ :return: None
433
+ If the method is called asynchronously,
434
+ returns the request thread.
435
+ """
436
+
437
+ local_var_params = locals()
438
+
439
+ all_params = [
440
+ 'cloud_id',
441
+ 'identity_id',
442
+ 'update_cloud_collaborator'
443
+ ]
444
+ all_params.extend(
445
+ [
446
+ 'async_req',
447
+ '_return_http_data_only',
448
+ '_preload_content',
449
+ '_request_timeout'
450
+ ]
451
+ )
452
+
453
+ for key, val in six.iteritems(local_var_params['kwargs']):
454
+ if key not in all_params:
455
+ raise ApiTypeError(
456
+ "Got an unexpected keyword argument '%s'"
457
+ " to method alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put" % key
458
+ )
459
+ local_var_params[key] = val
460
+ del local_var_params['kwargs']
461
+ # verify the required parameter 'cloud_id' is set
462
+ if self.api_client.client_side_validation and ('cloud_id' not in local_var_params or # noqa: E501
463
+ local_var_params['cloud_id'] is None): # noqa: E501
464
+ raise ApiValueError("Missing the required parameter `cloud_id` when calling `alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put`") # noqa: E501
465
+ # verify the required parameter 'identity_id' is set
466
+ if self.api_client.client_side_validation and ('identity_id' not in local_var_params or # noqa: E501
467
+ local_var_params['identity_id'] is None): # noqa: E501
468
+ raise ApiValueError("Missing the required parameter `identity_id` when calling `alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put`") # noqa: E501
469
+ # verify the required parameter 'update_cloud_collaborator' is set
470
+ if self.api_client.client_side_validation and ('update_cloud_collaborator' not in local_var_params or # noqa: E501
471
+ local_var_params['update_cloud_collaborator'] is None): # noqa: E501
472
+ raise ApiValueError("Missing the required parameter `update_cloud_collaborator` when calling `alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put`") # noqa: E501
473
+
474
+ collection_formats = {}
475
+
476
+ path_params = {}
477
+ if 'cloud_id' in local_var_params:
478
+ path_params['cloud_id'] = local_var_params['cloud_id'] # noqa: E501
479
+ if 'identity_id' in local_var_params:
480
+ path_params['identity_id'] = local_var_params['identity_id'] # noqa: E501
481
+
482
+ query_params = []
483
+
484
+ header_params = {}
485
+
486
+ form_params = []
487
+ local_var_files = {}
488
+
489
+ body_params = None
490
+ if 'update_cloud_collaborator' in local_var_params:
491
+ body_params = local_var_params['update_cloud_collaborator']
492
+ # HTTP header `Accept`
493
+ header_params['Accept'] = self.api_client.select_header_accept(
494
+ ['application/json']) # noqa: E501
495
+
496
+ # HTTP header `Content-Type`
497
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
498
+ ['application/json']) # noqa: E501
499
+
500
+ # Authentication setting
501
+ auth_settings = [] # noqa: E501
502
+
503
+ return self.api_client.call_api(
504
+ '/api/v2/clouds/{cloud_id}/collaborators/users/{identity_id}', 'PUT',
505
+ path_params,
506
+ query_params,
507
+ header_params,
508
+ body=body_params,
509
+ post_params=form_params,
510
+ files=local_var_files,
511
+ response_type=None, # noqa: E501
512
+ auth_settings=auth_settings,
513
+ async_req=local_var_params.get('async_req'),
514
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
515
+ _preload_content=local_var_params.get('_preload_content', True),
516
+ _request_timeout=local_var_params.get('_request_timeout'),
517
+ collection_formats=collection_formats)
518
+
385
519
  def alter_organization_collaborator_api_v2_organization_collaborators_identity_id_put(self, identity_id, update_organization_collaborator, **kwargs): # noqa: E501
386
520
  """Alter Organization Collaborator # noqa: E501
387
521
 
@@ -1331,6 +1465,120 @@ class DefaultApi(object):
1331
1465
  _request_timeout=local_var_params.get('_request_timeout'),
1332
1466
  collection_formats=collection_formats)
1333
1467
 
1468
+ def archive_service_api_v2_services_v2_service_id_archive_post(self, service_id, **kwargs): # noqa: E501
1469
+ """Archive Service # noqa: E501
1470
+
1471
+ Archives a Service. It is a no-op if already archived. # noqa: E501
1472
+ This method makes a synchronous HTTP request by default. To make an
1473
+ asynchronous HTTP request, please pass async_req=True
1474
+ >>> thread = api.archive_service_api_v2_services_v2_service_id_archive_post(service_id, async_req=True)
1475
+ >>> result = thread.get()
1476
+
1477
+ :param async_req bool: execute request asynchronously
1478
+ :param str service_id: (required)
1479
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
1480
+ be returned without reading/decoding response
1481
+ data. Default is True.
1482
+ :param _request_timeout: timeout setting for this request. If one
1483
+ number provided, it will be total request
1484
+ timeout. It can also be a pair (tuple) of
1485
+ (connection, read) timeouts.
1486
+ :return: None
1487
+ If the method is called asynchronously,
1488
+ returns the request thread.
1489
+ """
1490
+ kwargs['_return_http_data_only'] = True
1491
+ return self.archive_service_api_v2_services_v2_service_id_archive_post_with_http_info(service_id, **kwargs) # noqa: E501
1492
+
1493
+ def archive_service_api_v2_services_v2_service_id_archive_post_with_http_info(self, service_id, **kwargs): # noqa: E501
1494
+ """Archive Service # noqa: E501
1495
+
1496
+ Archives a Service. It is a no-op if already archived. # noqa: E501
1497
+ This method makes a synchronous HTTP request by default. To make an
1498
+ asynchronous HTTP request, please pass async_req=True
1499
+ >>> thread = api.archive_service_api_v2_services_v2_service_id_archive_post_with_http_info(service_id, async_req=True)
1500
+ >>> result = thread.get()
1501
+
1502
+ :param async_req bool: execute request asynchronously
1503
+ :param str service_id: (required)
1504
+ :param _return_http_data_only: response data without head status code
1505
+ and headers
1506
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
1507
+ be returned without reading/decoding response
1508
+ data. Default is True.
1509
+ :param _request_timeout: timeout setting for this request. If one
1510
+ number provided, it will be total request
1511
+ timeout. It can also be a pair (tuple) of
1512
+ (connection, read) timeouts.
1513
+ :return: None
1514
+ If the method is called asynchronously,
1515
+ returns the request thread.
1516
+ """
1517
+
1518
+ local_var_params = locals()
1519
+
1520
+ all_params = [
1521
+ 'service_id'
1522
+ ]
1523
+ all_params.extend(
1524
+ [
1525
+ 'async_req',
1526
+ '_return_http_data_only',
1527
+ '_preload_content',
1528
+ '_request_timeout'
1529
+ ]
1530
+ )
1531
+
1532
+ for key, val in six.iteritems(local_var_params['kwargs']):
1533
+ if key not in all_params:
1534
+ raise ApiTypeError(
1535
+ "Got an unexpected keyword argument '%s'"
1536
+ " to method archive_service_api_v2_services_v2_service_id_archive_post" % key
1537
+ )
1538
+ local_var_params[key] = val
1539
+ del local_var_params['kwargs']
1540
+ # verify the required parameter 'service_id' is set
1541
+ if self.api_client.client_side_validation and ('service_id' not in local_var_params or # noqa: E501
1542
+ local_var_params['service_id'] is None): # noqa: E501
1543
+ raise ApiValueError("Missing the required parameter `service_id` when calling `archive_service_api_v2_services_v2_service_id_archive_post`") # noqa: E501
1544
+
1545
+ collection_formats = {}
1546
+
1547
+ path_params = {}
1548
+ if 'service_id' in local_var_params:
1549
+ path_params['service_id'] = local_var_params['service_id'] # noqa: E501
1550
+
1551
+ query_params = []
1552
+
1553
+ header_params = {}
1554
+
1555
+ form_params = []
1556
+ local_var_files = {}
1557
+
1558
+ body_params = None
1559
+ # HTTP header `Accept`
1560
+ header_params['Accept'] = self.api_client.select_header_accept(
1561
+ ['application/json']) # noqa: E501
1562
+
1563
+ # Authentication setting
1564
+ auth_settings = [] # noqa: E501
1565
+
1566
+ return self.api_client.call_api(
1567
+ '/api/v2/services-v2/{service_id}/archive', 'POST',
1568
+ path_params,
1569
+ query_params,
1570
+ header_params,
1571
+ body=body_params,
1572
+ post_params=form_params,
1573
+ files=local_var_files,
1574
+ response_type=None, # noqa: E501
1575
+ auth_settings=auth_settings,
1576
+ async_req=local_var_params.get('async_req'),
1577
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
1578
+ _preload_content=local_var_params.get('_preload_content', True),
1579
+ _request_timeout=local_var_params.get('_request_timeout'),
1580
+ collection_formats=collection_formats)
1581
+
1334
1582
  def attach_machine_pool_to_cloud_api_v2_machine_pools_attach_post(self, attach_machine_pool_to_cloud_request, **kwargs): # noqa: E501
1335
1583
  """Attach Machine Pool To Cloud # noqa: E501
1336
1584
 
@@ -14033,6 +14281,142 @@ class DefaultApi(object):
14033
14281
  _request_timeout=local_var_params.get('_request_timeout'),
14034
14282
  collection_formats=collection_formats)
14035
14283
 
14284
+ def get_cluster_events_api_v2_sessions_session_id_cluster_events_get(self, session_id, **kwargs): # noqa: E501
14285
+ """Get Cluster Events # noqa: E501
14286
+
14287
+ Return events for this cluster. There are multiple endpoints to return events. This endpoint is for the UI to fetch events. This should power general observability event views shared by different workload types. Like the task view or the Train dashboard view. The /events endpoint is used by the dataplane to fetch events and has cluster auth requirements. Finally, there are events endpoints for each workload type (workspaces, jobs, services). Those endpoints have some additional logic to stitch together cluster events with workload-specific events. # noqa: E501
14288
+ This method makes a synchronous HTTP request by default. To make an
14289
+ asynchronous HTTP request, please pass async_req=True
14290
+ >>> thread = api.get_cluster_events_api_v2_sessions_session_id_cluster_events_get(session_id, async_req=True)
14291
+ >>> result = thread.get()
14292
+
14293
+ :param async_req bool: execute request asynchronously
14294
+ :param str session_id: (required)
14295
+ :param datetime start_time: Filter for events that have occurred since this value
14296
+ :param datetime end_time: Filter for events that have occurred before this value
14297
+ :param list[ClusterEventSource] sources: Filter for events from these sources
14298
+ :param list[str] autoscaler_resource_bundles: Filter for autoscaler events relevant to specific resource bundles.Each string should be a JSON-encoded resource bundle. We accept a string here because query params do not support dictionaries. Ex: ['{\"CPU\": 1, \"GPU\": 1}', '{\"GPU\": 1}']
14299
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
14300
+ be returned without reading/decoding response
14301
+ data. Default is True.
14302
+ :param _request_timeout: timeout setting for this request. If one
14303
+ number provided, it will be total request
14304
+ timeout. It can also be a pair (tuple) of
14305
+ (connection, read) timeouts.
14306
+ :return: ClustereventListResponse
14307
+ If the method is called asynchronously,
14308
+ returns the request thread.
14309
+ """
14310
+ kwargs['_return_http_data_only'] = True
14311
+ return self.get_cluster_events_api_v2_sessions_session_id_cluster_events_get_with_http_info(session_id, **kwargs) # noqa: E501
14312
+
14313
+ def get_cluster_events_api_v2_sessions_session_id_cluster_events_get_with_http_info(self, session_id, **kwargs): # noqa: E501
14314
+ """Get Cluster Events # noqa: E501
14315
+
14316
+ Return events for this cluster. There are multiple endpoints to return events. This endpoint is for the UI to fetch events. This should power general observability event views shared by different workload types. Like the task view or the Train dashboard view. The /events endpoint is used by the dataplane to fetch events and has cluster auth requirements. Finally, there are events endpoints for each workload type (workspaces, jobs, services). Those endpoints have some additional logic to stitch together cluster events with workload-specific events. # noqa: E501
14317
+ This method makes a synchronous HTTP request by default. To make an
14318
+ asynchronous HTTP request, please pass async_req=True
14319
+ >>> thread = api.get_cluster_events_api_v2_sessions_session_id_cluster_events_get_with_http_info(session_id, async_req=True)
14320
+ >>> result = thread.get()
14321
+
14322
+ :param async_req bool: execute request asynchronously
14323
+ :param str session_id: (required)
14324
+ :param datetime start_time: Filter for events that have occurred since this value
14325
+ :param datetime end_time: Filter for events that have occurred before this value
14326
+ :param list[ClusterEventSource] sources: Filter for events from these sources
14327
+ :param list[str] autoscaler_resource_bundles: Filter for autoscaler events relevant to specific resource bundles.Each string should be a JSON-encoded resource bundle. We accept a string here because query params do not support dictionaries. Ex: ['{\"CPU\": 1, \"GPU\": 1}', '{\"GPU\": 1}']
14328
+ :param _return_http_data_only: response data without head status code
14329
+ and headers
14330
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
14331
+ be returned without reading/decoding response
14332
+ data. Default is True.
14333
+ :param _request_timeout: timeout setting for this request. If one
14334
+ number provided, it will be total request
14335
+ timeout. It can also be a pair (tuple) of
14336
+ (connection, read) timeouts.
14337
+ :return: tuple(ClustereventListResponse, status_code(int), headers(HTTPHeaderDict))
14338
+ If the method is called asynchronously,
14339
+ returns the request thread.
14340
+ """
14341
+
14342
+ local_var_params = locals()
14343
+
14344
+ all_params = [
14345
+ 'session_id',
14346
+ 'start_time',
14347
+ 'end_time',
14348
+ 'sources',
14349
+ 'autoscaler_resource_bundles'
14350
+ ]
14351
+ all_params.extend(
14352
+ [
14353
+ 'async_req',
14354
+ '_return_http_data_only',
14355
+ '_preload_content',
14356
+ '_request_timeout'
14357
+ ]
14358
+ )
14359
+
14360
+ for key, val in six.iteritems(local_var_params['kwargs']):
14361
+ if key not in all_params:
14362
+ raise ApiTypeError(
14363
+ "Got an unexpected keyword argument '%s'"
14364
+ " to method get_cluster_events_api_v2_sessions_session_id_cluster_events_get" % key
14365
+ )
14366
+ local_var_params[key] = val
14367
+ del local_var_params['kwargs']
14368
+ # verify the required parameter 'session_id' is set
14369
+ if self.api_client.client_side_validation and ('session_id' not in local_var_params or # noqa: E501
14370
+ local_var_params['session_id'] is None): # noqa: E501
14371
+ raise ApiValueError("Missing the required parameter `session_id` when calling `get_cluster_events_api_v2_sessions_session_id_cluster_events_get`") # noqa: E501
14372
+
14373
+ collection_formats = {}
14374
+
14375
+ path_params = {}
14376
+ if 'session_id' in local_var_params:
14377
+ path_params['session_id'] = local_var_params['session_id'] # noqa: E501
14378
+
14379
+ query_params = []
14380
+ if 'start_time' in local_var_params and local_var_params['start_time'] is not None: # noqa: E501
14381
+ query_params.append(('start_time', local_var_params['start_time'])) # noqa: E501
14382
+ if 'end_time' in local_var_params and local_var_params['end_time'] is not None: # noqa: E501
14383
+ query_params.append(('end_time', local_var_params['end_time'])) # noqa: E501
14384
+ if 'sources' in local_var_params and local_var_params['sources'] is not None: # noqa: E501
14385
+ query_params.append(('sources', local_var_params['sources'])) # noqa: E501
14386
+ collection_formats['sources'] = 'multi' # noqa: E501
14387
+ if 'autoscaler_resource_bundles' in local_var_params and local_var_params['autoscaler_resource_bundles'] is not None: # noqa: E501
14388
+ query_params.append(('autoscaler_resource_bundles', local_var_params['autoscaler_resource_bundles'])) # noqa: E501
14389
+ collection_formats['autoscaler_resource_bundles'] = 'multi' # noqa: E501
14390
+
14391
+ header_params = {}
14392
+
14393
+ form_params = []
14394
+ local_var_files = {}
14395
+
14396
+ body_params = None
14397
+ # HTTP header `Accept`
14398
+ header_params['Accept'] = self.api_client.select_header_accept(
14399
+ ['application/json']) # noqa: E501
14400
+
14401
+ # Authentication setting
14402
+ auth_settings = [] # noqa: E501
14403
+
14404
+ return self.api_client.call_api(
14405
+ '/api/v2/sessions/{session_id}/cluster_events', 'GET',
14406
+ path_params,
14407
+ query_params,
14408
+ header_params,
14409
+ body=body_params,
14410
+ post_params=form_params,
14411
+ files=local_var_files,
14412
+ response_type='ClustereventListResponse', # noqa: E501
14413
+ auth_settings=auth_settings,
14414
+ async_req=local_var_params.get('async_req'),
14415
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
14416
+ _preload_content=local_var_params.get('_preload_content', True),
14417
+ _request_timeout=local_var_params.get('_request_timeout'),
14418
+ collection_formats=collection_formats)
14419
+
14036
14420
  def get_cluster_product_autoscaler_flag_api_v2_logs_cluster_product_autoscaler_flag_session_id_get(self, session_id, **kwargs): # noqa: E501
14037
14421
  """Get Cluster Product Autoscaler Flag # noqa: E501
14038
14422
 
@@ -16669,7 +17053,7 @@ class DefaultApi(object):
16669
17053
  def get_events_api_v2_sessions_session_id_events_get(self, session_id, start_index, end_index, **kwargs): # noqa: E501
16670
17054
  """Get Events # noqa: E501
16671
17055
 
16672
- Return events for this cluster. # noqa: E501
17056
+ Return events for this cluster. There are multiple endpoints to return events. This endpoint is for the dataplane to fetch events to power the oss ray dashboard. The /cluster_events endpoint is used by the UI to fetch events to power general debugging UI features like train dashboard. Finally, there are events endpoints for each workload type (workspaces, jobs, services). Those endpoints have some additional logic to stitch together cluster events with workload-specific events. # noqa: E501
16673
17057
  This method makes a synchronous HTTP request by default. To make an
16674
17058
  asynchronous HTTP request, please pass async_req=True
16675
17059
  >>> thread = api.get_events_api_v2_sessions_session_id_events_get(session_id, start_index, end_index, async_req=True)
@@ -16697,7 +17081,7 @@ class DefaultApi(object):
16697
17081
  def get_events_api_v2_sessions_session_id_events_get_with_http_info(self, session_id, start_index, end_index, **kwargs): # noqa: E501
16698
17082
  """Get Events # noqa: E501
16699
17083
 
16700
- Return events for this cluster. # noqa: E501
17084
+ Return events for this cluster. There are multiple endpoints to return events. This endpoint is for the dataplane to fetch events to power the oss ray dashboard. The /cluster_events endpoint is used by the UI to fetch events to power general debugging UI features like train dashboard. Finally, there are events endpoints for each workload type (workspaces, jobs, services). Those endpoints have some additional logic to stitch together cluster events with workload-specific events. # noqa: E501
16701
17085
  This method makes a synchronous HTTP request by default. To make an
16702
17086
  asynchronous HTTP request, please pass async_req=True
16703
17087
  >>> thread = api.get_events_api_v2_sessions_session_id_events_get_with_http_info(session_id, start_index, end_index, async_req=True)
@@ -30709,6 +31093,7 @@ class DefaultApi(object):
30709
31093
  :param str project_id: project_id to filter by
30710
31094
  :param str name: name to filter by
30711
31095
  :param list[ServiceEventCurrentState] state_filter: A list of Service states to filter by
31096
+ :param ArchiveStatus archive_status: The archive status to filter by. Defaults to unarchived.
30712
31097
  :param str creator_id: creator_id to filter by
30713
31098
  :param str cloud_id: cloud_id to filter by
30714
31099
  :param list[ApplicationType] application_type: Application type to filter by
@@ -30742,6 +31127,7 @@ class DefaultApi(object):
30742
31127
  :param str project_id: project_id to filter by
30743
31128
  :param str name: name to filter by
30744
31129
  :param list[ServiceEventCurrentState] state_filter: A list of Service states to filter by
31130
+ :param ArchiveStatus archive_status: The archive status to filter by. Defaults to unarchived.
30745
31131
  :param str creator_id: creator_id to filter by
30746
31132
  :param str cloud_id: cloud_id to filter by
30747
31133
  :param list[ApplicationType] application_type: Application type to filter by
@@ -30769,6 +31155,7 @@ class DefaultApi(object):
30769
31155
  'project_id',
30770
31156
  'name',
30771
31157
  'state_filter',
31158
+ 'archive_status',
30772
31159
  'creator_id',
30773
31160
  'cloud_id',
30774
31161
  'application_type',
@@ -30811,6 +31198,8 @@ class DefaultApi(object):
30811
31198
  if 'state_filter' in local_var_params and local_var_params['state_filter'] is not None: # noqa: E501
30812
31199
  query_params.append(('state_filter', local_var_params['state_filter'])) # noqa: E501
30813
31200
  collection_formats['state_filter'] = 'multi' # noqa: E501
31201
+ if 'archive_status' in local_var_params and local_var_params['archive_status'] is not None: # noqa: E501
31202
+ query_params.append(('archive_status', local_var_params['archive_status'])) # noqa: E501
30814
31203
  if 'creator_id' in local_var_params and local_var_params['creator_id'] is not None: # noqa: E501
30815
31204
  query_params.append(('creator_id', local_var_params['creator_id'])) # noqa: E501
30816
31205
  if 'cloud_id' in local_var_params and local_var_params['cloud_id'] is not None: # noqa: E501
@@ -146,6 +146,7 @@ from openapi_client.models.cluster_config import ClusterConfig
146
146
  from openapi_client.models.cluster_config_with_session_idle_timeout import ClusterConfigWithSessionIdleTimeout
147
147
  from openapi_client.models.cluster_environments_query import ClusterEnvironmentsQuery
148
148
  from openapi_client.models.cluster_event import ClusterEvent
149
+ from openapi_client.models.cluster_event_source import ClusterEventSource
149
150
  from openapi_client.models.cluster_events_output import ClusterEventsOutput
150
151
  from openapi_client.models.cluster_features import ClusterFeatures
151
152
  from openapi_client.models.cluster_management_stack_versions import ClusterManagementStackVersions
@@ -156,6 +157,7 @@ from openapi_client.models.cluster_status_details import ClusterStatusDetails
156
157
  from openapi_client.models.clusterauthresponse_response import ClusterauthresponseResponse
157
158
  from openapi_client.models.clusterconfig_response import ClusterconfigResponse
158
159
  from openapi_client.models.clusterconfigwithsessionidletimeout_response import ClusterconfigwithsessionidletimeoutResponse
160
+ from openapi_client.models.clusterevent_list_response import ClustereventListResponse
159
161
  from openapi_client.models.clustereventsoutput_response import ClustereventsoutputResponse
160
162
  from openapi_client.models.clusterfeatures_response import ClusterfeaturesResponse
161
163
  from openapi_client.models.compute_node_type import ComputeNodeType
@@ -599,6 +601,7 @@ from openapi_client.models.ux_instance import UXInstance
599
601
  from openapi_client.models.unified_job_sort_field import UnifiedJobSortField
600
602
  from openapi_client.models.unified_job_status import UnifiedJobStatus
601
603
  from openapi_client.models.unified_job_type import UnifiedJobType
604
+ from openapi_client.models.update_cloud_collaborator import UpdateCloudCollaborator
602
605
  from openapi_client.models.update_cloud_with_cloud_resource import UpdateCloudWithCloudResource
603
606
  from openapi_client.models.update_cloud_with_cloud_resource_gcp import UpdateCloudWithCloudResourceGCP
604
607
  from openapi_client.models.update_cluster_dns import UpdateClusterDns