Skip to content
Start here

Delete deployment group

client.ZeroTrust.Devices.DeploymentGroups.Delete(ctx, groupID, body) (*DeviceDeploymentGroupDeleteResponse, error)
DELETE/accounts/{account_id}/devices/deployment-groups/{group_id}

Deletes a deployment group. Associated policies no longer apply and devices stop receiving version targets. This endpoint is in Beta.

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
ParametersExpand Collapse
groupID string
body DeviceDeploymentGroupDeleteParams
AccountID param.Field[string]
ReturnsExpand Collapse
type DeviceDeploymentGroupDeleteResponse struct{…}
ID stringOptional

The ID of a deleted deployment group.

Delete deployment group

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/zero_trust"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  deploymentGroup, err := client.ZeroTrust.Devices.DeploymentGroups.Delete(
    context.TODO(),
    "group_id",
    zero_trust.DeviceDeploymentGroupDeleteParams{
      AccountID: cloudflare.F("account_id"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", deploymentGroup.ID)
}
{
  "errors": [
    {
      "code": 0,
      "message": "message"
    }
  ],
  "messages": [
    {
      "code": 0,
      "message": "message"
    }
  ],
  "result": {
    "id": "550e8400-e29b-41d4-a716-446655440000"
  },
  "success": true
}
Returns Examples
{
  "errors": [
    {
      "code": 0,
      "message": "message"
    }
  ],
  "messages": [
    {
      "code": 0,
      "message": "message"
    }
  ],
  "result": {
    "id": "550e8400-e29b-41d4-a716-446655440000"
  },
  "success": true
}