# Method: folders.patch

- [HTTP request](https://docs.cloud.google.com/resource-manager/reference/rest/v2/folders/patch#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/resource-manager/reference/rest/v2/folders/patch#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/resource-manager/reference/rest/v2/folders/patch#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/resource-manager/reference/rest/v2/folders/patch#body.request_body)
- [Response body](https://docs.cloud.google.com/resource-manager/reference/rest/v2/folders/patch#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/resource-manager/reference/rest/v2/folders/patch#body.aspect)
- [Try it!](https://docs.cloud.google.com/resource-manager/reference/rest/v2/folders/patch#try-it)

Updates a Folder, changing its displayName. Changes to the folder displayName will be rejected if they violate either the displayName formatting rules or naming constraints described in the `https://docs.cloud.google.com/resource-manager/reference/rest/v2/folders/create#google.cloud.resourcemanager.v2.Folders.CreateFolder` documentation.

The Folder's display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be between 3 and 30 characters. This is captured by the regular expression: `[\p{L}\p{N}][\p{L}\p{N}_- ]{1,28}[\p{L}\p{N}]`. The caller must have `resourcemanager.folders.update` permission on the identified folder.

If the update fails due to the unique name constraint then a PreconditionFailure explaining this violation will be returned in the Status.details field.

### HTTP request

`PATCH https://cloudresourcemanager.googleapis.com/v2/{folder.name=folders/*}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `folder.name` | `string` Output only. The resource name of the Folder. Its format is `folders/{folder_id}`, for example: "folders/1234". |

### Query parameters

| Parameters ||
|---|---|
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Required. Fields to be updated. Only the `displayName` can be updated. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/resource-manager/reference/rest/v2/folders#Folder`.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/resource-manager/reference/rest/v2/folders#Folder`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/cloudplatformfolders`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).