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

# PATCH /environments/{environmentId}

`PATCH /environments/{environmentId}`

Updates the configuration details for a specific runtime environment.

## Path parameters

- `environmentId` string, required

## Request body

- object
  - `applyDuringMaintenanceWindow` boolean — Indicates whether to update the runtime environment during the maintenance window. The default is false. Currently, Amazon Web Services Mainframe Modernization accepts the <code>engineVersion</code> parameter only if <code>applyDuringMaintenanceWindow</code> is true. If any parameter other than <code>engineVersion</code> is provided in <code>UpdateEnvironmentRequest</code>, it will fail if <code>applyDuringMaintenanceWindow</code> is set to true.
  - `desiredCapacity` integer — The desired capacity for the runtime environment to update. The minimum possible value is 0 and the maximum is 100.
  - `engineVersion` string — The version of the runtime engine for the runtime environment.
  - `forceUpdate` boolean — <p>Forces the updates on the environment. This option is needed if the applications in the environment are not stopped or if there are ongoing application-related activities in the environment.</p> <p>If you use this option, be aware that it could lead to data corruption in the applications, and that you might need to perform repair and recovery procedures for the applications.</p> <p>This option is not needed if the attribute being updated is <code>preferredMaintenanceWindow</code>.</p>
  - `instanceType` string — The instance type for the runtime environment to update.
  - `preferredMaintenanceWindow` string — <p>Configures the maintenance window that you want for the runtime environment. The maintenance window must have the format <code>ddd:hh24:mi-ddd:hh24:mi</code> and must be less than 24 hours. The following two examples are valid maintenance windows: <code>sun:23:45-mon:00:15</code> or <code>sat:01:00-sat:03:00</code>. </p> <p>If you do not provide a value, a random system-generated value will be assigned.</p>

## Response `200`

Success

- UpdateEnvironmentResponse
  - `environmentId` string, required — The unique identifier of the runtime environment that was updated.

## Other responses

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

---

[API](https://skmtc.net/aws/apis/m2.md) · [All operations](https://skmtc.net/aws/apis/m2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/m2/versions/aac43e95a42b/schema)
