# Update

Launch stage: GA

`PATCH /api/environments/v1/{name=workspace-base-environments/*}`

Updates an existing WorkspaceBaseEnvironment.
 This is a long-running operation. The operation will asynchronously regenerate the materialized environment
 and is only marked as done when the materialized environment has been successfully generated or has failed.
 The existing materialized environment remains available until it expires.

API scopes: environments

## Path parameters

- `name` (string, optional)

## Request body

- `workspace_base_environment` (object, optional)
  Required. The workspace base environment with updated fields.
   The name field is used to identify the environment to update.
  - `name` (string, optional)
    The resource name of the workspace base environment.
     Format: workspace-base-environments/{workspace-base-environment}
  - `display_name` (string, optional)
    Human-readable display name for the workspace base environment.
  - `filepath` (string, optional)
    The WSFS or UC Volumes path to the environment YAML file.
  - `creator_user_id` (string, optional)
    User ID of the creator.
  - `create_time` (string, optional)
    Timestamp when the environment was created.
  - `last_updated_user_id` (string, optional)
    User ID of the last user who updated the environment.
  - `update_time` (string, optional)
    Timestamp when the environment was last updated.
  - `status` (string, optional)
    The status of the materialized workspace base environment.
    Possible values: `STATUS_UNSPECIFIED`, `PENDING`, `CREATED`, `FAILED`, `EXPIRED`, `INVALID`, `REFRESHING`
  - `message` (string, optional)
    Status message providing additional details about the environment status.
  - `is_default` (boolean, optional)
    Whether this is the default environment for the workspace.
  - `base_environment_type` (string, optional)
    The type of base environment (CPU or GPU).
    Possible values: `BASE_ENVIRONMENT_TYPE_UNSPECIFIED`, `CPU`, `GPU`
  - `spec` (object, optional, Beta)
    The environment specification containing version and dependencies.
    - `dependencies` (array of string, optional, Beta)
      List of pip dependencies, as supported by the version of pip in this environment.
       Each dependency is a valid pip requirements file line per https://pip.pypa.io/en/stable/reference/requirements-file-format/.
       Allowed dependencies include a requirement specifier, an archive URL, a local project path (such as WSFS or UC Volumes in <Databricks>), or a VCS project URL.
    - `environment_version` (string, optional, Beta)
      Environment version used by the environment.
       Each version comes with a specific Python version and a set of Python packages.
       The version is a string, consisting of an integer.
      Example: `5`

## Returns

- `name` (string, optional)
  The server-assigned name, which is only unique within the same service that
   originally returns it. If you use the default HTTP mapping, the
   `name` should be a resource name ending with `operations/{unique_id}`.
- `metadata` (object, optional)
  Service-specific metadata associated with the operation.  It typically
   contains progress information and common metadata such as create time.
   Some services might not provide such metadata.
- `done` (boolean, optional)
  If the value is `false`, it means the operation is still in progress.
   If `true`, the operation is completed, and either `error` or `response` is
   available.
- `error` (object, required)
  The error result of the operation in case of failure or cancellation.
  - `error_code` (string, optional)
    Possible values: `UNKNOWN`, `INTERNAL_ERROR`, `TEMPORARILY_UNAVAILABLE`, `IO_ERROR`, `BAD_REQUEST`, `SERVICE_UNDER_MAINTENANCE`, `WORKSPACE_TEMPORARILY_UNAVAILABLE`, `DEADLINE_EXCEEDED`, `CANCELLED`, `RESOURCE_EXHAUSTED`, `ABORTED`, `NOT_FOUND`, `ALREADY_EXISTS`, `UNAUTHENTICATED`, `UNAVAILABLE`, `INVALID_PARAMETER_VALUE`, `ENDPOINT_NOT_FOUND`, `MALFORMED_REQUEST`, `INVALID_STATE`, `PERMISSION_DENIED`, `FEATURE_DISABLED`, `CUSTOMER_UNAUTHORIZED`, `REQUEST_LIMIT_EXCEEDED`, `RESOURCE_CONFLICT`, `UNPARSEABLE_HTTP_ERROR`, `NOT_IMPLEMENTED`, `DATA_LOSS`, `INVALID_STATE_TRANSITION`, `COULD_NOT_ACQUIRE_LOCK`, `RESOURCE_ALREADY_EXISTS`, `RESOURCE_DOES_NOT_EXIST`, `QUOTA_EXCEEDED`, `MAX_BLOCK_SIZE_EXCEEDED`, `MAX_READ_SIZE_EXCEEDED`, `PARTIAL_DELETE`, `MAX_LIST_SIZE_EXCEEDED`, `DRY_RUN_FAILED`, `RESOURCE_LIMIT_EXCEEDED`, `DIRECTORY_NOT_EMPTY`, `DIRECTORY_PROTECTED`, `MAX_NOTEBOOK_SIZE_EXCEEDED`, `MAX_CHILD_NODE_SIZE_EXCEEDED`, `SEARCH_QUERY_TOO_LONG`, `SEARCH_QUERY_TOO_SHORT`, `MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST`, `PERMISSION_NOT_PROPAGATED`, `DEPLOYMENT_TIMEOUT`, `GIT_CONFLICT`, `GIT_UNKNOWN_REF`, `GIT_SENSITIVE_TOKEN_DETECTED`, `GIT_URL_NOT_ON_ALLOW_LIST`, `GIT_REMOTE_ERROR`, `PROJECTS_OPERATION_TIMEOUT`, `IPYNB_FILE_IN_REPO`, `INSECURE_PARTNER_RESPONSE`, `MALFORMED_PARTNER_RESPONSE`, `METASTORE_DOES_NOT_EXIST`, `DAC_DOES_NOT_EXIST`, `CATALOG_DOES_NOT_EXIST`, `SCHEMA_DOES_NOT_EXIST`, `TABLE_DOES_NOT_EXIST`, `SHARE_DOES_NOT_EXIST`, `RECIPIENT_DOES_NOT_EXIST`, `STORAGE_CREDENTIAL_DOES_NOT_EXIST`, `EXTERNAL_LOCATION_DOES_NOT_EXIST`, `PRINCIPAL_DOES_NOT_EXIST`, `PROVIDER_DOES_NOT_EXIST`, `METASTORE_ALREADY_EXISTS`, `DAC_ALREADY_EXISTS`, `CATALOG_ALREADY_EXISTS`, `SCHEMA_ALREADY_EXISTS`, `TABLE_ALREADY_EXISTS`, `SHARE_ALREADY_EXISTS`, `RECIPIENT_ALREADY_EXISTS`, `STORAGE_CREDENTIAL_ALREADY_EXISTS`, `EXTERNAL_LOCATION_ALREADY_EXISTS`, `PROVIDER_ALREADY_EXISTS`, `CATALOG_NOT_EMPTY`, `SCHEMA_NOT_EMPTY`, `METASTORE_NOT_EMPTY`, `PROVIDER_SHARE_NOT_ACCESSIBLE`
  - `message` (string, optional)
  - `stack_trace` (string, optional)
  - `details` (array of object, optional)
- `response` (object, required)
  The normal, successful response of the operation.

## Response

```json
{
  "name": "string",
  "metadata": {},
  "done": true,
  "error": {
    "error_code": "string",
    "message": "string",
    "stack_trace": "string",
    "details": [
      {}
    ]
  },
  "response": {}
}
```

