Skip to content
Docs
Roles

Revoke role from group

Revoke role from group

client.Zones.Groups.Roles.Remove(ctx, roleID, params) error
DELETE/zones/{zoneId}/groups/{groupId}/roles/{roleId}

Revokes a role from the group. Provide the same (scope_type, scope_id) pair the grant was created with, or omit both to revoke the unscoped grant.

ParametersExpand Collapse
roleID string
params ZoneGroupRoleRemoveParams
ZoneID param.Field[string]

Path param: Zone ID

GroupID param.Field[string]

Path param: Group ID

ScopeID param.Field[string]optional

Query param: Scope target of the grant to revoke. Provide together with scope_type.

minLength1
ScopeType param.Field[string]optional

Query param: Scope kind of the grant to revoke. Provide together with scope_id.

minLength1

Revoke role from group

package main

import (
  "context"

  "github.com/keycardai/keycard-go"
  "github.com/keycardai/keycard-go/option"
)

func main() {
  client := keycard.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.Zones.Groups.Roles.Remove(
    context.TODO(),
    "roleId",
    keycard.ZoneGroupRoleRemoveParams{
      ZoneID: "zoneId",
      GroupID: "groupId",
    },
  )
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples