blaxel 0.2.34__py3-none-any.whl → 0.2.35__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.
- blaxel/__init__.py +2 -2
- blaxel/core/client/api/agents/create_agent.py +64 -19
- blaxel/core/client/api/agents/delete_agent.py +44 -15
- blaxel/core/client/api/agents/get_agent.py +43 -14
- blaxel/core/client/api/agents/list_agents.py +40 -11
- blaxel/core/client/api/agents/update_agent.py +60 -19
- blaxel/core/client/api/compute/create_sandbox.py +60 -23
- blaxel/core/client/api/compute/delete_sandbox.py +40 -19
- blaxel/core/client/api/compute/get_sandbox.py +39 -18
- blaxel/core/client/api/compute/list_sandboxes.py +40 -19
- blaxel/core/client/api/compute/update_sandbox.py +56 -23
- blaxel/core/client/api/configurations/get_configuration.py +16 -4
- blaxel/core/client/api/customdomains/create_custom_domain.py +12 -0
- blaxel/core/client/api/customdomains/list_custom_domains.py +16 -4
- blaxel/core/client/api/default/get_template.py +8 -4
- blaxel/core/client/api/functions/create_function.py +62 -19
- blaxel/core/client/api/functions/delete_function.py +46 -15
- blaxel/core/client/api/functions/get_function.py +45 -14
- blaxel/core/client/api/functions/list_functions.py +44 -15
- blaxel/core/client/api/functions/update_function.py +62 -19
- blaxel/core/client/api/images/cleanup_images.py +12 -12
- blaxel/core/client/api/images/delete_image.py +12 -8
- blaxel/core/client/api/images/delete_image_tag.py +12 -8
- blaxel/core/client/api/images/get_image.py +12 -8
- blaxel/core/client/api/images/list_images.py +12 -8
- blaxel/core/client/api/integrations/create_integration_connection.py +56 -23
- blaxel/core/client/api/integrations/delete_integration_connection.py +48 -19
- blaxel/core/client/api/integrations/get_integration.py +12 -8
- blaxel/core/client/api/integrations/get_integration_connection.py +44 -19
- blaxel/core/client/api/integrations/get_integration_connection_model.py +2 -2
- blaxel/core/client/api/integrations/list_integration_connections.py +36 -19
- blaxel/core/client/api/integrations/update_integration_connection.py +52 -19
- blaxel/core/client/api/jobs/create_job.py +20 -12
- blaxel/core/client/api/jobs/create_job_execution.py +22 -16
- blaxel/core/client/api/jobs/delete_job.py +12 -8
- blaxel/core/client/api/jobs/delete_job_execution.py +12 -8
- blaxel/core/client/api/jobs/get_job.py +24 -20
- blaxel/core/client/api/jobs/get_job_execution.py +8 -4
- blaxel/core/client/api/jobs/list_job_executions.py +8 -4
- blaxel/core/client/api/jobs/list_jobs.py +12 -8
- blaxel/core/client/api/jobs/update_job.py +20 -12
- blaxel/core/client/api/locations/list_locations.py +12 -8
- blaxel/core/client/api/{default → mcphub}/list_mcp_hub_definitions.py +20 -4
- blaxel/core/client/api/models/create_model.py +52 -23
- blaxel/core/client/api/models/delete_model.py +40 -19
- blaxel/core/client/api/models/get_model.py +40 -19
- blaxel/core/client/api/models/list_models.py +40 -19
- blaxel/core/client/api/models/update_model.py +52 -23
- blaxel/core/client/api/policies/create_policy.py +12 -8
- blaxel/core/client/api/policies/delete_policy.py +12 -8
- blaxel/core/client/api/policies/get_policy.py +12 -8
- blaxel/core/client/api/policies/list_policies.py +12 -8
- blaxel/core/client/api/policies/update_policy.py +12 -8
- blaxel/core/client/api/public_ipslist/list_public_ips.py +37 -5
- blaxel/core/client/api/sandboxhub/__init__.py +0 -0
- blaxel/core/client/api/{default → sandboxhub}/list_sandbox_hub_definitions.py +20 -4
- blaxel/core/client/api/service_accounts/create_api_key_for_service_account.py +12 -8
- blaxel/core/client/api/service_accounts/create_workspace_service_account.py +12 -8
- blaxel/core/client/api/service_accounts/delete_api_key_for_service_account.py +6 -4
- blaxel/core/client/api/service_accounts/delete_workspace_service_account.py +12 -8
- blaxel/core/client/api/service_accounts/get_workspace_service_accounts.py +12 -8
- blaxel/core/client/api/service_accounts/list_api_keys_for_service_account.py +12 -8
- blaxel/core/client/api/service_accounts/update_workspace_service_account.py +8 -8
- blaxel/core/client/api/templates/list_templates.py +12 -8
- blaxel/core/client/api/volume_templates/create_volume_template.py +8 -4
- blaxel/core/client/api/volume_templates/list_volume_templates.py +8 -4
- blaxel/core/client/api/volumes/create_volume.py +56 -23
- blaxel/core/client/api/volumes/delete_volume.py +44 -19
- blaxel/core/client/api/volumes/get_volume.py +40 -19
- blaxel/core/client/api/volumes/list_volumes.py +40 -19
- blaxel/core/client/api/workspaces/create_workspace.py +54 -23
- blaxel/core/client/api/workspaces/delete_workspace.py +42 -19
- blaxel/core/client/api/workspaces/get_workspace.py +42 -19
- blaxel/core/client/api/workspaces/invite_workspace_user.py +8 -4
- blaxel/core/client/api/workspaces/list_workspace_users.py +12 -8
- blaxel/core/client/api/workspaces/list_workspaces.py +36 -19
- blaxel/core/client/api/workspaces/update_workspace.py +50 -19
- blaxel/core/client/models/__init__.py +76 -146
- blaxel/core/client/models/agent.py +43 -47
- blaxel/core/client/models/agent_runtime.py +139 -0
- blaxel/core/client/models/agent_runtime_generation.py +18 -0
- blaxel/core/client/models/agent_spec.py +33 -110
- blaxel/core/client/models/api_key.py +5 -4
- blaxel/core/client/models/core_event.py +5 -5
- blaxel/core/client/models/create_api_key_for_service_account_body.py +2 -1
- blaxel/core/client/models/create_job_execution_request.py +1 -1
- blaxel/core/client/models/create_job_execution_response.py +13 -9
- blaxel/core/client/models/custom_domain.py +19 -36
- blaxel/core/client/models/custom_domain_metadata.py +4 -3
- blaxel/core/client/models/custom_domain_spec.py +14 -5
- blaxel/core/client/models/custom_domain_spec_status.py +19 -0
- blaxel/core/client/models/entrypoint.py +39 -13
- blaxel/core/client/models/{workspace_labels.py → entrypoint_args_item.py} +6 -6
- blaxel/core/client/models/entrypoint_env.py +3 -3
- blaxel/core/client/models/{job_metrics_executions_total.py → entrypoint_super_gateway_args_item.py} +6 -6
- blaxel/core/client/models/{spec_configuration.py → env.py} +17 -8
- blaxel/core/{sandbox/client/models/welcome_response.py → client/models/error.py} +26 -23
- blaxel/core/client/models/expiration_policy.py +30 -11
- blaxel/core/client/models/expiration_policy_action.py +17 -0
- blaxel/core/client/models/expiration_policy_type.py +19 -0
- blaxel/core/client/models/flavor.py +13 -5
- blaxel/core/client/models/flavor_type.py +18 -0
- blaxel/core/client/models/form.py +6 -6
- blaxel/core/client/models/function.py +43 -47
- blaxel/core/client/models/function_runtime.py +138 -0
- blaxel/core/client/models/function_runtime_generation.py +18 -0
- blaxel/core/client/models/function_spec.py +27 -73
- blaxel/core/client/models/function_spec_transport.py +18 -0
- blaxel/core/client/models/image.py +19 -36
- blaxel/core/client/models/integration_connection.py +25 -39
- blaxel/core/client/models/integration_connection_spec.py +8 -5
- blaxel/core/client/models/integration_connection_spec_config.py +1 -1
- blaxel/core/client/models/integration_connection_spec_secret.py +1 -1
- blaxel/core/client/models/integration_endpoint.py +41 -11
- blaxel/core/client/models/integration_endpoint_ignore_models_item.py +45 -0
- blaxel/core/client/models/{mcp_definition_entrypoint.py → integration_endpoint_models_item.py} +6 -6
- blaxel/core/client/models/job.py +43 -47
- blaxel/core/client/models/job_execution.py +30 -37
- blaxel/core/client/models/job_execution_metadata.py +3 -3
- blaxel/core/client/models/job_execution_spec.py +2 -2
- blaxel/core/client/models/job_execution_stats.py +5 -5
- blaxel/core/client/models/job_execution_status.py +24 -0
- blaxel/core/client/models/job_execution_task.py +12 -4
- blaxel/core/client/models/job_execution_task_metadata.py +1 -1
- blaxel/core/client/models/job_execution_task_spec.py +2 -2
- blaxel/core/client/models/job_execution_task_status.py +23 -0
- blaxel/core/client/models/job_runtime.py +172 -0
- blaxel/core/client/models/job_runtime_generation.py +18 -0
- blaxel/core/client/models/job_spec.py +20 -88
- blaxel/core/client/models/location_response.py +5 -5
- blaxel/core/client/models/mcp_definition.py +30 -17
- blaxel/core/client/models/{job_metrics_tasks_total.py → mcp_definition_categories_item.py} +6 -6
- blaxel/core/client/models/metadata.py +23 -17
- blaxel/core/client/models/metadata_labels.py +4 -1
- blaxel/core/client/models/model.py +43 -47
- blaxel/core/client/models/model_runtime.py +99 -0
- blaxel/core/client/models/model_runtime_type.py +34 -0
- blaxel/core/client/models/model_spec.py +12 -58
- blaxel/core/client/models/o_auth.py +23 -6
- blaxel/core/client/models/{form_oauth.py → o_auth_scope_item.py} +6 -6
- blaxel/core/client/models/pending_invitation_accept.py +2 -1
- blaxel/core/client/models/pending_invitation_workspace_details.py +27 -6
- blaxel/core/client/models/{metrics_request_total_per_code.py → pending_invitation_workspace_details_emails_item.py} +6 -6
- blaxel/core/client/models/policy.py +20 -36
- blaxel/core/client/models/policy_location.py +13 -5
- blaxel/core/client/models/policy_location_type.py +19 -0
- blaxel/core/client/models/policy_max_tokens.py +6 -6
- blaxel/core/client/models/policy_resource_type.py +20 -0
- blaxel/core/client/models/policy_spec.py +31 -10
- blaxel/core/client/models/policy_spec_type.py +19 -0
- blaxel/core/client/models/port.py +25 -15
- blaxel/core/client/models/port_protocol.py +19 -0
- blaxel/core/client/models/preview.py +19 -36
- blaxel/core/client/models/preview_metadata.py +12 -10
- blaxel/core/client/models/preview_token.py +19 -36
- blaxel/core/client/models/preview_token_metadata.py +8 -6
- blaxel/core/client/models/repository.py +2 -2
- blaxel/core/client/models/revision_configuration.py +3 -3
- blaxel/core/client/models/sandbox.py +45 -58
- blaxel/core/client/models/sandbox_definition.py +37 -22
- blaxel/core/client/models/sandbox_definition_categories_item.py +45 -0
- blaxel/core/client/models/sandbox_error.py +148 -0
- blaxel/core/client/models/sandbox_error_details.py +45 -0
- blaxel/core/client/models/sandbox_lifecycle.py +3 -2
- blaxel/core/client/models/sandbox_runtime.py +145 -0
- blaxel/core/client/models/sandbox_spec.py +33 -134
- blaxel/core/client/models/status.py +25 -0
- blaxel/core/client/models/template.py +8 -7
- blaxel/core/client/models/template_variable.py +5 -5
- blaxel/core/client/models/trigger.py +14 -6
- blaxel/core/client/models/trigger_configuration.py +7 -6
- blaxel/core/client/models/trigger_type.py +19 -0
- blaxel/core/client/models/volume.py +35 -47
- blaxel/core/client/models/volume_attachment.py +6 -4
- blaxel/core/client/models/volume_spec.py +7 -4
- blaxel/core/client/models/volume_state.py +3 -3
- blaxel/core/client/models/volume_template.py +19 -33
- blaxel/core/client/models/volume_template_state.py +12 -4
- blaxel/core/client/models/volume_template_state_status.py +19 -0
- blaxel/core/client/models/volume_template_version.py +12 -4
- blaxel/core/client/models/volume_template_version_status.py +19 -0
- blaxel/core/client/models/workspace.py +35 -25
- blaxel/core/client/models/workspace_runtime.py +3 -2
- blaxel/core/client/models/workspace_status.py +22 -0
- blaxel/core/common/__init__.py +1 -1
- blaxel/core/jobs/__init__.py +0 -1
- blaxel/core/sandbox/__init__.py +2 -0
- blaxel/core/sandbox/client/api/process/post_process.py +8 -4
- blaxel/core/sandbox/client/models/__init__.py +0 -2
- blaxel/core/sandbox/client/models/process_response.py +16 -0
- blaxel/core/sandbox/client/models/process_response_status.py +9 -0
- blaxel/core/sandbox/default/__init__.py +2 -0
- blaxel/core/sandbox/default/interpreter.py +5 -1
- blaxel/core/sandbox/default/preview.py +3 -1
- blaxel/core/sandbox/default/sandbox.py +51 -16
- blaxel/core/sandbox/sync/process.py +2 -1
- blaxel/core/sandbox/sync/sandbox.py +34 -13
- blaxel/core/tools/common.py +16 -2
- blaxel/core/volume/__init__.py +2 -2
- blaxel/core/volume/volume.py +32 -10
- blaxel/langgraph/tools.py +34 -2
- blaxel/openai/tools.py +33 -1
- {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/METADATA +3 -3
- {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/RECORD +207 -246
- blaxel/core/client/models/acl.py +0 -133
- blaxel/core/client/models/billable_time_metric.py +0 -89
- blaxel/core/client/models/core_spec.py +0 -194
- blaxel/core/client/models/core_spec_configurations.py +0 -77
- blaxel/core/client/models/histogram_bucket.py +0 -79
- blaxel/core/client/models/histogram_stats.py +0 -88
- blaxel/core/client/models/integration_model.py +0 -162
- blaxel/core/client/models/job_execution_config.py +0 -79
- blaxel/core/client/models/job_metrics.py +0 -262
- blaxel/core/client/models/jobs_chart_value.py +0 -70
- blaxel/core/client/models/jobs_network_chart.py +0 -102
- blaxel/core/client/models/jobs_success_failed_chart.py +0 -147
- blaxel/core/client/models/jobs_total.py +0 -88
- blaxel/core/client/models/last_n_requests_metric.py +0 -97
- blaxel/core/client/models/latency_metric.py +0 -148
- blaxel/core/client/models/logs_response.py +0 -63
- blaxel/core/client/models/logs_response_data.py +0 -99
- blaxel/core/client/models/mcp_definition_form.py +0 -45
- blaxel/core/client/models/memory_allocation_by_name.py +0 -70
- blaxel/core/client/models/memory_allocation_metric.py +0 -61
- blaxel/core/client/models/metric.py +0 -79
- blaxel/core/client/models/metrics.py +0 -273
- blaxel/core/client/models/metrics_models.py +0 -45
- blaxel/core/client/models/metrics_rps_per_code.py +0 -45
- blaxel/core/client/models/pod_template_spec.py +0 -45
- blaxel/core/client/models/request_duration_over_time_metric.py +0 -97
- blaxel/core/client/models/request_duration_over_time_metrics.py +0 -84
- blaxel/core/client/models/request_total_by_origin_metric.py +0 -129
- blaxel/core/client/models/request_total_by_origin_metric_request_total_by_origin.py +0 -45
- blaxel/core/client/models/request_total_by_origin_metric_request_total_by_origin_and_code.py +0 -45
- blaxel/core/client/models/request_total_metric.py +0 -155
- blaxel/core/client/models/request_total_metric_request_total_per_code.py +0 -45
- blaxel/core/client/models/request_total_metric_rps_per_code.py +0 -45
- blaxel/core/client/models/request_total_response_data.py +0 -97
- blaxel/core/client/models/resource.py +0 -99
- blaxel/core/client/models/resource_log.py +0 -88
- blaxel/core/client/models/resource_log_chart.py +0 -133
- blaxel/core/client/models/resource_log_response.py +0 -83
- blaxel/core/client/models/resource_metrics.py +0 -618
- blaxel/core/client/models/resource_metrics_request_total_per_code.py +0 -45
- blaxel/core/client/models/resource_metrics_request_total_per_code_previous.py +0 -45
- blaxel/core/client/models/resource_metrics_rps_per_code.py +0 -45
- blaxel/core/client/models/resource_metrics_rps_per_code_previous.py +0 -45
- blaxel/core/client/models/resource_trace.py +0 -97
- blaxel/core/client/models/runtime.py +0 -317
- blaxel/core/client/models/runtime_configuration.py +0 -45
- blaxel/core/client/models/runtime_startup_probe.py +0 -45
- blaxel/core/client/models/sandbox_metrics.py +0 -88
- blaxel/core/client/models/serverless_config.py +0 -117
- blaxel/core/client/models/serverless_config_configuration.py +0 -45
- blaxel/core/client/models/start_sandbox.py +0 -98
- blaxel/core/client/models/stop_sandbox.py +0 -98
- blaxel/core/client/models/store_agent.py +0 -181
- blaxel/core/client/models/store_agent_labels.py +0 -45
- blaxel/core/client/models/store_configuration.py +0 -156
- blaxel/core/client/models/store_configuration_option.py +0 -79
- blaxel/core/client/models/time_to_first_token_over_time_metrics.py +0 -87
- blaxel/core/client/models/token_rate_metric.py +0 -106
- blaxel/core/client/models/token_rate_metrics.py +0 -124
- blaxel/core/client/models/token_total_metric.py +0 -112
- blaxel/core/client/models/trace_ids_response.py +0 -45
- blaxel/core/client/models/websocket_channel.py +0 -97
- blaxel/core/client/models/websocket_message.py +0 -106
- blaxel/core/sandbox/client/api/root/delete.py +0 -130
- blaxel/core/sandbox/client/api/root/get.py +0 -130
- blaxel/core/sandbox/client/api/root/options.py +0 -130
- blaxel/core/sandbox/client/api/root/patch.py +0 -130
- blaxel/core/sandbox/client/api/root/post.py +0 -130
- blaxel/core/sandbox/client/api/root/put.py +0 -130
- /blaxel/core/{sandbox/client/api/root → client/api/mcphub}/__init__.py +0 -0
- {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/WHEEL +0 -0
- {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/licenses/LICENSE +0 -0
|
@@ -3,6 +3,7 @@ from typing import TYPE_CHECKING, Any, TypeVar, Union
|
|
|
3
3
|
from attrs import define as _attrs_define
|
|
4
4
|
from attrs import field as _attrs_field
|
|
5
5
|
|
|
6
|
+
from ..models.trigger_type import TriggerType
|
|
6
7
|
from ..types import UNSET, Unset
|
|
7
8
|
|
|
8
9
|
if TYPE_CHECKING:
|
|
@@ -18,15 +19,15 @@ class Trigger:
|
|
|
18
19
|
|
|
19
20
|
Attributes:
|
|
20
21
|
configuration (Union[Unset, TriggerConfiguration]): Trigger configuration
|
|
21
|
-
enabled (Union[Unset, bool]): Enable or disable the trigger (default: true)
|
|
22
|
-
id (Union[Unset, str]): The id of the trigger
|
|
23
|
-
type_ (Union[Unset,
|
|
22
|
+
enabled (Union[Unset, bool]): Enable or disable the trigger (default: true) Example: True.
|
|
23
|
+
id (Union[Unset, str]): The id of the trigger Example: trigger-1.
|
|
24
|
+
type_ (Union[Unset, TriggerType]): The type of trigger, can be http or http-async Example: http.
|
|
24
25
|
"""
|
|
25
26
|
|
|
26
27
|
configuration: Union[Unset, "TriggerConfiguration"] = UNSET
|
|
27
28
|
enabled: Union[Unset, bool] = UNSET
|
|
28
29
|
id: Union[Unset, str] = UNSET
|
|
29
|
-
type_: Union[Unset,
|
|
30
|
+
type_: Union[Unset, TriggerType] = UNSET
|
|
30
31
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
32
|
|
|
32
33
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -44,7 +45,9 @@ class Trigger:
|
|
|
44
45
|
|
|
45
46
|
id = self.id
|
|
46
47
|
|
|
47
|
-
type_ =
|
|
48
|
+
type_: Union[Unset, str] = UNSET
|
|
49
|
+
if not isinstance(self.type_, Unset):
|
|
50
|
+
type_ = self.type_.value
|
|
48
51
|
|
|
49
52
|
field_dict: dict[str, Any] = {}
|
|
50
53
|
field_dict.update(self.additional_properties)
|
|
@@ -78,7 +81,12 @@ class Trigger:
|
|
|
78
81
|
|
|
79
82
|
id = d.pop("id", UNSET)
|
|
80
83
|
|
|
81
|
-
|
|
84
|
+
_type_ = d.pop("type", d.pop("type_", UNSET))
|
|
85
|
+
type_: Union[Unset, TriggerType]
|
|
86
|
+
if isinstance(_type_, Unset):
|
|
87
|
+
type_ = UNSET
|
|
88
|
+
else:
|
|
89
|
+
type_ = TriggerType(_type_)
|
|
82
90
|
|
|
83
91
|
trigger = cls(
|
|
84
92
|
configuration=configuration,
|
|
@@ -17,14 +17,15 @@ class TriggerConfiguration:
|
|
|
17
17
|
"""Trigger configuration
|
|
18
18
|
|
|
19
19
|
Attributes:
|
|
20
|
-
authentication_type (Union[Unset, str]): The authentication type of the trigger
|
|
20
|
+
authentication_type (Union[Unset, str]): The authentication type of the trigger Example: blaxel.
|
|
21
21
|
callback_secret (Union[Unset, str]): The callback secret for async triggers (auto-generated, encrypted)
|
|
22
|
-
callback_url (Union[Unset, str]): The callback URL for async triggers (optional)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
callback_url (Union[Unset, str]): The callback URL for async triggers (optional) Example:
|
|
23
|
+
https://myapp.com/webhook.
|
|
24
|
+
path (Union[Unset, str]): The path of the trigger Example: /invoke.
|
|
25
|
+
retry (Union[Unset, int]): The retry of the trigger Example: 3.
|
|
26
|
+
schedule (Union[Unset, str]): The schedule of the trigger, cron expression * * * * * Example: 0 * * * *.
|
|
26
27
|
tasks (Union[Unset, list['TriggerConfigurationTask']]): The tasks configuration of the cronjob
|
|
27
|
-
timeout (Union[Unset, int]): The timeout in seconds for async triggers (max 900s, MK3 only)
|
|
28
|
+
timeout (Union[Unset, int]): The timeout in seconds for async triggers (max 900s, MK3 only) Example: 300.
|
|
28
29
|
"""
|
|
29
30
|
|
|
30
31
|
authentication_type: Union[Unset, str] = UNSET
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class TriggerType(str, Enum):
|
|
5
|
+
CRON = "cron"
|
|
6
|
+
HTTP = "http"
|
|
7
|
+
HTTP_ASYNC = "http-async"
|
|
8
|
+
|
|
9
|
+
def __str__(self) -> str:
|
|
10
|
+
return str(self.value)
|
|
11
|
+
|
|
12
|
+
@classmethod
|
|
13
|
+
def _missing_(cls, value: object) -> "TriggerType | None":
|
|
14
|
+
if isinstance(value, str):
|
|
15
|
+
upper_value = value.upper()
|
|
16
|
+
for member in cls:
|
|
17
|
+
if member.value.upper() == upper_value:
|
|
18
|
+
return member
|
|
19
|
+
return None
|
|
@@ -17,26 +17,39 @@ T = TypeVar("T", bound="Volume")
|
|
|
17
17
|
|
|
18
18
|
@_attrs_define
|
|
19
19
|
class Volume:
|
|
20
|
-
"""
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
"""Persistent storage volume that can be attached to sandboxes for durable file storage across sessions. Volumes
|
|
21
|
+
survive sandbox deletion and can be reattached to new sandboxes.
|
|
22
|
+
|
|
23
|
+
Attributes:
|
|
24
|
+
metadata (Metadata): Common metadata fields shared by all Blaxel resources including name, labels, timestamps,
|
|
25
|
+
and ownership information
|
|
26
|
+
spec (VolumeSpec): Immutable volume configuration set at creation time (size and region cannot be changed after
|
|
27
|
+
creation)
|
|
28
|
+
events (Union[Unset, list['CoreEvent']]): Events happening on a resource deployed on Blaxel
|
|
29
|
+
state (Union[Unset, VolumeState]): Current runtime state of the volume including attachment status
|
|
30
|
+
status (Union[Unset, str]): Volume status computed from events
|
|
31
|
+
terminated_at (Union[Unset, str]): Timestamp when the volume was marked for termination
|
|
29
32
|
"""
|
|
30
33
|
|
|
34
|
+
metadata: "Metadata"
|
|
35
|
+
spec: "VolumeSpec"
|
|
31
36
|
events: Union[Unset, list["CoreEvent"]] = UNSET
|
|
32
|
-
metadata: Union[Unset, "Metadata"] = UNSET
|
|
33
|
-
spec: Union[Unset, "VolumeSpec"] = UNSET
|
|
34
37
|
state: Union[Unset, "VolumeState"] = UNSET
|
|
35
38
|
status: Union[Unset, str] = UNSET
|
|
36
39
|
terminated_at: Union[Unset, str] = UNSET
|
|
37
40
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
38
41
|
|
|
39
42
|
def to_dict(self) -> dict[str, Any]:
|
|
43
|
+
if type(self.metadata) is dict:
|
|
44
|
+
metadata = self.metadata
|
|
45
|
+
else:
|
|
46
|
+
metadata = self.metadata.to_dict()
|
|
47
|
+
|
|
48
|
+
if type(self.spec) is dict:
|
|
49
|
+
spec = self.spec
|
|
50
|
+
else:
|
|
51
|
+
spec = self.spec.to_dict()
|
|
52
|
+
|
|
40
53
|
events: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
41
54
|
if not isinstance(self.events, Unset):
|
|
42
55
|
events = []
|
|
@@ -49,22 +62,6 @@ class Volume:
|
|
|
49
62
|
)
|
|
50
63
|
events.append(componentsschemas_core_events_item)
|
|
51
64
|
|
|
52
|
-
metadata: Union[Unset, dict[str, Any]] = UNSET
|
|
53
|
-
if (
|
|
54
|
-
self.metadata
|
|
55
|
-
and not isinstance(self.metadata, Unset)
|
|
56
|
-
and not isinstance(self.metadata, dict)
|
|
57
|
-
):
|
|
58
|
-
metadata = self.metadata.to_dict()
|
|
59
|
-
elif self.metadata and isinstance(self.metadata, dict):
|
|
60
|
-
metadata = self.metadata
|
|
61
|
-
|
|
62
|
-
spec: Union[Unset, dict[str, Any]] = UNSET
|
|
63
|
-
if self.spec and not isinstance(self.spec, Unset) and not isinstance(self.spec, dict):
|
|
64
|
-
spec = self.spec.to_dict()
|
|
65
|
-
elif self.spec and isinstance(self.spec, dict):
|
|
66
|
-
spec = self.spec
|
|
67
|
-
|
|
68
65
|
state: Union[Unset, dict[str, Any]] = UNSET
|
|
69
66
|
if self.state and not isinstance(self.state, Unset) and not isinstance(self.state, dict):
|
|
70
67
|
state = self.state.to_dict()
|
|
@@ -77,13 +74,14 @@ class Volume:
|
|
|
77
74
|
|
|
78
75
|
field_dict: dict[str, Any] = {}
|
|
79
76
|
field_dict.update(self.additional_properties)
|
|
80
|
-
field_dict.update(
|
|
77
|
+
field_dict.update(
|
|
78
|
+
{
|
|
79
|
+
"metadata": metadata,
|
|
80
|
+
"spec": spec,
|
|
81
|
+
}
|
|
82
|
+
)
|
|
81
83
|
if events is not UNSET:
|
|
82
84
|
field_dict["events"] = events
|
|
83
|
-
if metadata is not UNSET:
|
|
84
|
-
field_dict["metadata"] = metadata
|
|
85
|
-
if spec is not UNSET:
|
|
86
|
-
field_dict["spec"] = spec
|
|
87
85
|
if state is not UNSET:
|
|
88
86
|
field_dict["state"] = state
|
|
89
87
|
if status is not UNSET:
|
|
@@ -103,6 +101,10 @@ class Volume:
|
|
|
103
101
|
if not src_dict:
|
|
104
102
|
return None
|
|
105
103
|
d = src_dict.copy()
|
|
104
|
+
metadata = Metadata.from_dict(d.pop("metadata"))
|
|
105
|
+
|
|
106
|
+
spec = VolumeSpec.from_dict(d.pop("spec"))
|
|
107
|
+
|
|
106
108
|
events = []
|
|
107
109
|
_events = d.pop("events", UNSET)
|
|
108
110
|
for componentsschemas_core_events_item_data in _events or []:
|
|
@@ -112,20 +114,6 @@ class Volume:
|
|
|
112
114
|
|
|
113
115
|
events.append(componentsschemas_core_events_item)
|
|
114
116
|
|
|
115
|
-
_metadata = d.pop("metadata", UNSET)
|
|
116
|
-
metadata: Union[Unset, Metadata]
|
|
117
|
-
if isinstance(_metadata, Unset):
|
|
118
|
-
metadata = UNSET
|
|
119
|
-
else:
|
|
120
|
-
metadata = Metadata.from_dict(_metadata)
|
|
121
|
-
|
|
122
|
-
_spec = d.pop("spec", UNSET)
|
|
123
|
-
spec: Union[Unset, VolumeSpec]
|
|
124
|
-
if isinstance(_spec, Unset):
|
|
125
|
-
spec = UNSET
|
|
126
|
-
else:
|
|
127
|
-
spec = VolumeSpec.from_dict(_spec)
|
|
128
|
-
|
|
129
117
|
_state = d.pop("state", UNSET)
|
|
130
118
|
state: Union[Unset, VolumeState]
|
|
131
119
|
if isinstance(_state, Unset):
|
|
@@ -138,9 +126,9 @@ class Volume:
|
|
|
138
126
|
terminated_at = d.pop("terminatedAt", d.pop("terminated_at", UNSET))
|
|
139
127
|
|
|
140
128
|
volume = cls(
|
|
141
|
-
events=events,
|
|
142
129
|
metadata=metadata,
|
|
143
130
|
spec=spec,
|
|
131
|
+
events=events,
|
|
144
132
|
state=state,
|
|
145
133
|
status=status,
|
|
146
134
|
terminated_at=terminated_at,
|
|
@@ -10,12 +10,14 @@ T = TypeVar("T", bound="VolumeAttachment")
|
|
|
10
10
|
|
|
11
11
|
@_attrs_define
|
|
12
12
|
class VolumeAttachment:
|
|
13
|
-
"""
|
|
13
|
+
"""Configuration for attaching a volume to a sandbox at a specific filesystem path
|
|
14
14
|
|
|
15
15
|
Attributes:
|
|
16
|
-
mount_path (Union[Unset, str]):
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
mount_path (Union[Unset, str]): Absolute filesystem path where the volume will be mounted inside the sandbox
|
|
17
|
+
Example: /mnt/data.
|
|
18
|
+
name (Union[Unset, str]): Name of the volume resource to attach (must exist in the same workspace and region)
|
|
19
|
+
Example: my-volume.
|
|
20
|
+
read_only (Union[Unset, bool]): If true, the volume is mounted read-only and cannot be modified by the sandbox
|
|
19
21
|
"""
|
|
20
22
|
|
|
21
23
|
mount_path: Union[Unset, str] = UNSET
|
|
@@ -10,13 +10,16 @@ T = TypeVar("T", bound="VolumeSpec")
|
|
|
10
10
|
|
|
11
11
|
@_attrs_define
|
|
12
12
|
class VolumeSpec:
|
|
13
|
-
"""
|
|
13
|
+
"""Immutable volume configuration set at creation time (size and region cannot be changed after creation)
|
|
14
14
|
|
|
15
15
|
Attributes:
|
|
16
16
|
infrastructure_id (Union[Unset, str]): The internal infrastructure resource identifier for this volume
|
|
17
|
-
region (Union[Unset, str]):
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
region (Union[Unset, str]): Deployment region for the volume (e.g., us-pdx-1, eu-lon-1). Must match the region
|
|
18
|
+
of sandboxes it attaches to. Example: us-pdx-1.
|
|
19
|
+
size (Union[Unset, int]): Storage capacity in megabytes. Can be increased after creation but not decreased.
|
|
20
|
+
Example: 1024.
|
|
21
|
+
template (Union[Unset, str]): Volume template to initialize from, with optional revision (e.g., "mytemplate:1"
|
|
22
|
+
or "mytemplate:latest") Example: mytemplate:latest.
|
|
20
23
|
"""
|
|
21
24
|
|
|
22
25
|
infrastructure_id: Union[Unset, str] = UNSET
|
|
@@ -10,11 +10,11 @@ T = TypeVar("T", bound="VolumeState")
|
|
|
10
10
|
|
|
11
11
|
@_attrs_define
|
|
12
12
|
class VolumeState:
|
|
13
|
-
"""
|
|
13
|
+
"""Current runtime state of the volume including attachment status
|
|
14
14
|
|
|
15
15
|
Attributes:
|
|
16
|
-
attached_to (Union[Unset, str]): Resource this volume
|
|
17
|
-
|
|
16
|
+
attached_to (Union[Unset, str]): Resource currently using this volume in format "type:name" (e.g., "sandbox:my-
|
|
17
|
+
sandbox"). Empty if not attached. Example: sandbox:my-sandbox.
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
20
|
attached_to: Union[Unset, str] = UNSET
|
|
@@ -20,34 +20,29 @@ class VolumeTemplate:
|
|
|
20
20
|
"""Volume template for creating pre-configured volumes
|
|
21
21
|
|
|
22
22
|
Attributes:
|
|
23
|
-
metadata (
|
|
24
|
-
|
|
23
|
+
metadata (Metadata): Common metadata fields shared by all Blaxel resources including name, labels, timestamps,
|
|
24
|
+
and ownership information
|
|
25
|
+
spec (VolumeTemplateSpec): Volume template specification
|
|
25
26
|
state (Union[Unset, VolumeTemplateState]): Volume template state
|
|
26
27
|
versions (Union[Unset, list['VolumeTemplateVersion']]): List of versions for this template
|
|
27
28
|
"""
|
|
28
29
|
|
|
29
|
-
metadata:
|
|
30
|
-
spec:
|
|
30
|
+
metadata: "Metadata"
|
|
31
|
+
spec: "VolumeTemplateSpec"
|
|
31
32
|
state: Union[Unset, "VolumeTemplateState"] = UNSET
|
|
32
33
|
versions: Union[Unset, list["VolumeTemplateVersion"]] = UNSET
|
|
33
34
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
34
35
|
|
|
35
36
|
def to_dict(self) -> dict[str, Any]:
|
|
36
|
-
metadata
|
|
37
|
-
if (
|
|
38
|
-
self.metadata
|
|
39
|
-
and not isinstance(self.metadata, Unset)
|
|
40
|
-
and not isinstance(self.metadata, dict)
|
|
41
|
-
):
|
|
42
|
-
metadata = self.metadata.to_dict()
|
|
43
|
-
elif self.metadata and isinstance(self.metadata, dict):
|
|
37
|
+
if type(self.metadata) is dict:
|
|
44
38
|
metadata = self.metadata
|
|
39
|
+
else:
|
|
40
|
+
metadata = self.metadata.to_dict()
|
|
45
41
|
|
|
46
|
-
spec
|
|
47
|
-
if self.spec and not isinstance(self.spec, Unset) and not isinstance(self.spec, dict):
|
|
48
|
-
spec = self.spec.to_dict()
|
|
49
|
-
elif self.spec and isinstance(self.spec, dict):
|
|
42
|
+
if type(self.spec) is dict:
|
|
50
43
|
spec = self.spec
|
|
44
|
+
else:
|
|
45
|
+
spec = self.spec.to_dict()
|
|
51
46
|
|
|
52
47
|
state: Union[Unset, dict[str, Any]] = UNSET
|
|
53
48
|
if self.state and not isinstance(self.state, Unset) and not isinstance(self.state, dict):
|
|
@@ -67,11 +62,12 @@ class VolumeTemplate:
|
|
|
67
62
|
|
|
68
63
|
field_dict: dict[str, Any] = {}
|
|
69
64
|
field_dict.update(self.additional_properties)
|
|
70
|
-
field_dict.update(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
65
|
+
field_dict.update(
|
|
66
|
+
{
|
|
67
|
+
"metadata": metadata,
|
|
68
|
+
"spec": spec,
|
|
69
|
+
}
|
|
70
|
+
)
|
|
75
71
|
if state is not UNSET:
|
|
76
72
|
field_dict["state"] = state
|
|
77
73
|
if versions is not UNSET:
|
|
@@ -89,19 +85,9 @@ class VolumeTemplate:
|
|
|
89
85
|
if not src_dict:
|
|
90
86
|
return None
|
|
91
87
|
d = src_dict.copy()
|
|
92
|
-
|
|
93
|
-
metadata: Union[Unset, Metadata]
|
|
94
|
-
if isinstance(_metadata, Unset):
|
|
95
|
-
metadata = UNSET
|
|
96
|
-
else:
|
|
97
|
-
metadata = Metadata.from_dict(_metadata)
|
|
88
|
+
metadata = Metadata.from_dict(d.pop("metadata"))
|
|
98
89
|
|
|
99
|
-
|
|
100
|
-
spec: Union[Unset, VolumeTemplateSpec]
|
|
101
|
-
if isinstance(_spec, Unset):
|
|
102
|
-
spec = UNSET
|
|
103
|
-
else:
|
|
104
|
-
spec = VolumeTemplateSpec.from_dict(_spec)
|
|
90
|
+
spec = VolumeTemplateSpec.from_dict(d.pop("spec"))
|
|
105
91
|
|
|
106
92
|
_state = d.pop("state", UNSET)
|
|
107
93
|
state: Union[Unset, VolumeTemplateState]
|
|
@@ -3,6 +3,7 @@ from typing import Any, TypeVar, Union
|
|
|
3
3
|
from attrs import define as _attrs_define
|
|
4
4
|
from attrs import field as _attrs_field
|
|
5
5
|
|
|
6
|
+
from ..models.volume_template_state_status import VolumeTemplateStateStatus
|
|
6
7
|
from ..types import UNSET, Unset
|
|
7
8
|
|
|
8
9
|
T = TypeVar("T", bound="VolumeTemplateState")
|
|
@@ -15,13 +16,13 @@ class VolumeTemplateState:
|
|
|
15
16
|
Attributes:
|
|
16
17
|
last_version_uploaded_at (Union[Unset, str]): Timestamp of last version upload
|
|
17
18
|
latest_version (Union[Unset, str]): Current/latest S3 version ID
|
|
18
|
-
status (Union[Unset,
|
|
19
|
+
status (Union[Unset, VolumeTemplateStateStatus]): Status of the volume template (created, ready, error)
|
|
19
20
|
version_count (Union[Unset, int]): Total number of versions for this template
|
|
20
21
|
"""
|
|
21
22
|
|
|
22
23
|
last_version_uploaded_at: Union[Unset, str] = UNSET
|
|
23
24
|
latest_version: Union[Unset, str] = UNSET
|
|
24
|
-
status: Union[Unset,
|
|
25
|
+
status: Union[Unset, VolumeTemplateStateStatus] = UNSET
|
|
25
26
|
version_count: Union[Unset, int] = UNSET
|
|
26
27
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
28
|
|
|
@@ -30,7 +31,9 @@ class VolumeTemplateState:
|
|
|
30
31
|
|
|
31
32
|
latest_version = self.latest_version
|
|
32
33
|
|
|
33
|
-
status =
|
|
34
|
+
status: Union[Unset, str] = UNSET
|
|
35
|
+
if not isinstance(self.status, Unset):
|
|
36
|
+
status = self.status.value
|
|
34
37
|
|
|
35
38
|
version_count = self.version_count
|
|
36
39
|
|
|
@@ -59,7 +62,12 @@ class VolumeTemplateState:
|
|
|
59
62
|
|
|
60
63
|
latest_version = d.pop("latestVersion", d.pop("latest_version", UNSET))
|
|
61
64
|
|
|
62
|
-
|
|
65
|
+
_status = d.pop("status", UNSET)
|
|
66
|
+
status: Union[Unset, VolumeTemplateStateStatus]
|
|
67
|
+
if isinstance(_status, Unset):
|
|
68
|
+
status = UNSET
|
|
69
|
+
else:
|
|
70
|
+
status = VolumeTemplateStateStatus(_status)
|
|
63
71
|
|
|
64
72
|
version_count = d.pop("versionCount", d.pop("version_count", UNSET))
|
|
65
73
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class VolumeTemplateStateStatus(str, Enum):
|
|
5
|
+
CREATED = "created"
|
|
6
|
+
ERROR = "error"
|
|
7
|
+
READY = "ready"
|
|
8
|
+
|
|
9
|
+
def __str__(self) -> str:
|
|
10
|
+
return str(self.value)
|
|
11
|
+
|
|
12
|
+
@classmethod
|
|
13
|
+
def _missing_(cls, value: object) -> "VolumeTemplateStateStatus | None":
|
|
14
|
+
if isinstance(value, str):
|
|
15
|
+
upper_value = value.upper()
|
|
16
|
+
for member in cls:
|
|
17
|
+
if member.value.upper() == upper_value:
|
|
18
|
+
return member
|
|
19
|
+
return None
|
|
@@ -3,6 +3,7 @@ from typing import Any, TypeVar, Union
|
|
|
3
3
|
from attrs import define as _attrs_define
|
|
4
4
|
from attrs import field as _attrs_field
|
|
5
5
|
|
|
6
|
+
from ..models.volume_template_version_status import VolumeTemplateVersionStatus
|
|
6
7
|
from ..types import UNSET, Unset
|
|
7
8
|
|
|
8
9
|
T = TypeVar("T", bound="VolumeTemplateVersion")
|
|
@@ -17,7 +18,7 @@ class VolumeTemplateVersion:
|
|
|
17
18
|
content_size (Union[Unset, int]): Size of the template content in bytes
|
|
18
19
|
name (Union[Unset, str]): Name of the template version
|
|
19
20
|
region (Union[Unset, str]): AWS region where this version is stored
|
|
20
|
-
status (Union[Unset,
|
|
21
|
+
status (Union[Unset, VolumeTemplateVersionStatus]): Status of the version (CREATED, READY, FAILED)
|
|
21
22
|
template_name (Union[Unset, str]): Template name this version belongs to
|
|
22
23
|
version_id (Union[Unset, str]): S3 version ID for this template version
|
|
23
24
|
workspace (Union[Unset, str]): Workspace name
|
|
@@ -27,7 +28,7 @@ class VolumeTemplateVersion:
|
|
|
27
28
|
content_size: Union[Unset, int] = UNSET
|
|
28
29
|
name: Union[Unset, str] = UNSET
|
|
29
30
|
region: Union[Unset, str] = UNSET
|
|
30
|
-
status: Union[Unset,
|
|
31
|
+
status: Union[Unset, VolumeTemplateVersionStatus] = UNSET
|
|
31
32
|
template_name: Union[Unset, str] = UNSET
|
|
32
33
|
version_id: Union[Unset, str] = UNSET
|
|
33
34
|
workspace: Union[Unset, str] = UNSET
|
|
@@ -42,7 +43,9 @@ class VolumeTemplateVersion:
|
|
|
42
43
|
|
|
43
44
|
region = self.region
|
|
44
45
|
|
|
45
|
-
status =
|
|
46
|
+
status: Union[Unset, str] = UNSET
|
|
47
|
+
if not isinstance(self.status, Unset):
|
|
48
|
+
status = self.status.value
|
|
46
49
|
|
|
47
50
|
template_name = self.template_name
|
|
48
51
|
|
|
@@ -85,7 +88,12 @@ class VolumeTemplateVersion:
|
|
|
85
88
|
|
|
86
89
|
region = d.pop("region", UNSET)
|
|
87
90
|
|
|
88
|
-
|
|
91
|
+
_status = d.pop("status", UNSET)
|
|
92
|
+
status: Union[Unset, VolumeTemplateVersionStatus]
|
|
93
|
+
if isinstance(_status, Unset):
|
|
94
|
+
status = UNSET
|
|
95
|
+
else:
|
|
96
|
+
status = VolumeTemplateVersionStatus(_status)
|
|
89
97
|
|
|
90
98
|
template_name = d.pop("templateName", d.pop("template_name", UNSET))
|
|
91
99
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class VolumeTemplateVersionStatus(str, Enum):
|
|
5
|
+
CREATED = "CREATED"
|
|
6
|
+
FAILED = "FAILED"
|
|
7
|
+
READY = "READY"
|
|
8
|
+
|
|
9
|
+
def __str__(self) -> str:
|
|
10
|
+
return str(self.value)
|
|
11
|
+
|
|
12
|
+
@classmethod
|
|
13
|
+
def _missing_(cls, value: object) -> "VolumeTemplateVersionStatus | None":
|
|
14
|
+
if isinstance(value, str):
|
|
15
|
+
upper_value = value.upper()
|
|
16
|
+
for member in cls:
|
|
17
|
+
if member.value.upper() == upper_value:
|
|
18
|
+
return member
|
|
19
|
+
return None
|
|
@@ -3,10 +3,11 @@ from typing import TYPE_CHECKING, Any, TypeVar, Union
|
|
|
3
3
|
from attrs import define as _attrs_define
|
|
4
4
|
from attrs import field as _attrs_field
|
|
5
5
|
|
|
6
|
+
from ..models.workspace_status import WorkspaceStatus
|
|
6
7
|
from ..types import UNSET, Unset
|
|
7
8
|
|
|
8
9
|
if TYPE_CHECKING:
|
|
9
|
-
from ..models.
|
|
10
|
+
from ..models.metadata_labels import MetadataLabels
|
|
10
11
|
from ..models.workspace_runtime import WorkspaceRuntime
|
|
11
12
|
|
|
12
13
|
|
|
@@ -15,23 +16,25 @@ T = TypeVar("T", bound="Workspace")
|
|
|
15
16
|
|
|
16
17
|
@_attrs_define
|
|
17
18
|
class Workspace:
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
19
|
+
"""Tenant container that groups all Blaxel resources (agents, functions, models, etc.) with shared team access control
|
|
20
|
+
and billing.
|
|
21
|
+
|
|
22
|
+
Attributes:
|
|
23
|
+
created_at (Union[Unset, str]): The date and time when the resource was created
|
|
24
|
+
updated_at (Union[Unset, str]): The date and time when the resource was updated
|
|
25
|
+
created_by (Union[Unset, str]): The user or service account who created the resource
|
|
26
|
+
updated_by (Union[Unset, str]): The user or service account who updated the resource
|
|
27
|
+
account_id (Union[Unset, str]): Workspace account id
|
|
28
|
+
display_name (Union[Unset, str]): Workspace display name Example: My Workspace.
|
|
29
|
+
id (Union[Unset, str]): Autogenerated unique workspace id
|
|
30
|
+
labels (Union[Unset, MetadataLabels]): Key-value pairs for organizing and filtering resources. Labels can be
|
|
31
|
+
used to categorize resources by environment, project, team, or any custom taxonomy.
|
|
32
|
+
name (Union[Unset, str]): Workspace name Example: my-workspace.
|
|
33
|
+
region (Union[Unset, str]): Workspace write region Example: us-west-2.
|
|
34
|
+
runtime (Union[Unset, WorkspaceRuntime]): Runtime configuration for the workspace infrastructure
|
|
35
|
+
status (Union[Unset, WorkspaceStatus]): Workspace status (created, account_binded, account_configured,
|
|
36
|
+
workspace_configured, ready, error) Example: ready.
|
|
37
|
+
status_reason (Union[Unset, str]): Reason for current status (only set for error status)
|
|
35
38
|
"""
|
|
36
39
|
|
|
37
40
|
created_at: Union[Unset, str] = UNSET
|
|
@@ -41,11 +44,11 @@ class Workspace:
|
|
|
41
44
|
account_id: Union[Unset, str] = UNSET
|
|
42
45
|
display_name: Union[Unset, str] = UNSET
|
|
43
46
|
id: Union[Unset, str] = UNSET
|
|
44
|
-
labels: Union[Unset, "
|
|
47
|
+
labels: Union[Unset, "MetadataLabels"] = UNSET
|
|
45
48
|
name: Union[Unset, str] = UNSET
|
|
46
49
|
region: Union[Unset, str] = UNSET
|
|
47
50
|
runtime: Union[Unset, "WorkspaceRuntime"] = UNSET
|
|
48
|
-
status: Union[Unset,
|
|
51
|
+
status: Union[Unset, WorkspaceStatus] = UNSET
|
|
49
52
|
status_reason: Union[Unset, str] = UNSET
|
|
50
53
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
51
54
|
|
|
@@ -84,7 +87,9 @@ class Workspace:
|
|
|
84
87
|
elif self.runtime and isinstance(self.runtime, dict):
|
|
85
88
|
runtime = self.runtime
|
|
86
89
|
|
|
87
|
-
status =
|
|
90
|
+
status: Union[Unset, str] = UNSET
|
|
91
|
+
if not isinstance(self.status, Unset):
|
|
92
|
+
status = self.status.value
|
|
88
93
|
|
|
89
94
|
status_reason = self.status_reason
|
|
90
95
|
|
|
@@ -122,7 +127,7 @@ class Workspace:
|
|
|
122
127
|
|
|
123
128
|
@classmethod
|
|
124
129
|
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
125
|
-
from ..models.
|
|
130
|
+
from ..models.metadata_labels import MetadataLabels
|
|
126
131
|
from ..models.workspace_runtime import WorkspaceRuntime
|
|
127
132
|
|
|
128
133
|
if not src_dict:
|
|
@@ -143,11 +148,11 @@ class Workspace:
|
|
|
143
148
|
id = d.pop("id", UNSET)
|
|
144
149
|
|
|
145
150
|
_labels = d.pop("labels", UNSET)
|
|
146
|
-
labels: Union[Unset,
|
|
151
|
+
labels: Union[Unset, MetadataLabels]
|
|
147
152
|
if isinstance(_labels, Unset):
|
|
148
153
|
labels = UNSET
|
|
149
154
|
else:
|
|
150
|
-
labels =
|
|
155
|
+
labels = MetadataLabels.from_dict(_labels)
|
|
151
156
|
|
|
152
157
|
name = d.pop("name", UNSET)
|
|
153
158
|
|
|
@@ -160,7 +165,12 @@ class Workspace:
|
|
|
160
165
|
else:
|
|
161
166
|
runtime = WorkspaceRuntime.from_dict(_runtime)
|
|
162
167
|
|
|
163
|
-
|
|
168
|
+
_status = d.pop("status", UNSET)
|
|
169
|
+
status: Union[Unset, WorkspaceStatus]
|
|
170
|
+
if isinstance(_status, Unset):
|
|
171
|
+
status = UNSET
|
|
172
|
+
else:
|
|
173
|
+
status = WorkspaceStatus(_status)
|
|
164
174
|
|
|
165
175
|
status_reason = d.pop("statusReason", d.pop("status_reason", UNSET))
|
|
166
176
|
|
|
@@ -10,10 +10,11 @@ T = TypeVar("T", bound="WorkspaceRuntime")
|
|
|
10
10
|
|
|
11
11
|
@_attrs_define
|
|
12
12
|
class WorkspaceRuntime:
|
|
13
|
-
"""
|
|
13
|
+
"""Runtime configuration for the workspace infrastructure
|
|
14
14
|
|
|
15
15
|
Attributes:
|
|
16
|
-
generation (Union[Unset, str]):
|
|
16
|
+
generation (Union[Unset, str]): Infrastructure generation version for the workspace (affects available features
|
|
17
|
+
and deployment behavior) Example: mk3.
|
|
17
18
|
"""
|
|
18
19
|
|
|
19
20
|
generation: Union[Unset, str] = UNSET
|