Skip to content
Ona Docs

DeleteProjectPolicy

client.Projects.Policies.Delete(ctx, body) (*ProjectPolicyDeleteResponse, error)
POST/gitpod.v1.ProjectService/DeleteProjectPolicy

Deletes a project policy.

Use this method to:

  • Remove access controls
  • Revoke permissions
  • Clean up policies

Examples

  • Delete policy:

    Removes a group’s access policy.

    projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
    groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
ParametersExpand Collapse
body ProjectPolicyDeleteParams
GroupID param.Field[string]Optional

group_id specifies the group_id identifier

formatuuid
ProjectID param.Field[string]Optional

project_id specifies the project identifier

formatuuid
ReturnsExpand Collapse
type ProjectPolicyDeleteResponse interface{…}

DeleteProjectPolicy

package main

import (
  "context"
  "fmt"

  "github.com/gitpod-io/gitpod-sdk-go"
  "github.com/gitpod-io/gitpod-sdk-go/option"
)

func main() {
  client := gitpod.NewClient(
    option.WithBearerToken("My Bearer Token"),
  )
  policy, err := client.Projects.Policies.Delete(context.TODO(), gitpod.ProjectPolicyDeleteParams{
    GroupID: gitpod.F("f53d2330-3795-4c5d-a1f3-453121af9c60"),
    ProjectID: gitpod.F("b0e12f6c-4c67-429d-a4a6-d9838b5da047"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", policy)
}
{}
Returns Examples
{}