zcli doc-policy commands, with syntax and examples for each operation. A policy document is an HTML document, such as terms and conditions, that users of Edge Infrastructure Services must accept before they can onboard to the platform. Each policy can have several versions. The version that is marked as latest is the one that users are asked to accept.
Before You Start
- ZCLI is installed and authenticated. See Get Started.
- You have a role that allows you to manage platform policy documents. [TBD: confirm which role can run
zcli doc-policycommands. The policies apply to all users of the platform, not to a single enterprise, so these commands might be limited to platform operators.] - To upload a policy, the policy is saved as a UTF-8 HTML file that ZCLI can read. If you run ZCLI in a container, the file must be inside the container. See Get Started.
How Policy Versions Work
- Create a version of a policy with
doc-policy create. Creating a version does not show it to users. - Publish the version with
doc-policy mark-latest. New users are shown the latest version, and existing users are asked to accept it again. - Delete versions that you no longer need with
doc-policy delete.
Create a Policy Version
Upload an HTML file as a new version of a policy.
Example:
zcli doc-policy show --all.
Keep the following in mind when you prepare the file:
- ZCLI reads the file as UTF-8 text and uploads its contents. It does not check that the file is valid HTML.
- ZCLI opens the file for reading and writing, although it does not change the file. If you do not have write permission on the file, for example because it is on a read-only mount, ZCLI prints a
Permission deniederror and creates nothing. Copy the file to a writable location first. - Use a full path in
--file-path. Your shell does not expand~after=, so the--file-path=~/policy/TnC.htmlform inzcli doc-policy --helpfails withNo such file or directory.
View Policy Versions
Show the policy versions that are marked as latest. Add--all to also show versions that are not marked as latest.
download and delete. To see the ID and all other fields, use JSON output:
The example
zcli doc-policy --all in zcli doc-policy --help leaves out show. If you run it as written, ZCLI prints the usage text. Use zcli doc-policy show --all.Download a Policy Version
Download the HTML of one policy version by its ID.<policyFileId>.json. Although the file name ends in .json, the file contains the policy HTML. Rename it to .html to open it in a browser.
The ID is shown as optional in the syntax, but it is required in practice. If you leave it out, ZCLI requests a policy with the ID None.
Publish a Policy Version
Mark one version of a policy as the latest version. Users are asked to accept the latest version. See How Policy Versions Work.zcli doc-policy show.
Delete a Policy Version
Delete one policy version by its ID. To find the ID, see View Policy Versions. ZCLI asksDelete Doc Policy <uuid>? [Y/N] unless you pass -f. If you answer no, ZCLI prints Doc policy with id <uuid> not deleted.
Next Steps
Manage Users
Create users and manage their access to Edge Infrastructure Services.
Get Started
Install ZCLI, configure access to Edge Infrastructure Services, and work with local files.
Command Index
Every ZCLI command group and where to find its procedures.
Overview
All ZCLI command procedures, organized by resource type.