> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opal.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Patch resources custom access levels

> Updates a custom access level identified by its remote ID. If the resource is a parent type, the update fans out to all child resources.



## OpenAPI

````yaml https://app.opal.dev/openapi.yaml patch /resources/{resource_id}/custom-access-levels/{access_level_remote_id}
openapi: 3.1.0
info:
  contact:
    email: hello@opal.dev
    name: Opal Team
    url: https://www.opal.dev/
  description: >-
    The Opal API is a RESTful API that allows you to interact with the Opal
    Security platform programmatically.
  title: Opal API
  version: '1.0'
servers:
  - description: Production
    url: https://api.opal.dev/v1
security: []
tags:
  - name: access-rules
    description: Operations related to access rules
  - name: apps
    description: Operations related to apps
  - name: bundles
    description: Operations related to bundles
  - name: campaigns
    description: Operations related to access review campaigns
  - name: configuration-templates
    description: Operations related to configuration templates
  - name: delegations
    description: Operations related to request reviewer delegations
  - name: event-streams
    description: Operations related to event streaming connections
  - name: events
    description: Operations related to events
  - name: groups
    description: Operations related to groups
  - name: group-bindings
    description: Operations related to group bindings
  - name: idp-group-mappings
    description: Operations related to IDP group mappings
  - name: message-channels
    description: Operations related to message channels
  - name: non-human-identities
    description: Operations related to non-human identities
  - name: on-call-schedules
    description: Operations related to on-call schedules
  - name: opal-queries
    description: Operations related to OpalQuery
  - name: owners
    description: Operations related to owners
  - name: requests
    description: Operations related to requests
  - name: resources
    description: Operations related to resources
  - name: paladin
    description: Operations related to Paladin
  - name: sessions
    description: Operations related to sessions
  - name: tags
    description: Operations related to tags
  - name: tokens
    description: Operations related to API tokens
  - name: uars
    description: Operations related to UARs. Deprecated in favor of the `campaigns` API.
  - name: users
    description: Operations related to users
paths:
  /resources/{resource_id}/custom-access-levels/{access_level_remote_id}:
    patch:
      tags:
        - resources
      description: >-
        Updates a custom access level identified by its remote ID. If the
        resource is a parent type, the update fans out to all child resources.
      operationId: update_resource_custom_access_level
      parameters:
        - description: The ID of the resource.
          name: resource_id
          example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - description: The remote ID of the access level.
          name: access_level_remote_id
          example: admin
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateResourceCustomAccessLevelInfo'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceCustomAccessLevelResponse'
          description: The updated custom access level.
        '400':
          description: Unsupported resource type.
        '404':
          description: Resource or access level not found, or access denied.
      security:
        - BearerAuth: []
components:
  schemas:
    UpdateResourceCustomAccessLevelInfo:
      description: Info for updating a custom access level.
      properties:
        access_level_name:
          description: The new human-readable name.
          type: string
        policy:
          description: The new policy document.
          type: string
          nullable: true
        requestable_by_default:
          description: Whether the role is requestable.
          type: boolean
        stackable_sensitivity_index:
          description: The new sensitivity index.
          type: integer
          nullable: true
        clear_stackable_sensitivity_index:
          description: Set to true to remove from the hierarchy.
          type: boolean
      type: object
    ResourceCustomAccessLevelResponse:
      description: A custom access level for a resource.
      properties:
        resource_custom_access_level_id:
          description: The unique ID of the custom access level.
          type: string
          format: uuid
        resource_id:
          description: The resource this access level belongs to.
          type: string
          format: uuid
        access_level:
          $ref: '#/components/schemas/ResourceAccessLevel'
        policy:
          description: The policy document for this access level.
          type: string
          nullable: true
        requestable_by_default:
          description: Whether this role is requestable.
          type: boolean
        stackable_sensitivity_index:
          description: The sensitivity index in the access hierarchy. Null if unranked.
          type: integer
          nullable: true
        member_resource_ids:
          description: >-
            When addressed via a parent resource, lists the child resource IDs
            that back this aggregated entry.
          type: array
          items:
            type: string
            format: uuid
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - resource_custom_access_level_id
        - resource_id
        - access_level
        - requestable_by_default
      type: object
    ResourceAccessLevel:
      description: >-
        # Access Level Object

        ### Description

        The `AccessLevel` object is used to represent the level of access that a
        principal has. The "default" access

        level is a `AccessLevel` object whose fields are all empty strings.


        ### Usage Example

        View the `AccessLevel` of a resource/user or resource/group pair to see
        the level of access granted to the resource.
      example:
        access_level_name: AdminRole
        access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess
      properties:
        access_level_name:
          description: The human-readable name of the access level.
          example: AdminRole
          type: string
        access_level_remote_id:
          description: The machine-readable identifier of the access level.
          example: arn:aws:iam::590304332660:role/AdministratorAccess
          type: string
      required:
        - access_level_name
        - access_level_remote_id
      type: object
  securitySchemes:
    BearerAuth:
      scheme: bearer
      type: http

````