cf 1.0.0-beta.24 → 1.0.0-beta.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_meta/commands.json +478 -141
- package/dist/_meta/hand-written-commands.json +44 -0
- package/dist/_meta/schemas.json +254 -2
- package/dist/{abuse-reports-CTOO4FJ4.mjs → abuse-reports-BIS9MZn7.mjs} +3 -3
- package/dist/{access-DFGLlXpy.mjs → access-__sFDSFL.mjs} +1 -1
- package/dist/{accounts-C-wpV8Az.mjs → accounts-CmggwRjh.mjs} +36 -34
- package/dist/{acm-thIt17mv.mjs → acm-AAhRZUAU.mjs} +1 -1
- package/dist/{addressing-D7VI7-Oi.mjs → addressing-DVeJNPZc.mjs} +1 -1
- package/dist/{agent-memory-duLTH8pl.mjs → agent-memory-DQhWO6sc.mjs} +1 -1
- package/dist/{ai-ctIjDCq0.mjs → ai-CULO9sno.mjs} +3 -3
- package/dist/{ai-audit-CjhuS21p.mjs → ai-audit-udn4HF34.mjs} +1 -1
- package/dist/{ai-gateway-B1TIw7wl.mjs → ai-gateway-Bm2MMdec.mjs} +3 -3
- package/dist/{ai-search-DUQBnOWH.mjs → ai-search-GRN_gXgU.mjs} +1 -1
- package/dist/{ai-security-bdABwEIR.mjs → ai-security-DXy9ht-9.mjs} +2 -2
- package/dist/{alerting-I_KErGZy.mjs → alerting-CssnaN2i.mjs} +1 -1
- package/dist/{analytics-DGxcDAWu.mjs → analytics-BVo7Ax0w.mjs} +1 -1
- package/dist/{analytics-engine-DNNokw1O.mjs → analytics-engine-BBd0Bydx.mjs} +1 -1
- package/dist/{api-security-CsPrJ-Xw.mjs → api-security-C-D9OKtH.mjs} +3 -3
- package/dist/{argo-BhNmRYk5.mjs → argo-DSziwzvA.mjs} +1 -1
- package/dist/{artifacts-DRo8KadB.mjs → artifacts-nVMgn4dn.mjs} +1 -1
- package/dist/{audit-logs-CzxDyTbx.mjs → audit-logs-DIZ5oA_y.mjs} +1 -1
- package/dist/auth-Bls_1yRW.mjs +2 -0
- package/dist/{auth-pbuzyz4C.mjs → auth-CB9wjyad.mjs} +1 -1
- package/dist/auth-JsvLULHA.mjs +7 -0
- package/dist/{auth-token-BcIV7k1B.mjs → auth-token-BAgw7kYP.mjs} +1 -1
- package/dist/{autoconfig-CXcy-e1R.mjs → autoconfig-CajkMb3B.mjs} +19 -11
- package/dist/{basin-catalog-DoTn8zvi.mjs → basin-catalog-BRvGeKm3.mjs} +9 -9
- package/dist/{billing-CMbLzZV0.mjs → billing-BhPoqyKC.mjs} +1 -1
- package/dist/{blocks-DmOx-xEv.mjs → blocks-D2tE8dp2.mjs} +1 -1
- package/dist/{bot-management-CJs5WwAW.mjs → bot-management-BfjX5DuH.mjs} +1 -1
- package/dist/{botnet-feed-DeF7P5lI.mjs → botnet-feed-VOL5P4s3.mjs} +1 -1
- package/dist/{brand-protection-dx_B8OWa.mjs → brand-protection-CSVHQ9Pt.mjs} +2 -2
- package/dist/{browser-run-fRn9ItYu.mjs → browser-run-cxOd2cZE.mjs} +1 -1
- package/dist/{build-CCepbVuJ.mjs → build-BfkzV5_c.mjs} +1 -1
- package/dist/build-DCdLWwOg.mjs +2 -0
- package/dist/{builds-5YhQ_zIm.mjs → builds-y5BQCJ81.mjs} +1 -1
- package/dist/{cache-WQyxt7O5.mjs → cache-Bvr988Hj.mjs} +1 -1
- package/dist/cf-DgLg6Hop.mjs +18 -0
- package/dist/{chunk-3PJ54H4K-C8sxQzhB.mjs → chunk-3PJ54H4K-CbRAWQWI.mjs} +1 -1
- package/dist/{chunk-DSGVRFIS-CP2xC0bc.mjs → chunk-DSGVRFIS-Dq2PrGsi.mjs} +1 -1
- package/dist/{cli-CgkhNdjb.mjs → cli-BTxJfFus.mjs} +1 -1
- package/dist/{client-side-security-COuAb7BM.mjs → client-side-security-CFmO0uz9.mjs} +1 -1
- package/dist/{cloud-connector-D1gjX0Dx.mjs → cloud-connector-CtwPdFBa.mjs} +1 -1
- package/dist/{cloudflared-FEg1GxHT.mjs → cloudflared-DPkNN1Qv.mjs} +1 -1
- package/dist/{cloudforce-one-BmXgL6kB.mjs → cloudforce-one-DHrMaxnU.mjs} +58 -58
- package/dist/{command-BfoLlrr1.mjs → command-6_Ms3TZv.mjs} +1 -1
- package/dist/{command-DrdxR1tJ.mjs → command-BWyx7dNO.mjs} +1 -1
- package/dist/{command-qhfkede5.mjs → command-BXCk1OsI.mjs} +1 -1
- package/dist/{command-WyIFe__L.mjs → command-CCDzJjIB.mjs} +1 -1
- package/dist/{command-BG9JYUHo.mjs → command-CDYTsmxe.mjs} +1 -1
- package/dist/{command-Dsi4sM8D.mjs → command-CXwKBbj9.mjs} +1 -1
- package/dist/{command-8hWrCCy6.mjs → command-ClneauMx.mjs} +1 -1
- package/dist/{command-BJFKdqVc.mjs → command-CmK8-DJ9.mjs} +1 -1
- package/dist/{command-BaIY4UuC.mjs → command-Ct3tf-P5.mjs} +1 -1
- package/dist/{command-hh8rEbH4.mjs → command-DPOjEs1B.mjs} +1 -1
- package/dist/{command-D3E7d8E7.mjs → command-DqWBPiew.mjs} +1 -1
- package/dist/{command-BXPssGfS.mjs → command-YFWLEK8W.mjs} +1 -1
- package/dist/{command-CA6yIa17.mjs → command-ckixJeTm.mjs} +1 -1
- package/dist/{command-B_Fxpr5v.mjs → command-lJJ7sEZe.mjs} +1 -1
- package/dist/{completions-BshG3sAO.mjs → completions-B1rYgw_a.mjs} +1 -1
- package/dist/{connector-interrupts-pNU4QmsW.mjs → connector-interrupts-DecTdK6X.mjs} +1 -1
- package/dist/{connector-telemetry-events-BpRPtTdD.mjs → connector-telemetry-events-wePxPACj.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-pNfynA2r.mjs → connector-telemetry-snapshots-D8sXR1qx.mjs} +1 -1
- package/dist/{connectors-CiWTAGHh.mjs → connectors-C-6RQ_Q1.mjs} +1 -1
- package/dist/{containers-IBtaInTL.mjs → containers-C_byVTZF.mjs} +193 -193
- package/dist/{containers-Dvq0NjQg.mjs → containers-D65Gpj9Q.mjs} +2 -2
- package/dist/{content-scan-B69hOyhb.mjs → content-scan-DbIDQ-Yu.mjs} +1 -1
- package/dist/{context-BryBS1zQ.mjs → context-DCon1tRZ.mjs} +1 -1
- package/dist/{cps-DLgWaZMT.mjs → cps-DGLmzCzp.mjs} +1 -1
- package/dist/{csam-scanner-D1928b81.mjs → csam-scanner-R7Ih-Dnw.mjs} +1 -1
- package/dist/{custom-csrs-DrxWBjmx.mjs → custom-csrs-D0RnVoJ7.mjs} +1 -1
- package/dist/{custom-hostnames-BP1pxK1F.mjs → custom-hostnames-BFWR-tR_.mjs} +1 -1
- package/dist/{custom-nameservers-5DJLY479.mjs → custom-nameservers-Dn_9Ssti.mjs} +1 -1
- package/dist/{custom-pages-CNAsOY9a.mjs → custom-pages-HqIQcb77.mjs} +1 -1
- package/dist/{d1-Dge80Qgq.mjs → d1-CopIY9RT.mjs} +2 -2
- package/dist/{delegate-CBKb0nov.mjs → delegate-CTj0dYET.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-CR5b7uhB.mjs → deploy-BVTA83rN.mjs} +1 -1
- package/dist/{deploy-context-D51tgJGI.mjs → deploy-context-CO8ZSRwx.mjs} +1 -1
- package/dist/{deploy-input-em95cFc7.mjs → deploy-input-PhKRxa_2.mjs} +1 -1
- package/dist/{dev-BczBHbpj.mjs → dev-CM5GLHNn.mjs} +1 -1
- package/dist/{diagnostics-BKKinCge.mjs → diagnostics-DPjl0aCm.mjs} +1 -1
- package/dist/{dist-D5YYi2LO.mjs → dist-ataVE8ob.mjs} +3 -3
- package/dist/{dls-DU4HnxED.mjs → dls-BLTIVlbh.mjs} +1 -1
- package/dist/{dns-BzdH3geY.mjs → dns-DkqVq-nB.mjs} +60 -58
- package/dist/{dns-firewall-puq_86Wd.mjs → dns-firewall-D1bb1byu.mjs} +1 -1
- package/dist/{docs-AWb7X2VX.mjs → docs-tOv_OllI.mjs} +1 -1
- package/dist/{durable-objects-Dg6XPcsB.mjs → durable-objects-OJhns_to.mjs} +1 -1
- package/dist/{email-auth-DXR0NU9R.mjs → email-auth-BbsIBNlu.mjs} +1 -1
- package/dist/{email-domains-B00mAtjT.mjs → email-domains-pWZi1M4q.mjs} +1 -1
- package/dist/{email-routing-Cm19q9hA.mjs → email-routing-DnitWE1A.mjs} +1 -1
- package/dist/{email-security-CFKcS-DM.mjs → email-security-DiWtb7cx.mjs} +2 -2
- package/dist/{email-sending-B3xSoKcC.mjs → email-sending-DuDjXykw.mjs} +1 -1
- package/dist/{errors-CIQDUrWg.mjs → errors-CCFmptqJ.mjs} +1 -1
- package/dist/{field-extractors-Csz8QknP.mjs → field-extractors-DNNnkBZH.mjs} +1 -1
- package/dist/{firewall-C8FW0Nb2.mjs → firewall-C7eZRNVF.mjs} +22 -16
- package/dist/{flagship-v-bGZ_U-.mjs → flagship-BczjsrJ5.mjs} +1 -1
- package/dist/{fraud-VvfL2I5a.mjs → fraud-wE0UM2SM.mjs} +1 -1
- package/dist/{google-tag-gateway-DF6fS2MQ.mjs → google-tag-gateway-6mvtxcJK.mjs} +1 -1
- package/dist/{healthchecks-D3p3E4WL.mjs → healthchecks-aIB3DebS.mjs} +1 -1
- package/dist/{hyperdrive-DopYL1dK.mjs → hyperdrive-DHRP8SJS.mjs} +1 -1
- package/dist/{iam-cIfyshlf.mjs → iam-6t7-ScrS.mjs} +1 -1
- package/dist/{images-BR5fP_6r.mjs → images-CLgvxd0t.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{init-JXRQoqGP.mjs → init-B_DBTMXU.mjs} +1 -1
- package/dist/{intel-BvNrrM7V.mjs → intel-jnoIVlYG.mjs} +2 -2
- package/dist/{interactive-DOWEcR6_.mjs → interactive-1g0dnrA8.mjs} +1 -1
- package/dist/{internal-DcnAVlpA.mjs → internal-Ba3b-Z8J.mjs} +1 -1
- package/dist/{ips-BUEIuhhw.mjs → ips-CQ4gFfex.mjs} +1 -1
- package/dist/{k2-Dm4LvAhL.mjs → k2-Bsm6rzNX.mjs} +1 -1
- package/dist/{kv-7oD-JIak.mjs → kv-DQfnNE-w.mjs} +1 -1
- package/dist/{lazy-command-CD1nuS38.mjs → lazy-command-DjGzxiUT.mjs} +1 -1
- package/dist/{leaked-credential-checks-B6s8hUYU.mjs → leaked-credential-checks-CaqjG3Oz.mjs} +1 -1
- package/dist/list-4MfEFwJN.mjs +2 -0
- package/dist/list-ByCv9-Fl.mjs +2 -0
- package/dist/{live-CHP4AXSN.mjs → live-BfobGv8W.mjs} +1 -1
- package/dist/{load-balancers-B_yvINGW.mjs → load-balancers-BzSCp2Uh.mjs} +1 -1
- package/dist/{local-CIeKNHSz.mjs → local-BNmz58v4.mjs} +1 -1
- package/dist/local-ChR3YIMU.mjs +2 -0
- package/dist/{local-runtime-DOSBgJlo.mjs → local-runtime-DvH92pV8.mjs} +1 -1
- package/dist/{login-h8vuvNN3.mjs → login-B9wYab6S.mjs} +2 -2
- package/dist/login-ierSCYE6.mjs +2 -0
- package/dist/{logpush-B70rNMOP.mjs → logpush-DgfiSd1b.mjs} +2 -2
- package/dist/{logs-DqmqCNqQ.mjs → logs-Dan7xU-k.mjs} +1 -1
- package/dist/{magic-cloud-networking-CurtlBvl.mjs → magic-cloud-networking-DP8fWC4a.mjs} +3 -3
- package/dist/{magic-network-monitoring-OzpX7MfI.mjs → magic-network-monitoring-TAjt04vN.mjs} +1 -1
- package/dist/{magic-transit-Ca_CROhr.mjs → magic-transit-BSuLHnQ5.mjs} +1 -1
- package/dist/{managed-defense-BRxv0mgy.mjs → managed-defense-CTnIZLg4.mjs} +1 -1
- package/dist/{managed-transforms-C7YLIPdN.mjs → managed-transforms-BETvesjp.mjs} +1 -1
- package/dist/{mcp-B_StIx94.mjs → mcp-DhjMGaKc.mjs} +1 -1
- package/dist/{mesh-YW-p6Tkx.mjs → mesh-jxLLG3t4.mjs} +1 -1
- package/dist/{migrate-CrBgU7Xm.mjs → migrate-Bkhk38nJ.mjs} +1 -1
- package/dist/{monetization-rMP8HK_4.mjs → monetization-BqDgHlPv.mjs} +1 -1
- package/dist/{network-D9Do7C-u.mjs → network-D6BRpgOv.mjs} +2 -2
- package/dist/{network-interconnects-DYMhB3TR.mjs → network-interconnects-tP41GbnL.mjs} +1 -1
- package/dist/{o11y-HT9_9NUF.mjs → o11y-h4cIC_1T.mjs} +1 -1
- package/dist/{oauth-D6uh5ZdS.mjs → oauth-CuM12iNb.mjs} +1 -1
- package/dist/{oauth-clients-B_BJco0Z.mjs → oauth-clients-B0voUiXM.mjs} +1 -1
- package/dist/{oauth-DetIFT59.mjs → oauth-nDH3nTCa.mjs} +2 -2
- package/dist/oauth-scopes-Bhns1ZHW.mjs +4 -0
- package/dist/{organization-DhxMPdqU.mjs → organization-Cy55HoRR.mjs} +4 -4
- package/dist/organizations-7Q3d9vcW.mjs +4 -0
- package/dist/{origin-post-quantum-encryption-CPZQGLmW.mjs → origin-post-quantum-encryption-XBMPCdSL.mjs} +1 -1
- package/dist/package-DK3JX4I3.mjs +2 -0
- package/dist/{page-rules-0nDfdFWr.mjs → page-rules-BlT5xlhH.mjs} +1 -1
- package/dist/{pages-Br-w5HLL.mjs → pages-CIbL62L2.mjs} +2 -2
- package/dist/{pay-per-crawl-Di6UpJoo.mjs → pay-per-crawl-BzsBqo_m.mjs} +1 -1
- package/dist/{pay-per-use-Bm7Nxf6s.mjs → pay-per-use-DtejLYJ8.mjs} +1 -1
- package/dist/{pipelines-BRVI3bV9.mjs → pipelines-LjLb8jq6.mjs} +1 -1
- package/dist/{precursor-DyrQWdO5.mjs → precursor-BKp5_Ag4.mjs} +1 -1
- package/dist/{previews-rpfwcJzi.mjs → previews-zRYO9uO9.mjs} +1 -1
- package/dist/{progress-C_yVLVcl.mjs → progress-_Jux05O5.mjs} +1 -1
- package/dist/{prompt-kxvGZ6nF.mjs → prompt-SNVLBS1b.mjs} +1 -1
- package/dist/{queues-BGV3aC26.mjs → queues-Ci4rGGC4.mjs} +1 -1
- package/dist/{r2-CWMqr3JJ.mjs → r2-qm2hgS43.mjs} +1 -1
- package/dist/radar-C_ydbJe_.mjs +300 -0
- package/dist/{raw-fetch-C_hWBr7n.mjs → raw-fetch-D3ydyJYW.mjs} +1 -1
- package/dist/{ready-BXz5amSL.mjs → ready-hk-_B8z3.mjs} +1 -1
- package/dist/{realtime-9jG5GaNK.mjs → realtime-BAvjYmYw.mjs} +2 -2
- package/dist/{registrar-C-2I1SJh.mjs → registrar-DD7WZaP2.mjs} +10 -10
- package/dist/{registrar-sandbox-D9ldxGPo.mjs → registrar-sandbox-DbxloH5s.mjs} +2 -2
- package/dist/{reporting-Bk3dc6Gi.mjs → reporting-CRVg3J1C.mjs} +1 -1
- package/dist/{request-headers-B5Rjq7Ic.mjs → request-headers-Cn01EsbI.mjs} +1 -1
- package/dist/{request-tracers-H-iRAUdG.mjs → request-tracers-BWs0rdFS.mjs} +1 -1
- package/dist/{resource-sharing-A6ITunsT.mjs → resource-sharing-yipIkdbd.mjs} +2 -2
- package/dist/{rules-BntvQdnS.mjs → rules-CCtaBLiN.mjs} +1 -1
- package/dist/{rulesets-DKz_iYU_.mjs → rulesets-DBEvCNDS.mjs} +1 -1
- package/dist/{rum-D9zpcNqT.mjs → rum-gDOKylu_.mjs} +1 -1
- package/dist/{run-BlSXngtI.mjs → run-Br8sYjNF.mjs} +1 -1
- package/dist/run-LOgTLpob.mjs +2 -0
- package/dist/schema-cache-Cb64Nqbt.mjs +3 -0
- package/dist/schema-flags-BcbbCWR5.mjs +4 -0
- package/dist/{scim-DVhxKKpH.mjs → scim-CM8Xah56.mjs} +1 -1
- package/dist/{secrets-store-3mxJrDWJ.mjs → secrets-store-BEnXiYCC.mjs} +2 -2
- package/dist/{security-insights-BDLWuG0E.mjs → security-insights-Be5GvdBA.mjs} +5 -5
- package/dist/{security-txt-COzdrpdW.mjs → security-txt-BF0PWAEW.mjs} +1 -1
- package/dist/{session-X3xaW70I.mjs → session-B7vOqdZU.mjs} +1 -1
- package/dist/{shared-foRpbmSV.mjs → shared-CBMFY1VY.mjs} +1 -1
- package/dist/{signed-url-Dgi1p-Qi.mjs → signed-url-VDDQlllt.mjs} +1 -1
- package/dist/{smart-shield-DSDA5bZt.mjs → smart-shield-DQku_wYi.mjs} +1 -1
- package/dist/{snippets-myowgDLd.mjs → snippets-B3FCEMuh.mjs} +1 -1
- package/dist/{spawn-C8D5pzxJ.mjs → spawn-9sE67p7c.mjs} +1 -1
- package/dist/{spectrum-CB-NzbZ7.mjs → spectrum-nLirlVue.mjs} +5 -5
- package/dist/{speed-UqKG1WDl.mjs → speed-C1hCyMPy.mjs} +1 -1
- package/dist/{sql-BzikdIje.mjs → sql-DVQOKThL.mjs} +1 -1
- package/dist/{src-B9agxHh8.mjs → src-Bh2gHpI7.mjs} +5 -5
- package/dist/{ssl-BmWWsUX6.mjs → ssl-CYDRgr24.mjs} +2 -2
- package/dist/{startup-profile-B7yHR_YB.mjs → startup-profile-BLvw_Wmc.mjs} +1 -1
- package/dist/startup-profile-ByxSdhEl.mjs +2 -0
- package/dist/{state-DNuVv5i-.mjs → state-B8n0QU04.mjs} +1 -1
- package/dist/state-BTOzaT5L.mjs +2 -0
- package/dist/{stream-G87TzC9e.mjs → stream-DHyejrI6.mjs} +1 -1
- package/dist/{tags-Ctl4fLux.mjs → tags-DOL6dKQE.mjs} +2 -2
- package/dist/{telemetry-CA0_i9-l.mjs → telemetry-DJ8-Q2pU.mjs} +1 -1
- package/dist/telemetry-kjElc1zT.mjs +2 -0
- package/dist/{tenant-t5yPFQOx.mjs → tenant-2EdATz2Y.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-B2ehXfQK.mjs → tenant-custom-nameservers-DhEpJNST.mjs} +1 -1
- package/dist/{tunnels-DL_VgV0P.mjs → tunnels-CMAmH4Vh.mjs} +3 -3
- package/dist/{turnstile-CEjw5vn6.mjs → turnstile-DTJjDMFp.mjs} +1 -1
- package/dist/ui-7zujR-O7.mjs +2 -0
- package/dist/{update-check-LF-JcHRF.mjs → update-check-BkCdHK-3.mjs} +1 -1
- package/dist/{update-check-2Mn4Z1ln.mjs → update-check-DDGKWkmi.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-BL_BkGvP.mjs → url-normalization-BbWOra1u.mjs} +1 -1
- package/dist/{url-scanner-CVzV9Syq.mjs → url-scanner-Bj-eS_3C.mjs} +2 -2
- package/dist/{user-YnQSmPNR.mjs → user-CMzTHHVX.mjs} +1 -1
- package/dist/{vectorize-C5ZwKQzI.mjs → vectorize-D4H7_KPs.mjs} +1 -1
- package/dist/version-DIIJ2ixL.mjs +2 -0
- package/dist/{waiting-rooms-D9V1Fm16.mjs → waiting-rooms-CqMbVu9s.mjs} +1 -1
- package/dist/{web-assets-yzPkWgLy.mjs → web-assets-BgfzyF8t.mjs} +5 -5
- package/dist/{web3-DbWNUhP4.mjs → web3-ByCe47FI.mjs} +1 -1
- package/dist/{workers-r9Aj68v1.mjs → workers-BiLsPkYD.mjs} +2 -2
- package/dist/{workers-builds-DgIDPDhj.mjs → workers-builds-2N71_8MZ.mjs} +1 -1
- package/dist/{workers-for-platforms-CoPp1ez5.mjs → workers-for-platforms-BMN4QXgT.mjs} +1 -1
- package/dist/{workers-vpc-Cvjg15bk.mjs → workers-vpc-3o7dMg7-.mjs} +1 -1
- package/dist/{workflows-D4SIo58Q.mjs → workflows-COiyqt-B.mjs} +1 -1
- package/dist/{wrangler-migration-D2HwxIG5.mjs → wrangler-migration-CqSg8IDj.mjs} +5 -5
- package/dist/{zaraz-CkqpiZBH.mjs → zaraz-DjwhCH8A.mjs} +2 -2
- package/dist/{zero-trust-CEY-lohP.mjs → zero-trust-BmpuDOmH.mjs} +64 -58
- package/dist/{zones-BWieAez1.mjs → zones-XYQiz5kF.mjs} +2 -2
- package/package.json +12 -12
- package/dist/auth-B2V5gsm4.mjs +0 -2
- package/dist/auth-CyF_s5ic.mjs +0 -2
- package/dist/build-CgpCJjPA.mjs +0 -2
- package/dist/cf-CInFH4Ng.mjs +0 -18
- package/dist/local-CTaqb1nl.mjs +0 -2
- package/dist/login-pt6gTX3x.mjs +0 -2
- package/dist/oauth-scopes-Cub2pl0Z.mjs +0 -4
- package/dist/organizations-DIduPB74.mjs +0 -4
- package/dist/package-Bf2u3-yO.mjs +0 -2
- package/dist/radar-D8x_TUAi.mjs +0 -300
- package/dist/run-DB1-Sj9a.mjs +0 -2
- package/dist/schema-flags-CoTAkrz8.mjs +0 -5
- package/dist/startup-profile-zt6cFnBn.mjs +0 -2
- package/dist/state-C5mQ9At8.mjs +0 -2
- package/dist/telemetry-jl3s2-bN.mjs +0 -2
- package/dist/ui-Dt1-eURh.mjs +0 -2
- package/dist/version-Bz705iJe.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{i as n,n as r}from"./auth-CB9wjyad.mjs";import{a as i,i as a,t as o}from"./context-DCon1tRZ.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-_Jux05O5.mjs";import{t as u}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as d,n as f,o as p,r as m,s as h,t as g}from"./body-parser-BKcZS9iJ.mjs";import{n as _,t as v}from"./input-validation-D7z60HJH.mjs";import{a as y,i as b,n as x}from"./prompt-SNVLBS1b.mjs";import{n as ee,t as te}from"./raw-fetch-D3ydyJYW.mjs";var ne={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps`,body:`json`};function re(e){return e.usage(`$0 zero-trust access applications create
|
|
3
3
|
|
|
4
4
|
Adds a new application to Access.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ie={command:`create`,describe:`Add an Access application`,builder:re,handler:async e=>u({command:`zero-trust access applications create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf zero-trust access applications create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?void 0:f(e.body)});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=d:e.accountId=d,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(ne,{body:t,account_or_zone:u,account_or_zone_id:d}));s(r,{successLabel:`Created`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var ae={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}`};function oe(e){return e.usage(`$0 zero-trust access applications delete <app-id>
|
|
5
5
|
|
|
@@ -64,7 +64,7 @@ Gets an account-scoped Access JIT request summary and its lifecycle events in ch
|
|
|
64
64
|
|
|
65
65
|
Lists account-wide Access JIT request logs reconstructed from request lifecycle events.`).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`status`,{type:`string`,description:"JIT request status. `SPENT` is deprecated and interpreted as `APPROVED`.",choices:[`PENDING`,`APPROVED`,`DENIED`,`CANCELED`,`SPENT`]}).option(`search`,{type:`string`,description:`Case-insensitive search over request ID, requester email, application audience, and application hostname.`}).option(`since`,{type:`string`,description:`The earliest request timestamp to query. Defaults to 366 days before the current time.`}).option(`until`,{type:`string`,description:`The latest request timestamp to query. Defaults to the current time.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xt={command:`list`,describe:`List Access JIT request logs`,builder:Yt,handler:async e=>u({command:`zero-trust access logs jit-requests list`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],status:e.status,search:e.search,since:e.since,until:e.until};if(e.dryRun){let e=await i();c({command:`cf zero-trust access logs jit-requests list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/logs/jit_requests`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Jt,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},Zt={command:`jit-requests`,describe:`Operations for access.logs.jit-requests`,builder:e=>e.command(qt).command(Xt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Qt={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/logs/scim/updates`,query:[`limit`,`direction`,`since`,`until`,`idp_id`,`status`,`resource_type`,`request_method`,`resource_user_email`,`resource_group_name`,`cf_resource_id`,`idp_resource_id`,`page`,`per_page`]};function $t(e){return e.usage(`$0 zero-trust access logs scim updates list
|
|
66
66
|
|
|
67
|
-
Lists Access SCIM update logs that maintain a record of updates made to User and Group resources synced to Cloudflare via the System for Cross-domain Identity Management (SCIM).`).option(`limit`,{type:`number`,description:`The maximum number of update logs to retrieve.`}).option(`direction`,{type:`string`,description:`The chronological order used to sort the logs.`,choices:[`desc`,`asc`]}).option(`since`,{type:`string`,description:`the timestamp of the earliest update log.`}).option(`until`,{type:`string`,description:`the timestamp of the most-recent update log.`}).option(`idp-id`,{type:`string`,description:`The unique Id of the IdP that has SCIM enabled.`,demandOption:!0}).option(`status`,{type:`string`,description:`The status of the SCIM request.`}).option(`resource-type`,{type:`string`,description:`The resource type of the SCIM request.`}).option(`request-method`,{type:`string`,description:`The request method of the SCIM request.`}).option(`resource-user-email`,{type:`string`,description:"The email address of the SCIM User resource. Pass once for a single\nlookup (`?resource_user_email=A`) or repeat the parameter\n(`?resource_user_email=A&resource_user_email=B`) to filter by multiple\nemails in one request."}).option(`resource-group-name`,{type:`string`,description:"The display name of the SCIM Group resource. Pass once for a single\nlookup (`?resource_group_name=A`) or repeat the parameter\n(`?resource_group_name=A&resource_group_name=B`) to filter by multiple\ngroup names in one request."}).option(`cf-resource-id`,{type:`string`,description:"The unique Cloudflare-generated Id of the SCIM resource. Pass once for\na single lookup (`?cf_resource_id=A`) or repeat the parameter\n(`?cf_resource_id=A&cf_resource_id=B`) to filter by multiple resources\nin one request."}).option(`idp-resource-id`,{type:`string`,description:"The IdP-generated Id of the SCIM resource. Pass once for a single\nlookup (`?idp_resource_id=A`) or repeat the parameter\n(`?idp_resource_id=A&idp_resource_id=B`) to filter by multiple\nresources in one request."}).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const en={command:`list`,describe:`List Access SCIM update logs`,builder:$t,handler:async e=>u({command:`zero-trust access logs scim updates list`,classification:{safeFlags:[`direction`,`dry-run`]}},e,async()=>{let n={limit:e.limit,direction:e.direction,since:e.since,until:e.until,idp_id:e[`idp-id`],status:e.status,resource_type:e[`resource-type`],request_method:e[`request-method`],resource_user_email:e[`resource-user-email`],resource_group_name:e[`resource-group-name`],cf_resource_id:e[`cf-resource-id`],idp_resource_id:e[`idp-resource-id`],page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust access logs scim updates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/logs/scim/updates`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Qt,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},tn={command:`updates`,describe:`Operations for access.logs.scim.updates`,builder:e=>e.command(en).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},nn={command:`scim`,describe:`Operations for access.logs.scim`,builder:e=>e.command(tn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},rn={command:`logs`,describe:`Operations for access.logs`,builder:e=>e.command(Wt).command(Zt).command(nn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var an={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/authenticator_device_aaguids`};function on(e){return e.usage(`$0 zero-trust access mfa authenticator-catalog list
|
|
67
|
+
Lists Access SCIM update logs that maintain a record of updates made to User and Group resources synced to Cloudflare via the System for Cross-domain Identity Management (SCIM).`).option(`limit`,{type:`number`,description:`The maximum number of update logs to retrieve.`}).option(`direction`,{type:`string`,description:`The chronological order used to sort the logs.`,choices:[`desc`,`asc`]}).option(`since`,{type:`string`,description:`the timestamp of the earliest update log.`}).option(`until`,{type:`string`,description:`the timestamp of the most-recent update log.`}).option(`idp-id`,{type:`string`,array:!0,description:`The unique Id of the IdP that has SCIM enabled.`,demandOption:!0}).option(`status`,{type:`string`,array:!0,description:`The status of the SCIM request.`}).option(`resource-type`,{type:`string`,array:!0,description:`The resource type of the SCIM request.`}).option(`request-method`,{type:`string`,array:!0,description:`The request method of the SCIM request.`}).option(`resource-user-email`,{type:`string`,array:!0,description:"The email address of the SCIM User resource. Pass once for a single\nlookup (`?resource_user_email=A`) or repeat the parameter\n(`?resource_user_email=A&resource_user_email=B`) to filter by multiple\nemails in one request."}).option(`resource-group-name`,{type:`string`,array:!0,description:"The display name of the SCIM Group resource. Pass once for a single\nlookup (`?resource_group_name=A`) or repeat the parameter\n(`?resource_group_name=A&resource_group_name=B`) to filter by multiple\ngroup names in one request."}).option(`cf-resource-id`,{type:`string`,array:!0,description:"The unique Cloudflare-generated Id of the SCIM resource. Pass once for\na single lookup (`?cf_resource_id=A`) or repeat the parameter\n(`?cf_resource_id=A&cf_resource_id=B`) to filter by multiple resources\nin one request."}).option(`idp-resource-id`,{type:`string`,array:!0,description:"The IdP-generated Id of the SCIM resource. Pass once for a single\nlookup (`?idp_resource_id=A`) or repeat the parameter\n(`?idp_resource_id=A&idp_resource_id=B`) to filter by multiple\nresources in one request."}).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const en={command:`list`,describe:`List Access SCIM update logs`,builder:$t,handler:async e=>u({command:`zero-trust access logs scim updates list`,classification:{safeFlags:[`direction`,`dry-run`]}},e,async()=>{let n={limit:e.limit,direction:e.direction,since:e.since,until:e.until,idp_id:e[`idp-id`],status:e.status,resource_type:e[`resource-type`],request_method:e[`request-method`],resource_user_email:e[`resource-user-email`],resource_group_name:e[`resource-group-name`],cf_resource_id:e[`cf-resource-id`],idp_resource_id:e[`idp-resource-id`],page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust access logs scim updates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/logs/scim/updates`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Qt,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},tn={command:`updates`,describe:`Operations for access.logs.scim.updates`,builder:e=>e.command(en).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},nn={command:`scim`,describe:`Operations for access.logs.scim`,builder:e=>e.command(tn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},rn={command:`logs`,describe:`Operations for access.logs`,builder:e=>e.command(Wt).command(Zt).command(nn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var an={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/authenticator_device_aaguids`};function on(e){return e.usage(`$0 zero-trust access mfa authenticator-catalog list
|
|
68
68
|
|
|
69
69
|
Returns a list of Authenticator Device AAGUIDs for MFA configuration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const sn={command:`list`,describe:`List authenticator device AAGUIDs`,builder:on,handler:async e=>u({command:`zero-trust access mfa authenticator-catalog list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust access mfa authenticator-catalog list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/authenticator_device_aaguids`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(an,{account_id:a}));s(u,{successLabel:`Loaded`})})},cn={command:`authenticator-catalog`,describe:`Operations for access.mfa.authenticator-catalog`,builder:e=>e.command(sn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ln={command:`mfa`,describe:`Operations for access.mfa`,builder:e=>e.command(cn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var w={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/certificates`,body:`json`};function un(e){return e.usage(`$0 zero-trust access mtls-certificates create
|
|
70
70
|
|
|
@@ -82,7 +82,7 @@ Updates an mTLS certificate's hostname settings.`).option(`settings`,{type:`stri
|
|
|
82
82
|
|
|
83
83
|
Updates a configured mTLS certificate.`).positional(`certificate-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`associated-hostnames`,{type:`string`,array:!0,description:`The hostnames of the applications that will use this certificate.`}).option(`name`,{type:`string`,description:`The name of the certificate.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const On={command:`update <certificate-id>`,describe:`Update an mTLS certificate`,builder:Dn,handler:async e=>u({command:`zero-trust access mtls-certificates update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf zero-trust access mtls-certificates update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({associated_hostnames:e[`associated-hostnames`],name:_(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=d:e.accountId=d,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(E,{body:t,account_or_zone:u,account_or_zone_id:d,certificate_id:e[`certificate-id`]}));s(r,{successLabel:`Updated`});return}if(e[`associated-hostnames`]===void 0)throw Error(`--associated-hostnames is required (or pass --body with this field set).`);let p=g({associated_hostnames:e[`associated-hostnames`],name:_(e.name,`name`,`text`)}),m=await l(`Updating`,async()=>n.send(E,{body:p,account_or_zone:u,account_or_zone_id:d,certificate_id:e[`certificate-id`]}));s(m,{successLabel:`Updated`})})},kn={command:`mtls-certificates`,describe:`Operations for access.mtls-certificates`,builder:e=>e.command(dn).command(mn).command(_n).command(bn).command(On).command(En).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var D={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/policies`,body:`json`};function An(e){return e.usage(`$0 zero-trust access policies create
|
|
84
84
|
|
|
85
|
-
Creates a new Access reusable policy.`).option(`approval-groups`,{type:`string`,description:`Administrators who can approve a temporary authentication request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`approval-required`,{type:`boolean`,description:`Requires the user to request access from an administrator at the start of each session.`}).option(`connection-rules-rdp-allowed-clipboard-local-to-remote-formats`,{type:`string`,array:!0,description:`Clipboard formats allowed when copying from local machine to remote RDP session.`}).option(`connection-rules-rdp-allowed-clipboard-remote-to-local-formats`,{type:`string`,array:!0,description:`Clipboard formats allowed when copying from remote RDP session to local machine.`}).option(`isolation-required`,{type:`boolean`,description:`Require this application to be served in an isolated browser for users matching this policy. 'Client Web Isolation' must be on for the account in order to use this feature.`}).option(`mfa-config-allowed-authenticators`,{type:`string`,array:!0,description:`Lists the MFA methods that users can authenticate with.`}).option(`mfa-config-mfa-disabled`,{type:`boolean`,description:`Indicates whether to disable MFA for this resource. This option is available at the application and policy level.`}).option(`mfa-config-session-duration`,{type:`string`,description:"Defines the duration of an MFA session. Must be in minutes (m) or hours (h). Minimum: 0m. Maximum: 720h (30 days). Examples:`5m` or `24h`."}).option(`purpose-justification-prompt`,{type:`string`,description:`A custom message that will appear on the purpose justification screen.`}).option(`purpose-justification-required`,{type:`boolean`,description:`Require users to enter a justification when they log in to the application.`}).option(`session-duration`,{type:`string`,description:"The amount of time that tokens issued for the application will be valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h."}).option(`decision`,{type:`string`,description:`The action Access will take if a user matches this policy. Infrastructure application policies can only use the Allow action.`,choices:[`allow`,`deny`,`non_identity`,`bypass`]}).coerce(`decision`,e=>_(e,`decision`,`text`)).option(`exclude`,{type:`string`,description:`Rules evaluated with a NOT logical operator. To match the policy, a user cannot meet any of the Exclude rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`include`,{type:`string`,description:`Rules evaluated with an OR logical operator. A user needs to meet only one of the Include rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name of the Access policy.`}).option(`require`,{type:`string`,description:`Rules evaluated with an AND logical operator. To match the policy, a user must meet all of the Require rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const jn={command:`create`,describe:`Create an Access reusable policy`,builder:An,handler:async e=>u({command:`zero-trust access policies create`,classification:{safeFlags:[`approval-required`,`isolation-required`,`mfa-config-mfa-disabled`,`purpose-justification-required`,`decision`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({approval_groups:d(e[`approval-groups`],`approval-groups`),approval_required:e[`approval-required`],connection_rules:{rdp:{allowed_clipboard_local_to_remote_formats:e[`connection-rules-rdp-allowed-clipboard-local-to-remote-formats`],allowed_clipboard_remote_to_local_formats:e[`connection-rules-rdp-allowed-clipboard-remote-to-local-formats`]}},isolation_required:e[`isolation-required`],mfa_config:{allowed_authenticators:e[`mfa-config-allowed-authenticators`],mfa_disabled:e[`mfa-config-mfa-disabled`],session_duration:_(e[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},purpose_justification_prompt:_(e[`purpose-justification-prompt`],`purpose-justification-prompt`,`text`),purpose_justification_required:e[`purpose-justification-required`],session_duration:_(e[`session-duration`],`session-duration`,`text`),decision:e.decision,exclude:d(e.exclude,`exclude`),include:d(e.include,`include`),name:_(e.name,`name`,`text`),require:d(e.require,`require`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(D,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.decision===void 0&&(e.decision=await b(`decision`,`The action Access will take if a user matches this policy. Infrastructure application policies can only use the Allow action.`,[`allow`,`deny`,`non_identity`,`bypass`])),e.include===void 0)throw Error(`--include is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`The name of the Access policy.`));let u=g({approval_groups:d(e[`approval-groups`],`approval-groups`),approval_required:e[`approval-required`],connection_rules:{rdp:{allowed_clipboard_local_to_remote_formats:e[`connection-rules-rdp-allowed-clipboard-local-to-remote-formats`],allowed_clipboard_remote_to_local_formats:e[`connection-rules-rdp-allowed-clipboard-remote-to-local-formats`]}},isolation_required:e[`isolation-required`],mfa_config:{allowed_authenticators:e[`mfa-config-allowed-authenticators`],mfa_disabled:e[`mfa-config-mfa-disabled`],session_duration:_(e[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},purpose_justification_prompt:_(e[`purpose-justification-prompt`],`purpose-justification-prompt`,`text`),purpose_justification_required:e[`purpose-justification-required`],session_duration:_(e[`session-duration`],`session-duration`,`text`),decision:e.decision,exclude:d(e.exclude,`exclude`),include:d(e.include,`include`),name:_(e.name,`name`,`text`),require:d(e.require,`require`)}),p=await l(`Creating`,async()=>n.send(D,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Mn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/policies/${t.policy_id}`};function Nn(e){return e.usage(`$0 zero-trust access policies delete <policy-id>
|
|
85
|
+
Creates a new Access reusable policy.`).option(`approval-groups`,{type:`string`,description:`Administrators who can approve a temporary authentication request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`approval-required`,{type:`boolean`,description:`Requires the user to request access from an administrator at the start of each session.`}).option(`connection-rules-rdp-allowed-clipboard-local-to-remote-formats`,{type:`string`,array:!0,description:`Clipboard formats allowed when copying from local machine to remote RDP session.`}).option(`connection-rules-rdp-allowed-clipboard-remote-to-local-formats`,{type:`string`,array:!0,description:`Clipboard formats allowed when copying from remote RDP session to local machine.`}).option(`isolation-required`,{type:`boolean`,description:`Require this application to be served in an isolated browser for users matching this policy. 'Client Web Isolation' must be on for the account in order to use this feature.`}).option(`mfa-config-allowed-authenticators`,{type:`string`,array:!0,description:`Lists the MFA methods that users can authenticate with.`}).option(`mfa-config-mfa-disabled`,{type:`boolean`,description:`Indicates whether to disable MFA for this resource. This option is available at the application and policy level.`}).option(`mfa-config-session-duration`,{type:`string`,description:"Defines the duration of an MFA session. Must be in minutes (m) or hours (h). Minimum: 0m. Maximum: 720h (30 days). Examples:`5m` or `24h`."}).option(`purpose-justification-prompt`,{type:`string`,description:`A custom message that will appear on the purpose justification screen.`}).option(`purpose-justification-required`,{type:`boolean`,description:`Require users to enter a justification when they log in to the application.`}).option(`session-duration`,{type:`string`,description:"The amount of time that tokens issued for the application will be valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h."}).option(`decision`,{type:`string`,description:`The action Access will take if a user matches this policy. Infrastructure application policies can only use the Allow action.`,choices:[`allow`,`deny`,`non_identity`,`bypass`]}).coerce(`decision`,e=>_(e,`decision`,`text`)).option(`exclude`,{type:`string`,description:`Rules evaluated with a NOT logical operator. To match the policy, a user cannot meet any of the Exclude rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`include`,{type:`string`,description:`Rules evaluated with an OR logical operator. A user needs to meet only one of the Include rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name of the Access policy.`}).option(`policy-resolution-account-id`,{type:`string`,description:`The account ID used to resolve policy resources and identity for cross-account WARP authentication. The account must be trusted by the account that owns this policy.`}).option(`require`,{type:`string`,description:`Rules evaluated with an AND logical operator. To match the policy, a user must meet all of the Require rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const jn={command:`create`,describe:`Create an Access reusable policy`,builder:An,handler:async e=>u({command:`zero-trust access policies create`,classification:{safeFlags:[`approval-required`,`isolation-required`,`mfa-config-mfa-disabled`,`purpose-justification-required`,`decision`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({approval_groups:d(e[`approval-groups`],`approval-groups`),approval_required:e[`approval-required`],connection_rules:{rdp:{allowed_clipboard_local_to_remote_formats:e[`connection-rules-rdp-allowed-clipboard-local-to-remote-formats`],allowed_clipboard_remote_to_local_formats:e[`connection-rules-rdp-allowed-clipboard-remote-to-local-formats`]}},isolation_required:e[`isolation-required`],mfa_config:{allowed_authenticators:e[`mfa-config-allowed-authenticators`],mfa_disabled:e[`mfa-config-mfa-disabled`],session_duration:_(e[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},purpose_justification_prompt:_(e[`purpose-justification-prompt`],`purpose-justification-prompt`,`text`),purpose_justification_required:e[`purpose-justification-required`],session_duration:_(e[`session-duration`],`session-duration`,`text`),decision:e.decision,exclude:d(e.exclude,`exclude`),include:d(e.include,`include`),name:_(e.name,`name`,`text`),policy_resolution_account_id:_(e[`policy-resolution-account-id`],`policy-resolution-account-id`,`text`),require:d(e.require,`require`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(D,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.decision===void 0&&(e.decision=await b(`decision`,`The action Access will take if a user matches this policy. Infrastructure application policies can only use the Allow action.`,[`allow`,`deny`,`non_identity`,`bypass`])),e.include===void 0)throw Error(`--include is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`The name of the Access policy.`));let u=g({approval_groups:d(e[`approval-groups`],`approval-groups`),approval_required:e[`approval-required`],connection_rules:{rdp:{allowed_clipboard_local_to_remote_formats:e[`connection-rules-rdp-allowed-clipboard-local-to-remote-formats`],allowed_clipboard_remote_to_local_formats:e[`connection-rules-rdp-allowed-clipboard-remote-to-local-formats`]}},isolation_required:e[`isolation-required`],mfa_config:{allowed_authenticators:e[`mfa-config-allowed-authenticators`],mfa_disabled:e[`mfa-config-mfa-disabled`],session_duration:_(e[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},purpose_justification_prompt:_(e[`purpose-justification-prompt`],`purpose-justification-prompt`,`text`),purpose_justification_required:e[`purpose-justification-required`],session_duration:_(e[`session-duration`],`session-duration`,`text`),decision:e.decision,exclude:d(e.exclude,`exclude`),include:d(e.include,`include`),name:_(e.name,`name`,`text`),policy_resolution_account_id:_(e[`policy-resolution-account-id`],`policy-resolution-account-id`,`text`),require:d(e.require,`require`)}),p=await l(`Creating`,async()=>n.send(D,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Mn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/policies/${t.policy_id}`};function Nn(e){return e.usage(`$0 zero-trust access policies delete <policy-id>
|
|
86
86
|
|
|
87
87
|
Deletes an Access reusable policy.`).positional(`policy-id`,{type:`string`,description:`The UUID of the policy`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Pn={command:`delete <policy-id>`,describe:`Delete an Access reusable policy`,builder:Nn,handler:async e=>u({command:`zero-trust access policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(Mn,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Deleted`})})};var Fn={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/policies/${t.policy_id}`};function In(e){return e.usage(`$0 zero-trust access policies get <policy-id>
|
|
88
88
|
|
|
@@ -90,7 +90,7 @@ Fetches a single Access reusable policy.`).positional(`policy-id`,{type:`string`
|
|
|
90
90
|
|
|
91
91
|
Lists Access reusable policies.`).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bn={command:`list`,describe:`List Access reusable policies`,builder:zn,handler:async e=>u({command:`zero-trust access policies list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust access policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/policies`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Rn,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var O={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/policies/${t.policy_id}`,body:`json`};function Vn(e){return e.usage(`$0 zero-trust access policies update <policy-id>
|
|
92
92
|
|
|
93
|
-
Updates a Access reusable policy.`).positional(`policy-id`,{type:`string`,description:`The UUID of the policy`,demandOption:!0}).option(`approval-groups`,{type:`string`,description:`Administrators who can approve a temporary authentication request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`approval-required`,{type:`boolean`,description:`Requires the user to request access from an administrator at the start of each session.`}).option(`connection-rules-rdp-allowed-clipboard-local-to-remote-formats`,{type:`string`,array:!0,description:`Clipboard formats allowed when copying from local machine to remote RDP session.`}).option(`connection-rules-rdp-allowed-clipboard-remote-to-local-formats`,{type:`string`,array:!0,description:`Clipboard formats allowed when copying from remote RDP session to local machine.`}).option(`isolation-required`,{type:`boolean`,description:`Require this application to be served in an isolated browser for users matching this policy. 'Client Web Isolation' must be on for the account in order to use this feature.`}).option(`mfa-config-allowed-authenticators`,{type:`string`,array:!0,description:`Lists the MFA methods that users can authenticate with.`}).option(`mfa-config-mfa-disabled`,{type:`boolean`,description:`Indicates whether to disable MFA for this resource. This option is available at the application and policy level.`}).option(`mfa-config-session-duration`,{type:`string`,description:"Defines the duration of an MFA session. Must be in minutes (m) or hours (h). Minimum: 0m. Maximum: 720h (30 days). Examples:`5m` or `24h`."}).option(`purpose-justification-prompt`,{type:`string`,description:`A custom message that will appear on the purpose justification screen.`}).option(`purpose-justification-required`,{type:`boolean`,description:`Require users to enter a justification when they log in to the application.`}).option(`session-duration`,{type:`string`,description:"The amount of time that tokens issued for the application will be valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h."}).option(`decision`,{type:`string`,description:`The action Access will take if a user matches this policy. Infrastructure application policies can only use the Allow action.`,choices:[`allow`,`deny`,`non_identity`,`bypass`]}).coerce(`decision`,e=>_(e,`decision`,`text`)).option(`exclude`,{type:`string`,description:`Rules evaluated with a NOT logical operator. To match the policy, a user cannot meet any of the Exclude rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`include`,{type:`string`,description:`Rules evaluated with an OR logical operator. A user needs to meet only one of the Include rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name of the Access policy.`}).option(`require`,{type:`string`,description:`Rules evaluated with an AND logical operator. To match the policy, a user must meet all of the Require rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Hn={command:`update <policy-id>`,describe:`Update an Access reusable policy`,builder:Vn,handler:async e=>u({command:`zero-trust access policies update`,classification:{safeFlags:[`approval-required`,`isolation-required`,`mfa-config-mfa-disabled`,`purpose-justification-required`,`decision`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({approval_groups:d(e[`approval-groups`],`approval-groups`),approval_required:e[`approval-required`],connection_rules:{rdp:{allowed_clipboard_local_to_remote_formats:e[`connection-rules-rdp-allowed-clipboard-local-to-remote-formats`],allowed_clipboard_remote_to_local_formats:e[`connection-rules-rdp-allowed-clipboard-remote-to-local-formats`]}},isolation_required:e[`isolation-required`],mfa_config:{allowed_authenticators:e[`mfa-config-allowed-authenticators`],mfa_disabled:e[`mfa-config-mfa-disabled`],session_duration:_(e[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},purpose_justification_prompt:_(e[`purpose-justification-prompt`],`purpose-justification-prompt`,`text`),purpose_justification_required:e[`purpose-justification-required`],session_duration:_(e[`session-duration`],`session-duration`,`text`),decision:e.decision,exclude:d(e.exclude,`exclude`),include:d(e.include,`include`),name:_(e.name,`name`,`text`),require:d(e.require,`require`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(O,{body:t,account_id:a,policy_id:e[`policy-id`]}));s(r,{successLabel:`Updated`});return}if(e.decision===void 0&&(e.decision=await b(`decision`,`The action Access will take if a user matches this policy. Infrastructure application policies can only use the Allow action.`,[`allow`,`deny`,`non_identity`,`bypass`])),e.include===void 0)throw Error(`--include is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`The name of the Access policy.`));let u=g({approval_groups:d(e[`approval-groups`],`approval-groups`),approval_required:e[`approval-required`],connection_rules:{rdp:{allowed_clipboard_local_to_remote_formats:e[`connection-rules-rdp-allowed-clipboard-local-to-remote-formats`],allowed_clipboard_remote_to_local_formats:e[`connection-rules-rdp-allowed-clipboard-remote-to-local-formats`]}},isolation_required:e[`isolation-required`],mfa_config:{allowed_authenticators:e[`mfa-config-allowed-authenticators`],mfa_disabled:e[`mfa-config-mfa-disabled`],session_duration:_(e[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},purpose_justification_prompt:_(e[`purpose-justification-prompt`],`purpose-justification-prompt`,`text`),purpose_justification_required:e[`purpose-justification-required`],session_duration:_(e[`session-duration`],`session-duration`,`text`),decision:e.decision,exclude:d(e.exclude,`exclude`),include:d(e.include,`include`),name:_(e.name,`name`,`text`),require:d(e.require,`require`)}),p=await l(`Updating`,async()=>n.send(O,{body:u,account_id:a,policy_id:e[`policy-id`]}));s(p,{successLabel:`Updated`})})},Un={command:`policies`,describe:`Operations for access.policies`,builder:e=>e.command(jn).command(Pn).command(Ln).command(Bn).command(Hn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var k={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/groups`,body:`json`};function Wn(e){return e.usage(`$0 zero-trust access rule-groups create
|
|
93
|
+
Updates a Access reusable policy.`).positional(`policy-id`,{type:`string`,description:`The UUID of the policy`,demandOption:!0}).option(`approval-groups`,{type:`string`,description:`Administrators who can approve a temporary authentication request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`approval-required`,{type:`boolean`,description:`Requires the user to request access from an administrator at the start of each session.`}).option(`connection-rules-rdp-allowed-clipboard-local-to-remote-formats`,{type:`string`,array:!0,description:`Clipboard formats allowed when copying from local machine to remote RDP session.`}).option(`connection-rules-rdp-allowed-clipboard-remote-to-local-formats`,{type:`string`,array:!0,description:`Clipboard formats allowed when copying from remote RDP session to local machine.`}).option(`isolation-required`,{type:`boolean`,description:`Require this application to be served in an isolated browser for users matching this policy. 'Client Web Isolation' must be on for the account in order to use this feature.`}).option(`mfa-config-allowed-authenticators`,{type:`string`,array:!0,description:`Lists the MFA methods that users can authenticate with.`}).option(`mfa-config-mfa-disabled`,{type:`boolean`,description:`Indicates whether to disable MFA for this resource. This option is available at the application and policy level.`}).option(`mfa-config-session-duration`,{type:`string`,description:"Defines the duration of an MFA session. Must be in minutes (m) or hours (h). Minimum: 0m. Maximum: 720h (30 days). Examples:`5m` or `24h`."}).option(`purpose-justification-prompt`,{type:`string`,description:`A custom message that will appear on the purpose justification screen.`}).option(`purpose-justification-required`,{type:`boolean`,description:`Require users to enter a justification when they log in to the application.`}).option(`session-duration`,{type:`string`,description:"The amount of time that tokens issued for the application will be valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h."}).option(`decision`,{type:`string`,description:`The action Access will take if a user matches this policy. Infrastructure application policies can only use the Allow action.`,choices:[`allow`,`deny`,`non_identity`,`bypass`]}).coerce(`decision`,e=>_(e,`decision`,`text`)).option(`exclude`,{type:`string`,description:`Rules evaluated with a NOT logical operator. To match the policy, a user cannot meet any of the Exclude rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`include`,{type:`string`,description:`Rules evaluated with an OR logical operator. A user needs to meet only one of the Include rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name of the Access policy.`}).option(`policy-resolution-account-id`,{type:`string`,description:`The account ID used to resolve policy resources and identity for cross-account WARP authentication. The account must be trusted by the account that owns this policy.`}).option(`require`,{type:`string`,description:`Rules evaluated with an AND logical operator. To match the policy, a user must meet all of the Require rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Hn={command:`update <policy-id>`,describe:`Update an Access reusable policy`,builder:Vn,handler:async e=>u({command:`zero-trust access policies update`,classification:{safeFlags:[`approval-required`,`isolation-required`,`mfa-config-mfa-disabled`,`purpose-justification-required`,`decision`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({approval_groups:d(e[`approval-groups`],`approval-groups`),approval_required:e[`approval-required`],connection_rules:{rdp:{allowed_clipboard_local_to_remote_formats:e[`connection-rules-rdp-allowed-clipboard-local-to-remote-formats`],allowed_clipboard_remote_to_local_formats:e[`connection-rules-rdp-allowed-clipboard-remote-to-local-formats`]}},isolation_required:e[`isolation-required`],mfa_config:{allowed_authenticators:e[`mfa-config-allowed-authenticators`],mfa_disabled:e[`mfa-config-mfa-disabled`],session_duration:_(e[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},purpose_justification_prompt:_(e[`purpose-justification-prompt`],`purpose-justification-prompt`,`text`),purpose_justification_required:e[`purpose-justification-required`],session_duration:_(e[`session-duration`],`session-duration`,`text`),decision:e.decision,exclude:d(e.exclude,`exclude`),include:d(e.include,`include`),name:_(e.name,`name`,`text`),policy_resolution_account_id:_(e[`policy-resolution-account-id`],`policy-resolution-account-id`,`text`),require:d(e.require,`require`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(O,{body:t,account_id:a,policy_id:e[`policy-id`]}));s(r,{successLabel:`Updated`});return}if(e.decision===void 0&&(e.decision=await b(`decision`,`The action Access will take if a user matches this policy. Infrastructure application policies can only use the Allow action.`,[`allow`,`deny`,`non_identity`,`bypass`])),e.include===void 0)throw Error(`--include is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`The name of the Access policy.`));let u=g({approval_groups:d(e[`approval-groups`],`approval-groups`),approval_required:e[`approval-required`],connection_rules:{rdp:{allowed_clipboard_local_to_remote_formats:e[`connection-rules-rdp-allowed-clipboard-local-to-remote-formats`],allowed_clipboard_remote_to_local_formats:e[`connection-rules-rdp-allowed-clipboard-remote-to-local-formats`]}},isolation_required:e[`isolation-required`],mfa_config:{allowed_authenticators:e[`mfa-config-allowed-authenticators`],mfa_disabled:e[`mfa-config-mfa-disabled`],session_duration:_(e[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},purpose_justification_prompt:_(e[`purpose-justification-prompt`],`purpose-justification-prompt`,`text`),purpose_justification_required:e[`purpose-justification-required`],session_duration:_(e[`session-duration`],`session-duration`,`text`),decision:e.decision,exclude:d(e.exclude,`exclude`),include:d(e.include,`include`),name:_(e.name,`name`,`text`),policy_resolution_account_id:_(e[`policy-resolution-account-id`],`policy-resolution-account-id`,`text`),require:d(e.require,`require`)}),p=await l(`Updating`,async()=>n.send(O,{body:u,account_id:a,policy_id:e[`policy-id`]}));s(p,{successLabel:`Updated`})})},Un={command:`policies`,describe:`Operations for access.policies`,builder:e=>e.command(jn).command(Pn).command(Ln).command(Bn).command(Hn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var k={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/groups`,body:`json`};function Wn(e){return e.usage(`$0 zero-trust access rule-groups create
|
|
94
94
|
|
|
95
95
|
Creates a new Access group.`).option(`exclude`,{type:`string`,description:`Rules evaluated with a NOT logical operator. To match a policy, a user cannot meet any of the Exclude rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`include`,{type:`string`,description:`Rules evaluated with an OR logical operator. A user needs to meet only one of the Include rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`is-default`,{type:`boolean`,description:`Whether this is the default group`}).option(`name`,{type:`string`,description:`The name of the Access group.`}).option(`require`,{type:`string`,description:`Rules evaluated with an AND logical operator. To match a policy, a user must meet all of the Require rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Gn={command:`create`,describe:`Create an Access group`,builder:Wn,handler:async e=>u({command:`zero-trust access rule-groups create`,classification:{safeFlags:[`is-default`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf zero-trust access rule-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/groups`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?g({exclude:d(e.exclude,`exclude`),include:d(e.include,`include`),is_default:e[`is-default`],name:_(e.name,`name`,`text`),require:d(e.require,`require`)}):f(e.body)});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,p=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=p:e.accountId=p,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(k,{body:t,account_or_zone:u,account_or_zone_id:p}));s(r,{successLabel:`Created`});return}if(e.include===void 0)throw Error(`--include is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`The name of the Access group.`));let m=g({exclude:d(e.exclude,`exclude`),include:d(e.include,`include`),is_default:e[`is-default`],name:_(e.name,`name`,`text`),require:d(e.require,`require`)}),h=await l(`Creating`,async()=>n.send(k,{body:m,account_or_zone:u,account_or_zone_id:p}));s(h,{successLabel:`Created`})})};var Kn={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/groups/${t.group_id}`};function qn(e){return e.usage(`$0 zero-trust access rule-groups delete <group-id>
|
|
96
96
|
|
|
@@ -156,9 +156,9 @@ Removes a single infrastructure access target by its ID.`).positional(`target-id
|
|
|
156
156
|
|
|
157
157
|
Fetches a single infrastructure access target by its ID.`).positional(`target-id`,{type:`string`,description:`Target identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bi={command:`get <target-id>`,describe:`Get target`,builder:yi,handler:async e=>u({command:`zero-trust access targets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access targets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/infrastructure/targets/${e[`target-id`]==null?`<target-id>`:encodeURIComponent(String(e[`target-id`]))}`,pathParams:{"target-id":String(e[`target-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(vi,{account_id:a,target_id:e[`target-id`]}));s(u,{successLabel:`Loaded`})})};var xi={method:`GET`,path:t=>e`/accounts/${t.account_id}/infrastructure/targets`,query:[`hostname`,`hostname_contains`,`virtual_network_id`,`ip_v4`,`ip_v6`,`created_before`,`created_after`,`modified_before`,`modified_after`,`ips`,`target_ids`,`ip_like`,`ipv4_start`,`ipv4_end`,`ipv6_start`,`ipv6_end`,`tag`,`page`,`per_page`,`order`,`direction`]};function Si(e){return e.usage(`$0 zero-trust access targets list
|
|
158
158
|
|
|
159
|
-
Lists and sorts an account's targets. Filters are optional and are ANDed together.`).option(`hostname`,{type:`string`,description:`Hostname of a target`}).option(`hostname-contains`,{type:`string`,description:`Partial match to the hostname of a target`}).option(`virtual-network-id`,{type:`string`,description:`Private virtual network identifier of the target`}).option(`ip-v4`,{type:`string`,description:`IPv4 address of the target`}).option(`ip-v6`,{type:`string`,description:`IPv6 address of the target`}).option(`created-before`,{type:`string`,description:`Date and time at which the target was created before (inclusive)`}).option(`created-after`,{type:`string`,description:`Date and time at which the target was created after (inclusive)`}).option(`modified-before`,{type:`string`,description:`Date and time at which the target was modified before (inclusive)`}).option(`modified-after`,{type:`string`,description:`Date and time at which the target was modified after (inclusive)`}).option(`ips`,{type:`string`,description:"Filters for targets that have any of the following IP addresses. Specify\n`ips` multiple times in query parameter to build list of candidates."}).option(`target-ids`,{type:`string`,description:`Filters for targets that have any of the following UUIDs. Specify
|
|
159
|
+
Lists and sorts an account's targets. Filters are optional and are ANDed together.`).option(`hostname`,{type:`string`,description:`Hostname of a target`}).option(`hostname-contains`,{type:`string`,description:`Partial match to the hostname of a target`}).option(`virtual-network-id`,{type:`string`,description:`Private virtual network identifier of the target`}).option(`ip-v4`,{type:`string`,description:`IPv4 address of the target`}).option(`ip-v6`,{type:`string`,description:`IPv6 address of the target`}).option(`created-before`,{type:`string`,description:`Date and time at which the target was created before (inclusive)`}).option(`created-after`,{type:`string`,description:`Date and time at which the target was created after (inclusive)`}).option(`modified-before`,{type:`string`,description:`Date and time at which the target was modified before (inclusive)`}).option(`modified-after`,{type:`string`,description:`Date and time at which the target was modified after (inclusive)`}).option(`ips`,{type:`string`,array:!0,description:"Filters for targets that have any of the following IP addresses. Specify\n`ips` multiple times in query parameter to build list of candidates."}).option(`target-ids`,{type:`string`,array:!0,description:`Filters for targets that have any of the following UUIDs. Specify
|
|
160
160
|
\`target_ids\` multiple times in query parameter to build list of
|
|
161
|
-
candidates.`}).option(`ip-like`,{type:`string`,description:"Filters for targets whose IP addresses look like the specified string.\nSupports `*` as a wildcard character"}).option(`ipv4-start`,{type:`string`,description:"Defines an IPv4 filter range's starting value (inclusive). Requires\n`ipv4_end` to be specified as well."}).option(`ipv4-end`,{type:`string`,description:"Defines an IPv4 filter range's ending value (inclusive). Requires\n`ipv4_start` to be specified as well."}).option(`ipv6-start`,{type:`string`,description:"Defines an IPv6 filter range's starting value (inclusive). Requires\n`ipv6_end` to be specified as well."}).option(`ipv6-end`,{type:`string`,description:"Defines an IPv6 filter range's ending value (inclusive). Requires\n`ipv6_start` to be specified as well."}).option(`tag`,{type:`string`,description:"Filter by tag key:value pairs. Multiple `tag` params are AND'd.\nFormat: `tag=key:value` (e.g., `tag=environment:production`).\nKey and value must both be non-empty; `tag=:value` and `tag=key:` return 400."}).option(`page`,{type:`number`,description:`Current page in the response`}).option(`per-page`,{type:`number`,description:`Max amount of entries returned per page`}).option(`order`,{type:`string`,description:`The field to sort by.`,choices:[`hostname`,`created_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ci={command:`list`,describe:`List all targets`,builder:Si,handler:async e=>u({command:`zero-trust access targets list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let n={hostname:e.hostname,hostname_contains:e[`hostname-contains`],virtual_network_id:e[`virtual-network-id`],ip_v4:e[`ip-v4`],ip_v6:e[`ip-v6`],created_before:e[`created-before`],created_after:e[`created-after`],modified_before:e[`modified-before`],modified_after:e[`modified-after`],ips:e.ips,target_ids:e[`target-ids`],ip_like:e[`ip-like`],ipv4_start:e[`ipv4-start`],ipv4_end:e[`ipv4-end`],ipv6_start:e[`ipv6-start`],ipv6_end:e[`ipv6-end`],tag:e.tag,page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();c({command:`cf zero-trust access targets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/infrastructure/targets`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(xi,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var B={method:`PUT`,path:t=>e`/accounts/${t.account_id}/infrastructure/targets/${t.target_id}`,body:`json`};function wi(e){return e.usage(`$0 zero-trust access targets update <target-id>
|
|
161
|
+
candidates.`}).option(`ip-like`,{type:`string`,description:"Filters for targets whose IP addresses look like the specified string.\nSupports `*` as a wildcard character"}).option(`ipv4-start`,{type:`string`,description:"Defines an IPv4 filter range's starting value (inclusive). Requires\n`ipv4_end` to be specified as well."}).option(`ipv4-end`,{type:`string`,description:"Defines an IPv4 filter range's ending value (inclusive). Requires\n`ipv4_start` to be specified as well."}).option(`ipv6-start`,{type:`string`,description:"Defines an IPv6 filter range's starting value (inclusive). Requires\n`ipv6_end` to be specified as well."}).option(`ipv6-end`,{type:`string`,description:"Defines an IPv6 filter range's ending value (inclusive). Requires\n`ipv6_start` to be specified as well."}).option(`tag`,{type:`string`,array:!0,description:"Filter by tag key:value pairs. Multiple `tag` params are AND'd.\nFormat: `tag=key:value` (e.g., `tag=environment:production`).\nKey and value must both be non-empty; `tag=:value` and `tag=key:` return 400."}).option(`page`,{type:`number`,description:`Current page in the response`}).option(`per-page`,{type:`number`,description:`Max amount of entries returned per page`}).option(`order`,{type:`string`,description:`The field to sort by.`,choices:[`hostname`,`created_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ci={command:`list`,describe:`List all targets`,builder:Si,handler:async e=>u({command:`zero-trust access targets list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let n={hostname:e.hostname,hostname_contains:e[`hostname-contains`],virtual_network_id:e[`virtual-network-id`],ip_v4:e[`ip-v4`],ip_v6:e[`ip-v6`],created_before:e[`created-before`],created_after:e[`created-after`],modified_before:e[`modified-before`],modified_after:e[`modified-after`],ips:e.ips,target_ids:e[`target-ids`],ip_like:e[`ip-like`],ipv4_start:e[`ipv4-start`],ipv4_end:e[`ipv4-end`],ipv6_start:e[`ipv6-start`],ipv6_end:e[`ipv6-end`],tag:e.tag,page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();c({command:`cf zero-trust access targets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/infrastructure/targets`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(xi,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var B={method:`PUT`,path:t=>e`/accounts/${t.account_id}/infrastructure/targets/${t.target_id}`,body:`json`};function wi(e){return e.usage(`$0 zero-trust access targets update <target-id>
|
|
162
162
|
|
|
163
163
|
Updates an existing infrastructure access target by its ID.`).positional(`target-id`,{type:`string`,description:`Target identifier`,demandOption:!0}).option(`hostname`,{type:`string`,description:`A non-unique field that refers to a target. Case insensitive, maximum
|
|
164
164
|
length of 255 characters, supports the use of special characters dash
|
|
@@ -234,7 +234,7 @@ Delete an existing custom finding type. **Security**: Only custom finding types
|
|
|
234
234
|
|
|
235
235
|
Retrieve a specific finding type by its unique identifier.`).positional(`finding-type-id`,{type:`string`,description:`A UUID string identifying the finding type.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bo={command:`get <finding-type-id>`,describe:`Get finding by ID`,builder:yo,handler:async e=>u({command:`zero-trust casb finding-types get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb finding-types get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/finding_types/${e[`finding-type-id`]==null?`<finding-type-id>`:encodeURIComponent(String(e[`finding-type-id`]))}`,pathParams:{"finding-type-id":String(e[`finding-type-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(vo,{account_id:a,finding_type_id:e[`finding-type-id`]}));s(u,{successLabel:`Loaded`})})};var xo={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types`,query:[`page`,`per_page`,`vendors`,`types`,`origins`,`severities`,`search`,`quarantined`,`min_updated_at`,`max_updated_at`,`order`,`direction`],joined:[`vendors`,`types`,`origins`,`severities`],errors:{400:`BadRequestError`,403:`ForbiddenError`,429:`TooManyRequestsError`}};function So(e){return e.usage(`$0 zero-trust casb finding-types list
|
|
236
236
|
|
|
237
|
-
List all available finding types with pagination support.`).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`vendors`,{type:`string`,description:`Filter finding types by vendor. Supports multiple comma-separated values. Each value may be either the vendor enum (GOOGLE_WORKSPACE) or the friendly name returned by the read routes (Google Workspace).`}).option(`types`,{type:`string`,description:`Filter finding types by category type. Supports multiple comma-separated, case-insensitive values.`}).option(`origins`,{type:`string`,description:`Filter finding types by origin. Supports multiple comma-separated, case-insensitive values.`}).option(`severities`,{type:`string`,description:`Filter finding types by severity. Supports multiple comma-separated, case-insensitive values.`}).option(`search`,{type:`string`,description:`Filter finding types by name or ID (case-insensitive substring match).`}).option(`quarantined`,{type:`boolean`,description:`When true, return only quarantined finding types; when false, return only non-quarantined finding types. Omit to return both.`}).option(`min-updated-at`,{type:`string`,description:`Return only finding types updated at or after this RFC 3339 timestamp (inclusive).`}).option(`max-updated-at`,{type:`string`,description:`Return only finding types updated at or before this RFC 3339 timestamp (inclusive).`}).option(`order`,{type:`string`,description:`Field to sort by (case-insensitive). Defaults to 'created'.
|
|
237
|
+
List all available finding types with pagination support.`).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`vendors`,{type:`string`,array:!0,description:`Filter finding types by vendor. Supports multiple comma-separated values. Each value may be either the vendor enum (GOOGLE_WORKSPACE) or the friendly name returned by the read routes (Google Workspace).`}).option(`types`,{type:`string`,array:!0,description:`Filter finding types by category type. Supports multiple comma-separated, case-insensitive values.`}).option(`origins`,{type:`string`,array:!0,description:`Filter finding types by origin. Supports multiple comma-separated, case-insensitive values.`}).option(`severities`,{type:`string`,array:!0,description:`Filter finding types by severity. Supports multiple comma-separated, case-insensitive values.`}).option(`search`,{type:`string`,description:`Filter finding types by name or ID (case-insensitive substring match).`}).option(`quarantined`,{type:`boolean`,description:`When true, return only quarantined finding types; when false, return only non-quarantined finding types. Omit to return both.`}).option(`min-updated-at`,{type:`string`,description:`Return only finding types updated at or after this RFC 3339 timestamp (inclusive).`}).option(`max-updated-at`,{type:`string`,description:`Return only finding types updated at or before this RFC 3339 timestamp (inclusive).`}).option(`order`,{type:`string`,description:`Field to sort by (case-insensitive). Defaults to 'created'.
|
|
238
238
|
Name and vendor sorting is case-insensitive; vendor uses friendly provider names.
|
|
239
239
|
Ascending order: type Content then Posture; origin custom then system;
|
|
240
240
|
severity Low, Medium, High, Critical.`,choices:[`created`,`updated`,`match_count`,`name`,`vendor`,`type`,`origin`,`severity`]}).option(`direction`,{type:`string`,description:`Sort direction for the primary field. Defaults to 'desc'.
|
|
@@ -253,9 +253,9 @@ Archive one or more finding instances.`).positional(`finding-id`,{type:`string`,
|
|
|
253
253
|
Gets a security Finding instance by id.`).positional(`instance-id`,{type:`string`,description:`A uuid ID identifying this Finding instance.`,demandOption:!0}).option(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response.\nIt is a base64-encoded identifier.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ko={command:`get <instance-id>`,describe:`Get a finding instance using an instance ID`,builder:Go,handler:async e=>u({command:`zero-trust casb findings instances get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings instances get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(e[`finding-id`]))}/instances/${e[`instance-id`]==null?`<instance-id>`:encodeURIComponent(String(e[`instance-id`]))}`,pathParams:{"finding-id":String(e[`finding-id`]??``),"instance-id":String(e[`instance-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Wo,{account_id:a,finding_id:e[`finding-id`],instance_id:e[`instance-id`]}));s(u,{successLabel:`Loaded`})})};var qo={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}/instances`,query:[`archived`,`cursor`,`direction`,`max_affliction_date`,`min_affliction_date`,`order`,`page`,`per_page`,`search`,`remediation_statuses`,`finding_instance_ids`,`asset_ids`],joined:[`remediation_statuses`],errors:{400:`BadRequestError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Jo(e){return e.usage(`$0 zero-trust casb findings instances list
|
|
254
254
|
|
|
255
255
|
Lists all security finding instances for a given security finding.`).option(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response.\nIt is a base64-encoded identifier.",demandOption:!0}).option(`archived`,{type:`boolean`,description:`Archived`}).option(`cursor`,{type:`string`,description:"A cursor for pagination. Obtained from the `result_info.cursor` field of a previous response."}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`max-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or before the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view findings that occurred on or after the affliction date. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`order`,{type:`string`,description:`Which field to use when ordering the Finding's instances.
|
|
256
|
-
When ordering by 'remediation.status', only the most recent non-stale remediation job is considered. Stale jobs (created before the instance's affliction_date) are treated as having no status for ordering purposes.`,choices:[`affliction_date`,`asset.name`,`remediation.status`]}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`remediation-statuses`,{type:`string`,description:`Filter finding instances by most recent remediation job status. Supports multiple comma-separated values.
|
|
256
|
+
When ordering by 'remediation.status', only the most recent non-stale remediation job is considered. Stale jobs (created before the instance's affliction_date) are treated as having no status for ordering purposes.`,choices:[`affliction_date`,`asset.name`,`remediation.status`]}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`remediation-statuses`,{type:`string`,array:!0,description:`Filter finding instances by most recent remediation job status. Supports multiple comma-separated values.
|
|
257
257
|
Use 'none' to filter instances with no remediation jobs or instances where the most recent job is stale.
|
|
258
|
-
Note: Stale jobs (created before the instance's affliction_date) are ignored for filtering purposes, but are still included in the 'remediations' array with stale=true.`}).option(`finding-instance-ids`,{type:`string`,description:`Filter finding instances by an array of finding instance IDs. Supports multiple comma-separated values.`}).option(`asset-ids`,{type:`string`,description:`Filter finding instances by an array of asset IDs. Supports multiple comma-separated values.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Yo={command:`list`,describe:`List instances of a finding`,builder:Jo,handler:async e=>u({command:`zero-trust casb findings instances list`,classification:{safeFlags:[`archived`,`direction`,`order`,`dry-run`]}},e,async()=>{let n={archived:e.archived,cursor:e.cursor,direction:e.direction,max_affliction_date:e[`max-affliction-date`],min_affliction_date:e[`min-affliction-date`],order:e.order,page:e.page,per_page:e[`per-page`],search:e.search,remediation_statuses:e[`remediation-statuses`],finding_instance_ids:e[`finding-instance-ids`],asset_ids:e[`asset-ids`]};if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings instances list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(e[`finding-id`]))}/instances`,pathParams:{"finding-id":String(e[`finding-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(qo,{account_id:u,finding_id:e[`finding-id`],...n}));s(d,{successLabel:`Loaded`})})};var Xo={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}/instances/unarchive`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Zo(e){return e.usage(`$0 zero-trust casb findings instances unarchive <finding-id>
|
|
258
|
+
Note: Stale jobs (created before the instance's affliction_date) are ignored for filtering purposes, but are still included in the 'remediations' array with stale=true.`}).option(`finding-instance-ids`,{type:`string`,array:!0,description:`Filter finding instances by an array of finding instance IDs. Supports multiple comma-separated values.`}).option(`asset-ids`,{type:`string`,array:!0,description:`Filter finding instances by an array of asset IDs. Supports multiple comma-separated values.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Yo={command:`list`,describe:`List instances of a finding`,builder:Jo,handler:async e=>u({command:`zero-trust casb findings instances list`,classification:{safeFlags:[`archived`,`direction`,`order`,`dry-run`]}},e,async()=>{let n={archived:e.archived,cursor:e.cursor,direction:e.direction,max_affliction_date:e[`max-affliction-date`],min_affliction_date:e[`min-affliction-date`],order:e.order,page:e.page,per_page:e[`per-page`],search:e.search,remediation_statuses:e[`remediation-statuses`],finding_instance_ids:e[`finding-instance-ids`],asset_ids:e[`asset-ids`]};if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings instances list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(e[`finding-id`]))}/instances`,pathParams:{"finding-id":String(e[`finding-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(qo,{account_id:u,finding_id:e[`finding-id`],...n}));s(d,{successLabel:`Loaded`})})};var Xo={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}/instances/unarchive`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Zo(e){return e.usage(`$0 zero-trust casb findings instances unarchive <finding-id>
|
|
259
259
|
|
|
260
260
|
Remove the archive marking from one or more finding instances.`).positional(`finding-id`,{type:`string`,description:"The `id` of a finding, as returned in each item of the List posture findings response. It is a base64-encoded identifier.",demandOption:!0}).option(`check-instances`,{type:`string`,array:!0,description:`A list of finding instance IDs to pass along.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for bulk actions on finding instances.`})}const Qo={command:`unarchive <finding-id>`,describe:`Remove the archive marking from a finding instance`,builder:Zo,handler:async e=>u({command:`zero-trust casb findings instances unarchive`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings instances unarchive`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(e[`finding-id`]))}/instances/unarchive`,pathParams:{"finding-id":String(e[`finding-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({check_instances:e[`check-instances`]}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(Xo,{body:t,account_id:a,finding_id:e[`finding-id`]}));s(r,{successLabel:`Created`});return}if(e[`check-instances`]===void 0)throw Error(`--check-instances is required (or pass --body with this field set).`);let u=g({check_instances:e[`check-instances`]}),d=await l(`Creating`,async()=>n.send(Xo,{body:u,account_id:a,finding_id:e[`finding-id`]}));s(d,{successLabel:`Created`})})},$o={command:`instances`,describe:`Operations for casb.findings.instances`,builder:e=>e.command(Vo).command(Uo).command(Ko).command(Yo).command(Qo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var es={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings`,query:[`cursor`,`direction`,`ignored`,`integration_id`,`max_affliction_date`,`min_affliction_date`,`observation`,`order`,`page`,`per_page`,`product`,`search`,`severity`,`type`,`vendor`,`finding_type_ids`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`}};function ts(e){return e.usage(`$0 zero-trust casb findings list
|
|
261
261
|
|
|
@@ -293,7 +293,7 @@ Updates an existing policy configuration and replaces its actions.`).positional(
|
|
|
293
293
|
|
|
294
294
|
Create one or more remediation jobs tied to a specific Cloudflare Account.`).option(`finding-instance-ids`,{type:`string`,array:!0,description:`UUIDs identifying Finding Instances.`}).option(`remediation-type-id`,{type:`string`,description:`A UUID identifying this Remediation Type.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating remediation jobs.`})}const Zs={command:`create`,describe:`Creates remediation jobs`,builder:Xs,handler:async e=>u({command:`zero-trust casb remediations jobs create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb remediations jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/remediations/jobs`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({finding_instance_ids:e[`finding-instance-ids`],remediation_type_id:_(e[`remediation-type-id`],`remediation-type-id`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(Ys,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`finding-instance-ids`]===void 0)throw Error(`--finding-instance-ids is required (or pass --body with this field set).`);e[`remediation-type-id`]===void 0&&(e[`remediation-type-id`]=await y(`remediation-type-id`,`A UUID identifying this Remediation Type.`));let u=g({finding_instance_ids:e[`finding-instance-ids`],remediation_type_id:_(e[`remediation-type-id`],`remediation-type-id`,`text`)}),d=await l(`Creating`,async()=>n.send(Ys,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Qs={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/remediations/jobs/export`,body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function $s(e){return e.usage(`$0 zero-trust casb remediations jobs export
|
|
295
295
|
|
|
296
|
-
Creates a CSV export for remediation jobs and accepts optional filters in the payload.`).option(`integration-id`,{type:`string`,array:!0,description:`Filter by multiple integration IDs.`}).option(`max-updated-at`,{type:`string`,description:`Filter to view remediation jobs updated on or before this datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-updated-at`,{type:`string`,description:`Filter to view remediation jobs updated on or after this datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`orders`,{type:`string`,description:`Ordering specifications for the export. Provide as a JSON array of objects or @path/to/file.json.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`status`,{type:`string`,array:!0,description:`Filter by remediation job status.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter specification for remediation jobs export.`})}const ec={command:`export`,describe:`Create a remediation jobs export`,builder:$s,handler:async e=>u({command:`zero-trust casb remediations jobs export`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb remediations jobs export`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/remediations/jobs/export`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({integration_id:e[`integration-id`],max_updated_at:_(e[`max-updated-at`],`max-updated-at`,`text`),min_updated_at:_(e[`min-updated-at`],`min-updated-at`,`text`),orders:d(e.orders,`orders`),search:_(e.search,`search`,`text`),status:e.status}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Loading`,async()=>n.send(Qs,{body:t,account_id:a}));s(r,{successLabel:`Loaded`});return}let u=g({integration_id:e[`integration-id`],max_updated_at:_(e[`max-updated-at`],`max-updated-at`,`text`),min_updated_at:_(e[`min-updated-at`],`min-updated-at`,`text`),orders:d(e.orders,`orders`),search:_(e.search,`search`,`text`),status:e.status}),p=await l(`Loading`,async()=>n.send(Qs,{body:u,account_id:a}));s(p,{successLabel:`Loaded`})})};var tc={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/remediations/jobs`,query:[`cursor`,`page`,`per_page`,`search`,`min_updated_at`,`max_updated_at`,`status`,`triggered_by_actor`,`integration_id`,`order`,`direction`],joined:[`triggered_by_actor`],errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function nc(e){return e.usage("$0 zero-trust casb remediations jobs list\n\nList all remediation jobs tied to a specific Cloudflare Account. Note that `cursor` and `page` are mutually exclusive.").option(`cursor`,{type:`string`,description:`A cursor for pagination.`}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`min-updated-at`,{type:`string`,description:`Filter to view remediations updated on or after the min updated datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`max-updated-at`,{type:`string`,description:`Filter to view remediations updated on or before the max updated datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`status`,{type:`string`,description:`Filter to view remediations with the given status.`,choices:[`pending`,`processing`,`completed`,`failed`,`validating`]}).option(`triggered-by-actor`,{type:`string`,description:`Filter remediations by what kind of actor triggered them. Supports multiple comma-separated values.`}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).option(`order`,{type:`string`,description:`An optional param to sort the results by the given field.`,choices:[`created_at`,`affliction_date`,`integration_name`,`status`,`last_updated_at`,`asset_name`,`finding_type_name`]}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rc={command:`list`,describe:`List remediation jobs`,builder:nc,handler:async e=>u({command:`zero-trust casb remediations jobs list`,classification:{safeFlags:[`status`,`order`,`direction`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,page:e.page,per_page:e[`per-page`],search:e.search,min_updated_at:e[`min-updated-at`],max_updated_at:e[`max-updated-at`],status:e.status,triggered_by_actor:e[`triggered-by-actor`],integration_id:e[`integration-id`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb remediations jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/remediations/jobs`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(tc,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},ic={command:`jobs`,describe:`Operations for casb.remediations.jobs`,builder:e=>e.command(Zs).command(ec).command(rc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ac={command:`remediations`,describe:`Operations for casb.remediations`,builder:e=>e.command(ic).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oc={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,422:`UnprocessableEntityError`,429:`TooManyRequestsError`}};function sc(e){return e.usage(`$0 zero-trust casb webhooks create
|
|
296
|
+
Creates a CSV export for remediation jobs and accepts optional filters in the payload.`).option(`integration-id`,{type:`string`,array:!0,description:`Filter by multiple integration IDs.`}).option(`max-updated-at`,{type:`string`,description:`Filter to view remediation jobs updated on or before this datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`min-updated-at`,{type:`string`,description:`Filter to view remediation jobs updated on or after this datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`orders`,{type:`string`,description:`Ordering specifications for the export. Provide as a JSON array of objects or @path/to/file.json.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`status`,{type:`string`,array:!0,description:`Filter by remediation job status.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter specification for remediation jobs export.`})}const ec={command:`export`,describe:`Create a remediation jobs export`,builder:$s,handler:async e=>u({command:`zero-trust casb remediations jobs export`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb remediations jobs export`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/remediations/jobs/export`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({integration_id:e[`integration-id`],max_updated_at:_(e[`max-updated-at`],`max-updated-at`,`text`),min_updated_at:_(e[`min-updated-at`],`min-updated-at`,`text`),orders:d(e.orders,`orders`),search:_(e.search,`search`,`text`),status:e.status}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Loading`,async()=>n.send(Qs,{body:t,account_id:a}));s(r,{successLabel:`Loaded`});return}let u=g({integration_id:e[`integration-id`],max_updated_at:_(e[`max-updated-at`],`max-updated-at`,`text`),min_updated_at:_(e[`min-updated-at`],`min-updated-at`,`text`),orders:d(e.orders,`orders`),search:_(e.search,`search`,`text`),status:e.status}),p=await l(`Loading`,async()=>n.send(Qs,{body:u,account_id:a}));s(p,{successLabel:`Loaded`})})};var tc={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/remediations/jobs`,query:[`cursor`,`page`,`per_page`,`search`,`min_updated_at`,`max_updated_at`,`status`,`triggered_by_actor`,`integration_id`,`order`,`direction`],joined:[`triggered_by_actor`],errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function nc(e){return e.usage("$0 zero-trust casb remediations jobs list\n\nList all remediation jobs tied to a specific Cloudflare Account. Note that `cursor` and `page` are mutually exclusive.").option(`cursor`,{type:`string`,description:`A cursor for pagination.`}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`search`,{type:`string`,description:`A search term.`}).option(`min-updated-at`,{type:`string`,description:`Filter to view remediations updated on or after the min updated datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`max-updated-at`,{type:`string`,description:`Filter to view remediations updated on or before the max updated datetime. Can be a date-time in ISO 8601 format or an epoch timestamp.`}).option(`status`,{type:`string`,description:`Filter to view remediations with the given status.`,choices:[`pending`,`processing`,`completed`,`failed`,`validating`]}).option(`triggered-by-actor`,{type:`string`,array:!0,description:`Filter remediations by what kind of actor triggered them. Supports multiple comma-separated values.`}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).option(`order`,{type:`string`,description:`An optional param to sort the results by the given field.`,choices:[`created_at`,`affliction_date`,`integration_name`,`status`,`last_updated_at`,`asset_name`,`finding_type_name`]}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rc={command:`list`,describe:`List remediation jobs`,builder:nc,handler:async e=>u({command:`zero-trust casb remediations jobs list`,classification:{safeFlags:[`status`,`order`,`direction`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,page:e.page,per_page:e[`per-page`],search:e.search,min_updated_at:e[`min-updated-at`],max_updated_at:e[`max-updated-at`],status:e.status,triggered_by_actor:e[`triggered-by-actor`],integration_id:e[`integration-id`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb remediations jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/remediations/jobs`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(tc,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},ic={command:`jobs`,describe:`Operations for casb.remediations.jobs`,builder:e=>e.command(Zs).command(ec).command(rc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ac={command:`remediations`,describe:`Operations for casb.remediations`,builder:e=>e.command(ic).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oc={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,422:`UnprocessableEntityError`,429:`TooManyRequestsError`}};function sc(e){return e.usage(`$0 zero-trust casb webhooks create
|
|
297
297
|
|
|
298
298
|
Creates a new webhook configuration for sending finding notifications to external endpoints.`).option(`authentication-type`,{type:`string`,description:`Type of authentication used for the webhook.`,choices:[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`]}).coerce(`authentication-type`,e=>_(e,`authentication-type`,`text`)).option(`destination-url`,{type:`string`,description:`Target URL for the webhook configuration. Where resulting data will be sent.`}).option(`headers`,{type:`string`,description:`List of custom headers to include in webhook requests. Provide as a JSON array of objects or @path/to/file.json.`}).option(`label`,{type:`string`,description:`Account-specified display label for the webhook configuration.`}).option(`signing-secret`,{type:`string`,description:`Secret key used for HMAC signing when authentication_type is "HMAC-Signing".`}).option(`status`,{type:`string`,description:`Status of the webhook configuration. Defaults to enabled when omitted.`,choices:[`enabled`,`disabled`],default:`enabled`}).coerce(`status`,e=>_(e,`status`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating a new webhook configuration.`})}const cc={command:`create`,describe:`Create a new webhook configuration`,builder:sc,handler:async e=>u({command:`zero-trust casb webhooks create`,classification:{safeFlags:[`authentication-type`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb webhooks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({authentication_type:e[`authentication-type`],destination_url:_(e[`destination-url`],`destination-url`,`text`),headers:d(e.headers,`headers`),label:_(e.label,`label`,`text`),signing_secret:_(e[`signing-secret`],`signing-secret`,`text`),status:e.status}):f(e.body),sensitiveBodyPaths:[[`signing_secret`]]});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(oc,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`authentication-type`]===void 0&&(e[`authentication-type`]=await b(`authentication-type`,`Type of authentication used for the webhook.`,[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`])),e[`destination-url`]===void 0&&(e[`destination-url`]=await y(`destination-url`,`Target URL for the webhook configuration. Where resulting data will be sent.`)),e.label===void 0&&(e.label=await y(`label`,`Account-specified display label for the webhook configuration.`));let u=g({authentication_type:e[`authentication-type`],destination_url:_(e[`destination-url`],`destination-url`,`text`),headers:d(e.headers,`headers`),label:_(e.label,`label`,`text`),signing_secret:_(e[`signing-secret`],`signing-secret`,`text`),status:e.status}),p=await l(`Creating`,async()=>n.send(oc,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var lc={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks/${t.webhook_id}`,errors:{400:`BadRequestError`,409:`ConflictError`,429:`TooManyRequestsError`}};function uc(e){return e.usage(`$0 zero-trust casb webhooks delete <webhook-id>
|
|
299
299
|
|
|
@@ -455,7 +455,7 @@ Lists WARP Device IP profiles.`).option(`page`,{type:`number`,description:`The p
|
|
|
455
455
|
|
|
456
456
|
Updates a WARP Device IP profile. Currently, only IPv4 Device subnets can be associated.`).positional(`profile-id`,{type:`string`,description:`Profile ID`,demandOption:!0}).option(`description`,{type:`string`,description:`An optional description of the Device IP profile.`}).option(`enabled`,{type:`boolean`,description:`Whether the Device IP profile is enabled.`}).option(`match`,{type:`string`,description:`The wirefilter expression to match registrations. Available values: "identity.name", "identity.email", "identity.groups.id", "identity.groups.name", "identity.groups.email", "identity.saml_attributes".`}).option(`name`,{type:`string`,description:`A user-friendly name for the Device IP profile.`}).option(`precedence`,{type:`number`,description:`The precedence of the Device IP profile. Lower values indicate higher precedence. Device IP profile will be evaluated in ascending order of this field.`}).option(`subnet-id`,{type:`string`,description:`The ID of the Subnet.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Xf={command:`update <profile-id>`,describe:`Update IP profile`,builder:Yf,handler:async e=>u({command:`zero-trust devices ip-profiles update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices ip-profiles update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/ip-profiles/${e[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(e[`profile-id`]))}`,pathParams:{"profile-id":String(e[`profile-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),enabled:e.enabled,match:_(e.match,`match`,`text`),name:_(e.name,`name`,`text`),precedence:e.precedence,subnet_id:_(e[`subnet-id`],`subnet-id`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(Jf,{body:t,account_id:a,profile_id:e[`profile-id`]}));s(r,{successLabel:`Updated`});return}let u=g({description:_(e.description,`description`,`text`),enabled:e.enabled,match:_(e.match,`match`,`text`),name:_(e.name,`name`,`text`),precedence:e.precedence,subnet_id:_(e[`subnet-id`],`subnet-id`,`text`)}),d=await l(`Updating`,async()=>n.send(Jf,{body:u,account_id:a,profile_id:e[`profile-id`]}));s(d,{successLabel:`Updated`})})},Zf={command:`ip-profiles`,describe:`Operations for devices.ip-profiles`,builder:e=>e.command(Rf).command(Vf).command(Wf).command(qf).command(Xf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Qf={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/physical-devices`,query:[`cursor`,`sort_by`,`sort_order`,`last_seen_user.email`,`seen_after`,`seen_before`,`per_page`,`search`,`active_registrations`,`has_registration_type`,`id`,`tag`,`last_seen_registration.policy.id`,`include`],joined:[`cursor`,`sort_by`,`sort_order`,`last_seen_user.email`,`seen_after`,`seen_before`,`per_page`,`search`,`active_registrations`,`has_registration_type`,`last_seen_registration.policy.id`]};function $f(e){return e.usage(`$0 zero-trust devices list
|
|
457
457
|
|
|
458
|
-
Lists WARP devices.`).option(`cursor`,{type:`string`,description:`Opaque token indicating the starting position when requesting the next set of records. A cursor value can be obtained from the result_info.cursor field in the response.`}).option(`sort-by`,{type:`string`,description:`The device field to order results by.`,choices:[`name`,`id`,`client_version`,`last_seen_user.email`,`last_seen_at`,`active_registrations`,`created_at`]}).option(`sort-order`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`last-seen-user-email`,{type:`string`,description:`Filter by the last seen user's email.`}).option(`seen-after`,{type:`string`,description:`Filter by the last_seen timestamp - returns only devices last seen after this timestamp.`}).option(`seen-before`,{type:`string`,description:`Filter by the last_seen timestamp - returns only devices last seen before this timestamp.`}).option(`per-page`,{type:`number`,description:`The maximum number of devices to return in a single response.`}).option(`search`,{type:`string`,description:`Search by device details.`}).option(`active-registrations`,{type:`string`,description:`Include or exclude devices with active registrations. The default is "only" - return only devices with active registrations.`,choices:[`include`,`only`,`exclude`]}).option(`has-registration-type`,{type:`string`,description:`Filter by the type of active registration associated with the device.`,choices:[`warp`,`browser_extension`]}).option(`id`,{type:`string`,description:`Filter by a one or more device IDs.`}).option(`tag`,{type:`string`,description:`Filter by one or more device tags in key:value format. Devices must match all provided tags.`}).option(`last-seen-registration-policy-id`,{type:`string`,description:`Filter by the ID of the device settings profile assigned to the device registration.`}).option(`include`,{type:`string`,description:`Comma-separated list of additional information that should be included in the device response. Supported values are: "last_seen_registration.policy".`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ep={command:`list`,describe:`List devices`,builder:$f,handler:async e=>u({command:`zero-trust devices list`,classification:{safeFlags:[`sort-by`,`sort-order`,`active-registrations`,`has-registration-type`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,sort_by:e[`sort-by`],sort_order:e[`sort-order`],"last_seen_user.email":e[`last-seen-user-email`],seen_after:e[`seen-after`],seen_before:e[`seen-before`],per_page:e[`per-page`],search:e.search,active_registrations:e[`active-registrations`],has_registration_type:e[`has-registration-type`],id:e.id,tag:e.tag,"last_seen_registration.policy.id":e[`last-seen-registration-policy-id`],include:e.include};if(e.dryRun){let e=await i();c({command:`cf zero-trust devices list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/physical-devices`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Qf,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var tp={method:`POST`,path:t=>e`/accounts/${t.account_id}/devices/networks`,body:`json`,constants:{type:`tls`}};function np(e){return e.usage(`$0 zero-trust devices networks create
|
|
458
|
+
Lists WARP devices.`).option(`cursor`,{type:`string`,description:`Opaque token indicating the starting position when requesting the next set of records. A cursor value can be obtained from the result_info.cursor field in the response.`}).option(`sort-by`,{type:`string`,description:`The device field to order results by.`,choices:[`name`,`id`,`client_version`,`last_seen_user.email`,`last_seen_at`,`active_registrations`,`created_at`]}).option(`sort-order`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`last-seen-user-email`,{type:`string`,description:`Filter by the last seen user's email.`}).option(`seen-after`,{type:`string`,description:`Filter by the last_seen timestamp - returns only devices last seen after this timestamp.`}).option(`seen-before`,{type:`string`,description:`Filter by the last_seen timestamp - returns only devices last seen before this timestamp.`}).option(`per-page`,{type:`number`,description:`The maximum number of devices to return in a single response.`}).option(`search`,{type:`string`,description:`Search by device details.`}).option(`active-registrations`,{type:`string`,description:`Include or exclude devices with active registrations. The default is "only" - return only devices with active registrations.`,choices:[`include`,`only`,`exclude`]}).option(`has-registration-type`,{type:`string`,description:`Filter by the type of active registration associated with the device.`,choices:[`warp`,`browser_extension`]}).option(`id`,{type:`string`,array:!0,description:`Filter by a one or more device IDs.`}).option(`tag`,{type:`string`,array:!0,description:`Filter by one or more device tags in key:value format. Devices must match all provided tags.`}).option(`last-seen-registration-policy-id`,{type:`string`,description:`Filter by the ID of the device settings profile assigned to the device registration.`}).option(`include`,{type:`string`,description:`Comma-separated list of additional information that should be included in the device response. Supported values are: "last_seen_registration.policy".`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ep={command:`list`,describe:`List devices`,builder:$f,handler:async e=>u({command:`zero-trust devices list`,classification:{safeFlags:[`sort-by`,`sort-order`,`active-registrations`,`has-registration-type`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,sort_by:e[`sort-by`],sort_order:e[`sort-order`],"last_seen_user.email":e[`last-seen-user-email`],seen_after:e[`seen-after`],seen_before:e[`seen-before`],per_page:e[`per-page`],search:e.search,active_registrations:e[`active-registrations`],has_registration_type:e[`has-registration-type`],id:e.id,tag:e.tag,"last_seen_registration.policy.id":e[`last-seen-registration-policy-id`],include:e.include};if(e.dryRun){let e=await i();c({command:`cf zero-trust devices list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/physical-devices`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Qf,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var tp={method:`POST`,path:t=>e`/accounts/${t.account_id}/devices/networks`,body:`json`,constants:{type:`tls`}};function np(e){return e.usage(`$0 zero-trust devices networks create
|
|
459
459
|
|
|
460
460
|
Creates a new device managed network.`).option(`network-config-sha256`,{type:`string`,description:`The SHA-256 hash of the TLS certificate presented by the host found at tls_sockaddr. If absent, regular certificate verification (trusted roots, valid timestamp, etc) will be used to validate the certificate.`}).option(`network-config-tls-sockaddr`,{type:`string`,description:`A network address of the form "host:port" that the WARP client will use to detect the presence of a TLS host.`}).option(`name`,{type:`string`,description:`The name of the device managed network. This name must be unique.`}).option(`type`,{type:`string`,description:`The type of device managed network.`,choices:[`tls`]}).coerce(`type`,e=>_(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const rp={command:`create`,describe:`Create a device managed network`,builder:np,handler:async e=>u({command:`zero-trust devices networks create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices networks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/networks`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({config:{sha256:_(e[`network-config-sha256`],`network-config-sha256`,`text`),tls_sockaddr:_(e[`network-config-tls-sockaddr`],`network-config-tls-sockaddr`,`text`)},name:_(e.name,`name`,`text`),type:e.type}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(tp,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`network-config-tls-sockaddr`]===void 0&&(e[`network-config-tls-sockaddr`]=await y(`network-config-tls-sockaddr`,`A network address of the form "host:port" that the WARP client will use to detect the presence of a TLS host.`)),e.name===void 0&&(e.name=await y(`name`,`The name of the device managed network. This name must be unique.`)),e.type===void 0&&(e.type=await b(`type`,`The type of device managed network.`,[`tls`]));let u=g({config:{sha256:_(e[`network-config-sha256`],`network-config-sha256`,`text`),tls_sockaddr:_(e[`network-config-tls-sockaddr`],`network-config-tls-sockaddr`,`text`)},name:_(e.name,`name`,`text`),type:e.type}),d=await l(`Creating`,async()=>n.send(tp,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var ip={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/networks/${t.network_id}`};function ap(e){return e.usage(`$0 zero-trust devices networks delete <network-id>
|
|
461
461
|
|
|
@@ -503,13 +503,13 @@ Fetches the default device settings profile for an account.`).option(`dry-run`,{
|
|
|
503
503
|
|
|
504
504
|
Updates the default device settings profile for an account.`).option(`allow-mode-switch`,{type:`boolean`,description:`Whether to allow the user to switch WARP between modes.`}).option(`allow-updates`,{type:`boolean`,description:`Whether to receive update notifications when a new version of the client is available.`}).option(`allowed-to-leave`,{type:`boolean`,description:`Whether to allow devices to leave the organization.`}).option(`auto-connect`,{type:`number`,description:`The amount of time in seconds to reconnect after having been disabled.`}).option(`captive-portal`,{type:`number`,description:`Turn on the captive portal after the specified amount of time.`}).option(`disable-auto-fallback`,{type:`boolean`,description:"If the `dns_server` field of a fallback domain is not present, the client will fall back to a best guess of the default/system DNS resolvers unless this policy option is set to `true`."}).option(`dns-search-suffixes`,{type:`string`,description:`List of DNS search suffixes to apply to clients. Suffixes are evaluated in order. Use an empty array to clear. Provide as a JSON array of objects or @path/to/file.json.`}).option(`enable-device-credential-authentication`,{type:`boolean`,description:`Determines whether the WARP client can silently reauthenticate the user with device credentials (Microsoft Entra) instead of prompting for browser-based reauthentication.`}).option(`exclude`,{type:`string`,description:`List of routes excluded in the WARP client's tunnel. Both 'exclude' and 'include' cannot be set in the same request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`exclude-office-ips`,{type:`boolean`,description:`Whether to add Microsoft IPs to Split Tunnel exclusions.`}).option(`global-acceleration-allow-manual-override`,{type:`boolean`,description:`Whether WARP users may manually override the automatic Global Acceleration decision. Defaults to true when not provided.`}).option(`global-acceleration-api-endpoints`,{type:`string`,array:!0,description:`IP:port entries for the API endpoints.`}).option(`global-acceleration-autoswitch`,{type:`boolean`,description:`Automatically switch Global Acceleration regions based on device location. Defaults to false when not provided.`}).option(`global-acceleration-enabled`,{type:`boolean`,description:`Global acceleration settings are used only when "enabled".`}).option(`global-acceleration-masque-endpoints`,{type:`string`,array:!0,description:`IP:port entries for the MASQUE tunnel endpoints. Either wireguard_endpoints or masque_endpoints must be provided.`}).option(`global-acceleration-wireguard-endpoints`,{type:`string`,array:!0,description:`IP:port entries for the WireGuard tunnel endpoints. Either wireguard_endpoints or masque_endpoints must be provided.`}).option(`include`,{type:`string`,description:`List of routes included in the WARP client's tunnel. Both 'exclude' and 'include' cannot be set in the same request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`lan-allow-minutes`,{type:`number`,description:`The amount of time in minutes a user is allowed access to their LAN. A value of 0 will allow LAN access until the next WARP reconnection, such as a reboot or a laptop waking from sleep. Note that this field is omitted from the response if null or unset.`}).option(`lan-allow-subnet-size`,{type:`number`,description:`The size of the subnet for the local access network. Note that this field is omitted from the response if null or unset.`}).option(`register-interface-ip-with-dns`,{type:`boolean`,description:`Determines if the operating system will register WARP's local interface IP with your on-premises DNS server.`}).option(`sccm-vpn-boundary-support`,{type:`boolean`,description:`Determines whether the WARP client indicates to SCCM that it is inside a VPN boundary. (Windows only).`}).option(`service-mode-v2-mode`,{type:`string`,description:`The mode to run the WARP client under.`}).option(`service-mode-v2-port`,{type:`number`,description:`The port number when used with proxy mode.`}).option(`support-url`,{type:`string`,description:`The URL to launch when the Send Feedback button is clicked.`}).option(`switch-locked`,{type:`boolean`,description:`Whether to allow the user to turn off the WARP switch and disconnect the client.`}).option(`tunnel-protocol`,{type:`string`,description:`Determines which tunnel protocol to use.`}).option(`uninstall-protection`,{type:`boolean`,description:`Determines whether uninstalling the WARP client requires an override code. (Windows only).`}).option(`virtual-networks-allowed`,{type:`string`,array:!0,description:`List of virtual network IDs the device is allowed to access. When virtual_networks is set, at least one entry is required.`}).option(`virtual-networks-default`,{type:`string`,description:"The default virtual network ID. Must be included in the `allowed` list."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`global-acceleration-allow-manual-override`,`global-acceleration-api-endpoints`,`global-acceleration-autoswitch`,`global-acceleration-enabled`,`global-acceleration-masque-endpoints`,`global-acceleration-wireguard-endpoints`].some(t=>e[t]!==void 0)){let t=[`global-acceleration-api-endpoints`,`global-acceleration-enabled`,`global-acceleration-masque-endpoints`,`global-acceleration-wireguard-endpoints`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --global_acceleration-* flag is set`)}return!0}).check(e=>{if([`virtual-networks-allowed`,`virtual-networks-default`].some(t=>e[t]!==void 0)){let t=[`virtual-networks-allowed`,`virtual-networks-default`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --virtual_networks-* flag is set`)}return!0})}const xm={command:`update`,describe:`Update the default device settings profile`,builder:bm,handler:async e=>u({command:`zero-trust devices profiles default update`,classification:{safeFlags:[`allow-mode-switch`,`allow-updates`,`allowed-to-leave`,`disable-auto-fallback`,`enable-device-credential-authentication`,`exclude-office-ips`,`global-acceleration-allow-manual-override`,`global-acceleration-autoswitch`,`global-acceleration-enabled`,`register-interface-ip-with-dns`,`sccm-vpn-boundary-support`,`switch-locked`,`uninstall-protection`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices profiles default update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/policy`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({allow_mode_switch:e[`allow-mode-switch`],allow_updates:e[`allow-updates`],allowed_to_leave:e[`allowed-to-leave`],auto_connect:e[`auto-connect`],captive_portal:e[`captive-portal`],disable_auto_fallback:e[`disable-auto-fallback`],dns_search_suffixes:d(e[`dns-search-suffixes`],`dns-search-suffixes`),enable_device_credential_authentication:e[`enable-device-credential-authentication`],exclude:d(e.exclude,`exclude`),exclude_office_ips:e[`exclude-office-ips`],global_acceleration:{allow_manual_override:e[`global-acceleration-allow-manual-override`],api_endpoints:e[`global-acceleration-api-endpoints`],autoswitch:e[`global-acceleration-autoswitch`],enabled:e[`global-acceleration-enabled`],masque_endpoints:e[`global-acceleration-masque-endpoints`],wireguard_endpoints:e[`global-acceleration-wireguard-endpoints`]},include:d(e.include,`include`),lan_allow_minutes:e[`lan-allow-minutes`],lan_allow_subnet_size:e[`lan-allow-subnet-size`],register_interface_ip_with_dns:e[`register-interface-ip-with-dns`],sccm_vpn_boundary_support:e[`sccm-vpn-boundary-support`],service_mode_v2:{mode:_(e[`service-mode-v2-mode`],`service-mode-v2-mode`,`text`),port:e[`service-mode-v2-port`]},support_url:_(e[`support-url`],`support-url`,`text`),switch_locked:e[`switch-locked`],tunnel_protocol:_(e[`tunnel-protocol`],`tunnel-protocol`,`text`),uninstall_protection:e[`uninstall-protection`],virtual_networks:{allowed:e[`virtual-networks-allowed`],default:_(e[`virtual-networks-default`],`virtual-networks-default`,`text`)}}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(ym,{body:t,account_id:a}));s(r,{successLabel:`Updated`});return}let u=g({allow_mode_switch:e[`allow-mode-switch`],allow_updates:e[`allow-updates`],allowed_to_leave:e[`allowed-to-leave`],auto_connect:e[`auto-connect`],captive_portal:e[`captive-portal`],disable_auto_fallback:e[`disable-auto-fallback`],dns_search_suffixes:d(e[`dns-search-suffixes`],`dns-search-suffixes`),enable_device_credential_authentication:e[`enable-device-credential-authentication`],exclude:d(e.exclude,`exclude`),exclude_office_ips:e[`exclude-office-ips`],global_acceleration:{allow_manual_override:e[`global-acceleration-allow-manual-override`],api_endpoints:e[`global-acceleration-api-endpoints`],autoswitch:e[`global-acceleration-autoswitch`],enabled:e[`global-acceleration-enabled`],masque_endpoints:e[`global-acceleration-masque-endpoints`],wireguard_endpoints:e[`global-acceleration-wireguard-endpoints`]},include:d(e.include,`include`),lan_allow_minutes:e[`lan-allow-minutes`],lan_allow_subnet_size:e[`lan-allow-subnet-size`],register_interface_ip_with_dns:e[`register-interface-ip-with-dns`],sccm_vpn_boundary_support:e[`sccm-vpn-boundary-support`],service_mode_v2:{mode:_(e[`service-mode-v2-mode`],`service-mode-v2-mode`,`text`),port:e[`service-mode-v2-port`]},support_url:_(e[`support-url`],`support-url`,`text`),switch_locked:e[`switch-locked`],tunnel_protocol:_(e[`tunnel-protocol`],`tunnel-protocol`,`text`),uninstall_protection:e[`uninstall-protection`],virtual_networks:{allowed:e[`virtual-networks-allowed`],default:_(e[`virtual-networks-default`],`virtual-networks-default`,`text`)}}),p=await l(`Updating`,async()=>n.send(ym,{body:u,account_id:a}));s(p,{successLabel:`Updated`})})},Sm={command:`default`,describe:`Operations for devices.profiles.default`,builder:e=>e.command(vm).command(xm).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Cm={command:`profiles`,describe:`Operations for devices.profiles`,builder:e=>e.command(hm).command(Sm).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var wm={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/registrations`,query:[`id`]};function Tm(e){return e.usage(`$0 zero-trust devices registrations bulk-delete
|
|
505
505
|
|
|
506
|
-
Deletes a list of WARP registrations.`).option(`id`,{type:`string`,description:`A list of registration IDs to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Em={command:`bulk-delete`,describe:`Delete registrations`,builder:Tm,handler:async e=>u({command:`zero-trust devices registrations bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={id:e.id};if(e.dryRun){let e=await i();c({command:`cf zero-trust devices registrations bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/registrations`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,!await x({force:!!e.force}))return;let d=await l(`Deleting`,async()=>a.send(wm,{account_id:u,...n}));s(d,{successLabel:`Deleted`})})};var Dm={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/registrations/${t.registration_id}`};function Om(e){return e.usage(`$0 zero-trust devices registrations delete <registration-id>
|
|
506
|
+
Deletes a list of WARP registrations.`).option(`id`,{type:`string`,array:!0,description:`A list of registration IDs to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Em={command:`bulk-delete`,describe:`Delete registrations`,builder:Tm,handler:async e=>u({command:`zero-trust devices registrations bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={id:e.id};if(e.dryRun){let e=await i();c({command:`cf zero-trust devices registrations bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/registrations`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,!await x({force:!!e.force}))return;let d=await l(`Deleting`,async()=>a.send(wm,{account_id:u,...n}));s(d,{successLabel:`Deleted`})})};var Dm={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/registrations/${t.registration_id}`};function Om(e){return e.usage(`$0 zero-trust devices registrations delete <registration-id>
|
|
507
507
|
|
|
508
508
|
Deletes a WARP registration.`).positional(`registration-id`,{type:`string`,description:`Registration ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const km={command:`delete <registration-id>`,describe:`Delete registration`,builder:Om,handler:async e=>u({command:`zero-trust devices registrations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices registrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/registrations/${e[`registration-id`]==null?`<registration-id>`:encodeURIComponent(String(e[`registration-id`]))}`,pathParams:{"registration-id":String(e[`registration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(Dm,{account_id:a,registration_id:e[`registration-id`]}));s(u,{successLabel:`Deleted`})})};var Am={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/registrations/${t.registration_id}`,query:[`include`]};function jm(e){return e.usage(`$0 zero-trust devices registrations get <registration-id>
|
|
509
509
|
|
|
510
510
|
Fetches a single WARP registration.`).positional(`registration-id`,{type:`string`,description:`Registration ID`,demandOption:!0}).option(`include`,{type:`string`,description:`Comma-separated list of additional information that should be included in the registration response. Supported values are: "policy".`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mm={command:`get <registration-id>`,describe:`Get registration`,builder:jm,handler:async e=>u({command:`zero-trust devices registrations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={include:e.include};if(e.dryRun){let t=await i();c({command:`cf zero-trust devices registrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/registrations/${e[`registration-id`]==null?`<registration-id>`:encodeURIComponent(String(e[`registration-id`]))}`,pathParams:{"registration-id":String(e[`registration-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Am,{account_id:u,registration_id:e[`registration-id`],...n}));s(d,{successLabel:`Loaded`})})};var Nm={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/registrations`,query:[`user.id`,`seen_after`,`seen_before`,`status`,`registration_type`,`per_page`,`search`,`sort_by`,`sort_order`,`cursor`,`id`,`device.id`,`policy.id`,`include`],joined:[`seen_after`,`seen_before`,`status`,`registration_type`,`per_page`,`search`,`sort_by`,`sort_order`,`cursor`,`device.id`,`policy.id`]};function Pm(e){return e.usage(`$0 zero-trust devices registrations list
|
|
511
511
|
|
|
512
|
-
Lists WARP registrations.`).option(`user-id`,{type:`string`,description:`Filter by user ID.`}).option(`seen-after`,{type:`string`,description:`Filter by the last_seen timestamp - returns only registrations last seen after this timestamp.`}).option(`seen-before`,{type:`string`,description:`Filter by the last_seen timestamp - returns only registrations last seen before this timestamp.`}).option(`status`,{type:`string`,description:`Filter by registration status. Defaults to 'active'.`,choices:[`active`,`all`,`revoked`]}).option(`registration-type`,{type:`string`,description:`Filter by registration client type.`,choices:[`warp`,`browser_extension`]}).option(`per-page`,{type:`number`,description:`The maximum number of devices to return in a single response.`}).option(`search`,{type:`string`,description:`Filter by registration details.`}).option(`sort-by`,{type:`string`,description:`The registration field to order results by.`,choices:[`id`,`user.name`,`user.email`,`last_seen_at`,`created_at`]}).option(`sort-order`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`cursor`,{type:`string`,description:`Opaque token indicating the starting position when requesting the next set of records. A cursor value can be obtained from the result_info.cursor field in the response.`}).option(`id`,{type:`string`,description:`Filter by registration ID.`}).option(`device-id`,{type:`string`,description:`Filter by WARP device ID.`}).option(`policy-id`,{type:`string`,description:`Filter by the ID of the device settings profile assigned to the registration.`}).option(`include`,{type:`string`,description:`Comma-separated list of additional information that should be included in the registration response. Supported values are: "policy".`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fm={command:`list`,describe:`List registrations`,builder:Pm,handler:async e=>u({command:`zero-trust devices registrations list`,classification:{safeFlags:[`status`,`registration-type`,`sort-by`,`sort-order`,`dry-run`]}},e,async()=>{let n={"user.id":e[`user-id`],seen_after:e[`seen-after`],seen_before:e[`seen-before`],status:e.status,registration_type:e[`registration-type`],per_page:e[`per-page`],search:e.search,sort_by:e[`sort-by`],sort_order:e[`sort-order`],cursor:e.cursor,id:e.id,"device.id":e[`device-id`],"policy.id":e[`policy-id`],include:e.include};if(e.dryRun){let e=await i();c({command:`cf zero-trust devices registrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/registrations`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Nm,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Im={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/registrations/${t.registration_id}/override_codes`};function Lm(e){return e.usage(`$0 zero-trust devices registrations override-codes get <registration-id>
|
|
512
|
+
Lists WARP registrations.`).option(`user-id`,{type:`string`,array:!0,description:`Filter by user ID.`}).option(`seen-after`,{type:`string`,description:`Filter by the last_seen timestamp - returns only registrations last seen after this timestamp.`}).option(`seen-before`,{type:`string`,description:`Filter by the last_seen timestamp - returns only registrations last seen before this timestamp.`}).option(`status`,{type:`string`,description:`Filter by registration status. Defaults to 'active'.`,choices:[`active`,`all`,`revoked`]}).option(`registration-type`,{type:`string`,description:`Filter by registration client type.`,choices:[`warp`,`browser_extension`]}).option(`per-page`,{type:`number`,description:`The maximum number of devices to return in a single response.`}).option(`search`,{type:`string`,description:`Filter by registration details.`}).option(`sort-by`,{type:`string`,description:`The registration field to order results by.`,choices:[`id`,`user.name`,`user.email`,`last_seen_at`,`created_at`]}).option(`sort-order`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`cursor`,{type:`string`,description:`Opaque token indicating the starting position when requesting the next set of records. A cursor value can be obtained from the result_info.cursor field in the response.`}).option(`id`,{type:`string`,array:!0,description:`Filter by registration ID.`}).option(`device-id`,{type:`string`,description:`Filter by WARP device ID.`}).option(`policy-id`,{type:`string`,description:`Filter by the ID of the device settings profile assigned to the registration.`}).option(`include`,{type:`string`,description:`Comma-separated list of additional information that should be included in the registration response. Supported values are: "policy".`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fm={command:`list`,describe:`List registrations`,builder:Pm,handler:async e=>u({command:`zero-trust devices registrations list`,classification:{safeFlags:[`status`,`registration-type`,`sort-by`,`sort-order`,`dry-run`]}},e,async()=>{let n={"user.id":e[`user-id`],seen_after:e[`seen-after`],seen_before:e[`seen-before`],status:e.status,registration_type:e[`registration-type`],per_page:e[`per-page`],search:e.search,sort_by:e[`sort-by`],sort_order:e[`sort-order`],cursor:e.cursor,id:e.id,"device.id":e[`device-id`],"policy.id":e[`policy-id`],include:e.include};if(e.dryRun){let e=await i();c({command:`cf zero-trust devices registrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/registrations`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Nm,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Im={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/registrations/${t.registration_id}/override_codes`};function Lm(e){return e.usage(`$0 zero-trust devices registrations override-codes get <registration-id>
|
|
513
513
|
|
|
514
514
|
Fetches one-time use admin override codes for a registration. This relies on the **Admin Override** setting being enabled in your device configuration.`).positional(`registration-id`,{type:`string`,description:`Registration ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Rm={command:`get <registration-id>`,describe:`Get override codes`,builder:Lm,handler:async e=>u({command:`zero-trust devices registrations override-codes get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices registrations override-codes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/registrations/${e[`registration-id`]==null?`<registration-id>`:encodeURIComponent(String(e[`registration-id`]))}/override_codes`,pathParams:{"registration-id":String(e[`registration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Im,{account_id:a,registration_id:e[`registration-id`]}));s(u,{successLabel:`Loaded`})})},zm={command:`override-codes`,describe:`Operations for devices.registrations.override-codes`,builder:e=>e.command(Rm).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Bm={command:`registrations`,describe:`Operations for devices.registrations`,builder:e=>e.command(Em).command(km).command(Mm).command(Fm).command(zm).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Vm={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/settings`};function Hm(e){return e.usage(`$0 zero-trust devices settings delete
|
|
515
515
|
|
|
@@ -545,9 +545,9 @@ Get time-bucketed status metrics for a specific device.`).positional(`device-id`
|
|
|
545
545
|
|
|
546
546
|
List ISP information observed for a specific device during traceroute tests.`).option(`device-id`,{type:`string`,description:`Device-specific ID, given as UUID.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of paginated results. Mutually exclusive with cursor.`}).option(`per-page`,{type:`number`,description:`Number of items per page`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Cursor for cursor-based pagination. Mutually exclusive with page.`}).option(`sort-by`,{type:`string`,description:`The field to sort results by.`,choices:[`time_start`]}).option(`sort-order`,{type:`string`,description:`The order to sort results.`,choices:[`ASC`,`DESC`]}).option(`from`,{type:`string`,description:`Start time for the query in ISO 8601 format.`}).option(`to`,{type:`string`,description:`End time for the query in ISO 8601 format.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gh={command:`list`,describe:`List device ISPs`,builder:Wh,handler:async e=>u({command:`zero-trust dex isps list`,classification:{safeFlags:[`sort-by`,`sort-order`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],cursor:e.cursor,sort_by:e[`sort-by`],sort_order:e[`sort-order`],from:e.from,to:e.to};if(e.dryRun){let t=await i();c({command:`cf zero-trust dex isps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/devices/${e[`device-id`]==null?`<device-id>`:encodeURIComponent(String(e[`device-id`]))}/isps`,pathParams:{"device-id":String(e[`device-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Uh,{account_id:u,device_id:e[`device-id`],...n}));s(d,{successLabel:`Loaded`})})},Kh={command:`isps`,describe:`Operations for dex.isps`,builder:e=>e.command(Gh).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var qh={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/tests/overview`,query:[`colo`,`testName`,`deviceId`,`registration_id`,`page`,`per_page`,`kind`]};function Jh(e){return e.usage(`$0 zero-trust dex overview tests list
|
|
547
547
|
|
|
548
|
-
List DEX tests with overview metrics.`).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`test-name`,{type:`string`,description:`Optionally filter results by test name.`}).option(`device-id`,{type:`string`,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`registration-id`,{type:`string`,description:`Optionally filter results to a specific device registration. Must be used in combination with a single deviceId.`}).option(`page`,{type:`number`,description:`Page number of paginated results`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`kind`,{type:`string`,description:`Filter by test type.`,choices:[`http`,`traceroute`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Yh={command:`list`,describe:`List DEX test analytics`,builder:Jh,handler:async e=>u({command:`zero-trust dex overview tests list`,classification:{safeFlags:[`kind`,`dry-run`]}},e,async()=>{let n={colo:e.colo,testName:e[`test-name`],deviceId:e[`device-id`],registration_id:e[`registration-id`],page:e.page,per_page:e[`per-page`],kind:e.kind};if(e.dryRun){let e=await i();c({command:`cf zero-trust dex overview tests list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dex/tests/overview`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(qh,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Xh={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/tests/unique-devices`,query:[`testName`,`deviceId`]};function Zh(e){return e.usage(`$0 zero-trust dex overview tests unique-devices get
|
|
548
|
+
List DEX tests with overview metrics.`).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`test-name`,{type:`string`,description:`Optionally filter results by test name.`}).option(`device-id`,{type:`string`,array:!0,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`registration-id`,{type:`string`,description:`Optionally filter results to a specific device registration. Must be used in combination with a single deviceId.`}).option(`page`,{type:`number`,description:`Page number of paginated results`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`kind`,{type:`string`,description:`Filter by test type.`,choices:[`http`,`traceroute`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Yh={command:`list`,describe:`List DEX test analytics`,builder:Jh,handler:async e=>u({command:`zero-trust dex overview tests list`,classification:{safeFlags:[`kind`,`dry-run`]}},e,async()=>{let n={colo:e.colo,testName:e[`test-name`],deviceId:e[`device-id`],registration_id:e[`registration-id`],page:e.page,per_page:e[`per-page`],kind:e.kind};if(e.dryRun){let e=await i();c({command:`cf zero-trust dex overview tests list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dex/tests/overview`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(qh,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Xh={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/tests/unique-devices`,query:[`testName`,`deviceId`]};function Zh(e){return e.usage(`$0 zero-trust dex overview tests unique-devices get
|
|
549
549
|
|
|
550
|
-
Returns unique count of devices that have run synthetic application monitoring tests in the past 7 days.`).option(`test-name`,{type:`string`,description:`Optionally filter results by test name.`}).option(`device-id`,{type:`string`,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qh={command:`get`,describe:`Get count of devices targeted`,builder:Zh,handler:async e=>u({command:`zero-trust dex overview tests unique-devices get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={testName:e[`test-name`],deviceId:e[`device-id`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust dex overview tests unique-devices get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dex/tests/unique-devices`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Xh,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},$h={command:`unique-devices`,describe:`Operations for dex.overview.tests.unique-devices`,builder:e=>e.command(Qh).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},eg={command:`tests`,describe:`Operations for dex.overview.tests`,builder:e=>e.command(Yh).command($h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},tg={command:`overview`,describe:`Operations for dex.overview`,builder:e=>e.command(eg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ng={method:`POST`,path:t=>e`/accounts/${t.account_id}/dex/rules`,body:`json`};function rg(e){return e.usage(`$0 zero-trust dex rules create
|
|
550
|
+
Returns unique count of devices that have run synthetic application monitoring tests in the past 7 days.`).option(`test-name`,{type:`string`,description:`Optionally filter results by test name.`}).option(`device-id`,{type:`string`,array:!0,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qh={command:`get`,describe:`Get count of devices targeted`,builder:Zh,handler:async e=>u({command:`zero-trust dex overview tests unique-devices get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={testName:e[`test-name`],deviceId:e[`device-id`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust dex overview tests unique-devices get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dex/tests/unique-devices`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Xh,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},$h={command:`unique-devices`,describe:`Operations for dex.overview.tests.unique-devices`,builder:e=>e.command(Qh).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},eg={command:`tests`,describe:`Operations for dex.overview.tests`,builder:e=>e.command(Yh).command($h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},tg={command:`overview`,describe:`Operations for dex.overview`,builder:e=>e.command(eg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ng={method:`POST`,path:t=>e`/accounts/${t.account_id}/dex/rules`,body:`json`};function rg(e){return e.usage(`$0 zero-trust dex rules create
|
|
551
551
|
|
|
552
552
|
Create a DEX Rule.`).option(`description`,{type:`string`,description:`The description field`}).option(`match`,{type:`string`,description:`The wirefilter expression to match.`}).option(`name`,{type:`string`,description:`The name of the Rule.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ig={command:`create`,describe:`Create a DEX Rule`,builder:rg,handler:async e=>u({command:`zero-trust dex rules create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dex rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),match:_(e.match,`match`,`text`),name:_(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(ng,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.match===void 0&&(e.match=await y(`match`,`The wirefilter expression to match.`)),e.name===void 0&&(e.name=await y(`name`,`The name of the Rule.`));let u=g({description:_(e.description,`description`,`text`),match:_(e.match,`match`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(ng,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var ag={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dex/rules/${t.rule_id}`};function og(e){return e.usage(`$0 zero-trust dex rules delete <rule-id>
|
|
553
553
|
|
|
@@ -559,15 +559,15 @@ List DEX Rules.`).option(`page`,{type:`number`,description:`Page number of pagin
|
|
|
559
559
|
|
|
560
560
|
Update a DEX Rule.`).positional(`rule-id`,{type:`string`,description:`Unique identifier of the rule.`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`match`,{type:`string`,description:`The wirefilter expression to match.`}).option(`name`,{type:`string`,description:`The name of the Rule.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const gg={command:`update <rule-id>`,describe:`Update a DEX Rule`,builder:hg,handler:async e=>u({command:`zero-trust dex rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dex rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),match:_(e.match,`match`,`text`),name:_(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(mg,{body:t,account_id:a,rule_id:e[`rule-id`]}));s(r,{successLabel:`Updated`});return}let u=g({description:_(e.description,`description`,`text`),match:_(e.match,`match`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Updating`,async()=>n.send(mg,{body:u,account_id:a,rule_id:e[`rule-id`]}));s(d,{successLabel:`Updated`})})},_g={command:`rules`,describe:`Operations for dex.rules`,builder:e=>e.command(ig).command(sg).command(ug).command(pg).command(gg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var vg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/http-tests/${t.test_id}`,query:[`deviceId`,`from`,`to`,`interval`,`colo`]};function yg(e){return e.usage(`$0 zero-trust dex test-results http get <test-id>
|
|
561
561
|
|
|
562
|
-
Get test details and aggregate performance metrics for an http test for a given time period between 1 hour and 7 days.`).positional(`test-id`,{type:`string`,description:`Unique identifier for a specific test.`,demandOption:!0}).option(`device-id`,{type:`string`,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`from`,{type:`string`,description:`Start time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`interval`,{type:`string`,description:`Time interval for aggregate time slots.`,choices:[`minute`,`hour`],demandOption:!0}).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bg={command:`get <test-id>`,describe:`Get details and aggregate metrics for an http test`,builder:yg,handler:async e=>u({command:`zero-trust dex test-results http get`,classification:{safeFlags:[`interval`,`dry-run`]}},e,async()=>{let n={deviceId:e[`device-id`],from:e.from,to:e.to,interval:e.interval,colo:e.colo};if(e.dryRun){let t=await i();c({command:`cf zero-trust dex test-results http get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/http-tests/${e[`test-id`]==null?`<test-id>`:encodeURIComponent(String(e[`test-id`]))}`,pathParams:{"test-id":String(e[`test-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(vg,{account_id:u,test_id:e[`test-id`],...n}));s(d,{successLabel:`Loaded`})})};var xg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/http-tests/${t.test_id}/percentiles`,query:[`deviceId`,`from`,`to`,`colo`]};function Sg(e){return e.usage(`$0 zero-trust dex test-results http percentiles get <test-id>
|
|
562
|
+
Get test details and aggregate performance metrics for an http test for a given time period between 1 hour and 7 days.`).positional(`test-id`,{type:`string`,description:`Unique identifier for a specific test.`,demandOption:!0}).option(`device-id`,{type:`string`,array:!0,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`from`,{type:`string`,description:`Start time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`interval`,{type:`string`,description:`Time interval for aggregate time slots.`,choices:[`minute`,`hour`],demandOption:!0}).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bg={command:`get <test-id>`,describe:`Get details and aggregate metrics for an http test`,builder:yg,handler:async e=>u({command:`zero-trust dex test-results http get`,classification:{safeFlags:[`interval`,`dry-run`]}},e,async()=>{let n={deviceId:e[`device-id`],from:e.from,to:e.to,interval:e.interval,colo:e.colo};if(e.dryRun){let t=await i();c({command:`cf zero-trust dex test-results http get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/http-tests/${e[`test-id`]==null?`<test-id>`:encodeURIComponent(String(e[`test-id`]))}`,pathParams:{"test-id":String(e[`test-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(vg,{account_id:u,test_id:e[`test-id`],...n}));s(d,{successLabel:`Loaded`})})};var xg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/http-tests/${t.test_id}/percentiles`,query:[`deviceId`,`from`,`to`,`colo`]};function Sg(e){return e.usage(`$0 zero-trust dex test-results http percentiles get <test-id>
|
|
563
563
|
|
|
564
|
-
Get percentiles for an http test for a given time period between 1 hour and 7 days.`).positional(`test-id`,{type:`string`,description:`Unique identifier for a specific test.`,demandOption:!0}).option(`device-id`,{type:`string`,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`from`,{type:`string`,description:`Start time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Cg={command:`get <test-id>`,describe:`Get percentiles for an http test`,builder:Sg,handler:async e=>u({command:`zero-trust dex test-results http percentiles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={deviceId:e[`device-id`],from:e.from,to:e.to,colo:e.colo};if(e.dryRun){let t=await i();c({command:`cf zero-trust dex test-results http percentiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/http-tests/${e[`test-id`]==null?`<test-id>`:encodeURIComponent(String(e[`test-id`]))}/percentiles`,pathParams:{"test-id":String(e[`test-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(xg,{account_id:u,test_id:e[`test-id`],...n}));s(d,{successLabel:`Loaded`})})},wg={command:`percentiles`,describe:`Operations for dex.test-results.http.percentiles`,builder:e=>e.command(Cg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Tg={command:`http`,describe:`Operations for dex.test-results.http`,builder:e=>e.command(bg).command(wg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Eg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/traceroute-tests/${t.test_id}`,query:[`deviceId`,`from`,`to`,`interval`,`colo`]};function Dg(e){return e.usage(`$0 zero-trust dex test-results traceroute get <test-id>
|
|
564
|
+
Get percentiles for an http test for a given time period between 1 hour and 7 days.`).positional(`test-id`,{type:`string`,description:`Unique identifier for a specific test.`,demandOption:!0}).option(`device-id`,{type:`string`,array:!0,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`from`,{type:`string`,description:`Start time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Cg={command:`get <test-id>`,describe:`Get percentiles for an http test`,builder:Sg,handler:async e=>u({command:`zero-trust dex test-results http percentiles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={deviceId:e[`device-id`],from:e.from,to:e.to,colo:e.colo};if(e.dryRun){let t=await i();c({command:`cf zero-trust dex test-results http percentiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/http-tests/${e[`test-id`]==null?`<test-id>`:encodeURIComponent(String(e[`test-id`]))}/percentiles`,pathParams:{"test-id":String(e[`test-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(xg,{account_id:u,test_id:e[`test-id`],...n}));s(d,{successLabel:`Loaded`})})},wg={command:`percentiles`,describe:`Operations for dex.test-results.http.percentiles`,builder:e=>e.command(Cg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Tg={command:`http`,describe:`Operations for dex.test-results.http`,builder:e=>e.command(bg).command(wg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Eg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/traceroute-tests/${t.test_id}`,query:[`deviceId`,`from`,`to`,`interval`,`colo`]};function Dg(e){return e.usage(`$0 zero-trust dex test-results traceroute get <test-id>
|
|
565
565
|
|
|
566
|
-
Get test details and aggregate performance metrics for a traceroute test for a given time period between 1 hour and 7 days.`).positional(`test-id`,{type:`string`,description:`Unique identifier for a specific test.`,demandOption:!0}).option(`device-id`,{type:`string`,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`from`,{type:`string`,description:`Start time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`interval`,{type:`string`,description:`Time interval for aggregate time slots.`,choices:[`minute`,`hour`],demandOption:!0}).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Og={command:`get <test-id>`,describe:`Get details and aggregate metrics for a traceroute test`,builder:Dg,handler:async e=>u({command:`zero-trust dex test-results traceroute get`,classification:{safeFlags:[`interval`,`dry-run`]}},e,async()=>{let n={deviceId:e[`device-id`],from:e.from,to:e.to,interval:e.interval,colo:e.colo};if(e.dryRun){let t=await i();c({command:`cf zero-trust dex test-results traceroute get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/traceroute-tests/${e[`test-id`]==null?`<test-id>`:encodeURIComponent(String(e[`test-id`]))}`,pathParams:{"test-id":String(e[`test-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Eg,{account_id:u,test_id:e[`test-id`],...n}));s(d,{successLabel:`Loaded`})})};var kg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/traceroute-test-results/${t.test_result_id}/network-path`};function Ag(e){return e.usage(`$0 zero-trust dex test-results traceroute network-path get <test-result-id>
|
|
566
|
+
Get test details and aggregate performance metrics for a traceroute test for a given time period between 1 hour and 7 days.`).positional(`test-id`,{type:`string`,description:`Unique identifier for a specific test.`,demandOption:!0}).option(`device-id`,{type:`string`,array:!0,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`from`,{type:`string`,description:`Start time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for aggregate metrics in ISO ms.`,demandOption:!0}).option(`interval`,{type:`string`,description:`Time interval for aggregate time slots.`,choices:[`minute`,`hour`],demandOption:!0}).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Og={command:`get <test-id>`,describe:`Get details and aggregate metrics for a traceroute test`,builder:Dg,handler:async e=>u({command:`zero-trust dex test-results traceroute get`,classification:{safeFlags:[`interval`,`dry-run`]}},e,async()=>{let n={deviceId:e[`device-id`],from:e.from,to:e.to,interval:e.interval,colo:e.colo};if(e.dryRun){let t=await i();c({command:`cf zero-trust dex test-results traceroute get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/traceroute-tests/${e[`test-id`]==null?`<test-id>`:encodeURIComponent(String(e[`test-id`]))}`,pathParams:{"test-id":String(e[`test-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Eg,{account_id:u,test_id:e[`test-id`],...n}));s(d,{successLabel:`Loaded`})})};var kg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/traceroute-test-results/${t.test_result_id}/network-path`};function Ag(e){return e.usage(`$0 zero-trust dex test-results traceroute network-path get <test-result-id>
|
|
567
567
|
|
|
568
568
|
Get a breakdown of hops and performance metrics for a specific traceroute test run`).positional(`test-result-id`,{type:`string`,description:`Unique identifier for a specific traceroute test.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jg={command:`get <test-result-id>`,describe:`Get details for a specific traceroute test run`,builder:Ag,handler:async e=>u({command:`zero-trust dex test-results traceroute network-path get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dex test-results traceroute network-path get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/traceroute-test-results/${e[`test-result-id`]==null?`<test-result-id>`:encodeURIComponent(String(e[`test-result-id`]))}/network-path`,pathParams:{"test-result-id":String(e[`test-result-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(kg,{account_id:a,test_result_id:e[`test-result-id`]}));s(u,{successLabel:`Loaded`})})},Mg={command:`network-path`,describe:`Operations for dex.test-results.traceroute.network-path`,builder:e=>e.command(jg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ng={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/traceroute-tests/${t.test_id}/percentiles`,query:[`deviceId`,`from`,`to`,`colo`]};function Pg(e){return e.usage(`$0 zero-trust dex test-results traceroute percentiles get <test-id>
|
|
569
569
|
|
|
570
|
-
Get percentiles for a traceroute test for a given time period between 1 hour and 7 days.`).positional(`test-id`,{type:`string`,description:`Unique identifier for a specific test.`,demandOption:!0}).option(`device-id`,{type:`string`,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`from`,{type:`string`,description:`Start time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fg={command:`get <test-id>`,describe:`Get percentiles for a traceroute test`,builder:Pg,handler:async e=>u({command:`zero-trust dex test-results traceroute percentiles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={deviceId:e[`device-id`],from:e.from,to:e.to,colo:e.colo};if(e.dryRun){let t=await i();c({command:`cf zero-trust dex test-results traceroute percentiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/traceroute-tests/${e[`test-id`]==null?`<test-id>`:encodeURIComponent(String(e[`test-id`]))}/percentiles`,pathParams:{"test-id":String(e[`test-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Ng,{account_id:u,test_id:e[`test-id`],...n}));s(d,{successLabel:`Loaded`})})},Ig={command:`percentiles`,describe:`Operations for dex.test-results.traceroute.percentiles`,builder:e=>e.command(Fg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Lg={command:`traceroute`,describe:`Operations for dex.test-results.traceroute`,builder:e=>e.command(Og).command(Mg).command(Ig).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Rg={command:`test-results`,describe:`Operations for dex.test-results`,builder:e=>e.command(Tg).command(Lg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var zg={method:`POST`,path:t=>e`/accounts/${t.account_id}/dex/devices/dex_tests`,body:`json`};function Bg(e){return e.usage(`$0 zero-trust dex tests create
|
|
570
|
+
Get percentiles for a traceroute test for a given time period between 1 hour and 7 days.`).positional(`test-id`,{type:`string`,description:`Unique identifier for a specific test.`,demandOption:!0}).option(`device-id`,{type:`string`,array:!0,description:`Optionally filter result stats to a specific device(s). Cannot be used in combination with colo param.`}).option(`from`,{type:`string`,description:`Start time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for the query in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`colo`,{type:`string`,description:`Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fg={command:`get <test-id>`,describe:`Get percentiles for a traceroute test`,builder:Pg,handler:async e=>u({command:`zero-trust dex test-results traceroute percentiles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={deviceId:e[`device-id`],from:e.from,to:e.to,colo:e.colo};if(e.dryRun){let t=await i();c({command:`cf zero-trust dex test-results traceroute percentiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/traceroute-tests/${e[`test-id`]==null?`<test-id>`:encodeURIComponent(String(e[`test-id`]))}/percentiles`,pathParams:{"test-id":String(e[`test-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Ng,{account_id:u,test_id:e[`test-id`],...n}));s(d,{successLabel:`Loaded`})})},Ig={command:`percentiles`,describe:`Operations for dex.test-results.traceroute.percentiles`,builder:e=>e.command(Fg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Lg={command:`traceroute`,describe:`Operations for dex.test-results.traceroute`,builder:e=>e.command(Og).command(Mg).command(Ig).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Rg={command:`test-results`,describe:`Operations for dex.test-results`,builder:e=>e.command(Tg).command(Lg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var zg={method:`POST`,path:t=>e`/accounts/${t.account_id}/dex/devices/dex_tests`,body:`json`};function Bg(e){return e.usage(`$0 zero-trust dex tests create
|
|
571
571
|
|
|
572
572
|
Create a DEX test.`).option(`data-host`,{type:`string`,description:`The desired endpoint to test.`}).option(`data-kind`,{type:`string`,description:`The type of test.`,choices:[`http`,`traceroute`]}).coerce(`data-kind`,e=>_(e,`data-kind`,`text`)).option(`data-method`,{type:`string`,description:`The HTTP request method type.`,choices:[`GET`]}).coerce(`data-method`,e=>_(e,`data-method`,`text`)).option(`description`,{type:`string`,description:`Additional details about the test.`}).option(`enabled`,{type:`boolean`,description:`Determines whether or not the test is active.`}).option(`interval`,{type:`string`,description:`How often the test will run.`}).option(`name`,{type:`string`,description:`The name of the DEX test. Must be unique.`}).option(`target-policies`,{type:`string`,description:`DEX rules targeted by this test. Provide as a JSON array of objects or @path/to/file.json.`}).option(`targeted`,{type:`boolean`,description:`The targeted field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Vg={command:`create`,describe:`Create Device DEX test`,builder:Bg,handler:async e=>u({command:`zero-trust dex tests create`,classification:{safeFlags:[`data-kind`,`data-method`,`enabled`,`targeted`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dex tests create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/devices/dex_tests`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({data:{host:_(e[`data-host`],`data-host`,`text`),kind:e[`data-kind`],method:e[`data-method`]},description:_(e.description,`description`,`text`),enabled:e.enabled,interval:_(e.interval,`interval`,`text`),name:_(e.name,`name`,`text`),target_policies:d(e[`target-policies`],`target-policies`),targeted:e.targeted}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(zg,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`data-host`]===void 0&&(e[`data-host`]=await y(`data-host`,`The desired endpoint to test.`)),e[`data-kind`]===void 0&&(e[`data-kind`]=await b(`data-kind`,`The type of test.`,[`http`,`traceroute`])),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.interval===void 0&&(e.interval=await y(`interval`,`How often the test will run.`)),e.name===void 0&&(e.name=await y(`name`,`The name of the DEX test. Must be unique.`));let u=g({data:{host:_(e[`data-host`],`data-host`,`text`),kind:e[`data-kind`],method:e[`data-method`]},description:_(e.description,`description`,`text`),enabled:e.enabled,interval:_(e.interval,`interval`,`text`),name:_(e.name,`name`,`text`),target_policies:d(e[`target-policies`],`target-policies`),targeted:e.targeted}),p=await l(`Creating`,async()=>n.send(zg,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Hg={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dex/devices/dex_tests/${t.dex_test_id}`};function Ug(e){return e.usage(`$0 zero-trust dex tests delete <dex-test-id>
|
|
573
573
|
|
|
@@ -811,43 +811,43 @@ Retrieve information about the current Zero Trust account.`).option(`dry-run`,{t
|
|
|
811
811
|
|
|
812
812
|
Creates a new Zero Trust list.`).option(`description`,{type:`string`,description:`Provide the list description.`}).option(`items`,{type:`string`,description:`Add items to the list. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`Specify the list name.`}).option(`type`,{type:`string`,description:`Specify the list type.`,choices:[`SERIAL`,`URL`,`DOMAIN`,`EMAIL`,`IP`,`CATEGORY`,`LOCATION`,`DEVICE`,`AAGUID`]}).coerce(`type`,e=>_(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const yC={command:`create`,describe:`Create Zero Trust list`,builder:vC,handler:async e=>u({command:`zero-trust gateway lists create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway lists create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/lists`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),items:d(e.items,`items`),name:_(e.name,`name`,`text`),type:e.type}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(_C,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`Specify the list name.`)),e.type===void 0&&(e.type=await b(`type`,`Specify the list type.`,[`SERIAL`,`URL`,`DOMAIN`,`EMAIL`,`IP`,`CATEGORY`,`LOCATION`,`DEVICE`,`AAGUID`]));let u=g({description:_(e.description,`description`,`text`),items:d(e.items,`items`),name:_(e.name,`name`,`text`),type:e.type}),p=await l(`Creating`,async()=>n.send(_C,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var bC={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/gateway/lists/${t.list_id}`};function xC(e){return e.usage(`$0 zero-trust gateway lists delete <list-id>
|
|
813
813
|
|
|
814
|
-
Deletes a Zero Trust list.`).positional(`list-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const SC={command:`delete <list-id>`,describe:`Delete Zero Trust list`,builder:xC,handler:async e=>u({command:`zero-trust gateway lists delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway lists delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/lists/${e[`list-id`]==null?`<list-id>`:encodeURIComponent(String(e[`list-id`]))}`,pathParams:{"list-id":String(e[`list-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(bC,{account_id:a,list_id:e[`list-id`]}));s(u,{successLabel:`Deleted`})})};var
|
|
814
|
+
Deletes a Zero Trust list.`).positional(`list-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const SC={command:`delete <list-id>`,describe:`Delete Zero Trust list`,builder:xC,handler:async e=>u({command:`zero-trust gateway lists delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway lists delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/lists/${e[`list-id`]==null?`<list-id>`:encodeURIComponent(String(e[`list-id`]))}`,pathParams:{"list-id":String(e[`list-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(bC,{account_id:a,list_id:e[`list-id`]}));s(u,{successLabel:`Deleted`})})};var CC={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/gateway/lists/${t.list_id}`,body:`json`};function wC(e){return e.usage(`$0 zero-trust gateway lists edit <list-id>
|
|
815
815
|
|
|
816
|
-
Appends or removes an item from a configured Zero Trust list.`).positional(`list-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`append`,{type:`string`,description:`Add items to the list. Provide as a JSON array of objects or @path/to/file.json.`}).option(`remove`,{type:`string`,array:!0,description:`Lists of item values you want to remove.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
816
|
+
Appends or removes an item from a configured Zero Trust list.`).positional(`list-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`append`,{type:`string`,description:`Add items to the list. Provide as a JSON array of objects or @path/to/file.json.`}).option(`remove`,{type:`string`,array:!0,description:`Lists of item values you want to remove.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const TC={command:`edit <list-id>`,describe:`Patch Zero Trust list.`,builder:wC,handler:async e=>u({command:`zero-trust gateway lists edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway lists edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/lists/${e[`list-id`]==null?`<list-id>`:encodeURIComponent(String(e[`list-id`]))}`,pathParams:{"list-id":String(e[`list-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({append:d(e.append,`append`),remove:e.remove}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(CC,{body:t,account_id:a,list_id:e[`list-id`]}));s(r,{successLabel:`Updated`});return}let u=g({append:d(e.append,`append`),remove:e.remove}),p=await l(`Updating`,async()=>n.send(CC,{body:u,account_id:a,list_id:e[`list-id`]}));s(p,{successLabel:`Updated`})})};var EC={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/lists/${t.list_id}`};function DC(e){return e.usage(`$0 zero-trust gateway lists get <list-id>
|
|
817
817
|
|
|
818
|
-
Fetch a single Zero Trust list.`).positional(`list-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
818
|
+
Fetch a single Zero Trust list.`).positional(`list-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const OC={command:`get <list-id>`,describe:`Get Zero Trust list details`,builder:DC,handler:async e=>u({command:`zero-trust gateway lists get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway lists get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/lists/${e[`list-id`]==null?`<list-id>`:encodeURIComponent(String(e[`list-id`]))}`,pathParams:{"list-id":String(e[`list-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(EC,{account_id:a,list_id:e[`list-id`]}));s(u,{successLabel:`Loaded`})})};var kC={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/lists/${t.list_id}/items`,query:[`page`,`per_page`]};function AC(e){return e.usage(`$0 zero-trust gateway lists items list
|
|
819
819
|
|
|
820
|
-
Fetch all items in a single Zero Trust list.`).option(`list-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
820
|
+
Fetch all items in a single Zero Trust list.`).option(`list-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jC={command:`list`,describe:`Get Zero Trust list items`,builder:AC,handler:async e=>u({command:`zero-trust gateway lists items list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway lists items list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/lists/${e[`list-id`]==null?`<list-id>`:encodeURIComponent(String(e[`list-id`]))}/items`,pathParams:{"list-id":String(e[`list-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(kC,{account_id:u,list_id:e[`list-id`],...n}));s(d,{successLabel:`Loaded`})})},MC={command:`items`,describe:`Operations for gateway.lists.items`,builder:e=>e.command(jC).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var NC={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/lists`,query:[`type`,`filter`,`search`,`order_by`,`direction`]};function PC(e){return e.usage(`$0 zero-trust gateway lists list
|
|
821
821
|
|
|
822
|
-
Fetch all Zero Trust lists for an account.`).option(`type`,{type:`string`,description:`Specify the list type.`,choices:[`SERIAL`,`URL`,`DOMAIN`,`EMAIL`,`IP`,`CATEGORY`,`LOCATION`,`DEVICE`,`AAGUID`]}).option(`filter`,{type:`string`,description:"Filter the returned lists by one or more `field:value` pairs.\nRepeat the parameter to apply multiple filters; they are combined with\nlogical AND (a list must satisfy every filter to be returned).\n\nSupported fields and their matching behaviour:\n * `name` — case-insensitive substring match on the list name.\n * `id` — substring match on the list ID (UUID), with or without dashes.\n * `type` — exact match on the list type. Supersedes the legacy `type` query\n parameter when both are supplied. Must be one of the valid type values.\n * `item_count` — exact integer match on the number of items in the list.\n\nEach entry must match one of the per-field patterns below: the field must be\none of `name`, `id`, `type`, or `item_count`; `name`/`id` accept any value,\n`type` is restricted to the valid list type values, and `item_count` must be\na non-negative integer."}).option(`search`,{type:`string`,description:"Case-insensitive substring match on the list name or description. When\ncombined with `filter`, both must match (logical AND)."}).option(`order-by`,{type:`string`,description:"Field to sort the returned lists by. When omitted, results are ordered by\n`created_at` in ascending order (i.e. creation order) for backwards\ncompatibility. Supported values:\n * `name` — sort alphabetically by list name.\n * `created_at` — sort by creation time; defaults to descending unless `direction` is set.\n * `updated_at` — sort by last-modified time; defaults to descending unless `direction` is set.\n * `item_count` — sort by number of items in the list.",choices:[`name`,`created_at`,`updated_at`,`item_count`]}).option(`direction`,{type:`string`,description:"Sort direction. Applies to the field named in `order_by`; when `order_by`\nis omitted it applies to the default `created_at` ordering. When\n`direction` is omitted the default is field-specific: explicitly choosing\n`created_at` or `updated_at` defaults to descending (newest first); `name`\nand `item_count` default to ascending; and the default `created_at`\nordering used when `order_by` is omitted is ascending (for backwards\ncompatibility).\n * `asc` — ascending.\n * `desc` — descending.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
822
|
+
Fetch all Zero Trust lists for an account.`).option(`type`,{type:`string`,description:`Specify the list type.`,choices:[`SERIAL`,`URL`,`DOMAIN`,`EMAIL`,`IP`,`CATEGORY`,`LOCATION`,`DEVICE`,`AAGUID`]}).option(`filter`,{type:`string`,array:!0,description:"Filter the returned lists by one or more `field:value` pairs.\nRepeat the parameter to apply multiple filters; they are combined with\nlogical AND (a list must satisfy every filter to be returned).\n\nSupported fields and their matching behaviour:\n * `name` — case-insensitive substring match on the list name.\n * `id` — substring match on the list ID (UUID), with or without dashes.\n * `type` — exact match on the list type. Supersedes the legacy `type` query\n parameter when both are supplied. Must be one of the valid type values.\n * `item_count` — exact integer match on the number of items in the list.\n\nEach entry must match one of the per-field patterns below: the field must be\none of `name`, `id`, `type`, or `item_count`; `name`/`id` accept any value,\n`type` is restricted to the valid list type values, and `item_count` must be\na non-negative integer."}).option(`search`,{type:`string`,description:"Case-insensitive substring match on the list name or description. When\ncombined with `filter`, both must match (logical AND)."}).option(`order-by`,{type:`string`,description:"Field to sort the returned lists by. When omitted, results are ordered by\n`created_at` in ascending order (i.e. creation order) for backwards\ncompatibility. Supported values:\n * `name` — sort alphabetically by list name.\n * `created_at` — sort by creation time; defaults to descending unless `direction` is set.\n * `updated_at` — sort by last-modified time; defaults to descending unless `direction` is set.\n * `item_count` — sort by number of items in the list.",choices:[`name`,`created_at`,`updated_at`,`item_count`]}).option(`direction`,{type:`string`,description:"Sort direction. Applies to the field named in `order_by`; when `order_by`\nis omitted it applies to the default `created_at` ordering. When\n`direction` is omitted the default is field-specific: explicitly choosing\n`created_at` or `updated_at` defaults to descending (newest first); `name`\nand `item_count` default to ascending; and the default `created_at`\nordering used when `order_by` is omitted is ascending (for backwards\ncompatibility).\n * `asc` — ascending.\n * `desc` — descending.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const FC={command:`list`,describe:`List Zero Trust lists`,builder:PC,handler:async e=>u({command:`zero-trust gateway lists list`,classification:{safeFlags:[`type`,`order-by`,`direction`,`dry-run`]}},e,async()=>{let n={type:e.type,filter:e.filter,search:e.search,order_by:e[`order-by`],direction:e.direction};if(e.dryRun){let e=await i();c({command:`cf zero-trust gateway lists list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/gateway/lists`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(NC,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var IC={method:`PUT`,path:t=>e`/accounts/${t.account_id}/gateway/lists/${t.list_id}`,body:`json`};function LC(e){return e.usage(`$0 zero-trust gateway lists update <list-id>
|
|
823
823
|
|
|
824
|
-
Updates a configured Zero Trust list. Skips updating list items if not included in the payload. A non empty list items will overwrite the existing list.`).positional(`list-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`description`,{type:`string`,description:`Provide the list description.`}).option(`items`,{type:`string`,description:`Add items to the list. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`Specify the list name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
824
|
+
Updates a configured Zero Trust list. Skips updating list items if not included in the payload. A non empty list items will overwrite the existing list.`).positional(`list-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`description`,{type:`string`,description:`Provide the list description.`}).option(`items`,{type:`string`,description:`Add items to the list. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`Specify the list name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const RC={command:`update <list-id>`,describe:`Update Zero Trust list`,builder:LC,handler:async e=>u({command:`zero-trust gateway lists update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway lists update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/lists/${e[`list-id`]==null?`<list-id>`:encodeURIComponent(String(e[`list-id`]))}`,pathParams:{"list-id":String(e[`list-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),items:d(e.items,`items`),name:_(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(IC,{body:t,account_id:a,list_id:e[`list-id`]}));s(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await y(`name`,`Specify the list name.`));let u=g({description:_(e.description,`description`,`text`),items:d(e.items,`items`),name:_(e.name,`name`,`text`)}),p=await l(`Updating`,async()=>n.send(IC,{body:u,account_id:a,list_id:e[`list-id`]}));s(p,{successLabel:`Updated`})})},zC={command:`lists`,describe:`Operations for gateway.lists`,builder:e=>e.command(yC).command(SC).command(TC).command(OC).command(FC).command(RC).command(MC).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var BC={method:`POST`,path:t=>e`/accounts/${t.account_id}/gateway/locations`,body:`json`};function VC(e){return e.usage(`$0 zero-trust gateway locations create
|
|
825
825
|
|
|
826
|
-
Create a new Zero Trust Gateway location.`).option(`client-default`,{type:`boolean`,description:`Indicate whether this location is the default location.`,default:!1}).option(`dns64-enabled`,{type:`boolean`,description:`Enable DNS64 synthesis for DNS queries matched to this location. When updating a location, omitting this field resets it to false.`,default:!1}).option(`dns-destination-ips-id`,{type:`string`,description:`Specify the identifier of the pair of IPv4 addresses assigned to this location. When creating a location, if this field is absent or set to null, the pair of shared IPv4 addresses (0e4a32c6-6fb8-4858-9296-98f51631e8e6) is auto-assigned. When updating a location, if this field is absent or set to null, the pre-assigned pair remains unchanged.`}).option(`ecs-support`,{type:`boolean`,description:`Indicate whether the location must resolve EDNS queries.`,default:!1}).option(`endpoints-doh-enabled`,{type:`boolean`,description:`Indicate whether the DOH endpoint is enabled for this location.`}).option(`endpoints-doh-networks`,{type:`string`,description:`Specify the list of allowed source IP network ranges for this endpoint. When the list is empty, the endpoint allows all source IPs. The list takes effect only if the endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`endpoints-doh-require-token`,{type:`boolean`,description:`Specify whether the DOH endpoint requires user identity authentication.`}).option(`endpoints-dot-enabled`,{type:`boolean`,description:`Indicate whether the DOT endpoint is enabled for this location.`}).option(`endpoints-dot-networks`,{type:`string`,description:`Specify the list of allowed source IP network ranges for this endpoint. When the list is empty, the endpoint allows all source IPs. The list takes effect only if the endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`endpoints-ipv4-enabled`,{type:`boolean`,description:`Indicate whether the IPv4 endpoint is enabled for this location.`}).option(`endpoints-ipv6-enabled`,{type:`boolean`,description:`Indicate whether the IPV6 endpoint is enabled for this location.`}).option(`endpoints-ipv6-networks`,{type:`string`,description:`Specify the list of allowed source IPv6 network ranges for this endpoint. When the list is empty, the endpoint allows all source IPs. The list takes effect only if the endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`max-ttl-mode`,{type:`string`,description:"`inherit` uses the account `max_ttl_secs`. `override` uses this location's `ttl_secs`. `disabled` leaves returned TTLs unchanged.",choices:[`inherit`,`override`,`disabled`]}).coerce(`max-ttl-mode`,e=>_(e,`max-ttl-mode`,`text`)).option(`max-ttl-ttl-secs`,{type:`number`,description:"Location-specific cap on DNS response TTLs, in seconds. Required when `mode` is `override`. Must be omitted when `mode` is `inherit` or `disabled`."}).option(`name`,{type:`string`,description:`Specify the location name.`}).option(`networks`,{type:`string`,description:`Specify the list of network ranges from which requests at this location originate. The list takes effect only if it is non-empty and the IPv4 endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`max-ttl-mode`,`max-ttl-ttl-secs`].some(t=>e[t]!==void 0)){let t=[`max-ttl-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --max_ttl-* flag is set`)}return!0})}const
|
|
826
|
+
Create a new Zero Trust Gateway location.`).option(`client-default`,{type:`boolean`,description:`Indicate whether this location is the default location.`,default:!1}).option(`dns64-enabled`,{type:`boolean`,description:`Enable DNS64 synthesis for DNS queries matched to this location. When updating a location, omitting this field resets it to false.`,default:!1}).option(`dns-destination-ips-id`,{type:`string`,description:`Specify the identifier of the pair of IPv4 addresses assigned to this location. When creating a location, if this field is absent or set to null, the pair of shared IPv4 addresses (0e4a32c6-6fb8-4858-9296-98f51631e8e6) is auto-assigned. When updating a location, if this field is absent or set to null, the pre-assigned pair remains unchanged.`}).option(`ecs-support`,{type:`boolean`,description:`Indicate whether the location must resolve EDNS queries.`,default:!1}).option(`endpoints-doh-enabled`,{type:`boolean`,description:`Indicate whether the DOH endpoint is enabled for this location.`}).option(`endpoints-doh-networks`,{type:`string`,description:`Specify the list of allowed source IP network ranges for this endpoint. When the list is empty, the endpoint allows all source IPs. The list takes effect only if the endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`endpoints-doh-require-token`,{type:`boolean`,description:`Specify whether the DOH endpoint requires user identity authentication.`}).option(`endpoints-dot-enabled`,{type:`boolean`,description:`Indicate whether the DOT endpoint is enabled for this location.`}).option(`endpoints-dot-networks`,{type:`string`,description:`Specify the list of allowed source IP network ranges for this endpoint. When the list is empty, the endpoint allows all source IPs. The list takes effect only if the endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`endpoints-ipv4-enabled`,{type:`boolean`,description:`Indicate whether the IPv4 endpoint is enabled for this location.`}).option(`endpoints-ipv6-enabled`,{type:`boolean`,description:`Indicate whether the IPV6 endpoint is enabled for this location.`}).option(`endpoints-ipv6-networks`,{type:`string`,description:`Specify the list of allowed source IPv6 network ranges for this endpoint. When the list is empty, the endpoint allows all source IPs. The list takes effect only if the endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`max-ttl-mode`,{type:`string`,description:"`inherit` uses the account `max_ttl_secs`. `override` uses this location's `ttl_secs`. `disabled` leaves returned TTLs unchanged.",choices:[`inherit`,`override`,`disabled`]}).coerce(`max-ttl-mode`,e=>_(e,`max-ttl-mode`,`text`)).option(`max-ttl-ttl-secs`,{type:`number`,description:"Location-specific cap on DNS response TTLs, in seconds. Required when `mode` is `override`. Must be omitted when `mode` is `inherit` or `disabled`."}).option(`name`,{type:`string`,description:`Specify the location name.`}).option(`networks`,{type:`string`,description:`Specify the list of network ranges from which requests at this location originate. The list takes effect only if it is non-empty and the IPv4 endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`max-ttl-mode`,`max-ttl-ttl-secs`].some(t=>e[t]!==void 0)){let t=[`max-ttl-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --max_ttl-* flag is set`)}return!0})}const HC={command:`create`,describe:`Create a Zero Trust Gateway location`,builder:VC,handler:async e=>u({command:`zero-trust gateway locations create`,classification:{safeFlags:[`client-default`,`dns64-enabled`,`ecs-support`,`endpoints-doh-enabled`,`endpoints-doh-require-token`,`endpoints-dot-enabled`,`endpoints-ipv4-enabled`,`endpoints-ipv6-enabled`,`max-ttl-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway locations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/locations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({client_default:e[`client-default`],dns64_enabled:e[`dns64-enabled`],dns_destination_ips_id:_(e[`dns-destination-ips-id`],`dns-destination-ips-id`,`text`),ecs_support:e[`ecs-support`],endpoints:{doh:{enabled:e[`endpoints-doh-enabled`],networks:d(e[`endpoints-doh-networks`],`endpoints-doh-networks`),require_token:e[`endpoints-doh-require-token`]},dot:{enabled:e[`endpoints-dot-enabled`],networks:d(e[`endpoints-dot-networks`],`endpoints-dot-networks`)},ipv4:{enabled:e[`endpoints-ipv4-enabled`]},ipv6:{enabled:e[`endpoints-ipv6-enabled`],networks:d(e[`endpoints-ipv6-networks`],`endpoints-ipv6-networks`)}},max_ttl:{mode:e[`max-ttl-mode`],ttl_secs:e[`max-ttl-ttl-secs`]},name:_(e.name,`name`,`text`),networks:d(e.networks,`networks`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(BC,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`Specify the location name.`));let u=g({client_default:e[`client-default`],dns64_enabled:e[`dns64-enabled`],dns_destination_ips_id:_(e[`dns-destination-ips-id`],`dns-destination-ips-id`,`text`),ecs_support:e[`ecs-support`],endpoints:{doh:{enabled:e[`endpoints-doh-enabled`],networks:d(e[`endpoints-doh-networks`],`endpoints-doh-networks`),require_token:e[`endpoints-doh-require-token`]},dot:{enabled:e[`endpoints-dot-enabled`],networks:d(e[`endpoints-dot-networks`],`endpoints-dot-networks`)},ipv4:{enabled:e[`endpoints-ipv4-enabled`]},ipv6:{enabled:e[`endpoints-ipv6-enabled`],networks:d(e[`endpoints-ipv6-networks`],`endpoints-ipv6-networks`)}},max_ttl:{mode:e[`max-ttl-mode`],ttl_secs:e[`max-ttl-ttl-secs`]},name:_(e.name,`name`,`text`),networks:d(e.networks,`networks`)}),p=await l(`Creating`,async()=>n.send(BC,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var UC={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/gateway/locations/${t.location_id}`};function WC(e){return e.usage(`$0 zero-trust gateway locations delete <location-id>
|
|
827
827
|
|
|
828
|
-
Delete a configured Zero Trust Gateway location.`).positional(`location-id`,{type:`string`,description:`Location ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
828
|
+
Delete a configured Zero Trust Gateway location.`).positional(`location-id`,{type:`string`,description:`Location ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const GC={command:`delete <location-id>`,describe:`Delete a Zero Trust Gateway location`,builder:WC,handler:async e=>u({command:`zero-trust gateway locations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway locations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/locations/${e[`location-id`]==null?`<location-id>`:encodeURIComponent(String(e[`location-id`]))}`,pathParams:{"location-id":String(e[`location-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(UC,{account_id:a,location_id:e[`location-id`]}));s(u,{successLabel:`Deleted`})})};var KC={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/locations/${t.location_id}`};function qC(e){return e.usage(`$0 zero-trust gateway locations get <location-id>
|
|
829
829
|
|
|
830
|
-
Get a single Zero Trust Gateway location.`).positional(`location-id`,{type:`string`,description:`Location ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
830
|
+
Get a single Zero Trust Gateway location.`).positional(`location-id`,{type:`string`,description:`Location ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const JC={command:`get <location-id>`,describe:`Get Zero Trust Gateway location details`,builder:qC,handler:async e=>u({command:`zero-trust gateway locations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway locations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/locations/${e[`location-id`]==null?`<location-id>`:encodeURIComponent(String(e[`location-id`]))}`,pathParams:{"location-id":String(e[`location-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(KC,{account_id:a,location_id:e[`location-id`]}));s(u,{successLabel:`Loaded`})})};var YC={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/locations`,query:[`filter`,`search`,`order_by`,`direction`]};function XC(e){return e.usage(`$0 zero-trust gateway locations list
|
|
831
831
|
|
|
832
|
-
List Zero Trust Gateway locations for an account.`).option(`filter`,{type:`string`,description:"Filter the returned locations by one or more `field:value` pairs.\nRepeat the parameter to apply multiple filters; they are combined with\nlogical AND (a location must satisfy every filter to be returned).\n\nSupported fields and their matching behaviour:\n * `name` — case-insensitive substring match on the location name.\n * `id` — substring match on the location ID (UUID), with or without dashes.\n * `is_default` — whether it is the default for the account.\n\nEach entry must match one of the per-field patterns below:\n * the field must be one of `name`, `id`, or `is_default`;\n * `name`/`id` accept any value;\n * `is_default` only accepts `true` or `false`; any other value returns `400`"}).option(`search`,{type:`string`,description:"Case-insensitive substring match on the location name. When combined\nwith `filter`, both must match (logical AND)."}).option(`order-by`,{type:`string`,description:"Field to sort the returned locations by. When omitted, the order of\nresults is unspecified. Supported values:\n * `name` — sort alphabetically by location name.\n * `created_at` — sort by creation time; defaults to descending unless `direction` is set.\n * `updated_at` — sort by last-modified time; defaults to descending unless `direction` is set.",choices:[`name`,`created_at`,`updated_at`]}).option(`direction`,{type:`string`,description:"Sort direction. Only takes effect when `order_by` is also provided; it\nis ignored otherwise. When `direction` is omitted the effective\ndirection is field-specific: `created_at` and `updated_at` default to\ndescending (newest first); `name` defaults to ascending.\n * `asc` — ascending.\n * `desc` — descending.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
832
|
+
List Zero Trust Gateway locations for an account.`).option(`filter`,{type:`string`,array:!0,description:"Filter the returned locations by one or more `field:value` pairs.\nRepeat the parameter to apply multiple filters; they are combined with\nlogical AND (a location must satisfy every filter to be returned).\n\nSupported fields and their matching behaviour:\n * `name` — case-insensitive substring match on the location name.\n * `id` — substring match on the location ID (UUID), with or without dashes.\n * `is_default` — whether it is the default for the account.\n\nEach entry must match one of the per-field patterns below:\n * the field must be one of `name`, `id`, or `is_default`;\n * `name`/`id` accept any value;\n * `is_default` only accepts `true` or `false`; any other value returns `400`"}).option(`search`,{type:`string`,description:"Case-insensitive substring match on the location name. When combined\nwith `filter`, both must match (logical AND)."}).option(`order-by`,{type:`string`,description:"Field to sort the returned locations by. When omitted, the order of\nresults is unspecified. Supported values:\n * `name` — sort alphabetically by location name.\n * `created_at` — sort by creation time; defaults to descending unless `direction` is set.\n * `updated_at` — sort by last-modified time; defaults to descending unless `direction` is set.",choices:[`name`,`created_at`,`updated_at`]}).option(`direction`,{type:`string`,description:"Sort direction. Only takes effect when `order_by` is also provided; it\nis ignored otherwise. When `direction` is omitted the effective\ndirection is field-specific: `created_at` and `updated_at` default to\ndescending (newest first); `name` defaults to ascending.\n * `asc` — ascending.\n * `desc` — descending.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ZC={command:`list`,describe:`List Zero Trust Gateway locations`,builder:XC,handler:async e=>u({command:`zero-trust gateway locations list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},e,async()=>{let n={filter:e.filter,search:e.search,order_by:e[`order-by`],direction:e.direction};if(e.dryRun){let e=await i();c({command:`cf zero-trust gateway locations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/gateway/locations`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(YC,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var QC={method:`PUT`,path:t=>e`/accounts/${t.account_id}/gateway/locations/${t.location_id}`,body:`json`};function $C(e){return e.usage(`$0 zero-trust gateway locations update <location-id>
|
|
833
833
|
|
|
834
|
-
Update a configured Zero Trust Gateway location.`).positional(`location-id`,{type:`string`,description:`Location ID`,demandOption:!0}).option(`client-default`,{type:`boolean`,description:`Indicate whether this location is the default location.`}).option(`dns64-enabled`,{type:`boolean`,description:`Enable DNS64 synthesis for DNS queries matched to this location. When updating a location, omitting this field resets it to false.`}).option(`dns-destination-ips-id`,{type:`string`,description:`Specify the identifier of the pair of IPv4 addresses assigned to this location. When creating a location, if this field is absent or set to null, the pair of shared IPv4 addresses (0e4a32c6-6fb8-4858-9296-98f51631e8e6) is auto-assigned. When updating a location, if this field is absent or set to null, the pre-assigned pair remains unchanged.`}).option(`ecs-support`,{type:`boolean`,description:`Indicate whether the location must resolve EDNS queries.`}).option(`endpoints-doh-enabled`,{type:`boolean`,description:`Indicate whether the DOH endpoint is enabled for this location.`}).option(`endpoints-doh-networks`,{type:`string`,description:`Specify the list of allowed source IP network ranges for this endpoint. When the list is empty, the endpoint allows all source IPs. The list takes effect only if the endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`endpoints-doh-require-token`,{type:`boolean`,description:`Specify whether the DOH endpoint requires user identity authentication.`}).option(`endpoints-dot-enabled`,{type:`boolean`,description:`Indicate whether the DOT endpoint is enabled for this location.`}).option(`endpoints-dot-networks`,{type:`string`,description:`Specify the list of allowed source IP network ranges for this endpoint. When the list is empty, the endpoint allows all source IPs. The list takes effect only if the endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`endpoints-ipv4-enabled`,{type:`boolean`,description:`Indicate whether the IPv4 endpoint is enabled for this location.`}).option(`endpoints-ipv6-enabled`,{type:`boolean`,description:`Indicate whether the IPV6 endpoint is enabled for this location.`}).option(`endpoints-ipv6-networks`,{type:`string`,description:`Specify the list of allowed source IPv6 network ranges for this endpoint. When the list is empty, the endpoint allows all source IPs. The list takes effect only if the endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`max-ttl-mode`,{type:`string`,description:"`inherit` uses the account `max_ttl_secs`. `override` uses this location's `ttl_secs`. `disabled` leaves returned TTLs unchanged.",choices:[`inherit`,`override`,`disabled`]}).coerce(`max-ttl-mode`,e=>_(e,`max-ttl-mode`,`text`)).option(`max-ttl-ttl-secs`,{type:`number`,description:"Location-specific cap on DNS response TTLs, in seconds. Required when `mode` is `override`. Must be omitted when `mode` is `inherit` or `disabled`."}).option(`name`,{type:`string`,description:`Specify the location name.`}).option(`networks`,{type:`string`,description:`Specify the list of network ranges from which requests at this location originate. The list takes effect only if it is non-empty and the IPv4 endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`max-ttl-mode`,`max-ttl-ttl-secs`].some(t=>e[t]!==void 0)){let t=[`max-ttl-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --max_ttl-* flag is set`)}return!0})}const
|
|
834
|
+
Update a configured Zero Trust Gateway location.`).positional(`location-id`,{type:`string`,description:`Location ID`,demandOption:!0}).option(`client-default`,{type:`boolean`,description:`Indicate whether this location is the default location.`}).option(`dns64-enabled`,{type:`boolean`,description:`Enable DNS64 synthesis for DNS queries matched to this location. When updating a location, omitting this field resets it to false.`}).option(`dns-destination-ips-id`,{type:`string`,description:`Specify the identifier of the pair of IPv4 addresses assigned to this location. When creating a location, if this field is absent or set to null, the pair of shared IPv4 addresses (0e4a32c6-6fb8-4858-9296-98f51631e8e6) is auto-assigned. When updating a location, if this field is absent or set to null, the pre-assigned pair remains unchanged.`}).option(`ecs-support`,{type:`boolean`,description:`Indicate whether the location must resolve EDNS queries.`}).option(`endpoints-doh-enabled`,{type:`boolean`,description:`Indicate whether the DOH endpoint is enabled for this location.`}).option(`endpoints-doh-networks`,{type:`string`,description:`Specify the list of allowed source IP network ranges for this endpoint. When the list is empty, the endpoint allows all source IPs. The list takes effect only if the endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`endpoints-doh-require-token`,{type:`boolean`,description:`Specify whether the DOH endpoint requires user identity authentication.`}).option(`endpoints-dot-enabled`,{type:`boolean`,description:`Indicate whether the DOT endpoint is enabled for this location.`}).option(`endpoints-dot-networks`,{type:`string`,description:`Specify the list of allowed source IP network ranges for this endpoint. When the list is empty, the endpoint allows all source IPs. The list takes effect only if the endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`endpoints-ipv4-enabled`,{type:`boolean`,description:`Indicate whether the IPv4 endpoint is enabled for this location.`}).option(`endpoints-ipv6-enabled`,{type:`boolean`,description:`Indicate whether the IPV6 endpoint is enabled for this location.`}).option(`endpoints-ipv6-networks`,{type:`string`,description:`Specify the list of allowed source IPv6 network ranges for this endpoint. When the list is empty, the endpoint allows all source IPs. The list takes effect only if the endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`max-ttl-mode`,{type:`string`,description:"`inherit` uses the account `max_ttl_secs`. `override` uses this location's `ttl_secs`. `disabled` leaves returned TTLs unchanged.",choices:[`inherit`,`override`,`disabled`]}).coerce(`max-ttl-mode`,e=>_(e,`max-ttl-mode`,`text`)).option(`max-ttl-ttl-secs`,{type:`number`,description:"Location-specific cap on DNS response TTLs, in seconds. Required when `mode` is `override`. Must be omitted when `mode` is `inherit` or `disabled`."}).option(`name`,{type:`string`,description:`Specify the location name.`}).option(`networks`,{type:`string`,description:`Specify the list of network ranges from which requests at this location originate. The list takes effect only if it is non-empty and the IPv4 endpoint is enabled for this location. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`max-ttl-mode`,`max-ttl-ttl-secs`].some(t=>e[t]!==void 0)){let t=[`max-ttl-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --max_ttl-* flag is set`)}return!0})}const ew={command:`update <location-id>`,describe:`Update a Zero Trust Gateway location`,builder:$C,handler:async e=>u({command:`zero-trust gateway locations update`,classification:{safeFlags:[`client-default`,`dns64-enabled`,`ecs-support`,`endpoints-doh-enabled`,`endpoints-doh-require-token`,`endpoints-dot-enabled`,`endpoints-ipv4-enabled`,`endpoints-ipv6-enabled`,`max-ttl-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway locations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/locations/${e[`location-id`]==null?`<location-id>`:encodeURIComponent(String(e[`location-id`]))}`,pathParams:{"location-id":String(e[`location-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({client_default:e[`client-default`],dns64_enabled:e[`dns64-enabled`],dns_destination_ips_id:_(e[`dns-destination-ips-id`],`dns-destination-ips-id`,`text`),ecs_support:e[`ecs-support`],endpoints:{doh:{enabled:e[`endpoints-doh-enabled`],networks:d(e[`endpoints-doh-networks`],`endpoints-doh-networks`),require_token:e[`endpoints-doh-require-token`]},dot:{enabled:e[`endpoints-dot-enabled`],networks:d(e[`endpoints-dot-networks`],`endpoints-dot-networks`)},ipv4:{enabled:e[`endpoints-ipv4-enabled`]},ipv6:{enabled:e[`endpoints-ipv6-enabled`],networks:d(e[`endpoints-ipv6-networks`],`endpoints-ipv6-networks`)}},max_ttl:{mode:e[`max-ttl-mode`],ttl_secs:e[`max-ttl-ttl-secs`]},name:_(e.name,`name`,`text`),networks:d(e.networks,`networks`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(QC,{body:t,account_id:a,location_id:e[`location-id`]}));s(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await y(`name`,`Specify the location name.`));let u=g({client_default:e[`client-default`],dns64_enabled:e[`dns64-enabled`],dns_destination_ips_id:_(e[`dns-destination-ips-id`],`dns-destination-ips-id`,`text`),ecs_support:e[`ecs-support`],endpoints:{doh:{enabled:e[`endpoints-doh-enabled`],networks:d(e[`endpoints-doh-networks`],`endpoints-doh-networks`),require_token:e[`endpoints-doh-require-token`]},dot:{enabled:e[`endpoints-dot-enabled`],networks:d(e[`endpoints-dot-networks`],`endpoints-dot-networks`)},ipv4:{enabled:e[`endpoints-ipv4-enabled`]},ipv6:{enabled:e[`endpoints-ipv6-enabled`],networks:d(e[`endpoints-ipv6-networks`],`endpoints-ipv6-networks`)}},max_ttl:{mode:e[`max-ttl-mode`],ttl_secs:e[`max-ttl-ttl-secs`]},name:_(e.name,`name`,`text`),networks:d(e.networks,`networks`)}),p=await l(`Updating`,async()=>n.send(QC,{body:u,account_id:a,location_id:e[`location-id`]}));s(p,{successLabel:`Updated`})})},tw={command:`locations`,describe:`Operations for gateway.locations`,builder:e=>e.command(HC).command(GC).command(JC).command(ZC).command(ew).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var nw={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/logging`};function rw(e){return e.usage(`$0 zero-trust gateway logging get
|
|
835
835
|
|
|
836
|
-
Retrieve the current logging settings for the Zero Trust account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
836
|
+
Retrieve the current logging settings for the Zero Trust account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const iw={command:`get`,describe:`Get logging settings for the Zero Trust account`,builder:rw,handler:async e=>u({command:`zero-trust gateway logging get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust gateway logging get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/gateway/logging`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(nw,{account_id:a}));s(u,{successLabel:`Loaded`})})};var aw={method:`PUT`,path:t=>e`/accounts/${t.account_id}/gateway/logging`,body:`json`};function ow(e){return e.usage(`$0 zero-trust gateway logging update
|
|
837
837
|
|
|
838
|
-
Update logging settings for the current Zero Trust account.`).option(`redact-pii`,{type:`boolean`,description:`Indicate whether to redact personally identifiable information from activity logging (PII fields include source IP, user email, user ID, device ID, URL, referrer, and user agent).`}).option(`settings-by-rule-type-dns-log-all`,{type:`boolean`,description:`Specify whether to log all requests to this service.`}).option(`settings-by-rule-type-dns-log-blocks`,{type:`boolean`,description:`Specify whether to log only blocking requests to this service.`}).option(`settings-by-rule-type-http-log-all`,{type:`boolean`,description:`Specify whether to log all requests to this service.`}).option(`settings-by-rule-type-http-log-blocks`,{type:`boolean`,description:`Specify whether to log only blocking requests to this service.`}).option(`settings-by-rule-type-l4-log-all`,{type:`boolean`,description:`Specify whether to log all requests to this service.`}).option(`settings-by-rule-type-l4-log-blocks`,{type:`boolean`,description:`Specify whether to log only blocking requests to this service.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
838
|
+
Update logging settings for the current Zero Trust account.`).option(`redact-pii`,{type:`boolean`,description:`Indicate whether to redact personally identifiable information from activity logging (PII fields include source IP, user email, user ID, device ID, URL, referrer, and user agent).`}).option(`settings-by-rule-type-dns-log-all`,{type:`boolean`,description:`Specify whether to log all requests to this service.`}).option(`settings-by-rule-type-dns-log-blocks`,{type:`boolean`,description:`Specify whether to log only blocking requests to this service.`}).option(`settings-by-rule-type-http-log-all`,{type:`boolean`,description:`Specify whether to log all requests to this service.`}).option(`settings-by-rule-type-http-log-blocks`,{type:`boolean`,description:`Specify whether to log only blocking requests to this service.`}).option(`settings-by-rule-type-l4-log-all`,{type:`boolean`,description:`Specify whether to log all requests to this service.`}).option(`settings-by-rule-type-l4-log-blocks`,{type:`boolean`,description:`Specify whether to log only blocking requests to this service.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const sw={command:`update`,describe:`Update Zero Trust account logging settings`,builder:ow,handler:async e=>u({command:`zero-trust gateway logging update`,classification:{safeFlags:[`redact-pii`,`settings-by-rule-type-dns-log-all`,`settings-by-rule-type-dns-log-blocks`,`settings-by-rule-type-http-log-all`,`settings-by-rule-type-http-log-blocks`,`settings-by-rule-type-l4-log-all`,`settings-by-rule-type-l4-log-blocks`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway logging update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/logging`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({redact_pii:e[`redact-pii`],settings_by_rule_type:{dns:{log_all:e[`settings-by-rule-type-dns-log-all`],log_blocks:e[`settings-by-rule-type-dns-log-blocks`]},http:{log_all:e[`settings-by-rule-type-http-log-all`],log_blocks:e[`settings-by-rule-type-http-log-blocks`]},l4:{log_all:e[`settings-by-rule-type-l4-log-all`],log_blocks:e[`settings-by-rule-type-l4-log-blocks`]}}}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(aw,{body:t,account_id:a}));s(r,{successLabel:`Updated`});return}let u=g({redact_pii:e[`redact-pii`],settings_by_rule_type:{dns:{log_all:e[`settings-by-rule-type-dns-log-all`],log_blocks:e[`settings-by-rule-type-dns-log-blocks`]},http:{log_all:e[`settings-by-rule-type-http-log-all`],log_blocks:e[`settings-by-rule-type-http-log-blocks`]},l4:{log_all:e[`settings-by-rule-type-l4-log-all`],log_blocks:e[`settings-by-rule-type-l4-log-blocks`]}}}),d=await l(`Updating`,async()=>n.send(aw,{body:u,account_id:a}));s(d,{successLabel:`Updated`})})},cw={command:`logging`,describe:`Operations for gateway.logging`,builder:e=>e.command(iw).command(sw).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var lw={method:`POST`,path:t=>e`/accounts/${t.account_id}/gateway/pacfiles`,body:`json`};function uw(e){return e.usage(`$0 zero-trust gateway pacfiles create
|
|
839
839
|
|
|
840
|
-
Create a new Zero Trust Gateway PAC file.`).option(`contents`,{type:`string`,description:`Actual contents of the PAC file`}).option(`description`,{type:`string`,description:`Detailed description of the PAC file.`}).option(`name`,{type:`string`,description:`Name of the PAC file.`}).option(`slug`,{type:`string`,description:`URL-friendly version of the PAC file name. If not provided, it will be auto-generated`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
840
|
+
Create a new Zero Trust Gateway PAC file.`).option(`contents`,{type:`string`,description:`Actual contents of the PAC file`}).option(`description`,{type:`string`,description:`Detailed description of the PAC file.`}).option(`name`,{type:`string`,description:`Name of the PAC file.`}).option(`slug`,{type:`string`,description:`URL-friendly version of the PAC file name. If not provided, it will be auto-generated`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const dw={command:`create`,describe:`Create a PAC file`,builder:uw,handler:async e=>u({command:`zero-trust gateway pacfiles create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway pacfiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/pacfiles`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({contents:_(e.contents,`contents`,`text`),description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`),slug:_(e.slug,`slug`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(lw,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.contents===void 0&&(e.contents=await y(`contents`,`Actual contents of the PAC file`)),e.name===void 0&&(e.name=await y(`name`,`Name of the PAC file.`));let u=g({contents:_(e.contents,`contents`,`text`),description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`),slug:_(e.slug,`slug`,`text`)}),d=await l(`Creating`,async()=>n.send(lw,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var fw={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/gateway/pacfiles/${t.pacfile_id}`};function pw(e){return e.usage(`$0 zero-trust gateway pacfiles delete <pacfile-id>
|
|
841
841
|
|
|
842
|
-
Delete a configured Zero Trust Gateway PAC file.`).positional(`pacfile-id`,{type:`string`,description:`Pacfile ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
842
|
+
Delete a configured Zero Trust Gateway PAC file.`).positional(`pacfile-id`,{type:`string`,description:`Pacfile ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const mw={command:`delete <pacfile-id>`,describe:`Delete a PAC file`,builder:pw,handler:async e=>u({command:`zero-trust gateway pacfiles delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway pacfiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/pacfiles/${e[`pacfile-id`]==null?`<pacfile-id>`:encodeURIComponent(String(e[`pacfile-id`]))}`,pathParams:{"pacfile-id":String(e[`pacfile-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(fw,{account_id:a,pacfile_id:e[`pacfile-id`]}));s(u,{successLabel:`Deleted`})})};var hw={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/pacfiles/${t.pacfile_id}`};function gw(e){return e.usage(`$0 zero-trust gateway pacfiles get <pacfile-id>
|
|
843
843
|
|
|
844
|
-
Get a single Zero Trust Gateway PAC file.`).positional(`pacfile-id`,{type:`string`,description:`Pacfile ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
844
|
+
Get a single Zero Trust Gateway PAC file.`).positional(`pacfile-id`,{type:`string`,description:`Pacfile ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _w={command:`get <pacfile-id>`,describe:`Get a PAC file`,builder:gw,handler:async e=>u({command:`zero-trust gateway pacfiles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway pacfiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/pacfiles/${e[`pacfile-id`]==null?`<pacfile-id>`:encodeURIComponent(String(e[`pacfile-id`]))}`,pathParams:{"pacfile-id":String(e[`pacfile-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(hw,{account_id:a,pacfile_id:e[`pacfile-id`]}));s(u,{successLabel:`Loaded`})})};var vw={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/pacfiles`,query:[`page`,`per_page`]};function yw(e){return e.usage(`$0 zero-trust gateway pacfiles list
|
|
845
845
|
|
|
846
|
-
List all Zero Trust Gateway PAC files for an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
846
|
+
List all Zero Trust Gateway PAC files for an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bw={command:`list`,describe:`List PAC files`,builder:yw,handler:async e=>u({command:`zero-trust gateway pacfiles list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust gateway pacfiles list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/gateway/pacfiles`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(vw,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var xw={method:`PUT`,path:t=>e`/accounts/${t.account_id}/gateway/pacfiles/${t.pacfile_id}`,body:`json`};function Sw(e){return e.usage(`$0 zero-trust gateway pacfiles update <pacfile-id>
|
|
847
847
|
|
|
848
|
-
Update a configured Zero Trust Gateway PAC file.`).positional(`pacfile-id`,{type:`string`,description:`Pacfile ID`,demandOption:!0}).option(`contents`,{type:`string`,description:`Actual contents of the PAC file`}).option(`description`,{type:`string`,description:`Detailed description of the PAC file.`}).option(`name`,{type:`string`,description:`Name of the PAC file.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
848
|
+
Update a configured Zero Trust Gateway PAC file.`).positional(`pacfile-id`,{type:`string`,description:`Pacfile ID`,demandOption:!0}).option(`contents`,{type:`string`,description:`Actual contents of the PAC file`}).option(`description`,{type:`string`,description:`Detailed description of the PAC file.`}).option(`name`,{type:`string`,description:`Name of the PAC file.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Cw={command:`update <pacfile-id>`,describe:`Update a Zero Trust Gateway PAC file`,builder:Sw,handler:async e=>u({command:`zero-trust gateway pacfiles update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway pacfiles update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/pacfiles/${e[`pacfile-id`]==null?`<pacfile-id>`:encodeURIComponent(String(e[`pacfile-id`]))}`,pathParams:{"pacfile-id":String(e[`pacfile-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({contents:_(e.contents,`contents`,`text`),description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(xw,{body:t,account_id:a,pacfile_id:e[`pacfile-id`]}));s(r,{successLabel:`Updated`});return}e.contents===void 0&&(e.contents=await y(`contents`,`Actual contents of the PAC file`)),e.description===void 0&&(e.description=await y(`description`,`Detailed description of the PAC file.`)),e.name===void 0&&(e.name=await y(`name`,`Name of the PAC file.`));let u=g({contents:_(e.contents,`contents`,`text`),description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Updating`,async()=>n.send(xw,{body:u,account_id:a,pacfile_id:e[`pacfile-id`]}));s(d,{successLabel:`Updated`})})},ww={command:`pacfiles`,describe:`Operations for gateway.pacfiles`,builder:e=>e.command(dw).command(mw).command(_w).command(bw).command(Cw).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`POST`,path:t=>e`/accounts/${t.account_id}/gateway/proxy_endpoints`,body:`json`};function Tw(e){return e.usage(`$0 zero-trust gateway proxy-endpoints create
|
|
849
849
|
|
|
850
|
-
Create a new Zero Trust Gateway proxy endpoint.`).option(`kind`,{type:`string`,description:`The proxy endpoint kind.`,choices:[`ip`,`identity`],default:`ip`}).coerce(`kind`,e=>_(e,`kind`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ew={command:`create`,describe:`Create a proxy endpoint`,builder:Tw,handler:async e=>u({command:`zero-trust gateway proxy-endpoints create`,classification:{safeFlags:[`kind`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway proxy-endpoints create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/proxy_endpoints`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({kind:e.kind}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(
|
|
850
|
+
Create a new Zero Trust Gateway proxy endpoint.`).option(`kind`,{type:`string`,description:`The proxy endpoint kind.`,choices:[`ip`,`identity`],default:`ip`}).coerce(`kind`,e=>_(e,`kind`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ew={command:`create`,describe:`Create a proxy endpoint`,builder:Tw,handler:async e=>u({command:`zero-trust gateway proxy-endpoints create`,classification:{safeFlags:[`kind`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway proxy-endpoints create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/proxy_endpoints`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({kind:e.kind}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send($,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}let u=g({kind:e.kind}),d=await l(`Creating`,async()=>n.send($,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Dw={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/gateway/proxy_endpoints/${t.proxy_endpoint_id}`};function Ow(e){return e.usage(`$0 zero-trust gateway proxy-endpoints delete <proxy-endpoint-id>
|
|
851
851
|
|
|
852
852
|
Delete a configured Zero Trust Gateway proxy endpoint.`).positional(`proxy-endpoint-id`,{type:`string`,description:`Proxy endpoint ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const kw={command:`delete <proxy-endpoint-id>`,describe:`Delete a proxy endpoint`,builder:Ow,handler:async e=>u({command:`zero-trust gateway proxy-endpoints delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway proxy-endpoints delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/proxy_endpoints/${e[`proxy-endpoint-id`]==null?`<proxy-endpoint-id>`:encodeURIComponent(String(e[`proxy-endpoint-id`]))}`,pathParams:{"proxy-endpoint-id":String(e[`proxy-endpoint-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(Dw,{account_id:a,proxy_endpoint_id:e[`proxy-endpoint-id`]}));s(u,{successLabel:`Deleted`})})};var Aw={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/gateway/proxy_endpoints/${t.proxy_endpoint_id}`,body:`json`};function jw(e){return e.usage(`$0 zero-trust gateway proxy-endpoints edit <proxy-endpoint-id>
|
|
853
853
|
|
|
@@ -855,7 +855,7 @@ Update a configured Zero Trust Gateway proxy endpoint.`).positional(`proxy-endpo
|
|
|
855
855
|
|
|
856
856
|
Get a single Zero Trust Gateway proxy endpoint.`).positional(`proxy-endpoint-id`,{type:`string`,description:`Proxy endpoint ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fw={command:`get <proxy-endpoint-id>`,describe:`Get a proxy endpoint`,builder:Pw,handler:async e=>u({command:`zero-trust gateway proxy-endpoints get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway proxy-endpoints get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/proxy_endpoints/${e[`proxy-endpoint-id`]==null?`<proxy-endpoint-id>`:encodeURIComponent(String(e[`proxy-endpoint-id`]))}`,pathParams:{"proxy-endpoint-id":String(e[`proxy-endpoint-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Nw,{account_id:a,proxy_endpoint_id:e[`proxy-endpoint-id`]}));s(u,{successLabel:`Loaded`})})};var Iw={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/proxy_endpoints`,query:[`filter`,`search`,`order_by`,`direction`]};function Lw(e){return e.usage(`$0 zero-trust gateway proxy-endpoints list
|
|
857
857
|
|
|
858
|
-
List all Zero Trust Gateway proxy endpoints for an account.`).option(`filter`,{type:`string`,description:"Filter the returned proxy endpoints by one or more `field:value` pairs.\nRepeat the parameter to apply multiple filters; they are combined with\nlogical AND (an endpoint must satisfy every filter to be returned).\n\nSupported fields and their matching behaviour:\n * `name` — case-insensitive substring match on the endpoint name.\n * `id` — substring match on the endpoint ID (UUID), with or without dashes.\n * `kind` — exact match on the endpoint kind. The value must be `ip` or `identity`; any other value returns `400`.\n\nEach entry must match one of the per-field patterns below: the field\nmust be one of `name`, `id`, or `kind`; `name`/`id` accept any value,\nwhile `kind` only accepts `ip` or `identity`."}).option(`search`,{type:`string`,description:"Case-insensitive substring match on the endpoint name. When combined\nwith `filter`, both must match (logical AND)."}).option(`order-by`,{type:`string`,description:"Field to sort the returned endpoints by. When omitted, the order of\nresults is unspecified. Supported values:\n * `name` — sort alphabetically by endpoint name.\n * `created_at` — sort by creation time; defaults to descending unless `direction` is set.\n * `updated_at` — sort by last-modified time; defaults to descending unless `direction` is set.",choices:[`name`,`created_at`,`updated_at`]}).option(`direction`,{type:`string`,description:"Sort direction. Only takes effect when `order_by` is also provided; it\nis ignored otherwise. When `direction` is omitted the effective\ndirection is field-specific: `created_at` and `updated_at` default to\ndescending (newest first); `name` defaults to ascending.\n * `asc` — ascending.\n * `desc` — descending.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Rw={command:`list`,describe:`List proxy endpoints`,builder:Lw,handler:async e=>u({command:`zero-trust gateway proxy-endpoints list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},e,async()=>{let n={filter:e.filter,search:e.search,order_by:e[`order-by`],direction:e.direction};if(e.dryRun){let e=await i();c({command:`cf zero-trust gateway proxy-endpoints list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/gateway/proxy_endpoints`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Iw,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},zw={command:`proxy-endpoints`,describe:`Operations for gateway.proxy-endpoints`,builder:e=>e.command(Ew).command(kw).command(Mw).command(Fw).command(Rw).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Bw={method:`POST`,path:t=>e`/accounts/${t.account_id}/gateway/rules`,body:`json`};function Vw(e){return e.usage(`$0 zero-trust gateway rules create
|
|
858
|
+
List all Zero Trust Gateway proxy endpoints for an account.`).option(`filter`,{type:`string`,array:!0,description:"Filter the returned proxy endpoints by one or more `field:value` pairs.\nRepeat the parameter to apply multiple filters; they are combined with\nlogical AND (an endpoint must satisfy every filter to be returned).\n\nSupported fields and their matching behaviour:\n * `name` — case-insensitive substring match on the endpoint name.\n * `id` — substring match on the endpoint ID (UUID), with or without dashes.\n * `kind` — exact match on the endpoint kind. The value must be `ip` or `identity`; any other value returns `400`.\n\nEach entry must match one of the per-field patterns below: the field\nmust be one of `name`, `id`, or `kind`; `name`/`id` accept any value,\nwhile `kind` only accepts `ip` or `identity`."}).option(`search`,{type:`string`,description:"Case-insensitive substring match on the endpoint name. When combined\nwith `filter`, both must match (logical AND)."}).option(`order-by`,{type:`string`,description:"Field to sort the returned endpoints by. When omitted, the order of\nresults is unspecified. Supported values:\n * `name` — sort alphabetically by endpoint name.\n * `created_at` — sort by creation time; defaults to descending unless `direction` is set.\n * `updated_at` — sort by last-modified time; defaults to descending unless `direction` is set.",choices:[`name`,`created_at`,`updated_at`]}).option(`direction`,{type:`string`,description:"Sort direction. Only takes effect when `order_by` is also provided; it\nis ignored otherwise. When `direction` is omitted the effective\ndirection is field-specific: `created_at` and `updated_at` default to\ndescending (newest first); `name` defaults to ascending.\n * `asc` — ascending.\n * `desc` — descending.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Rw={command:`list`,describe:`List proxy endpoints`,builder:Lw,handler:async e=>u({command:`zero-trust gateway proxy-endpoints list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},e,async()=>{let n={filter:e.filter,search:e.search,order_by:e[`order-by`],direction:e.direction};if(e.dryRun){let e=await i();c({command:`cf zero-trust gateway proxy-endpoints list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/gateway/proxy_endpoints`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Iw,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},zw={command:`proxy-endpoints`,describe:`Operations for gateway.proxy-endpoints`,builder:e=>e.command(Ew).command(kw).command(Mw).command(Fw).command(Rw).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Bw={method:`POST`,path:t=>e`/accounts/${t.account_id}/gateway/rules`,body:`json`};function Vw(e){return e.usage(`$0 zero-trust gateway rules create
|
|
859
859
|
|
|
860
860
|
Create a new Zero Trust Gateway rule.`).option(`action`,{type:`string`,description:"Specify the action to perform when the associated traffic, identity, and device posture expressions either absent or evaluate to `true`.",choices:[`on`,`off`,`allow`,`block`,`scan`,`noscan`,`safesearch`,`ytrestricted`,`isolate`,`noisolate`,`override`,`l4_override`,`egress`,`resolve`,`quarantine`,`redirect`]}).coerce(`action`,e=>_(e,`action`,`text`)).option(`description`,{type:`string`,description:`Specify the rule description.`}).option(`device-posture`,{type:`string`,description:`Specify the wirefilter expression used for device posture check. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.`,default:``}).option(`enabled`,{type:`boolean`,description:`Specify whether the rule is enabled.`,default:!1}).option(`expiration-duration`,{type:`number`,description:"Defines the default duration a policy active in minutes. Must set in order to use the `reset_expiration` endpoint on this rule."}).option(`expiration-expires-at`,{type:`string`,description:`The expiration.expires_at field`}).option(`filters`,{type:`string`,array:!0,description:`Specify the protocol or layer to evaluate the traffic, identity, and device posture expressions. Can only contain a single value.`}).option(`identity`,{type:`string`,description:`Specify the wirefilter expression used for identity matching. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.`,default:``}).option(`name`,{type:`string`,description:`Specify the rule name.`}).option(`precedence`,{type:`number`,description:`Set the order of your rules. Lower values indicate higher precedence. At each processing phase, evaluate applicable rules in ascending order of this value. Refer to [Order of enforcement](http://developers.cloudflare.com/learning-paths/secure-internet-traffic/understand-policies/order-of-enforcement/#manage-precedence-with-terraform) to manage precedence via Terraform.`}).option(`rule-settings-add-headers`,{type:`string`,description:"Add custom headers to allowed requests as key-value pairs. Use header names as keys that map to arrays of header values. Header values may contain `@{selector.name}` variable references that are interpolated at the edge. Use `@@{` to escape a literal `@{`. A maximum of 20 header operations (add + set + delete) is allowed per policy. Each header name may not exceed 256 bytes and each header value may not exceed 4 KB. Settable only for `http` rules with the action set to `allow`. Provide as a JSON object or @path/to/file.json."}).option(`rule-settings-allow-child-bypass`,{type:`boolean`,description:`Set to enable MSP children to bypass this rule. Only parent MSP accounts can set this. this rule. Settable for all types of rules.`}).option(`rule-settings-biso-admin-controls-copy`,{type:`string`,description:`Configure copy behavior. If set to remote_only, users cannot copy isolated content from the remote browser to the local clipboard. If this field is absent, copying remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`,`remote_only`]}).coerce(`rule-settings-biso-admin-controls-copy`,e=>_(e,`rule-settings-biso-admin-controls-copy`,`text`)).option(`rule-settings-biso-admin-controls-dcp`,{type:`boolean`,description:'Set to false to enable copy-pasting. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-dd`,{type:`boolean`,description:'Set to false to enable downloading. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-dk`,{type:`boolean`,description:'Set to false to enable keyboard usage. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-download`,{type:`string`,description:`Configure download behavior. When set to remote_only, users can view downloads but cannot save them. If this field is absent, downloading remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`,`remote_only`]}).coerce(`rule-settings-biso-admin-controls-download`,e=>_(e,`rule-settings-biso-admin-controls-download`,`text`)).option(`rule-settings-biso-admin-controls-dp`,{type:`boolean`,description:'Set to false to enable printing. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-du`,{type:`boolean`,description:'Set to false to enable uploading. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-keyboard`,{type:`string`,description:`Configure keyboard usage behavior. If this field is absent, keyboard usage remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`]}).coerce(`rule-settings-biso-admin-controls-keyboard`,e=>_(e,`rule-settings-biso-admin-controls-keyboard`,`text`)).option(`rule-settings-biso-admin-controls-paste`,{type:`string`,description:`Configure paste behavior. If set to remote_only, users cannot paste content from the local clipboard into isolated pages. If this field is absent, pasting remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`,`remote_only`]}).coerce(`rule-settings-biso-admin-controls-paste`,e=>_(e,`rule-settings-biso-admin-controls-paste`,`text`)).option(`rule-settings-biso-admin-controls-printing`,{type:`string`,description:`Configure print behavior. Default, Printing is enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`]}).coerce(`rule-settings-biso-admin-controls-printing`,e=>_(e,`rule-settings-biso-admin-controls-printing`,`text`)).option(`rule-settings-biso-admin-controls-upload`,{type:`string`,description:`Configure upload behavior. If this field is absent, uploading remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`]}).coerce(`rule-settings-biso-admin-controls-upload`,e=>_(e,`rule-settings-biso-admin-controls-upload`,`text`)).option(`rule-settings-biso-admin-controls-version`,{type:`string`,description:`Indicate which version of the browser isolation controls should apply.`,choices:[`v1`,`v2`]}).coerce(`rule-settings-biso-admin-controls-version`,e=>_(e,`rule-settings-biso-admin-controls-version`,`text`)).option(`rule-settings-biso-admin-controls-wm-id`,{type:`string`,description:`Specify the watermark ID (UUID) to apply to the isolated browser session. When present, enables watermark rendering in the isolated browser.`}).option(`rule-settings-block-page-include-context`,{type:`boolean`,description:`Specify whether to pass the context information as query parameters.`}).option(`rule-settings-block-page-target-uri`,{type:`string`,description:`Specify the URI to which the user is redirected.`}).option(`rule-settings-block-page-enabled`,{type:`boolean`,description:"Enable the custom block page. Settable only for `dns` rules with action `block`."}).option(`rule-settings-block-reason`,{type:`string`,description:"Explain why the rule blocks the request. The custom block page shows this text (if enabled). Settable only for `dns`, `l4`, and `http` rules when the action set to `block`."}).option(`rule-settings-bypass-parent-rule`,{type:`boolean`,description:`Set to enable MSP accounts to bypass their parent's rules. Only MSP child accounts can set this. Settable for all types of rules.`}).option(`rule-settings-check-session-duration`,{type:`string`,description:`Sets the required session freshness threshold. The API returns a normalized version of this value.`}).option(`rule-settings-check-session-enforce`,{type:`boolean`,description:`Enable session enforcement.`}).option(`rule-settings-delete-headers`,{type:`string`,array:!0,description:"Remove headers from allowed requests by name. A maximum of 20 header operations (add + set + delete) is allowed per policy. Each header name may not exceed 256 bytes. Settable only for `http` rules with the action set to `allow`."}).option(`rule-settings-dns-resolvers-ipv4`,{type:`string`,description:`The rule_settings.dns_resolvers.ipv4 field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`rule-settings-dns-resolvers-ipv6`,{type:`string`,description:`The rule_settings.dns_resolvers.ipv6 field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`rule-settings-egress-ipv4`,{type:`string`,description:`Specify the IPv4 address to use for egress.`}).option(`rule-settings-egress-ipv4-fallback`,{type:`string`,description:`Specify the fallback IPv4 address to use for egress when the primary IPv4 fails. Set '0.0.0.0' to indicate local egress via WARP IPs.`}).option(`rule-settings-egress-ipv6`,{type:`string`,description:`Specify the IPv6 range to use for egress.`}).option(`rule-settings-forensic-copy-enabled`,{type:`boolean`,description:`Enable sending the copy to storage.`}).option(`rule-settings-ignore-cname-category-matches`,{type:`boolean`,description:"Ignore category matches at CNAME domains in a response. When off, evaluate categories in this rule against all CNAME domain categories in the response. Settable only for `dns` and `dns_resolver` rules."}).option(`rule-settings-insecure-disable-dnssec-validation`,{type:`boolean`,description:"Specify whether to disable DNSSEC validation (for Allow actions) [INSECURE]. Settable only for `dns` rules."}).option(`rule-settings-ip-categories`,{type:`boolean`,description:"Enable IPs in DNS resolver category blocks. The system blocks only domain name categories unless you enable this setting. Settable only for `dns` and `dns_resolver` rules."}).option(`rule-settings-ip-indicator-feeds`,{type:`boolean`,description:"Indicates whether to include IPs in DNS resolver indicator feed blocks. Default, indicator feeds block only domain names. Settable only for `dns` and `dns_resolver` rules."}).option(`rule-settings-l4override-ip`,{type:`string`,description:`Defines the IPv4 or IPv6 address.`}).option(`rule-settings-l4override-port`,{type:`number`,description:`Defines a port number to use for TCP/UDP overrides.`}).option(`rule-settings-notification-settings-enabled`,{type:`boolean`,description:`Enable notification.`}).option(`rule-settings-notification-settings-include-context`,{type:`boolean`,description:`Indicates whether to pass the context information as query parameters.`}).option(`rule-settings-notification-settings-msg`,{type:`string`,description:`Customize the message shown in the notification.`}).option(`rule-settings-notification-settings-support-url`,{type:`string`,description:`Defines an optional URL to direct users to additional information. If unset, the notification opens a block page.`}).option(`rule-settings-override-host`,{type:`string`,description:"Defines a hostname for override, for the matching DNS queries. Settable only for `dns` rules with the action set to `override`."}).option(`rule-settings-override-ips`,{type:`string`,array:!0,description:"Defines a an IP or set of IPs for overriding matched DNS queries. Settable only for `dns` rules with the action set to `override`."}).option(`rule-settings-payload-log-enabled`,{type:`boolean`,description:`Enable DLP payload logging for this rule.`}).option(`rule-settings-quarantine-file-types`,{type:`string`,array:!0,description:`Specify the types of files to sandbox.`}).option(`rule-settings-redirect-include-context`,{type:`boolean`,description:`Specify whether to pass the context information as query parameters.`}).option(`rule-settings-redirect-preserve-path-and-query`,{type:`boolean`,description:`Specify whether to append the path and query parameters from the original request to target_uri.`}).option(`rule-settings-redirect-target-uri`,{type:`string`,description:`Specify the URI to which the user is redirected.`}).option(`rule-settings-resolve-dns-internally-fallback`,{type:`string`,description:`Specify the fallback behavior to apply when the internal DNS response code differs from 'NOERROR' or when the response data contains only CNAME records for 'A' or 'AAAA' queries.`,choices:[`none`,`public_dns`]}).coerce(`rule-settings-resolve-dns-internally-fallback`,e=>_(e,`rule-settings-resolve-dns-internally-fallback`,`text`)).option(`rule-settings-resolve-dns-internally-view-id`,{type:`string`,description:`Specify the internal DNS view identifier to pass to the internal DNS service.`}).option(`rule-settings-resolve-dns-through-cloudflare`,{type:`boolean`,description:"Enable to send queries that match the policy to Cloudflare's default 1.1.1.1 DNS resolver. Cannot set when 'dns_resolvers' specified or 'resolve_dns_internally' is set. Only valid when a rule's action set to 'resolve'. Settable only for `dns_resolver` rules."}).option(`rule-settings-set-headers`,{type:`string`,description:"Replace existing headers on allowed requests with the specified key-value pairs. If a header does not exist, it is added. Header values may contain `@{selector.name}` variable references that are interpolated at the edge. Use `@@{` to escape a literal `@{`. A maximum of 20 header operations (add + set + delete) is allowed per policy. Each header name may not exceed 256 bytes and each header value may not exceed 4 KB. Settable only for `http` rules with the action set to `allow`. Provide as a JSON object or @path/to/file.json."}).option(`rule-settings-untrusted-cert-action`,{type:`string`,description:`Defines the action performed when an untrusted certificate seen. The default action an error with HTTP code 526.`,choices:[`pass_through`,`block`,`error`]}).coerce(`rule-settings-untrusted-cert-action`,e=>_(e,`rule-settings-untrusted-cert-action`,`text`)).option(`schedule-fri`,{type:`string`,description:`Specify the time intervals when the rule is active on Fridays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Fridays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-mon`,{type:`string`,description:`Specify the time intervals when the rule is active on Mondays, in the increasing order from 00:00-24:00(capped at maximum of 6 time splits). If this parameter omitted, the rule is deactivated on Mondays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-sat`,{type:`string`,description:`Specify the time intervals when the rule is active on Saturdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Saturdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-sun`,{type:`string`,description:`Specify the time intervals when the rule is active on Sundays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Sundays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-thu`,{type:`string`,description:`Specify the time intervals when the rule is active on Thursdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Thursdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-time-zone`,{type:`string`,description:`Specify the time zone for rule evaluation. When a [valid time zone city name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) is provided, Gateway always uses the current time for that time zone. When this parameter is omitted, Gateway uses the time zone determined from the user's IP address. Colo time zone is used when the user's IP address does not resolve to a location.`}).option(`schedule-tue`,{type:`string`,description:`Specify the time intervals when the rule is active on Tuesdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Tuesdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-wed`,{type:`string`,description:`Specify the time intervals when the rule is active on Wednesdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Wednesdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`traffic`,{type:`string`,description:`Specify the wirefilter expression used for traffic matching. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.`,default:``}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`expiration-duration`,`expiration-expires-at`].some(t=>e[t]!==void 0)){let t=[`expiration-expires-at`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --expiration-* flag is set`)}return!0}).check(e=>{if((/* @__PURE__ */ `rule-settings-add-headers.rule-settings-allow-child-bypass.rule-settings-biso-admin-controls-copy.rule-settings-biso-admin-controls-dcp.rule-settings-biso-admin-controls-dd.rule-settings-biso-admin-controls-dk.rule-settings-biso-admin-controls-download.rule-settings-biso-admin-controls-dp.rule-settings-biso-admin-controls-du.rule-settings-biso-admin-controls-keyboard.rule-settings-biso-admin-controls-paste.rule-settings-biso-admin-controls-printing.rule-settings-biso-admin-controls-upload.rule-settings-biso-admin-controls-version.rule-settings-biso-admin-controls-wm-id.rule-settings-block-page-include-context.rule-settings-block-page-target-uri.rule-settings-block-page-enabled.rule-settings-block-reason.rule-settings-bypass-parent-rule.rule-settings-check-session-duration.rule-settings-check-session-enforce.rule-settings-delete-headers.rule-settings-dns-resolvers-ipv4.rule-settings-dns-resolvers-ipv6.rule-settings-egress-ipv4.rule-settings-egress-ipv4-fallback.rule-settings-egress-ipv6.rule-settings-forensic-copy-enabled.rule-settings-ignore-cname-category-matches.rule-settings-insecure-disable-dnssec-validation.rule-settings-ip-categories.rule-settings-ip-indicator-feeds.rule-settings-l4override-ip.rule-settings-l4override-port.rule-settings-notification-settings-enabled.rule-settings-notification-settings-include-context.rule-settings-notification-settings-msg.rule-settings-notification-settings-support-url.rule-settings-override-host.rule-settings-override-ips.rule-settings-payload-log-enabled.rule-settings-quarantine-file-types.rule-settings-redirect-include-context.rule-settings-redirect-preserve-path-and-query.rule-settings-redirect-target-uri.rule-settings-resolve-dns-internally-fallback.rule-settings-resolve-dns-internally-view-id.rule-settings-resolve-dns-through-cloudflare.rule-settings-set-headers.rule-settings-untrusted-cert-action`.split(`.`)).some(t=>e[t]!==void 0)){let t=[`rule-settings-block-page-target-uri`,`rule-settings-redirect-target-uri`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --rule_settings-* flag is set`)}return!0})}const Hw={command:`create`,describe:`Create a Zero Trust Gateway rule`,builder:Vw,handler:async e=>u({command:`zero-trust gateway rules create`,classification:{safeFlags:/* @__PURE__ */ `action.enabled.rule-settings-allow-child-bypass.rule-settings-biso-admin-controls-copy.rule-settings-biso-admin-controls-dcp.rule-settings-biso-admin-controls-dd.rule-settings-biso-admin-controls-dk.rule-settings-biso-admin-controls-download.rule-settings-biso-admin-controls-dp.rule-settings-biso-admin-controls-du.rule-settings-biso-admin-controls-keyboard.rule-settings-biso-admin-controls-paste.rule-settings-biso-admin-controls-printing.rule-settings-biso-admin-controls-upload.rule-settings-biso-admin-controls-version.rule-settings-block-page-include-context.rule-settings-block-page-enabled.rule-settings-bypass-parent-rule.rule-settings-check-session-enforce.rule-settings-forensic-copy-enabled.rule-settings-ignore-cname-category-matches.rule-settings-insecure-disable-dnssec-validation.rule-settings-ip-categories.rule-settings-ip-indicator-feeds.rule-settings-notification-settings-enabled.rule-settings-notification-settings-include-context.rule-settings-payload-log-enabled.rule-settings-redirect-include-context.rule-settings-redirect-preserve-path-and-query.rule-settings-resolve-dns-internally-fallback.rule-settings-resolve-dns-through-cloudflare.rule-settings-untrusted-cert-action.dry-run`.split(`.`)}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({action:e.action,description:_(e.description,`description`,`text`),device_posture:_(e[`device-posture`],`device-posture`,`text`),enabled:e.enabled,expiration:{duration:e[`expiration-duration`],expires_at:_(e[`expiration-expires-at`],`expiration-expires-at`,`text`)},filters:e.filters,identity:_(e.identity,`identity`,`text`),name:_(e.name,`name`,`text`),precedence:e.precedence,rule_settings:{add_headers:m(e[`rule-settings-add-headers`],`rule-settings-add-headers`),allow_child_bypass:e[`rule-settings-allow-child-bypass`],biso_admin_controls:{copy:e[`rule-settings-biso-admin-controls-copy`],dcp:e[`rule-settings-biso-admin-controls-dcp`],dd:e[`rule-settings-biso-admin-controls-dd`],dk:e[`rule-settings-biso-admin-controls-dk`],download:e[`rule-settings-biso-admin-controls-download`],dp:e[`rule-settings-biso-admin-controls-dp`],du:e[`rule-settings-biso-admin-controls-du`],keyboard:e[`rule-settings-biso-admin-controls-keyboard`],paste:e[`rule-settings-biso-admin-controls-paste`],printing:e[`rule-settings-biso-admin-controls-printing`],upload:e[`rule-settings-biso-admin-controls-upload`],version:e[`rule-settings-biso-admin-controls-version`],wm_id:_(e[`rule-settings-biso-admin-controls-wm-id`],`rule-settings-biso-admin-controls-wm-id`,`text`)},block_page:{include_context:e[`rule-settings-block-page-include-context`],target_uri:_(e[`rule-settings-block-page-target-uri`],`rule-settings-block-page-target-uri`,`text`)},block_page_enabled:e[`rule-settings-block-page-enabled`],block_reason:_(e[`rule-settings-block-reason`],`rule-settings-block-reason`,`text`),bypass_parent_rule:e[`rule-settings-bypass-parent-rule`],check_session:{duration:_(e[`rule-settings-check-session-duration`],`rule-settings-check-session-duration`,`text`),enforce:e[`rule-settings-check-session-enforce`]},delete_headers:e[`rule-settings-delete-headers`],dns_resolvers:{ipv4:d(e[`rule-settings-dns-resolvers-ipv4`],`rule-settings-dns-resolvers-ipv4`),ipv6:d(e[`rule-settings-dns-resolvers-ipv6`],`rule-settings-dns-resolvers-ipv6`)},egress:{ipv4:_(e[`rule-settings-egress-ipv4`],`rule-settings-egress-ipv4`,`text`),ipv4_fallback:_(e[`rule-settings-egress-ipv4-fallback`],`rule-settings-egress-ipv4-fallback`,`text`),ipv6:_(e[`rule-settings-egress-ipv6`],`rule-settings-egress-ipv6`,`text`)},forensic_copy:{enabled:e[`rule-settings-forensic-copy-enabled`]},ignore_cname_category_matches:e[`rule-settings-ignore-cname-category-matches`],insecure_disable_dnssec_validation:e[`rule-settings-insecure-disable-dnssec-validation`],ip_categories:e[`rule-settings-ip-categories`],ip_indicator_feeds:e[`rule-settings-ip-indicator-feeds`],l4override:{ip:_(e[`rule-settings-l4override-ip`],`rule-settings-l4override-ip`,`text`),port:e[`rule-settings-l4override-port`]},notification_settings:{enabled:e[`rule-settings-notification-settings-enabled`],include_context:e[`rule-settings-notification-settings-include-context`],msg:_(e[`rule-settings-notification-settings-msg`],`rule-settings-notification-settings-msg`,`text`),support_url:_(e[`rule-settings-notification-settings-support-url`],`rule-settings-notification-settings-support-url`,`text`)},override_host:_(e[`rule-settings-override-host`],`rule-settings-override-host`,`text`),override_ips:e[`rule-settings-override-ips`],payload_log:{enabled:e[`rule-settings-payload-log-enabled`]},quarantine:{file_types:e[`rule-settings-quarantine-file-types`]},redirect:{include_context:e[`rule-settings-redirect-include-context`],preserve_path_and_query:e[`rule-settings-redirect-preserve-path-and-query`],target_uri:_(e[`rule-settings-redirect-target-uri`],`rule-settings-redirect-target-uri`,`text`)},resolve_dns_internally:{fallback:e[`rule-settings-resolve-dns-internally-fallback`],view_id:_(e[`rule-settings-resolve-dns-internally-view-id`],`rule-settings-resolve-dns-internally-view-id`,`text`)},resolve_dns_through_cloudflare:e[`rule-settings-resolve-dns-through-cloudflare`],set_headers:m(e[`rule-settings-set-headers`],`rule-settings-set-headers`),untrusted_cert:{action:e[`rule-settings-untrusted-cert-action`]}},schedule:{fri:_(e[`schedule-fri`],`schedule-fri`,`text`),mon:_(e[`schedule-mon`],`schedule-mon`,`text`),sat:_(e[`schedule-sat`],`schedule-sat`,`text`),sun:_(e[`schedule-sun`],`schedule-sun`,`text`),thu:_(e[`schedule-thu`],`schedule-thu`,`text`),time_zone:_(e[`schedule-time-zone`],`schedule-time-zone`,`text`),tue:_(e[`schedule-tue`],`schedule-tue`,`text`),wed:_(e[`schedule-wed`],`schedule-wed`,`text`)},traffic:_(e.traffic,`traffic`,`text`)},[[`rule_settings`,`add_headers`],[`rule_settings`,`set_headers`]]):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(Bw,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.action===void 0&&(e.action=await b(`action`,"Specify the action to perform when the associated traffic, identity, and device posture expressions either absent or evaluate to `true`.",[`on`,`off`,`allow`,`block`,`scan`,`noscan`,`safesearch`,`ytrestricted`,`isolate`,`noisolate`,`override`,`l4_override`,`egress`,`resolve`,`quarantine`,`redirect`])),e.name===void 0&&(e.name=await y(`name`,`Specify the rule name.`));let u=g({action:e.action,description:_(e.description,`description`,`text`),device_posture:_(e[`device-posture`],`device-posture`,`text`),enabled:e.enabled,expiration:{duration:e[`expiration-duration`],expires_at:_(e[`expiration-expires-at`],`expiration-expires-at`,`text`)},filters:e.filters,identity:_(e.identity,`identity`,`text`),name:_(e.name,`name`,`text`),precedence:e.precedence,rule_settings:{add_headers:m(e[`rule-settings-add-headers`],`rule-settings-add-headers`),allow_child_bypass:e[`rule-settings-allow-child-bypass`],biso_admin_controls:{copy:e[`rule-settings-biso-admin-controls-copy`],dcp:e[`rule-settings-biso-admin-controls-dcp`],dd:e[`rule-settings-biso-admin-controls-dd`],dk:e[`rule-settings-biso-admin-controls-dk`],download:e[`rule-settings-biso-admin-controls-download`],dp:e[`rule-settings-biso-admin-controls-dp`],du:e[`rule-settings-biso-admin-controls-du`],keyboard:e[`rule-settings-biso-admin-controls-keyboard`],paste:e[`rule-settings-biso-admin-controls-paste`],printing:e[`rule-settings-biso-admin-controls-printing`],upload:e[`rule-settings-biso-admin-controls-upload`],version:e[`rule-settings-biso-admin-controls-version`],wm_id:_(e[`rule-settings-biso-admin-controls-wm-id`],`rule-settings-biso-admin-controls-wm-id`,`text`)},block_page:{include_context:e[`rule-settings-block-page-include-context`],target_uri:_(e[`rule-settings-block-page-target-uri`],`rule-settings-block-page-target-uri`,`text`)},block_page_enabled:e[`rule-settings-block-page-enabled`],block_reason:_(e[`rule-settings-block-reason`],`rule-settings-block-reason`,`text`),bypass_parent_rule:e[`rule-settings-bypass-parent-rule`],check_session:{duration:_(e[`rule-settings-check-session-duration`],`rule-settings-check-session-duration`,`text`),enforce:e[`rule-settings-check-session-enforce`]},delete_headers:e[`rule-settings-delete-headers`],dns_resolvers:{ipv4:d(e[`rule-settings-dns-resolvers-ipv4`],`rule-settings-dns-resolvers-ipv4`),ipv6:d(e[`rule-settings-dns-resolvers-ipv6`],`rule-settings-dns-resolvers-ipv6`)},egress:{ipv4:_(e[`rule-settings-egress-ipv4`],`rule-settings-egress-ipv4`,`text`),ipv4_fallback:_(e[`rule-settings-egress-ipv4-fallback`],`rule-settings-egress-ipv4-fallback`,`text`),ipv6:_(e[`rule-settings-egress-ipv6`],`rule-settings-egress-ipv6`,`text`)},forensic_copy:{enabled:e[`rule-settings-forensic-copy-enabled`]},ignore_cname_category_matches:e[`rule-settings-ignore-cname-category-matches`],insecure_disable_dnssec_validation:e[`rule-settings-insecure-disable-dnssec-validation`],ip_categories:e[`rule-settings-ip-categories`],ip_indicator_feeds:e[`rule-settings-ip-indicator-feeds`],l4override:{ip:_(e[`rule-settings-l4override-ip`],`rule-settings-l4override-ip`,`text`),port:e[`rule-settings-l4override-port`]},notification_settings:{enabled:e[`rule-settings-notification-settings-enabled`],include_context:e[`rule-settings-notification-settings-include-context`],msg:_(e[`rule-settings-notification-settings-msg`],`rule-settings-notification-settings-msg`,`text`),support_url:_(e[`rule-settings-notification-settings-support-url`],`rule-settings-notification-settings-support-url`,`text`)},override_host:_(e[`rule-settings-override-host`],`rule-settings-override-host`,`text`),override_ips:e[`rule-settings-override-ips`],payload_log:{enabled:e[`rule-settings-payload-log-enabled`]},quarantine:{file_types:e[`rule-settings-quarantine-file-types`]},redirect:{include_context:e[`rule-settings-redirect-include-context`],preserve_path_and_query:e[`rule-settings-redirect-preserve-path-and-query`],target_uri:_(e[`rule-settings-redirect-target-uri`],`rule-settings-redirect-target-uri`,`text`)},resolve_dns_internally:{fallback:e[`rule-settings-resolve-dns-internally-fallback`],view_id:_(e[`rule-settings-resolve-dns-internally-view-id`],`rule-settings-resolve-dns-internally-view-id`,`text`)},resolve_dns_through_cloudflare:e[`rule-settings-resolve-dns-through-cloudflare`],set_headers:m(e[`rule-settings-set-headers`],`rule-settings-set-headers`),untrusted_cert:{action:e[`rule-settings-untrusted-cert-action`]}},schedule:{fri:_(e[`schedule-fri`],`schedule-fri`,`text`),mon:_(e[`schedule-mon`],`schedule-mon`,`text`),sat:_(e[`schedule-sat`],`schedule-sat`,`text`),sun:_(e[`schedule-sun`],`schedule-sun`,`text`),thu:_(e[`schedule-thu`],`schedule-thu`,`text`),time_zone:_(e[`schedule-time-zone`],`schedule-time-zone`,`text`),tue:_(e[`schedule-tue`],`schedule-tue`,`text`),wed:_(e[`schedule-wed`],`schedule-wed`,`text`)},traffic:_(e.traffic,`traffic`,`text`)},[[`rule_settings`,`add_headers`],[`rule_settings`,`set_headers`]]),p=await l(`Creating`,async()=>n.send(Bw,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Uw={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/gateway/rules/${t.rule_id}`};function Ww(e){return e.usage(`$0 zero-trust gateway rules delete <rule-id>
|
|
861
861
|
|
|
@@ -865,9 +865,9 @@ Get a single Zero Trust Gateway rule.`).positional(`rule-id`,{type:`string`,desc
|
|
|
865
865
|
|
|
866
866
|
List Zero Trust Gateway rules for the parent account of an account in the MSP configuration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Zw={command:`list-tenant`,describe:`List Zero Trust Gateway rules inherited from the parent account`,builder:Xw,handler:async e=>u({command:`zero-trust gateway rules list-tenant`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust gateway rules list-tenant`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/gateway/rules/tenant`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Yw,{account_id:a}));s(u,{successLabel:`Loaded`})})};var Qw={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/rules`,query:[`filter`,`search`,`order_by`,`direction`]};function $w(e){return e.usage(`$0 zero-trust gateway rules list
|
|
867
867
|
|
|
868
|
-
List Zero Trust Gateway rules for an account.`).option(`filter`,{type:`string`,description:"Filter the returned rules by one or more `field:value` pairs. Repeat the\nparameter to combine filters with logical AND.\n\nSupported fields are `name`, `id`, `action`, `enabled`, `source_account`,\n`is_shared`, `filters`, and `expression` (max 1024 bytes). The `source_account`\nvalue is matched as a normalized UUID substring. The `filters` value must\nbe one of the rule filter names and matches a member of the rule's `filters`\narray. The `expression` filter performs a case-insensitive literal\nsubstring match across traffic, identity, and device posture expressions."}).option(`search`,{type:`string`,description:`Case-insensitive substring search across rule name and description.`}).option(`order-by`,{type:`string`,description:"Field to sort the returned rules by. Supported values are `name`,\n`created_at`, `updated_at`, and `precedence`.",choices:[`name`,`created_at`,`updated_at`,`precedence`]}).option(`direction`,{type:`string`,description:"Sort direction. When `order_by` is omitted, this controls the direction\nof the existing precedence ordering. Shared rules remain first in either\ndirection. Accepted values are `asc` and `desc`.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const eT={command:`list`,describe:`List Zero Trust Gateway rules`,builder:$w,handler:async e=>u({command:`zero-trust gateway rules list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},e,async()=>{let n={filter:e.filter,search:e.search,order_by:e[`order-by`],direction:e.direction};if(e.dryRun){let e=await i();c({command:`cf zero-trust gateway rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/gateway/rules`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Qw,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var tT={method:`POST`,path:t=>e`/accounts/${t.account_id}/gateway/rules/${t.rule_id}/reset_expiration`};function nT(e){return e.usage("$0 zero-trust gateway rules reset-expiration <rule-id>\n\nResets the expiration of a Zero Trust Gateway Rule if its duration elapsed and it has a default duration. The Zero Trust Gateway Rule must have values for both `expiration.expires_at` and `expiration.duration`.").positional(`rule-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rT={command:`reset-expiration <rule-id>`,describe:`Reset the expiration of a Zero Trust Gateway Rule`,builder:nT,handler:async e=>u({command:`zero-trust gateway rules reset-expiration`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway rules reset-expiration`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}/reset_expiration`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Creating`,async()=>n.send(tT,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Created`})})};var iT={method:`PUT`,path:t=>e`/accounts/${t.account_id}/gateway/rules/${t.rule_id}`,body:`json`};function aT(e){return e.usage(`$0 zero-trust gateway rules update <rule-id>
|
|
868
|
+
List Zero Trust Gateway rules for an account.`).option(`filter`,{type:`string`,array:!0,description:"Filter the returned rules by one or more `field:value` pairs. Repeat the\nparameter to combine filters with logical AND.\n\nSupported fields are `name`, `id`, `action`, `enabled`, `source_account`,\n`is_shared`, `filters`, and `expression` (max 1024 bytes). The `source_account`\nvalue is matched as a normalized UUID substring. The `filters` value must\nbe one of the rule filter names and matches a member of the rule's `filters`\narray. The `expression` filter performs a case-insensitive literal\nsubstring match across traffic, identity, and device posture expressions."}).option(`search`,{type:`string`,description:`Case-insensitive substring search across rule name and description.`}).option(`order-by`,{type:`string`,description:"Field to sort the returned rules by. Supported values are `name`,\n`created_at`, `updated_at`, and `precedence`.",choices:[`name`,`created_at`,`updated_at`,`precedence`]}).option(`direction`,{type:`string`,description:"Sort direction. When `order_by` is omitted, this controls the direction\nof the existing precedence ordering. Shared rules remain first in either\ndirection. Accepted values are `asc` and `desc`.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const eT={command:`list`,describe:`List Zero Trust Gateway rules`,builder:$w,handler:async e=>u({command:`zero-trust gateway rules list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},e,async()=>{let n={filter:e.filter,search:e.search,order_by:e[`order-by`],direction:e.direction};if(e.dryRun){let e=await i();c({command:`cf zero-trust gateway rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/gateway/rules`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Qw,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var tT={method:`POST`,path:t=>e`/accounts/${t.account_id}/gateway/rules/${t.rule_id}/reset_expiration`};function nT(e){return e.usage("$0 zero-trust gateway rules reset-expiration <rule-id>\n\nResets the expiration of a Zero Trust Gateway Rule if its duration elapsed and it has a default duration. The Zero Trust Gateway Rule must have values for both `expiration.expires_at` and `expiration.duration`.").positional(`rule-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rT={command:`reset-expiration <rule-id>`,describe:`Reset the expiration of a Zero Trust Gateway Rule`,builder:nT,handler:async e=>u({command:`zero-trust gateway rules reset-expiration`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway rules reset-expiration`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}/reset_expiration`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Creating`,async()=>n.send(tT,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Created`})})};var iT={method:`PUT`,path:t=>e`/accounts/${t.account_id}/gateway/rules/${t.rule_id}`,body:`json`};function aT(e){return e.usage(`$0 zero-trust gateway rules update <rule-id>
|
|
869
869
|
|
|
870
|
-
Update a configured Zero Trust Gateway rule.`).positional(`rule-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`action`,{type:`string`,description:"Specify the action to perform when the associated traffic, identity, and device posture expressions either absent or evaluate to `true`.",choices:[`on`,`off`,`allow`,`block`,`scan`,`noscan`,`safesearch`,`ytrestricted`,`isolate`,`noisolate`,`override`,`l4_override`,`egress`,`resolve`,`quarantine`,`redirect`]}).coerce(`action`,e=>_(e,`action`,`text`)).option(`description`,{type:`string`,description:`Specify the rule description.`}).option(`device-posture`,{type:`string`,description:`Specify the wirefilter expression used for device posture check. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.`}).option(`enabled`,{type:`boolean`,description:`Specify whether the rule is enabled.`}).option(`expiration-duration`,{type:`number`,description:"Defines the default duration a policy active in minutes. Must set in order to use the `reset_expiration` endpoint on this rule."}).option(`expiration-expires-at`,{type:`string`,description:`The expiration.expires_at field`}).option(`filters`,{type:`string`,array:!0,description:`Specify the protocol or layer to evaluate the traffic, identity, and device posture expressions. Can only contain a single value.`}).option(`identity`,{type:`string`,description:`Specify the wirefilter expression used for identity matching. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.`}).option(`name`,{type:`string`,description:`Specify the rule name.`}).option(`precedence`,{type:`number`,description:`Set the order of your rules. Lower values indicate higher precedence. At each processing phase, evaluate applicable rules in ascending order of this value. Refer to [Order of enforcement](http://developers.cloudflare.com/learning-paths/secure-internet-traffic/understand-policies/order-of-enforcement/#manage-precedence-with-terraform) to manage precedence via Terraform.`}).option(`rule-settings-add-headers`,{type:`string`,description:"Add custom headers to allowed requests as key-value pairs. Use header names as keys that map to arrays of header values. Header values may contain `@{selector.name}` variable references that are interpolated at the edge. Use `@@{` to escape a literal `@{`. A maximum of 20 header operations (add + set + delete) is allowed per policy. Each header name may not exceed 256 bytes and each header value may not exceed 4 KB. Settable only for `http` rules with the action set to `allow`. Provide as a JSON object or @path/to/file.json."}).option(`rule-settings-allow-child-bypass`,{type:`boolean`,description:`Set to enable MSP children to bypass this rule. Only parent MSP accounts can set this. this rule. Settable for all types of rules.`}).option(`rule-settings-biso-admin-controls-copy`,{type:`string`,description:`Configure copy behavior. If set to remote_only, users cannot copy isolated content from the remote browser to the local clipboard. If this field is absent, copying remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`,`remote_only`]}).coerce(`rule-settings-biso-admin-controls-copy`,e=>_(e,`rule-settings-biso-admin-controls-copy`,`text`)).option(`rule-settings-biso-admin-controls-dcp`,{type:`boolean`,description:'Set to false to enable copy-pasting. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-dd`,{type:`boolean`,description:'Set to false to enable downloading. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-dk`,{type:`boolean`,description:'Set to false to enable keyboard usage. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-download`,{type:`string`,description:`Configure download behavior. When set to remote_only, users can view downloads but cannot save them. If this field is absent, downloading remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`,`remote_only`]}).coerce(`rule-settings-biso-admin-controls-download`,e=>_(e,`rule-settings-biso-admin-controls-download`,`text`)).option(`rule-settings-biso-admin-controls-dp`,{type:`boolean`,description:'Set to false to enable printing. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-du`,{type:`boolean`,description:'Set to false to enable uploading. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-keyboard`,{type:`string`,description:`Configure keyboard usage behavior. If this field is absent, keyboard usage remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`]}).coerce(`rule-settings-biso-admin-controls-keyboard`,e=>_(e,`rule-settings-biso-admin-controls-keyboard`,`text`)).option(`rule-settings-biso-admin-controls-paste`,{type:`string`,description:`Configure paste behavior. If set to remote_only, users cannot paste content from the local clipboard into isolated pages. If this field is absent, pasting remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`,`remote_only`]}).coerce(`rule-settings-biso-admin-controls-paste`,e=>_(e,`rule-settings-biso-admin-controls-paste`,`text`)).option(`rule-settings-biso-admin-controls-printing`,{type:`string`,description:`Configure print behavior. Default, Printing is enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`]}).coerce(`rule-settings-biso-admin-controls-printing`,e=>_(e,`rule-settings-biso-admin-controls-printing`,`text`)).option(`rule-settings-biso-admin-controls-upload`,{type:`string`,description:`Configure upload behavior. If this field is absent, uploading remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`]}).coerce(`rule-settings-biso-admin-controls-upload`,e=>_(e,`rule-settings-biso-admin-controls-upload`,`text`)).option(`rule-settings-biso-admin-controls-version`,{type:`string`,description:`Indicate which version of the browser isolation controls should apply.`,choices:[`v1`,`v2`]}).coerce(`rule-settings-biso-admin-controls-version`,e=>_(e,`rule-settings-biso-admin-controls-version`,`text`)).option(`rule-settings-biso-admin-controls-wm-id`,{type:`string`,description:`Specify the watermark ID (UUID) to apply to the isolated browser session. When present, enables watermark rendering in the isolated browser.`}).option(`rule-settings-block-page-include-context`,{type:`boolean`,description:`Specify whether to pass the context information as query parameters.`}).option(`rule-settings-block-page-target-uri`,{type:`string`,description:`Specify the URI to which the user is redirected.`}).option(`rule-settings-block-page-enabled`,{type:`boolean`,description:"Enable the custom block page. Settable only for `dns` rules with action `block`."}).option(`rule-settings-block-reason`,{type:`string`,description:"Explain why the rule blocks the request. The custom block page shows this text (if enabled). Settable only for `dns`, `l4`, and `http` rules when the action set to `block`."}).option(`rule-settings-bypass-parent-rule`,{type:`boolean`,description:`Set to enable MSP accounts to bypass their parent's rules. Only MSP child accounts can set this. Settable for all types of rules.`}).option(`rule-settings-check-session-duration`,{type:`string`,description:`Sets the required session freshness threshold. The API returns a normalized version of this value.`}).option(`rule-settings-check-session-enforce`,{type:`boolean`,description:`Enable session enforcement.`}).option(`rule-settings-delete-headers`,{type:`string`,array:!0,description:"Remove headers from allowed requests by name. A maximum of 20 header operations (add + set + delete) is allowed per policy. Each header name may not exceed 256 bytes. Settable only for `http` rules with the action set to `allow`."}).option(`rule-settings-dns-resolvers-ipv4`,{type:`string`,description:`The rule_settings.dns_resolvers.ipv4 field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`rule-settings-dns-resolvers-ipv6`,{type:`string`,description:`The rule_settings.dns_resolvers.ipv6 field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`rule-settings-egress-ipv4`,{type:`string`,description:`Specify the IPv4 address to use for egress.`}).option(`rule-settings-egress-ipv4-fallback`,{type:`string`,description:`Specify the fallback IPv4 address to use for egress when the primary IPv4 fails. Set '0.0.0.0' to indicate local egress via WARP IPs.`}).option(`rule-settings-egress-ipv6`,{type:`string`,description:`Specify the IPv6 range to use for egress.`}).option(`rule-settings-forensic-copy-enabled`,{type:`boolean`,description:`Enable sending the copy to storage.`}).option(`rule-settings-ignore-cname-category-matches`,{type:`boolean`,description:"Ignore category matches at CNAME domains in a response. When off, evaluate categories in this rule against all CNAME domain categories in the response. Settable only for `dns` and `dns_resolver` rules."}).option(`rule-settings-insecure-disable-dnssec-validation`,{type:`boolean`,description:"Specify whether to disable DNSSEC validation (for Allow actions) [INSECURE]. Settable only for `dns` rules."}).option(`rule-settings-ip-categories`,{type:`boolean`,description:"Enable IPs in DNS resolver category blocks. The system blocks only domain name categories unless you enable this setting. Settable only for `dns` and `dns_resolver` rules."}).option(`rule-settings-ip-indicator-feeds`,{type:`boolean`,description:"Indicates whether to include IPs in DNS resolver indicator feed blocks. Default, indicator feeds block only domain names. Settable only for `dns` and `dns_resolver` rules."}).option(`rule-settings-l4override-ip`,{type:`string`,description:`Defines the IPv4 or IPv6 address.`}).option(`rule-settings-l4override-port`,{type:`number`,description:`Defines a port number to use for TCP/UDP overrides.`}).option(`rule-settings-notification-settings-enabled`,{type:`boolean`,description:`Enable notification.`}).option(`rule-settings-notification-settings-include-context`,{type:`boolean`,description:`Indicates whether to pass the context information as query parameters.`}).option(`rule-settings-notification-settings-msg`,{type:`string`,description:`Customize the message shown in the notification.`}).option(`rule-settings-notification-settings-support-url`,{type:`string`,description:`Defines an optional URL to direct users to additional information. If unset, the notification opens a block page.`}).option(`rule-settings-override-host`,{type:`string`,description:"Defines a hostname for override, for the matching DNS queries. Settable only for `dns` rules with the action set to `override`."}).option(`rule-settings-override-ips`,{type:`string`,array:!0,description:"Defines a an IP or set of IPs for overriding matched DNS queries. Settable only for `dns` rules with the action set to `override`."}).option(`rule-settings-payload-log-enabled`,{type:`boolean`,description:`Enable DLP payload logging for this rule.`}).option(`rule-settings-quarantine-file-types`,{type:`string`,array:!0,description:`Specify the types of files to sandbox.`}).option(`rule-settings-redirect-include-context`,{type:`boolean`,description:`Specify whether to pass the context information as query parameters.`}).option(`rule-settings-redirect-preserve-path-and-query`,{type:`boolean`,description:`Specify whether to append the path and query parameters from the original request to target_uri.`}).option(`rule-settings-redirect-target-uri`,{type:`string`,description:`Specify the URI to which the user is redirected.`}).option(`rule-settings-resolve-dns-internally-fallback`,{type:`string`,description:`Specify the fallback behavior to apply when the internal DNS response code differs from 'NOERROR' or when the response data contains only CNAME records for 'A' or 'AAAA' queries.`,choices:[`none`,`public_dns`]}).coerce(`rule-settings-resolve-dns-internally-fallback`,e=>_(e,`rule-settings-resolve-dns-internally-fallback`,`text`)).option(`rule-settings-resolve-dns-internally-view-id`,{type:`string`,description:`Specify the internal DNS view identifier to pass to the internal DNS service.`}).option(`rule-settings-resolve-dns-through-cloudflare`,{type:`boolean`,description:"Enable to send queries that match the policy to Cloudflare's default 1.1.1.1 DNS resolver. Cannot set when 'dns_resolvers' specified or 'resolve_dns_internally' is set. Only valid when a rule's action set to 'resolve'. Settable only for `dns_resolver` rules."}).option(`rule-settings-set-headers`,{type:`string`,description:"Replace existing headers on allowed requests with the specified key-value pairs. If a header does not exist, it is added. Header values may contain `@{selector.name}` variable references that are interpolated at the edge. Use `@@{` to escape a literal `@{`. A maximum of 20 header operations (add + set + delete) is allowed per policy. Each header name may not exceed 256 bytes and each header value may not exceed 4 KB. Settable only for `http` rules with the action set to `allow`. Provide as a JSON object or @path/to/file.json."}).option(`rule-settings-untrusted-cert-action`,{type:`string`,description:`Defines the action performed when an untrusted certificate seen. The default action an error with HTTP code 526.`,choices:[`pass_through`,`block`,`error`]}).coerce(`rule-settings-untrusted-cert-action`,e=>_(e,`rule-settings-untrusted-cert-action`,`text`)).option(`schedule-fri`,{type:`string`,description:`Specify the time intervals when the rule is active on Fridays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Fridays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-mon`,{type:`string`,description:`Specify the time intervals when the rule is active on Mondays, in the increasing order from 00:00-24:00(capped at maximum of 6 time splits). If this parameter omitted, the rule is deactivated on Mondays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-sat`,{type:`string`,description:`Specify the time intervals when the rule is active on Saturdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Saturdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-sun`,{type:`string`,description:`Specify the time intervals when the rule is active on Sundays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Sundays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-thu`,{type:`string`,description:`Specify the time intervals when the rule is active on Thursdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Thursdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-time-zone`,{type:`string`,description:`Specify the time zone for rule evaluation. When a [valid time zone city name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) is provided, Gateway always uses the current time for that time zone. When this parameter is omitted, Gateway uses the time zone determined from the user's IP address. Colo time zone is used when the user's IP address does not resolve to a location.`}).option(`schedule-tue`,{type:`string`,description:`Specify the time intervals when the rule is active on Tuesdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Tuesdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-wed`,{type:`string`,description:`Specify the time intervals when the rule is active on Wednesdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Wednesdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`traffic`,{type:`string`,description:`Specify the wirefilter expression used for traffic matching. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`expiration-duration`,`expiration-expires-at`].some(t=>e[t]!==void 0)){let t=[`expiration-expires-at`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --expiration-* flag is set`)}return!0}).check(e=>{if((/* @__PURE__ */ `rule-settings-add-headers.rule-settings-allow-child-bypass.rule-settings-biso-admin-controls-copy.rule-settings-biso-admin-controls-dcp.rule-settings-biso-admin-controls-dd.rule-settings-biso-admin-controls-dk.rule-settings-biso-admin-controls-download.rule-settings-biso-admin-controls-dp.rule-settings-biso-admin-controls-du.rule-settings-biso-admin-controls-keyboard.rule-settings-biso-admin-controls-paste.rule-settings-biso-admin-controls-printing.rule-settings-biso-admin-controls-upload.rule-settings-biso-admin-controls-version.rule-settings-biso-admin-controls-wm-id.rule-settings-block-page-include-context.rule-settings-block-page-target-uri.rule-settings-block-page-enabled.rule-settings-block-reason.rule-settings-bypass-parent-rule.rule-settings-check-session-duration.rule-settings-check-session-enforce.rule-settings-delete-headers.rule-settings-dns-resolvers-ipv4.rule-settings-dns-resolvers-ipv6.rule-settings-egress-ipv4.rule-settings-egress-ipv4-fallback.rule-settings-egress-ipv6.rule-settings-forensic-copy-enabled.rule-settings-ignore-cname-category-matches.rule-settings-insecure-disable-dnssec-validation.rule-settings-ip-categories.rule-settings-ip-indicator-feeds.rule-settings-l4override-ip.rule-settings-l4override-port.rule-settings-notification-settings-enabled.rule-settings-notification-settings-include-context.rule-settings-notification-settings-msg.rule-settings-notification-settings-support-url.rule-settings-override-host.rule-settings-override-ips.rule-settings-payload-log-enabled.rule-settings-quarantine-file-types.rule-settings-redirect-include-context.rule-settings-redirect-preserve-path-and-query.rule-settings-redirect-target-uri.rule-settings-resolve-dns-internally-fallback.rule-settings-resolve-dns-internally-view-id.rule-settings-resolve-dns-through-cloudflare.rule-settings-set-headers.rule-settings-untrusted-cert-action`.split(`.`)).some(t=>e[t]!==void 0)){let t=[`rule-settings-block-page-target-uri`,`rule-settings-redirect-target-uri`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --rule_settings-* flag is set`)}return!0})}const oT={command:`update <rule-id>`,describe:`Update a Zero Trust Gateway rule`,builder:aT,handler:async e=>u({command:`zero-trust gateway rules update`,classification:{safeFlags:/* @__PURE__ */ `action.enabled.rule-settings-allow-child-bypass.rule-settings-biso-admin-controls-copy.rule-settings-biso-admin-controls-dcp.rule-settings-biso-admin-controls-dd.rule-settings-biso-admin-controls-dk.rule-settings-biso-admin-controls-download.rule-settings-biso-admin-controls-dp.rule-settings-biso-admin-controls-du.rule-settings-biso-admin-controls-keyboard.rule-settings-biso-admin-controls-paste.rule-settings-biso-admin-controls-printing.rule-settings-biso-admin-controls-upload.rule-settings-biso-admin-controls-version.rule-settings-block-page-include-context.rule-settings-block-page-enabled.rule-settings-bypass-parent-rule.rule-settings-check-session-enforce.rule-settings-forensic-copy-enabled.rule-settings-ignore-cname-category-matches.rule-settings-insecure-disable-dnssec-validation.rule-settings-ip-categories.rule-settings-ip-indicator-feeds.rule-settings-notification-settings-enabled.rule-settings-notification-settings-include-context.rule-settings-payload-log-enabled.rule-settings-redirect-include-context.rule-settings-redirect-preserve-path-and-query.rule-settings-resolve-dns-internally-fallback.rule-settings-resolve-dns-through-cloudflare.rule-settings-untrusted-cert-action.dry-run`.split(`.`)}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({action:e.action,description:_(e.description,`description`,`text`),device_posture:_(e[`device-posture`],`device-posture`,`text`),enabled:e.enabled,expiration:{duration:e[`expiration-duration`],expires_at:_(e[`expiration-expires-at`],`expiration-expires-at`,`text`)},filters:e.filters,identity:_(e.identity,`identity`,`text`),name:_(e.name,`name`,`text`),precedence:e.precedence,rule_settings:{add_headers:m(e[`rule-settings-add-headers`],`rule-settings-add-headers`),allow_child_bypass:e[`rule-settings-allow-child-bypass`],biso_admin_controls:{copy:e[`rule-settings-biso-admin-controls-copy`],dcp:e[`rule-settings-biso-admin-controls-dcp`],dd:e[`rule-settings-biso-admin-controls-dd`],dk:e[`rule-settings-biso-admin-controls-dk`],download:e[`rule-settings-biso-admin-controls-download`],dp:e[`rule-settings-biso-admin-controls-dp`],du:e[`rule-settings-biso-admin-controls-du`],keyboard:e[`rule-settings-biso-admin-controls-keyboard`],paste:e[`rule-settings-biso-admin-controls-paste`],printing:e[`rule-settings-biso-admin-controls-printing`],upload:e[`rule-settings-biso-admin-controls-upload`],version:e[`rule-settings-biso-admin-controls-version`],wm_id:_(e[`rule-settings-biso-admin-controls-wm-id`],`rule-settings-biso-admin-controls-wm-id`,`text`)},block_page:{include_context:e[`rule-settings-block-page-include-context`],target_uri:_(e[`rule-settings-block-page-target-uri`],`rule-settings-block-page-target-uri`,`text`)},block_page_enabled:e[`rule-settings-block-page-enabled`],block_reason:_(e[`rule-settings-block-reason`],`rule-settings-block-reason`,`text`),bypass_parent_rule:e[`rule-settings-bypass-parent-rule`],check_session:{duration:_(e[`rule-settings-check-session-duration`],`rule-settings-check-session-duration`,`text`),enforce:e[`rule-settings-check-session-enforce`]},delete_headers:e[`rule-settings-delete-headers`],dns_resolvers:{ipv4:d(e[`rule-settings-dns-resolvers-ipv4`],`rule-settings-dns-resolvers-ipv4`),ipv6:d(e[`rule-settings-dns-resolvers-ipv6`],`rule-settings-dns-resolvers-ipv6`)},egress:{ipv4:_(e[`rule-settings-egress-ipv4`],`rule-settings-egress-ipv4`,`text`),ipv4_fallback:_(e[`rule-settings-egress-ipv4-fallback`],`rule-settings-egress-ipv4-fallback`,`text`),ipv6:_(e[`rule-settings-egress-ipv6`],`rule-settings-egress-ipv6`,`text`)},forensic_copy:{enabled:e[`rule-settings-forensic-copy-enabled`]},ignore_cname_category_matches:e[`rule-settings-ignore-cname-category-matches`],insecure_disable_dnssec_validation:e[`rule-settings-insecure-disable-dnssec-validation`],ip_categories:e[`rule-settings-ip-categories`],ip_indicator_feeds:e[`rule-settings-ip-indicator-feeds`],l4override:{ip:_(e[`rule-settings-l4override-ip`],`rule-settings-l4override-ip`,`text`),port:e[`rule-settings-l4override-port`]},notification_settings:{enabled:e[`rule-settings-notification-settings-enabled`],include_context:e[`rule-settings-notification-settings-include-context`],msg:_(e[`rule-settings-notification-settings-msg`],`rule-settings-notification-settings-msg`,`text`),support_url:_(e[`rule-settings-notification-settings-support-url`],`rule-settings-notification-settings-support-url`,`text`)},override_host:_(e[`rule-settings-override-host`],`rule-settings-override-host`,`text`),override_ips:e[`rule-settings-override-ips`],payload_log:{enabled:e[`rule-settings-payload-log-enabled`]},quarantine:{file_types:e[`rule-settings-quarantine-file-types`]},redirect:{include_context:e[`rule-settings-redirect-include-context`],preserve_path_and_query:e[`rule-settings-redirect-preserve-path-and-query`],target_uri:_(e[`rule-settings-redirect-target-uri`],`rule-settings-redirect-target-uri`,`text`)},resolve_dns_internally:{fallback:e[`rule-settings-resolve-dns-internally-fallback`],view_id:_(e[`rule-settings-resolve-dns-internally-view-id`],`rule-settings-resolve-dns-internally-view-id`,`text`)},resolve_dns_through_cloudflare:e[`rule-settings-resolve-dns-through-cloudflare`],set_headers:m(e[`rule-settings-set-headers`],`rule-settings-set-headers`),untrusted_cert:{action:e[`rule-settings-untrusted-cert-action`]}},schedule:{fri:_(e[`schedule-fri`],`schedule-fri`,`text`),mon:_(e[`schedule-mon`],`schedule-mon`,`text`),sat:_(e[`schedule-sat`],`schedule-sat`,`text`),sun:_(e[`schedule-sun`],`schedule-sun`,`text`),thu:_(e[`schedule-thu`],`schedule-thu`,`text`),time_zone:_(e[`schedule-time-zone`],`schedule-time-zone`,`text`),tue:_(e[`schedule-tue`],`schedule-tue`,`text`),wed:_(e[`schedule-wed`],`schedule-wed`,`text`)},traffic:_(e.traffic,`traffic`,`text`)},[[`rule_settings`,`add_headers`],[`rule_settings`,`set_headers`]]):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(iT,{body:t,account_id:a,rule_id:e[`rule-id`]}));s(r,{successLabel:`Updated`});return}e.action===void 0&&(e.action=await b(`action`,"Specify the action to perform when the associated traffic, identity, and device posture expressions either absent or evaluate to `true`.",[`on`,`off`,`allow`,`block`,`scan`,`noscan`,`safesearch`,`ytrestricted`,`isolate`,`noisolate`,`override`,`l4_override`,`egress`,`resolve`,`quarantine`,`redirect`])),e.name===void 0&&(e.name=await y(`name`,`Specify the rule name.`));let u=g({action:e.action,description:_(e.description,`description`,`text`),device_posture:_(e[`device-posture`],`device-posture`,`text`),enabled:e.enabled,expiration:{duration:e[`expiration-duration`],expires_at:_(e[`expiration-expires-at`],`expiration-expires-at`,`text`)},filters:e.filters,identity:_(e.identity,`identity`,`text`),name:_(e.name,`name`,`text`),precedence:e.precedence,rule_settings:{add_headers:m(e[`rule-settings-add-headers`],`rule-settings-add-headers`),allow_child_bypass:e[`rule-settings-allow-child-bypass`],biso_admin_controls:{copy:e[`rule-settings-biso-admin-controls-copy`],dcp:e[`rule-settings-biso-admin-controls-dcp`],dd:e[`rule-settings-biso-admin-controls-dd`],dk:e[`rule-settings-biso-admin-controls-dk`],download:e[`rule-settings-biso-admin-controls-download`],dp:e[`rule-settings-biso-admin-controls-dp`],du:e[`rule-settings-biso-admin-controls-du`],keyboard:e[`rule-settings-biso-admin-controls-keyboard`],paste:e[`rule-settings-biso-admin-controls-paste`],printing:e[`rule-settings-biso-admin-controls-printing`],upload:e[`rule-settings-biso-admin-controls-upload`],version:e[`rule-settings-biso-admin-controls-version`],wm_id:_(e[`rule-settings-biso-admin-controls-wm-id`],`rule-settings-biso-admin-controls-wm-id`,`text`)},block_page:{include_context:e[`rule-settings-block-page-include-context`],target_uri:_(e[`rule-settings-block-page-target-uri`],`rule-settings-block-page-target-uri`,`text`)},block_page_enabled:e[`rule-settings-block-page-enabled`],block_reason:_(e[`rule-settings-block-reason`],`rule-settings-block-reason`,`text`),bypass_parent_rule:e[`rule-settings-bypass-parent-rule`],check_session:{duration:_(e[`rule-settings-check-session-duration`],`rule-settings-check-session-duration`,`text`),enforce:e[`rule-settings-check-session-enforce`]},delete_headers:e[`rule-settings-delete-headers`],dns_resolvers:{ipv4:d(e[`rule-settings-dns-resolvers-ipv4`],`rule-settings-dns-resolvers-ipv4`),ipv6:d(e[`rule-settings-dns-resolvers-ipv6`],`rule-settings-dns-resolvers-ipv6`)},egress:{ipv4:_(e[`rule-settings-egress-ipv4`],`rule-settings-egress-ipv4`,`text`),ipv4_fallback:_(e[`rule-settings-egress-ipv4-fallback`],`rule-settings-egress-ipv4-fallback`,`text`),ipv6:_(e[`rule-settings-egress-ipv6`],`rule-settings-egress-ipv6`,`text`)},forensic_copy:{enabled:e[`rule-settings-forensic-copy-enabled`]},ignore_cname_category_matches:e[`rule-settings-ignore-cname-category-matches`],insecure_disable_dnssec_validation:e[`rule-settings-insecure-disable-dnssec-validation`],ip_categories:e[`rule-settings-ip-categories`],ip_indicator_feeds:e[`rule-settings-ip-indicator-feeds`],l4override:{ip:_(e[`rule-settings-l4override-ip`],`rule-settings-l4override-ip`,`text`),port:e[`rule-settings-l4override-port`]},notification_settings:{enabled:e[`rule-settings-notification-settings-enabled`],include_context:e[`rule-settings-notification-settings-include-context`],msg:_(e[`rule-settings-notification-settings-msg`],`rule-settings-notification-settings-msg`,`text`),support_url:_(e[`rule-settings-notification-settings-support-url`],`rule-settings-notification-settings-support-url`,`text`)},override_host:_(e[`rule-settings-override-host`],`rule-settings-override-host`,`text`),override_ips:e[`rule-settings-override-ips`],payload_log:{enabled:e[`rule-settings-payload-log-enabled`]},quarantine:{file_types:e[`rule-settings-quarantine-file-types`]},redirect:{include_context:e[`rule-settings-redirect-include-context`],preserve_path_and_query:e[`rule-settings-redirect-preserve-path-and-query`],target_uri:_(e[`rule-settings-redirect-target-uri`],`rule-settings-redirect-target-uri`,`text`)},resolve_dns_internally:{fallback:e[`rule-settings-resolve-dns-internally-fallback`],view_id:_(e[`rule-settings-resolve-dns-internally-view-id`],`rule-settings-resolve-dns-internally-view-id`,`text`)},resolve_dns_through_cloudflare:e[`rule-settings-resolve-dns-through-cloudflare`],set_headers:m(e[`rule-settings-set-headers`],`rule-settings-set-headers`),untrusted_cert:{action:e[`rule-settings-untrusted-cert-action`]}},schedule:{fri:_(e[`schedule-fri`],`schedule-fri`,`text`),mon:_(e[`schedule-mon`],`schedule-mon`,`text`),sat:_(e[`schedule-sat`],`schedule-sat`,`text`),sun:_(e[`schedule-sun`],`schedule-sun`,`text`),thu:_(e[`schedule-thu`],`schedule-thu`,`text`),time_zone:_(e[`schedule-time-zone`],`schedule-time-zone`,`text`),tue:_(e[`schedule-tue`],`schedule-tue`,`text`),wed:_(e[`schedule-wed`],`schedule-wed`,`text`)},traffic:_(e.traffic,`traffic`,`text`)},[[`rule_settings`,`add_headers`],[`rule_settings`,`set_headers`]]),p=await l(`Updating`,async()=>n.send(iT,{body:u,account_id:a,rule_id:e[`rule-id`]}));s(p,{successLabel:`Updated`})})},sT={command:`rules`,describe:`Operations for gateway.rules`,builder:e=>e.command(Hw).command(Gw).command(Jw).command(eT).command(Zw).command(rT).command(oT).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},cT={command:`gateway`,describe:`Operations for gateway`,builder:e=>e.command(lC).command(gC).command(DS).command(jS).command(XS).command(oC).command(pC).command(RC).command(ew).command(sw).command(Cw).command(zw).command(sT).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var lT={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/identity_providers`,body:`json`};function uT(e){return e.usage(`$0 zero-trust identity-providers create
|
|
870
|
+
Update a configured Zero Trust Gateway rule.`).positional(`rule-id`,{type:`string`,description:`Identify the API resource with a UUID.`,demandOption:!0}).option(`action`,{type:`string`,description:"Specify the action to perform when the associated traffic, identity, and device posture expressions either absent or evaluate to `true`.",choices:[`on`,`off`,`allow`,`block`,`scan`,`noscan`,`safesearch`,`ytrestricted`,`isolate`,`noisolate`,`override`,`l4_override`,`egress`,`resolve`,`quarantine`,`redirect`]}).coerce(`action`,e=>_(e,`action`,`text`)).option(`description`,{type:`string`,description:`Specify the rule description.`}).option(`device-posture`,{type:`string`,description:`Specify the wirefilter expression used for device posture check. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.`}).option(`enabled`,{type:`boolean`,description:`Specify whether the rule is enabled.`}).option(`expiration-duration`,{type:`number`,description:"Defines the default duration a policy active in minutes. Must set in order to use the `reset_expiration` endpoint on this rule."}).option(`expiration-expires-at`,{type:`string`,description:`The expiration.expires_at field`}).option(`filters`,{type:`string`,array:!0,description:`Specify the protocol or layer to evaluate the traffic, identity, and device posture expressions. Can only contain a single value.`}).option(`identity`,{type:`string`,description:`Specify the wirefilter expression used for identity matching. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.`}).option(`name`,{type:`string`,description:`Specify the rule name.`}).option(`precedence`,{type:`number`,description:`Set the order of your rules. Lower values indicate higher precedence. At each processing phase, evaluate applicable rules in ascending order of this value. Refer to [Order of enforcement](http://developers.cloudflare.com/learning-paths/secure-internet-traffic/understand-policies/order-of-enforcement/#manage-precedence-with-terraform) to manage precedence via Terraform.`}).option(`rule-settings-add-headers`,{type:`string`,description:"Add custom headers to allowed requests as key-value pairs. Use header names as keys that map to arrays of header values. Header values may contain `@{selector.name}` variable references that are interpolated at the edge. Use `@@{` to escape a literal `@{`. A maximum of 20 header operations (add + set + delete) is allowed per policy. Each header name may not exceed 256 bytes and each header value may not exceed 4 KB. Settable only for `http` rules with the action set to `allow`. Provide as a JSON object or @path/to/file.json."}).option(`rule-settings-allow-child-bypass`,{type:`boolean`,description:`Set to enable MSP children to bypass this rule. Only parent MSP accounts can set this. this rule. Settable for all types of rules.`}).option(`rule-settings-biso-admin-controls-copy`,{type:`string`,description:`Configure copy behavior. If set to remote_only, users cannot copy isolated content from the remote browser to the local clipboard. If this field is absent, copying remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`,`remote_only`]}).coerce(`rule-settings-biso-admin-controls-copy`,e=>_(e,`rule-settings-biso-admin-controls-copy`,`text`)).option(`rule-settings-biso-admin-controls-dcp`,{type:`boolean`,description:'Set to false to enable copy-pasting. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-dd`,{type:`boolean`,description:'Set to false to enable downloading. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-dk`,{type:`boolean`,description:'Set to false to enable keyboard usage. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-download`,{type:`string`,description:`Configure download behavior. When set to remote_only, users can view downloads but cannot save them. If this field is absent, downloading remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`,`remote_only`]}).coerce(`rule-settings-biso-admin-controls-download`,e=>_(e,`rule-settings-biso-admin-controls-download`,`text`)).option(`rule-settings-biso-admin-controls-dp`,{type:`boolean`,description:'Set to false to enable printing. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-du`,{type:`boolean`,description:'Set to false to enable uploading. Only applies when `version == "v1"`.'}).option(`rule-settings-biso-admin-controls-keyboard`,{type:`string`,description:`Configure keyboard usage behavior. If this field is absent, keyboard usage remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`]}).coerce(`rule-settings-biso-admin-controls-keyboard`,e=>_(e,`rule-settings-biso-admin-controls-keyboard`,`text`)).option(`rule-settings-biso-admin-controls-paste`,{type:`string`,description:`Configure paste behavior. If set to remote_only, users cannot paste content from the local clipboard into isolated pages. If this field is absent, pasting remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`,`remote_only`]}).coerce(`rule-settings-biso-admin-controls-paste`,e=>_(e,`rule-settings-biso-admin-controls-paste`,`text`)).option(`rule-settings-biso-admin-controls-printing`,{type:`string`,description:`Configure print behavior. Default, Printing is enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`]}).coerce(`rule-settings-biso-admin-controls-printing`,e=>_(e,`rule-settings-biso-admin-controls-printing`,`text`)).option(`rule-settings-biso-admin-controls-upload`,{type:`string`,description:`Configure upload behavior. If this field is absent, uploading remains enabled. Applies only when version == "v2".`,choices:[`enabled`,`disabled`]}).coerce(`rule-settings-biso-admin-controls-upload`,e=>_(e,`rule-settings-biso-admin-controls-upload`,`text`)).option(`rule-settings-biso-admin-controls-version`,{type:`string`,description:`Indicate which version of the browser isolation controls should apply.`,choices:[`v1`,`v2`]}).coerce(`rule-settings-biso-admin-controls-version`,e=>_(e,`rule-settings-biso-admin-controls-version`,`text`)).option(`rule-settings-biso-admin-controls-wm-id`,{type:`string`,description:`Specify the watermark ID (UUID) to apply to the isolated browser session. When present, enables watermark rendering in the isolated browser.`}).option(`rule-settings-block-page-include-context`,{type:`boolean`,description:`Specify whether to pass the context information as query parameters.`}).option(`rule-settings-block-page-target-uri`,{type:`string`,description:`Specify the URI to which the user is redirected.`}).option(`rule-settings-block-page-enabled`,{type:`boolean`,description:"Enable the custom block page. Settable only for `dns` rules with action `block`."}).option(`rule-settings-block-reason`,{type:`string`,description:"Explain why the rule blocks the request. The custom block page shows this text (if enabled). Settable only for `dns`, `l4`, and `http` rules when the action set to `block`."}).option(`rule-settings-bypass-parent-rule`,{type:`boolean`,description:`Set to enable MSP accounts to bypass their parent's rules. Only MSP child accounts can set this. Settable for all types of rules.`}).option(`rule-settings-check-session-duration`,{type:`string`,description:`Sets the required session freshness threshold. The API returns a normalized version of this value.`}).option(`rule-settings-check-session-enforce`,{type:`boolean`,description:`Enable session enforcement.`}).option(`rule-settings-delete-headers`,{type:`string`,array:!0,description:"Remove headers from allowed requests by name. A maximum of 20 header operations (add + set + delete) is allowed per policy. Each header name may not exceed 256 bytes. Settable only for `http` rules with the action set to `allow`."}).option(`rule-settings-dns-resolvers-ipv4`,{type:`string`,description:`The rule_settings.dns_resolvers.ipv4 field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`rule-settings-dns-resolvers-ipv6`,{type:`string`,description:`The rule_settings.dns_resolvers.ipv6 field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`rule-settings-egress-ipv4`,{type:`string`,description:`Specify the IPv4 address to use for egress.`}).option(`rule-settings-egress-ipv4-fallback`,{type:`string`,description:`Specify the fallback IPv4 address to use for egress when the primary IPv4 fails. Set '0.0.0.0' to indicate local egress via WARP IPs.`}).option(`rule-settings-egress-ipv6`,{type:`string`,description:`Specify the IPv6 range to use for egress.`}).option(`rule-settings-forensic-copy-enabled`,{type:`boolean`,description:`Enable sending the copy to storage.`}).option(`rule-settings-ignore-cname-category-matches`,{type:`boolean`,description:"Ignore category matches at CNAME domains in a response. When off, evaluate categories in this rule against all CNAME domain categories in the response. Settable only for `dns` and `dns_resolver` rules."}).option(`rule-settings-insecure-disable-dnssec-validation`,{type:`boolean`,description:"Specify whether to disable DNSSEC validation (for Allow actions) [INSECURE]. Settable only for `dns` rules."}).option(`rule-settings-ip-categories`,{type:`boolean`,description:"Enable IPs in DNS resolver category blocks. The system blocks only domain name categories unless you enable this setting. Settable only for `dns` and `dns_resolver` rules."}).option(`rule-settings-ip-indicator-feeds`,{type:`boolean`,description:"Indicates whether to include IPs in DNS resolver indicator feed blocks. Default, indicator feeds block only domain names. Settable only for `dns` and `dns_resolver` rules."}).option(`rule-settings-l4override-ip`,{type:`string`,description:`Defines the IPv4 or IPv6 address.`}).option(`rule-settings-l4override-port`,{type:`number`,description:`Defines a port number to use for TCP/UDP overrides.`}).option(`rule-settings-notification-settings-enabled`,{type:`boolean`,description:`Enable notification.`}).option(`rule-settings-notification-settings-include-context`,{type:`boolean`,description:`Indicates whether to pass the context information as query parameters.`}).option(`rule-settings-notification-settings-msg`,{type:`string`,description:`Customize the message shown in the notification.`}).option(`rule-settings-notification-settings-support-url`,{type:`string`,description:`Defines an optional URL to direct users to additional information. If unset, the notification opens a block page.`}).option(`rule-settings-override-host`,{type:`string`,description:"Defines a hostname for override, for the matching DNS queries. Settable only for `dns` rules with the action set to `override`."}).option(`rule-settings-override-ips`,{type:`string`,array:!0,description:"Defines a an IP or set of IPs for overriding matched DNS queries. Settable only for `dns` rules with the action set to `override`."}).option(`rule-settings-payload-log-enabled`,{type:`boolean`,description:`Enable DLP payload logging for this rule.`}).option(`rule-settings-quarantine-file-types`,{type:`string`,array:!0,description:`Specify the types of files to sandbox.`}).option(`rule-settings-redirect-include-context`,{type:`boolean`,description:`Specify whether to pass the context information as query parameters.`}).option(`rule-settings-redirect-preserve-path-and-query`,{type:`boolean`,description:`Specify whether to append the path and query parameters from the original request to target_uri.`}).option(`rule-settings-redirect-target-uri`,{type:`string`,description:`Specify the URI to which the user is redirected.`}).option(`rule-settings-resolve-dns-internally-fallback`,{type:`string`,description:`Specify the fallback behavior to apply when the internal DNS response code differs from 'NOERROR' or when the response data contains only CNAME records for 'A' or 'AAAA' queries.`,choices:[`none`,`public_dns`]}).coerce(`rule-settings-resolve-dns-internally-fallback`,e=>_(e,`rule-settings-resolve-dns-internally-fallback`,`text`)).option(`rule-settings-resolve-dns-internally-view-id`,{type:`string`,description:`Specify the internal DNS view identifier to pass to the internal DNS service.`}).option(`rule-settings-resolve-dns-through-cloudflare`,{type:`boolean`,description:"Enable to send queries that match the policy to Cloudflare's default 1.1.1.1 DNS resolver. Cannot set when 'dns_resolvers' specified or 'resolve_dns_internally' is set. Only valid when a rule's action set to 'resolve'. Settable only for `dns_resolver` rules."}).option(`rule-settings-set-headers`,{type:`string`,description:"Replace existing headers on allowed requests with the specified key-value pairs. If a header does not exist, it is added. Header values may contain `@{selector.name}` variable references that are interpolated at the edge. Use `@@{` to escape a literal `@{`. A maximum of 20 header operations (add + set + delete) is allowed per policy. Each header name may not exceed 256 bytes and each header value may not exceed 4 KB. Settable only for `http` rules with the action set to `allow`. Provide as a JSON object or @path/to/file.json."}).option(`rule-settings-untrusted-cert-action`,{type:`string`,description:`Defines the action performed when an untrusted certificate seen. The default action an error with HTTP code 526.`,choices:[`pass_through`,`block`,`error`]}).coerce(`rule-settings-untrusted-cert-action`,e=>_(e,`rule-settings-untrusted-cert-action`,`text`)).option(`schedule-fri`,{type:`string`,description:`Specify the time intervals when the rule is active on Fridays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Fridays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-mon`,{type:`string`,description:`Specify the time intervals when the rule is active on Mondays, in the increasing order from 00:00-24:00(capped at maximum of 6 time splits). If this parameter omitted, the rule is deactivated on Mondays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-sat`,{type:`string`,description:`Specify the time intervals when the rule is active on Saturdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Saturdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-sun`,{type:`string`,description:`Specify the time intervals when the rule is active on Sundays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Sundays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-thu`,{type:`string`,description:`Specify the time intervals when the rule is active on Thursdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Thursdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-time-zone`,{type:`string`,description:`Specify the time zone for rule evaluation. When a [valid time zone city name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) is provided, Gateway always uses the current time for that time zone. When this parameter is omitted, Gateway uses the time zone determined from the user's IP address. Colo time zone is used when the user's IP address does not resolve to a location.`}).option(`schedule-tue`,{type:`string`,description:`Specify the time intervals when the rule is active on Tuesdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Tuesdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`schedule-wed`,{type:`string`,description:`Specify the time intervals when the rule is active on Wednesdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Wednesdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.`}).option(`traffic`,{type:`string`,description:`Specify the wirefilter expression used for traffic matching. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`expiration-duration`,`expiration-expires-at`].some(t=>e[t]!==void 0)){let t=[`expiration-expires-at`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --expiration-* flag is set`)}return!0}).check(e=>{if((/* @__PURE__ */ `rule-settings-add-headers.rule-settings-allow-child-bypass.rule-settings-biso-admin-controls-copy.rule-settings-biso-admin-controls-dcp.rule-settings-biso-admin-controls-dd.rule-settings-biso-admin-controls-dk.rule-settings-biso-admin-controls-download.rule-settings-biso-admin-controls-dp.rule-settings-biso-admin-controls-du.rule-settings-biso-admin-controls-keyboard.rule-settings-biso-admin-controls-paste.rule-settings-biso-admin-controls-printing.rule-settings-biso-admin-controls-upload.rule-settings-biso-admin-controls-version.rule-settings-biso-admin-controls-wm-id.rule-settings-block-page-include-context.rule-settings-block-page-target-uri.rule-settings-block-page-enabled.rule-settings-block-reason.rule-settings-bypass-parent-rule.rule-settings-check-session-duration.rule-settings-check-session-enforce.rule-settings-delete-headers.rule-settings-dns-resolvers-ipv4.rule-settings-dns-resolvers-ipv6.rule-settings-egress-ipv4.rule-settings-egress-ipv4-fallback.rule-settings-egress-ipv6.rule-settings-forensic-copy-enabled.rule-settings-ignore-cname-category-matches.rule-settings-insecure-disable-dnssec-validation.rule-settings-ip-categories.rule-settings-ip-indicator-feeds.rule-settings-l4override-ip.rule-settings-l4override-port.rule-settings-notification-settings-enabled.rule-settings-notification-settings-include-context.rule-settings-notification-settings-msg.rule-settings-notification-settings-support-url.rule-settings-override-host.rule-settings-override-ips.rule-settings-payload-log-enabled.rule-settings-quarantine-file-types.rule-settings-redirect-include-context.rule-settings-redirect-preserve-path-and-query.rule-settings-redirect-target-uri.rule-settings-resolve-dns-internally-fallback.rule-settings-resolve-dns-internally-view-id.rule-settings-resolve-dns-through-cloudflare.rule-settings-set-headers.rule-settings-untrusted-cert-action`.split(`.`)).some(t=>e[t]!==void 0)){let t=[`rule-settings-block-page-target-uri`,`rule-settings-redirect-target-uri`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --rule_settings-* flag is set`)}return!0})}const oT={command:`update <rule-id>`,describe:`Update a Zero Trust Gateway rule`,builder:aT,handler:async e=>u({command:`zero-trust gateway rules update`,classification:{safeFlags:/* @__PURE__ */ `action.enabled.rule-settings-allow-child-bypass.rule-settings-biso-admin-controls-copy.rule-settings-biso-admin-controls-dcp.rule-settings-biso-admin-controls-dd.rule-settings-biso-admin-controls-dk.rule-settings-biso-admin-controls-download.rule-settings-biso-admin-controls-dp.rule-settings-biso-admin-controls-du.rule-settings-biso-admin-controls-keyboard.rule-settings-biso-admin-controls-paste.rule-settings-biso-admin-controls-printing.rule-settings-biso-admin-controls-upload.rule-settings-biso-admin-controls-version.rule-settings-block-page-include-context.rule-settings-block-page-enabled.rule-settings-bypass-parent-rule.rule-settings-check-session-enforce.rule-settings-forensic-copy-enabled.rule-settings-ignore-cname-category-matches.rule-settings-insecure-disable-dnssec-validation.rule-settings-ip-categories.rule-settings-ip-indicator-feeds.rule-settings-notification-settings-enabled.rule-settings-notification-settings-include-context.rule-settings-payload-log-enabled.rule-settings-redirect-include-context.rule-settings-redirect-preserve-path-and-query.rule-settings-resolve-dns-internally-fallback.rule-settings-resolve-dns-through-cloudflare.rule-settings-untrusted-cert-action.dry-run`.split(`.`)}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({action:e.action,description:_(e.description,`description`,`text`),device_posture:_(e[`device-posture`],`device-posture`,`text`),enabled:e.enabled,expiration:{duration:e[`expiration-duration`],expires_at:_(e[`expiration-expires-at`],`expiration-expires-at`,`text`)},filters:e.filters,identity:_(e.identity,`identity`,`text`),name:_(e.name,`name`,`text`),precedence:e.precedence,rule_settings:{add_headers:m(e[`rule-settings-add-headers`],`rule-settings-add-headers`),allow_child_bypass:e[`rule-settings-allow-child-bypass`],biso_admin_controls:{copy:e[`rule-settings-biso-admin-controls-copy`],dcp:e[`rule-settings-biso-admin-controls-dcp`],dd:e[`rule-settings-biso-admin-controls-dd`],dk:e[`rule-settings-biso-admin-controls-dk`],download:e[`rule-settings-biso-admin-controls-download`],dp:e[`rule-settings-biso-admin-controls-dp`],du:e[`rule-settings-biso-admin-controls-du`],keyboard:e[`rule-settings-biso-admin-controls-keyboard`],paste:e[`rule-settings-biso-admin-controls-paste`],printing:e[`rule-settings-biso-admin-controls-printing`],upload:e[`rule-settings-biso-admin-controls-upload`],version:e[`rule-settings-biso-admin-controls-version`],wm_id:_(e[`rule-settings-biso-admin-controls-wm-id`],`rule-settings-biso-admin-controls-wm-id`,`text`)},block_page:{include_context:e[`rule-settings-block-page-include-context`],target_uri:_(e[`rule-settings-block-page-target-uri`],`rule-settings-block-page-target-uri`,`text`)},block_page_enabled:e[`rule-settings-block-page-enabled`],block_reason:_(e[`rule-settings-block-reason`],`rule-settings-block-reason`,`text`),bypass_parent_rule:e[`rule-settings-bypass-parent-rule`],check_session:{duration:_(e[`rule-settings-check-session-duration`],`rule-settings-check-session-duration`,`text`),enforce:e[`rule-settings-check-session-enforce`]},delete_headers:e[`rule-settings-delete-headers`],dns_resolvers:{ipv4:d(e[`rule-settings-dns-resolvers-ipv4`],`rule-settings-dns-resolvers-ipv4`),ipv6:d(e[`rule-settings-dns-resolvers-ipv6`],`rule-settings-dns-resolvers-ipv6`)},egress:{ipv4:_(e[`rule-settings-egress-ipv4`],`rule-settings-egress-ipv4`,`text`),ipv4_fallback:_(e[`rule-settings-egress-ipv4-fallback`],`rule-settings-egress-ipv4-fallback`,`text`),ipv6:_(e[`rule-settings-egress-ipv6`],`rule-settings-egress-ipv6`,`text`)},forensic_copy:{enabled:e[`rule-settings-forensic-copy-enabled`]},ignore_cname_category_matches:e[`rule-settings-ignore-cname-category-matches`],insecure_disable_dnssec_validation:e[`rule-settings-insecure-disable-dnssec-validation`],ip_categories:e[`rule-settings-ip-categories`],ip_indicator_feeds:e[`rule-settings-ip-indicator-feeds`],l4override:{ip:_(e[`rule-settings-l4override-ip`],`rule-settings-l4override-ip`,`text`),port:e[`rule-settings-l4override-port`]},notification_settings:{enabled:e[`rule-settings-notification-settings-enabled`],include_context:e[`rule-settings-notification-settings-include-context`],msg:_(e[`rule-settings-notification-settings-msg`],`rule-settings-notification-settings-msg`,`text`),support_url:_(e[`rule-settings-notification-settings-support-url`],`rule-settings-notification-settings-support-url`,`text`)},override_host:_(e[`rule-settings-override-host`],`rule-settings-override-host`,`text`),override_ips:e[`rule-settings-override-ips`],payload_log:{enabled:e[`rule-settings-payload-log-enabled`]},quarantine:{file_types:e[`rule-settings-quarantine-file-types`]},redirect:{include_context:e[`rule-settings-redirect-include-context`],preserve_path_and_query:e[`rule-settings-redirect-preserve-path-and-query`],target_uri:_(e[`rule-settings-redirect-target-uri`],`rule-settings-redirect-target-uri`,`text`)},resolve_dns_internally:{fallback:e[`rule-settings-resolve-dns-internally-fallback`],view_id:_(e[`rule-settings-resolve-dns-internally-view-id`],`rule-settings-resolve-dns-internally-view-id`,`text`)},resolve_dns_through_cloudflare:e[`rule-settings-resolve-dns-through-cloudflare`],set_headers:m(e[`rule-settings-set-headers`],`rule-settings-set-headers`),untrusted_cert:{action:e[`rule-settings-untrusted-cert-action`]}},schedule:{fri:_(e[`schedule-fri`],`schedule-fri`,`text`),mon:_(e[`schedule-mon`],`schedule-mon`,`text`),sat:_(e[`schedule-sat`],`schedule-sat`,`text`),sun:_(e[`schedule-sun`],`schedule-sun`,`text`),thu:_(e[`schedule-thu`],`schedule-thu`,`text`),time_zone:_(e[`schedule-time-zone`],`schedule-time-zone`,`text`),tue:_(e[`schedule-tue`],`schedule-tue`,`text`),wed:_(e[`schedule-wed`],`schedule-wed`,`text`)},traffic:_(e.traffic,`traffic`,`text`)},[[`rule_settings`,`add_headers`],[`rule_settings`,`set_headers`]]):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(iT,{body:t,account_id:a,rule_id:e[`rule-id`]}));s(r,{successLabel:`Updated`});return}e.action===void 0&&(e.action=await b(`action`,"Specify the action to perform when the associated traffic, identity, and device posture expressions either absent or evaluate to `true`.",[`on`,`off`,`allow`,`block`,`scan`,`noscan`,`safesearch`,`ytrestricted`,`isolate`,`noisolate`,`override`,`l4_override`,`egress`,`resolve`,`quarantine`,`redirect`])),e.name===void 0&&(e.name=await y(`name`,`Specify the rule name.`));let u=g({action:e.action,description:_(e.description,`description`,`text`),device_posture:_(e[`device-posture`],`device-posture`,`text`),enabled:e.enabled,expiration:{duration:e[`expiration-duration`],expires_at:_(e[`expiration-expires-at`],`expiration-expires-at`,`text`)},filters:e.filters,identity:_(e.identity,`identity`,`text`),name:_(e.name,`name`,`text`),precedence:e.precedence,rule_settings:{add_headers:m(e[`rule-settings-add-headers`],`rule-settings-add-headers`),allow_child_bypass:e[`rule-settings-allow-child-bypass`],biso_admin_controls:{copy:e[`rule-settings-biso-admin-controls-copy`],dcp:e[`rule-settings-biso-admin-controls-dcp`],dd:e[`rule-settings-biso-admin-controls-dd`],dk:e[`rule-settings-biso-admin-controls-dk`],download:e[`rule-settings-biso-admin-controls-download`],dp:e[`rule-settings-biso-admin-controls-dp`],du:e[`rule-settings-biso-admin-controls-du`],keyboard:e[`rule-settings-biso-admin-controls-keyboard`],paste:e[`rule-settings-biso-admin-controls-paste`],printing:e[`rule-settings-biso-admin-controls-printing`],upload:e[`rule-settings-biso-admin-controls-upload`],version:e[`rule-settings-biso-admin-controls-version`],wm_id:_(e[`rule-settings-biso-admin-controls-wm-id`],`rule-settings-biso-admin-controls-wm-id`,`text`)},block_page:{include_context:e[`rule-settings-block-page-include-context`],target_uri:_(e[`rule-settings-block-page-target-uri`],`rule-settings-block-page-target-uri`,`text`)},block_page_enabled:e[`rule-settings-block-page-enabled`],block_reason:_(e[`rule-settings-block-reason`],`rule-settings-block-reason`,`text`),bypass_parent_rule:e[`rule-settings-bypass-parent-rule`],check_session:{duration:_(e[`rule-settings-check-session-duration`],`rule-settings-check-session-duration`,`text`),enforce:e[`rule-settings-check-session-enforce`]},delete_headers:e[`rule-settings-delete-headers`],dns_resolvers:{ipv4:d(e[`rule-settings-dns-resolvers-ipv4`],`rule-settings-dns-resolvers-ipv4`),ipv6:d(e[`rule-settings-dns-resolvers-ipv6`],`rule-settings-dns-resolvers-ipv6`)},egress:{ipv4:_(e[`rule-settings-egress-ipv4`],`rule-settings-egress-ipv4`,`text`),ipv4_fallback:_(e[`rule-settings-egress-ipv4-fallback`],`rule-settings-egress-ipv4-fallback`,`text`),ipv6:_(e[`rule-settings-egress-ipv6`],`rule-settings-egress-ipv6`,`text`)},forensic_copy:{enabled:e[`rule-settings-forensic-copy-enabled`]},ignore_cname_category_matches:e[`rule-settings-ignore-cname-category-matches`],insecure_disable_dnssec_validation:e[`rule-settings-insecure-disable-dnssec-validation`],ip_categories:e[`rule-settings-ip-categories`],ip_indicator_feeds:e[`rule-settings-ip-indicator-feeds`],l4override:{ip:_(e[`rule-settings-l4override-ip`],`rule-settings-l4override-ip`,`text`),port:e[`rule-settings-l4override-port`]},notification_settings:{enabled:e[`rule-settings-notification-settings-enabled`],include_context:e[`rule-settings-notification-settings-include-context`],msg:_(e[`rule-settings-notification-settings-msg`],`rule-settings-notification-settings-msg`,`text`),support_url:_(e[`rule-settings-notification-settings-support-url`],`rule-settings-notification-settings-support-url`,`text`)},override_host:_(e[`rule-settings-override-host`],`rule-settings-override-host`,`text`),override_ips:e[`rule-settings-override-ips`],payload_log:{enabled:e[`rule-settings-payload-log-enabled`]},quarantine:{file_types:e[`rule-settings-quarantine-file-types`]},redirect:{include_context:e[`rule-settings-redirect-include-context`],preserve_path_and_query:e[`rule-settings-redirect-preserve-path-and-query`],target_uri:_(e[`rule-settings-redirect-target-uri`],`rule-settings-redirect-target-uri`,`text`)},resolve_dns_internally:{fallback:e[`rule-settings-resolve-dns-internally-fallback`],view_id:_(e[`rule-settings-resolve-dns-internally-view-id`],`rule-settings-resolve-dns-internally-view-id`,`text`)},resolve_dns_through_cloudflare:e[`rule-settings-resolve-dns-through-cloudflare`],set_headers:m(e[`rule-settings-set-headers`],`rule-settings-set-headers`),untrusted_cert:{action:e[`rule-settings-untrusted-cert-action`]}},schedule:{fri:_(e[`schedule-fri`],`schedule-fri`,`text`),mon:_(e[`schedule-mon`],`schedule-mon`,`text`),sat:_(e[`schedule-sat`],`schedule-sat`,`text`),sun:_(e[`schedule-sun`],`schedule-sun`,`text`),thu:_(e[`schedule-thu`],`schedule-thu`,`text`),time_zone:_(e[`schedule-time-zone`],`schedule-time-zone`,`text`),tue:_(e[`schedule-tue`],`schedule-tue`,`text`),wed:_(e[`schedule-wed`],`schedule-wed`,`text`)},traffic:_(e.traffic,`traffic`,`text`)},[[`rule_settings`,`add_headers`],[`rule_settings`,`set_headers`]]),p=await l(`Updating`,async()=>n.send(iT,{body:u,account_id:a,rule_id:e[`rule-id`]}));s(p,{successLabel:`Updated`})})},sT={command:`rules`,describe:`Operations for gateway.rules`,builder:e=>e.command(Hw).command(Gw).command(Jw).command(eT).command(Zw).command(rT).command(oT).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},cT={command:`gateway`,describe:`Operations for gateway`,builder:e=>e.command(lC).command(gC).command(DS).command(jS).command(XS).command(oC).command(pC).command(zC).command(tw).command(cw).command(ww).command(zw).command(sT).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var lT={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/identity_providers`,body:`json`};function uT(e){return e.usage(`$0 zero-trust identity-providers create
|
|
871
871
|
|
|
872
872
|
Adds a new identity provider to Access.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const dT={command:`create`,describe:`Add an Access identity provider`,builder:uT,handler:async e=>u({command:`zero-trust identity-providers create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf zero-trust identity-providers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/identity_providers`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?void 0:f(e.body)});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=d:e.accountId=d,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(lT,{body:t,account_or_zone:u,account_or_zone_id:d}));s(r,{successLabel:`Created`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var fT={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/identity_providers/${t.identity_provider_id}`};function pT(e){return e.usage(`$0 zero-trust identity-providers delete <identity-provider-id>
|
|
873
873
|
|
|
@@ -889,13 +889,13 @@ Deletes a SCIM Group resource from the identity provider's SCIM population.`).po
|
|
|
889
889
|
|
|
890
890
|
Returns a SCIM Group resource, including its direct members, synced to Cloudflare via the System for Cross-domain Identity Management (SCIM).`).positional(`group-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`identity-provider-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const UT={command:`get <group-id>`,describe:`Get a SCIM Group resource`,builder:HT,handler:async e=>u({command:`zero-trust identity-providers scim groups get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust identity-providers scim groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/identity_providers/${e[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(e[`identity-provider-id`]))}/scim/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"identity-provider-id":String(e[`identity-provider-id`]??``),"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(VT,{account_id:a,identity_provider_id:e[`identity-provider-id`],group_id:e[`group-id`]}));s(u,{successLabel:`Loaded`})})};var WT={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/identity_providers/${t.identity_provider_id}/scim/groups`,query:[`cf_resource_id`,`idp_resource_id`,`name`,`page`,`per_page`]};function GT(e){return e.usage(`$0 zero-trust identity-providers scim groups list
|
|
891
891
|
|
|
892
|
-
Lists SCIM Group resources synced to Cloudflare via the System for Cross-domain Identity Management (SCIM).`).option(`identity-provider-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`cf-resource-id`,{type:`string`,description:'The unique Cloudflare-generated Id of the SCIM Group resource; also known as the "Id".\nPass once for a single lookup (`?cf_resource_id=A`) or repeat the parameter\n(`?cf_resource_id=A&cf_resource_id=B`) to look up multiple groups in one request,\nup to 50 values. Mutually exclusive with `idp_resource_id`, `name`,\n`search_contains`, and `search_starts_with`.'}).option(`idp-resource-id`,{type:`string`,description:'The IdP-generated Id of the SCIM Group resource; also known as the "external Id".\nPass once for a single lookup (`?idp_resource_id=A`) or repeat the parameter\n(`?idp_resource_id=A&idp_resource_id=B`) to look up multiple groups in one request,\nup to 50 values. Mutually exclusive with `cf_resource_id`, `name`,\n`search_contains`, and `search_starts_with`.'}).option(`name`,{type:`string`,description:`The display name of the SCIM Group resource.`}).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const KT={command:`list`,describe:`List SCIM Group resources`,builder:GT,handler:async e=>u({command:`zero-trust identity-providers scim groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={cf_resource_id:e[`cf-resource-id`],idp_resource_id:e[`idp-resource-id`],name:e.name,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await i();c({command:`cf zero-trust identity-providers scim groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/identity_providers/${e[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(e[`identity-provider-id`]))}/scim/groups`,pathParams:{"identity-provider-id":String(e[`identity-provider-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(WT,{account_id:u,identity_provider_id:e[`identity-provider-id`],...n}));s(d,{successLabel:`Loaded`})})},qT={command:`groups`,describe:`Operations for identity-providers.scim.groups`,builder:e=>e.command(BT).command(UT).command(KT).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var JT={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/identity_providers/${t.identity_provider_id}/scim/users/${t.user_id}`,response:!1};function YT(e){return e.usage(`$0 zero-trust identity-providers scim users delete <user-id>
|
|
892
|
+
Lists SCIM Group resources synced to Cloudflare via the System for Cross-domain Identity Management (SCIM).`).option(`identity-provider-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`cf-resource-id`,{type:`string`,array:!0,description:'The unique Cloudflare-generated Id of the SCIM Group resource; also known as the "Id".\nPass once for a single lookup (`?cf_resource_id=A`) or repeat the parameter\n(`?cf_resource_id=A&cf_resource_id=B`) to look up multiple groups in one request,\nup to 50 values. Mutually exclusive with `idp_resource_id`, `name`,\n`search_contains`, and `search_starts_with`.'}).option(`idp-resource-id`,{type:`string`,array:!0,description:'The IdP-generated Id of the SCIM Group resource; also known as the "external Id".\nPass once for a single lookup (`?idp_resource_id=A`) or repeat the parameter\n(`?idp_resource_id=A&idp_resource_id=B`) to look up multiple groups in one request,\nup to 50 values. Mutually exclusive with `cf_resource_id`, `name`,\n`search_contains`, and `search_starts_with`.'}).option(`name`,{type:`string`,description:`The display name of the SCIM Group resource.`}).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const KT={command:`list`,describe:`List SCIM Group resources`,builder:GT,handler:async e=>u({command:`zero-trust identity-providers scim groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={cf_resource_id:e[`cf-resource-id`],idp_resource_id:e[`idp-resource-id`],name:e.name,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await i();c({command:`cf zero-trust identity-providers scim groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/identity_providers/${e[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(e[`identity-provider-id`]))}/scim/groups`,pathParams:{"identity-provider-id":String(e[`identity-provider-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(WT,{account_id:u,identity_provider_id:e[`identity-provider-id`],...n}));s(d,{successLabel:`Loaded`})})},qT={command:`groups`,describe:`Operations for identity-providers.scim.groups`,builder:e=>e.command(BT).command(UT).command(KT).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var JT={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/identity_providers/${t.identity_provider_id}/scim/users/${t.user_id}`,response:!1};function YT(e){return e.usage(`$0 zero-trust identity-providers scim users delete <user-id>
|
|
893
893
|
|
|
894
894
|
Deletes a SCIM User resource from the identity provider's SCIM population.`).positional(`user-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`identity-provider-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const XT={command:`delete <user-id>`,describe:`Delete a SCIM User resource`,builder:YT,handler:async e=>u({command:`zero-trust identity-providers scim users delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust identity-providers scim users delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/identity_providers/${e[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(e[`identity-provider-id`]))}/scim/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}`,pathParams:{"identity-provider-id":String(e[`identity-provider-id`]??``),"user-id":String(e[`user-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(JT,{account_id:a,identity_provider_id:e[`identity-provider-id`],user_id:e[`user-id`]}));s(u,{successLabel:`Deleted`})})};var ZT={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/identity_providers/${t.identity_provider_id}/scim/users/${t.user_id}`};function QT(e){return e.usage(`$0 zero-trust identity-providers scim users get <user-id>
|
|
895
895
|
|
|
896
896
|
Returns a SCIM User resource synced to Cloudflare via the System for Cross-domain Identity Management (SCIM).`).positional(`user-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`identity-provider-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $T={command:`get <user-id>`,describe:`Get a SCIM User resource`,builder:QT,handler:async e=>u({command:`zero-trust identity-providers scim users get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust identity-providers scim users get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/identity_providers/${e[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(e[`identity-provider-id`]))}/scim/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}`,pathParams:{"identity-provider-id":String(e[`identity-provider-id`]??``),"user-id":String(e[`user-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(ZT,{account_id:a,identity_provider_id:e[`identity-provider-id`],user_id:e[`user-id`]}));s(u,{successLabel:`Loaded`})})};var eE={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/identity_providers/${t.identity_provider_id}/scim/users`,query:[`cf_resource_id`,`idp_resource_id`,`username`,`email`,`name`,`page`,`per_page`]};function tE(e){return e.usage(`$0 zero-trust identity-providers scim users list
|
|
897
897
|
|
|
898
|
-
Lists SCIM User resources synced to Cloudflare via the System for Cross-domain Identity Management (SCIM).`).option(`identity-provider-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`cf-resource-id`,{type:`string`,description:'The unique Cloudflare-generated Id of the SCIM User resource; also known as the "Id".\nPass once for a single lookup (`?cf_resource_id=A`) or repeat the parameter\n(`?cf_resource_id=A&cf_resource_id=B`) to look up multiple users in one request,\nup to 50 values. Mutually exclusive with `idp_resource_id`, `username`, `email`,\n`name`, `search_contains`, and `search_starts_with`.'}).option(`idp-resource-id`,{type:`string`,description:'The IdP-generated Id of the SCIM User resource; also known as the "external Id".\nPass once for a single lookup (`?idp_resource_id=A`) or repeat the parameter\n(`?idp_resource_id=A&idp_resource_id=B`) to look up multiple users in one request,\nup to 50 values. Mutually exclusive with `cf_resource_id`, `username`, `email`,\n`name`, `search_contains`, and `search_starts_with`.'}).option(`username`,{type:`string`,description:`The username of the SCIM User resource.`}).option(`email`,{type:`string`,description:`The email address of the SCIM User resource.`}).option(`name`,{type:`string`,description:`The name of the SCIM User resource.`}).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const nE={command:`list`,describe:`List SCIM User resources`,builder:tE,handler:async e=>u({command:`zero-trust identity-providers scim users list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={cf_resource_id:e[`cf-resource-id`],idp_resource_id:e[`idp-resource-id`],username:e.username,email:e.email,name:e.name,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await i();c({command:`cf zero-trust identity-providers scim users list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/identity_providers/${e[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(e[`identity-provider-id`]))}/scim/users`,pathParams:{"identity-provider-id":String(e[`identity-provider-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(eE,{account_id:u,identity_provider_id:e[`identity-provider-id`],...n}));s(d,{successLabel:`Loaded`})})},rE={command:`users`,describe:`Operations for identity-providers.scim.users`,builder:e=>e.command(XT).command($T).command(nE).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},iE={command:`scim`,describe:`Operations for identity-providers.scim`,builder:e=>e.command(qT).command(rE).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var aE={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/identity_providers/${t.identity_provider_id}`,body:`json`};function oE(e){return e.usage(`$0 zero-trust identity-providers update <identity-provider-id>
|
|
898
|
+
Lists SCIM User resources synced to Cloudflare via the System for Cross-domain Identity Management (SCIM).`).option(`identity-provider-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`cf-resource-id`,{type:`string`,array:!0,description:'The unique Cloudflare-generated Id of the SCIM User resource; also known as the "Id".\nPass once for a single lookup (`?cf_resource_id=A`) or repeat the parameter\n(`?cf_resource_id=A&cf_resource_id=B`) to look up multiple users in one request,\nup to 50 values. Mutually exclusive with `idp_resource_id`, `username`, `email`,\n`name`, `search_contains`, and `search_starts_with`.'}).option(`idp-resource-id`,{type:`string`,array:!0,description:'The IdP-generated Id of the SCIM User resource; also known as the "external Id".\nPass once for a single lookup (`?idp_resource_id=A`) or repeat the parameter\n(`?idp_resource_id=A&idp_resource_id=B`) to look up multiple users in one request,\nup to 50 values. Mutually exclusive with `cf_resource_id`, `username`, `email`,\n`name`, `search_contains`, and `search_starts_with`.'}).option(`username`,{type:`string`,description:`The username of the SCIM User resource.`}).option(`email`,{type:`string`,description:`The email address of the SCIM User resource.`}).option(`name`,{type:`string`,description:`The name of the SCIM User resource.`}).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const nE={command:`list`,describe:`List SCIM User resources`,builder:tE,handler:async e=>u({command:`zero-trust identity-providers scim users list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={cf_resource_id:e[`cf-resource-id`],idp_resource_id:e[`idp-resource-id`],username:e.username,email:e.email,name:e.name,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await i();c({command:`cf zero-trust identity-providers scim users list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/identity_providers/${e[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(e[`identity-provider-id`]))}/scim/users`,pathParams:{"identity-provider-id":String(e[`identity-provider-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(eE,{account_id:u,identity_provider_id:e[`identity-provider-id`],...n}));s(d,{successLabel:`Loaded`})})},rE={command:`users`,describe:`Operations for identity-providers.scim.users`,builder:e=>e.command(XT).command($T).command(nE).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},iE={command:`scim`,describe:`Operations for identity-providers.scim`,builder:e=>e.command(qT).command(rE).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var aE={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/identity_providers/${t.identity_provider_id}`,body:`json`};function oE(e){return e.usage(`$0 zero-trust identity-providers update <identity-provider-id>
|
|
899
899
|
|
|
900
900
|
Updates a configured identity provider.`).positional(`identity-provider-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const sE={command:`update <identity-provider-id>`,describe:`Update an Access identity provider`,builder:oE,handler:async e=>u({command:`zero-trust identity-providers update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf zero-trust identity-providers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/identity_providers/${e[`identity-provider-id`]==null?`<identity-provider-id>`:encodeURIComponent(String(e[`identity-provider-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"identity-provider-id":String(e[`identity-provider-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:f(e.body)});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=d:e.accountId=d,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(aE,{body:t,account_or_zone:u,account_or_zone_id:d,identity_provider_id:e[`identity-provider-id`]}));s(r,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},cE={command:`identity-providers`,describe:`Operations for identity-providers`,builder:e=>e.command(dT).command(mT).command(AT).command(NT).command(sE).command(DT).command(LT).command(iE).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var lE={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/organizations`,body:`json`};function uE(e){return e.usage(`$0 zero-trust organization create
|
|
901
901
|
|
|
@@ -905,34 +905,40 @@ Returns the DoH settings for your Zero Trust organization.`).option(`dry-run`,{t
|
|
|
905
905
|
|
|
906
906
|
Updates the DoH settings for your Zero Trust organization.`).option(`doh-jwt-duration`,{type:`string`,description:"The duration the DoH JWT is valid for. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h. Note that the maximum duration for this setting is the same as the key rotation period on the account. Default expiration is 24h"}).option(`service-token-id`,{type:`string`,description:`The uuid of the service token you want to use for DoH authentication`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _E={command:`update`,describe:`Update your Zero Trust organization DoH settings`,builder:gE,handler:async e=>u({command:`zero-trust organization doh update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust organization doh update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/organizations/doh`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({doh_jwt_duration:_(e[`doh-jwt-duration`],`doh-jwt-duration`,`text`),service_token_id:_(e[`service-token-id`],`service-token-id`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(hE,{body:t,account_id:a}));s(r,{successLabel:`Updated`});return}let u=g({doh_jwt_duration:_(e[`doh-jwt-duration`],`doh-jwt-duration`,`text`),service_token_id:_(e[`service-token-id`],`service-token-id`,`text`)}),d=await l(`Updating`,async()=>n.send(hE,{body:u,account_id:a}));s(d,{successLabel:`Updated`})})},vE={command:`doh`,describe:`Operations for organization.doh`,builder:e=>e.command(mE).command(_E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var yE={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/organizations`};function bE(e){return e.usage(`$0 zero-trust organization get
|
|
907
907
|
|
|
908
|
-
Returns the configuration for your Zero Trust organization.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xE={command:`get`,describe:`Get your Zero Trust organization`,builder:bE,handler:async e=>u({command:`zero-trust organization get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf zero-trust organization get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/organizations`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(yE,{account_or_zone:u,account_or_zone_id:d}));s(f,{successLabel:`Loaded`})})};var SE={method:`
|
|
908
|
+
Returns the configuration for your Zero Trust organization.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xE={command:`get`,describe:`Get your Zero Trust organization`,builder:bE,handler:async e=>u({command:`zero-trust organization get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf zero-trust organization get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/organizations`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(yE,{account_or_zone:u,account_or_zone_id:d}));s(f,{successLabel:`Loaded`})})};var SE={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/organizations/trust_settings`};function CE(e){return e.usage(`$0 zero-trust organization trust-settings get
|
|
909
909
|
|
|
910
|
-
Updates the configuration for your Zero Trust organization.`).option(`allow-authenticate-via-warp`,{type:`boolean`,description:`When set to true, users can authenticate via WARP for any application in your organization. Application settings will take precedence over this value.`}).option(`auth-domain`,{type:`string`,description:"The unique subdomain assigned to your Zero Trust organization. If omitted on creation, a unique subdomain is auto-generated in the format `adjective-noun-hex4` (e.g. `frosty-moon-7a3b.cloudflareaccess.com`)."}).option(`auto-redirect-to-identity`,{type:`boolean`,description:"When set to `true`, users skip the identity provider selection step during login."}).option(`custom-pages-forbidden`,{type:`string`,description:`The uid of the custom page to use when a user is denied access after failing a non-identity rule.`}).option(`custom-pages-identity-denied`,{type:`string`,description:`The uid of the custom page to use when a user is denied access.`}).option(`deny-unmatched-requests`,{type:`boolean`,description:"Determines whether to deny all requests to Cloudflare-protected resources that lack an associated Access application. If enabled, you must explicitly configure an Access application and policy to allow traffic to your Cloudflare-protected resources. For domains you want to be public across all subdomains, add the domain to the `deny_unmatched_requests_exempted_zone_names` array."}).option(`deny-unmatched-requests-exempted-zone-names`,{type:`string`,array:!0,description:"Contains zone names to exempt from the `deny_unmatched_requests` feature. Requests to a subdomain in an exempted zone will block unauthenticated traffic by default if there is a configured Access application and policy that matches the request."}).option(`disable-end-user-app-creation`,{type:`boolean`,description:`Whether creation of end user applications is disabled for this organization.`}).option(`is-ui-read-only`,{type:`boolean`,description:`Lock all settings as Read-Only in the Dashboard, regardless of user permission. Updates may only be made via the API or Terraform for this account when enabled.`}).option(`login-design-background-color`,{type:`string`,description:`The background color on your login page.`}).option(`login-design-footer-text`,{type:`string`,description:`The text at the bottom of your login page.`}).option(`login-design-header-text`,{type:`string`,description:`The text at the top of your login page.`}).option(`login-design-logo-path`,{type:`string`,description:`The URL of the logo on your login page.`}).option(`login-design-text-color`,{type:`string`,description:`The text color on your login page.`}).option(`mfa-config-allowed-authenticators`,{type:`string`,array:!0,description:"Lists the MFA methods that users can authenticate with. The `piv_key` and `ssh_fido2_key` values are supported only for infrastructure applications."}).option(`mfa-config-amr-matching-session-duration`,{type:`string`,description:`Allows a user to skip MFA via Authentication Method Reference (AMR) matching when the AMR claim provided by the IdP the user used to authenticate contains "mfa". Must be in minutes (m) or hours (h). Minimum: 0m. Maximum: 720h (30 days).`}).option(`mfa-config-required-aaguids`,{type:`string`,description:`Specifies a Cloudflare List of required FIDO2 authenticator device AAGUIDs.`}).option(`mfa-config-session-duration`,{type:`string`,description:"Defines the duration of an MFA session. Must be in minutes (m) or hours (h). Minimum: 0m. Maximum: 720h (30 days). Examples:`5m` or `24h`."}).option(`mfa-piv-key-requirements-pin-policy`,{type:`string`,description:"Defines when a PIN is required to use the SSH key. Valid values: `never` (no PIN required), `once` (PIN required once per session), `always` (PIN required for each use).",choices:[`never`,`once`,`always`]}).coerce(`mfa-piv-key-requirements-pin-policy`,e=>_(e,`mfa-piv-key-requirements-pin-policy`,`text`)).option(`mfa-piv-key-requirements-require-fips-device`,{type:`boolean`,description:`Requires the PIV key to be stored on a FIPS 140-2 Level 1 or higher validated device.`}).option(`mfa-piv-key-requirements-ssh-key-size`,{type:`string`,array:!0,description:`Specifies the allowed SSH key sizes in bits. Valid sizes depend on key type. Ed25519 has a fixed key size and does not accept this parameter.`}).option(`mfa-piv-key-requirements-ssh-key-type`,{type:`string`,array:!0,description:"Specifies the allowed SSH key types. Valid values are `ecdsa`, `ed25519`, and `rsa`."}).option(`mfa-piv-key-requirements-touch-policy`,{type:`string`,description:"Defines when physical touch is required to use the SSH key. Valid values: `never` (no touch required), `always` (touch required for each use), `cached` (touch cached for 15 seconds).",choices:[`never`,`always`,`cached`]}).coerce(`mfa-piv-key-requirements-touch-policy`,e=>_(e,`mfa-piv-key-requirements-touch-policy`,`text`)).option(`mfa-required-for-all-apps`,{type:`boolean`,description:`Determines whether global MFA settings apply to applications by default. The organization must have MFA enabled with at least one authentication method and a session duration configured. Note: 'allowed_authenticators' cannot contain only the infrastructure SSH authenticators ('piv_key' and 'ssh_fido2_key') if the organization has any non-infrastructure applications.`}).option(`name`,{type:`string`,description:`The name of your Zero Trust organization. When omitted on creation, defaults to the provided auth_domain; when both are omitted, defaults to the auto-generated subdomain slug (e.g. frosty-moon-7a3b).`}).option(`service-token-inactivity-action`,{type:`string`,description:`The action applied to an inactive service token.`,choices:[`disable`,`delete`]}).coerce(`service-token-inactivity-action`,e=>_(e,`service-token-inactivity-action`,`text`)).option(`service-token-inactivity-enabled`,{type:`boolean`,description:`Whether automatic enforcement for inactive service tokens is enabled.`}).option(`service-token-inactivity-inactivity-threshold-days`,{type:`number`,description:`The number of days a service token must be inactive before the configured action is applied.`}).option(`session-duration`,{type:`string`,description:"The amount of time that tokens issued for applications will be valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h."}).option(`strict-service-token-auth`,{type:`boolean`,description:`Enables new behaviors for requests made with Access service tokens. Unauthorized requests emit audit logs, and return a 401 or 403 status code in the response instead of redirecting to the login page. Successful requests no longer receive a CF_Authorization cookie in the response. Zero Trust organizations created on or after October 5, 2026 will have this setting enabled by default, and cannot disable it.`}).option(`ui-read-only-toggle-reason`,{type:`string`,description:`A description of the reason why the UI read only field is being toggled.`}).option(`user-seat-expiration-inactive-time`,{type:`string`,description:"The amount of time a user seat is inactive before it expires. When the user seat exceeds the set time of inactivity, the user is removed as an active seat and no longer counts against your Teams seat count. Minimum value for this setting is 1 month (730h). Must be in the format `300ms` or `2h45m`. Valid time units are: `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`."}).option(`warp-auth-non-browser-401`,{type:`boolean`,description:`When enabled, unsuccessful WARP authentication requests with a non-HTML Accept header return a 401 response instead of redirecting to the login page.`}).option(`warp-auth-session-duration`,{type:`string`,description:"The amount of time that tokens issued for applications will be valid. Must be in the format `30m` or `2h45m`. Valid time units are: m, h."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`service-token-inactivity-action`,`service-token-inactivity-enabled`,`service-token-inactivity-inactivity-threshold-days`].some(t=>e[t]!==void 0)){let t=[`service-token-inactivity-action`,`service-token-inactivity-enabled`,`service-token-inactivity-inactivity-threshold-days`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --service_token_inactivity-* flag is set`)}return!0})}const wE={command:`update`,describe:`Update your Zero Trust organization`,builder:CE,handler:async e=>u({command:`zero-trust organization update`,classification:{safeFlags:[`allow-authenticate-via-warp`,`auto-redirect-to-identity`,`deny-unmatched-requests`,`disable-end-user-app-creation`,`is-ui-read-only`,`mfa-piv-key-requirements-pin-policy`,`mfa-piv-key-requirements-require-fips-device`,`mfa-piv-key-requirements-touch-policy`,`mfa-required-for-all-apps`,`service-token-inactivity-action`,`service-token-inactivity-enabled`,`strict-service-token-auth`,`warp-auth-non-browser-401`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf zero-trust organization update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/organizations`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?g({allow_authenticate_via_warp:e[`allow-authenticate-via-warp`],auth_domain:_(e[`auth-domain`],`auth-domain`,`text`),auto_redirect_to_identity:e[`auto-redirect-to-identity`],custom_pages:{forbidden:_(e[`custom-pages-forbidden`],`custom-pages-forbidden`,`text`),identity_denied:_(e[`custom-pages-identity-denied`],`custom-pages-identity-denied`,`text`)},deny_unmatched_requests:e[`deny-unmatched-requests`],deny_unmatched_requests_exempted_zone_names:e[`deny-unmatched-requests-exempted-zone-names`],disable_end_user_app_creation:e[`disable-end-user-app-creation`],is_ui_read_only:e[`is-ui-read-only`],login_design:{background_color:_(e[`login-design-background-color`],`login-design-background-color`,`text`),footer_text:_(e[`login-design-footer-text`],`login-design-footer-text`,`text`),header_text:_(e[`login-design-header-text`],`login-design-header-text`,`text`),logo_path:_(e[`login-design-logo-path`],`login-design-logo-path`,`text`),text_color:_(e[`login-design-text-color`],`login-design-text-color`,`text`)},mfa_config:{allowed_authenticators:e[`mfa-config-allowed-authenticators`],amr_matching_session_duration:_(e[`mfa-config-amr-matching-session-duration`],`mfa-config-amr-matching-session-duration`,`text`),required_aaguids:_(e[`mfa-config-required-aaguids`],`mfa-config-required-aaguids`,`text`),session_duration:_(e[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},mfa_piv_key_requirements:{pin_policy:e[`mfa-piv-key-requirements-pin-policy`],require_fips_device:e[`mfa-piv-key-requirements-require-fips-device`],ssh_key_size:e[`mfa-piv-key-requirements-ssh-key-size`],ssh_key_type:e[`mfa-piv-key-requirements-ssh-key-type`],touch_policy:e[`mfa-piv-key-requirements-touch-policy`]},mfa_required_for_all_apps:e[`mfa-required-for-all-apps`],name:_(e.name,`name`,`text`),service_token_inactivity:{action:e[`service-token-inactivity-action`],enabled:e[`service-token-inactivity-enabled`],inactivity_threshold_days:e[`service-token-inactivity-inactivity-threshold-days`]},session_duration:_(e[`session-duration`],`session-duration`,`text`),strict_service_token_auth:e[`strict-service-token-auth`],ui_read_only_toggle_reason:_(e[`ui-read-only-toggle-reason`],`ui-read-only-toggle-reason`,`text`),user_seat_expiration_inactive_time:_(e[`user-seat-expiration-inactive-time`],`user-seat-expiration-inactive-time`,`text`),warp_auth_non_browser_401:e[`warp-auth-non-browser-401`],warp_auth_session_duration:_(e[`warp-auth-session-duration`],`warp-auth-session-duration`,`text`)}):f(e.body)});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=d:e.accountId=d,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(SE,{body:t,account_or_zone:u,account_or_zone_id:d}));s(r,{successLabel:`Updated`});return}let p=g({allow_authenticate_via_warp:e[`allow-authenticate-via-warp`],auth_domain:_(e[`auth-domain`],`auth-domain`,`text`),auto_redirect_to_identity:e[`auto-redirect-to-identity`],custom_pages:{forbidden:_(e[`custom-pages-forbidden`],`custom-pages-forbidden`,`text`),identity_denied:_(e[`custom-pages-identity-denied`],`custom-pages-identity-denied`,`text`)},deny_unmatched_requests:e[`deny-unmatched-requests`],deny_unmatched_requests_exempted_zone_names:e[`deny-unmatched-requests-exempted-zone-names`],disable_end_user_app_creation:e[`disable-end-user-app-creation`],is_ui_read_only:e[`is-ui-read-only`],login_design:{background_color:_(e[`login-design-background-color`],`login-design-background-color`,`text`),footer_text:_(e[`login-design-footer-text`],`login-design-footer-text`,`text`),header_text:_(e[`login-design-header-text`],`login-design-header-text`,`text`),logo_path:_(e[`login-design-logo-path`],`login-design-logo-path`,`text`),text_color:_(e[`login-design-text-color`],`login-design-text-color`,`text`)},mfa_config:{allowed_authenticators:e[`mfa-config-allowed-authenticators`],amr_matching_session_duration:_(e[`mfa-config-amr-matching-session-duration`],`mfa-config-amr-matching-session-duration`,`text`),required_aaguids:_(e[`mfa-config-required-aaguids`],`mfa-config-required-aaguids`,`text`),session_duration:_(e[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},mfa_piv_key_requirements:{pin_policy:e[`mfa-piv-key-requirements-pin-policy`],require_fips_device:e[`mfa-piv-key-requirements-require-fips-device`],ssh_key_size:e[`mfa-piv-key-requirements-ssh-key-size`],ssh_key_type:e[`mfa-piv-key-requirements-ssh-key-type`],touch_policy:e[`mfa-piv-key-requirements-touch-policy`]},mfa_required_for_all_apps:e[`mfa-required-for-all-apps`],name:_(e.name,`name`,`text`),service_token_inactivity:{action:e[`service-token-inactivity-action`],enabled:e[`service-token-inactivity-enabled`],inactivity_threshold_days:e[`service-token-inactivity-inactivity-threshold-days`]},session_duration:_(e[`session-duration`],`session-duration`,`text`),strict_service_token_auth:e[`strict-service-token-auth`],ui_read_only_toggle_reason:_(e[`ui-read-only-toggle-reason`],`ui-read-only-toggle-reason`,`text`),user_seat_expiration_inactive_time:_(e[`user-seat-expiration-inactive-time`],`user-seat-expiration-inactive-time`,`text`),warp_auth_non_browser_401:e[`warp-auth-non-browser-401`],warp_auth_session_duration:_(e[`warp-auth-session-duration`],`warp-auth-session-duration`,`text`)}),m=await l(`Updating`,async()=>n.send(SE,{body:p,account_or_zone:u,account_or_zone_id:d}));s(m,{successLabel:`Updated`})})},TE={command:`organization`,describe:`Operations for organization`,builder:e=>e.command(dE).command(xE).command(wE).command(vE).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var EE={method:`GET`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/behaviors`};function DE(e){return e.usage(`$0 zero-trust risk-scoring behaviours get
|
|
910
|
+
Returns the trust settings for your Zero Trust organization.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const wE={command:`get`,describe:`Get Zero Trust organization trust settings`,builder:CE,handler:async e=>u({command:`zero-trust organization trust-settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust organization trust-settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/organizations/trust_settings`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(SE,{account_id:a}));s(u,{successLabel:`Loaded`})})};var TE={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/organizations/trust_settings`,body:`json`};function EE(e){return e.usage(`$0 zero-trust organization trust-settings replace
|
|
911
911
|
|
|
912
|
-
|
|
912
|
+
Replaces the trust settings for your Zero Trust organization.`).option(`grant-trust-to-all-accounts-in-org`,{type:`boolean`,description:`Whether all accounts in the organization are trusted to use this account's cross-account Access resources.`}).option(`trusting-accounts`,{type:`string`,array:!0,description:`Explicit account IDs trusted to use this account's cross-account Access resources. At most 100 unique valid account IDs are accepted. Omitted from responses when empty.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const DE={command:`replace`,describe:`Replace Zero Trust organization trust settings`,builder:EE,handler:async e=>u({command:`zero-trust organization trust-settings replace`,classification:{safeFlags:[`grant-trust-to-all-accounts-in-org`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust organization trust-settings replace`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/organizations/trust_settings`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({grant_trust_to_all_accounts_in_org:e[`grant-trust-to-all-accounts-in-org`],trusting_accounts:e[`trusting-accounts`]}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(TE,{body:t,account_id:a}));s(r,{successLabel:`Updated`});return}if(e[`grant-trust-to-all-accounts-in-org`]===void 0)throw Error(`--grant-trust-to-all-accounts-in-org is required (or pass --body with this field set).`);let u=g({grant_trust_to_all_accounts_in_org:e[`grant-trust-to-all-accounts-in-org`],trusting_accounts:e[`trusting-accounts`]}),d=await l(`Updating`,async()=>n.send(TE,{body:u,account_id:a}));s(d,{successLabel:`Updated`})})};var OE={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/access/organizations/trust_settings`,body:`json`};function kE(e){return e.usage(`$0 zero-trust organization trust-settings update
|
|
913
913
|
|
|
914
|
-
Updates
|
|
914
|
+
Updates the trust settings for your Zero Trust organization.`).option(`grant-trust-to-all-accounts-in-org`,{type:`boolean`,description:`Whether all accounts in the organization are trusted to use this account's cross-account Access resources.`}).option(`trusting-accounts`,{type:`string`,array:!0,description:`Explicit account IDs trusted to use this account's cross-account Access resources. At most 100 unique valid account IDs are accepted. Omitted from responses when empty.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const AE={command:`update`,describe:`Update Zero Trust organization trust settings`,builder:kE,handler:async e=>u({command:`zero-trust organization trust-settings update`,classification:{safeFlags:[`grant-trust-to-all-accounts-in-org`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust organization trust-settings update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/organizations/trust_settings`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({grant_trust_to_all_accounts_in_org:e[`grant-trust-to-all-accounts-in-org`],trusting_accounts:e[`trusting-accounts`]}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(OE,{body:t,account_id:a}));s(r,{successLabel:`Updated`});return}let u=g({grant_trust_to_all_accounts_in_org:e[`grant-trust-to-all-accounts-in-org`],trusting_accounts:e[`trusting-accounts`]}),d=await l(`Updating`,async()=>n.send(OE,{body:u,account_id:a}));s(d,{successLabel:`Updated`})})},jE={command:`trust-settings`,describe:`Operations for organization.trust-settings`,builder:e=>e.command(wE).command(DE).command(AE).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ME={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/organizations`,body:`json`};function NE(e){return e.usage(`$0 zero-trust organization update
|
|
915
915
|
|
|
916
|
-
Retrieves the detailed risk score breakdown for a specific user, including contributing factors.`).positional(`user-id`,{type:`string`,description:`User ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const FE={command:`get <user-id>`,describe:`Get risk event/score information for a specific user`,builder:PE,handler:async e=>u({command:`zero-trust risk-scoring get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust risk-scoring get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zt_risk_scoring/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}`,pathParams:{"user-id":String(e[`user-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(NE,{account_id:a,user_id:e[`user-id`]}));s(u,{successLabel:`Loaded`})})};var IE={method:`POST`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/integrations`,body:`json`,constants:{integration_type:`Okta`}};function LE(e){return e.usage(`$0 zero-trust risk-scoring integrations create
|
|
916
|
+
Updates the configuration for your Zero Trust organization.`).option(`allow-authenticate-via-warp`,{type:`boolean`,description:`When set to true, users can authenticate via WARP for any application in your organization. Application settings will take precedence over this value.`}).option(`auth-domain`,{type:`string`,description:"The unique subdomain assigned to your Zero Trust organization. If omitted on creation, a unique subdomain is auto-generated in the format `adjective-noun-hex4` (e.g. `frosty-moon-7a3b.cloudflareaccess.com`)."}).option(`auto-redirect-to-identity`,{type:`boolean`,description:"When set to `true`, users skip the identity provider selection step during login."}).option(`custom-pages-forbidden`,{type:`string`,description:`The uid of the custom page to use when a user is denied access after failing a non-identity rule.`}).option(`custom-pages-identity-denied`,{type:`string`,description:`The uid of the custom page to use when a user is denied access.`}).option(`deny-unmatched-requests`,{type:`boolean`,description:"Determines whether to deny all requests to Cloudflare-protected resources that lack an associated Access application. If enabled, you must explicitly configure an Access application and policy to allow traffic to your Cloudflare-protected resources. For domains you want to be public across all subdomains, add the domain to the `deny_unmatched_requests_exempted_zone_names` array."}).option(`deny-unmatched-requests-exempted-zone-names`,{type:`string`,array:!0,description:"Contains zone names to exempt from the `deny_unmatched_requests` feature. Requests to a subdomain in an exempted zone will block unauthenticated traffic by default if there is a configured Access application and policy that matches the request."}).option(`disable-end-user-app-creation`,{type:`boolean`,description:`Whether creation of end user applications is disabled for this organization.`}).option(`is-ui-read-only`,{type:`boolean`,description:`Lock all settings as Read-Only in the Dashboard, regardless of user permission. Updates may only be made via the API or Terraform for this account when enabled.`}).option(`login-design-background-color`,{type:`string`,description:`The background color on your login page.`}).option(`login-design-footer-text`,{type:`string`,description:`The text at the bottom of your login page.`}).option(`login-design-header-text`,{type:`string`,description:`The text at the top of your login page.`}).option(`login-design-logo-path`,{type:`string`,description:`The URL of the logo on your login page.`}).option(`login-design-text-color`,{type:`string`,description:`The text color on your login page.`}).option(`mfa-config-allowed-authenticators`,{type:`string`,array:!0,description:"Lists the MFA methods that users can authenticate with. The `piv_key` and `ssh_fido2_key` values are supported only for infrastructure applications."}).option(`mfa-config-amr-matching-session-duration`,{type:`string`,description:`Allows a user to skip MFA via Authentication Method Reference (AMR) matching when the AMR claim provided by the IdP the user used to authenticate contains "mfa". Must be in minutes (m) or hours (h). Minimum: 0m. Maximum: 720h (30 days).`}).option(`mfa-config-required-aaguids`,{type:`string`,description:`Specifies a Cloudflare List of required FIDO2 authenticator device AAGUIDs.`}).option(`mfa-config-session-duration`,{type:`string`,description:"Defines the duration of an MFA session. Must be in minutes (m) or hours (h). Minimum: 0m. Maximum: 720h (30 days). Examples:`5m` or `24h`."}).option(`mfa-piv-key-requirements-pin-policy`,{type:`string`,description:"Defines when a PIN is required to use the SSH key. Valid values: `never` (no PIN required), `once` (PIN required once per session), `always` (PIN required for each use).",choices:[`never`,`once`,`always`]}).coerce(`mfa-piv-key-requirements-pin-policy`,e=>_(e,`mfa-piv-key-requirements-pin-policy`,`text`)).option(`mfa-piv-key-requirements-require-fips-device`,{type:`boolean`,description:`Requires the PIV key to be stored on a FIPS 140-2 Level 1 or higher validated device.`}).option(`mfa-piv-key-requirements-ssh-key-size`,{type:`string`,array:!0,description:`Specifies the allowed SSH key sizes in bits. Valid sizes depend on key type. Ed25519 has a fixed key size and does not accept this parameter.`}).option(`mfa-piv-key-requirements-ssh-key-type`,{type:`string`,array:!0,description:"Specifies the allowed SSH key types. Valid values are `ecdsa`, `ed25519`, and `rsa`."}).option(`mfa-piv-key-requirements-touch-policy`,{type:`string`,description:"Defines when physical touch is required to use the SSH key. Valid values: `never` (no touch required), `always` (touch required for each use), `cached` (touch cached for 15 seconds).",choices:[`never`,`always`,`cached`]}).coerce(`mfa-piv-key-requirements-touch-policy`,e=>_(e,`mfa-piv-key-requirements-touch-policy`,`text`)).option(`mfa-required-for-all-apps`,{type:`boolean`,description:`Determines whether global MFA settings apply to applications by default. The organization must have MFA enabled with at least one authentication method and a session duration configured. Note: 'allowed_authenticators' cannot contain only the infrastructure SSH authenticators ('piv_key' and 'ssh_fido2_key') if the organization has any non-infrastructure applications.`}).option(`name`,{type:`string`,description:`The name of your Zero Trust organization. When omitted on creation, defaults to the provided auth_domain; when both are omitted, defaults to the auto-generated subdomain slug (e.g. frosty-moon-7a3b).`}).option(`service-token-inactivity-action`,{type:`string`,description:`The action applied to an inactive service token.`,choices:[`disable`,`delete`]}).coerce(`service-token-inactivity-action`,e=>_(e,`service-token-inactivity-action`,`text`)).option(`service-token-inactivity-enabled`,{type:`boolean`,description:`Whether automatic enforcement for inactive service tokens is enabled.`}).option(`service-token-inactivity-inactivity-threshold-days`,{type:`number`,description:`The number of days a service token must be inactive before the configured action is applied.`}).option(`session-duration`,{type:`string`,description:"The amount of time that tokens issued for applications will be valid. Must be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h."}).option(`strict-service-token-auth`,{type:`boolean`,description:`Enables new behaviors for requests made with Access service tokens. Unauthorized requests emit audit logs, and return a 401 or 403 status code in the response instead of redirecting to the login page. Successful requests no longer receive a CF_Authorization cookie in the response. Zero Trust organizations created on or after October 5, 2026 will have this setting enabled by default, and cannot disable it.`}).option(`ui-read-only-toggle-reason`,{type:`string`,description:`A description of the reason why the UI read only field is being toggled.`}).option(`user-seat-expiration-inactive-time`,{type:`string`,description:"The amount of time a user seat is inactive before it expires. When the user seat exceeds the set time of inactivity, the user is removed as an active seat and no longer counts against your Teams seat count. Minimum value for this setting is 1 month (730h). Must be in the format `300ms` or `2h45m`. Valid time units are: `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`."}).option(`warp-auth-non-browser-401`,{type:`boolean`,description:`When enabled, unsuccessful WARP authentication requests with a non-HTML Accept header return a 401 response instead of redirecting to the login page.`}).option(`warp-auth-session-duration`,{type:`string`,description:"The amount of time that tokens issued for applications will be valid. Must be in the format `30m` or `2h45m`. Valid time units are: m, h."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`service-token-inactivity-action`,`service-token-inactivity-enabled`,`service-token-inactivity-inactivity-threshold-days`].some(t=>e[t]!==void 0)){let t=[`service-token-inactivity-action`,`service-token-inactivity-enabled`,`service-token-inactivity-inactivity-threshold-days`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --service_token_inactivity-* flag is set`)}return!0})}const PE={command:`update`,describe:`Update your Zero Trust organization`,builder:NE,handler:async e=>u({command:`zero-trust organization update`,classification:{safeFlags:[`allow-authenticate-via-warp`,`auto-redirect-to-identity`,`deny-unmatched-requests`,`disable-end-user-app-creation`,`is-ui-read-only`,`mfa-piv-key-requirements-pin-policy`,`mfa-piv-key-requirements-require-fips-device`,`mfa-piv-key-requirements-touch-policy`,`mfa-required-for-all-apps`,`service-token-inactivity-action`,`service-token-inactivity-enabled`,`strict-service-token-auth`,`warp-auth-non-browser-401`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf zero-trust organization update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/organizations`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?g({allow_authenticate_via_warp:e[`allow-authenticate-via-warp`],auth_domain:_(e[`auth-domain`],`auth-domain`,`text`),auto_redirect_to_identity:e[`auto-redirect-to-identity`],custom_pages:{forbidden:_(e[`custom-pages-forbidden`],`custom-pages-forbidden`,`text`),identity_denied:_(e[`custom-pages-identity-denied`],`custom-pages-identity-denied`,`text`)},deny_unmatched_requests:e[`deny-unmatched-requests`],deny_unmatched_requests_exempted_zone_names:e[`deny-unmatched-requests-exempted-zone-names`],disable_end_user_app_creation:e[`disable-end-user-app-creation`],is_ui_read_only:e[`is-ui-read-only`],login_design:{background_color:_(e[`login-design-background-color`],`login-design-background-color`,`text`),footer_text:_(e[`login-design-footer-text`],`login-design-footer-text`,`text`),header_text:_(e[`login-design-header-text`],`login-design-header-text`,`text`),logo_path:_(e[`login-design-logo-path`],`login-design-logo-path`,`text`),text_color:_(e[`login-design-text-color`],`login-design-text-color`,`text`)},mfa_config:{allowed_authenticators:e[`mfa-config-allowed-authenticators`],amr_matching_session_duration:_(e[`mfa-config-amr-matching-session-duration`],`mfa-config-amr-matching-session-duration`,`text`),required_aaguids:_(e[`mfa-config-required-aaguids`],`mfa-config-required-aaguids`,`text`),session_duration:_(e[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},mfa_piv_key_requirements:{pin_policy:e[`mfa-piv-key-requirements-pin-policy`],require_fips_device:e[`mfa-piv-key-requirements-require-fips-device`],ssh_key_size:e[`mfa-piv-key-requirements-ssh-key-size`],ssh_key_type:e[`mfa-piv-key-requirements-ssh-key-type`],touch_policy:e[`mfa-piv-key-requirements-touch-policy`]},mfa_required_for_all_apps:e[`mfa-required-for-all-apps`],name:_(e.name,`name`,`text`),service_token_inactivity:{action:e[`service-token-inactivity-action`],enabled:e[`service-token-inactivity-enabled`],inactivity_threshold_days:e[`service-token-inactivity-inactivity-threshold-days`]},session_duration:_(e[`session-duration`],`session-duration`,`text`),strict_service_token_auth:e[`strict-service-token-auth`],ui_read_only_toggle_reason:_(e[`ui-read-only-toggle-reason`],`ui-read-only-toggle-reason`,`text`),user_seat_expiration_inactive_time:_(e[`user-seat-expiration-inactive-time`],`user-seat-expiration-inactive-time`,`text`),warp_auth_non_browser_401:e[`warp-auth-non-browser-401`],warp_auth_session_duration:_(e[`warp-auth-session-duration`],`warp-auth-session-duration`,`text`)}):f(e.body)});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=d:e.accountId=d,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(ME,{body:t,account_or_zone:u,account_or_zone_id:d}));s(r,{successLabel:`Updated`});return}let p=g({allow_authenticate_via_warp:e[`allow-authenticate-via-warp`],auth_domain:_(e[`auth-domain`],`auth-domain`,`text`),auto_redirect_to_identity:e[`auto-redirect-to-identity`],custom_pages:{forbidden:_(e[`custom-pages-forbidden`],`custom-pages-forbidden`,`text`),identity_denied:_(e[`custom-pages-identity-denied`],`custom-pages-identity-denied`,`text`)},deny_unmatched_requests:e[`deny-unmatched-requests`],deny_unmatched_requests_exempted_zone_names:e[`deny-unmatched-requests-exempted-zone-names`],disable_end_user_app_creation:e[`disable-end-user-app-creation`],is_ui_read_only:e[`is-ui-read-only`],login_design:{background_color:_(e[`login-design-background-color`],`login-design-background-color`,`text`),footer_text:_(e[`login-design-footer-text`],`login-design-footer-text`,`text`),header_text:_(e[`login-design-header-text`],`login-design-header-text`,`text`),logo_path:_(e[`login-design-logo-path`],`login-design-logo-path`,`text`),text_color:_(e[`login-design-text-color`],`login-design-text-color`,`text`)},mfa_config:{allowed_authenticators:e[`mfa-config-allowed-authenticators`],amr_matching_session_duration:_(e[`mfa-config-amr-matching-session-duration`],`mfa-config-amr-matching-session-duration`,`text`),required_aaguids:_(e[`mfa-config-required-aaguids`],`mfa-config-required-aaguids`,`text`),session_duration:_(e[`mfa-config-session-duration`],`mfa-config-session-duration`,`text`)},mfa_piv_key_requirements:{pin_policy:e[`mfa-piv-key-requirements-pin-policy`],require_fips_device:e[`mfa-piv-key-requirements-require-fips-device`],ssh_key_size:e[`mfa-piv-key-requirements-ssh-key-size`],ssh_key_type:e[`mfa-piv-key-requirements-ssh-key-type`],touch_policy:e[`mfa-piv-key-requirements-touch-policy`]},mfa_required_for_all_apps:e[`mfa-required-for-all-apps`],name:_(e.name,`name`,`text`),service_token_inactivity:{action:e[`service-token-inactivity-action`],enabled:e[`service-token-inactivity-enabled`],inactivity_threshold_days:e[`service-token-inactivity-inactivity-threshold-days`]},session_duration:_(e[`session-duration`],`session-duration`,`text`),strict_service_token_auth:e[`strict-service-token-auth`],ui_read_only_toggle_reason:_(e[`ui-read-only-toggle-reason`],`ui-read-only-toggle-reason`,`text`),user_seat_expiration_inactive_time:_(e[`user-seat-expiration-inactive-time`],`user-seat-expiration-inactive-time`,`text`),warp_auth_non_browser_401:e[`warp-auth-non-browser-401`],warp_auth_session_duration:_(e[`warp-auth-session-duration`],`warp-auth-session-duration`,`text`)}),m=await l(`Updating`,async()=>n.send(ME,{body:p,account_or_zone:u,account_or_zone_id:d}));s(m,{successLabel:`Updated`})})},FE={command:`organization`,describe:`Operations for organization`,builder:e=>e.command(dE).command(xE).command(PE).command(vE).command(jE).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var IE={method:`GET`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/behaviors`};function LE(e){return e.usage(`$0 zero-trust risk-scoring behaviours get
|
|
917
|
+
|
|
918
|
+
Retrieves configured risk score behaviors that define how user actions affect their overall risk score.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const RE={command:`get`,describe:`Get all behaviors and associated configuration`,builder:LE,handler:async e=>u({command:`zero-trust risk-scoring behaviours get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust risk-scoring behaviours get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/zt_risk_scoring/behaviors`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(IE,{account_id:a}));s(u,{successLabel:`Loaded`})})};var zE={method:`PUT`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/behaviors`,body:`json`};function BE(e){return e.usage(`$0 zero-trust risk-scoring behaviours update
|
|
919
|
+
|
|
920
|
+
Updates risk score behavior configurations, defining weights and thresholds for risk calculation.`).option(`behaviors`,{type:`string`,description:`The behaviors field. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Behaviors.`})}const VE={command:`update`,describe:`Update configuration for risk behaviors`,builder:BE,handler:async e=>u({command:`zero-trust risk-scoring behaviours update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust risk-scoring behaviours update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zt_risk_scoring/behaviors`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({behaviors:m(e.behaviors,`behaviors`,!0)},[[`behaviors`]]):f(e.body,[{path:[`behaviors`],flag:`behaviors`}])});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body,[{path:[`behaviors`],flag:`behaviors`}]),r=await l(`Updating`,async()=>n.send(zE,{body:t,account_id:a}));s(r,{successLabel:`Updated`});return}if(e.behaviors===void 0)throw Error(`--behaviors is required (or pass --body with this field set).`);let u=g({behaviors:m(e.behaviors,`behaviors`,!0)},[[`behaviors`]]),d=await l(`Updating`,async()=>n.send(zE,{body:u,account_id:a}));s(d,{successLabel:`Updated`})})},HE={command:`behaviours`,describe:`User Risk Scoring - manage behaviors used to calculate user risk scores`,builder:e=>e.command(RE).command(VE).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var UE={method:`GET`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/${t.user_id}`};function WE(e){return e.usage(`$0 zero-trust risk-scoring get <user-id>
|
|
921
|
+
|
|
922
|
+
Retrieves the detailed risk score breakdown for a specific user, including contributing factors.`).positional(`user-id`,{type:`string`,description:`User ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const GE={command:`get <user-id>`,describe:`Get risk event/score information for a specific user`,builder:WE,handler:async e=>u({command:`zero-trust risk-scoring get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust risk-scoring get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zt_risk_scoring/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}`,pathParams:{"user-id":String(e[`user-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(UE,{account_id:a,user_id:e[`user-id`]}));s(u,{successLabel:`Loaded`})})};var KE={method:`POST`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/integrations`,body:`json`,constants:{integration_type:`Okta`}};function qE(e){return e.usage(`$0 zero-trust risk-scoring integrations create
|
|
917
923
|
|
|
918
924
|
Creates a new Zero Trust risk score integration, connecting external risk signals to Cloudflare's risk scoring system.`).option(`integration-type`,{type:`string`,description:`The integration_type field`,choices:[`Okta`]}).coerce(`integration-type`,e=>_(e,`integration-type`,`text`)).option(`reference-id`,{type:`string`,description:`A reference id that can be supplied by the client. Currently this should be set to the Access-Okta IDP ID (a UUIDv4).
|
|
919
|
-
https://developers.cloudflare.com/api/operations/access-identity-providers-get-an-access-identity-provider`}).option(`tenant-url`,{type:`string`,description:`The base url of the tenant, e.g. "https://tenant.okta.com".`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
925
|
+
https://developers.cloudflare.com/api/operations/access-identity-providers-get-an-access-identity-provider`}).option(`tenant-url`,{type:`string`,description:`The base url of the tenant, e.g. "https://tenant.okta.com".`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const JE={command:`create`,describe:`Create new risk score integration.`,builder:qE,handler:async e=>u({command:`zero-trust risk-scoring integrations create`,classification:{safeFlags:[`integration-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust risk-scoring integrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zt_risk_scoring/integrations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({integration_type:e[`integration-type`],reference_id:_(e[`reference-id`],`reference-id`,`text`),tenant_url:_(e[`tenant-url`],`tenant-url`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(KE,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`integration-type`]===void 0&&(e[`integration-type`]=await b(`integration-type`,`The integration_type field`,[`Okta`])),e[`tenant-url`]===void 0&&(e[`tenant-url`]=await y(`tenant-url`,`The base url of the tenant, e.g. "https://tenant.okta.com".`));let u=g({integration_type:e[`integration-type`],reference_id:_(e[`reference-id`],`reference-id`,`text`),tenant_url:_(e[`tenant-url`],`tenant-url`,`text`)}),d=await l(`Creating`,async()=>n.send(KE,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var YE={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/integrations/${t.integration_id}`};function XE(e){return e.usage(`$0 zero-trust risk-scoring integrations delete <integration-id>
|
|
920
926
|
|
|
921
|
-
Removes a Zero Trust risk score integration, disconnecting the external risk signal source.`).positional(`integration-id`,{type:`string`,description:`Integration ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
927
|
+
Removes a Zero Trust risk score integration, disconnecting the external risk signal source.`).positional(`integration-id`,{type:`string`,description:`Integration ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ZE={command:`delete <integration-id>`,describe:`Delete a risk score integration.`,builder:XE,handler:async e=>u({command:`zero-trust risk-scoring integrations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust risk-scoring integrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zt_risk_scoring/integrations/${e[`integration-id`]==null?`<integration-id>`:encodeURIComponent(String(e[`integration-id`]))}`,pathParams:{"integration-id":String(e[`integration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(YE,{account_id:a,integration_id:e[`integration-id`]}));s(u,{successLabel:`Deleted`})})};var QE={method:`GET`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/integrations/${t.integration_id}`};function $E(e){return e.usage(`$0 zero-trust risk-scoring integrations get <integration-id>
|
|
922
928
|
|
|
923
|
-
Gets a Zero Trust risk score integration by ID.`).positional(`integration-id`,{type:`string`,description:`Integration ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
929
|
+
Gets a Zero Trust risk score integration by ID.`).positional(`integration-id`,{type:`string`,description:`Integration ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const eD={command:`get <integration-id>`,describe:`Get risk score integration by id.`,builder:$E,handler:async e=>u({command:`zero-trust risk-scoring integrations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust risk-scoring integrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zt_risk_scoring/integrations/${e[`integration-id`]==null?`<integration-id>`:encodeURIComponent(String(e[`integration-id`]))}`,pathParams:{"integration-id":String(e[`integration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(QE,{account_id:a,integration_id:e[`integration-id`]}));s(u,{successLabel:`Loaded`})})};var tD={method:`GET`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/integrations`};function nD(e){return e.usage(`$0 zero-trust risk-scoring integrations list
|
|
924
930
|
|
|
925
|
-
Lists all configured Zero Trust risk score integrations for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
931
|
+
Lists all configured Zero Trust risk score integrations for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rD={command:`list`,describe:`List all risk score integrations for the account.`,builder:nD,handler:async e=>u({command:`zero-trust risk-scoring integrations list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust risk-scoring integrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/zt_risk_scoring/integrations`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(tD,{account_id:a}));s(u,{successLabel:`Loaded`})})};var iD={method:`GET`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/integrations/reference_id/${t.reference_id}`};function aD(e){return e.usage(`$0 zero-trust risk-scoring integrations references get <reference-id>
|
|
926
932
|
|
|
927
|
-
Retrieves a Zero Trust risk score integration using its external reference ID.`).positional(`reference-id`,{type:`string`,description:`Reference ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
933
|
+
Retrieves a Zero Trust risk score integration using its external reference ID.`).positional(`reference-id`,{type:`string`,description:`Reference ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oD={command:`get <reference-id>`,describe:`Get risk score integration by reference id.`,builder:aD,handler:async e=>u({command:`zero-trust risk-scoring integrations references get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust risk-scoring integrations references get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zt_risk_scoring/integrations/reference_id/${e[`reference-id`]==null?`<reference-id>`:encodeURIComponent(String(e[`reference-id`]))}`,pathParams:{"reference-id":String(e[`reference-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(iD,{account_id:a,reference_id:e[`reference-id`]}));s(u,{successLabel:`Loaded`})})},sD={command:`references`,describe:`User Risk Scoring - retrieve integrations by external reference`,builder:e=>e.command(oD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var cD={method:`PUT`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/integrations/${t.integration_id}`,body:`json`};function lD(e){return e.usage(`$0 zero-trust risk-scoring integrations update <integration-id>
|
|
928
934
|
|
|
929
935
|
Overwrite the reference_id, tenant_url, and active values with the ones provided.`).positional(`integration-id`,{type:`string`,description:`Integration ID`,demandOption:!0}).option(`active`,{type:`boolean`,description:`Whether this integration is enabled. If disabled, no risk changes will be exported to the third-party.`}).option(`reference-id`,{type:`string`,description:`A reference id that can be supplied by the client. Currently this should be set to the Access-Okta IDP ID (a UUIDv4).
|
|
930
|
-
https://developers.cloudflare.com/api/operations/access-identity-providers-get-an-access-identity-provider`}).option(`tenant-url`,{type:`string`,description:`The base url of the tenant, e.g. "https://tenant.okta.com".`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
936
|
+
https://developers.cloudflare.com/api/operations/access-identity-providers-get-an-access-identity-provider`}).option(`tenant-url`,{type:`string`,description:`The base url of the tenant, e.g. "https://tenant.okta.com".`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const uD={command:`update <integration-id>`,describe:`Update a risk score integration.`,builder:lD,handler:async e=>u({command:`zero-trust risk-scoring integrations update`,classification:{safeFlags:[`active`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust risk-scoring integrations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zt_risk_scoring/integrations/${e[`integration-id`]==null?`<integration-id>`:encodeURIComponent(String(e[`integration-id`]))}`,pathParams:{"integration-id":String(e[`integration-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({active:e.active,reference_id:_(e[`reference-id`],`reference-id`,`text`),tenant_url:_(e[`tenant-url`],`tenant-url`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(cD,{body:t,account_id:a,integration_id:e[`integration-id`]}));s(r,{successLabel:`Updated`});return}if(e.active===void 0)throw Error(`--active is required (or pass --body with this field set).`);e[`tenant-url`]===void 0&&(e[`tenant-url`]=await y(`tenant-url`,`The base url of the tenant, e.g. "https://tenant.okta.com".`));let u=g({active:e.active,reference_id:_(e[`reference-id`],`reference-id`,`text`),tenant_url:_(e[`tenant-url`],`tenant-url`,`text`)}),d=await l(`Updating`,async()=>n.send(cD,{body:u,account_id:a,integration_id:e[`integration-id`]}));s(d,{successLabel:`Updated`})})},dD={command:`integrations`,describe:`User Risk Scoring - manage integrations that provide risk score signals`,builder:e=>e.command(JE).command(ZE).command(eD).command(rD).command(uD).command(sD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var fD={method:`POST`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/${t.user_id}/reset`};function pD(e){return e.usage(`$0 zero-trust risk-scoring reset <user-id>
|
|
931
937
|
|
|
932
|
-
Resets risk scores for specified users, clearing their accumulated risk history.`).positional(`user-id`,{type:`string`,description:`User ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
938
|
+
Resets risk scores for specified users, clearing their accumulated risk history.`).positional(`user-id`,{type:`string`,description:`User ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const mD={command:`reset <user-id>`,describe:`Clear the risk score for a particular user`,builder:pD,handler:async e=>u({command:`zero-trust risk-scoring reset`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust risk-scoring reset`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zt_risk_scoring/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}/reset`,pathParams:{"user-id":String(e[`user-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`This operation wipes risk-scoring history.`}))return;let u=await l(`Deleting`,async()=>n.send(fD,{account_id:a,user_id:e[`user-id`]}));s(u,{successLabel:`Deleted`})})};var hD={method:`GET`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/summary`};function gD(e){return e.usage(`$0 zero-trust risk-scoring summary get
|
|
933
939
|
|
|
934
|
-
Gets an aggregate summary of risk scores across the account, including distribution and trends.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
940
|
+
Gets an aggregate summary of risk scores across the account, including distribution and trends.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _D={command:`get`,describe:`Get risk score info for all users in the account`,builder:gD,handler:async e=>u({command:`zero-trust risk-scoring summary get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust risk-scoring summary get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/zt_risk_scoring/summary`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(hD,{account_id:a}));s(u,{successLabel:`Loaded`})})},vD={command:`summary`,describe:`User Risk Scoring - retrieve account risk score summaries`,builder:e=>e.command(_D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},yD={command:`risk-scoring`,describe:`User Risk Scoring - retrieve and reset user risk scores`,builder:e=>e.command(GE).command(mD).command(HE).command(dD).command(vD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var bD={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/access/seats`,body:`json`};function xD(e){return e.usage("$0 zero-trust seats edit\n\nRemoves a user from a Zero Trust seat when both `access_seat` and `gateway_seat` are set to false.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const SD={command:`edit`,describe:`Update a user seat`,builder:xD,handler:async e=>u({command:`zero-trust seats edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust seats edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/seats`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(bD,{body:t,account_id:a}));s(r,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},CD={command:`seats`,describe:`Operations for seats`,builder:e=>e.command(SD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var wD={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/users/${t.user_id}/mfa_authenticators/${t.authenticator_id}`};function TD(e){return e.usage(`$0 zero-trust users mfa authenticators delete <authenticator-id>
|
|
935
941
|
|
|
936
|
-
Deletes a specific MFA device or passkey, including a PIV key or FIDO2 key enrollment, for a user. Admin deletion remains available when MFA is disabled. Successful deletion revokes the enrollment and returns a null result.`).positional(`authenticator-id`,{type:`string`,description:`The unique identifier for the MFA device.`,demandOption:!0}).option(`user-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
942
|
+
Deletes a specific MFA device or passkey, including a PIV key or FIDO2 key enrollment, for a user. Admin deletion remains available when MFA is disabled. Successful deletion revokes the enrollment and returns a null result.`).positional(`authenticator-id`,{type:`string`,description:`The unique identifier for the MFA device.`,demandOption:!0}).option(`user-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ED={command:`delete <authenticator-id>`,describe:`Delete a user's authenticator`,builder:TD,handler:async e=>u({command:`zero-trust users mfa authenticators delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust users mfa authenticators delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}/mfa_authenticators/${e[`authenticator-id`]==null?`<authenticator-id>`:encodeURIComponent(String(e[`authenticator-id`]))}`,pathParams:{"user-id":String(e[`user-id`]??``),"authenticator-id":String(e[`authenticator-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(wD,{account_id:a,user_id:e[`user-id`],authenticator_id:e[`authenticator-id`]}));s(u,{successLabel:`Deleted`})})},DD={command:`authenticators`,describe:`Operations for users.mfa.authenticators`,builder:e=>e.command(ED).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},OD={command:`mfa`,describe:`Operations for users.mfa`,builder:e=>e.command(DD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var kD={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/users/${t.user_id}/passkeys/${t.authenticator_id}`};function AD(e){return e.usage(`$0 zero-trust users passkeys delete <authenticator-id>
|
|
937
943
|
|
|
938
|
-
Alias of the authenticator deletion endpoint for passkey management. The identifier is the passkey's authenticator ID from the last-seen identity response. Successful deletion revokes the enrollment and returns a null result.`).positional(`authenticator-id`,{type:`string`,description:`The unique identifier for the MFA device.`,demandOption:!0}).option(`user-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
944
|
+
Alias of the authenticator deletion endpoint for passkey management. The identifier is the passkey's authenticator ID from the last-seen identity response. Successful deletion revokes the enrollment and returns a null result.`).positional(`authenticator-id`,{type:`string`,description:`The unique identifier for the MFA device.`,demandOption:!0}).option(`user-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const jD={command:`delete <authenticator-id>`,describe:`Delete a user's passkey`,builder:AD,handler:async e=>u({command:`zero-trust users passkeys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust users passkeys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}/passkeys/${e[`authenticator-id`]==null?`<authenticator-id>`:encodeURIComponent(String(e[`authenticator-id`]))}`,pathParams:{"user-id":String(e[`user-id`]??``),"authenticator-id":String(e[`authenticator-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(kD,{account_id:a,user_id:e[`user-id`],authenticator_id:e[`authenticator-id`]}));s(u,{successLabel:`Deleted`})})},MD={command:`passkeys`,describe:`Operations for users.passkeys`,builder:e=>e.command(jD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ND={command:`users`,describe:`Operations for users`,builder:e=>e.command(OD).command(MD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},PD={command:`zero-trust`,describe:`Cloudflare's SASE platform — secure access, device posture, DLP, tunnels, gateway policies, and network segmentation`,builder:e=>e.command(Pa).command(Mc).command(zc).command(Zd).command(eh).command(l_).command(CS).command(cT).command(cE).command(FE).command(yD).command(CD).command(ND).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{PD as default};
|