Skip to content
  • Auto
  • Light
  • Dark
Get Started

Delete

Delete
client.Policies.Delete(ctx, id, body) (*PolicyDeleteResponse, error)
delete/api/v1/policies/{id}

Delete a policy by ID.

Parameters
idstring

The Id of the policy to delete.

bodyBodyfieldPolicyDeleteParams
Hide ParametersShow Parameters
Bodyfield
optional
param.Field[any]

The DeletePolicyRequest message contains the ID of the policy to delete. It uses URL value for input.

Returns
PolicyDeleteResponseinterface

Empty response with a status code indicating success.

Request example Go
package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/-go"
  "github.com/stainless-sdks/-go/option"
)

func main() {
  client := conductoronesdk.NewClient(
    option.WithAPIKey("My API Key"),
  )
  policy, err := client.Policies.Delete(
    context.TODO(),
    "id",
    conductoronesdk.PolicyDeleteParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", policy)
}
200 Example
{}