pullzone_edgerule_delete.go raw

   1  package bunny
   2  
   3  import (
   4  	"context"
   5  	"fmt"
   6  )
   7  
   8  // DeleteEdgeRule removes an Edge Rule of a Pull Zone.
   9  // The edgeRuleGUID field is called edgeRuleID in the API message and
  10  // documentation. It is the same then the GUID field in the EdgeRule message.
  11  //
  12  // Bunny.net API docs: https://docs.bunny.net/reference/pullzonepublic_deleteedgerule
  13  func (s *PullZoneService) DeleteEdgeRule(ctx context.Context, pullZoneID int64, edgeRuleGUID string) error {
  14  	path := fmt.Sprintf("pullzone/%d/edgerules/%s", pullZoneID, edgeRuleGUID)
  15  	return resourceDelete(ctx, s.client, path, nil)
  16  }
  17