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
@@ -9,7 +9,9 @@ import yaml
9
9
 
10
10
  from anyscale._private.models.image_uri import ImageURI
11
11
  from anyscale.cli_logger import BlockLogger
12
+ from anyscale.commands import command_examples
12
13
  from anyscale.commands.util import (
14
+ AnyscaleCommand,
13
15
  convert_kv_strings_to_dict,
14
16
  LegacyAnyscaleCommand,
15
17
  override_env_vars,
@@ -736,3 +738,61 @@ def terminate(
736
738
  project_id=project_id,
737
739
  )
738
740
  service_controller.terminate(service_id)
741
+
742
+
743
+ @service_cli.command(
744
+ name="archive",
745
+ help="Archive a service.",
746
+ cls=AnyscaleCommand,
747
+ example=command_examples.SERVICE_ARCHIVE_EXAMPLE,
748
+ )
749
+ @click.option(
750
+ "-n", "--name", required=False, default=None, type=str, help="Name of the service.",
751
+ )
752
+ @click.option(
753
+ "-f",
754
+ "--config-file",
755
+ required=False,
756
+ default=None,
757
+ type=str,
758
+ help="Path to a YAML config file to read the name from.",
759
+ )
760
+ @click.option(
761
+ "--cloud",
762
+ required=False,
763
+ default=None,
764
+ type=str,
765
+ help="The Anyscale Cloud to run this workload on. If not provided, the organization default will be used (or, if running in a workspace, the cloud of the workspace).",
766
+ )
767
+ @click.option(
768
+ "--project",
769
+ required=False,
770
+ default=None,
771
+ type=str,
772
+ help="Named project to use for the service. If not provided, the default project for the cloud will be used (or, if running in a workspace, the project of the workspace).",
773
+ )
774
+ def archive(
775
+ name: Optional[str],
776
+ config_file: Optional[str],
777
+ cloud: Optional[str],
778
+ project: Optional[str],
779
+ ) -> None:
780
+ """Archive a service.
781
+
782
+ To specify the service by name, use the --name flag. To specify the service by id, use the --id flag. Either name or
783
+ id should be used, specifying both will result in an error.
784
+ """
785
+ if name is not None and config_file is not None:
786
+ raise click.ClickException(
787
+ "Only one of '--name' and '--config-file' can be provided."
788
+ )
789
+
790
+ if config_file is not None:
791
+ name = _read_name_from_config_file(config_file)
792
+
793
+ if name is None:
794
+ raise click.ClickException(
795
+ "Service name must be provided using '--name' or in a config file using '-f'."
796
+ )
797
+
798
+ anyscale.service.archive(name=name, cloud=cloud, project=project)
@@ -5,6 +5,7 @@ Fetches data required and formats output for `anyscale cloud` commands.
5
5
  import copy
6
6
  import json
7
7
  from os import getenv
8
+ import pathlib
8
9
  import re
9
10
  import secrets
10
11
  import time
@@ -15,6 +16,7 @@ import boto3
15
16
  from botocore.exceptions import ClientError, NoCredentialsError
16
17
  import click
17
18
  from click import Abort, ClickException
19
+ import yaml
18
20
 
19
21
  from anyscale import __version__ as anyscale_version
20
22
  from anyscale.aws_iam_policies import get_anyscale_iam_permissions_ec2_restricted
@@ -24,6 +26,7 @@ from anyscale.client.openapi_client.models import (
24
26
  CloudAnalyticsEventCloudResource,
25
27
  CloudAnalyticsEventCommandName,
26
28
  CloudAnalyticsEventName,
29
+ CloudDeploymentConfig,
27
30
  CloudProviders,
28
31
  CloudState,
29
32
  CloudWithCloudResource,
@@ -59,7 +62,6 @@ from anyscale.cloud_resource import (
59
62
  )
60
63
  from anyscale.cloud_utils import (
61
64
  get_cloud_id_and_name,
62
- get_cloud_json_from_id,
63
65
  get_cloud_resource_by_cloud_id,
64
66
  get_organization_id,
65
67
  )
@@ -1382,23 +1384,28 @@ class CloudController(BaseController):
1382
1384
 
1383
1385
  def get_cloud_config(
1384
1386
  self, cloud_name: Optional[str] = None, cloud_id: Optional[str] = None,
1385
- ) -> str:
1387
+ ) -> CloudDeploymentConfig:
1386
1388
  """Get a cloud's current JSON configuration."""
1387
1389
 
1388
1390
  cloud_id, cloud_name = get_cloud_id_and_name(
1389
1391
  self.api_client, cloud_id, cloud_name
1390
1392
  )
1391
1393
 
1392
- return str(get_cloud_json_from_id(cloud_id, self.api_client)["config"])
1394
+ # In the future we will expose cloud_deployment id as a parameter, for now, it's just a placeholder.
1395
+ config: CloudDeploymentConfig = self.api_client.get_cloud_deployment_config_api_v2_clouds_cloud_id_deployment_cloud_deployment_id_config_get(
1396
+ cloud_id=cloud_id, cloud_deployment_id="default"
1397
+ ).result
1398
+
1399
+ return config
1393
1400
 
1394
1401
  def update_cloud_config(
1395
1402
  self,
1396
1403
  cloud_name: Optional[str] = None,
1397
1404
  cloud_id: Optional[str] = None,
1398
1405
  enable_log_ingestion: Optional[bool] = None,
1406
+ spec_file: Optional[str] = None,
1399
1407
  ):
1400
1408
  """Update a cloud's configuration."""
1401
-
1402
1409
  cloud_id, cloud_name = get_cloud_id_and_name(
1403
1410
  self.api_client, cloud_id, cloud_name
1404
1411
  )
@@ -1410,6 +1417,24 @@ class CloudController(BaseController):
1410
1417
  f"Successfully updated log ingestion configuration for cloud, "
1411
1418
  f"{cloud_id} to {enable_log_ingestion}"
1412
1419
  )
1420
+ elif spec_file is not None:
1421
+ path = pathlib.Path(spec_file)
1422
+ if not path.exists():
1423
+ raise FileNotFoundError(f"File {spec_file} does not exist.")
1424
+
1425
+ if not path.is_file():
1426
+ raise ValueError(f"File {spec_file} is not a file.")
1427
+
1428
+ spec = yaml.safe_load(path.read_text())
1429
+ config = CloudDeploymentConfig(spec=spec)
1430
+ self.api_client.update_cloud_deployment_config_api_v2_clouds_cloud_id_deployment_cloud_deployment_id_config_put(
1431
+ cloud_id=cloud_id,
1432
+ cloud_deployment_id="default",
1433
+ cloud_deployment_config=config,
1434
+ )
1435
+ self.log.info(
1436
+ f"Successfully updated cloud configuration for cloud {cloud_name}"
1437
+ )
1413
1438
 
1414
1439
  def set_default_cloud(
1415
1440
  self, cloud_name: Optional[str], cloud_id: Optional[str],
@@ -1641,12 +1666,14 @@ class CloudController(BaseController):
1641
1666
  logger=logger,
1642
1667
  strict=strict,
1643
1668
  )
1644
- verify_aws_efs_result = verify_aws_efs(
1645
- cloud_resource=cloud_resource,
1646
- boto3_session=boto3_session,
1647
- logger=logger,
1648
- strict=strict,
1649
- )
1669
+ verify_aws_efs_result = True
1670
+ if cloud_resource.aws_efs_id:
1671
+ verify_aws_efs_result = verify_aws_efs(
1672
+ cloud_resource=cloud_resource,
1673
+ boto3_session=boto3_session,
1674
+ logger=logger,
1675
+ strict=strict,
1676
+ )
1650
1677
  # Cloudformation is only used in managed cloud setup. Set to True in BYOR case because it's not used.
1651
1678
  verify_aws_cloudformation_stack_result = True
1652
1679
  if not is_bring_your_own_resource:
@@ -1676,9 +1703,12 @@ class CloudController(BaseController):
1676
1703
  f"iam roles: {self._passed_or_failed_str_from_bool(verify_aws_iam_roles_result)}",
1677
1704
  f"security groups: {self._passed_or_failed_str_from_bool(verify_aws_security_groups_result)}",
1678
1705
  f"s3: {self._passed_or_failed_str_from_bool(verify_aws_s3_result)}",
1679
- f"efs: {self._passed_or_failed_str_from_bool(verify_aws_efs_result)}",
1680
1706
  f"cloudformation stack: {self._passed_or_failed_str_from_bool(verify_aws_cloudformation_stack_result) if not is_bring_your_own_resource else 'N/A'}",
1681
1707
  ]
1708
+ if cloud_resource.aws_efs_id:
1709
+ verification_result_summary.append(
1710
+ f"efs: {self._passed_or_failed_str_from_bool(verify_aws_efs_result)}"
1711
+ )
1682
1712
  if cloud_resource.memorydb_cluster_config is not None:
1683
1713
  verification_result_summary.append(
1684
1714
  f"memorydb cluster: {self._passed_or_failed_str_from_bool(verify_aws_memorydb_cluster_result)}"
@@ -1875,7 +1905,7 @@ class CloudController(BaseController):
1875
1905
  name: str,
1876
1906
  vpc_id: str,
1877
1907
  subnet_ids: List[str],
1878
- efs_id: str,
1908
+ efs_id: Optional[str],
1879
1909
  anyscale_iam_role_id: str,
1880
1910
  instance_iam_role_id: str,
1881
1911
  security_group_ids: List[str],
@@ -2012,10 +2042,7 @@ class CloudController(BaseController):
2012
2042
  # When running on the VM compute stack, validate and retrieve the EFS mount target IP.
2013
2043
  # When running on the K8S compute stack, EFS is optional; if efs_id is provided, then
2014
2044
  # validate and retrieve the EFS mount target IP.
2015
- enable_efs = compute_stack == ComputeStack.VM or (
2016
- compute_stack == ComputeStack.K8S and efs_id
2017
- )
2018
- if enable_efs:
2045
+ if efs_id:
2019
2046
  try:
2020
2047
  boto3_session = boto3.Session(region_name=region)
2021
2048
  aws_efs_mount_target_ip = _get_aws_efs_mount_target_ip(
@@ -2106,7 +2133,8 @@ class CloudController(BaseController):
2106
2133
  # TODO (shomilj): Add verification to the K8S compute stack as well.
2107
2134
  if compute_stack == ComputeStack.VM:
2108
2135
  with self.log.spinner("Verifying cloud resources...") as spinner:
2109
- assert boto3_session is not None
2136
+ if boto3_session is None:
2137
+ boto3_session = boto3.Session(region_name=region)
2110
2138
  if not skip_verifications and not self.verify_aws_cloud_resources(
2111
2139
  cloud_resource=create_cloud_resource,
2112
2140
  boto3_session=boto3_session,
@@ -2264,15 +2292,17 @@ class CloudController(BaseController):
2264
2292
  gcp_logger,
2265
2293
  strict=strict,
2266
2294
  )
2267
- verify_filestore_result = verify_lib.verify_filestore(
2268
- factory, cloud_resource, region, gcp_logger, strict=strict
2269
- )
2270
2295
  verify_cloud_storage_result = verify_lib.verify_cloud_storage(
2271
2296
  factory, cloud_resource, project_id, region, gcp_logger, strict=strict,
2272
2297
  )
2273
2298
  verify_anyscale_access_result = verify_anyscale_access(
2274
2299
  self.api_client, cloud_id, CloudProviders.GCP, self.log
2275
2300
  )
2301
+ verify_filestore_result = True
2302
+ if cloud_resource.gcp_filestore_config.instance_name:
2303
+ verify_filestore_result = verify_lib.verify_filestore(
2304
+ factory, cloud_resource, region, gcp_logger, strict=strict
2305
+ )
2276
2306
  verify_memorystore_result = True
2277
2307
  if cloud_resource.memorystore_instance_config is not None:
2278
2308
  verify_memorystore_result = verify_lib.verify_memorystore(
@@ -2287,10 +2317,13 @@ class CloudController(BaseController):
2287
2317
  f"anyscale iam service account: {self._passed_or_failed_str_from_bool(verify_gcp_access_service_account_result)}",
2288
2318
  f"cluster node service account: {self._passed_or_failed_str_from_bool(verify_gcp_dataplane_service_account_result)}",
2289
2319
  f"firewall policy: {self._passed_or_failed_str_from_bool(verify_firewall_policy_result)}",
2290
- f"filestore: {self._passed_or_failed_str_from_bool(verify_filestore_result)}",
2291
2320
  f"cloud storage: {self._passed_or_failed_str_from_bool(verify_cloud_storage_result)}",
2292
2321
  ]
2293
2322
 
2323
+ if cloud_resource.gcp_filestore_config.instance_name:
2324
+ verification_results.append(
2325
+ f"filestore: {self._passed_or_failed_str_from_bool(verify_filestore_result)}"
2326
+ )
2294
2327
  if cloud_resource.memorystore_instance_config is not None:
2295
2328
  verification_results.append(
2296
2329
  f"memorystore: {self._passed_or_failed_str_from_bool(verify_memorystore_result)}"
@@ -2425,9 +2458,7 @@ class CloudController(BaseController):
2425
2458
  instance_service_account_email = ""
2426
2459
  subnet_names = []
2427
2460
 
2428
- enable_filestore = compute_stack == ComputeStack.VM or (
2429
- filestore_location and filestore_instance_id
2430
- )
2461
+ enable_filestore = filestore_location and filestore_instance_id
2431
2462
 
2432
2463
  # Normally, for Kubernetes clouds, we don't need a VPC name, since networking is managed by Kubernetes.
2433
2464
  # For Kubernetes clouds on GCP where Filestore is enabled, we require the VPC name, since it is needed
@@ -2458,7 +2489,9 @@ class CloudController(BaseController):
2458
2489
  filestore_config = GCPFileStoreConfig(
2459
2490
  instance_name="", mount_target_ip="", root_dir=""
2460
2491
  )
2461
- vpc_name = ""
2492
+ if compute_stack == ComputeStack.K8S:
2493
+ # Set vpc_name to empty string for Kubernetes clouds
2494
+ vpc_name = ""
2462
2495
 
2463
2496
  if memorystore_instance_name:
2464
2497
  memorystore_instance_config = gcp_utils.get_gcp_memorystore_config(
@@ -411,7 +411,6 @@ class ClusterController(BaseController):
411
411
  cluster.id,
412
412
  cluster.state,
413
413
  cluster.cloud_id,
414
- cluster.cost_since_restarted_dollars,
415
414
  get_endpoint(f"/projects/{cluster.project_id}/clusters/{cluster.id}"),
416
415
  ]
417
416
  for cluster in cluster_list
@@ -419,14 +418,7 @@ class ClusterController(BaseController):
419
418
 
420
419
  table = tabulate.tabulate(
421
420
  clusters_table,
422
- headers=[
423
- "NAME",
424
- "ID",
425
- "STATE",
426
- "CLOUD ID",
427
- "COST SINCE LAST START",
428
- "URL",
429
- ],
421
+ headers=["NAME", "ID", "STATE", "CLOUD ID", "URL",],
430
422
  tablefmt="plain",
431
423
  )
432
424
  print(f"Clusters:\n{table}")
@@ -316,7 +316,6 @@ class JobController(BaseController):
316
316
  output_map = {
317
317
  "Name": job.name,
318
318
  "Id": job.id,
319
- "Cost (dollars)": job.cost_dollars,
320
319
  "Project name": job.project.name,
321
320
  "Cluster name": job.last_job_run.cluster.name
322
321
  if job.last_job_run and job.last_job_run.cluster
@@ -371,7 +370,6 @@ class JobController(BaseController):
371
370
  [
372
371
  job.name,
373
372
  job.id,
374
- job.cost_dollars,
375
373
  job.project.name,
376
374
  job.last_job_run.cluster.name
377
375
  if job.last_job_run and job.last_job_run.cluster
@@ -390,7 +388,6 @@ class JobController(BaseController):
390
388
  headers=[
391
389
  "NAME",
392
390
  "ID",
393
- "COST",
394
391
  "PROJECT NAME",
395
392
  "CLUSTER NAME",
396
393
  "CURRENT STATE",
@@ -22,13 +22,22 @@ class PrivateResourceQuotaSDK(BaseSDK):
22
22
  else None
23
23
  )
24
24
 
25
- user_id = (
26
- self.client.get_organization_collaborator(
25
+ user_id = None
26
+ if create_resource_quota.user_email:
27
+ users = self.client.get_organization_collaborators(
27
28
  email=create_resource_quota.user_email
28
- ).user_id
29
- if create_resource_quota.user_email
30
- else None
31
- )
29
+ )
30
+
31
+ if len(users) == 0:
32
+ raise ValueError(
33
+ f"User with email '{create_resource_quota.user_email}' not found."
34
+ )
35
+
36
+ if len(users) > 1:
37
+ raise ValueError(
38
+ f"Multiple users found for email '{create_resource_quota.user_email}'. Please contact Anyscale support."
39
+ )
40
+ user_id = users[0].user_id
32
41
 
33
42
  create_resource_quota_model = CreateResourceQuotaModel(
34
43
  name=create_resource_quota.name,
@@ -150,6 +150,120 @@ class DefaultApi(object):
150
150
  _request_timeout=local_var_params.get('_request_timeout'),
151
151
  collection_formats=collection_formats)
152
152
 
153
+ def archive_service(self, service_id, **kwargs): # noqa: E501
154
+ """Archive Service # noqa: E501
155
+
156
+ Archives a Service. It is a no-op if already archived. # noqa: E501
157
+ This method makes a synchronous HTTP request by default. To make an
158
+ asynchronous HTTP request, please pass async_req=True
159
+ >>> thread = api.archive_service(service_id, async_req=True)
160
+ >>> result = thread.get()
161
+
162
+ :param async_req bool: execute request asynchronously
163
+ :param str service_id: (required)
164
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
165
+ be returned without reading/decoding response
166
+ data. Default is True.
167
+ :param _request_timeout: timeout setting for this request. If one
168
+ number provided, it will be total request
169
+ timeout. It can also be a pair (tuple) of
170
+ (connection, read) timeouts.
171
+ :return: None
172
+ If the method is called asynchronously,
173
+ returns the request thread.
174
+ """
175
+ kwargs['_return_http_data_only'] = True
176
+ return self.archive_service_with_http_info(service_id, **kwargs) # noqa: E501
177
+
178
+ def archive_service_with_http_info(self, service_id, **kwargs): # noqa: E501
179
+ """Archive Service # noqa: E501
180
+
181
+ Archives a Service. It is a no-op if already archived. # noqa: E501
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.archive_service_with_http_info(service_id, async_req=True)
185
+ >>> result = thread.get()
186
+
187
+ :param async_req bool: execute request asynchronously
188
+ :param str service_id: (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: None
199
+ If the method is called asynchronously,
200
+ returns the request thread.
201
+ """
202
+
203
+ local_var_params = locals()
204
+
205
+ all_params = [
206
+ 'service_id'
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 archive_service" % key
222
+ )
223
+ local_var_params[key] = val
224
+ del local_var_params['kwargs']
225
+ # verify the required parameter 'service_id' is set
226
+ if self.api_client.client_side_validation and ('service_id' not in local_var_params or # noqa: E501
227
+ local_var_params['service_id'] is None): # noqa: E501
228
+ raise ApiValueError("Missing the required parameter `service_id` when calling `archive_service`") # noqa: E501
229
+
230
+ collection_formats = {}
231
+
232
+ path_params = {}
233
+ if 'service_id' in local_var_params:
234
+ path_params['service_id'] = local_var_params['service_id'] # noqa: E501
235
+
236
+ query_params = []
237
+
238
+ header_params = {}
239
+
240
+ form_params = []
241
+ local_var_files = {}
242
+
243
+ body_params = None
244
+ # HTTP header `Accept`
245
+ header_params['Accept'] = self.api_client.select_header_accept(
246
+ ['application/json']) # noqa: E501
247
+
248
+ # Authentication setting
249
+ auth_settings = [] # noqa: E501
250
+
251
+ return self.api_client.call_api(
252
+ '/services/{service_id}/archive', 'POST',
253
+ path_params,
254
+ query_params,
255
+ header_params,
256
+ body=body_params,
257
+ post_params=form_params,
258
+ files=local_var_files,
259
+ response_type=None, # noqa: E501
260
+ auth_settings=auth_settings,
261
+ async_req=local_var_params.get('async_req'),
262
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
263
+ _preload_content=local_var_params.get('_preload_content', True),
264
+ _request_timeout=local_var_params.get('_request_timeout'),
265
+ collection_formats=collection_formats)
266
+
153
267
  def create_app_config(self, create_app_config, **kwargs): # noqa: E501
154
268
  """Create App Config # noqa: E501
155
269
 
@@ -7266,6 +7380,7 @@ class DefaultApi(object):
7266
7380
  :param str project_id: project_id to filter by
7267
7381
  :param str name: name to filter by
7268
7382
  :param list[ServiceEventCurrentState] state_filter: A list of Service states to filter by
7383
+ :param ArchiveStatus archive_status: The archive status to filter by. Defaults to unarchived.
7269
7384
  :param str creator_id: creator_id to filter by
7270
7385
  :param str cloud_id: cloud_id to filter by
7271
7386
  :param ServiceSortField sort_field: If absent, the default sorting order is 1. status (active first).2. Last updated at (desc). 3. Name (asc).
@@ -7298,6 +7413,7 @@ class DefaultApi(object):
7298
7413
  :param str project_id: project_id to filter by
7299
7414
  :param str name: name to filter by
7300
7415
  :param list[ServiceEventCurrentState] state_filter: A list of Service states to filter by
7416
+ :param ArchiveStatus archive_status: The archive status to filter by. Defaults to unarchived.
7301
7417
  :param str creator_id: creator_id to filter by
7302
7418
  :param str cloud_id: cloud_id to filter by
7303
7419
  :param ServiceSortField sort_field: If absent, the default sorting order is 1. status (active first).2. Last updated at (desc). 3. Name (asc).
@@ -7324,6 +7440,7 @@ class DefaultApi(object):
7324
7440
  'project_id',
7325
7441
  'name',
7326
7442
  'state_filter',
7443
+ 'archive_status',
7327
7444
  'creator_id',
7328
7445
  'cloud_id',
7329
7446
  'sort_field',
@@ -7365,6 +7482,8 @@ class DefaultApi(object):
7365
7482
  if 'state_filter' in local_var_params and local_var_params['state_filter'] is not None: # noqa: E501
7366
7483
  query_params.append(('state_filter', local_var_params['state_filter'])) # noqa: E501
7367
7484
  collection_formats['state_filter'] = 'multi' # noqa: E501
7485
+ if 'archive_status' in local_var_params and local_var_params['archive_status'] is not None: # noqa: E501
7486
+ query_params.append(('archive_status', local_var_params['archive_status'])) # noqa: E501
7368
7487
  if 'creator_id' in local_var_params and local_var_params['creator_id'] is not None: # noqa: E501
7369
7488
  query_params.append(('creator_id', local_var_params['creator_id'])) # noqa: E501
7370
7489
  if 'cloud_id' in local_var_params and local_var_params['cloud_id'] is not None: # noqa: E501