permit.api.resources.update()
Updates a resource.
Parameters
resourceKey
- The unique resource key or the resource id.
resourceData
- An object that contains the information about the updated resource. The payload is defined below.
Payload
A ResourceUpdate
object:
name
- The name of the resource.
urn
- optional - The URN(Uniform Resource Name) of the resource.
description
- optional - An optional longer description of what this resource respresents in your system.
actions
- A actions definition block, typically contained within a resource type definition block. The actions represents the ways you can interact with a protected resource.
attributes
- optional - Attributes that each resource of this type defines, and can be used in your ABAC policies.
Implementation
import io.permit.sdk.openapi.models.ResourceUpdate;
permit.api.resources.update("document", new ResourceUpdate().withDescription("new description"));