---
title: "PATCH /environments/{id}"
method: PATCH
path: "/environments/{id}"
---

# PATCH /environments/{id}

`PATCH /environments/{id}`

Updates an environment.

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string, password — The name of the environment to update.
  - `desktopArn` string — The Amazon Resource Name (ARN) of the desktop to stream from Amazon WorkSpaces, WorkSpaces Secure Browser, or AppStream 2.0.
  - `desktopEndpoint` string, password — The URL for the identity provider login (only for environments that use AppStream 2.0).
  - `softwareSetUpdateSchedule` 'USE_MAINTENANCE_WINDOW' | 'APPLY_IMMEDIATELY' — An option to define if software updates should be applied within a maintenance window.
  - `maintenanceWindow` object — Describes the maintenance window for a thin client device.
    - `type` 'SYSTEM' | 'CUSTOM' — An option to select the default or custom maintenance window.
    - `startTimeHour` integer — The hour for the maintenance window start (<code>00</code>-<code>23</code>).
    - `startTimeMinute` integer — The minutes past the hour for the maintenance window start (<code>00</code>-<code>59</code>).
    - `endTimeHour` integer — The hour for the maintenance window end (<code>00</code>-<code>23</code>).
    - `endTimeMinute` integer — The minutes for the maintenance window end (<code>00</code>-<code>59</code>).
    - `daysOfTheWeek` DayOfWeek[] — The days of the week during which the maintenance window is open.
    - `applyTimeOf` 'UTC' | 'DEVICE' — The option to set the maintenance window during the device local time or Universal Coordinated Time (UTC).
  - `softwareSetUpdateMode` 'USE_LATEST' | 'USE_DESIRED' — An option to define which software updates to apply.
  - `desiredSoftwareSetId` string — The ID of the software set to apply.
  - `deviceCreationTags` object — A map of the key-value pairs of the tag or tags to assign to the newly created devices for this environment.

## Response `200`

Success

- UpdateEnvironmentResponse
  - `environment` object — Describes an environment.
    - `id` string — The ID of the environment.
    - `name` string, password — The name of the environment.
    - `desktopArn` string — The Amazon Resource Name (ARN) of the desktop to stream from Amazon WorkSpaces, WorkSpaces Secure Browser, or AppStream 2.0.
    - `desktopEndpoint` string, password — The URL for the identity provider login (only for environments that use AppStream 2.0).
    - `desktopType` 'workspaces' | 'appstream' | 'workspaces-web' — The type of streaming desktop for the environment.
    - `activationCode` string, password — The activation code to register a device to the environment.
    - `softwareSetUpdateSchedule` 'USE_MAINTENANCE_WINDOW' | 'APPLY_IMMEDIATELY' — An option to define if software updates should be applied within a maintenance window.
    - `maintenanceWindow` object — A specification for a time window to apply software updates.
      - `type` 'SYSTEM' | 'CUSTOM', required — An option to select the default or custom maintenance window.
      - `startTimeHour` integer — The hour for the maintenance window start (<code>00</code>-<code>23</code>).
      - `startTimeMinute` integer — The minutes past the hour for the maintenance window start (<code>00</code>-<code>59</code>).
      - `endTimeHour` integer — The hour for the maintenance window end (<code>00</code>-<code>23</code>).
      - `endTimeMinute` integer — The minutes for the maintenance window end (<code>00</code>-<code>59</code>).
      - `daysOfTheWeek` DayOfWeek[] — The days of the week during which the maintenance window is open.
      - `applyTimeOf` 'UTC' | 'DEVICE' — The option to set the maintenance window during the device local time or Universal Coordinated Time (UTC).
    - `softwareSetUpdateMode` 'USE_LATEST' | 'USE_DESIRED' — An option to define which software updates to apply.
    - `desiredSoftwareSetId` string — The ID of the software set to apply.
    - `pendingSoftwareSetId` string — The ID of the software set that is pending to be installed.
    - `createdAt` string, date-time — The timestamp of when the environment was created.
    - `updatedAt` string, date-time — The timestamp of when the device was updated.
    - `arn` string — The Amazon Resource Name (ARN) of the environment.

## Other responses

- `480` — ValidationException
- `481` — AccessDeniedException
- `482` — ConflictException
- `483` — ResourceNotFoundException
- `484` — ThrottlingException
- `485` — InternalServerException

---

[API](https://skmtc.net/aws/apis/workspaces-thin-client.md) · [All operations](https://skmtc.net/aws/apis/workspaces-thin-client/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/workspaces-thin-client/revisions/c962e5c56c9c/schema)
