Skip to main content
Version: main

Policy API overview

The Policy API manages Configuration Data Management policy input mappings: create, resolve, and delete the mappings that bind policy inputs to configuration data.

Basic usage​

Access it through the Cdm() namespace:

mappings := client.Cdm().Policies().Mappings()

// Create a policy mapping
created, err := mappings.Post(context.Background(), nil)
if err != nil {
log.Fatal(err)
}

// Delete a mapping
err = mappings.Delete(context.Background(), nil)
if err != nil {
log.Fatal(err)
}

Available operations​

  • Create mapping — Policies().Mappings().Post(ctx, config).
  • Delete mapping — Policies().Mappings().Delete(ctx, config).
Was this page helpful?