pullzone_remove_custom_hostname.go raw
1 package bunny
2
3 import (
4 "context"
5 "fmt"
6 )
7
8 // RemoveCustomHostnameOptions represents the message that is sent to the
9 // Remove Custom Hostname API Endpoint.
10 //
11 // Bunny.net API docs: https://docs.bunny.net/reference/pullzonepublic_removehostname
12 type RemoveCustomHostnameOptions struct {
13 // Hostname is the hostname that is removed. (Required)
14 Hostname *string `json:"Hostname,omitempty"`
15 }
16
17 // RemoveCustomHostname removes a custom hostname from the Pull Zone.
18 //
19 // Bunny.net API docs: https://docs.bunny.net/reference/pullzonepublic_removehostname
20 func (s *PullZoneService) RemoveCustomHostname(ctx context.Context, pullZoneID int64, opts *RemoveCustomHostnameOptions) error {
21 path := fmt.Sprintf("pullzone/%d/removeHostname", pullZoneID)
22 return resourceDelete(ctx, s.client, path, opts)
23 }
24