fleet/server/service/client_policies.go

15 lines
430 B
Go
Raw Normal View History

package service
func (c *Client) CreateGlobalPolicy(name, query, description, resolution, platform string) error {
req := globalPolicyRequest{
Name: name,
Query: query,
Description: description,
Resolution: resolution,
Platform: platform,
}
verb, path := "POST", "/api/v1/fleet/global/policies"
var responseBody globalPolicyResponse
return c.authenticatedRequest(req, verb, path, &responseBody)
}