Create a new policy set
Create a new policy set
client.zones.policySets.create(stringzoneID, PolicySetCreateParams { name, scope_type, xAPIVersion, xClientRequestID } params, RequestOptionsoptions?): PolicySetWithBinding { active, active_version, active_version_id, 4 more }
POST/zones/{zone_id}/policy-sets
Creates an unbound policy set. Use updatePolicySet to bind after creating a version.
Parameters
zoneID: string
Returns
Create a new policy set
import KeycardAPI from '@keycardai/api';
const client = new KeycardAPI();
const policySetWithBinding = await client.zones.policySets.create('zone_id', { name: 'name' });
console.log(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",
"shadow_version": 0,
"shadow_version_id": "shadow_version_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",
"shadow_version": 0,
"shadow_version_id": "shadow_version_id"
}