Get a policy set by ID
client.Zones.PolicySets.Get(ctx, policySetID, params) (*PolicySetWithBinding, error)
GET/zones/{zone_id}/policy-sets/{policy_set_id}
Returns the policy set with current binding information.
Parameters
policySetID string
Returns
Get a policy set by ID
package main
import (
"context"
"fmt"
"github.com/keycardai/keycard-go"
)
func main() {
client := keycard.NewClient(
)
policySetWithBinding, err := client.Zones.PolicySets.Get(
context.TODO(),
"policy_set_id",
keycard.ZonePolicySetGetParams{
ZoneID: "zone_id",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", policySetWithBinding)
}
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": "created_by",
"name": "name",
"owner_type": "platform",
"scope_type": "zone",
"updated_at": "2019-12-27T18:11:19.117Z",
"zone_id": "zone_id",
"archived_at": "2019-12-27T18:11:19.117Z",
"latest_version": 0,
"latest_version_id": "latest_version_id",
"updated_by": "updated_by",
"active": true,
"active_version": 0,
"active_version_id": "active_version_id",
"mode": "active",
"scope_target_id": "scope_target_id"
}Returns Examples
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": "created_by",
"name": "name",
"owner_type": "platform",
"scope_type": "zone",
"updated_at": "2019-12-27T18:11:19.117Z",
"zone_id": "zone_id",
"archived_at": "2019-12-27T18:11:19.117Z",
"latest_version": 0,
"latest_version_id": "latest_version_id",
"updated_by": "updated_by",
"active": true,
"active_version": 0,
"active_version_id": "active_version_id",
"mode": "active",
"scope_target_id": "scope_target_id"
}