Skip to content

Commit a9785e5

Browse files
committed
feat: add AcceptPatchManagementDisclaimer example for Jamf Pro client
1 parent 741749f commit a9785e5

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package main
2+
3+
import (
4+
"fmt"
5+
"log"
6+
7+
"github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8+
)
9+
10+
func main() {
11+
// Define the path to the JSON configuration file
12+
configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13+
14+
// Initialize the Jamf Pro client with the HTTP client configuration
15+
client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16+
if err != nil {
17+
log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18+
}
19+
20+
err = client.AcceptPatchManagementDisclaimer()
21+
if err != nil {
22+
log.Fatalf("Error accepting patch management disclaimer: %v", err)
23+
}
24+
25+
fmt.Println("Successfully accepted patch management disclaimer")
26+
}

0 commit comments

Comments
 (0)