anyscale 0.24.86__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.
- anyscale/__init__.py +181 -0
- anyscale/_private/anyscale_client/README.md +16 -0
- anyscale/_private/anyscale_client/__init__.py +8 -0
- anyscale/_private/anyscale_client/anyscale_client.py +1847 -0
- anyscale/_private/anyscale_client/common.py +593 -0
- anyscale/_private/anyscale_client/fake_anyscale_client.py +1080 -0
- anyscale/_private/docgen/README.md +15 -0
- anyscale/_private/docgen/__main__.py +700 -0
- anyscale/_private/docgen/api.md +1106 -0
- anyscale/_private/docgen/generator.py +559 -0
- anyscale/_private/docgen/generator_legacy.py +104 -0
- anyscale/_private/docgen/models.md +2261 -0
- anyscale/_private/models/__init__.py +2 -0
- anyscale/_private/models/image_uri.py +116 -0
- anyscale/_private/models/model_base.py +251 -0
- anyscale/_private/sdk/__init__.py +102 -0
- anyscale/_private/sdk/base_sdk.py +35 -0
- anyscale/_private/sdk/timer.py +46 -0
- anyscale/_private/utils/__init__.py +0 -0
- anyscale/_private/utils/progress_util.py +85 -0
- anyscale/_private/workload/__init__.py +2 -0
- anyscale/_private/workload/workload_config.py +195 -0
- anyscale/_private/workload/workload_sdk.py +324 -0
- anyscale/aggregated_instance_usage/__init__.py +36 -0
- anyscale/aggregated_instance_usage/_private/aggregated_instance_usage_sdk.py +30 -0
- anyscale/aggregated_instance_usage/commands.py +42 -0
- anyscale/aggregated_instance_usage/models.py +85 -0
- anyscale/anyscale-cloud-setup-gcp-oa.yaml +88 -0
- anyscale/anyscale-cloud-setup-gcp.yaml +113 -0
- anyscale/anyscale-cloud-setup-oa.yaml +121 -0
- anyscale/anyscale-cloud-setup.yaml +327 -0
- anyscale/anyscale_pydantic/HISTORY.md +1254 -0
- anyscale/anyscale_pydantic/LICENSE +21 -0
- anyscale/anyscale_pydantic/PKG-INFO +1351 -0
- anyscale/anyscale_pydantic/README.md +7 -0
- anyscale/anyscale_pydantic/__init__.py +131 -0
- anyscale/anyscale_pydantic/_hypothesis_plugin.py +391 -0
- anyscale/anyscale_pydantic/annotated_types.py +72 -0
- anyscale/anyscale_pydantic/class_validators.py +361 -0
- anyscale/anyscale_pydantic/color.py +494 -0
- anyscale/anyscale_pydantic/config.py +191 -0
- anyscale/anyscale_pydantic/dataclasses.py +478 -0
- anyscale/anyscale_pydantic/datetime_parse.py +248 -0
- anyscale/anyscale_pydantic/decorator.py +264 -0
- anyscale/anyscale_pydantic/env_settings.py +350 -0
- anyscale/anyscale_pydantic/error_wrappers.py +162 -0
- anyscale/anyscale_pydantic/errors.py +646 -0
- anyscale/anyscale_pydantic/fields.py +1256 -0
- anyscale/anyscale_pydantic/generics.py +400 -0
- anyscale/anyscale_pydantic/json.py +112 -0
- anyscale/anyscale_pydantic/main.py +1109 -0
- anyscale/anyscale_pydantic/mypy.py +943 -0
- anyscale/anyscale_pydantic/networks.py +739 -0
- anyscale/anyscale_pydantic/parse.py +66 -0
- anyscale/anyscale_pydantic/py.typed +0 -0
- anyscale/anyscale_pydantic/schema.py +1164 -0
- anyscale/anyscale_pydantic/tools.py +92 -0
- anyscale/anyscale_pydantic/types.py +1206 -0
- anyscale/anyscale_pydantic/typing.py +603 -0
- anyscale/anyscale_pydantic/utils.py +803 -0
- anyscale/anyscale_pydantic/validators.py +765 -0
- anyscale/anyscale_pydantic/version.py +38 -0
- anyscale/anyscale_schema.json +9 -0
- anyscale/api.py +215 -0
- anyscale/api_utils/README.md +2 -0
- anyscale/api_utils/__init__.py +0 -0
- anyscale/api_utils/common_utils.py +81 -0
- anyscale/api_utils/exceptions/__init__.py +0 -0
- anyscale/api_utils/exceptions/job_errors.py +2 -0
- anyscale/api_utils/job_logs_util.py +116 -0
- anyscale/api_utils/job_util.py +22 -0
- anyscale/api_utils/logs_util.py +61 -0
- anyscale/authenticate.py +298 -0
- anyscale/aws_iam_policies.py +465 -0
- anyscale/background/__init__.py +0 -0
- anyscale/background/job_runner.py +64 -0
- anyscale/cli_logger.py +378 -0
- anyscale/client/.gitignore +66 -0
- anyscale/client/.openapi-generator/VERSION +1 -0
- anyscale/client/.openapi-generator-ignore +23 -0
- anyscale/client/README.md +1070 -0
- anyscale/client/git_push.sh +58 -0
- anyscale/client/openapi_client/__init__.py +667 -0
- anyscale/client/openapi_client/api/__init__.py +6 -0
- anyscale/client/openapi_client/api/default_api.py +40922 -0
- anyscale/client/openapi_client/api_client.py +647 -0
- anyscale/client/openapi_client/configuration.py +373 -0
- anyscale/client/openapi_client/exceptions.py +120 -0
- anyscale/client/openapi_client/models/__init__.py +652 -0
- anyscale/client/openapi_client/models/access_config.py +122 -0
- anyscale/client/openapi_client/models/aggregated_instance_usage_with_cost_model.py +733 -0
- anyscale/client/openapi_client/models/aggregatedinstanceusagewithcostmodel_list_response.py +147 -0
- anyscale/client/openapi_client/models/aica_endpoint.py +527 -0
- anyscale/client/openapi_client/models/aica_endpoint_event.py +433 -0
- anyscale/client/openapi_client/models/aica_endpoint_event_level.py +103 -0
- anyscale/client/openapi_client/models/aica_endpoint_event_type.py +120 -0
- anyscale/client/openapi_client/models/aica_endpoint_scope.py +102 -0
- anyscale/client/openapi_client/models/aica_model.py +398 -0
- anyscale/client/openapi_client/models/aica_model_accelerator_map.py +123 -0
- anyscale/client/openapi_client/models/aica_model_configuration.py +209 -0
- anyscale/client/openapi_client/models/aica_observability_urls.py +178 -0
- anyscale/client/openapi_client/models/aicaendpoint_list_response.py +147 -0
- anyscale/client/openapi_client/models/aicaendpoint_response.py +121 -0
- anyscale/client/openapi_client/models/aicaendpointevent_list_response.py +147 -0
- anyscale/client/openapi_client/models/aicamodel_list_response.py +147 -0
- anyscale/client/openapi_client/models/aicamodel_response.py +121 -0
- anyscale/client/openapi_client/models/aioa_cloud_waitlist_record.py +254 -0
- anyscale/client/openapi_client/models/aioacloudwaitlistrecord_response.py +121 -0
- anyscale/client/openapi_client/models/alert_type.py +103 -0
- anyscale/client/openapi_client/models/anyscale_aws_account.py +121 -0
- anyscale/client/openapi_client/models/anyscale_service_account.py +256 -0
- anyscale/client/openapi_client/models/anyscale_version_response.py +121 -0
- anyscale/client/openapi_client/models/anyscaleawsaccount_response.py +121 -0
- anyscale/client/openapi_client/models/anyscaled_credential_response.py +121 -0
- anyscale/client/openapi_client/models/anyscaledcredentialresponse_response.py +121 -0
- anyscale/client/openapi_client/models/anyscaleserviceaccount_response.py +121 -0
- anyscale/client/openapi_client/models/anyscaleversionresponse_response.py +121 -0
- anyscale/client/openapi_client/models/api_key_parameters.py +147 -0
- anyscale/client/openapi_client/models/app_config.py +436 -0
- anyscale/client/openapi_client/models/app_config_config_schema.py +235 -0
- anyscale/client/openapi_client/models/appconfig_list_response.py +147 -0
- anyscale/client/openapi_client/models/appconfig_response.py +121 -0
- anyscale/client/openapi_client/models/application_type.py +99 -0
- anyscale/client/openapi_client/models/applied_snapshot.py +175 -0
- anyscale/client/openapi_client/models/apply_production_service_v2_model.py +490 -0
- anyscale/client/openapi_client/models/archive_status.py +101 -0
- anyscale/client/openapi_client/models/archived_logs_info.py +164 -0
- anyscale/client/openapi_client/models/archivedlogsinfo_response.py +121 -0
- anyscale/client/openapi_client/models/attach_machine_pool_to_cloud_request.py +152 -0
- anyscale/client/openapi_client/models/attachmachinepooltocloudresponse_response.py +121 -0
- anyscale/client/openapi_client/models/aviary_model_config_v2.py +358 -0
- anyscale/client/openapi_client/models/aws_credentials.py +181 -0
- anyscale/client/openapi_client/models/aws_memory_db_cluster_config.py +148 -0
- anyscale/client/openapi_client/models/aws_region_and_zones.py +123 -0
- anyscale/client/openapi_client/models/aws_region_info.py +152 -0
- anyscale/client/openapi_client/models/awsregionandzones_response.py +121 -0
- anyscale/client/openapi_client/models/bank_account_information.py +239 -0
- anyscale/client/openapi_client/models/base_job_status.py +105 -0
- anyscale/client/openapi_client/models/baseimagesenum.py +2130 -0
- anyscale/client/openapi_client/models/batch_response_batched_result_organization_invitation_base.py +121 -0
- anyscale/client/openapi_client/models/batched_result_organization_invitation_base.py +173 -0
- anyscale/client/openapi_client/models/billing_information.py +181 -0
- anyscale/client/openapi_client/models/billing_version_code.py +100 -0
- anyscale/client/openapi_client/models/body_aws_marketplace_registration_api_v2_organization_billing_aws_marketplace_registration_post.py +121 -0
- anyscale/client/openapi_client/models/buffer_registration.py +285 -0
- anyscale/client/openapi_client/models/build.py +607 -0
- anyscale/client/openapi_client/models/build_log_response.py +123 -0
- anyscale/client/openapi_client/models/build_registration.py +285 -0
- anyscale/client/openapi_client/models/build_response.py +121 -0
- anyscale/client/openapi_client/models/build_status.py +104 -0
- anyscale/client/openapi_client/models/buildlogresponse_response.py +121 -0
- anyscale/client/openapi_client/models/card.py +181 -0
- anyscale/client/openapi_client/models/card_id.py +108 -0
- anyscale/client/openapi_client/models/card_list_response.py +147 -0
- anyscale/client/openapi_client/models/change_password_params.py +148 -0
- anyscale/client/openapi_client/models/cleanup_leaked_grafana_dashboard_response.py +208 -0
- anyscale/client/openapi_client/models/cleanupleakedgrafanadashboardresponse_response.py +121 -0
- anyscale/client/openapi_client/models/clone_experimental_workspace.py +151 -0
- anyscale/client/openapi_client/models/cloud.py +802 -0
- anyscale/client/openapi_client/models/cloud_analytics_event.py +351 -0
- anyscale/client/openapi_client/models/cloud_analytics_event_cloud_provider_error.py +152 -0
- anyscale/client/openapi_client/models/cloud_analytics_event_cloud_resource.py +117 -0
- anyscale/client/openapi_client/models/cloud_analytics_event_command_name.py +103 -0
- anyscale/client/openapi_client/models/cloud_analytics_event_error.py +150 -0
- anyscale/client/openapi_client/models/cloud_analytics_event_name.py +109 -0
- anyscale/client/openapi_client/models/cloud_collaborator.py +175 -0
- anyscale/client/openapi_client/models/cloud_collaborator_value.py +177 -0
- anyscale/client/openapi_client/models/cloud_collaborators_query.py +122 -0
- anyscale/client/openapi_client/models/cloud_config.py +206 -0
- anyscale/client/openapi_client/models/cloud_data_bucket_access_mode.py +100 -0
- anyscale/client/openapi_client/models/cloud_data_bucket_file_type.py +102 -0
- anyscale/client/openapi_client/models/cloud_data_bucket_presigned_upload_info.py +268 -0
- anyscale/client/openapi_client/models/cloud_data_bucket_presigned_upload_request.py +152 -0
- anyscale/client/openapi_client/models/cloud_data_bucket_presigned_upload_scheme.py +100 -0
- anyscale/client/openapi_client/models/cloud_data_bucket_presigned_url_request.py +209 -0
- anyscale/client/openapi_client/models/cloud_data_bucket_presigned_url_response.py +296 -0
- anyscale/client/openapi_client/models/cloud_data_bucket_presigned_url_scheme.py +100 -0
- anyscale/client/openapi_client/models/cloud_data_bucket_request_scope.py +100 -0
- anyscale/client/openapi_client/models/cloud_hosting_type.py +100 -0
- anyscale/client/openapi_client/models/cloud_list_response.py +147 -0
- anyscale/client/openapi_client/models/cloud_name_options.py +121 -0
- anyscale/client/openapi_client/models/cloud_overview_dashboard.py +175 -0
- anyscale/client/openapi_client/models/cloud_project_collaborator.py +175 -0
- anyscale/client/openapi_client/models/cloud_project_collaborator_value.py +121 -0
- anyscale/client/openapi_client/models/cloud_provider.py +102 -0
- anyscale/client/openapi_client/models/cloud_providers.py +103 -0
- anyscale/client/openapi_client/models/cloud_region_and_zones.py +123 -0
- anyscale/client/openapi_client/models/cloud_region_info.py +152 -0
- anyscale/client/openapi_client/models/cloud_resource.py +740 -0
- anyscale/client/openapi_client/models/cloud_resource_gcp.py +691 -0
- anyscale/client/openapi_client/models/cloud_response.py +121 -0
- anyscale/client/openapi_client/models/cloud_state.py +104 -0
- anyscale/client/openapi_client/models/cloud_status.py +100 -0
- anyscale/client/openapi_client/models/cloud_type.py +100 -0
- anyscale/client/openapi_client/models/cloud_types.py +100 -0
- anyscale/client/openapi_client/models/cloud_version.py +100 -0
- anyscale/client/openapi_client/models/cloud_waitlist_status.py +102 -0
- anyscale/client/openapi_client/models/cloud_with_cloud_resource.py +830 -0
- anyscale/client/openapi_client/models/cloud_with_cloud_resource_gcp.py +830 -0
- anyscale/client/openapi_client/models/cloudcollaborator_list_response.py +147 -0
- anyscale/client/openapi_client/models/clouddatabucketpresigneduploadinfo_response.py +121 -0
- anyscale/client/openapi_client/models/clouddatabucketpresignedurlresponse_response.py +121 -0
- anyscale/client/openapi_client/models/cloudoverviewdashboard_response.py +121 -0
- anyscale/client/openapi_client/models/cloudregionandzones_response.py +121 -0
- anyscale/client/openapi_client/models/cloudresource_response.py +121 -0
- anyscale/client/openapi_client/models/cloudresourcegcp_response.py +121 -0
- anyscale/client/openapi_client/models/cloudwithcloudresource_response.py +121 -0
- anyscale/client/openapi_client/models/cloudwithcloudresourcegcp_response.py +121 -0
- anyscale/client/openapi_client/models/cluster_auth_response.py +148 -0
- anyscale/client/openapi_client/models/cluster_config.py +178 -0
- anyscale/client/openapi_client/models/cluster_config_with_session_idle_timeout.py +204 -0
- anyscale/client/openapi_client/models/cluster_environments_query.py +290 -0
- anyscale/client/openapi_client/models/cluster_event.py +174 -0
- anyscale/client/openapi_client/models/cluster_events_output.py +175 -0
- anyscale/client/openapi_client/models/cluster_features.py +152 -0
- anyscale/client/openapi_client/models/cluster_management_stack_versions.py +100 -0
- anyscale/client/openapi_client/models/cluster_startup.py +208 -0
- anyscale/client/openapi_client/models/cluster_status.py +104 -0
- anyscale/client/openapi_client/models/cluster_status_details.py +100 -0
- anyscale/client/openapi_client/models/clusterauthresponse_response.py +121 -0
- anyscale/client/openapi_client/models/clusterconfig_response.py +121 -0
- anyscale/client/openapi_client/models/clusterconfigwithsessionidletimeout_response.py +121 -0
- anyscale/client/openapi_client/models/clustereventsoutput_response.py +121 -0
- anyscale/client/openapi_client/models/clusterfeatures_response.py +121 -0
- anyscale/client/openapi_client/models/company_size.py +103 -0
- anyscale/client/openapi_client/models/compute_node_type.py +292 -0
- anyscale/client/openapi_client/models/compute_stack.py +100 -0
- anyscale/client/openapi_client/models/compute_template.py +415 -0
- anyscale/client/openapi_client/models/compute_template_config.py +461 -0
- anyscale/client/openapi_client/models/compute_template_query.py +316 -0
- anyscale/client/openapi_client/models/computetemplate_response.py +121 -0
- anyscale/client/openapi_client/models/computetemplateconfig_response.py +121 -0
- anyscale/client/openapi_client/models/create_aica_endpoint.py +210 -0
- anyscale/client/openapi_client/models/create_aioa_cloud_waitlist.py +173 -0
- anyscale/client/openapi_client/models/create_analytics_event.py +122 -0
- anyscale/client/openapi_client/models/create_app_config.py +235 -0
- anyscale/client/openapi_client/models/create_app_config_configuration_schema.py +235 -0
- anyscale/client/openapi_client/models/create_billing_version.py +181 -0
- anyscale/client/openapi_client/models/create_bug_report_response.py +152 -0
- anyscale/client/openapi_client/models/create_build.py +263 -0
- anyscale/client/openapi_client/models/create_byod_app_config.py +180 -0
- anyscale/client/openapi_client/models/create_byod_app_config_configuration_schema.py +206 -0
- anyscale/client/openapi_client/models/create_byod_build.py +152 -0
- anyscale/client/openapi_client/models/create_cloud_collaborator.py +148 -0
- anyscale/client/openapi_client/models/create_cloud_resource.py +682 -0
- anyscale/client/openapi_client/models/create_cloud_resource_gcp.py +633 -0
- anyscale/client/openapi_client/models/create_cloud_with_cloud_resource.py +546 -0
- anyscale/client/openapi_client/models/create_cluster_compute_config.py +463 -0
- anyscale/client/openapi_client/models/create_compute_template.py +229 -0
- anyscale/client/openapi_client/models/create_compute_template_config.py +464 -0
- anyscale/client/openapi_client/models/create_dataset.py +200 -0
- anyscale/client/openapi_client/models/create_experimental_workspace.py +435 -0
- anyscale/client/openapi_client/models/create_experimental_workspace_from_job.py +123 -0
- anyscale/client/openapi_client/models/create_fine_tuning_hyperparameters.py +156 -0
- anyscale/client/openapi_client/models/create_fine_tuning_job_product_request.py +353 -0
- anyscale/client/openapi_client/models/create_instance_usage_budget.py +253 -0
- anyscale/client/openapi_client/models/create_internal_production_job.py +262 -0
- anyscale/client/openapi_client/models/create_job_queue_config.py +206 -0
- anyscale/client/openapi_client/models/create_job_queue_requests.py +323 -0
- anyscale/client/openapi_client/models/create_machine_pool_request.py +151 -0
- anyscale/client/openapi_client/models/create_machine_pool_response.py +123 -0
- anyscale/client/openapi_client/models/create_machine_request.py +151 -0
- anyscale/client/openapi_client/models/create_machine_response.py +123 -0
- anyscale/client/openapi_client/models/create_metronome_webhook_notification.py +175 -0
- anyscale/client/openapi_client/models/create_notification_channel_record.py +146 -0
- anyscale/client/openapi_client/models/create_organization_configuration.py +199 -0
- anyscale/client/openapi_client/models/create_organization_invitation.py +121 -0
- anyscale/client/openapi_client/models/create_otp_return_api_model.py +148 -0
- anyscale/client/openapi_client/models/create_production_job_config.py +347 -0
- anyscale/client/openapi_client/models/create_resource_quota.py +293 -0
- anyscale/client/openapi_client/models/create_schedule.py +263 -0
- anyscale/client/openapi_client/models/create_session_from_snapshot_options.py +565 -0
- anyscale/client/openapi_client/models/create_session_in_db.py +434 -0
- anyscale/client/openapi_client/models/create_session_response.py +174 -0
- anyscale/client/openapi_client/models/create_user.py +439 -0
- anyscale/client/openapi_client/models/create_user_project_collaborator.py +148 -0
- anyscale/client/openapi_client/models/create_user_project_collaborator_value.py +121 -0
- anyscale/client/openapi_client/models/create_workspace_from_template.py +263 -0
- anyscale/client/openapi_client/models/createbugreportresponse_response.py +121 -0
- anyscale/client/openapi_client/models/createcomputetemplateconfig_response.py +121 -0
- anyscale/client/openapi_client/models/createmachinepoolresponse_response.py +121 -0
- anyscale/client/openapi_client/models/createmachineresponse_response.py +121 -0
- anyscale/client/openapi_client/models/createotpreturnapimodel_response.py +121 -0
- anyscale/client/openapi_client/models/createsessionresponse_response.py +121 -0
- anyscale/client/openapi_client/models/credit_card_information.py +268 -0
- anyscale/client/openapi_client/models/customer_alert_status.py +101 -0
- anyscale/client/openapi_client/models/customer_billing_type.py +101 -0
- anyscale/client/openapi_client/models/dataplane_services.py +102 -0
- anyscale/client/openapi_client/models/dataset.py +416 -0
- anyscale/client/openapi_client/models/dataset_list_response.py +150 -0
- anyscale/client/openapi_client/models/dataset_response.py +121 -0
- anyscale/client/openapi_client/models/dataset_upload.py +148 -0
- anyscale/client/openapi_client/models/datasetupload_response.py +121 -0
- anyscale/client/openapi_client/models/decorated_application_template.py +493 -0
- anyscale/client/openapi_client/models/decorated_build.py +664 -0
- anyscale/client/openapi_client/models/decorated_compute_template.py +446 -0
- anyscale/client/openapi_client/models/decorated_compute_template_config.py +490 -0
- anyscale/client/openapi_client/models/decorated_interactive_session.py +793 -0
- anyscale/client/openapi_client/models/decorated_job.py +793 -0
- anyscale/client/openapi_client/models/decorated_job_queue.py +639 -0
- anyscale/client/openapi_client/models/decorated_job_submission.py +575 -0
- anyscale/client/openapi_client/models/decorated_list_service_api_model.py +670 -0
- anyscale/client/openapi_client/models/decorated_production_job.py +805 -0
- anyscale/client/openapi_client/models/decorated_production_job_state_transition.py +319 -0
- anyscale/client/openapi_client/models/decorated_production_service_v2_api_model.py +641 -0
- anyscale/client/openapi_client/models/decorated_production_service_v2_version_api_model.py +437 -0
- anyscale/client/openapi_client/models/decorated_runtime_env.py +488 -0
- anyscale/client/openapi_client/models/decorated_schedule.py +552 -0
- anyscale/client/openapi_client/models/decorated_serve_deployment.py +711 -0
- anyscale/client/openapi_client/models/decorated_service_event_api_model.py +513 -0
- anyscale/client/openapi_client/models/decorated_session.py +1789 -0
- anyscale/client/openapi_client/models/decorated_support_request.py +283 -0
- anyscale/client/openapi_client/models/decorated_unified_job.py +466 -0
- anyscale/client/openapi_client/models/decoratedapplicationtemplate_list_response.py +147 -0
- anyscale/client/openapi_client/models/decoratedapplicationtemplate_response.py +121 -0
- anyscale/client/openapi_client/models/decoratedbuild_list_response.py +147 -0
- anyscale/client/openapi_client/models/decoratedbuild_response.py +121 -0
- anyscale/client/openapi_client/models/decoratedcomputetemplate_list_response.py +147 -0
- anyscale/client/openapi_client/models/decoratedcomputetemplate_response.py +121 -0
- anyscale/client/openapi_client/models/decoratedinteractivesession_list_response.py +147 -0
- anyscale/client/openapi_client/models/decoratedinteractivesession_response.py +121 -0
- anyscale/client/openapi_client/models/decoratedjob_list_response.py +147 -0
- anyscale/client/openapi_client/models/decoratedjob_response.py +121 -0
- anyscale/client/openapi_client/models/decoratedjobqueue_list_response.py +147 -0
- anyscale/client/openapi_client/models/decoratedjobqueue_response.py +121 -0
- anyscale/client/openapi_client/models/decoratedjobsubmission_list_response.py +147 -0
- anyscale/client/openapi_client/models/decoratedjobsubmission_response.py +121 -0
- anyscale/client/openapi_client/models/decoratedlistserviceapimodel_list_response.py +147 -0
- anyscale/client/openapi_client/models/decoratedproductionjob_list_response.py +147 -0
- anyscale/client/openapi_client/models/decoratedproductionjob_response.py +121 -0
- anyscale/client/openapi_client/models/decoratedproductionjobstatetransition_list_response.py +147 -0
- anyscale/client/openapi_client/models/decoratedproductionservicev2_apimodel_response.py +121 -0
- anyscale/client/openapi_client/models/decoratedproductionservicev2_versionapimodel_list_response.py +147 -0
- anyscale/client/openapi_client/models/decoratedruntimeenv_list_response.py +147 -0
- anyscale/client/openapi_client/models/decoratedruntimeenv_response.py +121 -0
- anyscale/client/openapi_client/models/decoratedschedule_list_response.py +147 -0
- anyscale/client/openapi_client/models/decoratedschedule_response.py +121 -0
- anyscale/client/openapi_client/models/decoratedservedeployment_list_response.py +147 -0
- anyscale/client/openapi_client/models/decoratedservedeployment_response.py +121 -0
- anyscale/client/openapi_client/models/decoratedserviceeventapimodel_list_response.py +147 -0
- anyscale/client/openapi_client/models/decoratedsession_list_response.py +147 -0
- anyscale/client/openapi_client/models/decoratedsession_response.py +121 -0
- anyscale/client/openapi_client/models/decoratedsupportrequest_list_response.py +147 -0
- anyscale/client/openapi_client/models/decoratedsupportrequest_response.py +121 -0
- anyscale/client/openapi_client/models/decoratedunifiedjob_list_response.py +147 -0
- anyscale/client/openapi_client/models/decoratedunifiedjob_response.py +121 -0
- anyscale/client/openapi_client/models/delete_machine_pool_request.py +123 -0
- anyscale/client/openapi_client/models/delete_machine_request.py +206 -0
- anyscale/client/openapi_client/models/deleted_platform_fine_tuned_model.py +148 -0
- anyscale/client/openapi_client/models/deletedplatformfinetunedmodel_response.py +121 -0
- anyscale/client/openapi_client/models/deletemachinepoolresponse_response.py +121 -0
- anyscale/client/openapi_client/models/detach_machine_pool_from_cloud_request.py +152 -0
- anyscale/client/openapi_client/models/detachmachinepoolfromcloudresponse_response.py +121 -0
- anyscale/client/openapi_client/models/dismissal_type.py +100 -0
- anyscale/client/openapi_client/models/editable_cloud_resource.py +206 -0
- anyscale/client/openapi_client/models/editable_cloud_resource_gcp.py +178 -0
- anyscale/client/openapi_client/models/error.py +174 -0
- anyscale/client/openapi_client/models/event_level.py +104 -0
- anyscale/client/openapi_client/models/execute_command_response.py +175 -0
- anyscale/client/openapi_client/models/execute_interactive_command_options.py +147 -0
- anyscale/client/openapi_client/models/execute_shell_command_options.py +121 -0
- anyscale/client/openapi_client/models/executecommandresponse_response.py +121 -0
- anyscale/client/openapi_client/models/experimental_workspace.py +748 -0
- anyscale/client/openapi_client/models/experimental_workspaces_sort_field.py +100 -0
- anyscale/client/openapi_client/models/experimentalworkspace_list_response.py +147 -0
- anyscale/client/openapi_client/models/experimentalworkspace_response.py +121 -0
- anyscale/client/openapi_client/models/external_service_status.py +147 -0
- anyscale/client/openapi_client/models/external_service_status_response.py +250 -0
- anyscale/client/openapi_client/models/external_terminal_command.py +280 -0
- anyscale/client/openapi_client/models/externalservicestatusresponse_response.py +121 -0
- anyscale/client/openapi_client/models/feature_compatibility.py +152 -0
- anyscale/client/openapi_client/models/feature_flag_response.py +121 -0
- anyscale/client/openapi_client/models/featureflagresponse_response.py +121 -0
- anyscale/client/openapi_client/models/fine_tune_type.py +100 -0
- anyscale/client/openapi_client/models/fine_tuned_model.py +412 -0
- anyscale/client/openapi_client/models/fine_tuning_job_status.py +103 -0
- anyscale/client/openapi_client/models/finetunedmodel_list_response.py +147 -0
- anyscale/client/openapi_client/models/finetunedmodel_response.py +121 -0
- anyscale/client/openapi_client/models/finish_ft_job_request.py +204 -0
- anyscale/client/openapi_client/models/finish_ft_job_request_v2.py +183 -0
- anyscale/client/openapi_client/models/gcp_file_store_config.py +175 -0
- anyscale/client/openapi_client/models/gcp_memorystore_instance_config.py +148 -0
- anyscale/client/openapi_client/models/grafana_dashboard.py +201 -0
- anyscale/client/openapi_client/models/grpc_protocol_config.py +178 -0
- anyscale/client/openapi_client/models/ha_job_error_types.py +103 -0
- anyscale/client/openapi_client/models/ha_job_event_level.py +101 -0
- anyscale/client/openapi_client/models/ha_job_event_origin.py +100 -0
- anyscale/client/openapi_client/models/ha_job_goal_states.py +102 -0
- anyscale/client/openapi_client/models/ha_job_states.py +109 -0
- anyscale/client/openapi_client/models/ha_job_type.py +100 -0
- anyscale/client/openapi_client/models/ha_jobs_sort_field.py +105 -0
- anyscale/client/openapi_client/models/head_ip.py +121 -0
- anyscale/client/openapi_client/models/headip_response.py +121 -0
- anyscale/client/openapi_client/models/http_protocol_config.py +150 -0
- anyscale/client/openapi_client/models/http_validation_error.py +120 -0
- anyscale/client/openapi_client/models/idle_termination_status.py +104 -0
- anyscale/client/openapi_client/models/import_aica_model.py +241 -0
- anyscale/client/openapi_client/models/instance_usage_budget.py +572 -0
- anyscale/client/openapi_client/models/instance_usage_budget_evaluation_period.py +100 -0
- anyscale/client/openapi_client/models/instanceusagebudget_list_response.py +147 -0
- anyscale/client/openapi_client/models/instanceusagebudget_response.py +121 -0
- anyscale/client/openapi_client/models/integration_details.py +120 -0
- anyscale/client/openapi_client/models/interactive_session_logs.py +152 -0
- anyscale/client/openapi_client/models/interactivesessionlogs_response.py +121 -0
- anyscale/client/openapi_client/models/internal_production_job.py +663 -0
- anyscale/client/openapi_client/models/internalproductionjob_response.py +121 -0
- anyscale/client/openapi_client/models/invoice.py +413 -0
- anyscale/client/openapi_client/models/invoice_list_response.py +147 -0
- anyscale/client/openapi_client/models/invoice_status.py +102 -0
- anyscale/client/openapi_client/models/invoices_query.py +150 -0
- anyscale/client/openapi_client/models/job_access.py +102 -0
- anyscale/client/openapi_client/models/job_queue.py +467 -0
- anyscale/client/openapi_client/models/job_queue_config.py +122 -0
- anyscale/client/openapi_client/models/job_queue_execution_mode.py +101 -0
- anyscale/client/openapi_client/models/job_queue_spec.py +263 -0
- anyscale/client/openapi_client/models/job_queue_state.py +100 -0
- anyscale/client/openapi_client/models/job_queues_query.py +262 -0
- anyscale/client/openapi_client/models/job_run_type.py +101 -0
- anyscale/client/openapi_client/models/job_state_log_level_types.py +100 -0
- anyscale/client/openapi_client/models/job_status.py +105 -0
- anyscale/client/openapi_client/models/job_submissions_sort_field.py +101 -0
- anyscale/client/openapi_client/models/jobqueue_response.py +121 -0
- anyscale/client/openapi_client/models/jobs_logs.py +152 -0
- anyscale/client/openapi_client/models/jobs_logs_query_info.py +181 -0
- anyscale/client/openapi_client/models/jobs_sort_field.py +104 -0
- anyscale/client/openapi_client/models/jobslogs_response.py +121 -0
- anyscale/client/openapi_client/models/jobslogsqueryinfo_response.py +121 -0
- anyscale/client/openapi_client/models/json_patch_operation.py +200 -0
- anyscale/client/openapi_client/models/kubernetes_manager_registration_request.py +123 -0
- anyscale/client/openapi_client/models/kubernetes_manager_registration_response.py +123 -0
- anyscale/client/openapi_client/models/kubernetesmanagerregistrationresponse_response.py +121 -0
- anyscale/client/openapi_client/models/lb_resource.py +123 -0
- anyscale/client/openapi_client/models/lbresource_response.py +121 -0
- anyscale/client/openapi_client/models/list_machine_pools_response.py +123 -0
- anyscale/client/openapi_client/models/list_machines_response.py +121 -0
- anyscale/client/openapi_client/models/list_resource_quotas_query.py +234 -0
- anyscale/client/openapi_client/models/list_response_metadata.py +146 -0
- anyscale/client/openapi_client/models/listmachinepoolsresponse_response.py +121 -0
- anyscale/client/openapi_client/models/listmachinesresponse_response.py +121 -0
- anyscale/client/openapi_client/models/log_detail.py +187 -0
- anyscale/client/openapi_client/models/log_details.py +151 -0
- anyscale/client/openapi_client/models/log_download_config.py +206 -0
- anyscale/client/openapi_client/models/log_download_request.py +150 -0
- anyscale/client/openapi_client/models/log_download_result.py +207 -0
- anyscale/client/openapi_client/models/log_file_chunk.py +439 -0
- anyscale/client/openapi_client/models/log_filter.py +430 -0
- anyscale/client/openapi_client/models/log_item.py +181 -0
- anyscale/client/openapi_client/models/log_item_batch.py +151 -0
- anyscale/client/openapi_client/models/log_level_types.py +100 -0
- anyscale/client/openapi_client/models/log_stream.py +151 -0
- anyscale/client/openapi_client/models/logdetails_response.py +121 -0
- anyscale/client/openapi_client/models/logdownloadresult_response.py +121 -0
- anyscale/client/openapi_client/models/login_user_params.py +205 -0
- anyscale/client/openapi_client/models/logitembatch_response.py +121 -0
- anyscale/client/openapi_client/models/logs_output.py +202 -0
- anyscale/client/openapi_client/models/logsoutput_response.py +121 -0
- anyscale/client/openapi_client/models/logstream_response.py +121 -0
- anyscale/client/openapi_client/models/long_running_workload.py +256 -0
- anyscale/client/openapi_client/models/longrunningworkload_list_response.py +147 -0
- anyscale/client/openapi_client/models/machine_allocation_state.py +100 -0
- anyscale/client/openapi_client/models/machine_connection_state.py +100 -0
- anyscale/client/openapi_client/models/machine_info.py +466 -0
- anyscale/client/openapi_client/models/machine_pool.py +266 -0
- anyscale/client/openapi_client/models/metronome_customer_info_model.py +148 -0
- anyscale/client/openapi_client/models/metronome_dashboard_type.py +101 -0
- anyscale/client/openapi_client/models/metronomecustomerinfomodel_list_response.py +147 -0
- anyscale/client/openapi_client/models/metronomecustomerinfomodel_response.py +121 -0
- anyscale/client/openapi_client/models/mini_build.py +267 -0
- anyscale/client/openapi_client/models/mini_cloud.py +321 -0
- anyscale/client/openapi_client/models/mini_cluster.py +148 -0
- anyscale/client/openapi_client/models/mini_compute_template.py +228 -0
- anyscale/client/openapi_client/models/mini_compute_template_config.py +121 -0
- anyscale/client/openapi_client/models/mini_job_run.py +599 -0
- anyscale/client/openapi_client/models/mini_namespace.py +148 -0
- anyscale/client/openapi_client/models/mini_organization.py +148 -0
- anyscale/client/openapi_client/models/mini_production_job.py +202 -0
- anyscale/client/openapi_client/models/mini_project.py +205 -0
- anyscale/client/openapi_client/models/mini_runtime_environment.py +147 -0
- anyscale/client/openapi_client/models/mini_schedule.py +180 -0
- anyscale/client/openapi_client/models/mini_user.py +266 -0
- anyscale/client/openapi_client/models/minibuild_list_response.py +147 -0
- anyscale/client/openapi_client/models/minicomputetemplate_list_response.py +147 -0
- anyscale/client/openapi_client/models/miniproject_list_response.py +147 -0
- anyscale/client/openapi_client/models/monitor_logs_extension.py +100 -0
- anyscale/client/openapi_client/models/named_entity.py +148 -0
- anyscale/client/openapi_client/models/nfs_mount_target.py +151 -0
- anyscale/client/openapi_client/models/node_registration_aws.py +152 -0
- anyscale/client/openapi_client/models/node_registration_gcp.py +123 -0
- anyscale/client/openapi_client/models/node_registration_k8_s.py +178 -0
- anyscale/client/openapi_client/models/node_registration_provisioned.py +150 -0
- anyscale/client/openapi_client/models/node_registration_v2.py +279 -0
- anyscale/client/openapi_client/models/node_type.py +100 -0
- anyscale/client/openapi_client/models/notification_channel_email_config.py +121 -0
- anyscale/client/openapi_client/models/notification_channel_webhook_config.py +121 -0
- anyscale/client/openapi_client/models/onboarding_user_cards_query.py +122 -0
- anyscale/client/openapi_client/models/organization.py +490 -0
- anyscale/client/openapi_client/models/organization_availability.py +148 -0
- anyscale/client/openapi_client/models/organization_collaborator.py +259 -0
- anyscale/client/openapi_client/models/organization_configuration.py +280 -0
- anyscale/client/openapi_client/models/organization_configuration_response.py +227 -0
- anyscale/client/openapi_client/models/organization_invitation.py +255 -0
- anyscale/client/openapi_client/models/organization_invitation_base.py +121 -0
- anyscale/client/openapi_client/models/organization_marketing_questions.py +198 -0
- anyscale/client/openapi_client/models/organization_permission_level.py +100 -0
- anyscale/client/openapi_client/models/organization_project_collaborator.py +175 -0
- anyscale/client/openapi_client/models/organization_project_collaborator_value.py +148 -0
- anyscale/client/openapi_client/models/organization_public_identifier.py +121 -0
- anyscale/client/openapi_client/models/organization_response.py +121 -0
- anyscale/client/openapi_client/models/organization_summary.py +229 -0
- anyscale/client/openapi_client/models/organization_usage_alert.py +210 -0
- anyscale/client/openapi_client/models/organization_usage_alert_severity.py +100 -0
- anyscale/client/openapi_client/models/organizationavailability_response.py +121 -0
- anyscale/client/openapi_client/models/organizationcollaborator_list_response.py +147 -0
- anyscale/client/openapi_client/models/organizationconfiguration_list_response.py +147 -0
- anyscale/client/openapi_client/models/organizationconfigurationresponse_response.py +121 -0
- anyscale/client/openapi_client/models/organizationinvitation_list_response.py +147 -0
- anyscale/client/openapi_client/models/organizationinvitation_response.py +121 -0
- anyscale/client/openapi_client/models/organizationinvitationbase_response.py +121 -0
- anyscale/client/openapi_client/models/organizationprojectcollaborator_list_response.py +147 -0
- anyscale/client/openapi_client/models/organizationpublicidentifier_response.py +121 -0
- anyscale/client/openapi_client/models/organizationusagealert_list_response.py +147 -0
- anyscale/client/openapi_client/models/page_query.py +153 -0
- anyscale/client/openapi_client/models/pause_schedule.py +123 -0
- anyscale/client/openapi_client/models/permission_level.py +101 -0
- anyscale/client/openapi_client/models/platform_fine_tuning_job.py +577 -0
- anyscale/client/openapi_client/models/platformfinetuningjob_list_response.py +147 -0
- anyscale/client/openapi_client/models/platformfinetuningjob_response.py +121 -0
- anyscale/client/openapi_client/models/product_autoscaler_flag.py +122 -0
- anyscale/client/openapi_client/models/product_type.py +100 -0
- anyscale/client/openapi_client/models/productautoscalerflag_response.py +121 -0
- anyscale/client/openapi_client/models/production_job.py +437 -0
- anyscale/client/openapi_client/models/production_job_config.py +348 -0
- anyscale/client/openapi_client/models/production_job_event.py +378 -0
- anyscale/client/openapi_client/models/production_job_event_scope_filter.py +101 -0
- anyscale/client/openapi_client/models/production_job_state_transition.py +293 -0
- anyscale/client/openapi_client/models/productionjob_response.py +121 -0
- anyscale/client/openapi_client/models/productionjobevent_list_response.py +147 -0
- anyscale/client/openapi_client/models/project.py +554 -0
- anyscale/client/openapi_client/models/project_base.py +121 -0
- anyscale/client/openapi_client/models/project_collaborator.py +175 -0
- anyscale/client/openapi_client/models/project_collaborator_value.py +175 -0
- anyscale/client/openapi_client/models/project_collaborators_put_message.py +121 -0
- anyscale/client/openapi_client/models/project_create_message.py +148 -0
- anyscale/client/openapi_client/models/project_default_session_name.py +121 -0
- anyscale/client/openapi_client/models/project_delete_message.py +121 -0
- anyscale/client/openapi_client/models/project_list_response.py +147 -0
- anyscale/client/openapi_client/models/project_patch_message.py +121 -0
- anyscale/client/openapi_client/models/project_response.py +121 -0
- anyscale/client/openapi_client/models/projectbase_response.py +121 -0
- anyscale/client/openapi_client/models/projectcollaborator_list_response.py +147 -0
- anyscale/client/openapi_client/models/projectdefaultsessionname_response.py +121 -0
- anyscale/client/openapi_client/models/projects_sort_field.py +101 -0
- anyscale/client/openapi_client/models/projects_violating_tree_hierarchy_response.py +121 -0
- anyscale/client/openapi_client/models/projectsviolatingtreehierarchyresponse_response.py +121 -0
- anyscale/client/openapi_client/models/protocols.py +150 -0
- anyscale/client/openapi_client/models/provider_metadata.py +205 -0
- anyscale/client/openapi_client/models/providermetadata_response.py +121 -0
- anyscale/client/openapi_client/models/python_modules.py +150 -0
- anyscale/client/openapi_client/models/quota.py +198 -0
- anyscale/client/openapi_client/models/ray_gcs_external_storage_config.py +178 -0
- anyscale/client/openapi_client/models/ray_runtime_env_config.py +262 -0
- anyscale/client/openapi_client/models/read_billing_version.py +210 -0
- anyscale/client/openapi_client/models/readbillingversion_list_response.py +147 -0
- anyscale/client/openapi_client/models/replica_details.py +152 -0
- anyscale/client/openapi_client/models/replica_state.py +104 -0
- anyscale/client/openapi_client/models/request_email_magic_link_response.py +147 -0
- anyscale/client/openapi_client/models/request_otp_return_api_model.py +148 -0
- anyscale/client/openapi_client/models/request_password_reset_params.py +147 -0
- anyscale/client/openapi_client/models/requestemailmagiclinkresponse_response.py +121 -0
- anyscale/client/openapi_client/models/requestotpreturnapimodel_response.py +121 -0
- anyscale/client/openapi_client/models/reset_password_params.py +148 -0
- anyscale/client/openapi_client/models/resource_quota.py +465 -0
- anyscale/client/openapi_client/models/resource_quota_status.py +123 -0
- anyscale/client/openapi_client/models/resourcequota_list_response.py +147 -0
- anyscale/client/openapi_client/models/resourcequota_response.py +121 -0
- anyscale/client/openapi_client/models/resources.py +234 -0
- anyscale/client/openapi_client/models/resubmit_ft_job_request.py +121 -0
- anyscale/client/openapi_client/models/rollback_service_model.py +122 -0
- anyscale/client/openapi_client/models/rollout_strategy.py +100 -0
- anyscale/client/openapi_client/models/s3_download_location.py +148 -0
- anyscale/client/openapi_client/models/schedule_config.py +151 -0
- anyscale/client/openapi_client/models/serve_deployment_grafana_dashboard_status.py +101 -0
- anyscale/client/openapi_client/models/serve_deployment_logs.py +152 -0
- anyscale/client/openapi_client/models/serve_deployment_state.py +104 -0
- anyscale/client/openapi_client/models/servedeploymentlogs_response.py +121 -0
- anyscale/client/openapi_client/models/server_session_token.py +121 -0
- anyscale/client/openapi_client/models/serversessiontoken_response.py +121 -0
- anyscale/client/openapi_client/models/service_config.py +178 -0
- anyscale/client/openapi_client/models/service_event_current_state.py +108 -0
- anyscale/client/openapi_client/models/service_event_level.py +102 -0
- anyscale/client/openapi_client/models/service_event_origin.py +103 -0
- anyscale/client/openapi_client/models/service_event_scope.py +103 -0
- anyscale/client/openapi_client/models/service_event_scope_filter.py +104 -0
- anyscale/client/openapi_client/models/service_event_type.py +125 -0
- anyscale/client/openapi_client/models/service_event_verbose_message_model.py +180 -0
- anyscale/client/openapi_client/models/service_goal_states.py +100 -0
- anyscale/client/openapi_client/models/service_observability_urls.py +206 -0
- anyscale/client/openapi_client/models/service_sort_field.py +101 -0
- anyscale/client/openapi_client/models/service_type.py +100 -0
- anyscale/client/openapi_client/models/service_usage.py +353 -0
- anyscale/client/openapi_client/models/service_version_state.py +106 -0
- anyscale/client/openapi_client/models/serviceeventverbosemessagemodel_list_response.py +147 -0
- anyscale/client/openapi_client/models/session.py +834 -0
- anyscale/client/openapi_client/models/session_access.py +102 -0
- anyscale/client/openapi_client/models/session_autosync_sessions_update_message.py +121 -0
- anyscale/client/openapi_client/models/session_command.py +413 -0
- anyscale/client/openapi_client/models/session_command_finish_options.py +226 -0
- anyscale/client/openapi_client/models/session_command_id.py +121 -0
- anyscale/client/openapi_client/models/session_command_types.py +100 -0
- anyscale/client/openapi_client/models/session_create_message.py +148 -0
- anyscale/client/openapi_client/models/session_delete_message.py +121 -0
- anyscale/client/openapi_client/models/session_describe.py +175 -0
- anyscale/client/openapi_client/models/session_details.py +148 -0
- anyscale/client/openapi_client/models/session_event.py +267 -0
- anyscale/client/openapi_client/models/session_event_cause.py +150 -0
- anyscale/client/openapi_client/models/session_event_types.py +111 -0
- anyscale/client/openapi_client/models/session_execute_message.py +121 -0
- anyscale/client/openapi_client/models/session_finish_command_message.py +175 -0
- anyscale/client/openapi_client/models/session_history_item.py +146 -0
- anyscale/client/openapi_client/models/session_kill_command_message.py +121 -0
- anyscale/client/openapi_client/models/session_list_response.py +147 -0
- anyscale/client/openapi_client/models/session_patch_message.py +121 -0
- anyscale/client/openapi_client/models/session_response.py +121 -0
- anyscale/client/openapi_client/models/session_ssh_key.py +148 -0
- anyscale/client/openapi_client/models/session_starting_up_data.py +146 -0
- anyscale/client/openapi_client/models/session_state.py +111 -0
- anyscale/client/openapi_client/models/session_state_change_message.py +121 -0
- anyscale/client/openapi_client/models/session_state_data.py +146 -0
- anyscale/client/openapi_client/models/session_stopping_data.py +146 -0
- anyscale/client/openapi_client/models/sessioncommand_list_response.py +147 -0
- anyscale/client/openapi_client/models/sessioncommandid_response.py +121 -0
- anyscale/client/openapi_client/models/sessiondescribe_response.py +121 -0
- anyscale/client/openapi_client/models/sessiondetails_response.py +121 -0
- anyscale/client/openapi_client/models/sessionevent_list_response.py +147 -0
- anyscale/client/openapi_client/models/sessionhistoryitem_list_response.py +147 -0
- anyscale/client/openapi_client/models/sessions_sort_field.py +104 -0
- anyscale/client/openapi_client/models/sessionsshkey_response.py +121 -0
- anyscale/client/openapi_client/models/setup_initialize_session_options.py +225 -0
- anyscale/client/openapi_client/models/show_otp_source_return_api_model.py +121 -0
- anyscale/client/openapi_client/models/showotpsourcereturnapimodel_response.py +121 -0
- anyscale/client/openapi_client/models/snapshot_create_message.py +148 -0
- anyscale/client/openapi_client/models/snapshot_delete_message.py +148 -0
- anyscale/client/openapi_client/models/snapshot_patch_message.py +148 -0
- anyscale/client/openapi_client/models/socket_message_schemas.py +499 -0
- anyscale/client/openapi_client/models/socket_message_types.py +113 -0
- anyscale/client/openapi_client/models/socketmessageschemas_response.py +121 -0
- anyscale/client/openapi_client/models/socketmessagetypes_response.py +121 -0
- anyscale/client/openapi_client/models/sort_order.py +100 -0
- anyscale/client/openapi_client/models/sso_login_info.py +151 -0
- anyscale/client/openapi_client/models/ssologininfo_response.py +121 -0
- anyscale/client/openapi_client/models/start_session_options.py +146 -0
- anyscale/client/openapi_client/models/stop_session_options.py +227 -0
- anyscale/client/openapi_client/models/stream_publish_request.py +239 -0
- anyscale/client/openapi_client/models/subnet_id_with_availability_zone_aws.py +148 -0
- anyscale/client/openapi_client/models/support_requests_query.py +178 -0
- anyscale/client/openapi_client/models/supportedbaseimagesenum.py +1570 -0
- anyscale/client/openapi_client/models/templatized_compute_configs.py +202 -0
- anyscale/client/openapi_client/models/templatized_decorated_application_templates.py +202 -0
- anyscale/client/openapi_client/models/templatizedcomputeconfigs_response.py +121 -0
- anyscale/client/openapi_client/models/templatizeddecoratedapplicationtemplates_response.py +121 -0
- anyscale/client/openapi_client/models/text_query.py +178 -0
- anyscale/client/openapi_client/models/timestamped_logs_output.py +148 -0
- anyscale/client/openapi_client/models/timestampedlogsoutput_response.py +121 -0
- anyscale/client/openapi_client/models/tool.py +100 -0
- anyscale/client/openapi_client/models/tracing_config.py +178 -0
- anyscale/client/openapi_client/models/try_login_email_response.py +208 -0
- anyscale/client/openapi_client/models/tryloginemailresponse_response.py +121 -0
- anyscale/client/openapi_client/models/unified_job_sort_field.py +103 -0
- anyscale/client/openapi_client/models/unified_job_status.py +114 -0
- anyscale/client/openapi_client/models/unified_job_type.py +100 -0
- anyscale/client/openapi_client/models/update_cloud_with_cloud_resource.py +178 -0
- anyscale/client/openapi_client/models/update_cloud_with_cloud_resource_gcp.py +178 -0
- anyscale/client/openapi_client/models/update_cluster_dns.py +152 -0
- anyscale/client/openapi_client/models/update_compute_template.py +146 -0
- anyscale/client/openapi_client/models/update_compute_template_config.py +464 -0
- anyscale/client/openapi_client/models/update_endpoint.py +152 -0
- anyscale/client/openapi_client/models/update_machine_pool_request.py +151 -0
- anyscale/client/openapi_client/models/update_model_deployment.py +152 -0
- anyscale/client/openapi_client/models/update_organization_collaborator.py +121 -0
- anyscale/client/openapi_client/models/update_project_collaborator.py +121 -0
- anyscale/client/openapi_client/models/update_resource_quota.py +122 -0
- anyscale/client/openapi_client/models/updatemachinepoolresponse_response.py +121 -0
- anyscale/client/openapi_client/models/upload_session_command_logs_locations.py +148 -0
- anyscale/client/openapi_client/models/uploadsessioncommandlogslocations_response.py +121 -0
- anyscale/client/openapi_client/models/user_info.py +569 -0
- anyscale/client/openapi_client/models/user_resend_email_options.py +147 -0
- anyscale/client/openapi_client/models/user_service_access_types.py +100 -0
- anyscale/client/openapi_client/models/userinfo_response.py +121 -0
- anyscale/client/openapi_client/models/utm_fields.py +224 -0
- anyscale/client/openapi_client/models/ux_instance.py +468 -0
- anyscale/client/openapi_client/models/validate_otp_params_api_model.py +121 -0
- anyscale/client/openapi_client/models/validation_error.py +175 -0
- anyscale/client/openapi_client/models/verify_response.py +147 -0
- anyscale/client/openapi_client/models/verifyresponse_response.py +121 -0
- anyscale/client/openapi_client/models/visibility.py +100 -0
- anyscale/client/openapi_client/models/waitlist_status_response.py +121 -0
- anyscale/client/openapi_client/models/waitlist_status_type.py +100 -0
- anyscale/client/openapi_client/models/waitliststatusresponse_response.py +121 -0
- anyscale/client/openapi_client/models/wand_b_run_details.py +147 -0
- anyscale/client/openapi_client/models/web_terminal.py +121 -0
- anyscale/client/openapi_client/models/webterminal_list_response.py +147 -0
- anyscale/client/openapi_client/models/webterminal_response.py +121 -0
- anyscale/client/openapi_client/models/worker_node_type.py +404 -0
- anyscale/client/openapi_client/models/workload_type.py +102 -0
- anyscale/client/openapi_client/models/workspace_dataplane_artifact.py +181 -0
- anyscale/client/openapi_client/models/workspace_dataplane_artifacts.py +123 -0
- anyscale/client/openapi_client/models/workspace_dataplane_proxied_artifacts.py +178 -0
- anyscale/client/openapi_client/models/workspace_event.py +325 -0
- anyscale/client/openapi_client/models/workspace_event_source.py +100 -0
- anyscale/client/openapi_client/models/workspace_event_source_filter.py +101 -0
- anyscale/client/openapi_client/models/workspace_readme.py +123 -0
- anyscale/client/openapi_client/models/workspace_snapshot_states.py +108 -0
- anyscale/client/openapi_client/models/workspace_template.py +353 -0
- anyscale/client/openapi_client/models/workspace_template_cluster_environment_metadata.py +178 -0
- anyscale/client/openapi_client/models/workspacedataplaneartifacts_response.py +121 -0
- anyscale/client/openapi_client/models/workspacedataplaneproxiedartifacts_response.py +121 -0
- anyscale/client/openapi_client/models/workspaceevent_list_response.py +147 -0
- anyscale/client/openapi_client/models/workspacereadme_response.py +121 -0
- anyscale/client/openapi_client/models/workspacetemplate_list_response.py +147 -0
- anyscale/client/openapi_client/models/workspacetemplateclusterenvironmentmetadata_response.py +121 -0
- anyscale/client/openapi_client/models/write_cloud.py +546 -0
- anyscale/client/openapi_client/models/write_cluster_config.py +123 -0
- anyscale/client/openapi_client/models/write_project.py +226 -0
- anyscale/client/openapi_client/models/write_session.py +147 -0
- anyscale/client/openapi_client/models/write_support_request.py +121 -0
- anyscale/client/openapi_client/rest.py +296 -0
- anyscale/client/requirements.txt +6 -0
- anyscale/client/setup.cfg +2 -0
- anyscale/client/setup.py +40 -0
- anyscale/client/test-requirements.txt +3 -0
- anyscale/client/tox.ini +9 -0
- anyscale/cloud.py +216 -0
- anyscale/cloud_resource.py +1032 -0
- anyscale/cluster.py +138 -0
- anyscale/cluster_compute.py +167 -0
- anyscale/cluster_env.py +173 -0
- anyscale/commands/__init__.py +0 -0
- anyscale/commands/aggregated_instance_usage_commands.py +86 -0
- anyscale/commands/anyscale_api/__init__.py +0 -0
- anyscale/commands/anyscale_api/api_commands.py +23 -0
- anyscale/commands/anyscale_api/session_commands_commands.py +80 -0
- anyscale/commands/anyscale_api/session_operations_commands.py +28 -0
- anyscale/commands/anyscale_api/sessions_commands.py +152 -0
- anyscale/commands/auth_commands.py +41 -0
- anyscale/commands/cloud_commands.py +1011 -0
- anyscale/commands/cloud_commands_util.py +10 -0
- anyscale/commands/cluster_commands.py +476 -0
- anyscale/commands/cluster_env_commands.py +139 -0
- anyscale/commands/command_examples.py +495 -0
- anyscale/commands/compute_config_commands.py +252 -0
- anyscale/commands/config_commands.py +213 -0
- anyscale/commands/exec_commands.py +14 -0
- anyscale/commands/experimental_integrations_commands.py +70 -0
- anyscale/commands/image_commands.py +125 -0
- anyscale/commands/job_commands.py +745 -0
- anyscale/commands/list_commands.py +85 -0
- anyscale/commands/llm/dataset_commands.py +269 -0
- anyscale/commands/llm/group.py +15 -0
- anyscale/commands/llm/models_commands.py +123 -0
- anyscale/commands/login_commands.py +79 -0
- anyscale/commands/logs_commands.py +312 -0
- anyscale/commands/machine_commands.py +116 -0
- anyscale/commands/machine_pool_commands.py +163 -0
- anyscale/commands/migrate_commands.py +84 -0
- anyscale/commands/project_commands.py +203 -0
- anyscale/commands/resource_quota_commands.py +214 -0
- anyscale/commands/schedule_commands.py +436 -0
- anyscale/commands/service_account_commands.py +72 -0
- anyscale/commands/service_commands.py +738 -0
- anyscale/commands/session_commands_hidden.py +179 -0
- anyscale/commands/util.py +152 -0
- anyscale/commands/workspace_commands.py +511 -0
- anyscale/commands/workspace_commands_v2.py +874 -0
- anyscale/component_activity_util.py +83 -0
- anyscale/compute_config/__init__.py +84 -0
- anyscale/compute_config/_private/compute_config_sdk.py +433 -0
- anyscale/compute_config/commands.py +122 -0
- anyscale/compute_config/models.py +630 -0
- anyscale/conf.py +23 -0
- anyscale/connect.py +1323 -0
- anyscale/connect_utils/__init__.py +0 -0
- anyscale/connect_utils/prepare_cluster.py +962 -0
- anyscale/connect_utils/project.py +298 -0
- anyscale/connect_utils/start_interactive_session.py +437 -0
- anyscale/controllers/__init__.py +0 -0
- anyscale/controllers/auth_controller.py +134 -0
- anyscale/controllers/base_controller.py +52 -0
- anyscale/controllers/cloud_controller.py +3609 -0
- anyscale/controllers/cloud_functional_verification_controller.py +858 -0
- anyscale/controllers/cluster_controller.py +720 -0
- anyscale/controllers/cluster_env_controller.py +219 -0
- anyscale/controllers/compute_config_controller.py +351 -0
- anyscale/controllers/config_controller.py +422 -0
- anyscale/controllers/experimental_integrations_controller.py +80 -0
- anyscale/controllers/job_controller.py +647 -0
- anyscale/controllers/jobs_bg_controller.py +0 -0
- anyscale/controllers/list_controller.py +290 -0
- anyscale/controllers/llm/__init__.py +0 -0
- anyscale/controllers/llm/models_controller.py +144 -0
- anyscale/controllers/logs_controller.py +449 -0
- anyscale/controllers/machine_controller.py +37 -0
- anyscale/controllers/machine_pool_controller.py +86 -0
- anyscale/controllers/project_controller.py +281 -0
- anyscale/controllers/resource_quota_controller.py +183 -0
- anyscale/controllers/schedule_controller.py +333 -0
- anyscale/controllers/service_account_controller.py +168 -0
- anyscale/controllers/service_controller.py +453 -0
- anyscale/controllers/workspace_controller.py +253 -0
- anyscale/feature_flags.py +4 -0
- anyscale/fingerprint.py +62 -0
- anyscale/formatters/__init__.py +0 -0
- anyscale/formatters/clouds_formatter.py +65 -0
- anyscale/formatters/common_formatter.py +22 -0
- anyscale/gcp_verification.py +792 -0
- anyscale/image/__init__.py +73 -0
- anyscale/image/_private/image_sdk.py +202 -0
- anyscale/image/commands.py +117 -0
- anyscale/image/models.py +57 -0
- anyscale/integrations.py +329 -0
- anyscale/job/__init__.py +166 -0
- anyscale/job/_private/job_sdk.py +497 -0
- anyscale/job/commands.py +267 -0
- anyscale/job/models.py +500 -0
- anyscale/links.py +4 -0
- anyscale/llm/__init__.py +2 -0
- anyscale/llm/dataset/__init__.py +2 -0
- anyscale/llm/dataset/_private/__init__.py +0 -0
- anyscale/llm/dataset/_private/docs.py +63 -0
- anyscale/llm/dataset/_private/models.py +71 -0
- anyscale/llm/dataset/_private/sdk.py +147 -0
- anyscale/llm/model/__init__.py +2 -0
- anyscale/llm/model/_private/models_sdk.py +62 -0
- anyscale/llm/model/commands.py +93 -0
- anyscale/llm/model/models.py +171 -0
- anyscale/llm/model/sdk.py +62 -0
- anyscale/llm/sdk.py +27 -0
- anyscale/memorydb_supported_zones.json +22 -0
- anyscale/models/job_model.py +457 -0
- anyscale/models/service_model.py +125 -0
- anyscale/project.py +501 -0
- anyscale/schedule/__init__.py +91 -0
- anyscale/schedule/_private/schedule_sdk.py +165 -0
- anyscale/schedule/commands.py +149 -0
- anyscale/schedule/models.py +145 -0
- anyscale/scripts.py +164 -0
- anyscale/sdk/anyscale_client/__init__.py +235 -0
- anyscale/sdk/anyscale_client/api/__init__.py +6 -0
- anyscale/sdk/anyscale_client/api/default_api.py +11625 -0
- anyscale/sdk/anyscale_client/api_client.py +647 -0
- anyscale/sdk/anyscale_client/configuration.py +373 -0
- anyscale/sdk/anyscale_client/exceptions.py +120 -0
- anyscale/sdk/anyscale_client/models/__init__.py +220 -0
- anyscale/sdk/anyscale_client/models/access_config.py +122 -0
- anyscale/sdk/anyscale_client/models/app_config.py +436 -0
- anyscale/sdk/anyscale_client/models/app_config_config_schema.py +235 -0
- anyscale/sdk/anyscale_client/models/appconfig_list_response.py +147 -0
- anyscale/sdk/anyscale_client/models/appconfig_response.py +121 -0
- anyscale/sdk/anyscale_client/models/apply_production_service_v2_model.py +490 -0
- anyscale/sdk/anyscale_client/models/apply_service_model.py +490 -0
- anyscale/sdk/anyscale_client/models/archive_status.py +101 -0
- anyscale/sdk/anyscale_client/models/base_job_status.py +105 -0
- anyscale/sdk/anyscale_client/models/baseimagesenum.py +2130 -0
- anyscale/sdk/anyscale_client/models/build.py +607 -0
- anyscale/sdk/anyscale_client/models/build_list_response.py +147 -0
- anyscale/sdk/anyscale_client/models/build_log_response.py +123 -0
- anyscale/sdk/anyscale_client/models/build_response.py +121 -0
- anyscale/sdk/anyscale_client/models/build_status.py +104 -0
- anyscale/sdk/anyscale_client/models/buildlogresponse_response.py +121 -0
- anyscale/sdk/anyscale_client/models/cloud.py +802 -0
- anyscale/sdk/anyscale_client/models/cloud_config.py +206 -0
- anyscale/sdk/anyscale_client/models/cloud_list_response.py +147 -0
- anyscale/sdk/anyscale_client/models/cloud_providers.py +103 -0
- anyscale/sdk/anyscale_client/models/cloud_response.py +121 -0
- anyscale/sdk/anyscale_client/models/cloud_state.py +104 -0
- anyscale/sdk/anyscale_client/models/cloud_status.py +100 -0
- anyscale/sdk/anyscale_client/models/cloud_type.py +100 -0
- anyscale/sdk/anyscale_client/models/cloud_types.py +100 -0
- anyscale/sdk/anyscale_client/models/cloud_version.py +100 -0
- anyscale/sdk/anyscale_client/models/clouds_query.py +150 -0
- anyscale/sdk/anyscale_client/models/cluster.py +721 -0
- anyscale/sdk/anyscale_client/models/cluster_compute.py +415 -0
- anyscale/sdk/anyscale_client/models/cluster_compute_config.py +461 -0
- anyscale/sdk/anyscale_client/models/cluster_computes_query.py +293 -0
- anyscale/sdk/anyscale_client/models/cluster_environment.py +380 -0
- anyscale/sdk/anyscale_client/models/cluster_environment_build.py +578 -0
- anyscale/sdk/anyscale_client/models/cluster_environment_build_log_response.py +123 -0
- anyscale/sdk/anyscale_client/models/cluster_environment_build_operation.py +237 -0
- anyscale/sdk/anyscale_client/models/cluster_environment_build_status.py +104 -0
- anyscale/sdk/anyscale_client/models/cluster_environments_query.py +290 -0
- anyscale/sdk/anyscale_client/models/cluster_head_node_info.py +152 -0
- anyscale/sdk/anyscale_client/models/cluster_list_response.py +147 -0
- anyscale/sdk/anyscale_client/models/cluster_management_stack_versions.py +100 -0
- anyscale/sdk/anyscale_client/models/cluster_operation.py +266 -0
- anyscale/sdk/anyscale_client/models/cluster_operation_type.py +101 -0
- anyscale/sdk/anyscale_client/models/cluster_response.py +121 -0
- anyscale/sdk/anyscale_client/models/cluster_services_urls.py +430 -0
- anyscale/sdk/anyscale_client/models/cluster_state.py +108 -0
- anyscale/sdk/anyscale_client/models/cluster_status.py +104 -0
- anyscale/sdk/anyscale_client/models/cluster_status_details.py +100 -0
- anyscale/sdk/anyscale_client/models/clustercompute_list_response.py +147 -0
- anyscale/sdk/anyscale_client/models/clustercompute_response.py +121 -0
- anyscale/sdk/anyscale_client/models/clusterenvironment_list_response.py +147 -0
- anyscale/sdk/anyscale_client/models/clusterenvironment_response.py +121 -0
- anyscale/sdk/anyscale_client/models/clusterenvironmentbuild_list_response.py +147 -0
- anyscale/sdk/anyscale_client/models/clusterenvironmentbuild_response.py +121 -0
- anyscale/sdk/anyscale_client/models/clusterenvironmentbuildlogresponse_response.py +121 -0
- anyscale/sdk/anyscale_client/models/clusterenvironmentbuildoperation_response.py +121 -0
- anyscale/sdk/anyscale_client/models/clusteroperation_response.py +121 -0
- anyscale/sdk/anyscale_client/models/clusters_query.py +234 -0
- anyscale/sdk/anyscale_client/models/compute_node_type.py +292 -0
- anyscale/sdk/anyscale_client/models/compute_stack.py +100 -0
- anyscale/sdk/anyscale_client/models/compute_template.py +415 -0
- anyscale/sdk/anyscale_client/models/compute_template_config.py +461 -0
- anyscale/sdk/anyscale_client/models/compute_template_query.py +316 -0
- anyscale/sdk/anyscale_client/models/computetemplate_list_response.py +147 -0
- anyscale/sdk/anyscale_client/models/computetemplate_response.py +121 -0
- anyscale/sdk/anyscale_client/models/computetemplateconfig_response.py +121 -0
- anyscale/sdk/anyscale_client/models/create_app_config.py +235 -0
- anyscale/sdk/anyscale_client/models/create_app_config_configuration_schema.py +235 -0
- anyscale/sdk/anyscale_client/models/create_build.py +263 -0
- anyscale/sdk/anyscale_client/models/create_byod_app_config_configuration_schema.py +206 -0
- anyscale/sdk/anyscale_client/models/create_byod_cluster_environment.py +180 -0
- anyscale/sdk/anyscale_client/models/create_byod_cluster_environment_build.py +152 -0
- anyscale/sdk/anyscale_client/models/create_byod_cluster_environment_configuration_schema.py +208 -0
- anyscale/sdk/anyscale_client/models/create_cloud.py +518 -0
- anyscale/sdk/anyscale_client/models/create_cluster.py +376 -0
- anyscale/sdk/anyscale_client/models/create_cluster_compute.py +229 -0
- anyscale/sdk/anyscale_client/models/create_cluster_compute_config.py +463 -0
- anyscale/sdk/anyscale_client/models/create_cluster_environment.py +235 -0
- anyscale/sdk/anyscale_client/models/create_cluster_environment_build.py +263 -0
- anyscale/sdk/anyscale_client/models/create_cluster_environment_configuration_schema.py +235 -0
- anyscale/sdk/anyscale_client/models/create_compute_template.py +229 -0
- anyscale/sdk/anyscale_client/models/create_compute_template_config.py +464 -0
- anyscale/sdk/anyscale_client/models/create_job_queue_config.py +206 -0
- anyscale/sdk/anyscale_client/models/create_production_job.py +234 -0
- anyscale/sdk/anyscale_client/models/create_production_job_config.py +347 -0
- anyscale/sdk/anyscale_client/models/create_project.py +207 -0
- anyscale/sdk/anyscale_client/models/create_schedule.py +263 -0
- anyscale/sdk/anyscale_client/models/create_session.py +432 -0
- anyscale/sdk/anyscale_client/models/create_session_command.py +152 -0
- anyscale/sdk/anyscale_client/models/create_sso_config.py +150 -0
- anyscale/sdk/anyscale_client/models/grpc_protocol_config.py +178 -0
- anyscale/sdk/anyscale_client/models/ha_job_goal_states.py +102 -0
- anyscale/sdk/anyscale_client/models/ha_job_states.py +109 -0
- anyscale/sdk/anyscale_client/models/http_protocol_config.py +150 -0
- anyscale/sdk/anyscale_client/models/http_validation_error.py +120 -0
- anyscale/sdk/anyscale_client/models/idle_termination_status.py +104 -0
- anyscale/sdk/anyscale_client/models/job.py +466 -0
- anyscale/sdk/anyscale_client/models/job_list_response.py +147 -0
- anyscale/sdk/anyscale_client/models/job_queue_config.py +122 -0
- anyscale/sdk/anyscale_client/models/job_queue_execution_mode.py +101 -0
- anyscale/sdk/anyscale_client/models/job_queue_spec.py +263 -0
- anyscale/sdk/anyscale_client/models/job_run_type.py +101 -0
- anyscale/sdk/anyscale_client/models/job_status.py +105 -0
- anyscale/sdk/anyscale_client/models/jobs_query.py +458 -0
- anyscale/sdk/anyscale_client/models/jobs_sort_field.py +104 -0
- anyscale/sdk/anyscale_client/models/list_response_metadata.py +146 -0
- anyscale/sdk/anyscale_client/models/list_service_model.py +347 -0
- anyscale/sdk/anyscale_client/models/listservicemodel_list_response.py +147 -0
- anyscale/sdk/anyscale_client/models/log_download_result.py +207 -0
- anyscale/sdk/anyscale_client/models/log_file_chunk.py +439 -0
- anyscale/sdk/anyscale_client/models/log_level_types.py +100 -0
- anyscale/sdk/anyscale_client/models/log_stream.py +151 -0
- anyscale/sdk/anyscale_client/models/logdownloadresult_response.py +121 -0
- anyscale/sdk/anyscale_client/models/logstream_response.py +121 -0
- anyscale/sdk/anyscale_client/models/node_type.py +100 -0
- anyscale/sdk/anyscale_client/models/object_storage_config.py +122 -0
- anyscale/sdk/anyscale_client/models/object_storage_config_s3.py +256 -0
- anyscale/sdk/anyscale_client/models/objectstorageconfig_response.py +121 -0
- anyscale/sdk/anyscale_client/models/operation_error.py +123 -0
- anyscale/sdk/anyscale_client/models/operation_progress.py +123 -0
- anyscale/sdk/anyscale_client/models/operation_result.py +150 -0
- anyscale/sdk/anyscale_client/models/organization.py +209 -0
- anyscale/sdk/anyscale_client/models/organization_response.py +121 -0
- anyscale/sdk/anyscale_client/models/page_query.py +153 -0
- anyscale/sdk/anyscale_client/models/pause_schedule.py +123 -0
- anyscale/sdk/anyscale_client/models/production_job.py +437 -0
- anyscale/sdk/anyscale_client/models/production_job_config.py +348 -0
- anyscale/sdk/anyscale_client/models/production_job_state_transition.py +293 -0
- anyscale/sdk/anyscale_client/models/production_service_v2_model.py +612 -0
- anyscale/sdk/anyscale_client/models/production_service_v2_version_model.py +437 -0
- anyscale/sdk/anyscale_client/models/productionjob_list_response.py +147 -0
- anyscale/sdk/anyscale_client/models/productionjob_response.py +121 -0
- anyscale/sdk/anyscale_client/models/productionservicev2_model_response.py +121 -0
- anyscale/sdk/anyscale_client/models/project.py +467 -0
- anyscale/sdk/anyscale_client/models/project_list_response.py +147 -0
- anyscale/sdk/anyscale_client/models/project_response.py +121 -0
- anyscale/sdk/anyscale_client/models/projects_query.py +234 -0
- anyscale/sdk/anyscale_client/models/protocols.py +150 -0
- anyscale/sdk/anyscale_client/models/python_modules.py +150 -0
- anyscale/sdk/anyscale_client/models/python_version.py +105 -0
- anyscale/sdk/anyscale_client/models/ray_gcs_external_storage_config.py +178 -0
- anyscale/sdk/anyscale_client/models/ray_runtime_env_config.py +262 -0
- anyscale/sdk/anyscale_client/models/resources.py +234 -0
- anyscale/sdk/anyscale_client/models/rollback_service_model.py +122 -0
- anyscale/sdk/anyscale_client/models/rollout_strategy.py +100 -0
- anyscale/sdk/anyscale_client/models/runtime_environment.py +406 -0
- anyscale/sdk/anyscale_client/models/runtimeenvironment_response.py +121 -0
- anyscale/sdk/anyscale_client/models/schedule_api_model.py +467 -0
- anyscale/sdk/anyscale_client/models/schedule_config.py +151 -0
- anyscale/sdk/anyscale_client/models/scheduleapimodel_list_response.py +147 -0
- anyscale/sdk/anyscale_client/models/scheduleapimodel_response.py +121 -0
- anyscale/sdk/anyscale_client/models/service_config.py +178 -0
- anyscale/sdk/anyscale_client/models/service_event_current_state.py +108 -0
- anyscale/sdk/anyscale_client/models/service_goal_states.py +100 -0
- anyscale/sdk/anyscale_client/models/service_model.py +612 -0
- anyscale/sdk/anyscale_client/models/service_observability_urls.py +206 -0
- anyscale/sdk/anyscale_client/models/service_sort_field.py +101 -0
- anyscale/sdk/anyscale_client/models/service_type.py +100 -0
- anyscale/sdk/anyscale_client/models/service_version_state.py +106 -0
- anyscale/sdk/anyscale_client/models/servicemodel_list_response.py +147 -0
- anyscale/sdk/anyscale_client/models/servicemodel_response.py +121 -0
- anyscale/sdk/anyscale_client/models/session.py +1535 -0
- anyscale/sdk/anyscale_client/models/session_command.py +350 -0
- anyscale/sdk/anyscale_client/models/session_command_types.py +100 -0
- anyscale/sdk/anyscale_client/models/session_event.py +267 -0
- anyscale/sdk/anyscale_client/models/session_event_cause.py +150 -0
- anyscale/sdk/anyscale_client/models/session_event_types.py +111 -0
- anyscale/sdk/anyscale_client/models/session_list_response.py +147 -0
- anyscale/sdk/anyscale_client/models/session_operation.py +266 -0
- anyscale/sdk/anyscale_client/models/session_operation_type.py +101 -0
- anyscale/sdk/anyscale_client/models/session_response.py +121 -0
- anyscale/sdk/anyscale_client/models/session_starting_up_data.py +146 -0
- anyscale/sdk/anyscale_client/models/session_state.py +111 -0
- anyscale/sdk/anyscale_client/models/session_state_data.py +146 -0
- anyscale/sdk/anyscale_client/models/session_stopping_data.py +146 -0
- anyscale/sdk/anyscale_client/models/sessioncommand_list_response.py +147 -0
- anyscale/sdk/anyscale_client/models/sessioncommand_response.py +121 -0
- anyscale/sdk/anyscale_client/models/sessionevent_list_response.py +147 -0
- anyscale/sdk/anyscale_client/models/sessionoperation_response.py +121 -0
- anyscale/sdk/anyscale_client/models/sessions_query.py +206 -0
- anyscale/sdk/anyscale_client/models/sort_by_clause_jobs_sort_field.py +148 -0
- anyscale/sdk/anyscale_client/models/sort_order.py +100 -0
- anyscale/sdk/anyscale_client/models/sso_config.py +237 -0
- anyscale/sdk/anyscale_client/models/sso_mode.py +101 -0
- anyscale/sdk/anyscale_client/models/ssoconfig_response.py +121 -0
- anyscale/sdk/anyscale_client/models/start_cluster_options.py +178 -0
- anyscale/sdk/anyscale_client/models/start_session_options.py +206 -0
- anyscale/sdk/anyscale_client/models/static_sso_config.py +210 -0
- anyscale/sdk/anyscale_client/models/supportedbaseimagesenum.py +1570 -0
- anyscale/sdk/anyscale_client/models/terminate_cluster_options.py +122 -0
- anyscale/sdk/anyscale_client/models/terminate_session_options.py +206 -0
- anyscale/sdk/anyscale_client/models/text_query.py +178 -0
- anyscale/sdk/anyscale_client/models/tracing_config.py +178 -0
- anyscale/sdk/anyscale_client/models/update_app_config.py +122 -0
- anyscale/sdk/anyscale_client/models/update_cloud.py +150 -0
- anyscale/sdk/anyscale_client/models/update_cluster.py +206 -0
- anyscale/sdk/anyscale_client/models/update_compute_template.py +146 -0
- anyscale/sdk/anyscale_client/models/update_compute_template_config.py +464 -0
- anyscale/sdk/anyscale_client/models/update_organization.py +123 -0
- anyscale/sdk/anyscale_client/models/update_project.py +150 -0
- anyscale/sdk/anyscale_client/models/update_session.py +150 -0
- anyscale/sdk/anyscale_client/models/user_service_access_types.py +100 -0
- anyscale/sdk/anyscale_client/models/ux_instance.py +468 -0
- anyscale/sdk/anyscale_client/models/validation_error.py +175 -0
- anyscale/sdk/anyscale_client/models/worker_node_type.py +404 -0
- anyscale/sdk/anyscale_client/rest.py +296 -0
- anyscale/sdk/anyscale_client/sdk.py +634 -0
- anyscale/service/__init__.py +168 -0
- anyscale/service/_private/service_sdk.py +702 -0
- anyscale/service/commands.py +261 -0
- anyscale/service/models.py +671 -0
- anyscale/shared_anyscale_utils/__init__.py +1 -0
- anyscale/shared_anyscale_utils/aws.py +153 -0
- anyscale/shared_anyscale_utils/bytes_util.py +10 -0
- anyscale/shared_anyscale_utils/conf.py +47 -0
- anyscale/shared_anyscale_utils/default_anyscale_aws.yaml +74 -0
- anyscale/shared_anyscale_utils/default_anyscale_gcp.yaml +80 -0
- anyscale/shared_anyscale_utils/headers.py +38 -0
- anyscale/shared_anyscale_utils/latest_ray_version.py +2 -0
- anyscale/shared_anyscale_utils/project.py +15 -0
- anyscale/shared_anyscale_utils/test_util.py +22 -0
- anyscale/shared_anyscale_utils/tests/__init__.py +1 -0
- anyscale/shared_anyscale_utils/tests/test_asyncio.py +41 -0
- anyscale/shared_anyscale_utils/tests/test_ray_semver.py +63 -0
- anyscale/shared_anyscale_utils/util.py +50 -0
- anyscale/shared_anyscale_utils/utils/__init__.py +2 -0
- anyscale/shared_anyscale_utils/utils/asyncio.py +120 -0
- anyscale/shared_anyscale_utils/utils/byod.py +40 -0
- anyscale/shared_anyscale_utils/utils/collections.py +33 -0
- anyscale/shared_anyscale_utils/utils/id_gen.py +147 -0
- anyscale/shared_anyscale_utils/utils/protected_string.py +89 -0
- anyscale/shared_anyscale_utils/utils/ray_semver.py +81 -0
- anyscale/snapshot.py +46 -0
- anyscale/tables.py +82 -0
- anyscale/util.py +1155 -0
- anyscale/utils/__init__.py +0 -0
- anyscale/utils/cli_version_check_util.py +63 -0
- anyscale/utils/cloud_update_utils.py +862 -0
- anyscale/utils/cloud_utils.py +317 -0
- anyscale/utils/cluster_debug.py +191 -0
- anyscale/utils/connect_helpers.py +155 -0
- anyscale/utils/deprecation_util.py +32 -0
- anyscale/utils/entity_arg_utils.py +43 -0
- anyscale/utils/env_utils.py +17 -0
- anyscale/utils/gcp_managed_setup_utils.py +888 -0
- anyscale/utils/gcp_utils.py +312 -0
- anyscale/utils/imports/__init__.py +0 -0
- anyscale/utils/imports/all.py +13 -0
- anyscale/utils/imports/azure.py +14 -0
- anyscale/utils/imports/gcp.py +59 -0
- anyscale/utils/logs_utils.py +141 -0
- anyscale/utils/name_utils.py +33 -0
- anyscale/utils/network_verification.py +153 -0
- anyscale/utils/ray_utils.py +128 -0
- anyscale/utils/ray_version_checker.py +48 -0
- anyscale/utils/ray_version_utils.py +53 -0
- anyscale/utils/runtime_env.py +487 -0
- anyscale/utils/s3.py +92 -0
- anyscale/utils/user_utils.py +17 -0
- anyscale/utils/workload_types.py +7 -0
- anyscale/utils/workspace_notification.py +39 -0
- anyscale/utils/workspace_utils.py +65 -0
- anyscale/version.py +1 -0
- anyscale/webterminal/__init__.py +0 -0
- anyscale/webterminal/bash-preexec.sh +370 -0
- anyscale/webterminal/command_persister.py +164 -0
- anyscale/webterminal/utils.py +176 -0
- anyscale/webterminal/webterminal.py +311 -0
- anyscale/workspace/__init__.py +270 -0
- anyscale/workspace/_private/workspace_sdk.py +737 -0
- anyscale/workspace/commands.py +472 -0
- anyscale/workspace/models.py +296 -0
- anyscale/workspace_utils.py +35 -0
- anyscale-0.24.86.dist-info/LICENSE +68 -0
- anyscale-0.24.86.dist-info/METADATA +82 -0
- anyscale-0.24.86.dist-info/NOTICE +6 -0
- anyscale-0.24.86.dist-info/RECORD +1131 -0
- anyscale-0.24.86.dist-info/WHEEL +5 -0
- anyscale-0.24.86.dist-info/entry_points.txt +2 -0
- anyscale-0.24.86.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1032 @@
|
|
|
1
|
+
import difflib
|
|
2
|
+
import json
|
|
3
|
+
import pprint
|
|
4
|
+
from typing import Any, Dict, List, Optional
|
|
5
|
+
|
|
6
|
+
import boto3
|
|
7
|
+
from botocore.exceptions import ClientError
|
|
8
|
+
from click import ClickException
|
|
9
|
+
|
|
10
|
+
from anyscale.aws_iam_policies import (
|
|
11
|
+
AMAZON_ECR_READONLY_ACCESS_POLICY_NAME,
|
|
12
|
+
ANYSCALE_IAM_PERMISSIONS_EC2_STEADY_STATE,
|
|
13
|
+
ANYSCALE_IAM_PERMISSIONS_SERVICE_STEADY_STATE,
|
|
14
|
+
get_anyscale_aws_iam_assume_role_policy,
|
|
15
|
+
get_anyscale_iam_permissions_ec2_restricted,
|
|
16
|
+
)
|
|
17
|
+
from anyscale.cli_logger import CloudSetupLogger
|
|
18
|
+
from anyscale.client.openapi_client.models.cloud_analytics_event_cloud_resource import (
|
|
19
|
+
CloudAnalyticsEventCloudResource,
|
|
20
|
+
)
|
|
21
|
+
from anyscale.client.openapi_client.models.create_cloud_resource import (
|
|
22
|
+
CreateCloudResource,
|
|
23
|
+
)
|
|
24
|
+
from anyscale.client.openapi_client.models.subnet_id_with_availability_zone_aws import (
|
|
25
|
+
SubnetIdWithAvailabilityZoneAWS,
|
|
26
|
+
)
|
|
27
|
+
from anyscale.shared_anyscale_utils.aws import AwsRoleArn
|
|
28
|
+
from anyscale.shared_anyscale_utils.conf import ANYSCALE_CORS_ORIGIN
|
|
29
|
+
from anyscale.util import ( # pylint:disable=private-import
|
|
30
|
+
_get_subnet,
|
|
31
|
+
contains_control_plane_role,
|
|
32
|
+
filter_actions_associated_with_role,
|
|
33
|
+
filter_actions_from_policy_document,
|
|
34
|
+
verify_data_plane_role_assume_role_policy,
|
|
35
|
+
)
|
|
36
|
+
from anyscale.utils.cloud_utils import CloudSetupError
|
|
37
|
+
from anyscale.utils.network_verification import (
|
|
38
|
+
AWS_SUBNET_CAPACITY,
|
|
39
|
+
AWS_VPC_CAPACITY,
|
|
40
|
+
)
|
|
41
|
+
from anyscale.utils.s3 import verify_s3_access
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
# This needs to be kept in sync with the Ray autoscaler in
|
|
45
|
+
# https://github.com/ray-project/ray/blob/eb9c5d8fa70b1c360b821f82c7697e39ef94b25e/python/ray/autoscaler/_private/aws/config.py
|
|
46
|
+
# It should go away with the SSM refactor.
|
|
47
|
+
DEFAULT_RAY_IAM_ROLE = "ray-autoscaler-v1"
|
|
48
|
+
|
|
49
|
+
S3_ARN_PREFIX = "arn:aws:s3:::"
|
|
50
|
+
S3_STORAGE_PREFIX = "s3://"
|
|
51
|
+
GCS_STORAGE_PREFIX = "gs://"
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def compare_dicts_diff(d1: Dict[Any, Any], d2: Dict[Any, Any]) -> str:
|
|
55
|
+
"""Returns a string representation of the difference of the two dictionaries.
|
|
56
|
+
Example:
|
|
57
|
+
|
|
58
|
+
Input:
|
|
59
|
+
print(compare_dicts_diff({"a": {"c": 1}, "b": 2}, {"a": {"c": 2}, "d": 3}))
|
|
60
|
+
|
|
61
|
+
Output:
|
|
62
|
+
- {'a': {'c': 1}, 'b': 2}
|
|
63
|
+
? ^ ^ ^
|
|
64
|
+
|
|
65
|
+
+ {'a': {'c': 2}, 'd': 3}
|
|
66
|
+
? ^ ^ ^
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
return "\n" + "\n".join(
|
|
70
|
+
difflib.ndiff(pprint.pformat(d1).splitlines(), pprint.pformat(d2).splitlines())
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
AWS_RESOURCE_DICT: Dict[str, CloudAnalyticsEventCloudResource] = {
|
|
75
|
+
"VPC": CloudAnalyticsEventCloudResource.AWS_VPC,
|
|
76
|
+
"Subnet": CloudAnalyticsEventCloudResource.AWS_SUBNET,
|
|
77
|
+
"Security group": CloudAnalyticsEventCloudResource.AWS_SECURITY_GROUP,
|
|
78
|
+
"S3 bucket": CloudAnalyticsEventCloudResource.AWS_S3_BUCKET,
|
|
79
|
+
"EFS": CloudAnalyticsEventCloudResource.AWS_EFS,
|
|
80
|
+
"CloudFormation stack": CloudAnalyticsEventCloudResource.AWS_CLOUDFORMATION,
|
|
81
|
+
"MemoryDB cluster": CloudAnalyticsEventCloudResource.AWS_MEMORYDB,
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def log_resource_not_found_error(
|
|
86
|
+
resource_name: str, resource_id: str, logger: CloudSetupLogger
|
|
87
|
+
) -> None:
|
|
88
|
+
resource = AWS_RESOURCE_DICT.get(resource_name)
|
|
89
|
+
if resource:
|
|
90
|
+
logger.log_resource_error(resource, CloudSetupError.RESOURCE_NOT_FOUND)
|
|
91
|
+
logger.error(
|
|
92
|
+
f"Could not find {resource_name} with id {resource_id}. Please validate that you're using the correct AWS account/credentials and that the resource values are correct"
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def verify_aws_vpc(
|
|
97
|
+
cloud_resource: CreateCloudResource,
|
|
98
|
+
boto3_session: boto3.Session,
|
|
99
|
+
logger: CloudSetupLogger,
|
|
100
|
+
ignore_capacity_errors: bool = False, # TODO: Probably don't do this forever. Its kinda hacky
|
|
101
|
+
strict: bool = False, # strict is currently unused # noqa: ARG001
|
|
102
|
+
) -> bool:
|
|
103
|
+
logger.info("Verifying VPC ...")
|
|
104
|
+
if not cloud_resource.aws_vpc_id:
|
|
105
|
+
logger.log_resource_error(
|
|
106
|
+
CloudAnalyticsEventCloudResource.AWS_VPC,
|
|
107
|
+
CloudSetupError.MISSING_CLOUD_RESOURCE_ID,
|
|
108
|
+
)
|
|
109
|
+
logger.error("Missing VPC id.")
|
|
110
|
+
return False
|
|
111
|
+
|
|
112
|
+
ec2 = boto3_session.resource("ec2")
|
|
113
|
+
vpc = ec2.Vpc(cloud_resource.aws_vpc_id)
|
|
114
|
+
|
|
115
|
+
# Verify the VPC exists
|
|
116
|
+
try:
|
|
117
|
+
vpc.load()
|
|
118
|
+
except ClientError as e:
|
|
119
|
+
if e.response["Error"]["Code"] == "InvalidVpcID.NotFound":
|
|
120
|
+
log_resource_not_found_error("VPC", cloud_resource.aws_vpc_id, logger)
|
|
121
|
+
return False
|
|
122
|
+
else:
|
|
123
|
+
logger.log_resource_exception(CloudAnalyticsEventCloudResource.AWS_VPC, e)
|
|
124
|
+
raise e
|
|
125
|
+
|
|
126
|
+
# Verify that the VPC has "enough" capacity.
|
|
127
|
+
if ignore_capacity_errors or AWS_VPC_CAPACITY.verify_network_capacity(
|
|
128
|
+
cidr_block_str=vpc.cidr_block, resource_name=vpc.id, logger=logger
|
|
129
|
+
):
|
|
130
|
+
logger.info(f"VPC {vpc.id} verification succeeded.")
|
|
131
|
+
return True
|
|
132
|
+
return False
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def _get_subnets_from_subnet_ids(
|
|
136
|
+
subnet_ids: List[str], region: str, logger: CloudSetupLogger
|
|
137
|
+
) -> List[Any]:
|
|
138
|
+
return [
|
|
139
|
+
_get_subnet(subnet_arn=subnet_id, region=region, logger=logger)
|
|
140
|
+
for subnet_id in subnet_ids
|
|
141
|
+
]
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def verify_aws_subnets( # noqa: PLR0911, PLR0912
|
|
145
|
+
cloud_resource: CreateCloudResource,
|
|
146
|
+
region: str,
|
|
147
|
+
is_private_network: bool,
|
|
148
|
+
logger: CloudSetupLogger,
|
|
149
|
+
ignore_capacity_errors: bool = False, # TODO: Probably don't do this forever. Its kinda hacky
|
|
150
|
+
strict: bool = False,
|
|
151
|
+
) -> bool:
|
|
152
|
+
"""Verify the subnets cloud resource of a cloud."""
|
|
153
|
+
|
|
154
|
+
logger.info("Verifying subnets ...")
|
|
155
|
+
|
|
156
|
+
if not cloud_resource.aws_vpc_id:
|
|
157
|
+
logger.error("Missing VPC ID.")
|
|
158
|
+
return False
|
|
159
|
+
|
|
160
|
+
subnet_ids = []
|
|
161
|
+
if (
|
|
162
|
+
cloud_resource.aws_subnet_ids_with_availability_zones
|
|
163
|
+
and len(cloud_resource.aws_subnet_ids_with_availability_zones) > 0
|
|
164
|
+
):
|
|
165
|
+
subnet_ids = [
|
|
166
|
+
subnet_id_with_az.subnet_id
|
|
167
|
+
for subnet_id_with_az in cloud_resource.aws_subnet_ids_with_availability_zones
|
|
168
|
+
]
|
|
169
|
+
else:
|
|
170
|
+
logger.log_resource_error(
|
|
171
|
+
CloudAnalyticsEventCloudResource.AWS_SUBNET,
|
|
172
|
+
CloudSetupError.MISSING_CLOUD_RESOURCE_ID,
|
|
173
|
+
)
|
|
174
|
+
logger.error("Missing subnet IDs.")
|
|
175
|
+
return False
|
|
176
|
+
|
|
177
|
+
# We must have at least 2 subnets since services requires 2 different subnets to setup ALB.
|
|
178
|
+
if len(subnet_ids) < 2:
|
|
179
|
+
logger.log_resource_error(
|
|
180
|
+
CloudAnalyticsEventCloudResource.AWS_SUBNET, CloudSetupError.ONLY_ONE_SUBNET
|
|
181
|
+
)
|
|
182
|
+
logger.error(
|
|
183
|
+
"Need at least 2 subnets for a cloud. This is required for Anyscale services to function properly."
|
|
184
|
+
)
|
|
185
|
+
return False
|
|
186
|
+
|
|
187
|
+
subnets = _get_subnets_from_subnet_ids(
|
|
188
|
+
subnet_ids=subnet_ids, region=region, logger=logger
|
|
189
|
+
)
|
|
190
|
+
subnet_azs = set()
|
|
191
|
+
|
|
192
|
+
for subnet, subnet_id in zip(subnets, subnet_ids):
|
|
193
|
+
# Verify subnet exists
|
|
194
|
+
if not subnet:
|
|
195
|
+
log_resource_not_found_error("Subnet", subnet_id, logger)
|
|
196
|
+
return False
|
|
197
|
+
|
|
198
|
+
# Verify the Subnet has "enough" capacity.
|
|
199
|
+
if (
|
|
200
|
+
not AWS_SUBNET_CAPACITY.verify_network_capacity(
|
|
201
|
+
cidr_block_str=subnet.cidr_block, resource_name=subnet.id, logger=logger
|
|
202
|
+
)
|
|
203
|
+
and not ignore_capacity_errors
|
|
204
|
+
):
|
|
205
|
+
return False
|
|
206
|
+
|
|
207
|
+
# Verify that the subnet is in the provided VPC all of these are in the same VPC.
|
|
208
|
+
if subnet.vpc_id != cloud_resource.aws_vpc_id:
|
|
209
|
+
logger.log_resource_error(
|
|
210
|
+
CloudAnalyticsEventCloudResource.AWS_SUBNET,
|
|
211
|
+
CloudSetupError.SUBNET_NOT_IN_VPC,
|
|
212
|
+
)
|
|
213
|
+
logger.error(
|
|
214
|
+
f"The subnet {subnet_id} is not in a vpc of this cloud. The vpc of this subnet is {subnet.vpc_id} and the vpc of this cloud is {cloud_resource.aws_vpc_id}."
|
|
215
|
+
)
|
|
216
|
+
return False
|
|
217
|
+
|
|
218
|
+
# Verify that the subnet is auto-assigning public IP addresses if it's not private.
|
|
219
|
+
if not is_private_network and not subnet.map_public_ip_on_launch:
|
|
220
|
+
logger.warning(
|
|
221
|
+
f"The subnet {subnet_id} does not have the 'Auto-assign Public IP' option enabled. This is not currently supported."
|
|
222
|
+
)
|
|
223
|
+
if strict:
|
|
224
|
+
return False
|
|
225
|
+
if is_private_network and subnet.map_public_ip_on_launch:
|
|
226
|
+
logger.warning(
|
|
227
|
+
f"The private subnet {subnet_id} shouldn't have 'Auto-assign Public IP' option enabled."
|
|
228
|
+
"Please remove the `--private-network` flag if you don't want to deploy your Ray clusters in private subnets."
|
|
229
|
+
)
|
|
230
|
+
if strict:
|
|
231
|
+
return False
|
|
232
|
+
|
|
233
|
+
# Success!
|
|
234
|
+
logger.info(f"Subnet {subnet.id}'s verification succeeded.")
|
|
235
|
+
subnet_azs.add(subnet.availability_zone)
|
|
236
|
+
|
|
237
|
+
if len(subnet_azs) < 2:
|
|
238
|
+
logger.log_resource_error(
|
|
239
|
+
CloudAnalyticsEventCloudResource.AWS_SUBNET, CloudSetupError.ONLY_ONE_AZ,
|
|
240
|
+
)
|
|
241
|
+
logger.error(
|
|
242
|
+
"Subnets should be in at least 2 Availability Zones. This is required for Anyscale services to function properly."
|
|
243
|
+
)
|
|
244
|
+
return False
|
|
245
|
+
|
|
246
|
+
logger.info(
|
|
247
|
+
f"Subnets {cloud_resource.aws_subnet_ids_with_availability_zones} verification succeeded."
|
|
248
|
+
)
|
|
249
|
+
return True
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
def associate_aws_subnets_with_azs(
|
|
253
|
+
aws_subnet_ids: List[str], region: str, logger: CloudSetupLogger
|
|
254
|
+
) -> List[SubnetIdWithAvailabilityZoneAWS]:
|
|
255
|
+
"""This function combines the subnets with its availability zone.
|
|
256
|
+
"""
|
|
257
|
+
|
|
258
|
+
subnets = _get_subnets_from_subnet_ids(
|
|
259
|
+
subnet_ids=aws_subnet_ids, region=region, logger=logger
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
# combine subnet and its availability zone
|
|
263
|
+
subnet_ids_with_availability_zones = [
|
|
264
|
+
SubnetIdWithAvailabilityZoneAWS(
|
|
265
|
+
subnet_id=subnet.id, availability_zone=subnet.availability_zone,
|
|
266
|
+
)
|
|
267
|
+
for subnet in subnets
|
|
268
|
+
]
|
|
269
|
+
|
|
270
|
+
return subnet_ids_with_availability_zones
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
def _get_roles_from_cloud_resource(
|
|
274
|
+
cloud_resource: CreateCloudResource,
|
|
275
|
+
boto3_session: boto3.Session,
|
|
276
|
+
logger: CloudSetupLogger,
|
|
277
|
+
) -> Optional[List[Any]]:
|
|
278
|
+
iam = boto3_session.resource("iam")
|
|
279
|
+
roles = [
|
|
280
|
+
iam.Role(AwsRoleArn.from_string(role_arn).to_role_name())
|
|
281
|
+
for role_arn in cloud_resource.aws_iam_role_arns
|
|
282
|
+
]
|
|
283
|
+
# Validate the roles exist.
|
|
284
|
+
# `.load()` will throw an exception if the Role does not exist.
|
|
285
|
+
for role in roles:
|
|
286
|
+
try:
|
|
287
|
+
role.load()
|
|
288
|
+
except ClientError as e:
|
|
289
|
+
logger.log_resource_exception(
|
|
290
|
+
CloudAnalyticsEventCloudResource.AWS_IAM_ROLE, e
|
|
291
|
+
)
|
|
292
|
+
if e.response["Error"]["Code"] == "NoSuchEntity":
|
|
293
|
+
logger.error(f"Could not find role: {role.name}")
|
|
294
|
+
return None
|
|
295
|
+
raise e
|
|
296
|
+
return roles
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
def verify_aws_iam_roles( # noqa: PLR0911, PLR0912
|
|
300
|
+
cloud_resource: CreateCloudResource,
|
|
301
|
+
boto3_session: boto3.Session,
|
|
302
|
+
anyscale_aws_account: str,
|
|
303
|
+
logger: CloudSetupLogger,
|
|
304
|
+
cloud_id: str,
|
|
305
|
+
strict: bool = False,
|
|
306
|
+
_use_strict_iam_permissions: bool = False,
|
|
307
|
+
) -> bool:
|
|
308
|
+
|
|
309
|
+
logger.info("Verifying IAM roles ...")
|
|
310
|
+
if not cloud_resource.aws_iam_role_arns:
|
|
311
|
+
logger.log_resource_error(
|
|
312
|
+
CloudAnalyticsEventCloudResource.AWS_IAM_ROLE,
|
|
313
|
+
CloudSetupError.MISSING_CLOUD_RESOURCE_ID,
|
|
314
|
+
)
|
|
315
|
+
logger.error("Missing IAM role arns.")
|
|
316
|
+
return False
|
|
317
|
+
accounts = [
|
|
318
|
+
AwsRoleArn.from_string(role).account_id
|
|
319
|
+
for role in cloud_resource.aws_iam_role_arns
|
|
320
|
+
]
|
|
321
|
+
if len(set(accounts)) != 1:
|
|
322
|
+
logger.log_resource_error(
|
|
323
|
+
CloudAnalyticsEventCloudResource.AWS_IAM_ROLE,
|
|
324
|
+
CloudSetupError.IAM_ROLE_ACCOUNT_MISMATCH,
|
|
325
|
+
)
|
|
326
|
+
logger.error(
|
|
327
|
+
f"All IAM roles must be in the same AWS account: {cloud_resource.aws_iam_role_arns}"
|
|
328
|
+
)
|
|
329
|
+
return False
|
|
330
|
+
|
|
331
|
+
roles = _get_roles_from_cloud_resource(cloud_resource, boto3_session, logger)
|
|
332
|
+
if roles is None:
|
|
333
|
+
return False
|
|
334
|
+
|
|
335
|
+
# verifying control plane role: anyscale iam role
|
|
336
|
+
anyscale_iam_role = roles[0]
|
|
337
|
+
assume_role_policy_document = anyscale_iam_role.assume_role_policy_document
|
|
338
|
+
if not contains_control_plane_role(
|
|
339
|
+
assume_role_policy_document=assume_role_policy_document,
|
|
340
|
+
anyscale_aws_account=anyscale_aws_account,
|
|
341
|
+
):
|
|
342
|
+
logger.warning(
|
|
343
|
+
f"Anyscale IAM role {anyscale_iam_role.arn} does not contain expected assume role policy. It must allow assume role from arn:aws:iam::{anyscale_aws_account}:root."
|
|
344
|
+
)
|
|
345
|
+
expected_assume_role_policy_document = get_anyscale_aws_iam_assume_role_policy(
|
|
346
|
+
anyscale_aws_account=anyscale_aws_account
|
|
347
|
+
)
|
|
348
|
+
logger.warning(
|
|
349
|
+
compare_dicts_diff(
|
|
350
|
+
assume_role_policy_document, expected_assume_role_policy_document
|
|
351
|
+
)
|
|
352
|
+
)
|
|
353
|
+
if strict:
|
|
354
|
+
return False
|
|
355
|
+
|
|
356
|
+
# Verify EC2 steady state permissions
|
|
357
|
+
# If permissions are missing, log warning message
|
|
358
|
+
anyscale_iam_permissions_ec2 = ANYSCALE_IAM_PERMISSIONS_EC2_STEADY_STATE
|
|
359
|
+
if _use_strict_iam_permissions:
|
|
360
|
+
anyscale_iam_permissions_ec2 = get_anyscale_iam_permissions_ec2_restricted(
|
|
361
|
+
cloud_id
|
|
362
|
+
)
|
|
363
|
+
|
|
364
|
+
allow_actions_expected = filter_actions_from_policy_document(
|
|
365
|
+
anyscale_iam_permissions_ec2
|
|
366
|
+
)
|
|
367
|
+
allow_actions_on_role = filter_actions_associated_with_role(
|
|
368
|
+
boto3_session, anyscale_iam_role
|
|
369
|
+
)
|
|
370
|
+
allow_actions_missing = allow_actions_expected - allow_actions_on_role
|
|
371
|
+
|
|
372
|
+
if allow_actions_missing:
|
|
373
|
+
logger.warning(
|
|
374
|
+
f"IAM role {anyscale_iam_role.arn} does not have sufficient permissions for cluster management. We suggest adding these actions to ensure that cluster management works properly: {allow_actions_missing}. "
|
|
375
|
+
)
|
|
376
|
+
|
|
377
|
+
# Verify Service Steady State permissions
|
|
378
|
+
# If service permissions are missing, display confirmation message to user if they would like to continue
|
|
379
|
+
allow_actions_expected = filter_actions_from_policy_document(
|
|
380
|
+
ANYSCALE_IAM_PERMISSIONS_SERVICE_STEADY_STATE
|
|
381
|
+
)
|
|
382
|
+
allow_actions_missing = allow_actions_expected - allow_actions_on_role
|
|
383
|
+
if allow_actions_missing:
|
|
384
|
+
logger.print_red_error_message(
|
|
385
|
+
"[SERVICES V2] Permissions are missing to enable services v2 "
|
|
386
|
+
)
|
|
387
|
+
logger.confirm_missing_permission(
|
|
388
|
+
f"For IAM role {anyscale_iam_role.arn}, we suggest adding the following actions:\n{pprint.pformat(allow_actions_missing)}.\n"
|
|
389
|
+
)
|
|
390
|
+
if strict:
|
|
391
|
+
return False
|
|
392
|
+
|
|
393
|
+
# verifying data plane role: ray autoscaler role
|
|
394
|
+
cluster_node_role = roles[1]
|
|
395
|
+
assume_role_policy_document = cluster_node_role.assume_role_policy_document
|
|
396
|
+
if not verify_data_plane_role_assume_role_policy(
|
|
397
|
+
assume_role_policy_document=assume_role_policy_document,
|
|
398
|
+
):
|
|
399
|
+
logger.error(
|
|
400
|
+
f"Cluster Node IAM role {cluster_node_role.arn} does not contain expected assume role policy. It must give trust to AWS service EC2."
|
|
401
|
+
)
|
|
402
|
+
return False
|
|
403
|
+
|
|
404
|
+
policy_names = [
|
|
405
|
+
policy.policy_name for policy in cluster_node_role.attached_policies.all()
|
|
406
|
+
]
|
|
407
|
+
if AMAZON_ECR_READONLY_ACCESS_POLICY_NAME not in policy_names:
|
|
408
|
+
logger.warning(
|
|
409
|
+
f"Dataplane role {cluster_node_role.arn} does not contain policy {AMAZON_ECR_READONLY_ACCESS_POLICY_NAME}. This is safe to ignore if you are not pulling custom Docker Images from an ECR repository."
|
|
410
|
+
)
|
|
411
|
+
if strict:
|
|
412
|
+
return False
|
|
413
|
+
|
|
414
|
+
if (
|
|
415
|
+
len(
|
|
416
|
+
[
|
|
417
|
+
profile
|
|
418
|
+
for profile in cluster_node_role.instance_profiles.all()
|
|
419
|
+
if profile.name == cluster_node_role.name
|
|
420
|
+
]
|
|
421
|
+
)
|
|
422
|
+
== 0
|
|
423
|
+
):
|
|
424
|
+
logger.log_resource_error(
|
|
425
|
+
CloudAnalyticsEventCloudResource.AWS_IAM_ROLE,
|
|
426
|
+
CloudSetupError.INSTANCE_PROFILE_NOT_FOUND,
|
|
427
|
+
)
|
|
428
|
+
logger.error(
|
|
429
|
+
f"Dataplane role {cluster_node_role.arn} is required to have an instance profile with the name {cluster_node_role.name}."
|
|
430
|
+
"\nPlease create this instance profile and associate it to the role."
|
|
431
|
+
)
|
|
432
|
+
return False
|
|
433
|
+
|
|
434
|
+
logger.info(f"IAM roles {cloud_resource.aws_iam_role_arns} verification succeeded.")
|
|
435
|
+
return True
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
def is_internal_communication_allowed(
|
|
439
|
+
ip_permissions: List, aws_security_group_ids: List[str]
|
|
440
|
+
) -> bool:
|
|
441
|
+
"""
|
|
442
|
+
This is a helper function to check if the security group allows internal communication.
|
|
443
|
+
It can be used for both inbound and outbound permissions.
|
|
444
|
+
"""
|
|
445
|
+
sg_rule_with_self = [] # type: ignore
|
|
446
|
+
for sg_rule in ip_permissions:
|
|
447
|
+
if sg_rule.get("IpProtocol") == "-1":
|
|
448
|
+
sg_rule_with_self.extend(sg_rule.get("UserIdGroupPairs")) # type: ignore
|
|
449
|
+
return any(
|
|
450
|
+
sg_rule.get("GroupId") in aws_security_group_ids
|
|
451
|
+
for sg_rule in sg_rule_with_self
|
|
452
|
+
)
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
def verify_aws_security_groups( # noqa: PLR0912, PLR0911
|
|
456
|
+
cloud_resource: CreateCloudResource,
|
|
457
|
+
boto3_session: boto3.Session,
|
|
458
|
+
logger: CloudSetupLogger,
|
|
459
|
+
strict: bool = False,
|
|
460
|
+
) -> bool:
|
|
461
|
+
logger.info("Verifying security groups ...")
|
|
462
|
+
if not cloud_resource.aws_security_groups:
|
|
463
|
+
logger.log_resource_error(
|
|
464
|
+
CloudAnalyticsEventCloudResource.AWS_SECURITY_GROUP,
|
|
465
|
+
CloudSetupError.MISSING_CLOUD_RESOURCE_ID,
|
|
466
|
+
)
|
|
467
|
+
logger.error("Missing security group IDs.")
|
|
468
|
+
return False
|
|
469
|
+
|
|
470
|
+
ec2 = boto3_session.resource("ec2")
|
|
471
|
+
|
|
472
|
+
aws_security_group_ids = cloud_resource.aws_security_groups
|
|
473
|
+
anyscale_security_groups = []
|
|
474
|
+
|
|
475
|
+
for anyscale_security_group_id in aws_security_group_ids:
|
|
476
|
+
anyscale_security_group = ec2.SecurityGroup(anyscale_security_group_id)
|
|
477
|
+
try:
|
|
478
|
+
anyscale_security_group.load()
|
|
479
|
+
except ClientError as e:
|
|
480
|
+
if e.response["Error"]["Code"] == "InvalidGroup.NotFound":
|
|
481
|
+
log_resource_not_found_error(
|
|
482
|
+
"Security group", anyscale_security_group_id, logger
|
|
483
|
+
)
|
|
484
|
+
return False
|
|
485
|
+
else:
|
|
486
|
+
logger.log_resource_exception(
|
|
487
|
+
CloudAnalyticsEventCloudResource.AWS_SECURITY_GROUP, e
|
|
488
|
+
)
|
|
489
|
+
raise e
|
|
490
|
+
anyscale_security_groups.append(anyscale_security_group)
|
|
491
|
+
|
|
492
|
+
expected_open_ports = [443, 22] # 443 is for HTTPS ingress, 22 is for SSH
|
|
493
|
+
|
|
494
|
+
inbound_ip_permissions = [
|
|
495
|
+
ip_permission
|
|
496
|
+
for anyscale_security_group in anyscale_security_groups
|
|
497
|
+
for ip_permission in anyscale_security_group.ip_permissions
|
|
498
|
+
]
|
|
499
|
+
outbound_ip_permissions = [
|
|
500
|
+
ip_permission
|
|
501
|
+
for anyscale_security_group in anyscale_security_groups
|
|
502
|
+
for ip_permission in anyscale_security_group.ip_permissions_egress
|
|
503
|
+
]
|
|
504
|
+
inbound_ip_permissions_with_specific_port = {
|
|
505
|
+
ip_permission["FromPort"]
|
|
506
|
+
for ip_permission in inbound_ip_permissions
|
|
507
|
+
if "FromPort" in ip_permission
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
# Check inbound permissions
|
|
511
|
+
missing_open_ports = []
|
|
512
|
+
for port in expected_open_ports:
|
|
513
|
+
if not any(
|
|
514
|
+
inbound_ip_permission_port == port
|
|
515
|
+
for inbound_ip_permission_port in inbound_ip_permissions_with_specific_port
|
|
516
|
+
):
|
|
517
|
+
missing_open_ports.append(port)
|
|
518
|
+
if missing_open_ports:
|
|
519
|
+
logger.warning(
|
|
520
|
+
f"Security groups {aws_security_group_ids} do not contain inbound permission for ports: {missing_open_ports}. These ports are used for interaction with the clusters from Anyscale UI. Please make sure to configure them according to https://docs.anyscale.com/cloud-deployment/aws/manage-clouds#appendix-detailed-resource-requirements"
|
|
521
|
+
)
|
|
522
|
+
if strict:
|
|
523
|
+
return False
|
|
524
|
+
|
|
525
|
+
if len(inbound_ip_permissions_with_specific_port) > len(expected_open_ports):
|
|
526
|
+
logger.warning(
|
|
527
|
+
f"Security groups {aws_security_group_ids} allows access to more than {expected_open_ports}. This may not be safe by default."
|
|
528
|
+
)
|
|
529
|
+
if strict:
|
|
530
|
+
return False
|
|
531
|
+
|
|
532
|
+
# Check internal communication is allowed
|
|
533
|
+
if not is_internal_communication_allowed(
|
|
534
|
+
inbound_ip_permissions, aws_security_group_ids
|
|
535
|
+
):
|
|
536
|
+
logger.log_resource_error(
|
|
537
|
+
CloudAnalyticsEventCloudResource.AWS_SECURITY_GROUP,
|
|
538
|
+
CloudSetupError.INTERNAL_COMMUNICATION_NOT_ALLOWED,
|
|
539
|
+
)
|
|
540
|
+
logger.error(
|
|
541
|
+
f"Security groups {aws_security_group_ids} do not contain inbound permission for all ports for traffic from the same security group."
|
|
542
|
+
)
|
|
543
|
+
return False
|
|
544
|
+
|
|
545
|
+
# Check outbound permissions
|
|
546
|
+
if not is_internal_communication_allowed(
|
|
547
|
+
outbound_ip_permissions, aws_security_group_ids
|
|
548
|
+
):
|
|
549
|
+
logger.warning(
|
|
550
|
+
f"Security groups {aws_security_group_ids} do not contain outbound permission for all protocols for traffic from the same security group. "
|
|
551
|
+
f"This is required for certain network device such as EFA."
|
|
552
|
+
)
|
|
553
|
+
if strict:
|
|
554
|
+
return False
|
|
555
|
+
|
|
556
|
+
logger.info(f"Security group {aws_security_group_ids} verification succeeded.")
|
|
557
|
+
return True
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
def verify_aws_s3( # noqa: PLR0911, PLR0912
|
|
561
|
+
cloud_resource: CreateCloudResource,
|
|
562
|
+
boto3_session: boto3.Session,
|
|
563
|
+
region: str,
|
|
564
|
+
logger: CloudSetupLogger,
|
|
565
|
+
strict: bool = False,
|
|
566
|
+
) -> bool:
|
|
567
|
+
logger.info("Verifying S3 ...")
|
|
568
|
+
if not cloud_resource.aws_s3_id:
|
|
569
|
+
logger.log_resource_error(
|
|
570
|
+
CloudAnalyticsEventCloudResource.AWS_S3_BUCKET,
|
|
571
|
+
CloudSetupError.MISSING_CLOUD_RESOURCE_ID,
|
|
572
|
+
)
|
|
573
|
+
logger.error("Missing S3 ID.")
|
|
574
|
+
return False
|
|
575
|
+
|
|
576
|
+
s3 = boto3_session.resource("s3")
|
|
577
|
+
bucket_name = cloud_resource.aws_s3_id.split(":")[-1]
|
|
578
|
+
s3_bucket = s3.Bucket(bucket_name)
|
|
579
|
+
|
|
580
|
+
# Check for the existence of `creation_date` because this incurs a `list_bucket` call.
|
|
581
|
+
# Calling `.load()` WILL NOT ERROR in cases where the caller does not have access to the bucket.
|
|
582
|
+
if s3_bucket.creation_date is None:
|
|
583
|
+
log_resource_not_found_error("S3 bucket", cloud_resource.aws_s3_id, logger)
|
|
584
|
+
return False
|
|
585
|
+
|
|
586
|
+
has_correct_cors_rule = False
|
|
587
|
+
"""
|
|
588
|
+
Verify CORS rules. The correct CORS rule should look like:
|
|
589
|
+
[{
|
|
590
|
+
"AllowedHeaders": [
|
|
591
|
+
"*"
|
|
592
|
+
],
|
|
593
|
+
"AllowedMethods": [
|
|
594
|
+
"GET"
|
|
595
|
+
],
|
|
596
|
+
"AllowedOrigins": [
|
|
597
|
+
"https://console.anyscale-staging.com"
|
|
598
|
+
],
|
|
599
|
+
"ExposeHeaders": []
|
|
600
|
+
}]
|
|
601
|
+
"""
|
|
602
|
+
|
|
603
|
+
try:
|
|
604
|
+
cors_rules = s3_bucket.Cors().cors_rules
|
|
605
|
+
except ClientError as e:
|
|
606
|
+
logger.log_resource_exception(CloudAnalyticsEventCloudResource.AWS_S3_BUCKET, e)
|
|
607
|
+
if e.response["Error"]["Code"] == "NoSuchCORSConfiguration":
|
|
608
|
+
logger.warning(
|
|
609
|
+
f"S3 bucket {bucket_name} does not have CORS rules. This is safe to ignore if you are not using Anyscale UI. Otherwise please create the correct CORS rule for Anyscale according to https://docs.anyscale.com/cloud-deployment/aws/manage-clouds#s3"
|
|
610
|
+
)
|
|
611
|
+
cors_rules = []
|
|
612
|
+
if strict:
|
|
613
|
+
return False
|
|
614
|
+
else:
|
|
615
|
+
raise e
|
|
616
|
+
|
|
617
|
+
for rule in cors_rules:
|
|
618
|
+
if not isinstance(rule, dict):
|
|
619
|
+
logger.log_resource_error(
|
|
620
|
+
CloudAnalyticsEventCloudResource.AWS_S3_BUCKET,
|
|
621
|
+
CloudSetupError.MALFORMED_CORS_RULE,
|
|
622
|
+
)
|
|
623
|
+
logger.error(f"Malformed CORS rule {rule} for your S3 bucket.")
|
|
624
|
+
return False
|
|
625
|
+
has_correct_cors_rule = (
|
|
626
|
+
ANYSCALE_CORS_ORIGIN in rule.get("AllowedOrigins", [])
|
|
627
|
+
and "*" in rule.get("AllowedHeaders", [])
|
|
628
|
+
and "GET" in rule.get("AllowedMethods", [])
|
|
629
|
+
)
|
|
630
|
+
|
|
631
|
+
if not has_correct_cors_rule:
|
|
632
|
+
logger.log_resource_error(
|
|
633
|
+
CloudAnalyticsEventCloudResource.AWS_S3_BUCKET,
|
|
634
|
+
CloudSetupError.INCORRECT_CORS_RULE,
|
|
635
|
+
)
|
|
636
|
+
logger.warning(
|
|
637
|
+
f"S3 bucket {bucket_name} does not have the correct CORS rule for Anyscale. This is safe to ignore if you are not using Anyscale UI. Otherwise please create the correct CORS rule for Anyscale according to https://docs.anyscale.com/cloud-deployment/aws/manage-clouds#appendix-detailed-resource-requirements"
|
|
638
|
+
)
|
|
639
|
+
if strict:
|
|
640
|
+
return False
|
|
641
|
+
|
|
642
|
+
returned_bucket_location = boto3_session.client("s3").get_bucket_location(
|
|
643
|
+
Bucket=bucket_name
|
|
644
|
+
)["LocationConstraint"]
|
|
645
|
+
|
|
646
|
+
# LocationConstraint is `None` if the bucket is located in us-east-1
|
|
647
|
+
bucket_region = returned_bucket_location or "us-east-1"
|
|
648
|
+
if bucket_region != region:
|
|
649
|
+
logger.warning(
|
|
650
|
+
f"S3 bucket {bucket_name} is in region {bucket_region}, but this cloud is being set up in {region}."
|
|
651
|
+
"This can result in degraded cluster launch & logging performance as well as additional cross-region costs."
|
|
652
|
+
)
|
|
653
|
+
if strict:
|
|
654
|
+
return False
|
|
655
|
+
|
|
656
|
+
roles = _get_roles_from_cloud_resource(cloud_resource, boto3_session, logger)
|
|
657
|
+
if roles is None:
|
|
658
|
+
return False
|
|
659
|
+
|
|
660
|
+
if not verify_s3_access(boto3_session, s3_bucket, roles[0], logger):
|
|
661
|
+
logger.warning(
|
|
662
|
+
f"S3 Bucket {bucket_name} does not appear to have correct permissions for the Anyscale Control Plane role {roles[0].name}"
|
|
663
|
+
)
|
|
664
|
+
if strict:
|
|
665
|
+
return False
|
|
666
|
+
|
|
667
|
+
if not verify_s3_access(boto3_session, s3_bucket, roles[1], logger):
|
|
668
|
+
logger.warning(
|
|
669
|
+
f"S3 Bucket {bucket_name} does not appear to have correct permissions for the Data Plane role {roles[1].name}"
|
|
670
|
+
)
|
|
671
|
+
if strict:
|
|
672
|
+
return False
|
|
673
|
+
logger.info(f"S3 {cloud_resource.aws_s3_id} verification succeeded.")
|
|
674
|
+
return True
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
def _get_network_interfaces_from_mount_targets(
|
|
678
|
+
mount_targets_response: dict, boto3_session: Any, logger: CloudSetupLogger
|
|
679
|
+
) -> List[Any]:
|
|
680
|
+
ec2 = boto3_session.resource("ec2")
|
|
681
|
+
network_interfaces = []
|
|
682
|
+
for network_interface_id in [
|
|
683
|
+
mount_target["NetworkInterfaceId"]
|
|
684
|
+
for mount_target in mount_targets_response["MountTargets"]
|
|
685
|
+
]:
|
|
686
|
+
network_interface = ec2.NetworkInterface(network_interface_id)
|
|
687
|
+
try:
|
|
688
|
+
network_interface.load()
|
|
689
|
+
except ClientError as e:
|
|
690
|
+
logger.warning(f"Network interface loading error: {e}")
|
|
691
|
+
continue
|
|
692
|
+
network_interfaces.append(network_interface)
|
|
693
|
+
return network_interfaces
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
def verify_aws_efs( # noqa: PLR0911, PLR0912, C901
|
|
697
|
+
cloud_resource: CreateCloudResource,
|
|
698
|
+
boto3_session: boto3.Session,
|
|
699
|
+
logger: CloudSetupLogger,
|
|
700
|
+
strict: bool = False,
|
|
701
|
+
) -> bool:
|
|
702
|
+
logger.info("Verifying EFS ...")
|
|
703
|
+
if not cloud_resource.aws_efs_id:
|
|
704
|
+
logger.log_resource_error(
|
|
705
|
+
CloudAnalyticsEventCloudResource.AWS_EFS,
|
|
706
|
+
CloudSetupError.MISSING_CLOUD_RESOURCE_ID,
|
|
707
|
+
)
|
|
708
|
+
logger.error("Missing EFS ID.")
|
|
709
|
+
return False
|
|
710
|
+
subnet_ids = []
|
|
711
|
+
if (
|
|
712
|
+
cloud_resource.aws_subnet_ids_with_availability_zones
|
|
713
|
+
and len(cloud_resource.aws_subnet_ids_with_availability_zones) > 0
|
|
714
|
+
):
|
|
715
|
+
subnet_ids = [
|
|
716
|
+
subnet_id_with_az.subnet_id
|
|
717
|
+
for subnet_id_with_az in cloud_resource.aws_subnet_ids_with_availability_zones
|
|
718
|
+
]
|
|
719
|
+
else:
|
|
720
|
+
logger.error("Missing subnet IDs.")
|
|
721
|
+
return False
|
|
722
|
+
if not cloud_resource.aws_security_groups:
|
|
723
|
+
logger.error("Missing security group IDs.")
|
|
724
|
+
return False
|
|
725
|
+
|
|
726
|
+
client = boto3_session.client("efs")
|
|
727
|
+
try:
|
|
728
|
+
file_systems_response = client.describe_file_systems(
|
|
729
|
+
FileSystemId=cloud_resource.aws_efs_id
|
|
730
|
+
)
|
|
731
|
+
except ClientError as e:
|
|
732
|
+
if e.response["Error"]["Code"] == "FileSystemNotFound":
|
|
733
|
+
log_resource_not_found_error("EFS", cloud_resource.aws_efs_id, logger)
|
|
734
|
+
return False
|
|
735
|
+
else:
|
|
736
|
+
logger.log_resource_exception(CloudAnalyticsEventCloudResource.AWS_EFS, e)
|
|
737
|
+
raise e
|
|
738
|
+
|
|
739
|
+
if len(file_systems_response.get("FileSystems", [])) == 0:
|
|
740
|
+
log_resource_not_found_error("EFS", cloud_resource.aws_efs_id, logger)
|
|
741
|
+
return False
|
|
742
|
+
|
|
743
|
+
# verify that there is a mount target for each subnet and security group
|
|
744
|
+
mount_targets_response = client.describe_mount_targets(
|
|
745
|
+
FileSystemId=cloud_resource.aws_efs_id
|
|
746
|
+
)
|
|
747
|
+
mount_targets = mount_targets_response.get("MountTargets")
|
|
748
|
+
if not mount_targets:
|
|
749
|
+
logger.log_resource_error(
|
|
750
|
+
CloudAnalyticsEventCloudResource.AWS_EFS,
|
|
751
|
+
CloudSetupError.MOUNT_TARGET_NOT_FOUND,
|
|
752
|
+
)
|
|
753
|
+
logger.error(
|
|
754
|
+
f"EFS with id {cloud_resource.aws_efs_id} does not contain mount targets."
|
|
755
|
+
)
|
|
756
|
+
return False
|
|
757
|
+
|
|
758
|
+
# verify the mount target ID stored in our database is still valid
|
|
759
|
+
mount_target_ips = [mount_target["IpAddress"] for mount_target in mount_targets]
|
|
760
|
+
if cloud_resource.aws_efs_mount_target_ip and (
|
|
761
|
+
cloud_resource.aws_efs_mount_target_ip not in mount_target_ips
|
|
762
|
+
):
|
|
763
|
+
logger.log_resource_error(
|
|
764
|
+
CloudAnalyticsEventCloudResource.AWS_EFS,
|
|
765
|
+
CloudSetupError.INVALID_MOUNT_TARGET,
|
|
766
|
+
)
|
|
767
|
+
logger.error(
|
|
768
|
+
f"Mount target registered with the cloud no longer exists. EFS ID: {cloud_resource.aws_efs_id} IP address: {cloud_resource.aws_efs_mount_target_ip}. Please make sure you have the correct AWS credentials set. If the EFS mount target has been deleted, please recreate the cloud or contact Anyscale for support."
|
|
769
|
+
)
|
|
770
|
+
logger.error(
|
|
771
|
+
f"Valid mount target IPs for EFS ID {cloud_resource.aws_efs_id} are {mount_target_ips}. "
|
|
772
|
+
"If this happens during cloud edit, ensure that: "
|
|
773
|
+
"1) If only editing aws_efs_mount_target_ip, it belongs to the existing EFS ID. "
|
|
774
|
+
"2) If editing both efs_id and efs_mount_target_ip, the new IP is a valid target for the new efs_id."
|
|
775
|
+
)
|
|
776
|
+
return False
|
|
777
|
+
|
|
778
|
+
network_interfaces = _get_network_interfaces_from_mount_targets(
|
|
779
|
+
mount_targets_response, boto3_session, logger
|
|
780
|
+
)
|
|
781
|
+
|
|
782
|
+
expected_security_group_id = cloud_resource.aws_security_groups[0]
|
|
783
|
+
|
|
784
|
+
# Condition 1: No matching network interface in EFS mount targets for a subnet.
|
|
785
|
+
# - 1.1: EFS has mount targets in other subnets.
|
|
786
|
+
# Subnet communicates with EFS through cross AZ, incurring cross AZ costs. (warning)
|
|
787
|
+
# - 1.2: EFS doesn't have mount target, the subnet cannot communicate with EFS. (error)
|
|
788
|
+
# (note) A previous check ensures EFS has mount targets if this point is reached.
|
|
789
|
+
# --------------------------------------------------------------------------------------------------------------
|
|
790
|
+
# Condition 2: Subnet has a matching network interface in EFS mount targets.
|
|
791
|
+
# - 2.1: Network interface has a registered security group. (happy path)
|
|
792
|
+
# - 2.2: Network interface lacks a registered security group but has another security group.
|
|
793
|
+
# If configured correctly, subnet can still communicate with EFS. (warning)
|
|
794
|
+
# --------------------------------------------------------------------------------------------------------------
|
|
795
|
+
for subnet_id in subnet_ids:
|
|
796
|
+
contains_subnet_id = False
|
|
797
|
+
contains_registered_security_group = False
|
|
798
|
+
for network_interface in network_interfaces:
|
|
799
|
+
network_interface_security_group_ids = [
|
|
800
|
+
group["GroupId"]
|
|
801
|
+
for group in network_interface.groups
|
|
802
|
+
if group.get("GroupId")
|
|
803
|
+
]
|
|
804
|
+
if network_interface.subnet_id == subnet_id:
|
|
805
|
+
contains_subnet_id = True
|
|
806
|
+
if expected_security_group_id in network_interface_security_group_ids:
|
|
807
|
+
contains_registered_security_group = True
|
|
808
|
+
break
|
|
809
|
+
if not contains_subnet_id:
|
|
810
|
+
# condition 1.1.
|
|
811
|
+
logger.warning(
|
|
812
|
+
f"EFS with id {cloud_resource.aws_efs_id} does not contain a mount target with the subnet {subnet_id}, which might introduce cross AZ networking cost."
|
|
813
|
+
)
|
|
814
|
+
if strict:
|
|
815
|
+
return False
|
|
816
|
+
elif not contains_registered_security_group:
|
|
817
|
+
# condition 2.2.
|
|
818
|
+
logger.warning(
|
|
819
|
+
f"EFS with id {cloud_resource.aws_efs_id} does not contain a mount target with the subnet {subnet_id} and security group id {cloud_resource.aws_security_groups[0]}. This misconfiguration might pose security risks and incur connection issues, preventing the EFS from working as expected."
|
|
820
|
+
)
|
|
821
|
+
if strict:
|
|
822
|
+
return False
|
|
823
|
+
try:
|
|
824
|
+
backup_policy_response = client.describe_backup_policy(
|
|
825
|
+
FileSystemId=cloud_resource.aws_efs_id
|
|
826
|
+
)
|
|
827
|
+
backup_policy_status = backup_policy_response.get("BackupPolicy", {}).get(
|
|
828
|
+
"Status", ""
|
|
829
|
+
)
|
|
830
|
+
if backup_policy_status != "ENABLED":
|
|
831
|
+
logger.warning(
|
|
832
|
+
f"EFS {cloud_resource.aws_efs_id} backup policy is not enabled."
|
|
833
|
+
)
|
|
834
|
+
if strict:
|
|
835
|
+
return False
|
|
836
|
+
except ClientError as e:
|
|
837
|
+
if e.response["Error"]["Code"] == "PolicyNotFound":
|
|
838
|
+
logger.warning(f"EFS {cloud_resource.aws_efs_id} backup policy not found.")
|
|
839
|
+
if strict:
|
|
840
|
+
return False
|
|
841
|
+
else:
|
|
842
|
+
raise e
|
|
843
|
+
|
|
844
|
+
# Verify efs policy
|
|
845
|
+
if not _verify_aws_efs_policy(
|
|
846
|
+
boto3_session, cloud_resource.aws_efs_id, logger, strict
|
|
847
|
+
):
|
|
848
|
+
return False
|
|
849
|
+
|
|
850
|
+
logger.info(f"EFS {cloud_resource.aws_efs_id} verification succeeded.")
|
|
851
|
+
return True
|
|
852
|
+
|
|
853
|
+
|
|
854
|
+
def _verify_aws_efs_policy(
|
|
855
|
+
boto3_session: boto3.Session,
|
|
856
|
+
efs_id: str,
|
|
857
|
+
logger: CloudSetupLogger,
|
|
858
|
+
strict: bool = False,
|
|
859
|
+
) -> bool:
|
|
860
|
+
"""
|
|
861
|
+
Verify that the EFS policy has sufficient permissions.
|
|
862
|
+
"""
|
|
863
|
+
client = boto3_session.client("efs")
|
|
864
|
+
|
|
865
|
+
efs_policy = None
|
|
866
|
+
try:
|
|
867
|
+
efs_policy_response = client.describe_file_system_policy(FileSystemId=efs_id)
|
|
868
|
+
efs_policy = json.loads(efs_policy_response["Policy"])
|
|
869
|
+
except ClientError as e:
|
|
870
|
+
if e.response["Error"]["Code"] != "PolicyNotFound":
|
|
871
|
+
# If the policy is not found, we'll skip the check
|
|
872
|
+
logger.error(f"Failed to describe file system policy: {e}")
|
|
873
|
+
return False
|
|
874
|
+
|
|
875
|
+
if efs_policy:
|
|
876
|
+
expected_actions = [
|
|
877
|
+
"elasticfilesystem:ClientRootAccess",
|
|
878
|
+
"elasticfilesystem:ClientWrite",
|
|
879
|
+
"elasticfilesystem:ClientMount",
|
|
880
|
+
]
|
|
881
|
+
actions = filter_actions_from_policy_document(efs_policy)
|
|
882
|
+
missing_actions = set(expected_actions) - set(actions)
|
|
883
|
+
if missing_actions:
|
|
884
|
+
logger.warning(
|
|
885
|
+
f"EFS {efs_id} does not have sufficient permissions. "
|
|
886
|
+
f"We suggest adding these actions to ensure that efs works properly: {missing_actions}. "
|
|
887
|
+
)
|
|
888
|
+
if strict:
|
|
889
|
+
return False
|
|
890
|
+
|
|
891
|
+
return True
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
def verify_aws_cloudformation_stack(
|
|
895
|
+
cloud_resource: CreateCloudResource,
|
|
896
|
+
boto3_session: boto3.Session,
|
|
897
|
+
logger: CloudSetupLogger,
|
|
898
|
+
strict: bool = False, # strict is currently unused # noqa: ARG001
|
|
899
|
+
) -> bool:
|
|
900
|
+
logger.info("Verifying CloudFormation stack ...")
|
|
901
|
+
if not cloud_resource.aws_cloudformation_stack_id:
|
|
902
|
+
logger.log_resource_error(
|
|
903
|
+
CloudAnalyticsEventCloudResource.AWS_CLOUDFORMATION,
|
|
904
|
+
CloudSetupError.MISSING_CLOUD_RESOURCE_ID,
|
|
905
|
+
)
|
|
906
|
+
logger.error("Missing CloudFormation stack id.")
|
|
907
|
+
return False
|
|
908
|
+
|
|
909
|
+
cloudformation = boto3_session.resource("cloudformation")
|
|
910
|
+
stack = cloudformation.Stack(cloud_resource.aws_cloudformation_stack_id)
|
|
911
|
+
try:
|
|
912
|
+
stack.load()
|
|
913
|
+
except ClientError as e:
|
|
914
|
+
if e.response["Error"]["Code"] == "ValidationError":
|
|
915
|
+
log_resource_not_found_error(
|
|
916
|
+
"CloudFormation stack",
|
|
917
|
+
cloud_resource.aws_cloudformation_stack_id,
|
|
918
|
+
logger,
|
|
919
|
+
)
|
|
920
|
+
return False
|
|
921
|
+
else:
|
|
922
|
+
logger.log_resource_exception(
|
|
923
|
+
CloudAnalyticsEventCloudResource.AWS_CLOUDFORMATION, e
|
|
924
|
+
)
|
|
925
|
+
raise e
|
|
926
|
+
|
|
927
|
+
logger.info(
|
|
928
|
+
f"CloudFormation stack {cloud_resource.aws_cloudformation_stack_id} verification succeeded."
|
|
929
|
+
)
|
|
930
|
+
return True
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
def verify_aws_memorydb_cluster( # noqa: PLR0911, PLR0912
|
|
934
|
+
cloud_resource: CreateCloudResource,
|
|
935
|
+
boto3_session: boto3.Session,
|
|
936
|
+
logger: CloudSetupLogger,
|
|
937
|
+
strict: bool = False, # strict is currently unused # noqa: ARG001
|
|
938
|
+
) -> bool:
|
|
939
|
+
"""Verify that the MemoryDB cluster exists and is in the available state."""
|
|
940
|
+
logger.info("Verifying MemoryDB ...")
|
|
941
|
+
if not cloud_resource.memorydb_cluster_config:
|
|
942
|
+
logger.log_resource_error(
|
|
943
|
+
CloudAnalyticsEventCloudResource.AWS_MEMORYDB,
|
|
944
|
+
CloudSetupError.MISSING_CLOUD_RESOURCE_ID,
|
|
945
|
+
)
|
|
946
|
+
logger.error("Missing MemoryDB cluster id.")
|
|
947
|
+
return False
|
|
948
|
+
|
|
949
|
+
client = boto3_session.client("memorydb")
|
|
950
|
+
try:
|
|
951
|
+
response = client.describe_clusters(
|
|
952
|
+
ClusterName=cloud_resource.memorydb_cluster_config.id.split("/")[-1],
|
|
953
|
+
ShowShardDetails=True,
|
|
954
|
+
)
|
|
955
|
+
if not response.get("Clusters"):
|
|
956
|
+
log_resource_not_found_error(
|
|
957
|
+
"MemoryDB cluster", cloud_resource.memorydb_cluster_config.id, logger
|
|
958
|
+
)
|
|
959
|
+
return False
|
|
960
|
+
|
|
961
|
+
# verify that the subnet group has the same security group as the cloud
|
|
962
|
+
security_group_id = response["Clusters"][0].get(
|
|
963
|
+
"SecurityGroups", [{"SecurityGroupId": "NOT_SPECIFIED"}]
|
|
964
|
+
)[0]["SecurityGroupId"]
|
|
965
|
+
if security_group_id != cloud_resource.aws_security_groups[0]:
|
|
966
|
+
logger.warning(
|
|
967
|
+
f"MemoryDB cluster {cloud_resource.memorydb_cluster_config.id} has security group {security_group_id} that is not the same as the cloud's security group {cloud_resource.aws_security_groups[0]}."
|
|
968
|
+
)
|
|
969
|
+
if strict:
|
|
970
|
+
return False
|
|
971
|
+
|
|
972
|
+
# verify that the cluster is in the cloud's VPC
|
|
973
|
+
subnet_group_response = client.describe_subnet_groups(
|
|
974
|
+
SubnetGroupName=response["Clusters"][0]["SubnetGroupName"]
|
|
975
|
+
)
|
|
976
|
+
if (
|
|
977
|
+
subnet_group_response["SubnetGroups"][0]["VpcId"]
|
|
978
|
+
!= cloud_resource.aws_vpc_id
|
|
979
|
+
):
|
|
980
|
+
logger.warning(
|
|
981
|
+
f"MemoryDB cluster {cloud_resource.memorydb_cluster_config.id} is not in the same VPC as the cloud."
|
|
982
|
+
)
|
|
983
|
+
if strict:
|
|
984
|
+
return False
|
|
985
|
+
|
|
986
|
+
# verify that the subnet group has the subset of subnets that the cloud has
|
|
987
|
+
subnet_ids = [
|
|
988
|
+
subnet.subnet_id
|
|
989
|
+
for subnet in cloud_resource.aws_subnet_ids_with_availability_zones
|
|
990
|
+
]
|
|
991
|
+
for subnet in subnet_group_response["SubnetGroups"][0]["Subnets"]:
|
|
992
|
+
if subnet["Identifier"] not in subnet_ids:
|
|
993
|
+
logger.warning(
|
|
994
|
+
f"MemoryDB cluster {cloud_resource.memorydb_cluster_config.id} has subnet {subnet['Identifier']} that is not one of the subnets in the cloud."
|
|
995
|
+
)
|
|
996
|
+
if strict:
|
|
997
|
+
return False
|
|
998
|
+
|
|
999
|
+
# verify that the cluster has parameter group with the maxmemory-policy set to allkeys-lru
|
|
1000
|
+
parameter_response = client.describe_parameters(
|
|
1001
|
+
ParameterGroupName=response["Clusters"][0]["ParameterGroupName"]
|
|
1002
|
+
)
|
|
1003
|
+
for param in parameter_response["Parameters"]:
|
|
1004
|
+
if param["Name"] == "maxmemory-policy" and param["Value"] != "allkeys-lru":
|
|
1005
|
+
logger.warning(
|
|
1006
|
+
f"MemoryDB cluster {cloud_resource.memorydb_cluster_config.id} should have parameter group with maxmemory-policy set to allkeys-lru instead of {param['Value']}."
|
|
1007
|
+
)
|
|
1008
|
+
if strict:
|
|
1009
|
+
return False
|
|
1010
|
+
|
|
1011
|
+
# verify TLS is enabled
|
|
1012
|
+
if not response["Clusters"][0]["TLSEnabled"]:
|
|
1013
|
+
logger.error(
|
|
1014
|
+
f"MemoryDB cluster {cloud_resource.memorydb_cluster_config.id} has TLS disabled. Please create a memorydb cluster with TLS enabled."
|
|
1015
|
+
)
|
|
1016
|
+
return False
|
|
1017
|
+
|
|
1018
|
+
# verify that each shard in the cluster has at least 2 nodes for high availability
|
|
1019
|
+
for shard in response["Clusters"][0]["Shards"]:
|
|
1020
|
+
if len(shard["Nodes"]) < 2:
|
|
1021
|
+
logger.error(
|
|
1022
|
+
f"MemoryDB cluster {cloud_resource.memorydb_cluster_config.id} has shard {shard['Name']} with less than 2 nodes. This is not enough for high availability. Please make sure each shard has at least 2 nodes."
|
|
1023
|
+
)
|
|
1024
|
+
return False
|
|
1025
|
+
|
|
1026
|
+
except ClientError as e:
|
|
1027
|
+
logger.log_resource_exception(CloudAnalyticsEventCloudResource.AWS_MEMORYDB, e)
|
|
1028
|
+
raise ClickException(
|
|
1029
|
+
f"Failed to verify MemoryDB cluster {cloud_resource.memorydb_cluster_config.id}.\nError: {e}"
|
|
1030
|
+
)
|
|
1031
|
+
|
|
1032
|
+
return True
|