Delete role
Delete role
client.Zones.Roles.Delete(ctx, roleID, body) error
DELETE/zones/{zoneId}/roles/{roleId}
Permanently deletes a customer-owned role. Platform-owned roles cannot be deleted, and a role with existing assignments returns 409.
Parameters
roleID string
Delete role
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.Roles.Delete(
context.TODO(),
"roleId",
keycard.ZoneRoleDeleteParams{
ZoneID: "zoneId",
},
)
if err != nil {
panic(err.Error())
}
}