# Manage compute resources and specifications

Manage compute specifications and compute instances in a workspace, including creation, configuration, runtime-status checks, and lifecycle operations. Specifications define available configurations; instances perform the actual work. This page does not manage workflow jobs themselves.

## Prerequisites

- Prepare access to the target workspace. For general rules, see [Prepare to call an API](../../api-call-basics.md).
- Before managing compute specifications, confirm that your current identity has the required administrative permission.
- Before updating, suspending, resuming, retrying, or deleting an instance, obtain its ID and current status from its list or details.

## Call sequence

1. Query compute-specification management permission, then list visible specifications. Create or update a specification as needed and confirm that it is enabled.
2. Before creating or updating a compute instance, list available Worker images and prepare a compute specification or instance configuration as needed.
3. After creating an instance, query its details to confirm its configuration, capacity, and lifecycle state. Query Worker runtime and instance metrics when you need to observe it.
4. Suspend an instance only when its details show `ACTIVE`. Resume a suspended instance; retry an instance in `ERROR`. After each lifecycle operation, query details again to confirm the state.
5. Before deleting, inspect active tasks and workflow bindings. Delete the instance only after confirming the result. Use legacy resource ownership adoption only for controlled remediation.

## API operations

### Manage compute specifications

| What you need to do | API operation | Use it when |
| --- | --- | --- |
| Check compute-specification management permission | [Get compute resource specification management permission](../../../../reference/api/ai-studio/resource-center/compute-resource-specs/get-compute-resource-spec-management-permission.md) | You need to confirm your permission before creating, updating, enabling, or disabling a specification. |
| List compute specifications | [List compute resource specifications](../../../../reference/api/ai-studio/resource-center/compute-resource-specs/list-compute-resource-specs.md) | You need to select an existing specification or confirm a specification change. |
| Create a compute specification | [Create a compute resource specification](../../../../reference/api/ai-studio/resource-center/compute-resource-specs/create-compute-resource-spec.md) | The current workspace needs a new compute specification. |
| Update a compute specification | [Update a compute resource specification](../../../../reference/api/ai-studio/resource-center/compute-resource-specs/update-compute-resource-spec.md) | You need to change an existing specification definition. |
| Enable or disable a compute specification | [Set a compute resource specification as enabled](../../../../reference/api/ai-studio/resource-center/compute-resource-specs/set-compute-resource-spec-enabled.md) | You need to change the enabled state of a specification. |

### Create and observe compute instances

| What you need to do | API operation | Use it when |
| --- | --- | --- |
| List compute instances | [List compute resources](../../../../reference/api/ai-studio/resource-center/compute-resources/list-compute-resources.md) | You need to select an instance, obtain an instance ID, or confirm creation or deletion. |
| List Worker images | [List available Worker images](../../../../reference/api/ai-studio/resource-center/compute-resources/list-worker-images.md) | You need to select an available Worker image before creating or updating an instance. |
| Create a compute instance | [Create a compute resource](../../../../reference/api/ai-studio/resource-center/compute-resources/create-compute-resource.md) | You prepared the configuration and need to create an instance in the current workspace. |
| Update a compute instance | [Update a compute resource](../../../../reference/api/ai-studio/resource-center/compute-resources/update-compute-resource.md) | You need to change an instance's updatable configuration. |
| Get compute-instance details | [Get a compute resource](../../../../reference/api/ai-studio/resource-center/compute-resources/get-compute-resource.md) | You need to confirm an instance's configuration, capacity, or lifecycle state. |
| Get Worker runtime | [Get Worker runtime status](../../../../reference/api/ai-studio/resource-center/compute-resources/get-worker-runtime.md) | You need the runtime replica status by Worker type. |
| Get compute-instance metrics | [Get compute resource metrics](../../../../reference/api/ai-studio/resource-center/compute-resources/get-compute-resource-metrics.md) | You need instance usage metrics. |

### Manage the instance lifecycle

| What you need to do | API operation | Use it when |
| --- | --- | --- |
| Suspend a compute instance | [Suspend a compute resource](../../../../reference/api/ai-studio/resource-center/compute-resources/suspend-compute-resource.md) | Details confirm that the instance is `ACTIVE` and you need to stop its Workers. |
| Resume a compute instance | [Resume a compute resource](../../../../reference/api/ai-studio/resource-center/compute-resources/resume-compute-resource.md) | You need to return a suspended instance to an available state. |
| Retry a compute-instance operation | [Retry a compute resource](../../../../reference/api/ai-studio/resource-center/compute-resources/retry-compute-resource.md) | Details confirm that the instance is in `ERROR`. |
| Preflight deletion of a compute instance | [Preflight delete](../../../../reference/api/ai-studio/resource-center/compute-resources/preflight-delete.md) | You need to check active tasks and workflow bindings before deleting. |
| Delete a compute instance | [Delete a compute resource](../../../../reference/api/ai-studio/resource-center/compute-resources/delete-compute-resource.md) | You completed preflight checks and confirmed that the instance is no longer needed. |
| Adopt legacy compute-resource ownership | [Adopt legacy compute resource ownership](../../../../reference/api/ai-studio/resource-center/compute-resources/adopt-legacy-compute-resource-ownership.md) | You are performing controlled remediation of legacy resource ownership. |

## Confirm the result

After creating, updating, enabling, or disabling a specification, confirm it through [the specification list](../../../../reference/api/ai-studio/resource-center/compute-resource-specs/list-compute-resource-specs.md). After creating, updating, suspending, resuming, or retrying an instance, query [compute-instance details](../../../../reference/api/ai-studio/resource-center/compute-resources/get-compute-resource.md) to confirm its current state. After deletion, use the instance list to confirm that it no longer appears.

## Limitations and notes

- Confirm compute-specification management permission before creating, updating, enabling, or disabling a specification.
- Suspension applies only to `ACTIVE` instances. After a suspended instance is resumed or an `ERROR` instance is successfully retried, it returns to `IDLE`; Workers are not deployed immediately.
- Updating a serverless instance does not deploy Workers immediately; later workload demand activates them.
- Deletion preflight returns active tasks and workflow bindings that require attention. Do not delete before confirming these impacts.
- Adopting legacy compute-resource ownership is a controlled remediation operation that requires the appropriate administrative permission.

## Next steps

- [Manage workspaces](workspaces.md)
- [Data publishing and subscription](data-publications-subscriptions.md)
