---
title: "Creates or Updates AccessRole entity"
method: PUT
path: "/v1/mesh/control-planes/{cpId}/api/access-roles/{name}"
tags: ["AccessRole"]
---

# Creates or Updates AccessRole entity

`PUT /v1/mesh/control-planes/{cpId}/api/access-roles/{name}`

## Path parameters

- `name` string, required

## Request body

- AccessRoleItem
  - `creationTime` string, date-time — Time at which the resource was created
  - `labels` object
  - `modificationTime` string, date-time — Time at which the resource was updated
  - `name` string, required
  - `rules` object[], nullable
    - `access` union[], nullable
      - union
        - string
        - integer
    - `mesh` string
    - `names` string[], nullable
    - `types` string[], nullable
    - `when` object[], nullable
      - `destinations` object
        - `match` object — Tags to match, can be used for both source and destinations
      - `dpToken` object
        - `tags` object[], nullable
          - `name` string
          - `value` string
      - `from` object
        - `targetRef` object
          - `kind` string
          - `mesh` string
          - `name` string
          - `tags` object
      - `selectors` object
        - `match` object — Tags to match, can be used for both source and destinations
      - `sources` object
        - `match` object — Tags to match, can be used for both source and destinations
      - `targetRef` object
        - `kind` string
        - `mesh` string
        - `name` string
        - `tags` object
      - `to` object
        - `targetRef` object
          - `kind` string
          - `mesh` string
          - `name` string
          - `tags` object
  - `type` string, required

## Response `200`

Successful response

- object
  - `warnings` string[] — warnings is a list of warning messages to return to the requesting Kuma API clients. Warning messages describe a problem the client making the API request should correct or be aware of.

## Other responses

- `201` — Successful response

---

[API](https://skmtc.net/kong/apis/konnect-api-beta.md) · [All operations](https://skmtc.net/kong/apis/konnect-api-beta/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kong/konnect-api-beta/revisions/658ffb748f95/schema)
