Skip to main content

Replace policy

Deletes an existing policy and create new.

Path Parameters
    id string required
Request Body required
    body object
    roleId string required

    unique id of the role to which policy is assigned

    title string

    The title can contain any UTF-8 character, used to provide a human-readable name for the policy. Can also be left empty.
    Example: Policy title

    resource string required

    The resource to which policy is assigned in this format namespace:uuid.
    Example: app/guardian:70f69c3a-334b-4f25-90b8-4d4f3be6b8e2

    principal string required

    principal is the user or group to which policy is assigned. The principal id must be prefixed with its namespace id in this format namespace:uuid. The namespace can be app/user, app/group or app/serviceuser (coming up!) and uuid is the unique id of the principal.
    Example: app/user:92f69c3a-334b-4f25-90b8-4d4f3be6b825

    metadata object

    Metadata object for policies that can hold key value pairs defined in Policy Metaschema.
    Example: {"labels": {"key": "value"}, "description": "Policy description"}

Responses

A successful response.


Schema

    object

Loading...