---
title: "Update a resource control"
method: PUT
path: "/resource_controls/{id}"
tags: ["resource_controls"]
---

# Update a resource control

`PUT /resource_controls/{id}`

Update a resource control
**Access policy**: authenticated

## Path parameters

- `id` integer, required

## Request body

- ResourcecontrolsResourceControlUpdatePayload
  - `AdministratorsOnly` boolean — Permit access to resource only to admins
  - `Public` boolean — Permit access to the associated resource to any user
  - `Teams` integer[] — List of team identifiers with access to the associated resource
  - `Users` integer[] — List of user identifiers with access to the associated resource

## Response `200`

Success

- PortainerResourceControl
  - `AccessLevel` 0 | 1
  - `AdministratorsOnly` boolean — Permit access to resource only to admins
  - `Id` integer — ResourceControl Identifier
  - `OwnerId` integer — Deprecated fields Deprecated in DBVersion == 2
  - `Public` boolean — Permit access to the associated resource to any user
  - `ResourceId` string — Docker resource identifier on which access control will be applied.\ In the case of a resource control applied to a stack, use the stack name as identifier
  - `SubResourceIds` string[] — List of Docker resources that will inherit this access control
  - `System` boolean
  - `TeamAccesses` PortainerTeamResourceAccess[]
    - `AccessLevel` 0 | 1
    - `TeamId` integer
  - `Type` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
  - `UserAccesses` PortainerUserResourceAccess[]
    - `AccessLevel` 0 | 1
    - `UserId` integer

## Other responses

- `400` — Invalid request
- `403` — Unauthorized
- `404` — Resource control not found
- `500` — Server error

---

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