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
@@ -17,8 +17,14 @@ from __future__ import absolute_import
17
17
  from openapi_client.models.aws_credentials import AWSCredentials
18
18
  from openapi_client.models.aws_memory_db_cluster_config import AWSMemoryDBClusterConfig
19
19
  from openapi_client.models.access_config import AccessConfig
20
- from openapi_client.models.aggregated_instance_usage_with_cost_model import AggregatedInstanceUsageWithCostModel
21
- from openapi_client.models.aggregatedinstanceusagewithcostmodel_list_response import AggregatedinstanceusagewithcostmodelListResponse
20
+ from openapi_client.models.admin_create_user import AdminCreateUser
21
+ from openapi_client.models.admin_created_user import AdminCreatedUser
22
+ from openapi_client.models.admincreateduser_list_response import AdmincreateduserListResponse
23
+ from openapi_client.models.aggregated_instance_usage_csv import AggregatedInstanceUsageCSV
24
+ from openapi_client.models.aggregated_usage import AggregatedUsage
25
+ from openapi_client.models.aggregated_usage_query import AggregatedUsageQuery
26
+ from openapi_client.models.aggregatedinstanceusagecsv_list_response import AggregatedinstanceusagecsvListResponse
27
+ from openapi_client.models.aggregatedusage_response import AggregatedusageResponse
22
28
  from openapi_client.models.aica_endpoint import AicaEndpoint
23
29
  from openapi_client.models.aica_endpoint_event import AicaEndpointEvent
24
30
  from openapi_client.models.aica_endpoint_event_level import AicaEndpointEventLevel
@@ -610,6 +616,16 @@ from openapi_client.models.update_resource_quota import UpdateResourceQuota
610
616
  from openapi_client.models.updatemachinepoolresponse_response import UpdatemachinepoolresponseResponse
611
617
  from openapi_client.models.upload_session_command_logs_locations import UploadSessionCommandLogsLocations
612
618
  from openapi_client.models.uploadsessioncommandlogslocations_response import UploadsessioncommandlogslocationsResponse
619
+ from openapi_client.models.usage_by_cloud import UsageByCloud
620
+ from openapi_client.models.usage_by_cluster import UsageByCluster
621
+ from openapi_client.models.usage_by_instance_type import UsageByInstanceType
622
+ from openapi_client.models.usage_by_project import UsageByProject
623
+ from openapi_client.models.usage_by_user import UsageByUser
624
+ from openapi_client.models.usagebycloud_list_response import UsagebycloudListResponse
625
+ from openapi_client.models.usagebycluster_list_response import UsagebyclusterListResponse
626
+ from openapi_client.models.usagebyinstancetype_list_response import UsagebyinstancetypeListResponse
627
+ from openapi_client.models.usagebyproject_list_response import UsagebyprojectListResponse
628
+ from openapi_client.models.usagebyuser_list_response import UsagebyuserListResponse
613
629
  from openapi_client.models.user_info import UserInfo
614
630
  from openapi_client.models.user_resend_email_options import UserResendEmailOptions
615
631
  from openapi_client.models.user_service_access_types import UserServiceAccessTypes
@@ -0,0 +1,255 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Managed Ray API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by: https://openapi-generator.tech
10
+ """
11
+
12
+
13
+ import pprint
14
+ import re # noqa: F401
15
+
16
+ import six
17
+
18
+ from openapi_client.configuration import Configuration
19
+
20
+
21
+ class AdminCreateUser(object):
22
+ """NOTE: This class is auto generated by OpenAPI Generator.
23
+ Ref: https://openapi-generator.tech
24
+
25
+ Do not edit the class manually.
26
+ """
27
+
28
+ """
29
+ Attributes:
30
+ openapi_types (dict): The key is attribute name
31
+ and the value is attribute type.
32
+ attribute_map (dict): The key is attribute name
33
+ and the value is json key in definition.
34
+ """
35
+ openapi_types = {
36
+ 'name': 'str',
37
+ 'email': 'str',
38
+ 'password': 'str',
39
+ 'is_sso_user': 'bool',
40
+ 'lastname': 'str',
41
+ 'title': 'str'
42
+ }
43
+
44
+ attribute_map = {
45
+ 'name': 'name',
46
+ 'email': 'email',
47
+ 'password': 'password',
48
+ 'is_sso_user': 'is_sso_user',
49
+ 'lastname': 'lastname',
50
+ 'title': 'title'
51
+ }
52
+
53
+ def __init__(self, name=None, email=None, password=None, is_sso_user=None, lastname=None, title=None, local_vars_configuration=None): # noqa: E501
54
+ """AdminCreateUser - a model defined in OpenAPI""" # noqa: E501
55
+ if local_vars_configuration is None:
56
+ local_vars_configuration = Configuration()
57
+ self.local_vars_configuration = local_vars_configuration
58
+
59
+ self._name = None
60
+ self._email = None
61
+ self._password = None
62
+ self._is_sso_user = None
63
+ self._lastname = None
64
+ self._title = None
65
+ self.discriminator = None
66
+
67
+ self.name = name
68
+ self.email = email
69
+ if password is not None:
70
+ self.password = password
71
+ self.is_sso_user = is_sso_user
72
+ if lastname is not None:
73
+ self.lastname = lastname
74
+ if title is not None:
75
+ self.title = title
76
+
77
+ @property
78
+ def name(self):
79
+ """Gets the name of this AdminCreateUser. # noqa: E501
80
+
81
+
82
+ :return: The name of this AdminCreateUser. # noqa: E501
83
+ :rtype: str
84
+ """
85
+ return self._name
86
+
87
+ @name.setter
88
+ def name(self, name):
89
+ """Sets the name of this AdminCreateUser.
90
+
91
+
92
+ :param name: The name of this AdminCreateUser. # noqa: E501
93
+ :type: str
94
+ """
95
+ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
96
+ raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
97
+
98
+ self._name = name
99
+
100
+ @property
101
+ def email(self):
102
+ """Gets the email of this AdminCreateUser. # noqa: E501
103
+
104
+
105
+ :return: The email of this AdminCreateUser. # noqa: E501
106
+ :rtype: str
107
+ """
108
+ return self._email
109
+
110
+ @email.setter
111
+ def email(self, email):
112
+ """Sets the email of this AdminCreateUser.
113
+
114
+
115
+ :param email: The email of this AdminCreateUser. # noqa: E501
116
+ :type: str
117
+ """
118
+ if self.local_vars_configuration.client_side_validation and email is None: # noqa: E501
119
+ raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501
120
+
121
+ self._email = email
122
+
123
+ @property
124
+ def password(self):
125
+ """Gets the password of this AdminCreateUser. # noqa: E501
126
+
127
+ Password to use for logging in as the user. Password is required if not SSO org. # noqa: E501
128
+
129
+ :return: The password of this AdminCreateUser. # noqa: E501
130
+ :rtype: str
131
+ """
132
+ return self._password
133
+
134
+ @password.setter
135
+ def password(self, password):
136
+ """Sets the password of this AdminCreateUser.
137
+
138
+ Password to use for logging in as the user. Password is required if not SSO org. # noqa: E501
139
+
140
+ :param password: The password of this AdminCreateUser. # noqa: E501
141
+ :type: str
142
+ """
143
+
144
+ self._password = password
145
+
146
+ @property
147
+ def is_sso_user(self):
148
+ """Gets the is_sso_user of this AdminCreateUser. # noqa: E501
149
+
150
+
151
+ :return: The is_sso_user of this AdminCreateUser. # noqa: E501
152
+ :rtype: bool
153
+ """
154
+ return self._is_sso_user
155
+
156
+ @is_sso_user.setter
157
+ def is_sso_user(self, is_sso_user):
158
+ """Sets the is_sso_user of this AdminCreateUser.
159
+
160
+
161
+ :param is_sso_user: The is_sso_user of this AdminCreateUser. # noqa: E501
162
+ :type: bool
163
+ """
164
+ if self.local_vars_configuration.client_side_validation and is_sso_user is None: # noqa: E501
165
+ raise ValueError("Invalid value for `is_sso_user`, must not be `None`") # noqa: E501
166
+
167
+ self._is_sso_user = is_sso_user
168
+
169
+ @property
170
+ def lastname(self):
171
+ """Gets the lastname of this AdminCreateUser. # noqa: E501
172
+
173
+
174
+ :return: The lastname of this AdminCreateUser. # noqa: E501
175
+ :rtype: str
176
+ """
177
+ return self._lastname
178
+
179
+ @lastname.setter
180
+ def lastname(self, lastname):
181
+ """Sets the lastname of this AdminCreateUser.
182
+
183
+
184
+ :param lastname: The lastname of this AdminCreateUser. # noqa: E501
185
+ :type: str
186
+ """
187
+
188
+ self._lastname = lastname
189
+
190
+ @property
191
+ def title(self):
192
+ """Gets the title of this AdminCreateUser. # noqa: E501
193
+
194
+
195
+ :return: The title of this AdminCreateUser. # noqa: E501
196
+ :rtype: str
197
+ """
198
+ return self._title
199
+
200
+ @title.setter
201
+ def title(self, title):
202
+ """Sets the title of this AdminCreateUser.
203
+
204
+
205
+ :param title: The title of this AdminCreateUser. # noqa: E501
206
+ :type: str
207
+ """
208
+
209
+ self._title = title
210
+
211
+ def to_dict(self):
212
+ """Returns the model properties as a dict"""
213
+ result = {}
214
+
215
+ for attr, _ in six.iteritems(self.openapi_types):
216
+ value = getattr(self, attr)
217
+ if isinstance(value, list):
218
+ result[attr] = list(map(
219
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
220
+ value
221
+ ))
222
+ elif hasattr(value, "to_dict"):
223
+ result[attr] = value.to_dict()
224
+ elif isinstance(value, dict):
225
+ result[attr] = dict(map(
226
+ lambda item: (item[0], item[1].to_dict())
227
+ if hasattr(item[1], "to_dict") else item,
228
+ value.items()
229
+ ))
230
+ else:
231
+ result[attr] = value
232
+
233
+ return result
234
+
235
+ def to_str(self):
236
+ """Returns the string representation of the model"""
237
+ return pprint.pformat(self.to_dict())
238
+
239
+ def __repr__(self):
240
+ """For `print` and `pprint`"""
241
+ return self.to_str()
242
+
243
+ def __eq__(self, other):
244
+ """Returns true if both objects are equal"""
245
+ if not isinstance(other, AdminCreateUser):
246
+ return False
247
+
248
+ return self.to_dict() == other.to_dict()
249
+
250
+ def __ne__(self, other):
251
+ """Returns true if both objects are not equal"""
252
+ if not isinstance(other, AdminCreateUser):
253
+ return True
254
+
255
+ return self.to_dict() != other.to_dict()
@@ -0,0 +1,281 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Managed Ray API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by: https://openapi-generator.tech
10
+ """
11
+
12
+
13
+ import pprint
14
+ import re # noqa: F401
15
+
16
+ import six
17
+
18
+ from openapi_client.configuration import Configuration
19
+
20
+
21
+ class AdminCreatedUser(object):
22
+ """NOTE: This class is auto generated by OpenAPI Generator.
23
+ Ref: https://openapi-generator.tech
24
+
25
+ Do not edit the class manually.
26
+ """
27
+
28
+ """
29
+ Attributes:
30
+ openapi_types (dict): The key is attribute name
31
+ and the value is attribute type.
32
+ attribute_map (dict): The key is attribute name
33
+ and the value is json key in definition.
34
+ """
35
+ openapi_types = {
36
+ 'user_id': 'str',
37
+ 'email': 'str',
38
+ 'created_at': 'datetime',
39
+ 'name': 'str',
40
+ 'lastname': 'str',
41
+ 'title': 'str',
42
+ 'is_sso_user': 'bool'
43
+ }
44
+
45
+ attribute_map = {
46
+ 'user_id': 'user_id',
47
+ 'email': 'email',
48
+ 'created_at': 'created_at',
49
+ 'name': 'name',
50
+ 'lastname': 'lastname',
51
+ 'title': 'title',
52
+ 'is_sso_user': 'is_sso_user'
53
+ }
54
+
55
+ def __init__(self, user_id=None, email=None, created_at=None, name=None, lastname=None, title=None, is_sso_user=None, local_vars_configuration=None): # noqa: E501
56
+ """AdminCreatedUser - a model defined in OpenAPI""" # noqa: E501
57
+ if local_vars_configuration is None:
58
+ local_vars_configuration = Configuration()
59
+ self.local_vars_configuration = local_vars_configuration
60
+
61
+ self._user_id = None
62
+ self._email = None
63
+ self._created_at = None
64
+ self._name = None
65
+ self._lastname = None
66
+ self._title = None
67
+ self._is_sso_user = None
68
+ self.discriminator = None
69
+
70
+ self.user_id = user_id
71
+ self.email = email
72
+ self.created_at = created_at
73
+ self.name = name
74
+ if lastname is not None:
75
+ self.lastname = lastname
76
+ if title is not None:
77
+ self.title = title
78
+ self.is_sso_user = is_sso_user
79
+
80
+ @property
81
+ def user_id(self):
82
+ """Gets the user_id of this AdminCreatedUser. # noqa: E501
83
+
84
+
85
+ :return: The user_id of this AdminCreatedUser. # noqa: E501
86
+ :rtype: str
87
+ """
88
+ return self._user_id
89
+
90
+ @user_id.setter
91
+ def user_id(self, user_id):
92
+ """Sets the user_id of this AdminCreatedUser.
93
+
94
+
95
+ :param user_id: The user_id of this AdminCreatedUser. # noqa: E501
96
+ :type: str
97
+ """
98
+ if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501
99
+ raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501
100
+
101
+ self._user_id = user_id
102
+
103
+ @property
104
+ def email(self):
105
+ """Gets the email of this AdminCreatedUser. # noqa: E501
106
+
107
+
108
+ :return: The email of this AdminCreatedUser. # noqa: E501
109
+ :rtype: str
110
+ """
111
+ return self._email
112
+
113
+ @email.setter
114
+ def email(self, email):
115
+ """Sets the email of this AdminCreatedUser.
116
+
117
+
118
+ :param email: The email of this AdminCreatedUser. # noqa: E501
119
+ :type: str
120
+ """
121
+ if self.local_vars_configuration.client_side_validation and email is None: # noqa: E501
122
+ raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501
123
+
124
+ self._email = email
125
+
126
+ @property
127
+ def created_at(self):
128
+ """Gets the created_at of this AdminCreatedUser. # noqa: E501
129
+
130
+
131
+ :return: The created_at of this AdminCreatedUser. # noqa: E501
132
+ :rtype: datetime
133
+ """
134
+ return self._created_at
135
+
136
+ @created_at.setter
137
+ def created_at(self, created_at):
138
+ """Sets the created_at of this AdminCreatedUser.
139
+
140
+
141
+ :param created_at: The created_at of this AdminCreatedUser. # noqa: E501
142
+ :type: datetime
143
+ """
144
+ if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501
145
+ raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501
146
+
147
+ self._created_at = created_at
148
+
149
+ @property
150
+ def name(self):
151
+ """Gets the name of this AdminCreatedUser. # noqa: E501
152
+
153
+
154
+ :return: The name of this AdminCreatedUser. # noqa: E501
155
+ :rtype: str
156
+ """
157
+ return self._name
158
+
159
+ @name.setter
160
+ def name(self, name):
161
+ """Sets the name of this AdminCreatedUser.
162
+
163
+
164
+ :param name: The name of this AdminCreatedUser. # noqa: E501
165
+ :type: str
166
+ """
167
+ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
168
+ raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
169
+
170
+ self._name = name
171
+
172
+ @property
173
+ def lastname(self):
174
+ """Gets the lastname of this AdminCreatedUser. # noqa: E501
175
+
176
+
177
+ :return: The lastname of this AdminCreatedUser. # noqa: E501
178
+ :rtype: str
179
+ """
180
+ return self._lastname
181
+
182
+ @lastname.setter
183
+ def lastname(self, lastname):
184
+ """Sets the lastname of this AdminCreatedUser.
185
+
186
+
187
+ :param lastname: The lastname of this AdminCreatedUser. # noqa: E501
188
+ :type: str
189
+ """
190
+
191
+ self._lastname = lastname
192
+
193
+ @property
194
+ def title(self):
195
+ """Gets the title of this AdminCreatedUser. # noqa: E501
196
+
197
+
198
+ :return: The title of this AdminCreatedUser. # noqa: E501
199
+ :rtype: str
200
+ """
201
+ return self._title
202
+
203
+ @title.setter
204
+ def title(self, title):
205
+ """Sets the title of this AdminCreatedUser.
206
+
207
+
208
+ :param title: The title of this AdminCreatedUser. # noqa: E501
209
+ :type: str
210
+ """
211
+
212
+ self._title = title
213
+
214
+ @property
215
+ def is_sso_user(self):
216
+ """Gets the is_sso_user of this AdminCreatedUser. # noqa: E501
217
+
218
+
219
+ :return: The is_sso_user of this AdminCreatedUser. # noqa: E501
220
+ :rtype: bool
221
+ """
222
+ return self._is_sso_user
223
+
224
+ @is_sso_user.setter
225
+ def is_sso_user(self, is_sso_user):
226
+ """Sets the is_sso_user of this AdminCreatedUser.
227
+
228
+
229
+ :param is_sso_user: The is_sso_user of this AdminCreatedUser. # noqa: E501
230
+ :type: bool
231
+ """
232
+ if self.local_vars_configuration.client_side_validation and is_sso_user is None: # noqa: E501
233
+ raise ValueError("Invalid value for `is_sso_user`, must not be `None`") # noqa: E501
234
+
235
+ self._is_sso_user = is_sso_user
236
+
237
+ def to_dict(self):
238
+ """Returns the model properties as a dict"""
239
+ result = {}
240
+
241
+ for attr, _ in six.iteritems(self.openapi_types):
242
+ value = getattr(self, attr)
243
+ if isinstance(value, list):
244
+ result[attr] = list(map(
245
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
246
+ value
247
+ ))
248
+ elif hasattr(value, "to_dict"):
249
+ result[attr] = value.to_dict()
250
+ elif isinstance(value, dict):
251
+ result[attr] = dict(map(
252
+ lambda item: (item[0], item[1].to_dict())
253
+ if hasattr(item[1], "to_dict") else item,
254
+ value.items()
255
+ ))
256
+ else:
257
+ result[attr] = value
258
+
259
+ return result
260
+
261
+ def to_str(self):
262
+ """Returns the string representation of the model"""
263
+ return pprint.pformat(self.to_dict())
264
+
265
+ def __repr__(self):
266
+ """For `print` and `pprint`"""
267
+ return self.to_str()
268
+
269
+ def __eq__(self, other):
270
+ """Returns true if both objects are equal"""
271
+ if not isinstance(other, AdminCreatedUser):
272
+ return False
273
+
274
+ return self.to_dict() == other.to_dict()
275
+
276
+ def __ne__(self, other):
277
+ """Returns true if both objects are not equal"""
278
+ if not isinstance(other, AdminCreatedUser):
279
+ return True
280
+
281
+ return self.to_dict() != other.to_dict()