cf 1.0.0-beta.27 → 1.0.0-beta.29
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/README.md +10 -3
- package/dist/_meta/commands.json +7966 -5034
- package/dist/_meta/hand-written-commands.json +40 -10
- package/dist/_meta/schemas.json +3153 -3736
- package/dist/{abuse-reports-RxXqfDEW.mjs → abuse-reports-DqXYX_6F.mjs} +10 -10
- package/dist/{access-BxEprr2f.mjs → access-Cte4yyIz.mjs} +1 -1
- package/dist/{accounts-DU2ZNYqP.mjs → accounts-G-x-_cEx.mjs} +58 -57
- package/dist/{acm-CBCIKBJ4.mjs → acm-Bg3HqMGG.mjs} +7 -7
- package/dist/{addressing-BKxiLRHk.mjs → addressing-BwEofGEm.mjs} +46 -46
- package/dist/{agent-memory-DkBpQYUL.mjs → agent-memory-DhwZ2KRw.mjs} +15 -15
- package/dist/ai-DWWRIQIt.mjs +30 -0
- package/dist/ai-audit-CMEBz6ZP.mjs +6 -0
- package/dist/ai-gateway-D2s0isU-.mjs +76 -0
- package/dist/ai-search-a0uqr9yJ.mjs +74 -0
- package/dist/{ai-security-CvZfP2JC.mjs → ai-security-H_RqjRoL.mjs} +4 -4
- package/dist/alerting-Bgp9rE4I.mjs +52 -0
- package/dist/analytics-CFYM82FD.mjs +17 -0
- package/dist/analytics-engine-BLiEaLxb.mjs +4 -0
- package/dist/api-Dnt6lRJG.mjs +3 -0
- package/dist/{api-security-BbcvDtff.mjs → api-security-B0YtHglt.mjs} +63 -63
- package/dist/argo-BPwbzHY7.mjs +14 -0
- package/dist/{artifacts-2R2sxIKO.mjs → artifacts-B6UwC2PH.mjs} +20 -20
- package/dist/{audit-logs-LoBB1OO_.mjs → audit-logs-kG97iEnI.mjs} +2 -2
- package/dist/auth-Czr8ChBB.mjs +2 -0
- package/dist/auth-DA1PHaHi.mjs +2 -0
- package/dist/auth-Dwfa4S3h.mjs +7 -0
- package/dist/{auth-token-BwpERbnG.mjs → auth-token-CE3Wa5-b.mjs} +1 -1
- package/dist/{autoconfig-B2w-woU0.mjs → autoconfig-B4tFR6ua.mjs} +118 -114
- package/dist/{basin-catalog-AgOHGiPI.mjs → basin-catalog-DzVEPupy.mjs} +17 -17
- package/dist/billing-TERxOuLR.mjs +22 -0
- package/dist/{blocks-C8vyXIAT.mjs → blocks-C3Im7AT0.mjs} +1 -1
- package/dist/body-parser-HN91kAf0.mjs +2 -0
- package/dist/{body-unions-CjpNjwSW.mjs → body-unions-D9OSaf4M.mjs} +1 -1
- package/dist/{bot-management-fwxKIbaB.mjs → bot-management-SZw9jTOC.mjs} +4 -4
- package/dist/{botnet-feed-DCYB5kYZ.mjs → botnet-feed-DjdAeUtb.mjs} +5 -5
- package/dist/brand-protection-BpA7Gmf1.mjs +18 -0
- package/dist/browser-run-BvjfMK3f.mjs +40 -0
- package/dist/build-CCwo_ydV.mjs +2 -0
- package/dist/build-yQOzZg6Z.mjs +2 -0
- package/dist/builds-tMa3sbQU.mjs +62 -0
- package/dist/cache-b_EPh6Is.mjs +36 -0
- package/dist/cf-DmvZ2L51.mjs +18 -0
- package/dist/{chunk-DSGVRFIS-DQwKND2c.mjs → chunk-DSGVRFIS-Cj7pO-YQ.mjs} +1 -1
- package/dist/chunk-Q5KVZMHK-WOCEMyET.mjs +363 -0
- package/dist/cli-Cc7ujzAy.mjs +4 -0
- package/dist/{client-side-security-VmZzMy-m.mjs → client-side-security-DVkeCzcC.mjs} +14 -14
- package/dist/{cloud-connector-bMlFnqP0.mjs → cloud-connector-MVf4acRR.mjs} +3 -3
- package/dist/{cloudflared-Ba4KWdTO.mjs → cloudflared-BOkMl8Gm.mjs} +1 -1
- package/dist/cloudforce-one-KrCfQbRx.mjs +318 -0
- package/dist/{command-BxZBNPxG.mjs → command-BQbZw4Kx.mjs} +1 -1
- package/dist/command-BVct0Dvr.mjs +2 -0
- package/dist/{command-BiIVclNA.mjs → command-C4_lMRkw.mjs} +1 -1
- package/dist/command-CJ3ldWrA.mjs +2 -0
- package/dist/command-CyOdBNur.mjs +2 -0
- package/dist/command-D2XkyO1e.mjs +2 -0
- package/dist/command-DHODgfFZ.mjs +2 -0
- package/dist/command-DIIaZx_f.mjs +2 -0
- package/dist/command-DONwHpqZ.mjs +2 -0
- package/dist/command-DdYnSf-8.mjs +2 -0
- package/dist/command-DqOU7Ql2.mjs +2 -0
- package/dist/{command-pMoNdd22.mjs → command-HW7k43qu.mjs} +1 -1
- package/dist/command-NqM0lo4a.mjs +2 -0
- package/dist/command-bwVDyMv4.mjs +2 -0
- package/dist/command-yzqs4m83.mjs +2 -0
- package/dist/{completions-DRzBiqpv.mjs → completions-0YKvIyBT.mjs} +2 -2
- package/dist/connector-interrupts-CsunbRsr.mjs +6 -0
- package/dist/{connector-telemetry-events-BbAOUt9h.mjs → connector-telemetry-events-DmQPD7xC.mjs} +3 -3
- package/dist/{connector-telemetry-snapshots-DcpBx7Qx.mjs → connector-telemetry-snapshots-C62iHjC9.mjs} +3 -3
- package/dist/{connectors-D1WFLJoE.mjs → connectors-Bg0MU6ZT.mjs} +7 -7
- package/dist/containers-BiA_bpPR.mjs +76 -0
- package/dist/{content-scan-D1GfPSL0.mjs → content-scan-4SA2nacB.mjs} +6 -6
- package/dist/{context-Dp4CXG22.mjs → context-BGm5_wTT.mjs} +1 -1
- package/dist/{cps-D4uhzg3k.mjs → cps-WDmD3V5I.mjs} +3 -3
- package/dist/create-DmLDMvrj.mjs +2 -0
- package/dist/csam-scanner-Rmy-hBEA.mjs +8 -0
- package/dist/custom-csrs-D-lvkyRV.mjs +18 -0
- package/dist/custom-hostnames-B5BQX5m6.mjs +24 -0
- package/dist/custom-nameservers-CZrRjcjx.mjs +12 -0
- package/dist/custom-pages-CWwjtfbj.mjs +38 -0
- package/dist/d1-N81q-FAr.mjs +50 -0
- package/dist/{delegate-B4bKqF7i.mjs → delegate-livNdiwK.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/deploy-Ok4ncy06.mjs +2 -0
- package/dist/deploy-context-B_lLfxt7.mjs +55 -0
- package/dist/deploy-input-JZlEJwKB.mjs +2 -0
- package/dist/dev-DxbkJkzc.mjs +4 -0
- package/dist/{diagnostics-D1CUs2o9.mjs → diagnostics-DlJzpO8b.mjs} +7 -7
- package/dist/dialog-CD94-Kzw.mjs +2 -0
- package/dist/discover-D9FNaCDK.mjs +2 -0
- package/dist/discover-DGsMj9ZN.mjs +2 -0
- package/dist/{dist-D5qkmHhC.mjs → dist-BxhwE-W1.mjs} +202 -193
- package/dist/{dls-DWBiYzY1.mjs → dls-5OXuxLAB.mjs} +8 -8
- package/dist/dns-Burep9O7.mjs +142 -0
- package/dist/{dns-firewall-DH9xIT5H.mjs → dns-firewall-hUHaQ0DE.mjs} +8 -8
- package/dist/docs-BFVK88kB.mjs +3 -0
- package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-qsnRlRk6.mjs} +1 -1
- package/dist/{durable-objects-DF0MYpnV.mjs → durable-objects-D6R8S2Dk.mjs} +3 -3
- package/dist/email-auth--2KCzZNA.mjs +6 -0
- package/dist/email-routing-DzaExfVf.mjs +44 -0
- package/dist/{email-security-CnNa1YON.mjs → email-security-DwQJszzy.mjs} +71 -71
- package/dist/{email-sending-CpDSw-Eb.mjs → email-sending-mQd2qB-o.mjs} +21 -21
- package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
- package/dist/error-sanitization-D069tpKk.mjs +2 -0
- package/dist/errors-C_bGcR0X.mjs +11 -0
- package/dist/field-extractors-MVOizTlB.mjs +8 -0
- package/dist/{firewall-CY_oem-d.mjs → firewall-DtSIlkfL.mjs} +19 -19
- package/dist/flagship-9E5gwNki.mjs +24 -0
- package/dist/{fraud-CSUKLh8X.mjs → fraud-DjqhVJdf.mjs} +3 -3
- package/dist/generate-BzOnRBij.mjs +2 -0
- package/dist/generate-DfxZtpn9.mjs +2 -0
- package/dist/get-3XNn0upb.mjs +2 -0
- package/dist/{global-options-DiKj2cQy.mjs → global-options-4pyD17hd.mjs} +1 -1
- package/dist/{google-tag-gateway-C2skt6t-.mjs → google-tag-gateway-BM5GmCZa.mjs} +3 -3
- package/dist/gt-BV-jij5q.mjs +4 -0
- package/dist/healthchecks-CEZ5f3XJ.mjs +20 -0
- package/dist/{hyperdrive-FcBbpew4.mjs → hyperdrive-Da8hCcUw.mjs} +12 -12
- package/dist/{iam-8T74DNhH.mjs → iam-BK6N7NdQ.mjs} +31 -31
- package/dist/{images-C3JUaf6b.mjs → images-3bCWE6Ml.mjs} +33 -33
- package/dist/index.mjs +1 -1
- package/dist/init-BgCF9K8h.mjs +43 -0
- package/dist/intel-BQ58CJLt.mjs +62 -0
- package/dist/{interactive-CKHdGvkh.mjs → interactive-JBA3qOUa.mjs} +9 -9
- package/dist/{internal-CamuESs0.mjs → internal-CWPz0sBF.mjs} +2 -2
- package/dist/{ips-DinCNnWj.mjs → ips-3WYegiVW.mjs} +2 -2
- package/dist/k2-Bc_hjmiv.mjs +10 -0
- package/dist/kv-DbShBhhg.mjs +12 -0
- package/dist/{lazy-command-WB1FOuew.mjs → lazy-command-CbGyEqFK.mjs} +1 -1
- package/dist/leaked-credential-checks-DgPefxP9.mjs +16 -0
- package/dist/{live-B6AsI_E5.mjs → live-BTtMv1a6.mjs} +2 -2
- package/dist/load-balancers-C2hg52WA.mjs +84 -0
- package/dist/{local-CgBhtmON.mjs → local-B3zt9PXR.mjs} +1 -1
- package/dist/local-DRxctCh9.mjs +2 -0
- package/dist/local-runtime-BOnDiMDc.mjs +2 -0
- package/dist/{log-BWdaOGOW.mjs → log-Brx-wjJW.mjs} +3 -3
- package/dist/log-DBAHla_W.mjs +2 -0
- package/dist/login-CK3nn9a5.mjs +2 -0
- package/dist/{login-BJHaTERg.mjs → login-DiR-buzS.mjs} +3 -3
- package/dist/{logpush-qhlxsioM.mjs → logpush-CitvUX-J.mjs} +22 -22
- package/dist/{logs-bI54CJ0w.mjs → logs-CfWHu4Ir.mjs} +14 -16
- package/dist/magic-network-monitoring-gU6yzzML.mjs +34 -0
- package/dist/{magic-transit-BwDyySHJ.mjs → magic-transit-B3JY9u5o.mjs} +139 -139
- package/dist/{managed-defense-CsBBkfeQ.mjs → managed-defense-C_EQ-NYp.mjs} +9 -9
- package/dist/managed-transforms-DIGl6JkM.mjs +8 -0
- package/dist/{mcp-CyI0sDmL.mjs → mcp-DqhQJVaz.mjs} +15 -15
- package/dist/{mesh-Czr0UCP4.mjs → mesh-DXVZBNDC.mjs} +12 -12
- package/dist/{migrate-DKDWYrz2.mjs → migrate-CmXyk9vX.mjs} +1 -1
- package/dist/{monetization-NUgfDtSy.mjs → monetization-CWg-mySr.mjs} +9 -9
- package/dist/{network-interconnects-DuIBe8fK.mjs → network-interconnects-DhfKL5tG.mjs} +17 -19
- package/dist/{network-B42zrBic.mjs → network-jtgq5eb4.mjs} +24 -24
- package/dist/o11y-eYYs59X9.mjs +88 -0
- package/dist/oauth-BgDZMd72.mjs +5 -0
- package/dist/{oauth-BLQ1-y3R.mjs → oauth-V37G-PaV.mjs} +1 -1
- package/dist/{observability-BxhJQCgZ.mjs → observability-CB72eC4T.mjs} +2 -2
- package/dist/ohttp-gateway-K9ToEft8.mjs +8 -0
- package/dist/organizations-BllV7l_c.mjs +70 -0
- package/dist/output-hFMAotFl.mjs +2 -0
- package/dist/package-oNVeacC9.mjs +2 -0
- package/dist/page-rules-BVmi-ZFW.mjs +35 -0
- package/dist/pages-5spcBpX1.mjs +48 -0
- package/dist/pay-per-crawl-BgsdGcBi.mjs +36 -0
- package/dist/{pay-per-use-VatiU-Nt.mjs → pay-per-use-CzmI1kEA.mjs} +16 -16
- package/dist/pipelines-CbtmLRxt.mjs +40 -0
- package/dist/{precursor-D3VH2MXT.mjs → precursor-Dk8YOKf_.mjs} +2 -2
- package/dist/previews-Bv1HMMtO.mjs +6 -0
- package/dist/progress-DE_G09u2.mjs +2 -0
- package/dist/project-settings-D_S-UC8I.mjs +3 -0
- package/dist/prompt-D274Im1O.mjs +4 -0
- package/dist/queues-DGCYUr4g.mjs +52 -0
- package/dist/r2-DtCk-Nfi.mjs +112 -0
- package/dist/{radar-CvLtu-Vr.mjs → radar-1CwqOsMZ.mjs} +150 -150
- package/dist/raw-fetch-DhlyWQtk.mjs +2 -0
- package/dist/{ready-gsGEaWLL.mjs → ready-CcoEA7M7.mjs} +2 -2
- package/dist/{realtime-DiCEgFTC.mjs → realtime-DFUxwIG5.mjs} +80 -81
- package/dist/registrar-Cl1snz8z.mjs +43 -0
- package/dist/registrar-sandbox-Cne9BVCZ.mjs +58 -0
- package/dist/{reporting-BiHgnT8L.mjs → reporting-D9FC-Z-3.mjs} +7 -7
- package/dist/request-headers-Bopp5lH_.mjs +2 -0
- package/dist/request-tracers-CSSB9_aW.mjs +4 -0
- package/dist/resource-sharing-D8yuzJm7.mjs +36 -0
- package/dist/{rules-CRhe_ca9.mjs → rules-DzmOQ3MB.mjs} +8 -8
- package/dist/rulesets-DsTGcgbc.mjs +42 -0
- package/dist/{rum-BfnWHW_d.mjs → rum-DrJLI93T.mjs} +14 -14
- package/dist/run-C5yPsiO2.mjs +2 -0
- package/dist/run-CXWkMU3x.mjs +2 -0
- package/dist/schema-CfZOW8Zw.mjs +2 -0
- package/dist/{schema-cache-BIo0Gi2H.mjs → schema-cache-CtqAs0PP.mjs} +1 -1
- package/dist/schema-flags-DO3kLYBu.mjs +4 -0
- package/dist/scim-0OufLKru.mjs +16 -0
- package/dist/{secrets-store-DgtzZRze.mjs → secrets-store-BQeLzFxv.mjs} +11 -11
- package/dist/{security-insights-SlUGW3F_.mjs → security-insights-D2pj8-O-.mjs} +20 -20
- package/dist/{security-txt-C3YS0REz.mjs → security-txt-SKtgW4n-.mjs} +4 -4
- package/dist/session-COdP8BXD.mjs +2 -0
- package/dist/shared-D_2KLpP3.mjs +2 -0
- package/dist/{signed-url-ClLk45_J.mjs → signed-url-CcE2zQ4Y.mjs} +2 -2
- package/dist/smart-shield-Dod9Gs6T.mjs +22 -0
- package/dist/snippets-DrrdpLnS.mjs +18 -0
- package/dist/spawn-DNf-Ge8d.mjs +5 -0
- package/dist/{spectrum-Cj0BMtg2.mjs → spectrum-CHBGZbZF.mjs} +11 -11
- package/dist/{speed-BrVeZRyX.mjs → speed-vOlHyG3v.mjs} +11 -11
- package/dist/sql-BCuLxGSf.mjs +4 -0
- package/dist/src-ByCoEqOw.mjs +133 -0
- package/dist/{ssl-Bx4LCutF.mjs → ssl-BA_dcVwF.mjs} +60 -62
- package/dist/startup-profile-CyQk_f_L.mjs +2 -0
- package/dist/{startup-profile-DqaYNT0b.mjs → startup-profile-uh-F0HRS.mjs} +3 -3
- package/dist/state-B6r-b_-d.mjs +2 -0
- package/dist/{state-BmzOLELo.mjs → state-CTLznbVs.mjs} +1 -1
- package/dist/{containers-DINLx5_i.mjs → static-assets-DGDoaJf1.mjs} +216 -210
- package/dist/stream-CzlqY8hq.mjs +89 -0
- package/dist/{tags-xVzjZxdt.mjs → tags-BLeaslAb.mjs} +8 -8
- package/dist/telemetry-COlodX5Z.mjs +2 -0
- package/dist/{telemetry-CJ9URio3.mjs → telemetry-DF7A5Bpk.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-M7Fxqh2W.mjs → tenant-custom-nameservers-C5rh6jPf.mjs} +4 -4
- package/dist/tenants-CRirmhxS.mjs +13 -0
- package/dist/{tools-C-vmgYSv.mjs → tools-BRjRgZnj.mjs} +1 -1
- package/dist/tunnels-nLfIWPYT.mjs +27 -0
- package/dist/{turnstile-B_Ugzgom.mjs → turnstile-CZjXtBCr.mjs} +10 -10
- package/dist/ui-dWsVmFCG.mjs +2 -0
- package/dist/{update-check-DRr0eRhB.mjs → update-check-CXMdVBhW.mjs} +1 -1
- package/dist/{update-check-DHUo4FOJ.mjs → update-check-D_Oky9-u.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-CZRQH_pJ.mjs → url-normalization-DTKgJHE8.mjs} +4 -4
- package/dist/url-scanner-9XW3zLaU.mjs +16 -0
- package/dist/user-Bk1BIqZ5.mjs +103 -0
- package/dist/vectorize-CgOfmWYq.mjs +30 -0
- package/dist/verify-B9ILCohg.mjs +2 -0
- package/dist/verify-BCuWaO-L.mjs +2 -0
- package/dist/version-CcuBNjqg.mjs +2 -0
- package/dist/waiting-rooms-C3nTKfK9.mjs +52 -0
- package/dist/{web-assets-CgQXsp8m.mjs → web-assets-CWU3jrit.mjs} +29 -29
- package/dist/web3-CRpQ5sl4.mjs +26 -0
- package/dist/workers-BZMvamn0.mjs +39 -0
- package/dist/{workers-for-platforms-5RkV9MVp.mjs → workers-for-platforms-C7F2ev-5.mjs} +18 -18
- package/dist/{workers-vpc-Bt4OQbwM.mjs → workers-vpc-ztEKvWmq.mjs} +6 -6
- package/dist/workflows-Dd88_Nqc.mjs +48 -0
- package/dist/{wrangler-migration-BbmGOu8l.mjs → wrangler-migration-BzMTJPdI.mjs} +302 -293
- package/dist/zaraz-BFK0p28R.mjs +22 -0
- package/dist/zero-trust-Cdjfp0Ie.mjs +1008 -0
- package/dist/{zones-DTAcguf6.mjs → zones-DDn5jk6I.mjs} +51 -51
- package/package.json +20 -20
- package/dist/ai-DqEN_hhg.mjs +0 -30
- package/dist/ai-audit-BmzOgt6x.mjs +0 -6
- package/dist/ai-gateway-B0uiYVHq.mjs +0 -74
- package/dist/ai-search-DbZIxdio.mjs +0 -74
- package/dist/alerting-BjGwBxZT.mjs +0 -52
- package/dist/analytics-C7kT_H-W.mjs +0 -17
- package/dist/analytics-engine-BHpcNSdD.mjs +0 -4
- package/dist/api-X3wKppsT.mjs +0 -3
- package/dist/argo-D1VONzu-.mjs +0 -14
- package/dist/auth-CspwoBlp.mjs +0 -2
- package/dist/auth-D499YE2n.mjs +0 -7
- package/dist/auth-FK2eLQ02.mjs +0 -2
- package/dist/billing-DRNww0iC.mjs +0 -24
- package/dist/body-parser-BKcZS9iJ.mjs +0 -2
- package/dist/brand-protection-BVICLzBc.mjs +0 -26
- package/dist/browser-run-CEk-NIgP.mjs +0 -40
- package/dist/build-CRm2TQq8.mjs +0 -2
- package/dist/build-DO_GNhRl.mjs +0 -2
- package/dist/builds-CoazxuN-.mjs +0 -64
- package/dist/cache-jlLJLSu7.mjs +0 -36
- package/dist/cf-hP0SOgC6.mjs +0 -18
- package/dist/chunk-SOBRPAPT-BKzUiNx_.mjs +0 -363
- package/dist/cli-Nqf58-1c.mjs +0 -4
- package/dist/cloudforce-one-CCaIBOAo.mjs +0 -318
- package/dist/command-BASaTmJc.mjs +0 -2
- package/dist/command-Bih1HLr3.mjs +0 -2
- package/dist/command-ByYf12-8.mjs +0 -2
- package/dist/command-C0qCuw03.mjs +0 -2
- package/dist/command-C2FVMd1b.mjs +0 -2
- package/dist/command-C4OgtX_x.mjs +0 -2
- package/dist/command-C5Kqc5Km.mjs +0 -2
- package/dist/command-CFxyp8Uo.mjs +0 -2
- package/dist/command-CZAR85ba.mjs +0 -2
- package/dist/command-CelQVrZL.mjs +0 -2
- package/dist/command-CrAlzysj.mjs +0 -2
- package/dist/command-MxFFWqMg.mjs +0 -2
- package/dist/connector-interrupts-CrTeSyaM.mjs +0 -6
- package/dist/containers-BOBEs1Gk.mjs +0 -75
- package/dist/create-BtmuVqVL.mjs +0 -2
- package/dist/csam-scanner-DOOUBeBM.mjs +0 -8
- package/dist/custom-csrs-DtdFo5YZ.mjs +0 -18
- package/dist/custom-hostnames-ccdlELaD.mjs +0 -24
- package/dist/custom-nameservers-p3gDjfva.mjs +0 -12
- package/dist/custom-pages-DAkKVzgR.mjs +0 -38
- package/dist/d1-CDIyRdh4.mjs +0 -52
- package/dist/deploy-BaC5Ty7F.mjs +0 -2
- package/dist/deploy-context-DTTgNGro.mjs +0 -56
- package/dist/deploy-input-mAy06fAI.mjs +0 -2
- package/dist/dev-De-HszNT.mjs +0 -4
- package/dist/dialog-D5lus4M4.mjs +0 -2
- package/dist/discover-6kAmVMPp.mjs +0 -2
- package/dist/discover-C06Syc2B.mjs +0 -2
- package/dist/dns-wMjf1t6-.mjs +0 -152
- package/dist/docs-BA7qslb2.mjs +0 -3
- package/dist/email-auth-BShMFXn4.mjs +0 -6
- package/dist/email-domains-CDSbVclP.mjs +0 -14
- package/dist/email-routing-CBCkbg_F.mjs +0 -44
- package/dist/error-sanitization-B025CygB.mjs +0 -2
- package/dist/errors-DatLr-iR.mjs +0 -11
- package/dist/field-extractors-BwGdMnTr.mjs +0 -8
- package/dist/flagship-Bat5EZCk.mjs +0 -24
- package/dist/generate-CeeWW3eX.mjs +0 -3
- package/dist/generate-D6V4Q58z.mjs +0 -2
- package/dist/get-Be821dio.mjs +0 -2
- package/dist/gt-BQkaDQDq.mjs +0 -3
- package/dist/healthchecks-uC43QKQd.mjs +0 -20
- package/dist/init-BEVVz4_P.mjs +0 -43
- package/dist/intel-DRy4rHrt.mjs +0 -62
- package/dist/k2-wsanPL3y.mjs +0 -10
- package/dist/kv-BLSPcEnH.mjs +0 -12
- package/dist/leaked-credential-checks-CSZd9hBQ.mjs +0 -16
- package/dist/load-balancers-gap5u4b1.mjs +0 -84
- package/dist/local-CFsO9Tkg.mjs +0 -2
- package/dist/local-runtime-CmlJ20uJ.mjs +0 -2
- package/dist/log-DZfik9Jk.mjs +0 -2
- package/dist/login-BfuOf-Yi.mjs +0 -2
- package/dist/magic-network-monitoring-CX3TaMTu.mjs +0 -34
- package/dist/managed-transforms-CUC-uAbW.mjs +0 -8
- package/dist/o11y-oEUpMC3O.mjs +0 -86
- package/dist/oauth-BmSFLp_s.mjs +0 -4
- package/dist/organization-CEnlXwrl.mjs +0 -70
- package/dist/organizations-Dt86ToxE.mjs +0 -4
- package/dist/origin-post-quantum-encryption-lX-uaJSL.mjs +0 -6
- package/dist/output-BJEgbI0G.mjs +0 -2
- package/dist/package-CiRJBRHO.mjs +0 -2
- package/dist/page-rules-J6LhwR-s.mjs +0 -38
- package/dist/pages-BksdnChs.mjs +0 -48
- package/dist/pay-per-crawl-BLcbHRoR.mjs +0 -36
- package/dist/pipelines-B5AoB3f3.mjs +0 -40
- package/dist/previews-DzJ85fsr.mjs +0 -6
- package/dist/progress-DLri-rA7.mjs +0 -2
- package/dist/project-settings-nBMEx1f-.mjs +0 -3
- package/dist/prompt-D0dXwuME.mjs +0 -4
- package/dist/queues-BsAck4To.mjs +0 -52
- package/dist/r2-BYjdHDEZ.mjs +0 -112
- package/dist/raw-fetch-DQeDx1wT.mjs +0 -2
- package/dist/registrar-D4wdgWpo.mjs +0 -43
- package/dist/registrar-sandbox-B6yopzdG.mjs +0 -58
- package/dist/request-headers-CoxHUNcB.mjs +0 -2
- package/dist/request-tracers-817HTytF.mjs +0 -4
- package/dist/resource-sharing-CW9xxtq5.mjs +0 -36
- package/dist/rulesets-CKyc-Xlx.mjs +0 -42
- package/dist/run-Ciw_GIrC.mjs +0 -2
- package/dist/run-DD45EQTm.mjs +0 -2
- package/dist/schema-DuLIZRhA.mjs +0 -2
- package/dist/schema-flags-DrqvwQNw.mjs +0 -4
- package/dist/scim-C4iRWNYB.mjs +0 -16
- package/dist/session-D2yuwO4i.mjs +0 -2
- package/dist/shared--uVkAAd7.mjs +0 -2
- package/dist/smart-shield-Dn95hqUH.mjs +0 -22
- package/dist/snippets-BNUKOajz.mjs +0 -18
- package/dist/spawn-DuT4snxu.mjs +0 -5
- package/dist/sql-BX1pBqj3.mjs +0 -4
- package/dist/src-DPnUfK4c.mjs +0 -131
- package/dist/startup-profile-tZNb2HGz.mjs +0 -2
- package/dist/state-Uwfrmw5I.mjs +0 -2
- package/dist/stream-BRzr6yh0.mjs +0 -89
- package/dist/telemetry-Pt5GpCKD.mjs +0 -2
- package/dist/tunnels-DQVXKUKA.mjs +0 -27
- package/dist/ui-FYultowZ.mjs +0 -2
- package/dist/url-scanner-BH4PLy16.mjs +0 -16
- package/dist/user-Bn82Qw0Y.mjs +0 -103
- package/dist/vectorize-DoVVz_sh.mjs +0 -30
- package/dist/version-Zr2oF8mY.mjs +0 -2
- package/dist/waiting-rooms-QUW131o3.mjs +0 -52
- package/dist/web3-TY9s6Swn.mjs +0 -26
- package/dist/workers-B3uJqJKc.mjs +0 -39
- package/dist/workers-builds-BgGY0IGk.mjs +0 -14
- package/dist/workflows-6m85DdqF.mjs +0 -48
- package/dist/zaraz-8WSJ7l0L.mjs +0 -22
- package/dist/zero-trust-DK0cqDZv.mjs +0 -1022
|
@@ -1,1022 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{i as n,n as r}from"./auth-FK2eLQ02.mjs";import{a as i,i as a,t as o}from"./context-Dp4CXG22.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-DLri-rA7.mjs";import{t as u}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.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-D0dXwuME.mjs";import{n as ee,t as te}from"./raw-fetch-DQeDx1wT.mjs";import{t as ne}from"./body-unions-CjpNjwSW.mjs";var re={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps`,body:`json`};function ie(e){return e.usage(`$0 zero-trust access applications create
|
|
3
|
-
|
|
4
|
-
Adds a new application to Access.
|
|
5
|
-
|
|
6
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).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:`create`,describe:`Add an Access application`,builder:ie,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(re,{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 oe={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}`};function se(e){return e.usage(`$0 zero-trust access applications delete <app-id>
|
|
7
|
-
|
|
8
|
-
Deletes an application from Access.
|
|
9
|
-
|
|
10
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`app-id`,{type:`string`,description:`App 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 ce={command:`delete <app-id>`,describe:`Delete an Access application`,builder:se,handler:async e=>u({command:`zero-trust access applications delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"app-id":String(e[`app-id`]??``)},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();if(u===`zones`?e.zoneId=d:e.accountId=d,!await x({force:!!e.force}))return;let f=await l(`Deleting`,async()=>n.send(oe,{account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(f,{successLabel:`Deleted`})})};var le={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}`};function ue(e){return e.usage(`$0 zero-trust access applications get <app-id>
|
|
11
|
-
|
|
12
|
-
Fetches information about an Access application.
|
|
13
|
-
|
|
14
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`get <app-id>`,describe:`Get an Access application`,builder:ue,handler:async e=>u({command:`zero-trust access applications 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 access applications get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"app-id":String(e[`app-id`]??``)},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(le,{account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(f,{successLabel:`Loaded`})})};var fe={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps`,query:[`name`,`domain`,`aud`,`target_attributes`,`exact`,`search`,`page`,`per_page`]};function pe(e){return e.usage(`$0 zero-trust access applications list
|
|
15
|
-
|
|
16
|
-
Lists all Access applications in an account or zone.
|
|
17
|
-
|
|
18
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`name`,{type:`string`,description:`The name of the app.`}).option(`domain`,{type:`string`,description:`The domain of the app.`}).option(`aud`,{type:`string`,description:`The aud of the app.`}).option(`target-attributes`,{type:`string`,description:`Target Criteria attributes in key=value format.`}).option(`exact`,{type:`boolean`,description:`True for only exact string matches against passed name/domain query parameters.`}).option(`search`,{type:`string`,description:`Search for apps by other listed query parameters.`}).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 me={command:`list`,describe:`List Access applications`,builder:pe,handler:async e=>u({command:`zero-trust access applications list`,classification:{safeFlags:[`exact`,`dry-run`]}},e,async()=>{let n={name:e.name,domain:e.domain,aud:e.aud,target_attributes:e[`target-attributes`],exact:e.exact,search:e.search,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=e.zone===void 0?await i():void 0,r=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;c({command:`cf zero-trust access applications list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${r}/${a}/access/apps`,pathParams:{"account-or-zone":String(r),"account-or-zone-id":String(a)},query:n,bodyKind:`none`});return}let u=await r(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await o();d===`zones`?e.zoneId=f:e.accountId=f;let p=await l(`Loading`,async()=>u.send(fe,{account_or_zone:d,account_or_zone_id:f,...n}));s(p,{successLabel:`Loaded`})})};var he={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/apps/${t.app_id}/policies/${t.policy_id}/make_reusable`};function ge(e){return e.usage(`$0 zero-trust access applications policies make-reusable <policy-id>
|
|
19
|
-
|
|
20
|
-
Converts an application-scoped policy to a reusable policy. The policy will no longer be exclusively scoped to the application. Further updates to the policy should go through the /accounts/{account_id}/policies/{uid} endpoint.`).positional(`policy-id`,{type:`string`,description:`The policy ID.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The application ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`make-reusable <policy-id>`,describe:`Convert an Access application policy to a reusable policy`,builder:ge,handler:async e=>u({command:`zero-trust access applications policies make-reusable`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access applications policies make-reusable`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}/make_reusable`,pathParams:{"app-id":String(e[`app-id`]??``),"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Updating`,async()=>n.send(he,{account_id:a,app_id:e[`app-id`],policy_id:e[`policy-id`]}));s(u,{successLabel:`Updated`})})},ve={command:`policies`,describe:`Operations for access.applications.policies`,builder:e=>e.command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ye={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/policy-tests`,body:`json`,errors:{400:`BadRequestError`}};function be(e){return e.usage(`$0 zero-trust access applications policy-tests create
|
|
21
|
-
|
|
22
|
-
Starts an Access policy test.`).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 xe={command:`create`,describe:`Start Access policy test`,builder:be,handler:async e=>u({command:`zero-trust access applications policy-tests create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access applications policy-tests create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/policy-tests`,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(`Creating`,async()=>n.send(ye,{body:t,account_id:a}));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 Se={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/policy-tests/${t.policy_test_id}`,errors:{400:`BadRequestError`}};function Ce(e){return e.usage(`$0 zero-trust access applications policy-tests get <policy-test-id>
|
|
23
|
-
|
|
24
|
-
Fetches the current status of a given Access policy test.`).positional(`policy-test-id`,{type:`string`,description:`The UUID of the policy test.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const we={command:`get <policy-test-id>`,describe:`Get the current status of a given Access policy test`,builder:Ce,handler:async e=>u({command:`zero-trust access applications policy-tests get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access applications policy-tests get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/policy-tests/${e[`policy-test-id`]==null?`<policy-test-id>`:encodeURIComponent(String(e[`policy-test-id`]))}`,pathParams:{"policy-test-id":String(e[`policy-test-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(Se,{account_id:a,policy_test_id:e[`policy-test-id`]}));s(u,{successLabel:`Loaded`})})};var Te={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/policy-tests/${t.policy_test_id}/users`,query:[`page`,`per_page`,`status`],errors:{400:`BadRequestError`}};function Ee(e){return e.usage(`$0 zero-trust access applications policy-tests users list
|
|
25
|
-
|
|
26
|
-
Fetches a single page of user results from an Access policy test.`).option(`policy-test-id`,{type:`string`,description:`The UUID of the policy test.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`status`,{type:`string`,description:`Filter users by their policy evaluation status.`,choices:[`success`,`fail`,`error`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`list`,describe:`Get an Access policy test users page`,builder:Ee,handler:async e=>u({command:`zero-trust access applications policy-tests users list`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],status:e.status};if(e.dryRun){let t=await i();c({command:`cf zero-trust access applications policy-tests users list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/policy-tests/${e[`policy-test-id`]==null?`<policy-test-id>`:encodeURIComponent(String(e[`policy-test-id`]))}/users`,pathParams:{"policy-test-id":String(e[`policy-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(Te,{account_id:u,policy_test_id:e[`policy-test-id`],...n}));s(d,{successLabel:`Loaded`})})},Oe={command:`users`,describe:`Operations for access.applications.policy-tests.users`,builder:e=>e.command(De).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ke={command:`policy-tests`,describe:`Operations for access.applications.policy-tests`,builder:e=>e.command(xe).command(we).command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ae={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}/revoke_tokens`};function je(e){return e.usage(`$0 zero-trust access applications revoke-tokens <app-id>
|
|
27
|
-
|
|
28
|
-
Revokes all tokens issued for an application.
|
|
29
|
-
|
|
30
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`app-id`,{type:`string`,description:`App 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 Me={command:`revoke-tokens <app-id>`,describe:`Revoke application tokens`,builder:je,handler:async e=>u({command:`zero-trust access applications revoke-tokens`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 revoke-tokens`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/revoke_tokens`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"app-id":String(e[`app-id`]??``)},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();if(u===`zones`?e.zoneId=d:e.accountId=d,!await x({force:!!e.force,message:`This operation invalidates every service token for the app.`}))return;let f=await l(`Deleting`,async()=>n.send(Ae,{account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(f,{successLabel:`Deleted`})})};var Ne={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}/settings`,body:`json`};function Pe(e){return e.usage(`$0 zero-trust access applications settings update <app-id>
|
|
31
|
-
|
|
32
|
-
Updates Access application settings.
|
|
33
|
-
|
|
34
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`allow-iframe`,{type:`boolean`,description:`Enables loading application content in an iFrame.`}).option(`skip-interstitial`,{type:`boolean`,description:`Enables automatic authentication through cloudflared.`}).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 Fe={command:`update <app-id>`,describe:`Update Access application settings`,builder:Pe,handler:async e=>u({command:`zero-trust access applications settings update`,classification:{safeFlags:[`allow-iframe`,`skip-interstitial`,`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 settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/settings`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({allow_iframe:e[`allow-iframe`],skip_interstitial:e[`skip-interstitial`]}):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(Ne,{body:t,account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(r,{successLabel:`Updated`});return}let p=g({allow_iframe:e[`allow-iframe`],skip_interstitial:e[`skip-interstitial`]}),m=await l(`Updating`,async()=>n.send(Ne,{body:p,account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(m,{successLabel:`Updated`})})},Ie={command:`settings`,describe:`Operations for access.applications.settings`,builder:e=>e.command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Le={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}/ca`};function Re(e){return e.usage(`$0 zero-trust access applications short-lived-certificates create <app-id>
|
|
35
|
-
|
|
36
|
-
Generates a new short-lived certificate CA and public key.
|
|
37
|
-
|
|
38
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`app-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ze={command:`create <app-id>`,describe:`Create a short-lived certificate CA`,builder:Re,handler:async e=>u({command:`zero-trust access applications short-lived-certificates 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 short-lived-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/ca`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"app-id":String(e[`app-id`]??``)},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(`Creating`,async()=>n.send(Le,{account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(f,{successLabel:`Created`})})};var Be={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}/ca`};function Ve(e){return e.usage(`$0 zero-trust access applications short-lived-certificates delete <app-id>
|
|
39
|
-
|
|
40
|
-
Deletes a short-lived certificate CA.
|
|
41
|
-
|
|
42
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`app-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 He={command:`delete <app-id>`,describe:`Delete a short-lived certificate CA`,builder:Ve,handler:async e=>u({command:`zero-trust access applications short-lived-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 short-lived-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/ca`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"app-id":String(e[`app-id`]??``)},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();if(u===`zones`?e.zoneId=d:e.accountId=d,!await x({force:!!e.force}))return;let f=await l(`Deleting`,async()=>n.send(Be,{account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(f,{successLabel:`Deleted`})})};var Ue={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}/ca`};function We(e){return e.usage(`$0 zero-trust access applications short-lived-certificates get <app-id>
|
|
43
|
-
|
|
44
|
-
Fetches a short-lived certificate CA and its public key.
|
|
45
|
-
|
|
46
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`app-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ge={command:`get <app-id>`,describe:`Get a short-lived certificate CA`,builder:We,handler:async e=>u({command:`zero-trust access applications short-lived-certificates 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 access applications short-lived-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/ca`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"app-id":String(e[`app-id`]??``)},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(Ue,{account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(f,{successLabel:`Loaded`})})};var Ke={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/ca`,query:[`page`,`per_page`]};function qe(e){return e.usage(`$0 zero-trust access applications short-lived-certificates list
|
|
47
|
-
|
|
48
|
-
Lists short-lived certificate CAs and their public keys.
|
|
49
|
-
|
|
50
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).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 Je={command:`list`,describe:`List short-lived certificate CAs`,builder:qe,handler:async e=>u({command:`zero-trust access applications short-lived-certificates list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=e.zone===void 0?await i():void 0,r=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;c({command:`cf zero-trust access applications short-lived-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${r}/${a}/access/apps/ca`,pathParams:{"account-or-zone":String(r),"account-or-zone-id":String(a)},query:n,bodyKind:`none`});return}let u=await r(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await o();d===`zones`?e.zoneId=f:e.accountId=f;let p=await l(`Loading`,async()=>u.send(Ke,{account_or_zone:d,account_or_zone_id:f,...n}));s(p,{successLabel:`Loaded`})})},Ye={command:`short-lived-certificates`,describe:`Operations for access.applications.short-lived-certificates`,builder:e=>e.command(ze).command(He).command(Ge).command(Je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Xe={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}`,body:`json`};function Ze(e){return e.usage(`$0 zero-trust access applications update <app-id>
|
|
51
|
-
|
|
52
|
-
Updates an Access application.
|
|
53
|
-
|
|
54
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`app-id`,{type:`string`,description:`App ID`,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 Qe={command:`update <app-id>`,describe:`Update an Access application`,builder:Ze,handler:async e=>u({command:`zero-trust access applications 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 applications update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"app-id":String(e[`app-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(Xe,{body:t,account_or_zone:u,account_or_zone_id:d,app_id:e[`app-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.`)})};var $e={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/apps/${t.app_id}/user_policy_checks`};function et(e){return e.usage(`$0 zero-trust access applications user-policy-checks list
|
|
55
|
-
|
|
56
|
-
Tests if a specific user has permission to access an application.
|
|
57
|
-
|
|
58
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const tt={command:`list`,describe:`Test Access policies`,builder:et,handler:async e=>u({command:`zero-trust access applications user-policy-checks list`,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 user-policy-checks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/user_policy_checks`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"app-id":String(e[`app-id`]??``)},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($e,{account_or_zone:u,account_or_zone_id:d,app_id:e[`app-id`]}));s(f,{successLabel:`Loaded`})})},nt={command:`user-policy-checks`,describe:`Operations for access.applications.user-policy-checks`,builder:e=>e.command(tt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},rt={command:`applications`,describe:`Operations for access.applications`,builder:e=>e.command(ae).command(ce).command(de).command(me).command(Me).command(Qe).command(ve).command(ke).command(Ie).command(Ye).command(nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var it={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/custom_pages`,body:`json`,errors:{422:`UnprocessableEntityError`}};function at(e){return e.usage(`$0 zero-trust access custom-pages create
|
|
59
|
-
|
|
60
|
-
Create a custom page`).option(`app-count`,{type:`number`,description:`Number of apps the custom page is assigned to.`}).option(`contract-version`,{type:`number`,description:`Contract version of the page's Liquid template. Present (>= 1) marks a sanitized template; absent or 0 marks a legacy page served verbatim.`}).option(`created-at`,{type:`string`,description:`The created_at field`}).option(`custom-html`,{type:`string`,description:`Custom page HTML.`}).option(`name`,{type:`string`,description:`Custom page name.`}).option(`type`,{type:`string`,description:`Custom page type.`,choices:[`identity_denied`,`forbidden`,`login`,`interstitial`]}).coerce(`type`,e=>_(e,`type`,`text`)).option(`uid`,{type:`string`,description:`UUID.`}).option(`updated-at`,{type:`string`,description:`The updated_at 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 ot={command:`create`,describe:`Create a custom page`,builder:at,handler:async e=>u({command:`zero-trust access custom-pages create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access custom-pages create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/custom_pages`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({app_count:e[`app-count`],contract_version:e[`contract-version`],created_at:_(e[`created-at`],`created-at`,`text`),custom_html:_(e[`custom-html`],`custom-html`,`text`),name:_(e.name,`name`,`text`),type:e.type,uid:_(e.uid,`uid`,`text`),updated_at:_(e[`updated-at`],`updated-at`,`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(it,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`custom-html`]===void 0&&(e[`custom-html`]=await y(`custom-html`,`Custom page HTML.`)),e.name===void 0&&(e.name=await y(`name`,`Custom page name.`)),e.type===void 0&&(e.type=await b(`type`,`Custom page type.`,[`identity_denied`,`forbidden`,`login`,`interstitial`]));let u=g({app_count:e[`app-count`],contract_version:e[`contract-version`],created_at:_(e[`created-at`],`created-at`,`text`),custom_html:_(e[`custom-html`],`custom-html`,`text`),name:_(e.name,`name`,`text`),type:e.type,uid:_(e.uid,`uid`,`text`),updated_at:_(e[`updated-at`],`updated-at`,`text`)}),d=await l(`Creating`,async()=>n.send(it,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var st={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/custom_pages/${t.custom_page_id}`};function ct(e){return e.usage(`$0 zero-trust access custom-pages delete <custom-page-id>
|
|
61
|
-
|
|
62
|
-
Delete a custom page`).positional(`custom-page-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 lt={command:`delete <custom-page-id>`,describe:`Delete a custom page`,builder:ct,handler:async e=>u({command:`zero-trust access custom-pages 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 custom-pages delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/custom_pages/${e[`custom-page-id`]==null?`<custom-page-id>`:encodeURIComponent(String(e[`custom-page-id`]))}`,pathParams:{"custom-page-id":String(e[`custom-page-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(st,{account_id:a,custom_page_id:e[`custom-page-id`]}));s(u,{successLabel:`Deleted`})})};var ut={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/custom_pages/${t.custom_page_id}`};function dt(e){return e.usage(`$0 zero-trust access custom-pages get <custom-page-id>
|
|
63
|
-
|
|
64
|
-
Fetches a custom page and also returns its HTML.`).positional(`custom-page-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ft={command:`get <custom-page-id>`,describe:`Get a custom page`,builder:dt,handler:async e=>u({command:`zero-trust access custom-pages get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access custom-pages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/custom_pages/${e[`custom-page-id`]==null?`<custom-page-id>`:encodeURIComponent(String(e[`custom-page-id`]))}`,pathParams:{"custom-page-id":String(e[`custom-page-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(ut,{account_id:a,custom_page_id:e[`custom-page-id`]}));s(u,{successLabel:`Loaded`})})};var pt={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/custom_pages`,query:[`page`,`per_page`]};function mt(e){return e.usage(`$0 zero-trust access custom-pages list
|
|
65
|
-
|
|
66
|
-
List custom pages`).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 ht={command:`list`,describe:`List custom pages`,builder:mt,handler:async e=>u({command:`zero-trust access custom-pages 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 custom-pages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/custom_pages`,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(pt,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var S={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/custom_pages/${t.custom_page_id}`,body:`json`,errors:{422:`UnprocessableEntityError`}};function gt(e){return e.usage(`$0 zero-trust access custom-pages update <custom-page-id>
|
|
67
|
-
|
|
68
|
-
Update a custom page`).positional(`custom-page-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`app-count`,{type:`number`,description:`Number of apps the custom page is assigned to.`}).option(`contract-version`,{type:`number`,description:`Contract version of the page's Liquid template. Present (>= 1) marks a sanitized template; absent or 0 marks a legacy page served verbatim.`}).option(`created-at`,{type:`string`,description:`The created_at field`}).option(`custom-html`,{type:`string`,description:`Custom page HTML.`}).option(`name`,{type:`string`,description:`Custom page name.`}).option(`type`,{type:`string`,description:`Custom page type.`,choices:[`identity_denied`,`forbidden`,`login`,`interstitial`]}).coerce(`type`,e=>_(e,`type`,`text`)).option(`uid`,{type:`string`,description:`UUID.`}).option(`updated-at`,{type:`string`,description:`The updated_at 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 _t={command:`update <custom-page-id>`,describe:`Update a custom page`,builder:gt,handler:async e=>u({command:`zero-trust access custom-pages update`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access custom-pages update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/custom_pages/${e[`custom-page-id`]==null?`<custom-page-id>`:encodeURIComponent(String(e[`custom-page-id`]))}`,pathParams:{"custom-page-id":String(e[`custom-page-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({app_count:e[`app-count`],contract_version:e[`contract-version`],created_at:_(e[`created-at`],`created-at`,`text`),custom_html:_(e[`custom-html`],`custom-html`,`text`),name:_(e.name,`name`,`text`),type:e.type,uid:_(e.uid,`uid`,`text`),updated_at:_(e[`updated-at`],`updated-at`,`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(S,{body:t,account_id:a,custom_page_id:e[`custom-page-id`]}));s(r,{successLabel:`Updated`});return}e[`custom-html`]===void 0&&(e[`custom-html`]=await y(`custom-html`,`Custom page HTML.`)),e.name===void 0&&(e.name=await y(`name`,`Custom page name.`)),e.type===void 0&&(e.type=await b(`type`,`Custom page type.`,[`identity_denied`,`forbidden`,`login`,`interstitial`]));let u=g({app_count:e[`app-count`],contract_version:e[`contract-version`],created_at:_(e[`created-at`],`created-at`,`text`),custom_html:_(e[`custom-html`],`custom-html`,`text`),name:_(e.name,`name`,`text`),type:e.type,uid:_(e.uid,`uid`,`text`),updated_at:_(e[`updated-at`],`updated-at`,`text`)}),d=await l(`Updating`,async()=>n.send(S,{body:u,account_id:a,custom_page_id:e[`custom-page-id`]}));s(d,{successLabel:`Updated`})})};var C={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/custom_pages/validate`,body:`json`};function vt(e){return e.usage(`$0 zero-trust access custom-pages validate
|
|
69
|
-
|
|
70
|
-
Validate a Liquid template and return its errors and warnings without persisting it.`).option(`template`,{type:`string`,description:`The Liquid template to validate.`}).option(`type`,{type:`string`,description:`Custom page type.`,choices:[`identity_denied`,`forbidden`,`login`,`interstitial`]}).coerce(`type`,e=>_(e,`type`,`text`)).option(`contract-version`,{type:`number`,description:`Contract version to validate against; omit for the latest.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A template to validate without persisting it.`})}const yt={command:`validate`,describe:`Validate a custom page template`,builder:vt,handler:async e=>u({command:`zero-trust access custom-pages validate`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access custom-pages validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/custom_pages/validate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({template:_(e.template,`template`,`text`),type:e.type,version:e[`contract-version`]}):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(`Validating`,async()=>n.send(C,{body:t,account_id:a}));s(r,{successLabel:`Validated`});return}e.template===void 0&&(e.template=await y(`template`,`The Liquid template to validate.`)),e.type===void 0&&(e.type=await b(`type`,`Custom page type.`,[`identity_denied`,`forbidden`,`login`,`interstitial`]));let u=g({template:_(e.template,`template`,`text`),type:e.type,version:e[`contract-version`]}),d=await l(`Validating`,async()=>n.send(C,{body:u,account_id:a}));s(d,{successLabel:`Validated`})})},bt={command:`custom-pages`,describe:`Operations for access.custom-pages`,builder:e=>e.command(ot).command(lt).command(ft).command(ht).command(_t).command(yt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var xt={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/audit_ssh_settings`};function St(e){return e.usage(`$0 zero-trust access infrastructure audit-ssh-settings get
|
|
71
|
-
|
|
72
|
-
Retrieve SSH with Access for Infrastructure settings for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ct={command:`get`,describe:`Get Zero Trust SSH settings`,builder:St,handler:async e=>u({command:`zero-trust access infrastructure audit-ssh-settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust access infrastructure audit-ssh-settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/gateway/audit_ssh_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(xt,{account_id:a}));s(u,{successLabel:`Loaded`})})};var wt={method:`POST`,path:t=>e`/accounts/${t.account_id}/gateway/audit_ssh_settings/rotate_seed`};function Tt(e){return e.usage(`$0 zero-trust access infrastructure audit-ssh-settings rotate-seed
|
|
73
|
-
|
|
74
|
-
Rotate the SSH account seed that generates the host key identity when connecting through the Cloudflare SSH Proxy.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Et={command:`rotate-seed`,describe:`Rotate Zero Trust SSH account seed`,builder:Tt,handler:async e=>u({command:`zero-trust access infrastructure audit-ssh-settings rotate-seed`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust access infrastructure audit-ssh-settings rotate-seed`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/gateway/audit_ssh_settings/rotate_seed`,pathParams:{},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(wt,{account_id:a}));s(u,{successLabel:`Created`})})};var w={method:`PUT`,path:t=>e`/accounts/${t.account_id}/gateway/audit_ssh_settings`,body:`json`};function Dt(e){return e.usage(`$0 zero-trust access infrastructure audit-ssh-settings update
|
|
75
|
-
|
|
76
|
-
Update SSH with Access for Infrastructure settings for an account.`).option(`public-key`,{type:`string`,description:`Provide the Base64-encoded HPKE public key that encrypts SSH session logs. See https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/use-cases/ssh/ssh-infrastructure-access/#enable-ssh-command-logging.`}).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 Ot={command:`update`,describe:`Update Zero Trust SSH settings`,builder:Dt,handler:async e=>u({command:`zero-trust access infrastructure audit-ssh-settings update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access infrastructure audit-ssh-settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/audit_ssh_settings`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({public_key:_(e[`public-key`],`public-key`,`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(w,{body:t,account_id:a}));s(r,{successLabel:`Updated`});return}e[`public-key`]===void 0&&(e[`public-key`]=await y(`public-key`,`Provide the Base64-encoded HPKE public key that encrypts SSH session logs. See https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/use-cases/ssh/ssh-infrastructure-access/#enable-ssh-command-logging.`));let u=g({public_key:_(e[`public-key`],`public-key`,`text`)}),d=await l(`Updating`,async()=>n.send(w,{body:u,account_id:a}));s(d,{successLabel:`Updated`})})},kt={command:`audit-ssh-settings`,describe:`Operations for access.infrastructure.audit-ssh-settings`,builder:e=>e.command(Ct).command(Et).command(Ot).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var At={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/gateway_ca`};function jt(e){return e.usage(`$0 zero-trust access infrastructure ssh-ca create
|
|
77
|
-
|
|
78
|
-
Adds a new SSH Certificate Authority (CA).`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mt={command:`create`,describe:`Add a new SSH Certificate Authority (CA)`,builder:jt,handler:async e=>u({command:`zero-trust access infrastructure ssh-ca create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust access infrastructure ssh-ca create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/gateway_ca`,pathParams:{},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(At,{account_id:a}));s(u,{successLabel:`Created`})})};var Nt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/gateway_ca/${t.certificate_id}`};function Pt(e){return e.usage(`$0 zero-trust access infrastructure ssh-ca delete <certificate-id>
|
|
79
|
-
|
|
80
|
-
Deletes an SSH Certificate Authority.`).positional(`certificate-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 Ft={command:`delete <certificate-id>`,describe:`Delete an SSH Certificate Authority (CA)`,builder:Pt,handler:async e=>u({command:`zero-trust access infrastructure ssh-ca 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 infrastructure ssh-ca delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/gateway_ca/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"certificate-id":String(e[`certificate-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(Nt,{account_id:a,certificate_id:e[`certificate-id`]}));s(u,{successLabel:`Deleted`})})};var It={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/gateway_ca`};function Lt(e){return e.usage(`$0 zero-trust access infrastructure ssh-ca list
|
|
81
|
-
|
|
82
|
-
Lists SSH Certificate Authorities (CA).`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Rt={command:`list`,describe:`List SSH Certificate Authorities (CA)`,builder:Lt,handler:async e=>u({command:`zero-trust access infrastructure ssh-ca list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust access infrastructure ssh-ca list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/gateway_ca`,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(It,{account_id:a}));s(u,{successLabel:`Loaded`})})},zt={command:`ssh-ca`,describe:`Operations for access.infrastructure.ssh-ca`,builder:e=>e.command(Mt).command(Ft).command(Rt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Bt={command:`infrastructure`,describe:`Operations for access.infrastructure`,builder:e=>e.command(kt).command(zt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Vt={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/logs/access_requests`,query:[`limit`,`direction`,`since`,`until`,`page`,`per_page`,`email`,`email_exact`,`user_id`,`allowedOp`,`country_codeOp`,`app_typeOp`,`app_uidOp`,`ray_idOp`,`emailOp`,`idpOp`,`non_identityOp`,`user_idOp`,`fields`]};function Ht(e){return e.usage(`$0 zero-trust access logs access-requests list
|
|
83
|
-
|
|
84
|
-
Gets a list of Access authentication audit logs for an account.`).option(`limit`,{type:`number`,description:`The maximum number of log entries to retrieve.`}).option(`direction`,{type:`string`,description:`The chronological sorting order for the logs.`,choices:[`desc`,`asc`]}).option(`since`,{type:`string`,description:`The earliest event timestamp to query.`}).option(`until`,{type:`string`,description:`The latest event timestamp to query.`}).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`email`,{type:`string`,description:"Filter by user email. Match mode is controlled by `emailOp` (preferred) or the legacy `email_exact` flag.\n- Default (no `emailOp`, `email_exact=false` or unset): substring match — `email=@example.com` returns all events with that domain.\n- Exact match: set `emailOp=eq` (preferred) or `email_exact=true` — e.g. `email=user@example.com&email_exact=true` returns only that user.\n- Explicit substring match: set `emailOp=contains` (without `email_exact=true`). When both are set, `email_exact=true` takes precedence and the match is exact.\n- Exclusion: set `emailOp=neq`. With `email_exact=true` this is an exact-value exclusion; without it, a fuzzy substring exclusion."}).option(`email-exact`,{type:`boolean`,description:"When true, `email` is matched exactly instead of substring matching."}).option(`user-id`,{type:`string`,description:"Deprecated. Accepted for backward compatibility but no longer applied\nas a filter. Use `email` instead."}).option(`allowed-op`,{type:`string`,description:"Operator for the `allowed` filter.",choices:[`eq`,`neq`]}).option(`country-code-op`,{type:`string`,description:"Operator for the `country_code` filter.",choices:[`eq`,`neq`]}).option(`app-type-op`,{type:`string`,description:"Operator for the `app_type` filter.",choices:[`eq`,`neq`]}).option(`app-uid-op`,{type:`string`,description:"Operator for the `app_uid` filter.",choices:[`eq`,`neq`]}).option(`ray-id-op`,{type:`string`,description:"Operator for the `ray_id` filter.",choices:[`eq`,`neq`]}).option(`email-op`,{type:`string`,description:"Operator for the `email` filter.\n`contains` performs a substring (case-sensitive) match. When `email_exact=true`\nis also set, `email_exact` takes precedence and `contains` is ignored.",choices:[`eq`,`neq`,`contains`]}).option(`idp-op`,{type:`string`,description:"Operator for the `idp` filter.",choices:[`eq`,`neq`]}).option(`non-identity-op`,{type:`string`,description:"Operator for the `non_identity` filter.",choices:[`eq`,`neq`]}).option(`user-id-op`,{type:`string`,description:"Deprecated. Accepted for backward compatibility but no longer applied\nas a filter (the `user_id` parameter is itself deprecated).",choices:[`eq`,`neq`]}).option(`fields`,{type:`string`,description:`Comma-separated list of fields to include in the response.
|
|
85
|
-
When omitted, all fields are returned.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ut={command:`list`,describe:`Get Access authentication logs`,builder:Ht,handler:async e=>u({command:`zero-trust access logs access-requests list`,classification:{safeFlags:[`direction`,`email-exact`,`allowed-op`,`country-code-op`,`app-type-op`,`app-uid-op`,`ray-id-op`,`email-op`,`idp-op`,`non-identity-op`,`user-id-op`,`dry-run`]}},e,async()=>{let n={limit:e.limit,direction:e.direction,since:e.since,until:e.until,page:e.page,per_page:e[`per-page`],email:e.email,email_exact:e[`email-exact`],user_id:e[`user-id`],allowedOp:e[`allowed-op`],country_codeOp:e[`country-code-op`],app_typeOp:e[`app-type-op`],app_uidOp:e[`app-uid-op`],ray_idOp:e[`ray-id-op`],emailOp:e[`email-op`],idpOp:e[`idp-op`],non_identityOp:e[`non-identity-op`],user_idOp:e[`user-id-op`],fields:e.fields};if(e.dryRun){let e=await i();c({command:`cf zero-trust access logs access-requests list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/logs/access_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(Vt,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},Wt={command:`access-requests`,describe:`Operations for access.logs.access-requests`,builder:e=>e.command(Ut).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Gt={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/logs/jit_requests/${t.knock_request_id}`,errors:{404:`NotFoundError`}};function Kt(e){return e.usage(`$0 zero-trust access logs jit-requests get <knock-request-id>
|
|
86
|
-
|
|
87
|
-
Gets an account-scoped Access JIT request summary and its lifecycle events in chronological order.`).positional(`knock-request-id`,{type:`string`,description:`Knock request ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qt={command:`get <knock-request-id>`,describe:`Get an Access JIT request log`,builder:Kt,handler:async e=>u({command:`zero-trust access logs jit-requests get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access logs jit-requests get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/logs/jit_requests/${e[`knock-request-id`]==null?`<knock-request-id>`:encodeURIComponent(String(e[`knock-request-id`]))}`,pathParams:{"knock-request-id":String(e[`knock-request-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(Gt,{account_id:a,knock_request_id:e[`knock-request-id`]}));s(u,{successLabel:`Loaded`})})};var Jt={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/logs/jit_requests`,query:[`page`,`per_page`,`status`,`search`,`since`,`until`]};function Yt(e){return e.usage(`$0 zero-trust access logs jit-requests list
|
|
88
|
-
|
|
89
|
-
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
|
|
90
|
-
|
|
91
|
-
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
|
|
92
|
-
|
|
93
|
-
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 T={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
|
|
94
|
-
|
|
95
|
-
Adds a new mTLS root certificate to Access.
|
|
96
|
-
|
|
97
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`associated-hostnames`,{type:`string`,array:!0,description:`The hostnames of the applications that will use this certificate.`}).option(`certificate`,{type:`string`,description:`The certificate content.`}).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 dn={command:`create`,describe:`Add an mTLS certificate`,builder:un,handler:async e=>u({command:`zero-trust access mtls-certificates 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 mtls-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/certificates`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?g({associated_hostnames:e[`associated-hostnames`],certificate:_(e.certificate,`certificate`,`text`),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(`Creating`,async()=>n.send(T,{body:t,account_or_zone:u,account_or_zone_id:d}));s(r,{successLabel:`Created`});return}e.certificate===void 0&&(e.certificate=await y(`certificate`,`The certificate content.`)),e.name===void 0&&(e.name=await y(`name`,`The name of the certificate.`));let p=g({associated_hostnames:e[`associated-hostnames`],certificate:_(e.certificate,`certificate`,`text`),name:_(e.name,`name`,`text`)}),m=await l(`Creating`,async()=>n.send(T,{body:p,account_or_zone:u,account_or_zone_id:d}));s(m,{successLabel:`Created`})})};var fn={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/certificates/${t.certificate_id}`};function pn(e){return e.usage(`$0 zero-trust access mtls-certificates delete <certificate-id>
|
|
98
|
-
|
|
99
|
-
Deletes an mTLS certificate.
|
|
100
|
-
|
|
101
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`certificate-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 mn={command:`delete <certificate-id>`,describe:`Delete an mTLS certificate`,builder:pn,handler:async e=>u({command:`zero-trust access mtls-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 delete`,method:`DELETE`,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:`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();if(u===`zones`?e.zoneId=d:e.accountId=d,!await x({force:!!e.force}))return;let f=await l(`Deleting`,async()=>n.send(fn,{account_or_zone:u,account_or_zone_id:d,certificate_id:e[`certificate-id`]}));s(f,{successLabel:`Deleted`})})};var hn={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/certificates/${t.certificate_id}`};function gn(e){return e.usage(`$0 zero-trust access mtls-certificates get <certificate-id>
|
|
102
|
-
|
|
103
|
-
Fetches a single mTLS certificate.
|
|
104
|
-
|
|
105
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`certificate-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _n={command:`get <certificate-id>`,describe:`Get an mTLS certificate`,builder:gn,handler:async e=>u({command:`zero-trust access mtls-certificates 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 access mtls-certificates get`,method:`GET`,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:`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(hn,{account_or_zone:u,account_or_zone_id:d,certificate_id:e[`certificate-id`]}));s(f,{successLabel:`Loaded`})})};var vn={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/certificates`,query:[`page`,`per_page`]};function yn(e){return e.usage(`$0 zero-trust access mtls-certificates list
|
|
106
|
-
|
|
107
|
-
Lists all mTLS root certificates.
|
|
108
|
-
|
|
109
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).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 mTLS certificates`,builder:yn,handler:async e=>u({command:`zero-trust access mtls-certificates list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=e.zone===void 0?await i():void 0,r=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;c({command:`cf zero-trust access mtls-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${r}/${a}/access/certificates`,pathParams:{"account-or-zone":String(r),"account-or-zone-id":String(a)},query:n,bodyKind:`none`});return}let u=await r(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await o();d===`zones`?e.zoneId=f:e.accountId=f;let p=await l(`Loading`,async()=>u.send(vn,{account_or_zone:d,account_or_zone_id:f,...n}));s(p,{successLabel:`Loaded`})})};var xn={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/certificates/settings`};function Sn(e){return e.usage(`$0 zero-trust access mtls-certificates settings get
|
|
110
|
-
|
|
111
|
-
List all mTLS hostname settings for this account or zone.
|
|
112
|
-
|
|
113
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Cn={command:`get`,describe:`List all mTLS hostname settings`,builder:Sn,handler:async e=>u({command:`zero-trust access mtls-certificates settings 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 access mtls-certificates settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/certificates/settings`,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(xn,{account_or_zone:u,account_or_zone_id:d}));s(f,{successLabel:`Loaded`})})};var E={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/certificates/settings`,body:`json`};function wn(e){return e.usage(`$0 zero-trust access mtls-certificates settings update
|
|
114
|
-
|
|
115
|
-
Updates an mTLS certificate's hostname settings.
|
|
116
|
-
|
|
117
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`settings`,{type:`string`,description:`The settings field. 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 Tn={command:`update`,describe:`Update an mTLS certificate's hostname settings`,builder:wn,handler:async e=>u({command:`zero-trust access mtls-certificates settings 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 settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/certificates/settings`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?g({settings:d(e.settings,`settings`)}):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(`Updating`,async()=>n.send(E,{body:t,account_or_zone:u,account_or_zone_id:p}));s(r,{successLabel:`Updated`});return}if(e.settings===void 0)throw Error(`--settings is required (or pass --body with this field set).`);let m=g({settings:d(e.settings,`settings`)}),h=await l(`Updating`,async()=>n.send(E,{body:m,account_or_zone:u,account_or_zone_id:p}));s(h,{successLabel:`Updated`})})},En={command:`settings`,describe:`Operations for access.mtls-certificates.settings`,builder:e=>e.command(Cn).command(Tn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var D={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/certificates/${t.certificate_id}`,body:`json`};function Dn(e){return e.usage(`$0 zero-trust access mtls-certificates update <certificate-id>
|
|
118
|
-
|
|
119
|
-
Updates a configured mTLS certificate.
|
|
120
|
-
|
|
121
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).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(D,{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(D,{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 O={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
|
|
122
|
-
|
|
123
|
-
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(O,{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(O,{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>
|
|
124
|
-
|
|
125
|
-
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>
|
|
126
|
-
|
|
127
|
-
Fetches a single 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})}const Ln={command:`get <policy-id>`,describe:`Get an Access reusable policy`,builder:In,handler:async e=>u({command:`zero-trust access policies get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access policies get`,method:`GET`,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();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Fn,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Loaded`})})};var Rn={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/policies`,query:[`page`,`per_page`]};function zn(e){return e.usage(`$0 zero-trust access policies list
|
|
128
|
-
|
|
129
|
-
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 k={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>
|
|
130
|
-
|
|
131
|
-
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(k,{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(k,{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 A={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
|
|
132
|
-
|
|
133
|
-
Creates a new Access group.
|
|
134
|
-
|
|
135
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).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(A,{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(A,{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>
|
|
136
|
-
|
|
137
|
-
Deletes an Access group.
|
|
138
|
-
|
|
139
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`group-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 Jn={command:`delete <group-id>`,describe:`Delete an Access group`,builder:qn,handler:async e=>u({command:`zero-trust access rule-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"group-id":String(e[`group-id`]??``)},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();if(u===`zones`?e.zoneId=d:e.accountId=d,!await x({force:!!e.force}))return;let f=await l(`Deleting`,async()=>n.send(Kn,{account_or_zone:u,account_or_zone_id:d,group_id:e[`group-id`]}));s(f,{successLabel:`Deleted`})})};var Yn={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/groups/${t.group_id}`};function Xn(e){return e.usage(`$0 zero-trust access rule-groups get <group-id>
|
|
140
|
-
|
|
141
|
-
Fetches a single Access group.
|
|
142
|
-
|
|
143
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`group-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Zn={command:`get <group-id>`,describe:`Get an Access group`,builder:Xn,handler:async e=>u({command:`zero-trust access rule-groups 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 access rule-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"group-id":String(e[`group-id`]??``)},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(Yn,{account_or_zone:u,account_or_zone_id:d,group_id:e[`group-id`]}));s(f,{successLabel:`Loaded`})})};var Qn={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/groups`,query:[`name`,`search`,`page`,`per_page`]};function $n(e){return e.usage(`$0 zero-trust access rule-groups list
|
|
144
|
-
|
|
145
|
-
Lists all Access groups.
|
|
146
|
-
|
|
147
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`name`,{type:`string`,description:`The name of the group.`}).option(`search`,{type:`string`,description:`Search for groups by other listed query parameters.`}).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 er={command:`list`,describe:`List Access groups`,builder:$n,handler:async e=>u({command:`zero-trust access rule-groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={name:e.name,search:e.search,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=e.zone===void 0?await i():void 0,r=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;c({command:`cf zero-trust access rule-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${r}/${a}/access/groups`,pathParams:{"account-or-zone":String(r),"account-or-zone-id":String(a)},query:n,bodyKind:`none`});return}let u=await r(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await o();d===`zones`?e.zoneId=f:e.accountId=f;let p=await l(`Loading`,async()=>u.send(Qn,{account_or_zone:d,account_or_zone_id:f,...n}));s(p,{successLabel:`Loaded`})})};var j={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/groups/${t.group_id}`,body:`json`};function tr(e){return e.usage(`$0 zero-trust access rule-groups update <group-id>
|
|
148
|
-
|
|
149
|
-
Updates a configured Access group.
|
|
150
|
-
|
|
151
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`group-id`,{type:`string`,description:`UUID.`,demandOption:!0}).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 nr={command:`update <group-id>`,describe:`Update an Access group`,builder:tr,handler:async e=>u({command:`zero-trust access rule-groups update`,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 update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"group-id":String(e[`group-id`]??``)},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(`Updating`,async()=>n.send(j,{body:t,account_or_zone:u,account_or_zone_id:p,group_id:e[`group-id`]}));s(r,{successLabel:`Updated`});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(`Updating`,async()=>n.send(j,{body:m,account_or_zone:u,account_or_zone_id:p,group_id:e[`group-id`]}));s(h,{successLabel:`Updated`})})},rr={command:`rule-groups`,describe:`Operations for access.rule-groups`,builder:e=>e.command(Gn).command(Jn).command(Zn).command(er).command(nr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ir={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/saml_certificates/${t.saml_cert_set_id}/pem`,response:!1,errors:{404:`NotFoundError`}};function ar(e){return e.usage(`$0 zero-trust access saml-encryption-certificates get-pem <saml-cert-set-id>
|
|
152
|
-
|
|
153
|
-
Downloads the current SAML encryption certificate's public key in PEM format for the specified certificate set. This endpoint is useful for providing the certificate to Identity Providers for SAML assertion encryption configuration.`).positional(`saml-cert-set-id`,{type:`string`,description:`UID of the SAML certificate set.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const or={command:`get-pem <saml-cert-set-id>`,describe:`Download current certificate in PEM format`,builder:ar,handler:async e=>u({command:`zero-trust access saml-encryption-certificates get-pem`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access saml-encryption-certificates get-pem`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/saml_certificates/${e[`saml-cert-set-id`]==null?`<saml-cert-set-id>`:encodeURIComponent(String(e[`saml-cert-set-id`]))}/pem`,pathParams:{"saml-cert-set-id":String(e[`saml-cert-set-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(ir,{account_id:a,saml_cert_set_id:e[`saml-cert-set-id`]}));s(u,{successLabel:`Loaded`})})};var sr={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/saml_certificates/${t.saml_cert_set_id}`,errors:{404:`NotFoundError`}};function cr(e){return e.usage(`$0 zero-trust access saml-encryption-certificates get <saml-cert-set-id>
|
|
154
|
-
|
|
155
|
-
Retrieves a specific SAML encryption certificate set by its UID, including both current and previous certificates if available.`).positional(`saml-cert-set-id`,{type:`string`,description:`UID of the SAML certificate set.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const lr={command:`get <saml-cert-set-id>`,describe:`Get SAML certificate set`,builder:cr,handler:async e=>u({command:`zero-trust access saml-encryption-certificates get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access saml-encryption-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/saml_certificates/${e[`saml-cert-set-id`]==null?`<saml-cert-set-id>`:encodeURIComponent(String(e[`saml-cert-set-id`]))}`,pathParams:{"saml-cert-set-id":String(e[`saml-cert-set-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(sr,{account_id:a,saml_cert_set_id:e[`saml-cert-set-id`]}));s(u,{successLabel:`Loaded`})})};var ur={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/saml_certificates`,query:[`page`,`per_page`,`id`]};function dr(e){return e.usage(`$0 zero-trust access saml-encryption-certificates list
|
|
156
|
-
|
|
157
|
-
Returns a paginated list of the organization's SAML encryption certificate sets. Each certificate set includes the current and (if present) previous certificates.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`id`,{type:`string`,description:`Filter by SAML certificate set UID. Accepts a comma-separated list of UIDs.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fr={command:`list`,describe:`List SAML certificate sets`,builder:dr,handler:async e=>u({command:`zero-trust access saml-encryption-certificates list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],id:e.id};if(e.dryRun){let e=await i();c({command:`cf zero-trust access saml-encryption-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/saml_certificates`,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(ur,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var pr={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/saml_certificates/${t.saml_cert_set_id}/rotate`,errors:{404:`NotFoundError`}};function mr(e){return e.usage(`$0 zero-trust access saml-encryption-certificates rotate <saml-cert-set-id>
|
|
158
|
-
|
|
159
|
-
Rotates the SAML encryption certificates within the specified certificate set. This generates a new certificate and moves the current certificate to the previous slot. If a previous certificate exists, it will be deactivated and removed. This endpoint ensures zero-downtime rotation by maintaining both current and previous certificates during the transition period, allowing IdPs time to update their configurations. Automated rotation happens 30 days before a current certificate's expiration.`).positional(`saml-cert-set-id`,{type:`string`,description:`UID of the SAML certificate set to rotate.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const hr={command:`rotate <saml-cert-set-id>`,describe:`Rotate SAML certificate`,builder:mr,handler:async e=>u({command:`zero-trust access saml-encryption-certificates rotate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access saml-encryption-certificates rotate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/saml_certificates/${e[`saml-cert-set-id`]==null?`<saml-cert-set-id>`:encodeURIComponent(String(e[`saml-cert-set-id`]))}/rotate`,pathParams:{"saml-cert-set-id":String(e[`saml-cert-set-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(pr,{account_id:a,saml_cert_set_id:e[`saml-cert-set-id`]}));s(u,{successLabel:`Created`})})},gr={command:`saml-encryption-certificates`,describe:`Operations for access.saml-encryption-certificates`,builder:e=>e.command(lr).command(or).command(fr).command(hr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var M={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/service_tokens`,body:`json`};function _r(e){return e.usage(`$0 zero-trust access service-tokens create
|
|
160
|
-
|
|
161
|
-
Generates a new service token. **Note:** This is the only time you can get the Client Secret. If you lose the Client Secret, you will have to rotate the Client Secret or create a new service token.
|
|
162
|
-
|
|
163
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`client-secret-version`,{type:`number`,description:"A version number identifying the current `client_secret` associated with the service token. Incrementing it triggers a rotation; the previous secret will still be accepted until the time indicated by `previous_client_secret_expires_at`. If the service token was reported as leaked, `previous_client_secret_expires_at` is not required, may not be in the future, and the previous secret is discarded immediately.",default:1}).option(`duration`,{type:`string`,description:"The duration for how long the service token will be valid. Must be in the format `300ms` or `2h45m`, or the special value `forever` for non-expiring tokens. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h).",default:`8760h`}).option(`enabled`,{type:`boolean`,description:"Whether the service token is enabled. A disabled service token cannot be used to authenticate; both its current and previous `client_secret` stop being accepted, but the token itself is preserved and can be re-enabled. A service token reported as leaked is disabled automatically and cannot be re-enabled until its secret is rotated; attempting to do so returns a 409. Defaults to enabled when omitted on create."}).option(`name`,{type:`string`,description:`The name of the service token.`}).option(`previous-client-secret-expires-at`,{type:`string`,description:"The expiration of the previous `client_secret`. This can be modified at any point after a rotation. For example, you may extend it further into the future if you need more time to update services with the new secret; or move it into the past to immediately invalidate the previous token in case of compromise. Rotating a service token that was reported as leaked discards the previous secret entirely, so no grace period can be set."}).option(`tags`,{type:`string`,description:`Tags associated with the service token, as key-value pairs. On update, replaces all existing tags. 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:`Raw JSON request body (bypasses individual flags)`})}const vr={command:`create`,describe:`Create a service token`,builder:_r,handler:async e=>u({command:`zero-trust access service-tokens create`,classification:{safeFlags:[`enabled`,`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 service-tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/service_tokens`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?g({client_secret_version:e[`client-secret-version`],duration:_(e.duration,`duration`,`text`),enabled:e.enabled,name:_(e.name,`name`,`text`),previous_client_secret_expires_at:_(e[`previous-client-secret-expires-at`],`previous-client-secret-expires-at`,`text`),tags:m(e.tags,`tags`)},[[`tags`]]):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(M,{body:t,account_or_zone:u,account_or_zone_id:d}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name of the service token.`));let p=g({client_secret_version:e[`client-secret-version`],duration:_(e.duration,`duration`,`text`),enabled:e.enabled,name:_(e.name,`name`,`text`),previous_client_secret_expires_at:_(e[`previous-client-secret-expires-at`],`previous-client-secret-expires-at`,`text`),tags:m(e.tags,`tags`)},[[`tags`]]),h=await l(`Creating`,async()=>n.send(M,{body:p,account_or_zone:u,account_or_zone_id:d}));s(h,{successLabel:`Created`})})};var yr={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/service_tokens/${t.service_token_id}`};function br(e){return e.usage(`$0 zero-trust access service-tokens delete <service-token-id>
|
|
164
|
-
|
|
165
|
-
Deletes a service token.
|
|
166
|
-
|
|
167
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`service-token-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 xr={command:`delete <service-token-id>`,describe:`Delete a service token`,builder:br,handler:async e=>u({command:`zero-trust access service-tokens delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 service-tokens delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/service_tokens/${e[`service-token-id`]==null?`<service-token-id>`:encodeURIComponent(String(e[`service-token-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"service-token-id":String(e[`service-token-id`]??``)},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();if(u===`zones`?e.zoneId=d:e.accountId=d,!await x({force:!!e.force}))return;let f=await l(`Deleting`,async()=>n.send(yr,{account_or_zone:u,account_or_zone_id:d,service_token_id:e[`service-token-id`]}));s(f,{successLabel:`Deleted`})})};var Sr={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/service_tokens/${t.service_token_id}`};function Cr(e){return e.usage(`$0 zero-trust access service-tokens get <service-token-id>
|
|
168
|
-
|
|
169
|
-
Fetches a single service token.
|
|
170
|
-
|
|
171
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`service-token-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const wr={command:`get <service-token-id>`,describe:`Get a service token`,builder:Cr,handler:async e=>u({command:`zero-trust access service-tokens 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 access service-tokens get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/service_tokens/${e[`service-token-id`]==null?`<service-token-id>`:encodeURIComponent(String(e[`service-token-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"service-token-id":String(e[`service-token-id`]??``)},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(Sr,{account_or_zone:u,account_or_zone_id:d,service_token_id:e[`service-token-id`]}));s(f,{successLabel:`Loaded`})})};var Tr={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/service_tokens`,query:[`name`,`search`,`page`,`per_page`]};function Er(e){return e.usage(`$0 zero-trust access service-tokens list
|
|
172
|
-
|
|
173
|
-
Lists all service tokens.
|
|
174
|
-
|
|
175
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`name`,{type:`string`,description:`The name of the service token.`}).option(`search`,{type:`string`,description:`Search for service tokens by other listed query parameters.`}).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 Dr={command:`list`,describe:`List service tokens`,builder:Er,handler:async e=>u({command:`zero-trust access service-tokens list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={name:e.name,search:e.search,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=e.zone===void 0?await i():void 0,r=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;c({command:`cf zero-trust access service-tokens list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${r}/${a}/access/service_tokens`,pathParams:{"account-or-zone":String(r),"account-or-zone-id":String(a)},query:n,bodyKind:`none`});return}let u=await r(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await o();d===`zones`?e.zoneId=f:e.accountId=f;let p=await l(`Loading`,async()=>u.send(Tr,{account_or_zone:d,account_or_zone_id:f,...n}));s(p,{successLabel:`Loaded`})})};var Or={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/service_tokens/${t.service_token_id}/refresh`};function kr(e){return e.usage(`$0 zero-trust access service-tokens refresh <service-token-id>
|
|
176
|
-
|
|
177
|
-
Refreshes the expiration of a service token.`).positional(`service-token-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ar={command:`refresh <service-token-id>`,describe:`Refresh a service token`,builder:kr,handler:async e=>u({command:`zero-trust access service-tokens refresh`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access service-tokens refresh`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/service_tokens/${e[`service-token-id`]==null?`<service-token-id>`:encodeURIComponent(String(e[`service-token-id`]))}/refresh`,pathParams:{"service-token-id":String(e[`service-token-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(Or,{account_id:a,service_token_id:e[`service-token-id`]}));s(u,{successLabel:`Created`})})};var N={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/service_tokens/${t.service_token_id}/rotate`,body:`json`};function jr(e){return e.usage(`$0 zero-trust access service-tokens rotate <service-token-id>
|
|
178
|
-
|
|
179
|
-
Generates a new Client Secret for a service token and revokes the old one.`).positional(`service-token-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`previous-client-secret-expires-at`,{type:`string`,description:"The expiration of the previous `client_secret`. If not provided, it defaults to the current timestamp in order to immediately expire the previous secret. If the service token was reported as leaked, this must not be in the future; the leaked secret is discarded immediately."}).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 Mr={command:`rotate <service-token-id>`,describe:`Rotate a service token`,builder:jr,handler:async e=>u({command:`zero-trust access service-tokens rotate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access service-tokens rotate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/service_tokens/${e[`service-token-id`]==null?`<service-token-id>`:encodeURIComponent(String(e[`service-token-id`]))}/rotate`,pathParams:{"service-token-id":String(e[`service-token-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({previous_client_secret_expires_at:_(e[`previous-client-secret-expires-at`],`previous-client-secret-expires-at`,`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(N,{body:t,account_id:a,service_token_id:e[`service-token-id`]}));s(r,{successLabel:`Created`});return}let u=g({previous_client_secret_expires_at:_(e[`previous-client-secret-expires-at`],`previous-client-secret-expires-at`,`text`)}),d=await l(`Creating`,async()=>n.send(N,{body:u,account_id:a,service_token_id:e[`service-token-id`]}));s(d,{successLabel:`Created`})})};var P={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/service_tokens/${t.service_token_id}`,body:`json`};function Nr(e){return e.usage(`$0 zero-trust access service-tokens update <service-token-id>
|
|
180
|
-
|
|
181
|
-
Updates a configured service token.
|
|
182
|
-
|
|
183
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`service-token-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`client-secret-version`,{type:`number`,description:"A version number identifying the current `client_secret` associated with the service token. Incrementing it triggers a rotation; the previous secret will still be accepted until the time indicated by `previous_client_secret_expires_at`. If the service token was reported as leaked, `previous_client_secret_expires_at` is not required, may not be in the future, and the previous secret is discarded immediately."}).option(`duration`,{type:`string`,description:"The duration for how long the service token will be valid. Must be in the format `300ms` or `2h45m`, or the special value `forever` for non-expiring tokens. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h)."}).option(`enabled`,{type:`boolean`,description:"Whether the service token is enabled. A disabled service token cannot be used to authenticate; both its current and previous `client_secret` stop being accepted, but the token itself is preserved and can be re-enabled. A service token reported as leaked is disabled automatically and cannot be re-enabled until its secret is rotated; attempting to do so returns a 409. Defaults to enabled when omitted on create."}).option(`name`,{type:`string`,description:`The name of the service token.`}).option(`previous-client-secret-expires-at`,{type:`string`,description:"The expiration of the previous `client_secret`. This can be modified at any point after a rotation. For example, you may extend it further into the future if you need more time to update services with the new secret; or move it into the past to immediately invalidate the previous token in case of compromise. Rotating a service token that was reported as leaked discards the previous secret entirely, so no grace period can be set."}).option(`tags`,{type:`string`,description:`Tags associated with the service token, as key-value pairs. On update, replaces all existing tags. 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:`Raw JSON request body (bypasses individual flags)`})}const Pr={command:`update <service-token-id>`,describe:`Update a service token`,builder:Nr,handler:async e=>u({command:`zero-trust access service-tokens update`,classification:{safeFlags:[`enabled`,`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 service-tokens update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/access/service_tokens/${e[`service-token-id`]==null?`<service-token-id>`:encodeURIComponent(String(e[`service-token-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"service-token-id":String(e[`service-token-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({client_secret_version:e[`client-secret-version`],duration:_(e.duration,`duration`,`text`),enabled:e.enabled,name:_(e.name,`name`,`text`),previous_client_secret_expires_at:_(e[`previous-client-secret-expires-at`],`previous-client-secret-expires-at`,`text`),tags:m(e.tags,`tags`)},[[`tags`]]):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(P,{body:t,account_or_zone:u,account_or_zone_id:d,service_token_id:e[`service-token-id`]}));s(r,{successLabel:`Updated`});return}let p=g({client_secret_version:e[`client-secret-version`],duration:_(e.duration,`duration`,`text`),enabled:e.enabled,name:_(e.name,`name`,`text`),previous_client_secret_expires_at:_(e[`previous-client-secret-expires-at`],`previous-client-secret-expires-at`,`text`),tags:m(e.tags,`tags`)},[[`tags`]]),h=await l(`Updating`,async()=>n.send(P,{body:p,account_or_zone:u,account_or_zone_id:d,service_token_id:e[`service-token-id`]}));s(h,{successLabel:`Updated`})})},Fr={command:`service-tokens`,describe:`Operations for access.service-tokens`,builder:e=>e.command(vr).command(xr).command(wr).command(Dr).command(Ar).command(Mr).command(Pr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ir={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/keys`};function Lr(e){return e.usage(`$0 zero-trust access signing-keys get
|
|
184
|
-
|
|
185
|
-
Gets the Access key rotation settings for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Rr={command:`get`,describe:`Get the Access key configuration`,builder:Lr,handler:async e=>u({command:`zero-trust access signing-keys get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust access signing-keys get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/keys`,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(Ir,{account_id:a}));s(u,{successLabel:`Loaded`})})};var zr={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/keys/rotate`};function Br(e){return e.usage(`$0 zero-trust access signing-keys rotate
|
|
186
|
-
|
|
187
|
-
Perfoms a key rotation for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Vr={command:`rotate`,describe:`Rotate Access keys`,builder:Br,handler:async e=>u({command:`zero-trust access signing-keys rotate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust access signing-keys rotate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/keys/rotate`,pathParams:{},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(zr,{account_id:a}));s(u,{successLabel:`Created`})})};var F={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/keys`,body:`json`};function Hr(e){return e.usage(`$0 zero-trust access signing-keys update
|
|
188
|
-
|
|
189
|
-
Updates the Access key rotation settings for an account.`).option(`key-rotation-interval-days`,{type:`number`,description:`The number of days between key rotations.`}).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 Ur={command:`update`,describe:`Update the Access key configuration`,builder:Hr,handler:async e=>u({command:`zero-trust access signing-keys update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access signing-keys update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/keys`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({key_rotation_interval_days:e[`key-rotation-interval-days`]}):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(F,{body:t,account_id:a}));s(r,{successLabel:`Updated`});return}if(e[`key-rotation-interval-days`]===void 0)throw Error(`--key-rotation-interval-days is required (or pass --body with this field set).`);let u=g({key_rotation_interval_days:e[`key-rotation-interval-days`]}),d=await l(`Updating`,async()=>n.send(F,{body:u,account_id:a}));s(d,{successLabel:`Updated`})})},Wr={command:`signing-keys`,describe:`Operations for access.signing-keys`,builder:e=>e.command(Rr).command(Vr).command(Ur).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var I={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/tags`,body:`json`};function Gr(e){return e.usage(`$0 zero-trust access tags create
|
|
190
|
-
|
|
191
|
-
Create a tag`).option(`name`,{type:`string`,description:`The name of the tag`}).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 Kr={command:`create`,describe:`Create a tag`,builder:Gr,handler:async e=>u({command:`zero-trust access tags create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access tags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/tags`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({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(I,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}let u=g({name:_(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(I,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var qr={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/tags/${t.tag_name}`};function Jr(e){return e.usage(`$0 zero-trust access tags delete <tag-name>
|
|
192
|
-
|
|
193
|
-
Delete a tag`).positional(`tag-name`,{type:`string`,description:`The name of the tag`,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 Yr={command:`delete <tag-name>`,describe:`Delete a tag`,builder:Jr,handler:async e=>u({command:`zero-trust access tags 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 tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/tags/${e[`tag-name`]==null?`<tag-name>`:encodeURIComponent(String(e[`tag-name`]))}`,pathParams:{"tag-name":String(e[`tag-name`]??``)},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(qr,{account_id:a,tag_name:e[`tag-name`]}));s(u,{successLabel:`Deleted`})})};var Xr={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/tags/${t.tag_name}`};function Zr(e){return e.usage(`$0 zero-trust access tags get <tag-name>
|
|
194
|
-
|
|
195
|
-
Get a tag`).positional(`tag-name`,{type:`string`,description:`The name of the tag`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qr={command:`get <tag-name>`,describe:`Get a tag`,builder:Zr,handler:async e=>u({command:`zero-trust access tags get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access tags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/tags/${e[`tag-name`]==null?`<tag-name>`:encodeURIComponent(String(e[`tag-name`]))}`,pathParams:{"tag-name":String(e[`tag-name`]??``)},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(Xr,{account_id:a,tag_name:e[`tag-name`]}));s(u,{successLabel:`Loaded`})})};var $r={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/tags`,query:[`page`,`per_page`]};function ei(e){return e.usage(`$0 zero-trust access tags list
|
|
196
|
-
|
|
197
|
-
List tags`).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 ti={command:`list`,describe:`List tags`,builder:ei,handler:async e=>u({command:`zero-trust access tags 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 tags list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/tags`,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($r,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var L={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/tags/${t.tag_name}`,body:`json`};function ni(e){return e.usage(`$0 zero-trust access tags update <tag-name>
|
|
198
|
-
|
|
199
|
-
Update a tag`).positional(`tag-name`,{type:`string`,description:`The name of the tag`,demandOption:!0}).option(`created-at`,{type:`string`,description:`The created_at field`}).option(`name`,{type:`string`,description:`The name of the tag`}).option(`updated-at`,{type:`string`,description:`The updated_at field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A tag`})}const ri={command:`update <tag-name>`,describe:`Update a tag`,builder:ni,handler:async e=>u({command:`zero-trust access tags update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access tags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/tags/${e[`tag-name`]==null?`<tag-name>`:encodeURIComponent(String(e[`tag-name`]))}`,pathParams:{"tag-name":String(e[`tag-name`]??``)},bodyKind:`json`,body:e.body===void 0?g({created_at:_(e[`created-at`],`created-at`,`text`),name:_(e.name,`name`,`text`),updated_at:_(e[`updated-at`],`updated-at`,`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(L,{body:t,account_id:a,tag_name:e[`tag-name`]}));s(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await y(`name`,`The name of the tag`));let u=g({created_at:_(e[`created-at`],`created-at`,`text`),name:_(e.name,`name`,`text`),updated_at:_(e[`updated-at`],`updated-at`,`text`)}),d=await l(`Updating`,async()=>n.send(L,{body:u,account_id:a,tag_name:e[`tag-name`]}));s(d,{successLabel:`Updated`})})},ii={command:`tags`,describe:`Operations for access.tags`,builder:e=>e.command(Kr).command(Yr).command(Qr).command(ti).command(ri).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var R={method:`POST`,path:t=>e`/accounts/${t.account_id}/infrastructure/targets/batch_delete`,body:`json`,response:!1};function ai(e){return e.usage(`$0 zero-trust access targets bulk delete
|
|
200
|
-
|
|
201
|
-
Removes one or more targets.`).option(`target-ids`,{type:`string`,array:!0,description:`List of target IDs to bulk delete`}).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 oi={command:`delete`,describe:`Delete targets`,builder:ai,handler:async e=>u({command:`zero-trust access targets bulk delete`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access targets bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/infrastructure/targets/batch_delete`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({target_ids:e[`target-ids`]}):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(R,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`target-ids`]===void 0)throw Error(`--target-ids is required (or pass --body with this field set).`);let u=g({target_ids:e[`target-ids`]}),d=await l(`Creating`,async()=>n.send(R,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var z={method:`POST`,path:t=>e`/accounts/${t.account_id}/infrastructure/targets/batch_tags`,body:`json`};function si(e){return e.usage(`$0 zero-trust access targets bulk replace-tags
|
|
202
|
-
|
|
203
|
-
Replaces tags for one or more existing infrastructure access targets.`).option(`items`,{type:`string`,description:`The items field. 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 ci={command:`replace-tags`,describe:`Replace tags on existing targets`,builder:si,handler:async e=>u({command:`zero-trust access targets bulk replace-tags`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access targets bulk replace-tags`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/infrastructure/targets/batch_tags`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({items:d(e.items,`items`)}):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(z,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.items===void 0)throw Error(`--items is required (or pass --body with this field set).`);let u=g({items:d(e.items,`items`)}),p=await l(`Creating`,async()=>n.send(z,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var li={method:`PUT`,path:t=>e`/accounts/${t.account_id}/infrastructure/targets/batch`,body:`json`};function ui(e){return e.usage(`$0 zero-trust access targets bulk update
|
|
204
|
-
|
|
205
|
-
Adds one or more targets.`).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 di={command:`update`,describe:`Create new targets`,builder:ui,handler:async e=>u({command:`zero-trust access targets bulk update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access targets bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/infrastructure/targets/batch`,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(li,{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.`)})},fi={command:`bulk`,describe:`Operations for access.targets.bulk`,builder:e=>e.command(oi).command(ci).command(di).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var B={method:`POST`,path:t=>e`/accounts/${t.account_id}/infrastructure/targets`,body:`json`};function pi(e){return e.usage(`$0 zero-trust access targets create
|
|
206
|
-
|
|
207
|
-
Creates a new infrastructure access target in the account.`).option(`hostname`,{type:`string`,description:`A non-unique field that refers to a target. Case insensitive, maximum
|
|
208
|
-
length of 255 characters, supports the use of special characters dash
|
|
209
|
-
and period, does not support spaces, and must start and end with an
|
|
210
|
-
alphanumeric character.`}).option(`ip-ipv4-ip-addr`,{type:`string`,description:`IP address of the target`}).option(`ip-ipv4-virtual-network-id`,{type:`string`,description:`(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.`}).option(`ip-ipv6-ip-addr`,{type:`string`,description:`IP address of the target`}).option(`ip-ipv6-virtual-network-id`,{type:`string`,description:`(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.`}).option(`tags`,{type:`string`,description:`Optional tags to associate with the target. Keys and values are
|
|
211
|
-
user-defined strings. 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:`Raw JSON request body (bypasses individual flags)`})}const mi={command:`create`,describe:`Create new target`,builder:pi,handler:async e=>u({command:`zero-trust access targets create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access targets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/infrastructure/targets`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({hostname:_(e.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:_(e[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:_(e[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:_(e[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:_(e[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}},tags:m(e.tags,`tags`)},[[`tags`]]):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(B,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.hostname===void 0&&(e.hostname=await y(`hostname`,`A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.`));let u=g({hostname:_(e.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:_(e[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:_(e[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:_(e[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:_(e[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}},tags:m(e.tags,`tags`)},[[`tags`]]),d=await l(`Creating`,async()=>n.send(B,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var hi={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/infrastructure/targets/${t.target_id}`,response:!1};function gi(e){return e.usage(`$0 zero-trust access targets delete <target-id>
|
|
212
|
-
|
|
213
|
-
Removes 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}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _i={command:`delete <target-id>`,describe:`Delete target`,builder:gi,handler:async e=>u({command:`zero-trust access targets 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 targets delete`,method:`DELETE`,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();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(hi,{account_id:a,target_id:e[`target-id`]}));s(u,{successLabel:`Deleted`})})};var vi={method:`GET`,path:t=>e`/accounts/${t.account_id}/infrastructure/targets/${t.target_id}`};function yi(e){return e.usage(`$0 zero-trust access targets get <target-id>
|
|
214
|
-
|
|
215
|
-
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
|
|
216
|
-
|
|
217
|
-
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
|
|
218
|
-
\`target_ids\` multiple times in query parameter to build list of
|
|
219
|
-
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 V={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>
|
|
220
|
-
|
|
221
|
-
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
|
|
222
|
-
length of 255 characters, supports the use of special characters dash
|
|
223
|
-
and period, does not support spaces, and must start and end with an
|
|
224
|
-
alphanumeric character.`}).option(`ip-ipv4-ip-addr`,{type:`string`,description:`IP address of the target`}).option(`ip-ipv4-virtual-network-id`,{type:`string`,description:`(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.`}).option(`ip-ipv6-ip-addr`,{type:`string`,description:`IP address of the target`}).option(`ip-ipv6-virtual-network-id`,{type:`string`,description:`(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.`}).option(`tags`,{type:`string`,description:`Optional tags to associate with the target. Keys and values are
|
|
225
|
-
user-defined strings. 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:`Raw JSON request body (bypasses individual flags)`})}const Ti={command:`update <target-id>`,describe:`Update target`,builder:wi,handler:async e=>u({command:`zero-trust access targets update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access targets update`,method:`PUT`,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:`json`,body:e.body===void 0?g({hostname:_(e.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:_(e[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:_(e[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:_(e[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:_(e[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}},tags:m(e.tags,`tags`)},[[`tags`]]):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(V,{body:t,account_id:a,target_id:e[`target-id`]}));s(r,{successLabel:`Updated`});return}e.hostname===void 0&&(e.hostname=await y(`hostname`,`A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.`));let u=g({hostname:_(e.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:_(e[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:_(e[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:_(e[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:_(e[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}},tags:m(e.tags,`tags`)},[[`tags`]]),d=await l(`Updating`,async()=>n.send(V,{body:u,account_id:a,target_id:e[`target-id`]}));s(d,{successLabel:`Updated`})})},Ei={command:`targets`,describe:`Operations for access.targets`,builder:e=>e.command(mi).command(_i).command(bi).command(Ci).command(Ti).command(fi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var H={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/user_populations`,body:`json`};function Di(e){return e.usage(`$0 zero-trust access user-populations create
|
|
226
|
-
|
|
227
|
-
Creates a user population in an account.`).option(`name`,{type:`string`,description:`The name of the user population. Leading and trailing whitespace is trimmed before validation. After trimming, the name must contain at least one non-whitespace character and must not exceed 128 UTF-8 bytes.
|
|
228
|
-
`}).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 Oi={command:`create`,describe:`Create a user population`,builder:Di,handler:async e=>u({command:`zero-trust access user-populations create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access user-populations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/user_populations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({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(H,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name of the user population. Leading and trailing whitespace is trimmed before validation. After trimming, the name must contain at least one non-whitespace character and must not exceed 128 UTF-8 bytes. `));let u=g({name:_(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(H,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var ki={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/user_populations/${t.user_population_id}`};function Ai(e){return e.usage(`$0 zero-trust access user-populations delete <user-population-id>
|
|
229
|
-
|
|
230
|
-
Deletes a user population that is not attached to an application.`).positional(`user-population-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 ji={command:`delete <user-population-id>`,describe:`Delete a user population`,builder:Ai,handler:async e=>u({command:`zero-trust access user-populations 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 user-populations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/user_populations/${e[`user-population-id`]==null?`<user-population-id>`:encodeURIComponent(String(e[`user-population-id`]))}`,pathParams:{"user-population-id":String(e[`user-population-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(ki,{account_id:a,user_population_id:e[`user-population-id`]}));s(u,{successLabel:`Deleted`})})};var Mi={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/user_populations/${t.user_population_id}`};function Ni(e){return e.usage(`$0 zero-trust access user-populations get <user-population-id>
|
|
231
|
-
|
|
232
|
-
Fetches a user population.`).positional(`user-population-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pi={command:`get <user-population-id>`,describe:`Get a user population`,builder:Ni,handler:async e=>u({command:`zero-trust access user-populations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access user-populations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/user_populations/${e[`user-population-id`]==null?`<user-population-id>`:encodeURIComponent(String(e[`user-population-id`]))}`,pathParams:{"user-population-id":String(e[`user-population-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(Mi,{account_id:a,user_population_id:e[`user-population-id`]}));s(u,{successLabel:`Loaded`})})};var Fi={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/user_populations`,query:[`page`,`per_page`]};function Ii(e){return e.usage(`$0 zero-trust access user-populations list
|
|
233
|
-
|
|
234
|
-
Lists the user populations in an account.`).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 Li={command:`list`,describe:`List user populations`,builder:Ii,handler:async e=>u({command:`zero-trust access user-populations 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 user-populations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/user_populations`,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(Fi,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var U={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/user_populations/${t.user_population_id}`,body:`json`};function Ri(e){return e.usage(`$0 zero-trust access user-populations update <user-population-id>
|
|
235
|
-
|
|
236
|
-
Updates a user population's name.`).positional(`user-population-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the user population. Leading and trailing whitespace is trimmed before validation. After trimming, the name must contain at least one non-whitespace character and must not exceed 128 UTF-8 bytes.
|
|
237
|
-
`}).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 zi={command:`update <user-population-id>`,describe:`Update a user population`,builder:Ri,handler:async e=>u({command:`zero-trust access user-populations update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access user-populations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/user_populations/${e[`user-population-id`]==null?`<user-population-id>`:encodeURIComponent(String(e[`user-population-id`]))}`,pathParams:{"user-population-id":String(e[`user-population-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({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(U,{body:t,account_id:a,user_population_id:e[`user-population-id`]}));s(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await y(`name`,`The name of the user population. Leading and trailing whitespace is trimmed before validation. After trimming, the name must contain at least one non-whitespace character and must not exceed 128 UTF-8 bytes. `));let u=g({name:_(e.name,`name`,`text`)}),d=await l(`Updating`,async()=>n.send(U,{body:u,account_id:a,user_population_id:e[`user-population-id`]}));s(d,{successLabel:`Updated`})})};function Bi(e){return e.usage(`$0 zero-trust access user-populations users create <user-population-id>
|
|
238
|
-
|
|
239
|
-
Creates a SCIM user in a user population.`).positional(`user-population-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`active`,{type:`boolean`,description:`The active field`}).option(`display-name`,{type:`string`,description:`The displayName field`}).option(`emails`,{type:`string`,description:`The emails field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`external-id`,{type:`string`,description:`The externalId field`}).option(`meta-created`,{type:`string`,description:`The meta.created field`}).option(`meta-last-modified`,{type:`string`,description:`The meta.lastModified field`}).option(`meta-location`,{type:`string`,description:`The meta.location field`}).option(`meta-resource-type`,{type:`string`,description:`The meta.resourceType field`}).option(`meta-version`,{type:`string`,description:`The meta.version field`}).option(`name-family-name`,{type:`string`,description:`The name.familyName field`}).option(`name-formatted`,{type:`string`,description:`The name.formatted field`}).option(`name-given-name`,{type:`string`,description:`The name.givenName field`}).option(`name-honorific-prefix`,{type:`string`,description:`The name.honorificPrefix field`}).option(`name-honorific-suffix`,{type:`string`,description:`The name.honorificSuffix field`}).option(`name-middle-name`,{type:`string`,description:`The name.middleName field`}).option(`schemas`,{type:`string`,array:!0,description:`The SCIM schemas that apply to this resource.`}).option(`user-name`,{type:`string`,description:`The userName field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A SCIM User resource. Additional SCIM extension attributes are supported.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const Vi={command:`create <user-population-id>`,describe:`Create a user population user`,builder:Bi,handler:async e=>u({command:`zero-trust access user-populations users create`,classification:{safeFlags:[`active`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access user-populations users create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/user_populations/${e[`user-population-id`]==null?`<user-population-id>`:encodeURIComponent(String(e[`user-population-id`]))}/users`,pathParams:{"user-population-id":String(e[`user-population-id`]??``)},bodyKind:e.file===void 0?`json`:`octet-stream`,body:e.file===void 0?e.body===void 0?g({active:e.active,displayName:_(e[`display-name`],`display-name`,`text`),emails:d(e.emails,`emails`),externalId:_(e[`external-id`],`external-id`,`text`),meta:{created:_(e[`meta-created`],`meta-created`,`text`),lastModified:_(e[`meta-last-modified`],`meta-last-modified`,`text`),location:_(e[`meta-location`],`meta-location`,`text`),resourceType:_(e[`meta-resource-type`],`meta-resource-type`,`text`),version:_(e[`meta-version`],`meta-version`,`text`)},name:{familyName:_(e[`name-family-name`],`name-family-name`,`text`),formatted:_(e[`name-formatted`],`name-formatted`,`text`),givenName:_(e[`name-given-name`],`name-given-name`,`text`),honorificPrefix:_(e[`name-honorific-prefix`],`name-honorific-prefix`,`text`),honorificSuffix:_(e[`name-honorific-suffix`],`name-honorific-suffix`,`text`),middleName:_(e[`name-middle-name`],`name-middle-name`,`text`)},schemas:e.schemas,userName:_(e[`user-name`],`user-name`,`text`)}):f(e.body):{file:e.file}});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file){let t=v(e.file),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/access/user_populations/${encodeURIComponent(String(e[`user-population-id`]))}/users`,{body:t,headers:{"Content-Type":`application/scim+json`}}));s(r,{successLabel:`Created`});return}if(e.body){let t=f(e.body),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/access/user_populations/${encodeURIComponent(String(e[`user-population-id`]))}/users`,{body:t}));s(r,{successLabel:`Created`});return}let p={};e.active!==void 0&&h(p,[`active`],e.active),e[`display-name`]!==void 0&&h(p,[`displayName`],_(e[`display-name`],`display-name`,`text`)),e.emails!==void 0&&h(p,[`emails`],d(e.emails,`emails`)),e[`external-id`]!==void 0&&h(p,[`externalId`],_(e[`external-id`],`external-id`,`text`)),e[`meta-created`]!==void 0&&h(p,[`meta`,`created`],_(e[`meta-created`],`meta-created`,`text`)),e[`meta-last-modified`]!==void 0&&h(p,[`meta`,`lastModified`],_(e[`meta-last-modified`],`meta-last-modified`,`text`)),e[`meta-location`]!==void 0&&h(p,[`meta`,`location`],_(e[`meta-location`],`meta-location`,`text`)),e[`meta-resource-type`]!==void 0&&h(p,[`meta`,`resourceType`],_(e[`meta-resource-type`],`meta-resource-type`,`text`)),e[`meta-version`]!==void 0&&h(p,[`meta`,`version`],_(e[`meta-version`],`meta-version`,`text`)),e[`name-family-name`]!==void 0&&h(p,[`name`,`familyName`],_(e[`name-family-name`],`name-family-name`,`text`)),e[`name-formatted`]!==void 0&&h(p,[`name`,`formatted`],_(e[`name-formatted`],`name-formatted`,`text`)),e[`name-given-name`]!==void 0&&h(p,[`name`,`givenName`],_(e[`name-given-name`],`name-given-name`,`text`)),e[`name-honorific-prefix`]!==void 0&&h(p,[`name`,`honorificPrefix`],_(e[`name-honorific-prefix`],`name-honorific-prefix`,`text`)),e[`name-honorific-suffix`]!==void 0&&h(p,[`name`,`honorificSuffix`],_(e[`name-honorific-suffix`],`name-honorific-suffix`,`text`)),e[`name-middle-name`]!==void 0&&h(p,[`name`,`middleName`],_(e[`name-middle-name`],`name-middle-name`,`text`)),e.schemas!==void 0&&h(p,[`schemas`],e.schemas),e[`user-name`]!==void 0&&h(p,[`userName`],_(e[`user-name`],`user-name`,`text`));let m=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/access/user_populations/${encodeURIComponent(String(e[`user-population-id`]))}/users`,{body:p}));s(m,{successLabel:`Created`})})};var Hi={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/user_populations/${t.user_population_id}/users/${t.user_id}`,response:!1};function Ui(e){return e.usage(`$0 zero-trust access user-populations users delete <user-id>
|
|
240
|
-
|
|
241
|
-
Deletes a SCIM user from a user population.`).positional(`user-id`,{type:`string`,description:`The SCIM user identifier.`,demandOption:!0}).option(`user-population-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 Wi={command:`delete <user-id>`,describe:`Delete a user population user`,builder:Ui,handler:async e=>u({command:`zero-trust access user-populations 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 access user-populations users delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/user_populations/${e[`user-population-id`]==null?`<user-population-id>`:encodeURIComponent(String(e[`user-population-id`]))}/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}`,pathParams:{"user-population-id":String(e[`user-population-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(Hi,{account_id:a,user_population_id:e[`user-population-id`],user_id:e[`user-id`]}));s(u,{successLabel:`Deleted`})})};var Gi={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/user_populations/${t.user_population_id}/users/${t.user_id}`,query:[`attributes`,`excludedAttributes`]};function Ki(e){return e.usage(`$0 zero-trust access user-populations users get <user-id>
|
|
242
|
-
|
|
243
|
-
Fetches a SCIM user from a user population.`).positional(`user-id`,{type:`string`,description:`The SCIM user identifier.`,demandOption:!0}).option(`user-population-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`attributes`,{type:`string`,description:`Comma-separated SCIM attributes to return.`}).option(`excluded-attributes`,{type:`string`,description:`Comma-separated SCIM attributes to exclude from the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qi={command:`get <user-id>`,describe:`Get a user population user`,builder:Ki,handler:async e=>u({command:`zero-trust access user-populations users get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={attributes:e.attributes,excludedAttributes:e[`excluded-attributes`]};if(e.dryRun){let t=await i();c({command:`cf zero-trust access user-populations users get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/user_populations/${e[`user-population-id`]==null?`<user-population-id>`:encodeURIComponent(String(e[`user-population-id`]))}/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}`,pathParams:{"user-population-id":String(e[`user-population-id`]??``),"user-id":String(e[`user-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(Gi,{account_id:u,user_population_id:e[`user-population-id`],user_id:e[`user-id`],...n}));s(d,{successLabel:`Loaded`})})};var Ji={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/user_populations/${t.user_population_id}/users`,query:[`filter`,`startIndex`,`count`,`attributes`,`excludedAttributes`]};function Yi(e){return e.usage(`$0 zero-trust access user-populations users list
|
|
244
|
-
|
|
245
|
-
Lists SCIM users in a user population.`).option(`user-population-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`filter`,{type:`string`,description:`A SCIM filter expression.`}).option(`start-index`,{type:`number`,description:`The 1-based index of the first result to return.`}).option(`count`,{type:`number`,description:`The maximum number of results to return.`}).option(`attributes`,{type:`string`,description:`Comma-separated SCIM attributes to return.`}).option(`excluded-attributes`,{type:`string`,description:`Comma-separated SCIM attributes to exclude from the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xi={command:`list`,describe:`List users in a user population`,builder:Yi,handler:async e=>u({command:`zero-trust access user-populations users list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={filter:e.filter,startIndex:e[`start-index`],count:e.count,attributes:e.attributes,excludedAttributes:e[`excluded-attributes`]};if(e.dryRun){let t=await i();c({command:`cf zero-trust access user-populations users list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/user_populations/${e[`user-population-id`]==null?`<user-population-id>`:encodeURIComponent(String(e[`user-population-id`]))}/users`,pathParams:{"user-population-id":String(e[`user-population-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(Ji,{account_id:u,user_population_id:e[`user-population-id`],...n}));s(d,{successLabel:`Loaded`})})};function Zi(e){return e.usage(`$0 zero-trust access user-populations users replace <user-id>
|
|
246
|
-
|
|
247
|
-
Replaces a SCIM user in a user population.`).positional(`user-id`,{type:`string`,description:`The SCIM user identifier.`,demandOption:!0}).option(`user-population-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`active`,{type:`boolean`,description:`The active field`}).option(`display-name`,{type:`string`,description:`The displayName field`}).option(`emails`,{type:`string`,description:`The emails field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`external-id`,{type:`string`,description:`The externalId field`}).option(`meta-created`,{type:`string`,description:`The meta.created field`}).option(`meta-last-modified`,{type:`string`,description:`The meta.lastModified field`}).option(`meta-location`,{type:`string`,description:`The meta.location field`}).option(`meta-resource-type`,{type:`string`,description:`The meta.resourceType field`}).option(`meta-version`,{type:`string`,description:`The meta.version field`}).option(`name-family-name`,{type:`string`,description:`The name.familyName field`}).option(`name-formatted`,{type:`string`,description:`The name.formatted field`}).option(`name-given-name`,{type:`string`,description:`The name.givenName field`}).option(`name-honorific-prefix`,{type:`string`,description:`The name.honorificPrefix field`}).option(`name-honorific-suffix`,{type:`string`,description:`The name.honorificSuffix field`}).option(`name-middle-name`,{type:`string`,description:`The name.middleName field`}).option(`schemas`,{type:`string`,array:!0,description:`The SCIM schemas that apply to this resource.`}).option(`user-name`,{type:`string`,description:`The userName field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A SCIM User resource. Additional SCIM extension attributes are supported.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const Qi={command:`replace <user-id>`,describe:`Replace a user population user`,builder:Zi,handler:async e=>u({command:`zero-trust access user-populations users replace`,classification:{safeFlags:[`active`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access user-populations users replace`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/user_populations/${e[`user-population-id`]==null?`<user-population-id>`:encodeURIComponent(String(e[`user-population-id`]))}/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}`,pathParams:{"user-population-id":String(e[`user-population-id`]??``),"user-id":String(e[`user-id`]??``)},bodyKind:e.file===void 0?`json`:`octet-stream`,body:e.file===void 0?e.body===void 0?g({active:e.active,displayName:_(e[`display-name`],`display-name`,`text`),emails:d(e.emails,`emails`),externalId:_(e[`external-id`],`external-id`,`text`),meta:{created:_(e[`meta-created`],`meta-created`,`text`),lastModified:_(e[`meta-last-modified`],`meta-last-modified`,`text`),location:_(e[`meta-location`],`meta-location`,`text`),resourceType:_(e[`meta-resource-type`],`meta-resource-type`,`text`),version:_(e[`meta-version`],`meta-version`,`text`)},name:{familyName:_(e[`name-family-name`],`name-family-name`,`text`),formatted:_(e[`name-formatted`],`name-formatted`,`text`),givenName:_(e[`name-given-name`],`name-given-name`,`text`),honorificPrefix:_(e[`name-honorific-prefix`],`name-honorific-prefix`,`text`),honorificSuffix:_(e[`name-honorific-suffix`],`name-honorific-suffix`,`text`),middleName:_(e[`name-middle-name`],`name-middle-name`,`text`)},schemas:e.schemas,userName:_(e[`user-name`],`user-name`,`text`)}):f(e.body):{file:e.file}});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file){let t=v(e.file),r=await l(`Updating`,async()=>n(a,`PUT`,`/accounts/${u}/access/user_populations/${encodeURIComponent(String(e[`user-population-id`]))}/users/${encodeURIComponent(String(e[`user-id`]))}`,{body:t,headers:{"Content-Type":`application/scim+json`}}));s(r,{successLabel:`Updated`});return}if(e.body){let t=f(e.body),r=await l(`Updating`,async()=>n(a,`PUT`,`/accounts/${u}/access/user_populations/${encodeURIComponent(String(e[`user-population-id`]))}/users/${encodeURIComponent(String(e[`user-id`]))}`,{body:t}));s(r,{successLabel:`Updated`});return}let p={};e.active!==void 0&&h(p,[`active`],e.active),e[`display-name`]!==void 0&&h(p,[`displayName`],_(e[`display-name`],`display-name`,`text`)),e.emails!==void 0&&h(p,[`emails`],d(e.emails,`emails`)),e[`external-id`]!==void 0&&h(p,[`externalId`],_(e[`external-id`],`external-id`,`text`)),e[`meta-created`]!==void 0&&h(p,[`meta`,`created`],_(e[`meta-created`],`meta-created`,`text`)),e[`meta-last-modified`]!==void 0&&h(p,[`meta`,`lastModified`],_(e[`meta-last-modified`],`meta-last-modified`,`text`)),e[`meta-location`]!==void 0&&h(p,[`meta`,`location`],_(e[`meta-location`],`meta-location`,`text`)),e[`meta-resource-type`]!==void 0&&h(p,[`meta`,`resourceType`],_(e[`meta-resource-type`],`meta-resource-type`,`text`)),e[`meta-version`]!==void 0&&h(p,[`meta`,`version`],_(e[`meta-version`],`meta-version`,`text`)),e[`name-family-name`]!==void 0&&h(p,[`name`,`familyName`],_(e[`name-family-name`],`name-family-name`,`text`)),e[`name-formatted`]!==void 0&&h(p,[`name`,`formatted`],_(e[`name-formatted`],`name-formatted`,`text`)),e[`name-given-name`]!==void 0&&h(p,[`name`,`givenName`],_(e[`name-given-name`],`name-given-name`,`text`)),e[`name-honorific-prefix`]!==void 0&&h(p,[`name`,`honorificPrefix`],_(e[`name-honorific-prefix`],`name-honorific-prefix`,`text`)),e[`name-honorific-suffix`]!==void 0&&h(p,[`name`,`honorificSuffix`],_(e[`name-honorific-suffix`],`name-honorific-suffix`,`text`)),e[`name-middle-name`]!==void 0&&h(p,[`name`,`middleName`],_(e[`name-middle-name`],`name-middle-name`,`text`)),e.schemas!==void 0&&h(p,[`schemas`],e.schemas),e[`user-name`]!==void 0&&h(p,[`userName`],_(e[`user-name`],`user-name`,`text`));let m=await l(`Updating`,async()=>n(a,`PUT`,`/accounts/${u}/access/user_populations/${encodeURIComponent(String(e[`user-population-id`]))}/users/${encodeURIComponent(String(e[`user-id`]))}`,{body:p}));s(m,{successLabel:`Updated`})})};function $i(e){return e.usage(`$0 zero-trust access user-populations users update <user-id>
|
|
248
|
-
|
|
249
|
-
Updates a SCIM user in a user population.`).positional(`user-id`,{type:`string`,description:`The SCIM user identifier.`,demandOption:!0}).option(`user-population-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`operations`,{type:`string`,description:`The Operations field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`schemas`,{type:`string`,array:!0,description:`The schemas 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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const ea={command:`update <user-id>`,describe:`Update a user population user`,builder:$i,handler:async e=>u({command:`zero-trust access user-populations users update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access user-populations users update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/user_populations/${e[`user-population-id`]==null?`<user-population-id>`:encodeURIComponent(String(e[`user-population-id`]))}/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}`,pathParams:{"user-population-id":String(e[`user-population-id`]??``),"user-id":String(e[`user-id`]??``)},bodyKind:e.file===void 0?`json`:`octet-stream`,body:e.file===void 0?e.body===void 0?g({Operations:d(e.operations,`operations`),schemas:e.schemas}):f(e.body):{file:e.file}});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file){let t=v(e.file),r=await l(`Updating`,async()=>n(a,`PATCH`,`/accounts/${u}/access/user_populations/${encodeURIComponent(String(e[`user-population-id`]))}/users/${encodeURIComponent(String(e[`user-id`]))}`,{body:t,headers:{"Content-Type":`application/scim+json`}}));s(r,{successLabel:`Updated`});return}if(e.body){let t=f(e.body),r=await l(`Updating`,async()=>n(a,`PATCH`,`/accounts/${u}/access/user_populations/${encodeURIComponent(String(e[`user-population-id`]))}/users/${encodeURIComponent(String(e[`user-id`]))}`,{body:t}));s(r,{successLabel:`Updated`});return}if(e.operations===void 0)throw Error(`--operations is required (or pass --body with this field set).`);let p={};e.operations!==void 0&&h(p,[`Operations`],d(e.operations,`operations`)),e.schemas!==void 0&&h(p,[`schemas`],e.schemas);let m=await l(`Updating`,async()=>n(a,`PATCH`,`/accounts/${u}/access/user_populations/${encodeURIComponent(String(e[`user-population-id`]))}/users/${encodeURIComponent(String(e[`user-id`]))}`,{body:p}));s(m,{successLabel:`Updated`})})},ta={command:`users`,describe:`Operations for access.user-populations.users`,builder:e=>e.command(Vi).command(Wi).command(qi).command(Xi).command(Qi).command(ea).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},na={command:`user-populations`,describe:`Operations for access.user-populations`,builder:e=>e.command(Oi).command(ji).command(Pi).command(Li).command(zi).command(ta).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ra={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/users/${t.user_id}/active_sessions/${t.nonce}`};function ia(e){return e.usage(`$0 zero-trust access users active-sessions get <nonce>
|
|
250
|
-
|
|
251
|
-
Get an active session for a single user.`).positional(`nonce`,{type:`string`,description:`Nonce`,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})}const aa={command:`get <nonce>`,describe:`Get single active session`,builder:ia,handler:async e=>u({command:`zero-trust access users active-sessions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access users active-sessions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}/active_sessions/${e.nonce==null?`<nonce>`:encodeURIComponent(String(e.nonce))}`,pathParams:{"user-id":String(e[`user-id`]??``),nonce:String(e.nonce??``)},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(ra,{account_id:a,user_id:e[`user-id`],nonce:e.nonce}));s(u,{successLabel:`Loaded`})})};var oa={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/users/${t.user_id}/active_sessions`};function sa(e){return e.usage(`$0 zero-trust access users active-sessions list
|
|
252
|
-
|
|
253
|
-
Get active sessions for a single user.`).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})}const ca={command:`list`,describe:`Get active sessions`,builder:sa,handler:async e=>u({command:`zero-trust access users active-sessions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access users active-sessions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}/active_sessions`,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(oa,{account_id:a,user_id:e[`user-id`]}));s(u,{successLabel:`Loaded`})})},la={command:`active-sessions`,describe:`Operations for access.users.active-sessions`,builder:e=>e.command(aa).command(ca).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var W={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/users`,body:`json`};function ua(e){return e.usage(`$0 zero-trust access users create
|
|
254
|
-
|
|
255
|
-
Creates a new user.`).option(`email`,{type:`string`,description:`The email of the user.`}).option(`name`,{type:`string`,description:`The name of the user.`}).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 da={command:`create`,describe:`Create a user`,builder:ua,handler:async e=>u({command:`zero-trust access users create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access users create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/users`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({email:_(e.email,`email`,`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(W,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.email===void 0&&(e.email=await y(`email`,`The email of the user.`));let u=g({email:_(e.email,`email`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(W,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var fa={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/users/${t.user_id}`};function pa(e){return e.usage(`$0 zero-trust access users delete <user-id>
|
|
256
|
-
|
|
257
|
-
Deletes a specific user for an account. This will also revoke any active seats and tokens for the user.`).positional(`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 ma={command:`delete <user-id>`,describe:`Delete a user`,builder:pa,handler:async e=>u({command:`zero-trust access 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 access users 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`]))}`,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}))return;let u=await l(`Deleting`,async()=>n.send(fa,{account_id:a,user_id:e[`user-id`]}));s(u,{successLabel:`Deleted`})})};var ha={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/users/${t.user_id}/failed_logins`};function ga(e){return e.usage(`$0 zero-trust access users failed-logins list
|
|
258
|
-
|
|
259
|
-
Get all failed login attempts for a single user.`).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})}const _a={command:`list`,describe:`Get failed logins`,builder:ga,handler:async e=>u({command:`zero-trust access users failed-logins list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access users failed-logins list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}/failed_logins`,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(ha,{account_id:a,user_id:e[`user-id`]}));s(u,{successLabel:`Loaded`})})},va={command:`failed-logins`,describe:`Operations for access.users.failed-logins`,builder:e=>e.command(_a).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ya={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/users/${t.user_id}`};function ba(e){return e.usage(`$0 zero-trust access users get <user-id>
|
|
260
|
-
|
|
261
|
-
Gets a specific user for an account.`).positional(`user-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xa={command:`get <user-id>`,describe:`Get a user`,builder:ba,handler:async e=>u({command:`zero-trust access users get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access users get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/users/${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(ya,{account_id:a,user_id:e[`user-id`]}));s(u,{successLabel:`Loaded`})})};var Sa={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/users/${t.user_id}/last_seen_identity`};function Ca(e){return e.usage(`$0 zero-trust access users last-seen-identity get <user-id>
|
|
262
|
-
|
|
263
|
-
Get last seen identity for a single user.`).positional(`user-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const wa={command:`get <user-id>`,describe:`Get last seen identity`,builder:Ca,handler:async e=>u({command:`zero-trust access users last-seen-identity get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access users last-seen-identity get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}/last_seen_identity`,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(Sa,{account_id:a,user_id:e[`user-id`]}));s(u,{successLabel:`Loaded`})})},Ta={command:`last-seen-identity`,describe:`Operations for access.users.last-seen-identity`,builder:e=>e.command(wa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ea={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/users`,query:[`name`,`email`,`search`,`page`,`per_page`]};function Da(e){return e.usage(`$0 zero-trust access users list
|
|
264
|
-
|
|
265
|
-
Gets a list of users for an account.`).option(`name`,{type:`string`,description:`The name of the user.`}).option(`email`,{type:`string`,description:`The email of the user.`}).option(`search`,{type:`string`,description:`Search for users by other listed query parameters.`}).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 Oa={command:`list`,describe:`Get users`,builder:Da,handler:async e=>u({command:`zero-trust access users list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={name:e.name,email:e.email,search:e.search,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust access users list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/users`,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(Ea,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var G={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/organizations/revoke_user`,query:[`devices`],body:`json`};function ka(e){return e.usage(`$0 zero-trust access users revoke
|
|
266
|
-
|
|
267
|
-
Revokes a user's access across all applications.
|
|
268
|
-
|
|
269
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`devices`,{type:`boolean`,description:"When set to `true`, all devices associated with the user will be revoked."}).option(`email`,{type:`string`,description:`The email of the user to revoke.`}).option(`user-uid`,{type:`string`,description:`The uuid of the user to revoke.`}).option(`warp-session-reauth`,{type:`boolean`,description:"When set to `true`, the user will be required to re-authenticate to WARP for all Gateway policies that enforce a WARP client session duration. When `false`, the user’s WARP session will remain active"}).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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Aa={command:`revoke`,describe:`Revoke all Access tokens for a user`,builder:ka,handler:async e=>u({command:`zero-trust access users revoke`,classification:{safeFlags:[`devices`,`warp-session-reauth`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={devices:e.devices};if(e.dryRun){let t=e.zone===void 0?await i():void 0,r=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;c({command:`cf zero-trust access users revoke`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${r}/${a}/access/organizations/revoke_user`,pathParams:{"account-or-zone":String(r),"account-or-zone-id":String(a)},query:n,bodyKind:`json`,body:e.body===void 0?g({email:_(e.email,`email`,`text`),user_uid:_(e[`user-uid`],`user-uid`,`text`),warp_session_reauth:e[`warp-session-reauth`]}):f(e.body)});return}let u=await r(e),d=e.zone===void 0?`accounts`:`zones`,p=d===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await o();if(d===`zones`?e.zoneId=p:e.accountId=p,!await x({force:!!e.force,message:`This operation revokes all access tokens for a user destructively.`}))return;if(e.body){let t=f(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await l(`Deleting`,async()=>u.send(G,{body:t,account_or_zone:d,account_or_zone_id:p,...n}));s(r,{successLabel:`Deleted`});return}e.email===void 0&&(e.email=await y(`email`,`The email of the user to revoke.`));let m=g({email:_(e.email,`email`,`text`),user_uid:_(e[`user-uid`],`user-uid`,`text`),warp_session_reauth:e[`warp-session-reauth`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let h=await l(`Deleting`,async()=>u.send(G,{body:m,account_or_zone:d,account_or_zone_id:p,...n}));s(h,{successLabel:`Deleted`})})};var K={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/users/${t.user_id}`,body:`json`};function ja(e){return e.usage(`$0 zero-trust access users update <user-id>
|
|
270
|
-
|
|
271
|
-
Updates a specific user's name for an account. Requires the user's current email as confirmation (email cannot be changed).`).positional(`user-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`email`,{type:`string`,description:`The email of the user.`}).option(`name`,{type:`string`,description:`The name of the user.`}).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 Ma={command:`update <user-id>`,describe:`Update a user`,builder:ja,handler:async e=>u({command:`zero-trust access users update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust access users update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/users/${e[`user-id`]==null?`<user-id>`:encodeURIComponent(String(e[`user-id`]))}`,pathParams:{"user-id":String(e[`user-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({email:_(e.email,`email`,`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(K,{body:t,account_id:a,user_id:e[`user-id`]}));s(r,{successLabel:`Updated`});return}e.email===void 0&&(e.email=await y(`email`,`The email of the user.`)),e.name===void 0&&(e.name=await y(`name`,`The name of the user.`));let u=g({email:_(e.email,`email`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Updating`,async()=>n.send(K,{body:u,account_id:a,user_id:e[`user-id`]}));s(d,{successLabel:`Updated`})})},Na={command:`users`,describe:`Operations for access.users`,builder:e=>e.command(da).command(ma).command(xa).command(Oa).command(Aa).command(Ma).command(la).command(va).command(Ta).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pa={command:`access`,describe:`Operations for access`,builder:e=>e.command(rt).command(bt).command(Bt).command(rn).command(ln).command(kn).command(Un).command(rr).command(gr).command(Fr).command(Wr).command(ii).command(Ei).command(na).command(Na).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Fa={method:`GET`,path:t=>e`/accounts/${t.account_id}/one/applications/${t.application_id}/auth-methods`,query:[`page`,`page_size`],errors:{404:`NotFoundError`}};function Ia(e){return e.usage(`$0 zero-trust casb applications auth-methods list
|
|
272
|
-
|
|
273
|
-
Returns available auth methods for the specified vendor, including credential schema, instructions, and example payloads. Use this to understand what credentials are required before calling POST /v2/integrations.`).option(`application-id`,{type:`string`,description:`Application/vendor identifier.`,demandOption:!0}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`page-size`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const La={command:`list`,describe:`Get auth methods`,builder:Ia,handler:async e=>u({command:`zero-trust casb applications auth-methods list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,page_size:e[`page-size`]};if(e.dryRun){let t=await i();c({command:`cf zero-trust casb applications auth-methods list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/one/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}/auth-methods`,pathParams:{"application-id":String(e[`application-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(Fa,{account_id:u,application_id:e[`application-id`],...n}));s(d,{successLabel:`Loaded`})})},Ra={command:`auth-methods`,describe:`Operations for casb.applications.auth-methods`,builder:e=>e.command(La).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var za={method:`GET`,path:t=>e`/accounts/${t.account_id}/one/applications/${t.application_id}`,errors:{404:`NotFoundError`}};function Ba(e){return e.usage(`$0 zero-trust casb applications get <application-id>
|
|
274
|
-
|
|
275
|
-
Returns full application details including auth methods, use cases, and permissions.`).positional(`application-id`,{type:`string`,description:`Application/vendor identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Va={command:`get <application-id>`,describe:`Get application details`,builder:Ba,handler:async e=>u({command:`zero-trust casb applications get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb applications get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/one/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}`,pathParams:{"application-id":String(e[`application-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(za,{account_id:a,application_id:e[`application-id`]}));s(u,{successLabel:`Loaded`})})};var Ha={method:`GET`,path:t=>e`/accounts/${t.account_id}/one/applications`,query:[`environment`,`page`,`page_size`],errors:{400:`BadRequestError`}};function Ua(e){return e.usage(`$0 zero-trust casb applications list
|
|
276
|
-
|
|
277
|
-
Returns a list of available applications with use cases and permissions.`).option(`environment`,{type:`string`,description:`Filter by supported environment (standard, fedramp).`}).option(`page`,{type:`number`,description:`A page number within the paginated result set.`}).option(`page-size`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Wa={command:`list`,describe:`List applications`,builder:Ua,handler:async e=>u({command:`zero-trust casb applications list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={environment:e.environment,page:e.page,page_size:e[`page-size`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb applications list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/one/applications`,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(Ha,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},Ga={command:`applications`,describe:`Operations for casb.applications`,builder:e=>e.command(Va).command(Wa).command(Ra).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ka={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/asset_schemas/${t.asset_class}`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function qa(e){return e.usage(`$0 zero-trust casb asset-schemas get <asset-class>
|
|
278
|
-
|
|
279
|
-
Returns the fields and related attributes a custom finding type may reference for the given asset class (JSON Schema). Used by the custom finding types builder.`).positional(`asset-class`,{type:`string`,description:`Asset class identifier (PascalCase), e.g. AnthropicApiKey.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ja={command:`get <asset-class>`,describe:`Get asset schema by asset class`,builder:qa,handler:async e=>u({command:`zero-trust casb asset-schemas get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb asset-schemas get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/asset_schemas/${e[`asset-class`]==null?`<asset-class>`:encodeURIComponent(String(e[`asset-class`]))}`,pathParams:{"asset-class":String(e[`asset-class`]??``)},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(Ka,{account_id:a,asset_class:e[`asset-class`]}));s(u,{successLabel:`Loaded`})})};var Ya={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/asset_schemas`,query:[`vendor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`}};function Xa(e){return e.usage(`$0 zero-trust casb asset-schemas list
|
|
280
|
-
|
|
281
|
-
Returns the catalog of asset classes available when authoring custom findings, grouped by vendor. Optionally filter to a single vendor with the \`vendor\` query parameter.`).option(`vendor`,{type:`string`,description:`Restrict the result to a single vendor. Unknown values return 400.`,choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`WORKDAY`,`ZOOM`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Za={command:`list`,describe:`List asset schemas`,builder:Xa,handler:async e=>u({command:`zero-trust casb asset-schemas list`,classification:{safeFlags:[`vendor`,`dry-run`]}},e,async()=>{let n={vendor:e.vendor};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb asset-schemas list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/asset_schemas`,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(Ya,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},Qa={command:`asset-schemas`,describe:`Operations for casb.asset-schemas`,builder:e=>e.command(Ja).command(Za).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/content/export`,body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function $a(e){return e.usage(`$0 zero-trust casb content export
|
|
282
|
-
|
|
283
|
-
Creates a CSV export for content and accepts optional filters in the payload.`).option(`dlp-profile-id`,{type:`string`,array:!0,description:`Filter by DLP profile IDs.`}).option(`dlp-profile-information`,{type:`string`,description:`DLP profile metadata for the export. Provide as a JSON array of objects or @path/to/file.json.`}).option(`integration-id`,{type:`string`,array:!0,description:`Filter by integration IDs.`}).option(`max-affliction-date`,{type:`string`,description:`Filter to view content flagged on or before this date.`}).option(`min-affliction-date`,{type:`string`,description:`Filter to view content flagged on or after this date.`}).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:`Search term to filter content.`}).option(`vendors`,{type:`string`,array:!0,description:`Filter by vendor types.`}).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 content exports.`})}const eo={command:`export`,describe:`Create a content export`,builder:$a,handler:async e=>u({command:`zero-trust casb content export`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb content export`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/content/export`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({dlp_profile_id:e[`dlp-profile-id`],dlp_profile_information:d(e[`dlp-profile-information`],`dlp-profile-information`),integration_id:e[`integration-id`],max_affliction_date:_(e[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:_(e[`min-affliction-date`],`min-affliction-date`,`text`),orders:d(e.orders,`orders`),search:_(e.search,`search`,`text`),vendors:e.vendors}):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(q,{body:t,account_id:a}));s(r,{successLabel:`Loaded`});return}if(e[`dlp-profile-information`]===void 0)throw Error(`--dlp-profile-information is required (or pass --body with this field set).`);let u=g({dlp_profile_id:e[`dlp-profile-id`],dlp_profile_information:d(e[`dlp-profile-information`],`dlp-profile-information`),integration_id:e[`integration-id`],max_affliction_date:_(e[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:_(e[`min-affliction-date`],`min-affliction-date`,`text`),orders:d(e.orders,`orders`),search:_(e.search,`search`,`text`),vendors:e.vendors}),p=await l(`Loading`,async()=>n.send(q,{body:u,account_id:a}));s(p,{successLabel:`Loaded`})})};var to={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/content`,query:[`direction`,`dlp_profile_id`,`integration_id`,`max_affliction_date`,`min_affliction_date`,`order`,`page`,`per_page`,`search`,`vendor`],errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function no(e){return e.usage(`$0 zero-trust casb content list
|
|
284
|
-
|
|
285
|
-
List DLP content findings`).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dlp-profile-id`,{type:`string`,description:`Filter by an DLP profile ID`}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).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 content assets.`,choices:[`asset_name`,`dlp_profile_count`,`integration_name`,`latest_affliction_date`]}).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(`vendor`,{type:`string`,description:`Filter by vendor`,choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`MICROSOFT_INTERNAL`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ro={command:`list`,describe:`List DLP content findings`,builder:no,handler:async e=>u({command:`zero-trust casb content list`,classification:{safeFlags:[`direction`,`order`,`vendor`,`dry-run`]}},e,async()=>{let n={direction:e.direction,dlp_profile_id:e[`dlp-profile-id`],integration_id:e[`integration-id`],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,vendor:e.vendor};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb content list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/content`,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(to,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},io={command:`content`,describe:`Operations for casb.content`,builder:e=>e.command(eo).command(ro).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ao={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/exports/${t.id}`,errors:{400:`BadRequestError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function oo(e){return e.usage(`$0 zero-trust casb exports get <id>
|
|
286
|
-
|
|
287
|
-
Retrieves a single export job by its unique identifier`).positional(`id`,{type:`string`,description:`Unique identifier for the export job`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const so={command:`get <id>`,describe:`Get a single export job`,builder:oo,handler:async e=>u({command:`zero-trust casb exports get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb exports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/exports/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.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(ao,{account_id:a,id:e.id}));s(u,{successLabel:`Loaded`})})};var co={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/exports`,query:[`page`,`per_page`,`status`],errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function lo(e){return e.usage(`$0 zero-trust casb exports list
|
|
288
|
-
|
|
289
|
-
List all export jobs for a given requestor's organization`).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(`status`,{type:`string`,description:`Filter on export job's status`,choices:[`Pending`,`Success`,`Failure`,`Rescheduled`,`In-Progress`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const uo={command:`list`,describe:`List all export jobs`,builder:lo,handler:async e=>u({command:`zero-trust casb exports list`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],status:e.status};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb exports list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/exports`,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(co,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},fo={command:`exports`,describe:`Operations for casb.exports`,builder:e=>e.command(so).command(uo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,409:`ConflictError`,422:`UnprocessableEntityError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function po(e){return e.usage(`$0 zero-trust casb finding-types create
|
|
290
|
-
|
|
291
|
-
Create a new custom finding type with policy definition.`).option(`applies-to-all-integrations`,{type:`boolean`,description:`When true, this finding type applies to every current and future integration of the vendor.`}).option(`asset-class`,{type:`string`,description:`Asset class this finding type applies to (PascalCase, e.g. GoogleWorkspaceFile)`}).option(`asset-vendor`,{type:`string`,description:`Vendors whose assets a finding type can evaluate.`,choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`]}).coerce(`asset-vendor`,e=>_(e,`asset-vendor`,`text`)).option(`description`,{type:`string`,description:`Human-readable description of the finding type. Cannot be empty. Maximum 4096 characters.`}).option(`expression`,{type:`string`,description:"Rego expression body for the policy. `package cloudflare.casb.custom` and `import rego.v1` are added automatically. Do not include package or import declarations. This field cannot be changed after creation. Maximum 4096 characters."}).option(`integration-ids`,{type:`string`,array:!0,description:`Required and non-empty when applies_to_all_integrations is false; omit when it is true.`}).option(`name`,{type:`string`,description:`Human-readable name for the finding type. Maximum 256 characters.`}).option(`severity`,{type:`string`,description:`The severity level of a finding.`,choices:[`Critical`,`High`,`Medium`,`Low`]}).coerce(`severity`,e=>_(e,`severity`,`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 mo={command:`create`,describe:`Create a custom finding type`,builder:po,handler:async e=>u({command:`zero-trust casb finding-types create`,classification:{safeFlags:[`applies-to-all-integrations`,`asset-vendor`,`severity`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb finding-types create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/finding_types`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({applies_to_all_integrations:e[`applies-to-all-integrations`],asset_class:_(e[`asset-class`],`asset-class`,`text`),asset_vendor:e[`asset-vendor`],description:_(e.description,`description`,`text`),expression:_(e.expression,`expression`,`text`),integration_ids:e[`integration-ids`],name:_(e.name,`name`,`text`),severity:e.severity}):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(J,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`applies-to-all-integrations`]===void 0)throw Error(`--applies-to-all-integrations is required (or pass --body with this field set).`);e[`asset-class`]===void 0&&(e[`asset-class`]=await y(`asset-class`,`Asset class this finding type applies to (PascalCase, e.g. GoogleWorkspaceFile)`)),e[`asset-vendor`]===void 0&&(e[`asset-vendor`]=await b(`asset-vendor`,`Vendors whose assets a finding type can evaluate.`,[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`])),e.description===void 0&&(e.description=await y(`description`,`Human-readable description of the finding type. Cannot be empty. Maximum 4096 characters.`)),e.expression===void 0&&(e.expression=await y(`expression`,"Rego expression body for the policy. `package cloudflare.casb.custom` and `import rego.v1` are added automatically. Do not include package or import declarations. This field cannot be changed after creation. Maximum 4096 characters.")),e.name===void 0&&(e.name=await y(`name`,`Human-readable name for the finding type. Maximum 256 characters.`)),e.severity===void 0&&(e.severity=await b(`severity`,`The severity level of a finding.`,[`Critical`,`High`,`Medium`,`Low`]));let u=g({applies_to_all_integrations:e[`applies-to-all-integrations`],asset_class:_(e[`asset-class`],`asset-class`,`text`),asset_vendor:e[`asset-vendor`],description:_(e.description,`description`,`text`),expression:_(e.expression,`expression`,`text`),integration_ids:e[`integration-ids`],name:_(e.name,`name`,`text`),severity:e.severity}),d=await l(`Creating`,async()=>n.send(J,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var ho={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types/${t.finding_type_id}`,response:!1,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,409:`ConflictError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function go(e){return e.usage(`$0 zero-trust casb finding-types delete <finding-type-id>
|
|
292
|
-
|
|
293
|
-
Delete an existing custom finding type. **Security**: Only custom finding types (not system-managed) can be deleted.`).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}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _o={command:`delete <finding-type-id>`,describe:`Delete a custom finding type`,builder:go,handler:async e=>u({command:`zero-trust casb finding-types 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 casb finding-types delete`,method:`DELETE`,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();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(ho,{account_id:a,finding_type_id:e[`finding-type-id`]}));s(u,{successLabel:`Deleted`})})};var vo={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types/${t.finding_type_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function yo(e){return e.usage(`$0 zero-trust casb finding-types get <finding-type-id>
|
|
294
|
-
|
|
295
|
-
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
|
|
296
|
-
|
|
297
|
-
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'.
|
|
298
|
-
Name and vendor sorting is case-insensitive; vendor uses friendly provider names.
|
|
299
|
-
Ascending order: type Content then Posture; origin custom then system;
|
|
300
|
-
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'.
|
|
301
|
-
Ties are resolved by case-insensitive name, then ID, both ascending regardless of direction.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Co={command:`list`,describe:`List all finding types`,builder:So,handler:async e=>u({command:`zero-trust casb finding-types list`,classification:{safeFlags:[`quarantined`,`order`,`direction`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],vendors:e.vendors,types:e.types,origins:e.origins,severities:e.severities,search:e.search,quarantined:e.quarantined,min_updated_at:e[`min-updated-at`],max_updated_at:e[`max-updated-at`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb finding-types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/finding_types`,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(xo,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var wo={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types/${t.finding_type_id}/remediation_types`,query:[`integration_id`,`cursor`,`page`,`per_page`],errors:{400:`BadRequestError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function To(e){return e.usage("$0 zero-trust casb finding-types remediation-types list\n\nList all remediation types for a given finding type. This endpoint supports both cursor and offset pagination. Note that `cursor` and `page` are mutually exclusive.").option(`finding-type-id`,{type:`string`,description:`A UUID string identifying the finding type.`,demandOption:!0}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).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(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Eo={command:`list`,describe:`List remediation types for a finding type`,builder:To,handler:async e=>u({command:`zero-trust casb finding-types remediation-types list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={integration_id:e[`integration-id`],cursor:e.cursor,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await i();c({command:`cf zero-trust casb finding-types remediation-types list`,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`]))}/remediation_types`,pathParams:{"finding-type-id":String(e[`finding-type-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(wo,{account_id:u,finding_type_id:e[`finding-type-id`],...n}));s(d,{successLabel:`Loaded`})})},Do={command:`remediation-types`,describe:`Operations for casb.finding-types.remediation-types`,builder:e=>e.command(Eo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`PUT`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types/${t.finding_type_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,422:`UnprocessableEntityError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function Oo(e){return e.usage(`$0 zero-trust casb finding-types update <finding-type-id>
|
|
302
|
-
|
|
303
|
-
Update an existing custom finding type. **Immutable fields**: asset_vendor, asset_class, expression, and category cannot be changed after creation. **Security**: Only custom finding types (not system-managed) can be updated.`).positional(`finding-type-id`,{type:`string`,description:`A UUID string identifying the finding type.`,demandOption:!0}).option(`applies-to-all-integrations`,{type:`boolean`,description:`When true, this finding type applies to every current and future integration of the vendor.`}).option(`description`,{type:`string`,description:`Optional description of the finding type. Cannot be empty if provided. Maximum 4096 characters.`}).option(`integration-ids`,{type:`string`,array:!0,description:`Required and non-empty when applies_to_all_integrations is false; omit when it is true.`}).option(`name`,{type:`string`,description:`Human-readable name for the finding type. Cannot be empty if provided. Maximum 256 characters.`}).option(`severity`,{type:`string`,description:`The severity level of a finding.`,choices:[`Critical`,`High`,`Medium`,`Low`]}).coerce(`severity`,e=>_(e,`severity`,`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 ko={command:`update <finding-type-id>`,describe:`Update a custom finding type`,builder:Oo,handler:async e=>u({command:`zero-trust casb finding-types update`,classification:{safeFlags:[`applies-to-all-integrations`,`severity`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb finding-types update`,method:`PUT`,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:`json`,body:e.body===void 0?g({applies_to_all_integrations:e[`applies-to-all-integrations`],description:_(e.description,`description`,`text`),integration_ids:e[`integration-ids`],name:_(e.name,`name`,`text`),severity:e.severity}):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(Y,{body:t,account_id:a,finding_type_id:e[`finding-type-id`]}));s(r,{successLabel:`Updated`});return}if(e[`applies-to-all-integrations`]===void 0)throw Error(`--applies-to-all-integrations is required (or pass --body with this field set).`);let u=g({applies_to_all_integrations:e[`applies-to-all-integrations`],description:_(e.description,`description`,`text`),integration_ids:e[`integration-ids`],name:_(e.name,`name`,`text`),severity:e.severity}),d=await l(`Updating`,async()=>n.send(Y,{body:u,account_id:a,finding_type_id:e[`finding-type-id`]}));s(d,{successLabel:`Updated`})})};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/finding_types/validate`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function Ao(e){return e.usage("$0 zero-trust casb finding-types validate\n\nCheck a candidate custom finding type without creating it, so problems can be corrected before publishing. The request body is the same shape as `CreateFindingType`, and the candidate is checked against the same rules, so a valid result means the definition itself is sound. It is not a reservation: a create can still be rejected for a reason that does not belong to the definition, such as the account already holding the maximum number of custom finding types. A candidate that fails validation is still a **200** with `result.valid: false` and one entry in `result.errors` per problem — that is the answer this endpoint exists to give. `4xx` is reserved for a request that could not be processed at all, such as a body that will not parse.").option(`applies-to-all-integrations`,{type:`boolean`,description:`When true, this finding type applies to every current and future integration of the vendor.`}).option(`asset-class`,{type:`string`,description:`Asset class this finding type applies to (PascalCase, e.g. GoogleWorkspaceFile)`}).option(`asset-vendor`,{type:`string`,description:`Vendors whose assets a finding type can evaluate.`,choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`]}).coerce(`asset-vendor`,e=>_(e,`asset-vendor`,`text`)).option(`description`,{type:`string`,description:`Human-readable description of the finding type. Cannot be empty. Maximum 4096 characters.`}).option(`expression`,{type:`string`,description:"Rego expression body for the policy. `package cloudflare.casb.custom` and `import rego.v1` are added automatically. Do not include package or import declarations. This field cannot be changed after creation. Maximum 4096 characters."}).option(`integration-ids`,{type:`string`,array:!0,description:`Required and non-empty when applies_to_all_integrations is false; omit when it is true.`}).option(`name`,{type:`string`,description:`Human-readable name for the finding type. Maximum 256 characters.`}).option(`severity`,{type:`string`,description:`The severity level of a finding.`,choices:[`Critical`,`High`,`Medium`,`Low`]}).coerce(`severity`,e=>_(e,`severity`,`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 jo={command:`validate`,describe:`Validate a custom finding type`,builder:Ao,handler:async e=>u({command:`zero-trust casb finding-types validate`,classification:{safeFlags:[`applies-to-all-integrations`,`asset-vendor`,`severity`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb finding-types validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/finding_types/validate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({applies_to_all_integrations:e[`applies-to-all-integrations`],asset_class:_(e[`asset-class`],`asset-class`,`text`),asset_vendor:e[`asset-vendor`],description:_(e.description,`description`,`text`),expression:_(e.expression,`expression`,`text`),integration_ids:e[`integration-ids`],name:_(e.name,`name`,`text`),severity:e.severity}):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(`Validating`,async()=>n.send(X,{body:t,account_id:a}));s(r,{successLabel:`Validated`});return}if(e[`applies-to-all-integrations`]===void 0)throw Error(`--applies-to-all-integrations is required (or pass --body with this field set).`);e[`asset-class`]===void 0&&(e[`asset-class`]=await y(`asset-class`,`Asset class this finding type applies to (PascalCase, e.g. GoogleWorkspaceFile)`)),e[`asset-vendor`]===void 0&&(e[`asset-vendor`]=await b(`asset-vendor`,`Vendors whose assets a finding type can evaluate.`,[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`])),e.description===void 0&&(e.description=await y(`description`,`Human-readable description of the finding type. Cannot be empty. Maximum 4096 characters.`)),e.expression===void 0&&(e.expression=await y(`expression`,"Rego expression body for the policy. `package cloudflare.casb.custom` and `import rego.v1` are added automatically. Do not include package or import declarations. This field cannot be changed after creation. Maximum 4096 characters.")),e.name===void 0&&(e.name=await y(`name`,`Human-readable name for the finding type. Maximum 256 characters.`)),e.severity===void 0&&(e.severity=await b(`severity`,`The severity level of a finding.`,[`Critical`,`High`,`Medium`,`Low`]));let u=g({applies_to_all_integrations:e[`applies-to-all-integrations`],asset_class:_(e[`asset-class`],`asset-class`,`text`),asset_vendor:e[`asset-vendor`],description:_(e.description,`description`,`text`),expression:_(e.expression,`expression`,`text`),integration_ids:e[`integration-ids`],name:_(e.name,`name`,`text`),severity:e.severity}),d=await l(`Validating`,async()=>n.send(X,{body:u,account_id:a}));s(d,{successLabel:`Validated`})})},Mo={command:`finding-types`,describe:`Operations for casb.finding-types`,builder:e=>e.command(mo).command(_o).command(bo).command(Co).command(ko).command(jo).command(Do).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/export`,body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function No(e){return e.usage(`$0 zero-trust casb findings export
|
|
304
|
-
|
|
305
|
-
Creates a CSV export for findings and accepts optional filters in the payload.`).option(`ignored`,{type:`boolean`,description:`Filter for only the ignored findings. Set to false to only see active items.`}).option(`integration-id`,{type:`string`,array:!0,description:`Filter by multiple integration IDs.`}).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(`orders`,{type:`string`,description:`Which fields to use when ordering the findings. Provide as a JSON array of objects or @path/to/file.json.`}).option(`product`,{type:`string`,description:`Filter by finding's category product.`,choices:[`SaaS`,`Cloud`]}).coerce(`product`,e=>_(e,`product`,`text`)).option(`search`,{type:`string`,description:`A search term.`}).option(`severities`,{type:`string`,array:!0,description:`Filter by severity levels.`}).option(`vendors`,{type:`string`,array:!0,description:`Filter by vendor types.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter specification for findings export jobs.`})}const Po={command:`export`,describe:`Create new findings export request`,builder:No,handler:async e=>u({command:`zero-trust casb findings export`,classification:{safeFlags:[`ignored`,`product`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings export`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/export`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({ignored:e.ignored,integration_id:e[`integration-id`],max_affliction_date:_(e[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:_(e[`min-affliction-date`],`min-affliction-date`,`text`),orders:d(e.orders,`orders`),product:e.product,search:_(e.search,`search`,`text`),severities:e.severities,vendors:e.vendors}):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(Z,{body:t,account_id:a}));s(r,{successLabel:`Loaded`});return}let u=g({ignored:e.ignored,integration_id:e[`integration-id`],max_affliction_date:_(e[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:_(e[`min-affliction-date`],`min-affliction-date`,`text`),orders:d(e.orders,`orders`),product:e.product,search:_(e.search,`search`,`text`),severities:e.severities,vendors:e.vendors}),p=await l(`Loading`,async()=>n.send(Z,{body:u,account_id:a}));s(p,{successLabel:`Loaded`})})};var Fo={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Io(e){return e.usage(`$0 zero-trust casb findings get <finding-id>
|
|
306
|
-
|
|
307
|
-
Gets a security Finding that has been identified as being problematic.`).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(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Lo={command:`get <finding-id>`,describe:`Get a posture finding`,builder:Io,handler:async e=>u({command:`zero-trust casb findings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings 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`]))}`,pathParams:{"finding-id":String(e[`finding-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(Fo,{account_id:a,finding_id:e[`finding-id`]}));s(u,{successLabel:`Loaded`})})};var Q={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/ignore`,body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function Ro(e){return e.usage(`$0 zero-trust casb findings ignore
|
|
308
|
-
|
|
309
|
-
Given a list of findings, mark as ignored. Does nothing if Finding is already ignored.`).option(`checks`,{type:`string`,array:!0,description:`A list of finding 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 findings.`})}const zo={command:`ignore`,describe:`Mark a finding as ignored`,builder:Ro,handler:async e=>u({command:`zero-trust casb findings ignore`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings ignore`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/ignore`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({checks:e.checks}):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(Q,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.checks===void 0)throw Error(`--checks is required (or pass --body with this field set).`);let u=g({checks:e.checks}),d=await l(`Creating`,async()=>n.send(Q,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Bo={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}/instances/archive`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Vo(e){return e.usage(`$0 zero-trust casb findings instances archive <finding-id>
|
|
310
|
-
|
|
311
|
-
Archive 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 Ho={command:`archive <finding-id>`,describe:`Archive a finding`,builder:Vo,handler:async e=>u({command:`zero-trust casb findings instances archive`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings instances archive`,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/archive`,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(Bo,{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(Bo,{body:u,account_id:a,finding_id:e[`finding-id`]}));s(d,{successLabel:`Created`})})};function Uo(e){return e.usage("$0 zero-trust casb findings instances export <finding-namespace-id>\n\nCreates a CSV export for Finding instances and accepts optional filters in the payload. Identify the finding as `<integration_id>-<finding_type_id>`: join the `integration.id` and `finding.id` of the finding (from the List posture findings response) with a hyphen.").positional(`finding-namespace-id`,{type:`string`,description:"Identifies the finding whose instances to export, in the form `<integration_id>-<finding_type_id>`. Take `integration.id` and `finding.id` from the finding in the List posture findings response and join them with a hyphen.",demandOption:!0}).option(`archived`,{type:`boolean`,description:`Filter for archived status.`}).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(`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(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter specification for finding instance exports.`})}const Wo={command:`export <finding-namespace-id>`,describe:`Create a finding instances export`,builder:Uo,handler:async e=>u({command:`zero-trust casb findings instances export`,classification:{safeFlags:[`archived`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings instances export`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/${e[`finding-namespace-id`]==null?`<finding-namespace-id>`:encodeURIComponent(String(e[`finding-namespace-id`]))}/instances/export`,pathParams:{"finding-namespace-id":String(e[`finding-namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({archived:e.archived,max_affliction_date:_(e[`max-affliction-date`],`max-affliction-date`,`text`),min_affliction_date:_(e[`min-affliction-date`],`min-affliction-date`,`text`),orders:d(e.orders,`orders`),search:_(e.search,`search`,`text`)}):f(e.body)});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.body){let t=f(e.body),r=await l(`Loading`,async()=>n(a,`POST`,`/accounts/${u}/data-security/posture/findings/${encodeURIComponent(String(e[`finding-namespace-id`]))}/instances/export`,{body:t}));s(r,{successLabel:`Loaded`});return}let p={};e.archived!==void 0&&h(p,[`archived`],e.archived),e[`max-affliction-date`]!==void 0&&h(p,[`max_affliction_date`],_(e[`max-affliction-date`],`max-affliction-date`,`text`)),e[`min-affliction-date`]!==void 0&&h(p,[`min_affliction_date`],_(e[`min-affliction-date`],`min-affliction-date`,`text`)),e.orders!==void 0&&h(p,[`orders`],d(e.orders,`orders`)),e.search!==void 0&&h(p,[`search`],_(e.search,`search`,`text`));let m=await l(`Loading`,async()=>n(a,`POST`,`/accounts/${u}/data-security/posture/findings/${encodeURIComponent(String(e[`finding-namespace-id`]))}/instances/export`,{body:p}));s(m,{successLabel:`Loaded`})})};var Go={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}/instances/${t.instance_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Ko(e){return e.usage(`$0 zero-trust casb findings instances get <instance-id>
|
|
312
|
-
|
|
313
|
-
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 qo={command:`get <instance-id>`,describe:`Get a finding instance using an instance ID`,builder:Ko,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(Go,{account_id:a,finding_id:e[`finding-id`],instance_id:e[`instance-id`]}));s(u,{successLabel:`Loaded`})})};var Jo={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 Yo(e){return e.usage(`$0 zero-trust casb findings instances list
|
|
314
|
-
|
|
315
|
-
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.
|
|
316
|
-
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.
|
|
317
|
-
Use 'none' to filter instances with no remediation jobs or instances where the most recent job is stale.
|
|
318
|
-
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 Xo={command:`list`,describe:`List instances of a finding`,builder:Yo,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(Jo,{account_id:u,finding_id:e[`finding-id`],...n}));s(d,{successLabel:`Loaded`})})};var Zo={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 Qo(e){return e.usage(`$0 zero-trust casb findings instances unarchive <finding-id>
|
|
319
|
-
|
|
320
|
-
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 $o={command:`unarchive <finding-id>`,describe:`Remove the archive marking from a finding instance`,builder:Qo,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(Zo,{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(Zo,{body:u,account_id:a,finding_id:e[`finding-id`]}));s(d,{successLabel:`Created`})})},es={command:`instances`,describe:`Operations for casb.findings.instances`,builder:e=>e.command(Ho).command(Wo).command(qo).command(Xo).command($o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ts={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 ns(e){return e.usage(`$0 zero-trust casb findings list
|
|
321
|
-
|
|
322
|
-
List all security findings that have been identified as being problematic. This will return a list of findings regardless if they have been ignored or not.`).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(`ignored`,{type:`boolean`,description:`Filter for only the ignored findings. Set to false to only see "active" items`}).option(`integration-id`,{type:`string`,description:`Filter by an integration ID`}).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(`observation`,{type:`string`,description:`Filter by observation type of the finding`,choices:[`Activity`,`Insight`,`Issue`]}).option(`order`,{type:`string`,description:`Which field to use when ordering the findings.`,choices:[`finding.name`,`instance_count`,`integration.name`,`latest_affliction_date`,`severity`]}).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(`product`,{type:`string`,description:`Filter by product category of the finding`,choices:[`Cloud`,`Saas`]}).option(`search`,{type:`string`,description:`A search term.`}).option(`severity`,{type:`string`,description:`Filter by severity`,choices:[`Critical`,`High`,`Medium`,`Low`]}).option(`type`,{type:`string`,description:`Filter by type of the finding`,choices:[`Content`,`Posture`]}).option(`vendor`,{type:`string`,description:`Filter by vendor`,choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT`,`MICROSOFT_INTERNAL`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`]}).option(`finding-type-ids`,{type:`string`,description:`A comma separated list of UUIDs identifying the finding type(s).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rs={command:`list`,describe:`List posture findings`,builder:ns,handler:async e=>u({command:`zero-trust casb findings list`,classification:{safeFlags:[`direction`,`ignored`,`observation`,`order`,`product`,`severity`,`type`,`vendor`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,direction:e.direction,ignored:e.ignored,integration_id:e[`integration-id`],max_affliction_date:e[`max-affliction-date`],min_affliction_date:e[`min-affliction-date`],observation:e.observation,order:e.order,page:e.page,per_page:e[`per-page`],product:e.product,search:e.search,severity:e.severity,type:e.type,vendor:e.vendor,finding_type_ids:e[`finding-type-ids`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb findings list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/findings`,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(ts,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var is={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}/reset_finding_severity`,errors:{400:`BadRequestError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function as(e){return e.usage(`$0 zero-trust casb findings reset-severity <finding-id>
|
|
323
|
-
|
|
324
|
-
If a Finding's severity has been changed, reset it back to default value. Does nothing if no override exists.`).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(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const os={command:`reset-severity <finding-id>`,describe:`Reset severity for a finding back to the default`,builder:as,handler:async e=>u({command:`zero-trust casb findings reset-severity`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings reset-severity`,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`]))}/reset_finding_severity`,pathParams:{"finding-id":String(e[`finding-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(is,{account_id:a,finding_id:e[`finding-id`]}));s(u,{successLabel:`Created`})})};var ss={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/${t.finding_id}/tune_finding_severity`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function cs(e){return e.usage(`$0 zero-trust casb findings tune-severity <finding-id>
|
|
325
|
-
|
|
326
|
-
Update the severity of a Finding. This will update the \`severity_override\` field on the Finding payload with the new severity value.`).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(`new-severity`,{type:`number`,description:`The numeric severity value to apply to the finding.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating a finding's severity.`})}const ls={command:`tune-severity <finding-id>`,describe:`Update the severity for a finding`,builder:cs,handler:async e=>u({command:`zero-trust casb findings tune-severity`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings tune-severity`,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`]))}/tune_finding_severity`,pathParams:{"finding-id":String(e[`finding-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({new_severity:e[`new-severity`]}):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(ss,{body:t,account_id:a,finding_id:e[`finding-id`]}));s(r,{successLabel:`Created`});return}if(e[`new-severity`]===void 0)throw Error(`--new-severity is required (or pass --body with this field set).`);let u=g({new_severity:e[`new-severity`]}),d=await l(`Creating`,async()=>n.send(ss,{body:u,account_id:a,finding_id:e[`finding-id`]}));s(d,{successLabel:`Created`})})};var us={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/findings/unignore`,body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function ds(e){return e.usage(`$0 zero-trust casb findings unignore
|
|
327
|
-
|
|
328
|
-
Ability to un-ignore a Finding if it's previously been ignored. Does nothing if the Finding is not ignored.`).option(`checks`,{type:`string`,array:!0,description:`A list of finding 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 findings.`})}const fs={command:`unignore`,describe:`Remove ignore marker from a finding`,builder:ds,handler:async e=>u({command:`zero-trust casb findings unignore`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb findings unignore`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/findings/unignore`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({checks:e.checks}):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(us,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.checks===void 0)throw Error(`--checks is required (or pass --body with this field set).`);let u=g({checks:e.checks}),d=await l(`Creating`,async()=>n.send(us,{body:u,account_id:a}));s(d,{successLabel:`Created`})})},ps={command:`findings`,describe:`Operations for casb.findings`,builder:e=>e.command(Po).command(Lo).command(zo).command(rs).command(os).command(ls).command(fs).command(es).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ms(e){return e.usage(`$0 zero-trust casb integrations create
|
|
329
|
-
|
|
330
|
-
Creates a new integration for the specified application. Integration creation with OAuth is not supported by API at the moment. For other auth methods, use \`GET /v2/applications/{application_id}/credential-guide\` to see the required credential structure and example payloads for each vendor.`).option(`application`,{type:`string`,description:"Vendor/application slug (e.g., GOOGLE_WORKSPACE).\n\n* `ANTHROPIC` - ANTHROPIC\n* `AWS` - AWS\n* `BITBUCKET` - BITBUCKET\n* `BOX` - BOX\n* `CONFLUENCE` - CONFLUENCE\n* `DROPBOX` - DROPBOX\n* `GITHUB` - GITHUB\n* `GOOGLE_CLOUD_PLATFORM` - GOOGLE_CLOUD_PLATFORM\n* `GOOGLE_WORKSPACE` - GOOGLE_WORKSPACE\n* `JIRA` - JIRA\n* `MICROSOFT_INTERNAL` - MICROSOFT_INTERNAL\n* `OPENAI` - OPENAI\n* `SALESFORCE` - SALESFORCE\n* `SERVICENOW` - SERVICENOW\n* `SLACK` - SLACK\n* `ZOOM` - ZOOM",choices:[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT_INTERNAL`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`]}).coerce(`application`,e=>_(e,`application`,`text`)).option(`auth-method`,{type:`string`,description:`Authentication method slug (uses default if omitted).`}).option(`credentials`,{type:`string`,description:`Credentials for the integration. Provide as a JSON object or @path/to/file.json.`}).option(`dlp-profiles`,{type:`string`,array:!0,description:`List of DLP profile IDs to associate.`}).option(`name`,{type:`string`,description:`Name of the integration.`}).option(`permissions`,{type:`string`,array:!0,description:`List of permission scopes (uses policy defaults if empty).`}).option(`use-cases`,{type:`string`,array:!0,description:`List of use case or feature slugs to enroll. At least one use case (casb, ces) is required; auto_remediation may be added alongside casb (e.g., ['casb', 'ces', 'auto_remediation']).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Serializer for v2 integration create requests.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const hs={command:`create`,describe:`Create integration`,builder:ms,handler:async e=>u({command:`zero-trust casb integrations create`,classification:{safeFlags:[`application`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb integrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/one/integrations`,pathParams:{},bodyKind:e.file===void 0?`json`:`octet-stream`,body:e.file===void 0?e.body===void 0?g({application:e.application,auth_method:_(e[`auth-method`],`auth-method`,`text`),credentials:m(e.credentials,`credentials`,!0),dlp_profiles:e[`dlp-profiles`],name:_(e.name,`name`,`text`),permissions:e.permissions,use_cases:e[`use-cases`]},[[`credentials`]]):f(e.body,[{path:[`credentials`],flag:`credentials`}]):{file:e.file}});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file){let t=v(e.file),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/one/integrations`,{body:t,headers:{"Content-Type":`text/plain;charset=UTF-8`}}));s(r,{successLabel:`Created`});return}if(e.body){let t=f(e.body,[{path:[`credentials`],flag:`credentials`}]),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/one/integrations`,{body:t}));s(r,{successLabel:`Created`});return}if(e.application===void 0&&(e.application=await b(`application`,"Vendor/application slug (e.g., GOOGLE_WORKSPACE). * `ANTHROPIC` - ANTHROPIC * `AWS` - AWS * `BITBUCKET` - BITBUCKET * `BOX` - BOX * `CONFLUENCE` - CONFLUENCE * `DROPBOX` - DROPBOX * `GITHUB` - GITHUB * `GOOGLE_CLOUD_PLATFORM` - GOOGLE_CLOUD_PLATFORM * `GOOGLE_WORKSPACE` - GOOGLE_WORKSPACE * `JIRA` - JIRA * `MICROSOFT_INTERNAL` - MICROSOFT_INTERNAL * `OPENAI` - OPENAI * `SALESFORCE` - SALESFORCE * `SERVICENOW` - SERVICENOW * `SLACK` - SLACK * `ZOOM` - ZOOM",[`ANTHROPIC`,`AWS`,`BITBUCKET`,`BOX`,`CONFLUENCE`,`DROPBOX`,`GITHUB`,`GOOGLE_CLOUD_PLATFORM`,`GOOGLE_WORKSPACE`,`JIRA`,`MICROSOFT_INTERNAL`,`OPENAI`,`SALESFORCE`,`SERVICENOW`,`SLACK`,`ZOOM`])),e.credentials===void 0)throw Error(`--credentials is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await y(`name`,`Name of the integration.`)),e[`use-cases`]===void 0)throw Error(`--use-cases is required (or pass --body with this field set).`);let d={};e.application!==void 0&&h(d,[`application`],e.application),e[`auth-method`]!==void 0&&h(d,[`auth_method`],_(e[`auth-method`],`auth-method`,`text`)),e.credentials!==void 0&&h(d,[`credentials`],m(e.credentials,`credentials`,!0)),e[`dlp-profiles`]!==void 0&&h(d,[`dlp_profiles`],e[`dlp-profiles`]),e.name!==void 0&&h(d,[`name`],_(e.name,`name`,`text`)),e.permissions!==void 0&&h(d,[`permissions`],e.permissions),e[`use-cases`]!==void 0&&h(d,[`use_cases`],e[`use-cases`]);let p=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/one/integrations`,{body:d}));s(p,{successLabel:`Created`})})};var gs={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/one/integrations/${t.id}`,response:!1,errors:{400:`BadRequestError`}};function _s(e){return e.usage(`$0 zero-trust casb integrations delete <id>
|
|
331
|
-
|
|
332
|
-
Delete an integration by soft-deleting it.`).positional(`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 vs={command:`delete <id>`,describe:`Delete integration`,builder:_s,handler:async e=>u({command:`zero-trust casb 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 casb integrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/one/integrations/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.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(gs,{account_id:a,id:e.id}));s(u,{successLabel:`Deleted`})})};var ys={method:`GET`,path:t=>e`/accounts/${t.account_id}/one/integrations/${t.id}`,errors:{404:`NotFoundError`}};function bs(e){return e.usage(`$0 zero-trust casb integrations get <id>
|
|
333
|
-
|
|
334
|
-
Returns full integration details including use cases and permissions.`).positional(`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 xs={command:`get <id>`,describe:`Get integration details`,builder:bs,handler:async e=>u({command:`zero-trust casb integrations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb integrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/one/integrations/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.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(ys,{account_id:a,id:e.id}));s(u,{successLabel:`Loaded`})})};var Ss={method:`GET`,path:t=>e`/accounts/${t.account_id}/one/integrations`,query:[`application`,`direction`,`dlp_enabled`,`order`,`page`,`page_size`,`search`,`status`,`use_cases`],errors:{400:`BadRequestError`}};function Cs(e){return e.usage(`$0 zero-trust casb integrations list
|
|
335
|
-
|
|
336
|
-
Returns a paginated list of integrations for the account.`).option(`application`,{type:`string`,description:`Filter by application/vendor (e.g., GOOGLE_WORKSPACE, MICROSOFT_INTERNAL).`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dlp-enabled`,{type:`boolean`,description:`Filter by DLP enabled status (true/false).`}).option(`order`,{type:`string`,description:`Field to order results by.`,choices:[`application`,`created`,`name`,`status`]}).option(`page`,{type:`number`,description:`Page number within the paginated result set.`}).option(`page-size`,{type:`number`,description:`Number of results per page.`}).option(`search`,{type:`string`,description:`Search integrations by name or application.`}).option(`status`,{type:`string`,description:`Filter by integration status.`,choices:[`Healthy`,`Initializing`,`Offline`,`Unhealthy`]}).option(`use-cases`,{type:`string`,description:`Filter by enabled use cases (e.g., casb, ces). Matches integrations enrolled in any of the specified values. Can be specified multiple times.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ws={command:`list`,describe:`List integrations`,builder:Cs,handler:async e=>u({command:`zero-trust casb integrations list`,classification:{safeFlags:[`direction`,`dlp-enabled`,`order`,`status`,`dry-run`]}},e,async()=>{let n={application:e.application,direction:e.direction,dlp_enabled:e[`dlp-enabled`],order:e.order,page:e.page,page_size:e[`page-size`],search:e.search,status:e.status,use_cases:e[`use-cases`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb integrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/one/integrations`,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(Ss,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Ts={method:`POST`,path:t=>e`/accounts/${t.account_id}/one/integrations/${t.id}/pause`,errors:{400:`BadRequestError`}};function Es(e){return e.usage(`$0 zero-trust casb integrations pause <id>
|
|
337
|
-
|
|
338
|
-
Pauses an integration, stopping all crawlers.`).positional(`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 Ds={command:`pause <id>`,describe:`Pause integration`,builder:Es,handler:async e=>u({command:`zero-trust casb integrations pause`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb integrations pause`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/one/integrations/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/pause`,pathParams:{id:String(e.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(Ts,{account_id:a,id:e.id}));s(u,{successLabel:`Created`})})};var Os={method:`POST`,path:t=>e`/accounts/${t.account_id}/one/integrations/${t.id}/resume`,errors:{400:`BadRequestError`}};function ks(e){return e.usage(`$0 zero-trust casb integrations resume <id>
|
|
339
|
-
|
|
340
|
-
Resumes a paused integration, restarting crawlers.`).positional(`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 As={command:`resume <id>`,describe:`Resume integration`,builder:ks,handler:async e=>u({command:`zero-trust casb integrations resume`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb integrations resume`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/one/integrations/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/resume`,pathParams:{id:String(e.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(Os,{account_id:a,id:e.id}));s(u,{successLabel:`Created`})})};function js(e){return e.usage(`$0 zero-trust casb integrations update <id>
|
|
341
|
-
|
|
342
|
-
Updates an integration's name, permissions, DLP profiles, use cases, or credentials.`).positional(`id`,{type:`string`,description:`Integration ID.`,demandOption:!0}).option(`credentials`,{type:`string`,description:`Partial credential fields to merge with existing. Provide as a JSON object or @path/to/file.json.`}).option(`dlp-profiles`,{type:`string`,array:!0,description:`List of DLP profile IDs to associate with the integration.`}).option(`name`,{type:`string`,description:`Name of the integration.`}).option(`permissions`,{type:`string`,array:!0,description:`List of permission scopes granted to the integration.`}).option(`use-cases`,{type:`string`,array:!0,description:`List of use case or feature slugs to enroll (e.g., ['casb', 'ces', 'auto_remediation']).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Serializer for v2 integration PATCH requests.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const Ms={command:`update <id>`,describe:`Update integration`,builder:js,handler:async e=>u({command:`zero-trust casb integrations update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb integrations update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/one/integrations/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:e.file===void 0?`json`:`octet-stream`,body:e.file===void 0?e.body===void 0?g({credentials:m(e.credentials,`credentials`),dlp_profiles:e[`dlp-profiles`],name:_(e.name,`name`,`text`),permissions:e.permissions,use_cases:e[`use-cases`]},[[`credentials`]]):f(e.body):{file:e.file}});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file){let t=v(e.file),r=await l(`Updating`,async()=>n(a,`PATCH`,`/accounts/${u}/one/integrations/${encodeURIComponent(String(e.id))}`,{body:t,headers:{"Content-Type":`text/plain;charset=UTF-8`}}));s(r,{successLabel:`Updated`});return}if(e.body){let t=f(e.body),r=await l(`Updating`,async()=>n(a,`PATCH`,`/accounts/${u}/one/integrations/${encodeURIComponent(String(e.id))}`,{body:t}));s(r,{successLabel:`Updated`});return}let d={};e.credentials!==void 0&&h(d,[`credentials`],m(e.credentials,`credentials`)),e[`dlp-profiles`]!==void 0&&h(d,[`dlp_profiles`],e[`dlp-profiles`]),e.name!==void 0&&h(d,[`name`],_(e.name,`name`,`text`)),e.permissions!==void 0&&h(d,[`permissions`],e.permissions),e[`use-cases`]!==void 0&&h(d,[`use_cases`],e[`use-cases`]);let p=await l(`Updating`,async()=>n(a,`PATCH`,`/accounts/${u}/one/integrations/${encodeURIComponent(String(e.id))}`,{body:d}));s(p,{successLabel:`Updated`})})},Ns={command:`integrations`,describe:`Operations for casb.integrations`,builder:e=>e.command(hs).command(vs).command(xs).command(ws).command(Ds).command(As).command(Ms).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ps={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/policies`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Fs(e){return e.usage(`$0 zero-trust casb policies create
|
|
343
|
-
|
|
344
|
-
Creates a new policy configuration that defines automated actions to be executed when security findings are detected. A policy can include multiple remediation and/or webhook actions that will be triggered automatically.`).option(`actions-remediation-types`,{type:`string`,description:`Remediation actions to execute (at most one). Provide as a JSON array of objects or @path/to/file.json.`}).option(`actions-webhook-configs`,{type:`string`,description:`Webhook actions to execute. Provide as a JSON array of objects or @path/to/file.json.`}).option(`applies-to-all-integrations`,{type:`boolean`,description:`When true, the policy applies to all integrations for the account. When false, integration_ids must be provided.`}).option(`description`,{type:`string`,description:`Optional description of what this policy does.`}).option(`display-name`,{type:`string`,description:`Display name for the policy configuration.`}).option(`enabled`,{type:`boolean`,description:`Boolean specifying if the policy is enabled or disabled.`}).option(`finding-type-id`,{type:`string`,description:`The finding type this policy is associated with. All remediation actions must match this finding type.`}).option(`integration-ids`,{type:`string`,array:!0,description:`The integrations this policy applies to. Required when applies_to_all_integrations is false.`}).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 policy configuration.`})}const Is={command:`create`,describe:`Create a new policy configuration`,builder:Fs,handler:async e=>u({command:`zero-trust casb policies create`,classification:{safeFlags:[`applies-to-all-integrations`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({actions:{remediation_types:d(e[`actions-remediation-types`],`actions-remediation-types`),webhook_configs:d(e[`actions-webhook-configs`],`actions-webhook-configs`)},applies_to_all_integrations:e[`applies-to-all-integrations`],description:_(e.description,`description`,`text`),display_name:_(e[`display-name`],`display-name`,`text`),enabled:e.enabled,finding_type_id:_(e[`finding-type-id`],`finding-type-id`,`text`),integration_ids:e[`integration-ids`]}):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(Ps,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`applies-to-all-integrations`]===void 0)throw Error(`--applies-to-all-integrations is required (or pass --body with this field set).`);if(e[`display-name`]===void 0&&(e[`display-name`]=await y(`display-name`,`Display name for the policy configuration.`)),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e[`finding-type-id`]===void 0&&(e[`finding-type-id`]=await y(`finding-type-id`,`The finding type this policy is associated with. All remediation actions must match this finding type.`));let u=g({actions:{remediation_types:d(e[`actions-remediation-types`],`actions-remediation-types`),webhook_configs:d(e[`actions-webhook-configs`],`actions-webhook-configs`)},applies_to_all_integrations:e[`applies-to-all-integrations`],description:_(e.description,`description`,`text`),display_name:_(e[`display-name`],`display-name`,`text`),enabled:e.enabled,finding_type_id:_(e[`finding-type-id`],`finding-type-id`,`text`),integration_ids:e[`integration-ids`]}),p=await l(`Creating`,async()=>n.send(Ps,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Ls={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/data-security/posture/policies/${t.policy_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Rs(e){return e.usage(`$0 zero-trust casb policies delete <policy-id>
|
|
345
|
-
|
|
346
|
-
Deletes a policy configuration.`).positional(`policy-id`,{type:`string`,description:`A UUID identifying 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 zs={command:`delete <policy-id>`,describe:`Delete a policy configuration`,builder:Rs,handler:async e=>u({command:`zero-trust casb 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 casb policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/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(Ls,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Deleted`})})};var Bs={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/policies/${t.policy_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Vs(e){return e.usage(`$0 zero-trust casb policies get <policy-id>
|
|
347
|
-
|
|
348
|
-
Retrieves the details of a specific policy configuration, including its associated remediation and webhook actions.`).positional(`policy-id`,{type:`string`,description:`The UUID of the policy configuration to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Hs={command:`get <policy-id>`,describe:`Get a policy configuration by ID`,builder:Vs,handler:async e=>u({command:`zero-trust casb policies get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/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();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Bs,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Loaded`})})};var Us={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/policies`,query:[`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`}};function Ws(e){return e.usage(`$0 zero-trust casb policies list
|
|
349
|
-
|
|
350
|
-
Returns a list of integration-scoped policy configurations for the given account. This endpoint supports cursor based pagination. By default, results are returned in sorted order based on created_at.`).option(`cursor`,{type:`string`,description:"Cursor for pagination. Obtained from the `result_info.cursor` field of a previous response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gs={command:`list`,describe:`List policy configurations`,builder:Ws,handler:async e=>u({command:`zero-trust casb policies list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={cursor:e.cursor};if(e.dryRun){let e=await i();c({command:`cf zero-trust casb policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/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(Us,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Ks={method:`PUT`,path:t=>e`/accounts/${t.account_id}/data-security/posture/policies/${t.policy_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function qs(e){return e.usage(`$0 zero-trust casb policies update <policy-id>
|
|
351
|
-
|
|
352
|
-
Updates an existing policy configuration and replaces its actions.`).positional(`policy-id`,{type:`string`,description:`Policy configuration ID`,demandOption:!0}).option(`actions-remediation-types`,{type:`string`,description:`Remediation actions to execute (at most one). Provide as a JSON array of objects or @path/to/file.json.`}).option(`actions-webhook-configs`,{type:`string`,description:`Webhook actions to execute. Provide as a JSON array of objects or @path/to/file.json.`}).option(`applies-to-all-integrations`,{type:`boolean`,description:`When true, the policy applies to all integrations for the account. When false, integration_ids must be provided.`}).option(`description`,{type:`string`,description:`Optional description of what this policy does.`}).option(`display-name`,{type:`string`,description:`Display name for the policy configuration.`}).option(`enabled`,{type:`boolean`,description:`Boolean specifying if the policy is enabled or disabled.`}).option(`integration-ids`,{type:`string`,array:!0,description:`The integrations this policy applies to. Required when applies_to_all_integrations is false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating an existing policy configuration.`})}const Js={command:`update <policy-id>`,describe:`Update a policy configuration`,builder:qs,handler:async e=>u({command:`zero-trust casb policies update`,classification:{safeFlags:[`applies-to-all-integrations`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/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({actions:{remediation_types:d(e[`actions-remediation-types`],`actions-remediation-types`),webhook_configs:d(e[`actions-webhook-configs`],`actions-webhook-configs`)},applies_to_all_integrations:e[`applies-to-all-integrations`],description:_(e.description,`description`,`text`),display_name:_(e[`display-name`],`display-name`,`text`),enabled:e.enabled,integration_ids:e[`integration-ids`]}):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(Ks,{body:t,account_id:a,policy_id:e[`policy-id`]}));s(r,{successLabel:`Updated`});return}if(e[`applies-to-all-integrations`]===void 0)throw Error(`--applies-to-all-integrations is required (or pass --body with this field set).`);if(e[`display-name`]===void 0&&(e[`display-name`]=await y(`display-name`,`Display name for the policy configuration.`)),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=g({actions:{remediation_types:d(e[`actions-remediation-types`],`actions-remediation-types`),webhook_configs:d(e[`actions-webhook-configs`],`actions-webhook-configs`)},applies_to_all_integrations:e[`applies-to-all-integrations`],description:_(e.description,`description`,`text`),display_name:_(e[`display-name`],`display-name`,`text`),enabled:e.enabled,integration_ids:e[`integration-ids`]}),p=await l(`Updating`,async()=>n.send(Ks,{body:u,account_id:a,policy_id:e[`policy-id`]}));s(p,{successLabel:`Updated`})})},Ys={command:`policies`,describe:`Operations for casb.policies`,builder:e=>e.command(Is).command(zs).command(Hs).command(Gs).command(Js).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Xs={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/remediations/jobs`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`,429:`TooManyRequestsError`}};function Zs(e){return e.usage(`$0 zero-trust casb remediations jobs create
|
|
353
|
-
|
|
354
|
-
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 Qs={command:`create`,describe:`Creates remediation jobs`,builder:Zs,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(Xs,{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(Xs,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var $s={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/remediations/jobs/export`,body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function ec(e){return e.usage(`$0 zero-trust casb remediations jobs export
|
|
355
|
-
|
|
356
|
-
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 tc={command:`export`,describe:`Create a remediation jobs export`,builder:ec,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($s,{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($s,{body:u,account_id:a}));s(p,{successLabel:`Loaded`})})};var nc={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 rc(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 ic={command:`list`,describe:`List remediation jobs`,builder:rc,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(nc,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},ac={command:`jobs`,describe:`Operations for casb.remediations.jobs`,builder:e=>e.command(Qs).command(tc).command(ic).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},oc={command:`remediations`,describe:`Operations for casb.remediations`,builder:e=>e.command(ac).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var sc={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 cc(e){return e.usage(`$0 zero-trust casb webhooks create
|
|
357
|
-
|
|
358
|
-
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 lc={command:`create`,describe:`Create a new webhook configuration`,builder:cc,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(sc,{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(sc,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var uc={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks/${t.webhook_id}`,errors:{400:`BadRequestError`,409:`ConflictError`,429:`TooManyRequestsError`}};function dc(e){return e.usage(`$0 zero-trust casb webhooks delete <webhook-id>
|
|
359
|
-
|
|
360
|
-
Soft deletes a webhook configuration by its unique identifier. The webhook will be marked as deleted and will no longer be available for use.`).positional(`webhook-id`,{type:`string`,description:`A UUID identifying the webhook configuration.`,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 fc={command:`delete <webhook-id>`,describe:`Delete a webhook configuration`,builder:dc,handler:async e=>u({command:`zero-trust casb webhooks 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 casb webhooks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"webhook-id":String(e[`webhook-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,webhook_id:e[`webhook-id`]}));s(u,{successLabel:`Deleted`})})};var pc={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks/${t.webhook_id}/evaluate`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function mc(e){return e.usage(`$0 zero-trust casb webhooks evaluate-existing <webhook-id>
|
|
361
|
-
|
|
362
|
-
Sends a test webhook event using an existing webhook configuration. This allows customers to verify their webhook endpoint is still reachable and properly configured after creating the webhook resource. The test payload includes: - event_type: "webhook.test" - timestamp: Current UTC timestamp - message: Test message indicating this is from Cloudflare CASB - data: Object with test: true`).positional(`webhook-id`,{type:`string`,description:`A UUID identifying the webhook configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const hc={command:`evaluate-existing <webhook-id>`,describe:`Test an existing webhook configuration`,builder:mc,handler:async e=>u({command:`zero-trust casb webhooks evaluate-existing`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb webhooks evaluate-existing`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}/evaluate`,pathParams:{"webhook-id":String(e[`webhook-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(pc,{account_id:a,webhook_id:e[`webhook-id`]}));s(u,{successLabel:`Created`})})};var gc={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks/evaluate`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`}};function _c(e){return e.usage(`$0 zero-trust casb webhooks evaluate
|
|
363
|
-
|
|
364
|
-
Sends a test webhook event to the specified destination URL to verify the webhook endpoint is reachable and properly configured. This allows customers to validate their webhook configuration before creating the actual webhook resource. The test payload includes: - event_type: "webhook.test" - timestamp: Current UTC timestamp - message: Test message indicating this is from Cloudflare CASB - data: Object with test: true`).option(`authentication-type`,{type:`string`,description:`Type of authentication to use for the test webhook request.`,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 to send the test webhook event to.`}).option(`headers`,{type:`string`,description:`List of custom headers to include in the test webhook request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`signing-secret`,{type:`string`,description:`Secret key used for HMAC signing when authentication_type is "HMAC-Signing".`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for testing a webhook configuration before creating it.`})}const vc={command:`evaluate`,describe:`Test a webhook configuration before creating it`,builder:_c,handler:async e=>u({command:`zero-trust casb webhooks evaluate`,classification:{safeFlags:[`authentication-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb webhooks evaluate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks/evaluate`,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`),signing_secret:_(e[`signing-secret`],`signing-secret`,`text`)}):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(gc,{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 to use for the test webhook request.`,[`Basic Auth`,`None`,`Bearer Auth`,`Static Headers`,`HMAC-Signing`])),e[`destination-url`]===void 0&&(e[`destination-url`]=await y(`destination-url`,`Target URL to send the test webhook event to.`));let u=g({authentication_type:e[`authentication-type`],destination_url:_(e[`destination-url`],`destination-url`,`text`),headers:d(e.headers,`headers`),signing_secret:_(e[`signing-secret`],`signing-secret`,`text`)}),p=await l(`Creating`,async()=>n.send(gc,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var yc={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks/${t.webhook_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function bc(e){return e.usage(`$0 zero-trust casb webhooks get <webhook-id>
|
|
365
|
-
|
|
366
|
-
Retrieves a specific webhook configuration by its unique identifier.`).positional(`webhook-id`,{type:`string`,description:`A UUID identifying the webhook configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xc={command:`get <webhook-id>`,describe:`Get webhook configuration by ID`,builder:bc,handler:async e=>u({command:`zero-trust casb webhooks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb webhooks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"webhook-id":String(e[`webhook-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(yc,{account_id:a,webhook_id:e[`webhook-id`]}));s(u,{successLabel:`Loaded`})})};var Sc={method:`POST`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks/jobs`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Cc(e){return e.usage(`$0 zero-trust casb webhooks jobs create
|
|
367
|
-
|
|
368
|
-
Creates webhook jobs to send a finding instance to one or more configured webhooks.`).option(`finding-instance-ids`,{type:`string`,array:!0,description:`Array of finding instance IDs to send to the webhooks.`}).option(`webhook-ids`,{type:`string`,array:!0,description:`Array of webhook IDs to trigger jobs for.`}).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 up to 100 webhook jobs. The number of jobs is the product of webhook_ids and finding_instance_ids.`})}const wc={command:`create`,describe:`Create webhook jobs`,builder:Cc,handler:async e=>u({command:`zero-trust casb webhooks jobs create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb webhooks jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks/jobs`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({finding_instance_ids:e[`finding-instance-ids`],webhook_ids:e[`webhook-ids`]}):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(Sc,{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).`);if(e[`webhook-ids`]===void 0)throw Error(`--webhook-ids is required (or pass --body with this field set).`);let u=g({finding_instance_ids:e[`finding-instance-ids`],webhook_ids:e[`webhook-ids`]}),d=await l(`Creating`,async()=>n.send(Sc,{body:u,account_id:a}));s(d,{successLabel:`Created`})})},Tc={command:`jobs`,describe:`Operations for casb.webhooks.jobs`,builder:e=>e.command(wc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ec={method:`GET`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`}};function Dc(e){return e.usage(`$0 zero-trust casb webhooks list
|
|
369
|
-
|
|
370
|
-
Retrieves all webhook configurations for the authenticated account. Returns an array of webhook configurations that can be used to send finding notifications.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oc={command:`list`,describe:`List webhook configurations`,builder:Dc,handler:async e=>u({command:`zero-trust casb webhooks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust casb webhooks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/data-security/posture/webhooks`,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(Ec,{account_id:a}));s(u,{successLabel:`Loaded`})})};var kc={method:`PUT`,path:t=>e`/accounts/${t.account_id}/data-security/posture/webhooks/${t.webhook_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`}};function Ac(e){return e.usage(`$0 zero-trust casb webhooks update <webhook-id>
|
|
371
|
-
|
|
372
|
-
Updates an existing webhook configuration with new settings.`).positional(`webhook-id`,{type:`string`,description:`A UUID identifying the webhook configuration.`,demandOption:!0}).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.`,choices:[`enabled`,`disabled`]}).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 updating an existing webhook configuration.`})}const jc={command:`update <webhook-id>`,describe:`Update an existing webhook configuration`,builder:Ac,handler:async e=>u({command:`zero-trust casb webhooks update`,classification:{safeFlags:[`authentication-type`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust casb webhooks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/data-security/posture/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"webhook-id":String(e[`webhook-id`]??``)},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(`Updating`,async()=>n.send(kc,{body:t,account_id:a,webhook_id:e[`webhook-id`]}));s(r,{successLabel:`Updated`});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.`)),e.status===void 0&&(e.status=await b(`status`,`Status of the webhook configuration.`,[`enabled`,`disabled`]));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(`Updating`,async()=>n.send(kc,{body:u,account_id:a,webhook_id:e[`webhook-id`]}));s(p,{successLabel:`Updated`})})},Mc={command:`webhooks`,describe:`Operations for casb.webhooks`,builder:e=>e.command(lc).command(fc).command(vc).command(hc).command(xc).command(Oc).command(jc).command(Tc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Nc={command:`casb`,describe:`Operations for casb`,builder:e=>e.command(Ga).command(Qa).command(io).command(fo).command(Mo).command(ps).command(Ns).command(Ys).command(oc).command(Mc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Pc={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/zerotrust/connectivity_settings`,body:`json`};function Fc(e){return e.usage(`$0 zero-trust connectivity-settings edit
|
|
373
|
-
|
|
374
|
-
Updates the Zero Trust Connectivity Settings for the given account.`).option(`icmp-proxy-enabled`,{type:`boolean`,description:`A flag to enable the ICMP proxy for the account network.`}).option(`offramp-warp-enabled`,{type:`boolean`,description:`A flag to enable WARP to WARP traffic.`}).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 Ic={command:`edit`,describe:`Updates the Zero Trust Connectivity Settings`,builder:Fc,handler:async e=>u({command:`zero-trust connectivity-settings edit`,classification:{safeFlags:[`icmp-proxy-enabled`,`offramp-warp-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust connectivity-settings edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zerotrust/connectivity_settings`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({icmp_proxy_enabled:e[`icmp-proxy-enabled`],offramp_warp_enabled:e[`offramp-warp-enabled`]}):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(Pc,{body:t,account_id:a}));s(r,{successLabel:`Updated`});return}let u=g({icmp_proxy_enabled:e[`icmp-proxy-enabled`],offramp_warp_enabled:e[`offramp-warp-enabled`]}),d=await l(`Updating`,async()=>n.send(Pc,{body:u,account_id:a}));s(d,{successLabel:`Updated`})})};var Lc={method:`GET`,path:t=>e`/accounts/${t.account_id}/zerotrust/connectivity_settings`};function Rc(e){return e.usage(`$0 zero-trust connectivity-settings get
|
|
375
|
-
|
|
376
|
-
Gets the Zero Trust Connectivity Settings for the given account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const zc={command:`get`,describe:`Get Zero Trust Connectivity Settings`,builder:Rc,handler:async e=>u({command:`zero-trust connectivity-settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust connectivity-settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/zerotrust/connectivity_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(Lc,{account_id:a}));s(u,{successLabel:`Loaded`})})},Bc={command:`connectivity-settings`,describe:`Operations for connectivity-settings`,builder:e=>e.command(Ic).command(zc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Vc={method:`POST`,path:t=>e`/accounts/${t.account_id}/cws/basic-auth-credentials`,body:`json`};function Hc(e){return e.usage(`$0 zero-trust cws basic-auth-credentials create
|
|
377
|
-
|
|
378
|
-
Creates a basic-auth credential with the specified username.`).option(`username`,{type:`string`,description:`Login presented by the client. Printable ASCII only, excluding space and colon.`}).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 Uc={command:`create`,describe:`Create a basic-auth credential`,builder:Hc,handler:async e=>u({command:`zero-trust cws basic-auth-credentials create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws basic-auth-credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/basic-auth-credentials`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({username:_(e.username,`username`,`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(Vc,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.username===void 0&&(e.username=await y(`username`,`Login presented by the client. Printable ASCII only, excluding space and colon.`));let u=g({username:_(e.username,`username`,`text`)}),d=await l(`Creating`,async()=>n.send(Vc,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Wc={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/basic-auth-credentials/${t.credential_id}`};function Gc(e){return e.usage(`$0 zero-trust cws basic-auth-credentials delete <credential-id>
|
|
379
|
-
|
|
380
|
-
Deletes the credential and its secrets if it is not attached to a deployment.`).positional(`credential-id`,{type:`string`,description:`ID of the credential 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 Kc={command:`delete <credential-id>`,describe:`Delete a basic-auth credential`,builder:Gc,handler:async e=>u({command:`zero-trust cws basic-auth-credentials 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 cws basic-auth-credentials delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/basic-auth-credentials/${e[`credential-id`]==null?`<credential-id>`:encodeURIComponent(String(e[`credential-id`]))}`,pathParams:{"credential-id":String(e[`credential-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:`Delete this basic-auth credential?`}))return;let u=await l(`Deleting`,async()=>n.send(Wc,{account_id:a,credential_id:e[`credential-id`]}));s(u,{successLabel:`Deleted`})})};var qc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/basic-auth-credentials/${t.credential_id}`};function Jc(e){return e.usage(`$0 zero-trust cws basic-auth-credentials get <credential-id>
|
|
381
|
-
|
|
382
|
-
Returns the basic-auth credential with the specified ID.`).positional(`credential-id`,{type:`string`,description:`ID of the credential to retrieve`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Yc={command:`get <credential-id>`,describe:`Get a basic-auth credential by ID`,builder:Jc,handler:async e=>u({command:`zero-trust cws basic-auth-credentials get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws basic-auth-credentials get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/basic-auth-credentials/${e[`credential-id`]==null?`<credential-id>`:encodeURIComponent(String(e[`credential-id`]))}`,pathParams:{"credential-id":String(e[`credential-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(qc,{account_id:a,credential_id:e[`credential-id`]}));s(u,{successLabel:`Loaded`})})};var Xc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/basic-auth-credentials`,query:[`cursor`,`per_page`,`order`,`direction`,`username`,`deployment_id`],joined:[`cursor`,`per_page`,`order`,`direction`,`username`,`deployment_id`]};function Zc(e){return e.usage(`$0 zero-trust cws basic-auth-credentials list
|
|
383
|
-
|
|
384
|
-
Returns a paginated list of basic-auth credentials in the account.`).option(`cursor`,{type:`string`,description:`Pagination cursor from previous response`}).option(`per-page`,{type:`number`,description:`Number of items per page (1-100, default 20)`}).option(`order`,{type:`string`,description:`Field to order results by (default: created_at)`,choices:[`username`,`created_at`,`updated_at`]}).option(`direction`,{type:`string`,description:`Sort direction (default: asc)`,choices:[`asc`,`desc`]}).option(`username`,{type:`string`,description:`Filter by username (case-insensitive substring match)`}).option(`deployment-id`,{type:`string`,description:`Filter to credentials attached to this deployment`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qc={command:`list`,describe:`List basic-auth credentials for an account`,builder:Zc,handler:async e=>u({command:`zero-trust cws basic-auth-credentials list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,per_page:e[`per-page`],order:e.order,direction:e.direction,username:e.username,deployment_id:e[`deployment-id`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust cws basic-auth-credentials list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cws/basic-auth-credentials`,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(Xc,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var $c={method:`POST`,path:t=>e`/accounts/${t.account_id}/cws/basic-auth-credentials/${t.credential_id}/secrets`,body:`json`,errors:{503:`ServiceUnavailableError`}};function el(e){return e.usage(`$0 zero-trust cws basic-auth-credentials secrets create <credential-id>
|
|
385
|
-
|
|
386
|
-
Adds a password secret to the credential.`).positional(`credential-id`,{type:`string`,description:`ID of the parent credential`,demandOption:!0}).option(`expires-at`,{type:`string`,description:`Optional deactivation deadline (RFC 3339). Omit or null for no expiry.`}).option(`password`,{type:`string`,description:`Password stored only as a one-way hash and never returned. Maximum 72 UTF-8 bytes.`}).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 tl={command:`create <credential-id>`,describe:`Add a secret to a basic-auth credential`,builder:el,handler:async e=>u({command:`zero-trust cws basic-auth-credentials secrets create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws basic-auth-credentials secrets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/basic-auth-credentials/${e[`credential-id`]==null?`<credential-id>`:encodeURIComponent(String(e[`credential-id`]))}/secrets`,pathParams:{"credential-id":String(e[`credential-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({expires_at:_(e[`expires-at`],`expires-at`,`text`),password:_(e.password,`password`,`text`)}):f(e.body),sensitiveBodyPaths:[[`password`]]});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,credential_id:e[`credential-id`]}));s(r,{successLabel:`Created`});return}e.password===void 0&&(e.password=await y(`password`,`Password stored only as a one-way hash and never returned. Maximum 72 UTF-8 bytes.`,{kind:`secret`}));let u=g({expires_at:_(e[`expires-at`],`expires-at`,`text`),password:_(e.password,`password`,`text`)}),d=await l(`Creating`,async()=>n.send($c,{body:u,account_id:a,credential_id:e[`credential-id`]}));s(d,{successLabel:`Created`})})};var nl={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/basic-auth-credentials/${t.credential_id}/secrets/${t.secret_id}`};function rl(e){return e.usage(`$0 zero-trust cws basic-auth-credentials secrets delete <secret-id>
|
|
387
|
-
|
|
388
|
-
Deletes the specified secret from the credential.`).positional(`secret-id`,{type:`string`,description:`ID of the secret to delete`,demandOption:!0}).option(`credential-id`,{type:`string`,description:`ID of the parent credential`,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 il={command:`delete <secret-id>`,describe:`Delete a basic-auth secret`,builder:rl,handler:async e=>u({command:`zero-trust cws basic-auth-credentials secrets 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 cws basic-auth-credentials secrets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/basic-auth-credentials/${e[`credential-id`]==null?`<credential-id>`:encodeURIComponent(String(e[`credential-id`]))}/secrets/${e[`secret-id`]==null?`<secret-id>`:encodeURIComponent(String(e[`secret-id`]))}`,pathParams:{"credential-id":String(e[`credential-id`]??``),"secret-id":String(e[`secret-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:`Delete this basic-auth secret?`}))return;let u=await l(`Deleting`,async()=>n.send(nl,{account_id:a,credential_id:e[`credential-id`],secret_id:e[`secret-id`]}));s(u,{successLabel:`Deleted`})})};var al={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/basic-auth-credentials/${t.credential_id}/secrets/${t.secret_id}`};function ol(e){return e.usage(`$0 zero-trust cws basic-auth-credentials secrets get <secret-id>
|
|
389
|
-
|
|
390
|
-
Returns the specified secret's metadata without exposing its password or hash.`).positional(`secret-id`,{type:`string`,description:`ID of the secret to retrieve`,demandOption:!0}).option(`credential-id`,{type:`string`,description:`ID of the parent credential`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const sl={command:`get <secret-id>`,describe:`Get a basic-auth secret by ID`,builder:ol,handler:async e=>u({command:`zero-trust cws basic-auth-credentials secrets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws basic-auth-credentials secrets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/basic-auth-credentials/${e[`credential-id`]==null?`<credential-id>`:encodeURIComponent(String(e[`credential-id`]))}/secrets/${e[`secret-id`]==null?`<secret-id>`:encodeURIComponent(String(e[`secret-id`]))}`,pathParams:{"credential-id":String(e[`credential-id`]??``),"secret-id":String(e[`secret-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(al,{account_id:a,credential_id:e[`credential-id`],secret_id:e[`secret-id`]}));s(u,{successLabel:`Loaded`})})};var cl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/basic-auth-credentials/${t.credential_id}/secrets`,query:[`cursor`,`per_page`,`order`,`direction`],joined:[`cursor`,`per_page`,`order`,`direction`]};function ll(e){return e.usage(`$0 zero-trust cws basic-auth-credentials secrets list
|
|
391
|
-
|
|
392
|
-
Returns a paginated list of secrets belonging to the credential.`).option(`credential-id`,{type:`string`,description:`ID of the parent credential`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Pagination cursor from previous response`}).option(`per-page`,{type:`number`,description:`Number of items per page (1-100, default 20)`}).option(`order`,{type:`string`,description:`Field to order results by (default: created_at)`,choices:[`created_at`]}).option(`direction`,{type:`string`,description:`Sort direction (default: asc)`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ul={command:`list`,describe:`List secrets for a basic-auth credential`,builder:ll,handler:async e=>u({command:`zero-trust cws basic-auth-credentials secrets list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let t=await i();c({command:`cf zero-trust cws basic-auth-credentials secrets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/basic-auth-credentials/${e[`credential-id`]==null?`<credential-id>`:encodeURIComponent(String(e[`credential-id`]))}/secrets`,pathParams:{"credential-id":String(e[`credential-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(cl,{account_id:u,credential_id:e[`credential-id`],...n}));s(d,{successLabel:`Loaded`})})},dl={command:`secrets`,describe:`Operations for cws.basic-auth-credentials.secrets`,builder:e=>e.command(tl).command(il).command(sl).command(ul).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fl={command:`basic-auth-credentials`,describe:`Operations for cws.basic-auth-credentials`,builder:e=>e.command(Uc).command(Kc).command(Yc).command(Qc).command(dl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var pl={method:`POST`,path:t=>e`/accounts/${t.account_id}/cws/deployments`,body:`json`};function ml(e){return e.usage(`$0 zero-trust cws deployments create
|
|
393
|
-
|
|
394
|
-
Creates a deployment with the specified policy sets, domain ACL, and basic-auth credentials.`).option(`basic-auth-credential-ids`,{type:`string`,array:!0,description:`IDs of basic-auth credentials to attach`}).option(`default-mode`,{type:`string`,description:`Default traffic mode: ALLOW or BLOCK`,choices:[`ALLOW`,`BLOCK`]}).coerce(`default-mode`,e=>_(e,`default-mode`,`text`)).option(`description`,{type:`string`,description:`Optional free-form description.`}).option(`domain-acl-id`,{type:`string`,description:`ID of the domain ACL to attach (omit or null for none)`}).option(`name`,{type:`string`,description:`Name of the deployment`}).option(`on-error-action`,{type:`string`,description:`Action for runtime Rego errors. Omit to use BLOCK.`,choices:[`BLOCK`,`SKIP`],default:`BLOCK`}).coerce(`on-error-action`,e=>_(e,`on-error-action`,`text`)).option(`policy-set-ids`,{type:`string`,array:!0,description:`IDs of policy sets to attach`}).option(`rego-raise-error`,{type:`boolean`,description:`Whether OPA builtin failures are raised as runtime evaluation errors. Omit to use the default true value.`,default:!0}).option(`tags`,{type:`string`,description:`Tags to attach. Keys are limited to 256 UTF-8 bytes and values to 1024 UTF-8 bytes. 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:`Raw JSON request body (bypasses individual flags)`})}const hl={command:`create`,describe:`Create a new deployment`,builder:ml,handler:async e=>u({command:`zero-trust cws deployments create`,classification:{safeFlags:[`default-mode`,`on-error-action`,`rego-raise-error`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/deployments`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({basic_auth_credential_ids:e[`basic-auth-credential-ids`],default_mode:e[`default-mode`],description:_(e.description,`description`,`text`),domain_acl_id:_(e[`domain-acl-id`],`domain-acl-id`,`text`),name:_(e.name,`name`,`text`),on_error_action:e[`on-error-action`],policy_set_ids:e[`policy-set-ids`],rego_raise_error:e[`rego-raise-error`],tags:m(e.tags,`tags`)},[[`tags`]]):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(pl,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`basic-auth-credential-ids`]===void 0)throw Error(`--basic-auth-credential-ids is required (or pass --body with this field set).`);if(e[`default-mode`]===void 0&&(e[`default-mode`]=await b(`default-mode`,`Default traffic mode: ALLOW or BLOCK`,[`ALLOW`,`BLOCK`])),e.name===void 0&&(e.name=await y(`name`,`Name of the deployment`)),e[`policy-set-ids`]===void 0)throw Error(`--policy-set-ids is required (or pass --body with this field set).`);let u=g({basic_auth_credential_ids:e[`basic-auth-credential-ids`],default_mode:e[`default-mode`],description:_(e.description,`description`,`text`),domain_acl_id:_(e[`domain-acl-id`],`domain-acl-id`,`text`),name:_(e.name,`name`,`text`),on_error_action:e[`on-error-action`],policy_set_ids:e[`policy-set-ids`],rego_raise_error:e[`rego-raise-error`],tags:m(e.tags,`tags`)},[[`tags`]]),d=await l(`Creating`,async()=>n.send(pl,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var gl={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/deployments/${t.deployment_id}`};function _l(e){return e.usage(`$0 zero-trust cws deployments delete <deployment-id>
|
|
395
|
-
|
|
396
|
-
Deletes the deployment and detaches its associated resources. The resources are not deleted.`).positional(`deployment-id`,{type:`string`,description:`ID of the deployment 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 vl={command:`delete <deployment-id>`,describe:`Delete a deployment`,builder:_l,handler:async e=>u({command:`zero-trust cws deployments 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 cws deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"deployment-id":String(e[`deployment-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:`Delete this deployment?`}))return;let u=await l(`Deleting`,async()=>n.send(gl,{account_id:a,deployment_id:e[`deployment-id`]}));s(u,{successLabel:`Deleted`})})};var yl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/deployments/${t.deployment_id}`};function bl(e){return e.usage(`$0 zero-trust cws deployments get <deployment-id>
|
|
397
|
-
|
|
398
|
-
Returns the deployment with the specified ID.`).positional(`deployment-id`,{type:`string`,description:`ID of the deployment to retrieve`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xl={command:`get <deployment-id>`,describe:`Get a deployment by ID`,builder:bl,handler:async e=>u({command:`zero-trust cws deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws deployments get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"deployment-id":String(e[`deployment-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(yl,{account_id:a,deployment_id:e[`deployment-id`]}));s(u,{successLabel:`Loaded`})})};var Sl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/deployments`,query:[`cursor`,`per_page`,`order`,`direction`,`name`],joined:[`cursor`,`per_page`,`order`,`direction`,`name`]};function Cl(e){return e.usage(`$0 zero-trust cws deployments list
|
|
399
|
-
|
|
400
|
-
Returns a paginated list of deployments in the account.`).option(`cursor`,{type:`string`,description:`Pagination cursor from previous response`}).option(`per-page`,{type:`number`,description:`Number of items per page (1-100, default 20)`}).option(`order`,{type:`string`,description:`Field to order results by (default: created_at)`,choices:[`name`,`created_at`,`updated_at`]}).option(`direction`,{type:`string`,description:`Sort direction (default: asc)`,choices:[`asc`,`desc`]}).option(`name`,{type:`string`,description:`Filter by deployment name (case-insensitive substring match)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const wl={command:`list`,describe:`List deployments`,builder:Cl,handler:async e=>u({command:`zero-trust cws deployments list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,per_page:e[`per-page`],order:e.order,direction:e.direction,name:e.name};if(e.dryRun){let e=await i();c({command:`cf zero-trust cws deployments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cws/deployments`,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(Sl,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Tl={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cws/deployments/${t.deployment_id}`,body:`json`};function El(e){return e.usage(`$0 zero-trust cws deployments update <deployment-id>
|
|
401
|
-
|
|
402
|
-
Replaces the deployment's mutable configuration and resource attachments.`).positional(`deployment-id`,{type:`string`,description:`ID of the deployment to update`,demandOption:!0}).option(`basic-auth-credential-ids`,{type:`string`,array:!0,description:`Replacement set of basic-auth credential IDs`}).option(`default-mode`,{type:`string`,description:`Default traffic mode: ALLOW or BLOCK`,choices:[`ALLOW`,`BLOCK`]}).coerce(`default-mode`,e=>_(e,`default-mode`,`text`)).option(`description`,{type:`string`,description:`Optional free-form description.`}).option(`domain-acl-id`,{type:`string`,description:`ID of the domain ACL to attach (omit or null to clear)`}).option(`name`,{type:`string`,description:`Name of the deployment`}).option(`on-error-action`,{type:`string`,description:`Action for runtime Rego errors. Omit to reset to BLOCK.`,choices:[`BLOCK`,`SKIP`]}).coerce(`on-error-action`,e=>_(e,`on-error-action`,`text`)).option(`policy-set-ids`,{type:`string`,array:!0,description:`Replacement set of policy set IDs`}).option(`rego-raise-error`,{type:`boolean`,description:`Whether OPA builtin failures are raised as runtime evaluation errors. Omit to reset to true.`}).option(`tags`,{type:`string`,description:`Replacement tag set. Omit or use {} to clear. Keys are limited to 256 UTF-8 bytes and values to 1024 UTF-8 bytes. 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:`Raw JSON request body (bypasses individual flags)`})}const Dl={command:`update <deployment-id>`,describe:`Update a deployment`,builder:El,handler:async e=>u({command:`zero-trust cws deployments update`,classification:{safeFlags:[`default-mode`,`on-error-action`,`rego-raise-error`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws deployments update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({basic_auth_credential_ids:e[`basic-auth-credential-ids`],default_mode:e[`default-mode`],description:_(e.description,`description`,`text`),domain_acl_id:_(e[`domain-acl-id`],`domain-acl-id`,`text`),name:_(e.name,`name`,`text`),on_error_action:e[`on-error-action`],policy_set_ids:e[`policy-set-ids`],rego_raise_error:e[`rego-raise-error`],tags:m(e.tags,`tags`)},[[`tags`]]):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(Tl,{body:t,account_id:a,deployment_id:e[`deployment-id`]}));s(r,{successLabel:`Updated`});return}if(e[`basic-auth-credential-ids`]===void 0)throw Error(`--basic-auth-credential-ids is required (or pass --body with this field set).`);if(e[`default-mode`]===void 0&&(e[`default-mode`]=await b(`default-mode`,`Default traffic mode: ALLOW or BLOCK`,[`ALLOW`,`BLOCK`])),e.name===void 0&&(e.name=await y(`name`,`Name of the deployment`)),e[`policy-set-ids`]===void 0)throw Error(`--policy-set-ids is required (or pass --body with this field set).`);let u=g({basic_auth_credential_ids:e[`basic-auth-credential-ids`],default_mode:e[`default-mode`],description:_(e.description,`description`,`text`),domain_acl_id:_(e[`domain-acl-id`],`domain-acl-id`,`text`),name:_(e.name,`name`,`text`),on_error_action:e[`on-error-action`],policy_set_ids:e[`policy-set-ids`],rego_raise_error:e[`rego-raise-error`],tags:m(e.tags,`tags`)},[[`tags`]]),d=await l(`Updating`,async()=>n.send(Tl,{body:u,account_id:a,deployment_id:e[`deployment-id`]}));s(d,{successLabel:`Updated`})})},Ol={command:`deployments`,describe:`Operations for cws.deployments`,builder:e=>e.command(hl).command(vl).command(xl).command(wl).command(Dl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var kl={method:`POST`,path:t=>e`/accounts/${t.account_id}/cws/domain-acls`,body:`json`};function Al(e){return e.usage(`$0 zero-trust cws domain-acls create
|
|
403
|
-
|
|
404
|
-
Creates a domain access control list with its default action and entries.`).option(`default-action`,{type:`string`,description:`Default action when no entry matches`,choices:[`ALLOW`,`BLOCK`]}).coerce(`default-action`,e=>_(e,`default-action`,`text`)).option(`entries`,{type:`string`,description:`Domain entries for this ACL. Each domain must appear at most once. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`Name of the domain ACL`}).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 jl={command:`create`,describe:`Create a new domain ACL`,builder:Al,handler:async e=>u({command:`zero-trust cws domain-acls create`,classification:{safeFlags:[`default-action`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws domain-acls create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/domain-acls`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({default_action:e[`default-action`],entries:d(e.entries,`entries`),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(kl,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`default-action`]===void 0&&(e[`default-action`]=await b(`default-action`,`Default action when no entry matches`,[`ALLOW`,`BLOCK`])),e.entries===void 0)throw Error(`--entries is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`Name of the domain ACL`));let u=g({default_action:e[`default-action`],entries:d(e.entries,`entries`),name:_(e.name,`name`,`text`)}),p=await l(`Creating`,async()=>n.send(kl,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Ml={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/domain-acls/${t.domain_acl_id}`};function Nl(e){return e.usage(`$0 zero-trust cws domain-acls delete <domain-acl-id>
|
|
405
|
-
|
|
406
|
-
Deletes the domain ACL if it is not attached to a deployment.`).positional(`domain-acl-id`,{type:`string`,description:`ID of the domain ACL 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 Pl={command:`delete <domain-acl-id>`,describe:`Delete a domain ACL`,builder:Nl,handler:async e=>u({command:`zero-trust cws domain-acls 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 cws domain-acls delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/domain-acls/${e[`domain-acl-id`]==null?`<domain-acl-id>`:encodeURIComponent(String(e[`domain-acl-id`]))}`,pathParams:{"domain-acl-id":String(e[`domain-acl-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:`Delete this domain ACL?`}))return;let u=await l(`Deleting`,async()=>n.send(Ml,{account_id:a,domain_acl_id:e[`domain-acl-id`]}));s(u,{successLabel:`Deleted`})})};var Fl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/domain-acls/${t.domain_acl_id}`};function Il(e){return e.usage(`$0 zero-trust cws domain-acls get <domain-acl-id>
|
|
407
|
-
|
|
408
|
-
Returns the domain access control list with the specified ID.`).positional(`domain-acl-id`,{type:`string`,description:`ID of the domain ACL to retrieve`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ll={command:`get <domain-acl-id>`,describe:`Get a domain ACL by ID`,builder:Il,handler:async e=>u({command:`zero-trust cws domain-acls get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws domain-acls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/domain-acls/${e[`domain-acl-id`]==null?`<domain-acl-id>`:encodeURIComponent(String(e[`domain-acl-id`]))}`,pathParams:{"domain-acl-id":String(e[`domain-acl-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(Fl,{account_id:a,domain_acl_id:e[`domain-acl-id`]}));s(u,{successLabel:`Loaded`})})};var Rl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/domain-acls`,query:[`cursor`,`per_page`,`order`,`direction`,`name`,`deployment_id`],joined:[`cursor`,`per_page`,`order`,`direction`,`name`,`deployment_id`]};function zl(e){return e.usage(`$0 zero-trust cws domain-acls list
|
|
409
|
-
|
|
410
|
-
Returns a paginated list of domain access control lists in the account.`).option(`cursor`,{type:`string`,description:`Pagination cursor from previous response`}).option(`per-page`,{type:`number`,description:`Number of items per page (1-100, default 20)`}).option(`order`,{type:`string`,description:`Field to order results by (default: created_at)`,choices:[`name`,`created_at`,`updated_at`]}).option(`direction`,{type:`string`,description:`Sort direction (default: asc)`,choices:[`asc`,`desc`]}).option(`name`,{type:`string`,description:`Filter by domain ACL name (case-insensitive substring match)`}).option(`deployment-id`,{type:`string`,description:`Filter to domain ACLs attached to this deployment`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bl={command:`list`,describe:`List domain ACLs`,builder:zl,handler:async e=>u({command:`zero-trust cws domain-acls list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,per_page:e[`per-page`],order:e.order,direction:e.direction,name:e.name,deployment_id:e[`deployment-id`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust cws domain-acls list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cws/domain-acls`,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(Rl,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Vl={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cws/domain-acls/${t.domain_acl_id}`,body:`json`};function Hl(e){return e.usage(`$0 zero-trust cws domain-acls update <domain-acl-id>
|
|
411
|
-
|
|
412
|
-
Replaces the domain access control list's name, default action, and entries.`).positional(`domain-acl-id`,{type:`string`,description:`ID of the domain ACL to update`,demandOption:!0}).option(`default-action`,{type:`string`,description:`Default action when no entry matches`,choices:[`ALLOW`,`BLOCK`]}).coerce(`default-action`,e=>_(e,`default-action`,`text`)).option(`entries`,{type:`string`,description:`Replacement set of domain entries. Each domain must appear at most once. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`Name of the domain ACL`}).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 Ul={command:`update <domain-acl-id>`,describe:`Update a domain ACL and replace its entries`,builder:Hl,handler:async e=>u({command:`zero-trust cws domain-acls update`,classification:{safeFlags:[`default-action`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws domain-acls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/domain-acls/${e[`domain-acl-id`]==null?`<domain-acl-id>`:encodeURIComponent(String(e[`domain-acl-id`]))}`,pathParams:{"domain-acl-id":String(e[`domain-acl-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({default_action:e[`default-action`],entries:d(e.entries,`entries`),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(Vl,{body:t,account_id:a,domain_acl_id:e[`domain-acl-id`]}));s(r,{successLabel:`Updated`});return}if(e[`default-action`]===void 0&&(e[`default-action`]=await b(`default-action`,`Default action when no entry matches`,[`ALLOW`,`BLOCK`])),e.entries===void 0)throw Error(`--entries is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`Name of the domain ACL`));let u=g({default_action:e[`default-action`],entries:d(e.entries,`entries`),name:_(e.name,`name`,`text`)}),p=await l(`Updating`,async()=>n.send(Vl,{body:u,account_id:a,domain_acl_id:e[`domain-acl-id`]}));s(p,{successLabel:`Updated`})})},Wl={command:`domain-acls`,describe:`Operations for cws.domain-acls`,builder:e=>e.command(jl).command(Pl).command(Ll).command(Bl).command(Ul).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Gl={method:`POST`,path:t=>e`/accounts/${t.account_id}/cws/policies`,body:`json`,errors:{503:`ServiceUnavailableError`}};function Kl(e){return e.usage(`$0 zero-trust cws policies create
|
|
413
|
-
|
|
414
|
-
Creates a policy from inline Rego source, an entrypoint, and a filter expression.`).option(`description`,{type:`string`,description:`Optional free-form description.`}).option(`entrypoint`,{type:`string`,description:`Non-function rule declared in rego_source. Evaluation uses data.<package_path>.<entrypoint>.`}).option(`filter`,{type:`string`,description:`Filter expression that determines whether this policy applies. Maximum 4096 UTF-8 bytes.`}).option(`name`,{type:`string`,description:`Name of the policy`}).option(`rego-source`,{type:`string`,description:`Inline Rego source with a package beginning with "policy." Maximum 16384 UTF-8 bytes.`}).option(`tags`,{type:`string`,description:`Tags to attach. Keys are limited to 256 UTF-8 bytes and values to 1024 UTF-8 bytes. 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:`Raw JSON request body (bypasses individual flags)`})}const ql={command:`create`,describe:`Create a new policy`,builder:Kl,handler:async e=>u({command:`zero-trust cws policies create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),entrypoint:_(e.entrypoint,`entrypoint`,`text`),filter:_(e.filter,`filter`,`text`),name:_(e.name,`name`,`text`),rego_source:_(e[`rego-source`],`rego-source`,`text`),tags:m(e.tags,`tags`)},[[`tags`]]):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(Gl,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.entrypoint===void 0&&(e.entrypoint=await y(`entrypoint`,`Non-function rule declared in rego_source. Evaluation uses data.<package_path>.<entrypoint>.`)),e.filter===void 0&&(e.filter=await y(`filter`,`Filter expression that determines whether this policy applies. Maximum 4096 UTF-8 bytes.`)),e.name===void 0&&(e.name=await y(`name`,`Name of the policy`)),e[`rego-source`]===void 0&&(e[`rego-source`]=await y(`rego-source`,`Inline Rego source with a package beginning with "policy." Maximum 16384 UTF-8 bytes.`));let u=g({description:_(e.description,`description`,`text`),entrypoint:_(e.entrypoint,`entrypoint`,`text`),filter:_(e.filter,`filter`,`text`),name:_(e.name,`name`,`text`),rego_source:_(e[`rego-source`],`rego-source`,`text`),tags:m(e.tags,`tags`)},[[`tags`]]),d=await l(`Creating`,async()=>n.send(Gl,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Jl={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/policies/${t.policy_id}`};function Yl(e){return e.usage(`$0 zero-trust cws policies delete <policy-id>
|
|
415
|
-
|
|
416
|
-
Deletes the policy and cascades its policy-set membership rows. The policy sets remain.`).positional(`policy-id`,{type:`string`,description:`ID of the policy 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 Xl={command:`delete <policy-id>`,describe:`Delete a policy`,builder:Yl,handler:async e=>u({command:`zero-trust cws 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 cws policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/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,message:`Delete this policy?`}))return;let u=await l(`Deleting`,async()=>n.send(Jl,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Deleted`})})};var Zl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/policies/${t.policy_id}`};function Ql(e){return e.usage(`$0 zero-trust cws policies get <policy-id>
|
|
417
|
-
|
|
418
|
-
Returns the policy with the specified ID.`).positional(`policy-id`,{type:`string`,description:`ID of the policy to retrieve`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $l={command:`get <policy-id>`,describe:`Get a policy by ID`,builder:Ql,handler:async e=>u({command:`zero-trust cws policies get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/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();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Zl,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Loaded`})})};var eu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/policies`,query:[`cursor`,`per_page`,`order`,`direction`,`name`,`policy_set_id`,`package_path`],joined:[`cursor`,`per_page`,`order`,`direction`,`name`,`policy_set_id`,`package_path`]};function tu(e){return e.usage(`$0 zero-trust cws policies list
|
|
419
|
-
|
|
420
|
-
Returns a paginated list of policies in the account.`).option(`cursor`,{type:`string`,description:`Pagination cursor from previous response`}).option(`per-page`,{type:`number`,description:`Number of items per page (1-100, default 20)`}).option(`order`,{type:`string`,description:`Field to order results by (default: created_at)`,choices:[`name`,`created_at`,`updated_at`]}).option(`direction`,{type:`string`,description:`Sort direction (default: asc)`,choices:[`asc`,`desc`]}).option(`name`,{type:`string`,description:`Filter by policy name (case-insensitive substring match)`}).option(`policy-set-id`,{type:`string`,description:`Filter to policies attached to (members of) this policy set`}).option(`package-path`,{type:`string`,description:`Filter by package path (case-sensitive literal substring match)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const nu={command:`list`,describe:`List policies`,builder:tu,handler:async e=>u({command:`zero-trust cws policies list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,per_page:e[`per-page`],order:e.order,direction:e.direction,name:e.name,policy_set_id:e[`policy-set-id`],package_path:e[`package-path`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust cws policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cws/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(eu,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var ru={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cws/policies/${t.policy_id}`,body:`json`,errors:{503:`ServiceUnavailableError`}};function iu(e){return e.usage(`$0 zero-trust cws policies update <policy-id>
|
|
421
|
-
|
|
422
|
-
Replaces the policy's configuration. Omit tags or use {} to clear them.`).positional(`policy-id`,{type:`string`,description:`ID of the policy to update`,demandOption:!0}).option(`description`,{type:`string`,description:`Optional free-form description.`}).option(`entrypoint`,{type:`string`,description:`Non-function rule declared in rego_source. Evaluation uses data.<package_path>.<entrypoint>.`}).option(`filter`,{type:`string`,description:`Filter expression that determines whether this policy applies. Maximum 4096 UTF-8 bytes.`}).option(`name`,{type:`string`,description:`Name of the policy`}).option(`rego-source`,{type:`string`,description:`Inline Rego source with a package beginning with "policy." Maximum 16384 UTF-8 bytes.`}).option(`tags`,{type:`string`,description:`Replacement tag set. Omit or use {} to clear. Keys are limited to 256 UTF-8 bytes and values to 1024 UTF-8 bytes. 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:`Raw JSON request body (bypasses individual flags)`})}const au={command:`update <policy-id>`,describe:`Update a policy`,builder:iu,handler:async e=>u({command:`zero-trust cws policies update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/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({description:_(e.description,`description`,`text`),entrypoint:_(e.entrypoint,`entrypoint`,`text`),filter:_(e.filter,`filter`,`text`),name:_(e.name,`name`,`text`),rego_source:_(e[`rego-source`],`rego-source`,`text`),tags:m(e.tags,`tags`)},[[`tags`]]):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(ru,{body:t,account_id:a,policy_id:e[`policy-id`]}));s(r,{successLabel:`Updated`});return}e.entrypoint===void 0&&(e.entrypoint=await y(`entrypoint`,`Non-function rule declared in rego_source. Evaluation uses data.<package_path>.<entrypoint>.`)),e.filter===void 0&&(e.filter=await y(`filter`,`Filter expression that determines whether this policy applies. Maximum 4096 UTF-8 bytes.`)),e.name===void 0&&(e.name=await y(`name`,`Name of the policy`)),e[`rego-source`]===void 0&&(e[`rego-source`]=await y(`rego-source`,`Inline Rego source with a package beginning with "policy." Maximum 16384 UTF-8 bytes.`));let u=g({description:_(e.description,`description`,`text`),entrypoint:_(e.entrypoint,`entrypoint`,`text`),filter:_(e.filter,`filter`,`text`),name:_(e.name,`name`,`text`),rego_source:_(e[`rego-source`],`rego-source`,`text`),tags:m(e.tags,`tags`)},[[`tags`]]),d=await l(`Updating`,async()=>n.send(ru,{body:u,account_id:a,policy_id:e[`policy-id`]}));s(d,{successLabel:`Updated`})})},ou={command:`policies`,describe:`Operations for cws.policies`,builder:e=>e.command(ql).command(Xl).command($l).command(nu).command(au).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var su={method:`POST`,path:t=>e`/accounts/${t.account_id}/cws/policy-sets`,body:`json`};function cu(e){return e.usage(`$0 zero-trust cws policy-sets create
|
|
423
|
-
|
|
424
|
-
Creates a policy set containing the specified policies and workload targets.`).option(`description`,{type:`string`,description:`Optional free-form description.`}).option(`exclude-workload-ids`,{type:`string`,array:!0,description:`Workload IDs that exclude matching requests. Exclusions take precedence.`}).option(`include-workload-ids`,{type:`string`,array:!0,description:`Workload IDs that include matching requests. Empty or omitted includes all requests before exclusions.`}).option(`name`,{type:`string`,description:`Name of the policy set`}).option(`policies`,{type:`string`,description:`Policies to include with per-membership enforcement mode. Provide as a JSON array of objects or @path/to/file.json.`}).option(`tags`,{type:`string`,description:`Tags to attach. Keys are limited to 256 UTF-8 bytes and values to 1024 UTF-8 bytes. 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:`Raw JSON request body (bypasses individual flags)`})}const lu={command:`create`,describe:`Create a new policy set`,builder:cu,handler:async e=>u({command:`zero-trust cws policy-sets create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws policy-sets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/policy-sets`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),exclude_workload_ids:e[`exclude-workload-ids`],include_workload_ids:e[`include-workload-ids`],name:_(e.name,`name`,`text`),policies:d(e.policies,`policies`),tags:m(e.tags,`tags`)},[[`tags`]]):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(su,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await y(`name`,`Name of the policy set`)),e.policies===void 0)throw Error(`--policies is required (or pass --body with this field set).`);let u=g({description:_(e.description,`description`,`text`),exclude_workload_ids:e[`exclude-workload-ids`],include_workload_ids:e[`include-workload-ids`],name:_(e.name,`name`,`text`),policies:d(e.policies,`policies`),tags:m(e.tags,`tags`)},[[`tags`]]),p=await l(`Creating`,async()=>n.send(su,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var uu={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/policy-sets/${t.policy_set_id}`};function du(e){return e.usage(`$0 zero-trust cws policy-sets delete <policy-set-id>
|
|
425
|
-
|
|
426
|
-
Deletes the policy set and cascades its deployment attachment and policy and workload membership rows. The referenced deployments, policies, and workloads remain.`).positional(`policy-set-id`,{type:`string`,description:`ID of the policy set 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 fu={command:`delete <policy-set-id>`,describe:`Delete a policy set`,builder:du,handler:async e=>u({command:`zero-trust cws policy-sets 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 cws policy-sets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/policy-sets/${e[`policy-set-id`]==null?`<policy-set-id>`:encodeURIComponent(String(e[`policy-set-id`]))}`,pathParams:{"policy-set-id":String(e[`policy-set-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:`Delete this policy set?`}))return;let u=await l(`Deleting`,async()=>n.send(uu,{account_id:a,policy_set_id:e[`policy-set-id`]}));s(u,{successLabel:`Deleted`})})};var pu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/policy-sets/${t.policy_set_id}`};function mu(e){return e.usage(`$0 zero-trust cws policy-sets get <policy-set-id>
|
|
427
|
-
|
|
428
|
-
Returns the policy set with the specified ID.`).positional(`policy-set-id`,{type:`string`,description:`ID of the policy set to retrieve`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const hu={command:`get <policy-set-id>`,describe:`Get a policy set by ID`,builder:mu,handler:async e=>u({command:`zero-trust cws policy-sets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws policy-sets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/policy-sets/${e[`policy-set-id`]==null?`<policy-set-id>`:encodeURIComponent(String(e[`policy-set-id`]))}`,pathParams:{"policy-set-id":String(e[`policy-set-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(pu,{account_id:a,policy_set_id:e[`policy-set-id`]}));s(u,{successLabel:`Loaded`})})};var gu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/policy-sets`,query:[`cursor`,`per_page`,`order`,`direction`,`name`,`deployment_id`],joined:[`cursor`,`per_page`,`order`,`direction`,`name`,`deployment_id`]};function _u(e){return e.usage(`$0 zero-trust cws policy-sets list
|
|
429
|
-
|
|
430
|
-
Returns a paginated list of policy sets in the account.`).option(`cursor`,{type:`string`,description:`Pagination cursor from previous response`}).option(`per-page`,{type:`number`,description:`Number of items per page (1-100, default 20)`}).option(`order`,{type:`string`,description:`Field to order results by (default: created_at)`,choices:[`name`,`created_at`,`updated_at`]}).option(`direction`,{type:`string`,description:`Sort direction (default: asc)`,choices:[`asc`,`desc`]}).option(`name`,{type:`string`,description:`Filter by policy set name (case-insensitive substring match)`}).option(`deployment-id`,{type:`string`,description:`Filter to policy sets attached to this deployment`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vu={command:`list`,describe:`List policy sets`,builder:_u,handler:async e=>u({command:`zero-trust cws policy-sets list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,per_page:e[`per-page`],order:e.order,direction:e.direction,name:e.name,deployment_id:e[`deployment-id`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust cws policy-sets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cws/policy-sets`,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(gu,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var yu={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cws/policy-sets/${t.policy_set_id}`,body:`json`};function bu(e){return e.usage(`$0 zero-trust cws policy-sets update <policy-set-id>
|
|
431
|
-
|
|
432
|
-
Replaces the policy set's configuration. Omit tags or use {} to clear them.`).positional(`policy-set-id`,{type:`string`,description:`ID of the policy set to update`,demandOption:!0}).option(`description`,{type:`string`,description:`Optional free-form description.`}).option(`exclude-workload-ids`,{type:`string`,array:!0,description:`Replacement set of excluded workload IDs. Exclusions take precedence.`}).option(`include-workload-ids`,{type:`string`,array:!0,description:`Replacement set of included workload IDs. Empty or omitted includes all requests before exclusions.`}).option(`name`,{type:`string`,description:`Name of the policy set`}).option(`policies`,{type:`string`,description:`Replacement set of policies with per-membership enforcement mode. Provide as a JSON array of objects or @path/to/file.json.`}).option(`tags`,{type:`string`,description:`Replacement tag set. Omit or use {} to clear. Keys are limited to 256 UTF-8 bytes and values to 1024 UTF-8 bytes. 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:`Raw JSON request body (bypasses individual flags)`})}const xu={command:`update <policy-set-id>`,describe:`Update a policy set`,builder:bu,handler:async e=>u({command:`zero-trust cws policy-sets update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws policy-sets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/policy-sets/${e[`policy-set-id`]==null?`<policy-set-id>`:encodeURIComponent(String(e[`policy-set-id`]))}`,pathParams:{"policy-set-id":String(e[`policy-set-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),exclude_workload_ids:e[`exclude-workload-ids`],include_workload_ids:e[`include-workload-ids`],name:_(e.name,`name`,`text`),policies:d(e.policies,`policies`),tags:m(e.tags,`tags`)},[[`tags`]]):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(yu,{body:t,account_id:a,policy_set_id:e[`policy-set-id`]}));s(r,{successLabel:`Updated`});return}if(e.name===void 0&&(e.name=await y(`name`,`Name of the policy set`)),e.policies===void 0)throw Error(`--policies is required (or pass --body with this field set).`);let u=g({description:_(e.description,`description`,`text`),exclude_workload_ids:e[`exclude-workload-ids`],include_workload_ids:e[`include-workload-ids`],name:_(e.name,`name`,`text`),policies:d(e.policies,`policies`),tags:m(e.tags,`tags`)},[[`tags`]]),p=await l(`Updating`,async()=>n.send(yu,{body:u,account_id:a,policy_set_id:e[`policy-set-id`]}));s(p,{successLabel:`Updated`})})},Su={command:`policy-sets`,describe:`Operations for cws.policy-sets`,builder:e=>e.command(lu).command(fu).command(hu).command(vu).command(xu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Cu={method:`POST`,path:t=>e`/accounts/${t.account_id}/cws/rego-metadata`,body:`json`};function wu(e){return e.usage(`$0 zero-trust cws rego-metadata create
|
|
433
|
-
|
|
434
|
-
Creates a JSON document that Rego can access through its import path.`).option(`import-path`,{type:`string`,description:`Unique Rego import path in the form metadata.<segment>, with one alphanumeric or underscore segment. Reference it as data.<import_path>.`}).option(`name`,{type:`string`,description:`Name of the rego metadata document (unique per account)`}).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 Tu={command:`create`,describe:`Create a new rego metadata document`,builder:wu,handler:async e=>u({command:`zero-trust cws rego-metadata create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws rego-metadata create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/rego-metadata`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({import_path:_(e[`import-path`],`import-path`,`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(Cu,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`import-path`]===void 0&&(e[`import-path`]=await y(`import-path`,`Unique Rego import path in the form metadata.<segment>, with one alphanumeric or underscore segment. Reference it as data.<import_path>.`)),e.name===void 0&&(e.name=await y(`name`,`Name of the rego metadata document (unique per account)`));let u=g({import_path:_(e[`import-path`],`import-path`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(Cu,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Eu={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/rego-metadata/${t.rego_metadata_id}`};function Du(e){return e.usage(`$0 zero-trust cws rego-metadata delete <rego-metadata-id>
|
|
435
|
-
|
|
436
|
-
Deletes the specified Rego metadata document.`).positional(`rego-metadata-id`,{type:`string`,description:`ID of the rego metadata document 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 Ou={command:`delete <rego-metadata-id>`,describe:`Delete a rego metadata document`,builder:Du,handler:async e=>u({command:`zero-trust cws rego-metadata 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 cws rego-metadata delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/rego-metadata/${e[`rego-metadata-id`]==null?`<rego-metadata-id>`:encodeURIComponent(String(e[`rego-metadata-id`]))}`,pathParams:{"rego-metadata-id":String(e[`rego-metadata-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:`Delete this Rego metadata document?`}))return;let u=await l(`Deleting`,async()=>n.send(Eu,{account_id:a,rego_metadata_id:e[`rego-metadata-id`]}));s(u,{successLabel:`Deleted`})})};var ku={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/rego-metadata/${t.rego_metadata_id}`};function Au(e){return e.usage(`$0 zero-trust cws rego-metadata get <rego-metadata-id>
|
|
437
|
-
|
|
438
|
-
Returns the Rego metadata document with the specified ID.`).positional(`rego-metadata-id`,{type:`string`,description:`ID of the rego metadata document to retrieve`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ju={command:`get <rego-metadata-id>`,describe:`Get a rego metadata document by ID`,builder:Au,handler:async e=>u({command:`zero-trust cws rego-metadata get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws rego-metadata get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/rego-metadata/${e[`rego-metadata-id`]==null?`<rego-metadata-id>`:encodeURIComponent(String(e[`rego-metadata-id`]))}`,pathParams:{"rego-metadata-id":String(e[`rego-metadata-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(ku,{account_id:a,rego_metadata_id:e[`rego-metadata-id`]}));s(u,{successLabel:`Loaded`})})};var Mu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/rego-metadata`,query:[`cursor`,`per_page`,`order`,`direction`,`name`,`import_path`],joined:[`cursor`,`per_page`,`order`,`direction`,`name`,`import_path`]};function Nu(e){return e.usage(`$0 zero-trust cws rego-metadata list
|
|
439
|
-
|
|
440
|
-
Returns a paginated list of Rego metadata documents in the account.`).option(`cursor`,{type:`string`,description:`Pagination cursor from previous response`}).option(`per-page`,{type:`number`,description:`Number of items per page (1-100, default 20)`}).option(`order`,{type:`string`,description:`Field to order results by (default: created_at)`,choices:[`name`,`created_at`,`updated_at`]}).option(`direction`,{type:`string`,description:`Sort direction (default: asc)`,choices:[`asc`,`desc`]}).option(`name`,{type:`string`,description:`Filter by rego metadata name (case-insensitive substring match)`}).option(`import-path`,{type:`string`,description:`Filter by import path (case-sensitive literal substring match)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pu={command:`list`,describe:`List Rego metadata documents`,builder:Nu,handler:async e=>u({command:`zero-trust cws rego-metadata list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,per_page:e[`per-page`],order:e.order,direction:e.direction,name:e.name,import_path:e[`import-path`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust cws rego-metadata list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cws/rego-metadata`,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(Mu,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Fu={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cws/rego-metadata/${t.rego_metadata_id}`,body:`json`};function Iu(e){return e.usage(`$0 zero-trust cws rego-metadata update <rego-metadata-id>
|
|
441
|
-
|
|
442
|
-
Replaces the metadata document's name, import path, and JSON data.`).positional(`rego-metadata-id`,{type:`string`,description:`ID of the rego metadata document to update`,demandOption:!0}).option(`import-path`,{type:`string`,description:`Unique Rego import path in the form metadata.<segment>, with one alphanumeric or underscore segment. Reference it as data.<import_path>.`}).option(`name`,{type:`string`,description:`Name of the rego metadata document (unique per account)`}).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 Lu={command:`update <rego-metadata-id>`,describe:`Update a rego metadata document`,builder:Iu,handler:async e=>u({command:`zero-trust cws rego-metadata update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws rego-metadata update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/rego-metadata/${e[`rego-metadata-id`]==null?`<rego-metadata-id>`:encodeURIComponent(String(e[`rego-metadata-id`]))}`,pathParams:{"rego-metadata-id":String(e[`rego-metadata-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({import_path:_(e[`import-path`],`import-path`,`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(Fu,{body:t,account_id:a,rego_metadata_id:e[`rego-metadata-id`]}));s(r,{successLabel:`Updated`});return}e[`import-path`]===void 0&&(e[`import-path`]=await y(`import-path`,`Unique Rego import path in the form metadata.<segment>, with one alphanumeric or underscore segment. Reference it as data.<import_path>.`)),e.name===void 0&&(e.name=await y(`name`,`Name of the rego metadata document (unique per account)`));let u=g({import_path:_(e[`import-path`],`import-path`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Updating`,async()=>n.send(Fu,{body:u,account_id:a,rego_metadata_id:e[`rego-metadata-id`]}));s(d,{successLabel:`Updated`})})},Ru={command:`rego-metadata`,describe:`Operations for cws.rego-metadata`,builder:e=>e.command(Tu).command(Ou).command(ju).command(Pu).command(Lu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var zu={method:`POST`,path:t=>e`/accounts/${t.account_id}/cws/rego-modules`,body:`json`,errors:{503:`ServiceUnavailableError`}};function Bu(e){return e.usage(`$0 zero-trust cws rego-modules create
|
|
443
|
-
|
|
444
|
-
Creates a library Rego module and derives its package path from the source.`).option(`name`,{type:`string`,description:`Name of the Rego module (unique per account)`}).option(`rego-source`,{type:`string`,description:`Library Rego source with a package beginning with "lib." Maximum 16384 UTF-8 bytes.`}).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 Vu={command:`create`,describe:`Create a new Rego module`,builder:Bu,handler:async e=>u({command:`zero-trust cws rego-modules create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws rego-modules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/rego-modules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({name:_(e.name,`name`,`text`),rego_source:_(e[`rego-source`],`rego-source`,`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(zu,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`Name of the Rego module (unique per account)`)),e[`rego-source`]===void 0&&(e[`rego-source`]=await y(`rego-source`,`Library Rego source with a package beginning with "lib." Maximum 16384 UTF-8 bytes.`));let u=g({name:_(e.name,`name`,`text`),rego_source:_(e[`rego-source`],`rego-source`,`text`)}),d=await l(`Creating`,async()=>n.send(zu,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Hu={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/rego-modules/${t.rego_module_id}`};function Uu(e){return e.usage(`$0 zero-trust cws rego-modules delete <rego-module-id>
|
|
445
|
-
|
|
446
|
-
Deletes the module if no policy or library references its rules.`).positional(`rego-module-id`,{type:`string`,description:`ID of the Rego module 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 Wu={command:`delete <rego-module-id>`,describe:`Delete a Rego module`,builder:Uu,handler:async e=>u({command:`zero-trust cws rego-modules 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 cws rego-modules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/rego-modules/${e[`rego-module-id`]==null?`<rego-module-id>`:encodeURIComponent(String(e[`rego-module-id`]))}`,pathParams:{"rego-module-id":String(e[`rego-module-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:`Delete this Rego module?`}))return;let u=await l(`Deleting`,async()=>n.send(Hu,{account_id:a,rego_module_id:e[`rego-module-id`]}));s(u,{successLabel:`Deleted`})})};var Gu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/rego-modules/${t.rego_module_id}`};function Ku(e){return e.usage(`$0 zero-trust cws rego-modules get <rego-module-id>
|
|
447
|
-
|
|
448
|
-
Returns the library Rego module with the specified ID.`).positional(`rego-module-id`,{type:`string`,description:`ID of the Rego module to retrieve`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qu={command:`get <rego-module-id>`,describe:`Get a Rego module by ID`,builder:Ku,handler:async e=>u({command:`zero-trust cws rego-modules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws rego-modules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/rego-modules/${e[`rego-module-id`]==null?`<rego-module-id>`:encodeURIComponent(String(e[`rego-module-id`]))}`,pathParams:{"rego-module-id":String(e[`rego-module-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(Gu,{account_id:a,rego_module_id:e[`rego-module-id`]}));s(u,{successLabel:`Loaded`})})};var Ju={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/rego-modules`,query:[`cursor`,`per_page`,`order`,`direction`,`name`,`package_path`],joined:[`cursor`,`per_page`,`order`,`direction`,`name`,`package_path`]};function Yu(e){return e.usage(`$0 zero-trust cws rego-modules list
|
|
449
|
-
|
|
450
|
-
Returns a paginated list of library Rego modules in the account.`).option(`cursor`,{type:`string`,description:`Pagination cursor from previous response`}).option(`per-page`,{type:`number`,description:`Number of items per page (1-100, default 20)`}).option(`order`,{type:`string`,description:`Field to order results by (default: created_at)`,choices:[`name`,`created_at`,`updated_at`]}).option(`direction`,{type:`string`,description:`Sort direction (default: asc)`,choices:[`asc`,`desc`]}).option(`name`,{type:`string`,description:`Filter by Rego module name (case-insensitive substring match)`}).option(`package-path`,{type:`string`,description:`Filter by package path (case-sensitive literal substring match)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xu={command:`list`,describe:`List Rego modules`,builder:Yu,handler:async e=>u({command:`zero-trust cws rego-modules list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,per_page:e[`per-page`],order:e.order,direction:e.direction,name:e.name,package_path:e[`package-path`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust cws rego-modules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cws/rego-modules`,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(Ju,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Zu={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cws/rego-modules/${t.rego_module_id}`,body:`json`,errors:{503:`ServiceUnavailableError`}};function Qu(e){return e.usage(`$0 zero-trust cws rego-modules update <rego-module-id>
|
|
451
|
-
|
|
452
|
-
Replaces the module and validates policies and libraries that depend on it.`).positional(`rego-module-id`,{type:`string`,description:`ID of the Rego module to update`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the Rego module (unique per account)`}).option(`rego-source`,{type:`string`,description:`Library Rego source with a package beginning with "lib." Maximum 16384 UTF-8 bytes.`}).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 $u={command:`update <rego-module-id>`,describe:`Update a Rego module`,builder:Qu,handler:async e=>u({command:`zero-trust cws rego-modules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws rego-modules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/rego-modules/${e[`rego-module-id`]==null?`<rego-module-id>`:encodeURIComponent(String(e[`rego-module-id`]))}`,pathParams:{"rego-module-id":String(e[`rego-module-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({name:_(e.name,`name`,`text`),rego_source:_(e[`rego-source`],`rego-source`,`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(Zu,{body:t,account_id:a,rego_module_id:e[`rego-module-id`]}));s(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await y(`name`,`Name of the Rego module (unique per account)`)),e[`rego-source`]===void 0&&(e[`rego-source`]=await y(`rego-source`,`Library Rego source with a package beginning with "lib." Maximum 16384 UTF-8 bytes.`));let u=g({name:_(e.name,`name`,`text`),rego_source:_(e[`rego-source`],`rego-source`,`text`)}),d=await l(`Updating`,async()=>n.send(Zu,{body:u,account_id:a,rego_module_id:e[`rego-module-id`]}));s(d,{successLabel:`Updated`})})},ed={command:`rego-modules`,describe:`Operations for cws.rego-modules`,builder:e=>e.command(Vu).command(Wu).command(qu).command(Xu).command($u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var td={method:`POST`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures`,body:`json`};function nd(e){return e.usage(`$0 zero-trust cws tenant-structures create
|
|
453
|
-
|
|
454
|
-
Creates an empty tenant hierarchy for the selected cloud application.`).option(`application`,{type:`string`,description:`Platform this structure models. Immutable after creation.`,choices:[`aws`,`cloudflare`]}).coerce(`application`,e=>_(e,`application`,`text`)).option(`import-path`,{type:`string`,description:`Optional unique Rego mount path in the form tenant.<application>.<name>; application must match. Omit to leave unmounted.`}).option(`name`,{type:`string`,description:`Human-readable name; unique per account`}).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 rd={command:`create`,describe:`Create a tenant structure`,builder:nd,handler:async e=>u({command:`zero-trust cws tenant-structures create`,classification:{safeFlags:[`application`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws tenant-structures create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({application:e.application,import_path:_(e[`import-path`],`import-path`,`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(td,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.application===void 0&&(e.application=await b(`application`,`Platform this structure models. Immutable after creation.`,[`aws`,`cloudflare`])),e.name===void 0&&(e.name=await y(`name`,`Human-readable name; unique per account`));let u=g({application:e.application,import_path:_(e[`import-path`],`import-path`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(td,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var id={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures/${t.structure_id}`};function ad(e){return e.usage(`$0 zero-trust cws tenant-structures delete <structure-id>
|
|
455
|
-
|
|
456
|
-
Deletes the tenant structure and all nodes in its hierarchy.`).positional(`structure-id`,{type:`string`,description:`ID of the tenant structure 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 od={command:`delete <structure-id>`,describe:`Delete a tenant structure`,builder:ad,handler:async e=>u({command:`zero-trust cws tenant-structures 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 cws tenant-structures delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures/${e[`structure-id`]==null?`<structure-id>`:encodeURIComponent(String(e[`structure-id`]))}`,pathParams:{"structure-id":String(e[`structure-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:`Delete this tenant structure?`}))return;let u=await l(`Deleting`,async()=>n.send(id,{account_id:a,structure_id:e[`structure-id`]}));s(u,{successLabel:`Deleted`})})};var sd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures/${t.structure_id}`};function cd(e){return e.usage(`$0 zero-trust cws tenant-structures get <structure-id>
|
|
457
|
-
|
|
458
|
-
Returns the tenant structure with the specified ID.`).positional(`structure-id`,{type:`string`,description:`ID of the tenant structure to retrieve`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ld={command:`get <structure-id>`,describe:`Get a tenant structure by ID`,builder:cd,handler:async e=>u({command:`zero-trust cws tenant-structures get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws tenant-structures get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures/${e[`structure-id`]==null?`<structure-id>`:encodeURIComponent(String(e[`structure-id`]))}`,pathParams:{"structure-id":String(e[`structure-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(sd,{account_id:a,structure_id:e[`structure-id`]}));s(u,{successLabel:`Loaded`})})};var ud={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures`,query:[`cursor`,`per_page`,`order`,`direction`,`name`,`import_path`],joined:[`cursor`,`per_page`,`order`,`direction`,`name`,`import_path`]};function dd(e){return e.usage(`$0 zero-trust cws tenant-structures list
|
|
459
|
-
|
|
460
|
-
Returns a paginated list of tenant structures in the account.`).option(`cursor`,{type:`string`,description:`Pagination cursor from previous response`}).option(`per-page`,{type:`number`,description:`Number of items per page (1-100, default 20)`}).option(`order`,{type:`string`,description:`Field to order results by (default: created_at)`,choices:[`name`,`created_at`,`updated_at`]}).option(`direction`,{type:`string`,description:`Sort direction (default: asc)`,choices:[`asc`,`desc`]}).option(`name`,{type:`string`,description:`Filter by tenant structure name (case-insensitive substring match)`}).option(`import-path`,{type:`string`,description:`Filter by import path (case-sensitive literal substring match)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fd={command:`list`,describe:`List tenant structures for an account`,builder:dd,handler:async e=>u({command:`zero-trust cws tenant-structures list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,per_page:e[`per-page`],order:e.order,direction:e.direction,name:e.name,import_path:e[`import-path`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust cws tenant-structures list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cws/tenant-structures`,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(ud,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var pd={method:`POST`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures/${t.structure_id}/nodes/batch`,body:`json`,errors:{503:`ServiceUnavailableError`}};function md(e){return e.usage(`$0 zero-trust cws tenant-structures nodes batch <structure-id>
|
|
461
|
-
|
|
462
|
-
Atomically validates and applies 1 to 500 unordered node operations. Creates may reference new parents but cannot reuse a native_id deleted in the same batch. Maximum body size: 1 MiB.`).positional(`structure-id`,{type:`string`,description:`ID of the parent tenant structure`,demandOption:!0}).option(`creates`,{type:`string`,description:`Nodes to create; parents may be created elsewhere in this request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`deletes`,{type:`string`,description:`Nodes to delete; every descendant that will not be reparented must also be deleted. Provide as a JSON array of objects or @path/to/file.json.`}).option(`updates`,{type:`string`,description:`Nodes whose mutable fields should be fully replaced. 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(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const hd={command:`batch <structure-id>`,describe:`Apply a batch of tenant node mutations`,builder:md,handler:async e=>u({command:`zero-trust cws tenant-structures nodes batch`,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 cws tenant-structures nodes batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures/${e[`structure-id`]==null?`<structure-id>`:encodeURIComponent(String(e[`structure-id`]))}/nodes/batch`,pathParams:{"structure-id":String(e[`structure-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({creates:d(e.creates,`creates`),deletes:d(e.deletes,`deletes`),updates:d(e.updates,`updates`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await x({force:!!e.force,message:`Apply this tenant node batch?`}))return;if(e.body){let t=f(e.body),r=await l(`Deleting`,async()=>n.send(pd,{body:t,account_id:a,structure_id:e[`structure-id`]}));s(r,{successLabel:`Deleted`});return}if(e.creates===void 0)throw Error(`--creates is required (or pass --body with this field set).`);if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.updates===void 0)throw Error(`--updates is required (or pass --body with this field set).`);let u=g({creates:d(e.creates,`creates`),deletes:d(e.deletes,`deletes`),updates:d(e.updates,`updates`)}),p=await l(`Deleting`,async()=>n.send(pd,{body:u,account_id:a,structure_id:e[`structure-id`]}));s(p,{successLabel:`Deleted`})})};var gd={method:`POST`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures/${t.structure_id}/nodes`,body:`json`};function _d(e){return e.usage(`$0 zero-trust cws tenant-structures nodes create <structure-id>
|
|
463
|
-
|
|
464
|
-
Adds a validated cloud-native node to the tenant hierarchy.`).positional(`structure-id`,{type:`string`,description:`ID of the parent tenant structure`,demandOption:!0}).option(`name`,{type:`string`,description:`Display name (e.g. an OU or account name), mutable. Optional; empty by default.`}).option(`native-id`,{type:`string`,description:`Cloud-native identifier of this node, unique within the structure; the parent-reference target. Shape depends on the structure's application. Immutable after create.`}).option(`node-kind`,{type:`string`,description:`Position in the tree. Legal values depend on the structure's application (aws: root/ou/account; cloudflare: org/account/zone). At most one root per structure. Immutable after create.`}).option(`parent`,{type:`string`,description:`Native ID of this node's parent. Required for non-root nodes and omitted for the root. The parent must be in the same structure and able to contain this node kind.`}).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 vd={command:`create <structure-id>`,describe:`Add a node to a tenant structure`,builder:_d,handler:async e=>u({command:`zero-trust cws tenant-structures nodes create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws tenant-structures nodes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures/${e[`structure-id`]==null?`<structure-id>`:encodeURIComponent(String(e[`structure-id`]))}/nodes`,pathParams:{"structure-id":String(e[`structure-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({name:_(e.name,`name`,`text`),native_id:_(e[`native-id`],`native-id`,`text`),node_kind:_(e[`node-kind`],`node-kind`,`text`),parent:_(e.parent,`parent`,`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(gd,{body:t,account_id:a,structure_id:e[`structure-id`]}));s(r,{successLabel:`Created`});return}e[`native-id`]===void 0&&(e[`native-id`]=await y(`native-id`,`Cloud-native identifier of this node, unique within the structure; the parent-reference target. Shape depends on the structure's application. Immutable after create.`)),e[`node-kind`]===void 0&&(e[`node-kind`]=await y(`node-kind`,`Position in the tree. Legal values depend on the structure's application (aws: root/ou/account; cloudflare: org/account/zone). At most one root per structure. Immutable after create.`));let u=g({name:_(e.name,`name`,`text`),native_id:_(e[`native-id`],`native-id`,`text`),node_kind:_(e[`node-kind`],`node-kind`,`text`),parent:_(e.parent,`parent`,`text`)}),d=await l(`Creating`,async()=>n.send(gd,{body:u,account_id:a,structure_id:e[`structure-id`]}));s(d,{successLabel:`Created`})})};var yd={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures/${t.structure_id}/nodes/${t.node_id}`};function bd(e){return e.usage(`$0 zero-trust cws tenant-structures nodes delete <node-id>
|
|
465
|
-
|
|
466
|
-
Deletes a childless node from the tenant hierarchy.`).positional(`node-id`,{type:`string`,description:`ID of the node to delete`,demandOption:!0}).option(`structure-id`,{type:`string`,description:`ID of the parent tenant structure`,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 xd={command:`delete <node-id>`,describe:`Delete a tenant node`,builder:bd,handler:async e=>u({command:`zero-trust cws tenant-structures nodes 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 cws tenant-structures nodes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures/${e[`structure-id`]==null?`<structure-id>`:encodeURIComponent(String(e[`structure-id`]))}/nodes/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"structure-id":String(e[`structure-id`]??``),"node-id":String(e[`node-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:`Delete this tenant node?`}))return;let u=await l(`Deleting`,async()=>n.send(yd,{account_id:a,structure_id:e[`structure-id`],node_id:e[`node-id`]}));s(u,{successLabel:`Deleted`})})};var Sd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures/${t.structure_id}/nodes/${t.node_id}`};function Cd(e){return e.usage(`$0 zero-trust cws tenant-structures nodes get <node-id>
|
|
467
|
-
|
|
468
|
-
Returns the tenant node with the specified ID.`).positional(`node-id`,{type:`string`,description:`ID of the node to retrieve`,demandOption:!0}).option(`structure-id`,{type:`string`,description:`ID of the parent tenant structure`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const wd={command:`get <node-id>`,describe:`Get a tenant node by ID`,builder:Cd,handler:async e=>u({command:`zero-trust cws tenant-structures nodes get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws tenant-structures nodes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures/${e[`structure-id`]==null?`<structure-id>`:encodeURIComponent(String(e[`structure-id`]))}/nodes/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"structure-id":String(e[`structure-id`]??``),"node-id":String(e[`node-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(Sd,{account_id:a,structure_id:e[`structure-id`],node_id:e[`node-id`]}));s(u,{successLabel:`Loaded`})})};var Td={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures/${t.structure_id}/nodes`,query:[`cursor`,`per_page`,`order`,`direction`,`node_kind`,`native_id`,`name`,`parent`],joined:[`cursor`,`per_page`,`order`,`direction`,`node_kind`,`native_id`,`name`,`parent`]};function Ed(e){return e.usage(`$0 zero-trust cws tenant-structures nodes list
|
|
469
|
-
|
|
470
|
-
Returns a paginated list of nodes in the tenant structure.`).option(`structure-id`,{type:`string`,description:`ID of the parent tenant structure`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Pagination cursor from previous response`}).option(`per-page`,{type:`number`,description:`Number of items per page (1-100, default 20)`}).option(`order`,{type:`string`,description:`Field to order results by (default: created_at)`,choices:[`name`,`created_at`,`updated_at`]}).option(`direction`,{type:`string`,description:`Sort direction (default: asc)`,choices:[`asc`,`desc`]}).option(`node-kind`,{type:`string`,description:`Filter by exact node kind`}).option(`native-id`,{type:`string`,description:`Filter by exact cloud-native identifier`}).option(`name`,{type:`string`,description:`Filter by node name (case-insensitive substring match)`}).option(`parent`,{type:`string`,description:`Filter by exact parent native ID`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Dd={command:`list`,describe:`List nodes for a tenant structure`,builder:Ed,handler:async e=>u({command:`zero-trust cws tenant-structures nodes list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,per_page:e[`per-page`],order:e.order,direction:e.direction,node_kind:e[`node-kind`],native_id:e[`native-id`],name:e.name,parent:e.parent};if(e.dryRun){let t=await i();c({command:`cf zero-trust cws tenant-structures nodes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures/${e[`structure-id`]==null?`<structure-id>`:encodeURIComponent(String(e[`structure-id`]))}/nodes`,pathParams:{"structure-id":String(e[`structure-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(Td,{account_id:u,structure_id:e[`structure-id`],...n}));s(d,{successLabel:`Loaded`})})};var Od={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures/${t.structure_id}/nodes/${t.node_id}`,body:`json`};function kd(e){return e.usage(`$0 zero-trust cws tenant-structures nodes update <node-id>
|
|
471
|
-
|
|
472
|
-
Updates the node's display name or parent while preserving its immutable identity fields.`).positional(`node-id`,{type:`string`,description:`ID of the node to update`,demandOption:!0}).option(`structure-id`,{type:`string`,description:`ID of the parent tenant structure`,demandOption:!0}).option(`name`,{type:`string`,description:`Display name (e.g. an OU or account name), mutable. Optional; empty by default.`}).option(`native-id`,{type:`string`,description:`Cloud-native identifier of this node, unique within the structure; the parent-reference target. Shape depends on the structure's application. Immutable after create.`}).option(`node-kind`,{type:`string`,description:`Position in the tree. Legal values depend on the structure's application (aws: root/ou/account; cloudflare: org/account/zone). At most one root per structure. Immutable after create.`}).option(`parent`,{type:`string`,description:`Native ID of this node's parent. Required for non-root nodes and omitted for the root. The parent must be in the same structure and able to contain this node kind.`}).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 Ad={command:`update <node-id>`,describe:`Update a tenant node`,builder:kd,handler:async e=>u({command:`zero-trust cws tenant-structures nodes update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws tenant-structures nodes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures/${e[`structure-id`]==null?`<structure-id>`:encodeURIComponent(String(e[`structure-id`]))}/nodes/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"structure-id":String(e[`structure-id`]??``),"node-id":String(e[`node-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({name:_(e.name,`name`,`text`),native_id:_(e[`native-id`],`native-id`,`text`),node_kind:_(e[`node-kind`],`node-kind`,`text`),parent:_(e.parent,`parent`,`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(Od,{body:t,account_id:a,structure_id:e[`structure-id`],node_id:e[`node-id`]}));s(r,{successLabel:`Updated`});return}e[`native-id`]===void 0&&(e[`native-id`]=await y(`native-id`,`Cloud-native identifier of this node, unique within the structure; the parent-reference target. Shape depends on the structure's application. Immutable after create.`)),e[`node-kind`]===void 0&&(e[`node-kind`]=await y(`node-kind`,`Position in the tree. Legal values depend on the structure's application (aws: root/ou/account; cloudflare: org/account/zone). At most one root per structure. Immutable after create.`));let u=g({name:_(e.name,`name`,`text`),native_id:_(e[`native-id`],`native-id`,`text`),node_kind:_(e[`node-kind`],`node-kind`,`text`),parent:_(e.parent,`parent`,`text`)}),d=await l(`Updating`,async()=>n.send(Od,{body:u,account_id:a,structure_id:e[`structure-id`],node_id:e[`node-id`]}));s(d,{successLabel:`Updated`})})},jd={command:`nodes`,describe:`Operations for cws.tenant-structures.nodes`,builder:e=>e.command(hd).command(vd).command(xd).command(wd).command(Dd).command(Ad).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Md={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cws/tenant-structures/${t.structure_id}`,body:`json`};function Nd(e){return e.usage(`$0 zero-trust cws tenant-structures update <structure-id>
|
|
473
|
-
|
|
474
|
-
Updates the tenant structure's name and import path; its application remains immutable.`).positional(`structure-id`,{type:`string`,description:`ID of the tenant structure to update`,demandOption:!0}).option(`application`,{type:`string`,description:`Platform this structure models. Must match the existing value.`,choices:[`aws`,`cloudflare`]}).coerce(`application`,e=>_(e,`application`,`text`)).option(`import-path`,{type:`string`,description:`Optional unique Rego mount path in the form tenant.<application>.<name>; application must match. Omit to clear.`}).option(`name`,{type:`string`,description:`Human-readable name; unique per account`}).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 Pd={command:`update <structure-id>`,describe:`Update a tenant structure`,builder:Nd,handler:async e=>u({command:`zero-trust cws tenant-structures update`,classification:{safeFlags:[`application`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws tenant-structures update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/tenant-structures/${e[`structure-id`]==null?`<structure-id>`:encodeURIComponent(String(e[`structure-id`]))}`,pathParams:{"structure-id":String(e[`structure-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({application:e.application,import_path:_(e[`import-path`],`import-path`,`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(Md,{body:t,account_id:a,structure_id:e[`structure-id`]}));s(r,{successLabel:`Updated`});return}e.application===void 0&&(e.application=await b(`application`,`Platform this structure models. Must match the existing value.`,[`aws`,`cloudflare`])),e.name===void 0&&(e.name=await y(`name`,`Human-readable name; unique per account`));let u=g({application:e.application,import_path:_(e[`import-path`],`import-path`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Updating`,async()=>n.send(Md,{body:u,account_id:a,structure_id:e[`structure-id`]}));s(d,{successLabel:`Updated`})})},Fd={command:`tenant-structures`,describe:`Operations for cws.tenant-structures`,builder:e=>e.command(rd).command(od).command(ld).command(fd).command(Pd).command(jd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Id={method:`POST`,path:t=>e`/accounts/${t.account_id}/cws/workloads`,body:`json`};function Ld(e){return e.usage(`$0 zero-trust cws workloads create
|
|
475
|
-
|
|
476
|
-
Creates a reusable workload selector from a filter expression.`).option(`description`,{type:`string`,description:`Optional free-form description.`}).option(`filter`,{type:`string`,description:`Filter expression selecting the requests this workload matches. Maximum 4096 UTF-8 bytes.`}).option(`name`,{type:`string`,description:`Human-readable handle; unique per account.`}).option(`tags`,{type:`string`,description:`Tags to attach. Keys are limited to 256 UTF-8 bytes and values to 1024 UTF-8 bytes. 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:`Raw JSON request body (bypasses individual flags)`})}const Rd={command:`create`,describe:`Create a new workload`,builder:Ld,handler:async e=>u({command:`zero-trust cws workloads create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws workloads create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/workloads`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),filter:_(e.filter,`filter`,`text`),name:_(e.name,`name`,`text`),tags:m(e.tags,`tags`)},[[`tags`]]):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(Id,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.filter===void 0&&(e.filter=await y(`filter`,`Filter expression selecting the requests this workload matches. Maximum 4096 UTF-8 bytes.`)),e.name===void 0&&(e.name=await y(`name`,`Human-readable handle; unique per account.`));let u=g({description:_(e.description,`description`,`text`),filter:_(e.filter,`filter`,`text`),name:_(e.name,`name`,`text`),tags:m(e.tags,`tags`)},[[`tags`]]),d=await l(`Creating`,async()=>n.send(Id,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var zd={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cws/workloads/${t.workload_id}`};function Bd(e){return e.usage(`$0 zero-trust cws workloads delete <workload-id>
|
|
477
|
-
|
|
478
|
-
Deletes the workload if it is not targeted by a policy set.`).positional(`workload-id`,{type:`string`,description:`ID of the workload 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 Vd={command:`delete <workload-id>`,describe:`Delete a workload`,builder:Bd,handler:async e=>u({command:`zero-trust cws workloads 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 cws workloads delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/workloads/${e[`workload-id`]==null?`<workload-id>`:encodeURIComponent(String(e[`workload-id`]))}`,pathParams:{"workload-id":String(e[`workload-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:`Delete this workload?`}))return;let u=await l(`Deleting`,async()=>n.send(zd,{account_id:a,workload_id:e[`workload-id`]}));s(u,{successLabel:`Deleted`})})};var Hd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/workloads/${t.workload_id}`};function Ud(e){return e.usage(`$0 zero-trust cws workloads get <workload-id>
|
|
479
|
-
|
|
480
|
-
Returns the workload with the specified ID.`).positional(`workload-id`,{type:`string`,description:`ID of the workload to retrieve`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Wd={command:`get <workload-id>`,describe:`Get a workload by ID`,builder:Ud,handler:async e=>u({command:`zero-trust cws workloads get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws workloads get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/workloads/${e[`workload-id`]==null?`<workload-id>`:encodeURIComponent(String(e[`workload-id`]))}`,pathParams:{"workload-id":String(e[`workload-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(Hd,{account_id:a,workload_id:e[`workload-id`]}));s(u,{successLabel:`Loaded`})})};var Gd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cws/workloads`,query:[`cursor`,`per_page`,`order`,`direction`,`name`,`policy_set_id`],joined:[`cursor`,`per_page`,`order`,`direction`,`name`,`policy_set_id`]};function Kd(e){return e.usage(`$0 zero-trust cws workloads list
|
|
481
|
-
|
|
482
|
-
Returns a paginated list of workloads in the account.`).option(`cursor`,{type:`string`,description:`Pagination cursor from previous response`}).option(`per-page`,{type:`number`,description:`Number of items per page (1-100, default 20)`}).option(`order`,{type:`string`,description:`Field to order results by (default: created_at)`,choices:[`name`,`created_at`,`updated_at`]}).option(`direction`,{type:`string`,description:`Sort direction (default: asc)`,choices:[`asc`,`desc`]}).option(`name`,{type:`string`,description:`Filter by workload name (case-insensitive substring match)`}).option(`policy-set-id`,{type:`string`,description:`Filter to workloads attached to this policy set`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qd={command:`list`,describe:`List workloads`,builder:Kd,handler:async e=>u({command:`zero-trust cws workloads list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,per_page:e[`per-page`],order:e.order,direction:e.direction,name:e.name,policy_set_id:e[`policy-set-id`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust cws workloads list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cws/workloads`,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(Gd,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Jd={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cws/workloads/${t.workload_id}`,body:`json`};function Yd(e){return e.usage(`$0 zero-trust cws workloads update <workload-id>
|
|
483
|
-
|
|
484
|
-
Replaces the workload's configuration. Omit tags or use {} to clear them.`).positional(`workload-id`,{type:`string`,description:`ID of the workload to update`,demandOption:!0}).option(`description`,{type:`string`,description:`Optional free-form description.`}).option(`filter`,{type:`string`,description:`Filter expression selecting the requests this workload matches. Maximum 4096 UTF-8 bytes.`}).option(`name`,{type:`string`,description:`Human-readable handle; unique per account.`}).option(`tags`,{type:`string`,description:`Replacement tag set. Omit or use {} to clear. Keys are limited to 256 UTF-8 bytes and values to 1024 UTF-8 bytes. 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:`Raw JSON request body (bypasses individual flags)`})}const Xd={command:`update <workload-id>`,describe:`Update a workload`,builder:Yd,handler:async e=>u({command:`zero-trust cws workloads update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust cws workloads update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cws/workloads/${e[`workload-id`]==null?`<workload-id>`:encodeURIComponent(String(e[`workload-id`]))}`,pathParams:{"workload-id":String(e[`workload-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),filter:_(e.filter,`filter`,`text`),name:_(e.name,`name`,`text`),tags:m(e.tags,`tags`)},[[`tags`]]):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(Jd,{body:t,account_id:a,workload_id:e[`workload-id`]}));s(r,{successLabel:`Updated`});return}e.filter===void 0&&(e.filter=await y(`filter`,`Filter expression selecting the requests this workload matches. Maximum 4096 UTF-8 bytes.`)),e.name===void 0&&(e.name=await y(`name`,`Human-readable handle; unique per account.`));let u=g({description:_(e.description,`description`,`text`),filter:_(e.filter,`filter`,`text`),name:_(e.name,`name`,`text`),tags:m(e.tags,`tags`)},[[`tags`]]),d=await l(`Updating`,async()=>n.send(Jd,{body:u,account_id:a,workload_id:e[`workload-id`]}));s(d,{successLabel:`Updated`})})},Zd={command:`workloads`,describe:`Operations for cws.workloads`,builder:e=>e.command(Rd).command(Vd).command(Wd).command(qd).command(Xd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Qd={command:`cws`,describe:`Operations for cws`,builder:e=>e.command(fl).command(Ol).command(Wl).command(ou).command(Su).command(Ru).command(ed).command(Fd).command(Zd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $d={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/client-versions`,query:[`target_environment`,`release_track`,`page`,`per_page`]};function ef(e){return e.usage(`$0 zero-trust devices client-versions list
|
|
485
|
-
|
|
486
|
-
Lists available WARP client versions for a specific target environment and release track. This endpoint is in Beta.`).option(`target-environment`,{type:`string`,description:`The target environment for the client version (e.g., windows, macos).`,demandOption:!0}).option(`release-track`,{type:`string`,description:`The release track (ga for General Availability, beta for Beta releases).`,choices:[`ga`,`beta`],demandOption:!0}).option(`page`,{type:`number`,description:`The page number to return.`}).option(`per-page`,{type:`number`,description:`The maximum number of versions to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const tf={command:`list`,describe:`List client versions`,builder:ef,handler:async e=>u({command:`zero-trust devices client-versions list`,classification:{safeFlags:[`release-track`,`dry-run`]}},e,async()=>{let n={target_environment:e[`target-environment`],release_track:e[`release-track`],page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust devices client-versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/client-versions`,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($d,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var nf={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/client-versions/target-environments`};function rf(e){return e.usage(`$0 zero-trust devices client-versions target-environments list
|
|
487
|
-
|
|
488
|
-
Retrieves a list of all available target environments with their display names. This endpoint is in Beta.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const af={command:`list`,describe:`List available target environments`,builder:rf,handler:async e=>u({command:`zero-trust devices client-versions target-environments list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust devices client-versions target-environments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/client-versions/target-environments`,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(nf,{account_id:a}));s(u,{successLabel:`Loaded`})})},of={command:`target-environments`,describe:`Operations for devices.client-versions.target-environments`,builder:e=>e.command(af).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},sf={command:`client-versions`,describe:`Operations for devices.client-versions`,builder:e=>e.command(tf).command(of).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var cf={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/physical-devices/${t.device_id}`};function lf(e){return e.usage(`$0 zero-trust devices delete <device-id>
|
|
489
|
-
|
|
490
|
-
Deletes a WARP device.`).positional(`device-id`,{type:`string`,description:`Device 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 uf={command:`delete <device-id>`,describe:`Delete device`,builder:lf,handler:async e=>u({command:`zero-trust devices 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 delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/physical-devices/${e[`device-id`]==null?`<device-id>`:encodeURIComponent(String(e[`device-id`]))}`,pathParams:{"device-id":String(e[`device-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(cf,{account_id:a,device_id:e[`device-id`]}));s(u,{successLabel:`Deleted`})})};var df={method:`POST`,path:t=>e`/accounts/${t.account_id}/devices/deployment-groups`,body:`json`};function ff(e){return e.usage(`$0 zero-trust devices deployment-groups create
|
|
491
|
-
|
|
492
|
-
Creates a new deployment group. Policy IDs must be unique across all deployment groups. This endpoint is in Beta.`).option(`name`,{type:`string`,description:`A user-friendly name for the deployment group.`}).option(`policy-ids`,{type:`string`,array:!0,description:`Contains an optional list of policy IDs assigned to a group.`}).option(`version-config`,{type:`string`,description:`Contains at least one version configuration. 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 pf={command:`create`,describe:`Create deployment group`,builder:ff,handler:async e=>u({command:`zero-trust devices deployment-groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices deployment-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/deployment-groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({name:_(e.name,`name`,`text`),policy_ids:e[`policy-ids`],version_config:d(e[`version-config`],`version-config`)}):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(df,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await y(`name`,`A user-friendly name for the deployment group.`)),e[`version-config`]===void 0)throw Error(`--version-config is required (or pass --body with this field set).`);let u=g({name:_(e.name,`name`,`text`),policy_ids:e[`policy-ids`],version_config:d(e[`version-config`],`version-config`)}),p=await l(`Creating`,async()=>n.send(df,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var mf={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/deployment-groups/${t.group_id}`};function hf(e){return e.usage(`$0 zero-trust devices deployment-groups delete <group-id>
|
|
493
|
-
|
|
494
|
-
Deletes a deployment group. Associated policies no longer apply and devices stop receiving version targets. This endpoint is in Beta.`).positional(`group-id`,{type:`string`,description:`Group 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 gf={command:`delete <group-id>`,describe:`Delete deployment group`,builder:hf,handler:async e=>u({command:`zero-trust devices deployment-groups 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 deployment-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/deployment-groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-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(mf,{account_id:a,group_id:e[`group-id`]}));s(u,{successLabel:`Deleted`})})};var _f={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/deployment-groups/${t.group_id}`};function vf(e){return e.usage(`$0 zero-trust devices deployment-groups get <group-id>
|
|
495
|
-
|
|
496
|
-
Fetches a single deployment group by its ID. This endpoint is in Beta.`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const yf={command:`get <group-id>`,describe:`Get deployment group`,builder:vf,handler:async e=>u({command:`zero-trust devices deployment-groups get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices deployment-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/deployment-groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"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(_f,{account_id:a,group_id:e[`group-id`]}));s(u,{successLabel:`Loaded`})})};var bf={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/deployment-groups`,query:[`page`,`per_page`]};function xf(e){return e.usage(`$0 zero-trust devices deployment-groups list
|
|
497
|
-
|
|
498
|
-
Lists all deployment groups for an account. Use deployment groups to assign target WARP client versions to specific devices. This endpoint is in Beta.`).option(`page`,{type:`number`,description:`The page number to return.`}).option(`per-page`,{type:`number`,description:`The maximum number of deployment groups to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Sf={command:`list`,describe:`List deployment groups`,builder:xf,handler:async e=>u({command:`zero-trust devices deployment-groups 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 devices deployment-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/deployment-groups`,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(bf,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Cf={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/devices/deployment-groups/${t.group_id}`,body:`json`};function wf(e){return e.usage(`$0 zero-trust devices deployment-groups update <group-id>
|
|
499
|
-
|
|
500
|
-
Updates a deployment group. Returns 409 if any newly added policy IDs already belong to another deployment group. This endpoint is in Beta.`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`name`,{type:`string`,description:`A user-friendly name for the deployment group.`}).option(`policy-ids`,{type:`string`,array:!0,description:`Replaces the entire list of policy IDs.`}).option(`version-config`,{type:`string`,description:`Replaces the entire version_config array. 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 Tf={command:`update <group-id>`,describe:`Update deployment group`,builder:wf,handler:async e=>u({command:`zero-trust devices deployment-groups update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices deployment-groups update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/deployment-groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({name:_(e.name,`name`,`text`),policy_ids:e[`policy-ids`],version_config:d(e[`version-config`],`version-config`)}):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(Cf,{body:t,account_id:a,group_id:e[`group-id`]}));s(r,{successLabel:`Updated`});return}let u=g({name:_(e.name,`name`,`text`),policy_ids:e[`policy-ids`],version_config:d(e[`version-config`],`version-config`)}),p=await l(`Updating`,async()=>n.send(Cf,{body:u,account_id:a,group_id:e[`group-id`]}));s(p,{successLabel:`Updated`})})},Ef={command:`deployment-groups`,describe:`Operations for devices.deployment-groups`,builder:e=>e.command(pf).command(gf).command(yf).command(Sf).command(Tf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Df={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/resilience/disconnect`};function Of(e){return e.usage(`$0 zero-trust devices emergency-disconnect get
|
|
501
|
-
|
|
502
|
-
Fetch the Global WARP disconnect state.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const kf={command:`get`,describe:`Get Global Disconnect`,builder:Of,handler:async e=>u({command:`zero-trust devices emergency-disconnect get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust devices emergency-disconnect get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/resilience/disconnect`,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(Df,{account_id:a}));s(u,{successLabel:`Loaded`})})};var Af={method:`POST`,path:t=>e`/accounts/${t.account_id}/devices/resilience/disconnect`,body:`json`};function jf(e){return e.usage(`$0 zero-trust devices emergency-disconnect set
|
|
503
|
-
|
|
504
|
-
Sets the Global WARP disconnect state.`).option(`disconnect`,{type:`boolean`,description:`Disconnects all devices on the account using Global WARP override.`}).option(`justification`,{type:`string`,description:`Reasoning for setting the Global WARP override state. This will be surfaced in the audit log.`}).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 Mf={command:`set`,describe:`Set Global Disconnect`,builder:jf,handler:async e=>u({command:`zero-trust devices emergency-disconnect set`,classification:{safeFlags:[`disconnect`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices emergency-disconnect set`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/resilience/disconnect`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({disconnect:e.disconnect,justification:_(e.justification,`justification`,`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(Af,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.disconnect===void 0)throw Error(`--disconnect is required (or pass --body with this field set).`);let u=g({disconnect:e.disconnect,justification:_(e.justification,`justification`,`text`)}),d=await l(`Creating`,async()=>n.send(Af,{body:u,account_id:a}));s(d,{successLabel:`Created`})})},Nf={command:`emergency-disconnect`,describe:`Operations for devices.emergency-disconnect`,builder:e=>e.command(kf).command(Mf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Pf={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/physical-devices/${t.device_id}`,query:[`include`]};function Ff(e){return e.usage(`$0 zero-trust devices get <device-id>
|
|
505
|
-
|
|
506
|
-
Fetches a single WARP device.`).positional(`device-id`,{type:`string`,description:`Device ID`,demandOption:!0}).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 If={command:`get <device-id>`,describe:`Get device`,builder:Ff,handler:async e=>u({command:`zero-trust devices 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 get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/physical-devices/${e[`device-id`]==null?`<device-id>`:encodeURIComponent(String(e[`device-id`]))}`,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(Pf,{account_id:u,device_id:e[`device-id`],...n}));s(d,{successLabel:`Loaded`})})};var Lf={method:`POST`,path:t=>e`/accounts/${t.account_id}/devices/ip-profiles`,body:`json`};function Rf(e){return e.usage(`$0 zero-trust devices ip-profiles create
|
|
507
|
-
|
|
508
|
-
Creates a WARP Device IP profile. Currently, only IPv4 Device subnets can be associated.`).option(`description`,{type:`string`,description:`An optional description of the Device IP profile.`}).option(`enabled`,{type:`boolean`,description:`Whether the Device IP profile will be applied to matching devices.`,default:!0}).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 zf={command:`create`,describe:`Create IP profile`,builder:Rf,handler:async e=>u({command:`zero-trust devices ip-profiles create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices ip-profiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/ip-profiles`,pathParams:{},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(`Creating`,async()=>n.send(Lf,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.match===void 0&&(e.match=await y(`match`,`The wirefilter expression to match registrations. Available values: "identity.name", "identity.email", "identity.groups.id", "identity.groups.name", "identity.groups.email", "identity.saml_attributes".`)),e.name===void 0&&(e.name=await y(`name`,`A user-friendly name for the Device IP profile.`)),e.precedence===void 0)throw Error(`--precedence is required (or pass --body with this field set).`);e[`subnet-id`]===void 0&&(e[`subnet-id`]=await y(`subnet-id`,`The ID of the Subnet.`));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(`Creating`,async()=>n.send(Lf,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Bf={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/ip-profiles/${t.profile_id}`};function Vf(e){return e.usage(`$0 zero-trust devices ip-profiles delete <profile-id>
|
|
509
|
-
|
|
510
|
-
Delete a WARP Device IP profile.`).positional(`profile-id`,{type:`string`,description:`Profile 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 Hf={command:`delete <profile-id>`,describe:`Delete IP profile`,builder:Vf,handler:async e=>u({command:`zero-trust devices ip-profiles 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 ip-profiles delete`,method:`DELETE`,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:`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(Bf,{account_id:a,profile_id:e[`profile-id`]}));s(u,{successLabel:`Deleted`})})};var Uf={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/ip-profiles/${t.profile_id}`};function Wf(e){return e.usage(`$0 zero-trust devices ip-profiles get <profile-id>
|
|
511
|
-
|
|
512
|
-
Fetches a single WARP Device IP profile.`).positional(`profile-id`,{type:`string`,description:`Profile ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gf={command:`get <profile-id>`,describe:`Get IP profile`,builder:Wf,handler:async e=>u({command:`zero-trust devices ip-profiles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices ip-profiles get`,method:`GET`,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:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Uf,{account_id:a,profile_id:e[`profile-id`]}));s(u,{successLabel:`Loaded`})})};var Kf={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/ip-profiles`,query:[`page`,`per_page`]};function qf(e){return e.usage(`$0 zero-trust devices ip-profiles list
|
|
513
|
-
|
|
514
|
-
Lists WARP Device IP profiles.`).option(`page`,{type:`number`,description:`The page number to return.`}).option(`per-page`,{type:`number`,description:`The number of IP profiles to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Jf={command:`list`,describe:`List IP profiles`,builder:qf,handler:async e=>u({command:`zero-trust devices ip-profiles 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 devices ip-profiles list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/ip-profiles`,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(Kf,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Yf={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/devices/ip-profiles/${t.profile_id}`,body:`json`};function Xf(e){return e.usage(`$0 zero-trust devices ip-profiles update <profile-id>
|
|
515
|
-
|
|
516
|
-
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 Zf={command:`update <profile-id>`,describe:`Update IP profile`,builder:Xf,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(Yf,{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(Yf,{body:u,account_id:a,profile_id:e[`profile-id`]}));s(d,{successLabel:`Updated`})})},Qf={command:`ip-profiles`,describe:`Operations for devices.ip-profiles`,builder:e=>e.command(zf).command(Hf).command(Gf).command(Jf).command(Zf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $f={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 ep(e){return e.usage(`$0 zero-trust devices list
|
|
517
|
-
|
|
518
|
-
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 tp={command:`list`,describe:`List devices`,builder:ep,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($f,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var np={method:`POST`,path:t=>e`/accounts/${t.account_id}/devices/networks`,body:`json`,constants:{type:`tls`}};function rp(e){return e.usage(`$0 zero-trust devices networks create
|
|
519
|
-
|
|
520
|
-
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 ip={command:`create`,describe:`Create a device managed network`,builder:rp,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(np,{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(np,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var ap={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/networks/${t.network_id}`};function op(e){return e.usage(`$0 zero-trust devices networks delete <network-id>
|
|
521
|
-
|
|
522
|
-
Deletes a device managed network and fetches a list of the remaining device managed networks for an account.`).positional(`network-id`,{type:`string`,description:`API 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 sp={command:`delete <network-id>`,describe:`Delete a device managed network`,builder:op,handler:async e=>u({command:`zero-trust devices networks 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 networks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/networks/${e[`network-id`]==null?`<network-id>`:encodeURIComponent(String(e[`network-id`]))}`,pathParams:{"network-id":String(e[`network-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(ap,{account_id:a,network_id:e[`network-id`]}));s(u,{successLabel:`Deleted`})})};var cp={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/networks/${t.network_id}`};function lp(e){return e.usage(`$0 zero-trust devices networks get <network-id>
|
|
523
|
-
|
|
524
|
-
Fetches details for a single managed network.`).positional(`network-id`,{type:`string`,description:`API UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const up={command:`get <network-id>`,describe:`Get device managed network details`,builder:lp,handler:async e=>u({command:`zero-trust devices networks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices networks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/networks/${e[`network-id`]==null?`<network-id>`:encodeURIComponent(String(e[`network-id`]))}`,pathParams:{"network-id":String(e[`network-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(cp,{account_id:a,network_id:e[`network-id`]}));s(u,{successLabel:`Loaded`})})};var dp={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/networks`};function fp(e){return e.usage(`$0 zero-trust devices networks list
|
|
525
|
-
|
|
526
|
-
Fetches a list of managed networks for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pp={command:`list`,describe:`List your device managed networks`,builder:fp,handler:async e=>u({command:`zero-trust devices networks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust devices networks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/networks`,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(dp,{account_id:a}));s(u,{successLabel:`Loaded`})})};var mp={method:`PUT`,path:t=>e`/accounts/${t.account_id}/devices/networks/${t.network_id}`,body:`json`};function hp(e){return e.usage(`$0 zero-trust devices networks update <network-id>
|
|
527
|
-
|
|
528
|
-
Updates a configured device managed network.`).positional(`network-id`,{type:`string`,description:`API UUID.`,demandOption:!0}).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)`}).check(e=>{let t=[`network-config-sha256`,`network-config-tls-sockaddr`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`network-config-tls-sockaddr`].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 --config-* flag is set`)}return!0})}const gp={command:`update <network-id>`,describe:`Update a device managed network`,builder:hp,handler:async e=>u({command:`zero-trust devices networks update`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices networks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/networks/${e[`network-id`]==null?`<network-id>`:encodeURIComponent(String(e[`network-id`]))}`,pathParams:{"network-id":String(e[`network-id`]??``)},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(`Updating`,async()=>n.send(mp,{body:t,account_id:a,network_id:e[`network-id`]}));s(r,{successLabel:`Updated`});return}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(`Updating`,async()=>n.send(mp,{body:u,account_id:a,network_id:e[`network-id`]}));s(d,{successLabel:`Updated`})})},_p={command:`networks`,describe:`Operations for devices.networks`,builder:e=>e.command(ip).command(sp).command(up).command(pp).command(gp).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var vp={method:`POST`,path:t=>e`/accounts/${t.account_id}/devices/override_codes`,body:`json`,constants:{type:`uninstall_protection`}};function yp(e){return e.usage(`$0 zero-trust devices override-codes create
|
|
529
|
-
|
|
530
|
-
Generates an account-wide or device-specific uninstall protection override code.`).option(`device-id`,{type:`string`,description:`Physical device ID. Required when scope is device and forbidden when scope is account.`}).option(`duration-hours`,{type:`number`,description:`Number of hours for which the override code should remain valid.`}).option(`scope`,{type:`string`,description:`Whether the code applies to every device in the account or one physical device.`,choices:[`account`,`device`]}).coerce(`scope`,e=>_(e,`scope`,`text`)).option(`type`,{type:`string`,description:`The feature that the override code applies to.`,choices:[`uninstall_protection`]}).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 bp={command:`create`,describe:`Generate an uninstall protection override code`,builder:yp,handler:async e=>u({command:`zero-trust devices override-codes create`,classification:{safeFlags:[`scope`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices override-codes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/override_codes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({device_id:_(e[`device-id`],`device-id`,`text`),duration_hours:e[`duration-hours`],scope:e.scope,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(vp,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`duration-hours`]===void 0)throw Error(`--duration-hours is required (or pass --body with this field set).`);e.scope===void 0&&(e.scope=await b(`scope`,`Whether the code applies to every device in the account or one physical device.`,[`account`,`device`])),e.type===void 0&&(e.type=await b(`type`,`The feature that the override code applies to.`,[`uninstall_protection`]));let u=g({device_id:_(e[`device-id`],`device-id`,`text`),duration_hours:e[`duration-hours`],scope:e.scope,type:e.type}),d=await l(`Creating`,async()=>n.send(vp,{body:u,account_id:a}));s(d,{successLabel:`Created`})})},xp={command:`override-codes`,describe:`Operations for devices.override-codes`,builder:e=>e.command(bp).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Sp={method:`POST`,path:t=>e`/accounts/${t.account_id}/devices/posture/integration`,body:`json`};function Cp(e){return e.usage(`$0 zero-trust devices posture integrations create
|
|
531
|
-
|
|
532
|
-
Create a new device posture integration.`).option(`integration-config-api-url`,{type:`string`,description:`The Workspace One API URL provided in the Workspace One Admin Dashboard.`}).option(`integration-config-auth-url`,{type:`string`,description:`The Workspace One Authorization URL depending on your region.`}).option(`integration-config-client-id`,{type:`string`,description:`The Workspace One client ID provided in the Workspace One Admin Dashboard.`}).option(`integration-config-client-secret`,{type:`string`,description:`The Workspace One client secret provided in the Workspace One Admin Dashboard.`}).option(`integration-config-customer-id`,{type:`string`,description:`The Crowdstrike customer ID.`}).option(`integration-config-client-key`,{type:`string`,description:`The Uptycs client secret.`}).option(`integration-config-access-client-id`,{type:`string`,description:"If present, this id will be passed in the `CF-Access-Client-ID` header when hitting the `api_url`."}).option(`integration-config-access-client-secret`,{type:`string`,description:"If present, this secret will be passed in the `CF-Access-Client-Secret` header when hitting the `api_url`."}).option(`interval`,{type:`string`,description:"The interval between each posture check with the third-party API. Use `m` for minutes (e.g. `5m`) and `h` for hours (e.g. `12h`)."}).option(`name`,{type:`string`,description:`The name of the device posture integration.`}).option(`type`,{type:`string`,description:`The type of device posture integration.`,choices:[`workspace_one`,`crowdstrike_s2s`,`uptycs`,`intune`,`kolide`,`tanium_s2s`,`sentinelone_s2s`,`custom_s2s`]}).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)`}).conflicts(`integration-config-auth-url`,[`integration-config-customer-id`,`integration-config-client-key`,`integration-config-access-client-id`,`integration-config-access-client-secret`]).implies(`integration-config-auth-url`,[`integration-config-api-url`,`integration-config-client-id`,`integration-config-client-secret`]).conflicts(`integration-config-client-id`,[`integration-config-client-key`,`integration-config-access-client-id`,`integration-config-access-client-secret`]).implies(`integration-config-client-id`,[`integration-config-client-secret`]).conflicts(`integration-config-customer-id`,[`integration-config-auth-url`,`integration-config-access-client-id`,`integration-config-access-client-secret`]).implies(`integration-config-customer-id`,[`integration-config-client-secret`]).conflicts(`integration-config-client-key`,[`integration-config-auth-url`,`integration-config-client-id`,`integration-config-access-client-id`,`integration-config-access-client-secret`]).implies(`integration-config-client-key`,[`integration-config-api-url`,`integration-config-client-secret`,`integration-config-customer-id`]).conflicts(`integration-config-access-client-id`,[`integration-config-auth-url`,`integration-config-client-id`,`integration-config-customer-id`,`integration-config-client-key`]).implies(`integration-config-access-client-id`,[`integration-config-api-url`]).conflicts(`integration-config-access-client-secret`,[`integration-config-auth-url`,`integration-config-client-id`,`integration-config-customer-id`,`integration-config-client-key`]).implies(`integration-config-access-client-secret`,[`integration-config-api-url`])}const wp={command:`create`,describe:`Create posture integration`,builder:Cp,handler:async e=>u({command:`zero-trust devices posture integrations create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices posture integrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/posture/integration`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({config:{api_url:_(e[`integration-config-api-url`],`integration-config-api-url`,`text`),auth_url:_(e[`integration-config-auth-url`],`integration-config-auth-url`,`text`),client_id:_(e[`integration-config-client-id`],`integration-config-client-id`,`text`),client_secret:_(e[`integration-config-client-secret`],`integration-config-client-secret`,`text`),customer_id:_(e[`integration-config-customer-id`],`integration-config-customer-id`,`text`),client_key:_(e[`integration-config-client-key`],`integration-config-client-key`,`text`),access_client_id:_(e[`integration-config-access-client-id`],`integration-config-access-client-id`,`text`),access_client_secret:_(e[`integration-config-access-client-secret`],`integration-config-access-client-secret`,`text`)},interval:_(e.interval,`interval`,`text`),name:_(e.name,`name`,`text`),type:e.type}):f(e.body),sensitiveBodyPaths:[[`config`,`client_secret`],[`config`,`client_key`],[`config`,`access_client_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(Sp,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.interval===void 0&&(e.interval=await y(`interval`,"The interval between each posture check with the third-party API. Use `m` for minutes (e.g. `5m`) and `h` for hours (e.g. `12h`).")),e.name===void 0&&(e.name=await y(`name`,`The name of the device posture integration.`)),e.type===void 0&&(e.type=await b(`type`,`The type of device posture integration.`,[`workspace_one`,`crowdstrike_s2s`,`uptycs`,`intune`,`kolide`,`tanium_s2s`,`sentinelone_s2s`,`custom_s2s`]));let u=g({config:{api_url:_(e[`integration-config-api-url`],`integration-config-api-url`,`text`),auth_url:_(e[`integration-config-auth-url`],`integration-config-auth-url`,`text`),client_id:_(e[`integration-config-client-id`],`integration-config-client-id`,`text`),client_secret:_(e[`integration-config-client-secret`],`integration-config-client-secret`,`text`),customer_id:_(e[`integration-config-customer-id`],`integration-config-customer-id`,`text`),client_key:_(e[`integration-config-client-key`],`integration-config-client-key`,`text`),access_client_id:_(e[`integration-config-access-client-id`],`integration-config-access-client-id`,`text`),access_client_secret:_(e[`integration-config-access-client-secret`],`integration-config-access-client-secret`,`text`)},interval:_(e.interval,`interval`,`text`),name:_(e.name,`name`,`text`),type:e.type}),d=await l(`Creating`,async()=>n.send(Sp,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Tp={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/posture/integration/${t.integration_id}`};function Ep(e){return e.usage(`$0 zero-trust devices posture integrations delete <integration-id>
|
|
533
|
-
|
|
534
|
-
Delete a configured device posture integration.`).positional(`integration-id`,{type:`string`,description:`API 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 Dp={command:`delete <integration-id>`,describe:`Delete posture integration`,builder:Ep,handler:async e=>u({command:`zero-trust devices posture 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 devices posture integrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/posture/integration/${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(Tp,{account_id:a,integration_id:e[`integration-id`]}));s(u,{successLabel:`Deleted`})})};var Op={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/posture/integration/${t.integration_id}`};function kp(e){return e.usage(`$0 zero-trust devices posture integrations get <integration-id>
|
|
535
|
-
|
|
536
|
-
Fetches details for a single device posture integration.`).positional(`integration-id`,{type:`string`,description:`API UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ap={command:`get <integration-id>`,describe:`Get posture integration`,builder:kp,handler:async e=>u({command:`zero-trust devices posture integrations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices posture integrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/posture/integration/${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(Op,{account_id:a,integration_id:e[`integration-id`]}));s(u,{successLabel:`Loaded`})})};var jp={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/posture/integration`};function Mp(e){return e.usage(`$0 zero-trust devices posture integrations list
|
|
537
|
-
|
|
538
|
-
Fetches the list of device posture integrations for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Np={command:`list`,describe:`List posture integrations`,builder:Mp,handler:async e=>u({command:`zero-trust devices posture integrations list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust devices posture integrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/posture/integration`,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(jp,{account_id:a}));s(u,{successLabel:`Loaded`})})};var Pp={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/devices/posture/integration/${t.integration_id}`,body:`json`};function Fp(e){return e.usage(`$0 zero-trust devices posture integrations update <integration-id>
|
|
539
|
-
|
|
540
|
-
Updates a configured device posture integration.`).positional(`integration-id`,{type:`string`,description:`API UUID.`,demandOption:!0}).option(`integration-config-api-url`,{type:`string`,description:`The Workspace One API URL provided in the Workspace One Admin Dashboard.`}).option(`integration-config-auth-url`,{type:`string`,description:`The Workspace One Authorization URL depending on your region.`}).option(`integration-config-client-id`,{type:`string`,description:`The Workspace One client ID provided in the Workspace One Admin Dashboard.`}).option(`integration-config-client-secret`,{type:`string`,description:`The Workspace One client secret provided in the Workspace One Admin Dashboard.`}).option(`integration-config-customer-id`,{type:`string`,description:`The Crowdstrike customer ID.`}).option(`integration-config-client-key`,{type:`string`,description:`The Uptycs client secret.`}).option(`integration-config-access-client-id`,{type:`string`,description:"If present, this id will be passed in the `CF-Access-Client-ID` header when hitting the `api_url`."}).option(`integration-config-access-client-secret`,{type:`string`,description:"If present, this secret will be passed in the `CF-Access-Client-Secret` header when hitting the `api_url`."}).option(`interval`,{type:`string`,description:"The interval between each posture check with the third-party API. Use `m` for minutes (e.g. `5m`) and `h` for hours (e.g. `12h`)."}).option(`name`,{type:`string`,description:`The name of the device posture integration.`}).option(`type`,{type:`string`,description:`The type of device posture integration.`,choices:[`workspace_one`,`crowdstrike_s2s`,`uptycs`,`intune`,`kolide`,`tanium_s2s`,`sentinelone_s2s`,`custom_s2s`]}).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)`}).conflicts(`integration-config-auth-url`,[`integration-config-customer-id`,`integration-config-client-key`,`integration-config-access-client-id`,`integration-config-access-client-secret`]).implies(`integration-config-auth-url`,[`integration-config-api-url`,`integration-config-client-id`,`integration-config-client-secret`]).conflicts(`integration-config-client-id`,[`integration-config-client-key`,`integration-config-access-client-id`,`integration-config-access-client-secret`]).implies(`integration-config-client-id`,[`integration-config-client-secret`]).conflicts(`integration-config-customer-id`,[`integration-config-auth-url`,`integration-config-access-client-id`,`integration-config-access-client-secret`]).implies(`integration-config-customer-id`,[`integration-config-client-secret`]).conflicts(`integration-config-client-key`,[`integration-config-auth-url`,`integration-config-client-id`,`integration-config-access-client-id`,`integration-config-access-client-secret`]).implies(`integration-config-client-key`,[`integration-config-api-url`,`integration-config-client-secret`,`integration-config-customer-id`]).conflicts(`integration-config-access-client-id`,[`integration-config-auth-url`,`integration-config-client-id`,`integration-config-customer-id`,`integration-config-client-key`]).implies(`integration-config-access-client-id`,[`integration-config-api-url`]).conflicts(`integration-config-access-client-secret`,[`integration-config-auth-url`,`integration-config-client-id`,`integration-config-customer-id`,`integration-config-client-key`]).implies(`integration-config-access-client-secret`,[`integration-config-api-url`])}const Ip={command:`update <integration-id>`,describe:`Update posture integration`,builder:Fp,handler:async e=>u({command:`zero-trust devices posture integrations update`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices posture integrations update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/posture/integration/${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({config:{api_url:_(e[`integration-config-api-url`],`integration-config-api-url`,`text`),auth_url:_(e[`integration-config-auth-url`],`integration-config-auth-url`,`text`),client_id:_(e[`integration-config-client-id`],`integration-config-client-id`,`text`),client_secret:_(e[`integration-config-client-secret`],`integration-config-client-secret`,`text`),customer_id:_(e[`integration-config-customer-id`],`integration-config-customer-id`,`text`),client_key:_(e[`integration-config-client-key`],`integration-config-client-key`,`text`),access_client_id:_(e[`integration-config-access-client-id`],`integration-config-access-client-id`,`text`),access_client_secret:_(e[`integration-config-access-client-secret`],`integration-config-access-client-secret`,`text`)},interval:_(e.interval,`interval`,`text`),name:_(e.name,`name`,`text`),type:e.type}):f(e.body),sensitiveBodyPaths:[[`config`,`client_secret`],[`config`,`client_key`],[`config`,`access_client_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(`Updating`,async()=>n.send(Pp,{body:t,account_id:a,integration_id:e[`integration-id`]}));s(r,{successLabel:`Updated`});return}let u=g({config:{api_url:_(e[`integration-config-api-url`],`integration-config-api-url`,`text`),auth_url:_(e[`integration-config-auth-url`],`integration-config-auth-url`,`text`),client_id:_(e[`integration-config-client-id`],`integration-config-client-id`,`text`),client_secret:_(e[`integration-config-client-secret`],`integration-config-client-secret`,`text`),customer_id:_(e[`integration-config-customer-id`],`integration-config-customer-id`,`text`),client_key:_(e[`integration-config-client-key`],`integration-config-client-key`,`text`),access_client_id:_(e[`integration-config-access-client-id`],`integration-config-access-client-id`,`text`),access_client_secret:_(e[`integration-config-access-client-secret`],`integration-config-access-client-secret`,`text`)},interval:_(e.interval,`interval`,`text`),name:_(e.name,`name`,`text`),type:e.type}),d=await l(`Updating`,async()=>n.send(Pp,{body:u,account_id:a,integration_id:e[`integration-id`]}));s(d,{successLabel:`Updated`})})},Lp={command:`integrations`,describe:`Operations for devices.posture.integrations`,builder:e=>e.command(wp).command(Dp).command(Ap).command(Np).command(Ip).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Rp={method:`POST`,path:t=>e`/accounts/${t.account_id}/devices/posture`,body:`json`};function zp(e){return e.usage(`$0 zero-trust devices posture rules create
|
|
541
|
-
|
|
542
|
-
Creates a new device posture rule.`).option(`description`,{type:`string`,description:`The description of the device posture rule.`}).option(`expiration`,{type:`string`,description:`Sets the expiration time for a posture check result. If empty, the result remains valid until it is overwritten by new data from the WARP client.`}).option(`input-exists`,{type:`boolean`,description:`Whether or not file exists.`}).option(`input-operating-system`,{type:`string`,description:`Operating system.`,choices:[`windows`,`linux`,`mac`,`android`,`ios`,`chromeos`]}).coerce(`input-operating-system`,e=>_(e,`input-operating-system`,`text`)).option(`input-path`,{type:`string`,description:`File path.`}).option(`input-sha256`,{type:`string`,description:`SHA-256.`}).option(`input-thumbprint`,{type:`string`,description:`Signing certificate thumbprint.`}).option(`input-id`,{type:`string`,description:`List ID.`}).option(`input-domain`,{type:`string`,description:`Domain.`}).option(`input-operator`,{type:`string`,description:`Operator.`,choices:[`<`,`<=`,`>`,`>=`,`==`]}).coerce(`input-operator`,e=>_(e,`input-operator`,`text`)).option(`input-os-distro-name`,{type:`string`,description:`Operating System Distribution Name (linux only).`}).option(`input-os-distro-revision`,{type:`string`,description:`Version of OS Distribution (linux only).`}).option(`input-os-version-extra`,{type:`string`,description:`Additional operating system version details. For Windows, the UBR (Update Build Revision). For Mac or iOS, the Product Version Extra. For Linux, the distribution name and version.`}).option(`input-version`,{type:`string`,description:`Version of OS.`}).option(`input-enabled`,{type:`boolean`,description:`Enabled.`}).option(`input-check-disks`,{type:`string`,array:!0,description:`List of volume names to be checked for encryption.`}).option(`input-require-all`,{type:`boolean`,description:`Whether to check all disks for encryption.`}).option(`input-certificate-id`,{type:`string`,description:`UUID of Cloudflare managed certificate.`}).option(`input-cn`,{type:`string`,description:`Common Name that is protected by the certificate.`}).option(`input-check-private-key`,{type:`boolean`,description:`Confirm the certificate was not imported from another device. We recommend keeping this enabled unless the certificate was deployed without a private key.`}).option(`input-extended-key-usage`,{type:`string`,array:!0,description:`List of values indicating purposes for which the certificate public key can be used.`}).option(`input-locations-paths`,{type:`string`,array:!0,description:`List of paths to check for client certificate on linux.`}).option(`input-locations-trust-stores`,{type:`string`,array:!0,description:`List of trust stores to check for client certificate.`}).option(`input-subject-alternative-names`,{type:`string`,array:!0,description:`List of certificate Subject Alternative Names.`}).option(`input-update-window-days`,{type:`number`,description:`Number of days that the antivirus should be updated within.`}).option(`input-compliance-status`,{type:`string`,description:`Compliance Status.`,choices:[`compliant`,`noncompliant`,`unknown`,`notapplicable`,`ingraceperiod`,`error`]}).coerce(`input-compliance-status`,e=>_(e,`input-compliance-status`,`text`)).option(`input-connection-id`,{type:`string`,description:`Posture Integration ID.`}).option(`input-last-seen`,{type:`string`,description:`For more details on last seen, please refer to the Crowdstrike documentation.`}).option(`input-os`,{type:`string`,description:`Os Version.`}).option(`input-overall`,{type:`string`,description:`Overall.`}).option(`input-sensor-config`,{type:`string`,description:`SensorConfig.`}).option(`input-state`,{type:`string`,description:`For more details on state, please refer to the Crowdstrike documentation.`,choices:[`online`,`offline`,`unknown`]}).coerce(`input-state`,e=>_(e,`input-state`,`text`)).option(`input-version-operator`,{type:`string`,description:`Version Operator.`,choices:[`<`,`<=`,`>`,`>=`,`==`]}).coerce(`input-version-operator`,e=>_(e,`input-version-operator`,`text`)).option(`input-auth-state`,{type:`string`,array:!0,description:`The set of Kolide device authentication states that pass the posture check. Device must match one of the specified states.`}).option(`input-count-operator`,{type:`string`,description:`Count Operator.`,choices:[`<`,`<=`,`>`,`>=`,`==`]}).coerce(`input-count-operator`,e=>_(e,`input-count-operator`,`text`)).option(`input-issue-count`,{type:`string`,description:`The Number of Issues.`}).option(`input-eid-last-seen`,{type:`string`,description:`For more details on eid last seen, refer to the Tanium documentation.`}).option(`input-risk-level`,{type:`string`,description:`For more details on risk level, refer to the Tanium documentation.`,choices:[`low`,`medium`,`high`,`critical`]}).coerce(`input-risk-level`,e=>_(e,`input-risk-level`,`text`)).option(`input-score-operator`,{type:`string`,description:`Score Operator.`,choices:[`<`,`<=`,`>`,`>=`,`==`]}).coerce(`input-score-operator`,e=>_(e,`input-score-operator`,`text`)).option(`input-total-score`,{type:`number`,description:`For more details on total score, refer to the Tanium documentation.`}).option(`input-active-threats`,{type:`number`,description:`The Number of active threats.`}).option(`input-infected`,{type:`boolean`,description:`Whether device is infected.`}).option(`input-is-active`,{type:`boolean`,description:`Whether device is active.`}).option(`input-network-status`,{type:`string`,description:`Network status of device.`,choices:[`connected`,`disconnected`,`disconnecting`,`connecting`]}).coerce(`input-network-status`,e=>_(e,`input-network-status`,`text`)).option(`input-operational-state`,{type:`string`,description:`Agent operational state.`,choices:[`na`,`partially_disabled`,`auto_fully_disabled`,`fully_disabled`,`auto_partially_disabled`,`disabled_error`,`db_corruption`]}).coerce(`input-operational-state`,e=>_(e,`input-operational-state`,`text`)).option(`input-score`,{type:`number`,description:`A value between 0-100 assigned to devices set by the 3rd party posture provider.`}).option(`match`,{type:`string`,description:`The conditions that the client must match to run the rule. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name of the device posture rule.`}).option(`schedule`,{type:`string`,description:"Polling frequency for the WARP client posture check. Default: `5m` (poll every five minutes). Minimum: `1m`."}).option(`type`,{type:`string`,description:`The type of device posture rule.`,choices:[`file`,`application`,`tanium`,`gateway`,`warp`,`disk_encryption`,`serial_number`,`sentinelone`,`carbonblack`,`firewall`,`os_version`,`domain_joined`,`client_certificate`,`client_certificate_v2`,`antivirus`,`unique_client_id`,`kolide`,`tanium_s2s`,`crowdstrike_s2s`,`intune`,`workspace_one`,`sentinelone_s2s`,`custom_s2s`]}).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)`}).conflicts(`input-exists`,/* @__PURE__ */ `input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-exists`,[`input-operating-system`,`input-path`]).conflicts(`input-operating-system`,[`input-check-disks`,`input-require-all`,`input-update-window-days`,`input-compliance-status`,`input-connection-id`,`input-last-seen`,`input-os`,`input-overall`,`input-sensor-config`,`input-state`,`input-version-operator`,`input-auth-state`,`input-count-operator`,`input-issue-count`,`input-eid-last-seen`,`input-risk-level`,`input-score-operator`,`input-total-score`,`input-active-threats`,`input-infected`,`input-is-active`,`input-network-status`,`input-operational-state`,`input-score`]).conflicts(`input-path`,/* @__PURE__ */ `input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-path`,[`input-operating-system`]).conflicts(`input-sha256`,/* @__PURE__ */ `input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-sha256`,[`input-operating-system`,`input-path`]).conflicts(`input-thumbprint`,/* @__PURE__ */ `input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-thumbprint`,[`input-operating-system`,`input-path`]).conflicts(`input-id`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-domain`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-domain`,[`input-operating-system`]).conflicts(`input-operator`,[`input-exists`,`input-path`,`input-sha256`,`input-thumbprint`,`input-id`,`input-domain`,`input-enabled`,`input-check-disks`,`input-require-all`,`input-certificate-id`,`input-cn`,`input-check-private-key`,`input-extended-key-usage`,`input-locations-paths`,`input-locations-trust-stores`,`input-subject-alternative-names`,`input-update-window-days`,`input-compliance-status`,`input-auth-state`,`input-count-operator`,`input-issue-count`]).conflicts(`input-os-distro-name`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-os-distro-name`,[`input-operating-system`,`input-operator`,`input-version`]).conflicts(`input-os-distro-revision`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-os-distro-revision`,[`input-operating-system`,`input-operator`,`input-version`]).conflicts(`input-os-version-extra`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-os-version-extra`,[`input-operating-system`,`input-operator`,`input-version`]).conflicts(`input-version`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-enabled`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-enabled`,[`input-operating-system`]).conflicts(`input-check-disks`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-require-all`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-certificate-id`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-cn`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-cn`,[`input-certificate-id`]).conflicts(`input-check-private-key`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-check-private-key`,[`input-operating-system`,`input-certificate-id`]).conflicts(`input-extended-key-usage`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-extended-key-usage`,[`input-operating-system`,`input-certificate-id`,`input-check-private-key`]).conflicts(`input-locations-paths`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-locations-paths`,[`input-operating-system`,`input-certificate-id`,`input-check-private-key`]).conflicts(`input-locations-trust-stores`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-locations-trust-stores`,[`input-operating-system`,`input-certificate-id`,`input-check-private-key`]).conflicts(`input-subject-alternative-names`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-subject-alternative-names`,[`input-operating-system`,`input-certificate-id`,`input-check-private-key`]).conflicts(`input-update-window-days`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-compliance-status`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-compliance-status`,[`input-connection-id`]).conflicts(`input-connection-id`,[`input-exists`,`input-operating-system`,`input-path`,`input-sha256`,`input-thumbprint`,`input-id`,`input-domain`,`input-os-distro-name`,`input-os-distro-revision`,`input-os-version-extra`,`input-enabled`,`input-check-disks`,`input-require-all`,`input-certificate-id`,`input-cn`,`input-check-private-key`,`input-extended-key-usage`,`input-locations-paths`,`input-locations-trust-stores`,`input-subject-alternative-names`,`input-update-window-days`]).conflicts(`input-last-seen`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-last-seen`,[`input-connection-id`]).conflicts(`input-os`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-os`,[`input-connection-id`]).conflicts(`input-overall`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-overall`,[`input-connection-id`]).conflicts(`input-sensor-config`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-sensor-config`,[`input-connection-id`]).conflicts(`input-state`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-state`,[`input-connection-id`]).conflicts(`input-version-operator`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-version-operator`,[`input-connection-id`]).conflicts(`input-auth-state`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-auth-state`,[`input-connection-id`]).conflicts(`input-count-operator`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-count-operator`,[`input-connection-id`]).conflicts(`input-issue-count`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-issue-count`,[`input-connection-id`]).conflicts(`input-eid-last-seen`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-eid-last-seen`,[`input-connection-id`]).conflicts(`input-risk-level`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-risk-level`,[`input-connection-id`]).conflicts(`input-score-operator`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-score-operator`,[`input-connection-id`]).conflicts(`input-total-score`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-total-score`,[`input-connection-id`]).conflicts(`input-active-threats`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-score`.split(`.`)).implies(`input-active-threats`,[`input-connection-id`]).conflicts(`input-infected`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-score`.split(`.`)).implies(`input-infected`,[`input-connection-id`]).conflicts(`input-is-active`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-score`.split(`.`)).implies(`input-is-active`,[`input-connection-id`]).conflicts(`input-network-status`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-score`.split(`.`)).implies(`input-network-status`,[`input-connection-id`]).conflicts(`input-operational-state`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-score`.split(`.`)).implies(`input-operational-state`,[`input-connection-id`]).conflicts(`input-score`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state`.split(`.`)).implies(`input-score`,[`input-operator`,`input-connection-id`])}const Bp={command:`create`,describe:`Create posture rule`,builder:zp,handler:async e=>u({command:`zero-trust devices posture rules create`,classification:{safeFlags:[`input-exists`,`input-operating-system`,`input-operator`,`input-enabled`,`input-require-all`,`input-check-private-key`,`input-compliance-status`,`input-state`,`input-version-operator`,`input-count-operator`,`input-risk-level`,`input-score-operator`,`input-infected`,`input-is-active`,`input-network-status`,`input-operational-state`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices posture rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/posture`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),expiration:_(e.expiration,`expiration`,`text`),input:{exists:e[`input-exists`],operating_system:e[`input-operating-system`],path:_(e[`input-path`],`input-path`,`text`),sha256:_(e[`input-sha256`],`input-sha256`,`text`),thumbprint:_(e[`input-thumbprint`],`input-thumbprint`,`text`),id:_(e[`input-id`],`input-id`,`text`),domain:_(e[`input-domain`],`input-domain`,`text`),operator:e[`input-operator`],os_distro_name:_(e[`input-os-distro-name`],`input-os-distro-name`,`text`),os_distro_revision:_(e[`input-os-distro-revision`],`input-os-distro-revision`,`text`),os_version_extra:_(e[`input-os-version-extra`],`input-os-version-extra`,`text`),version:_(e[`input-version`],`input-version`,`text`),enabled:e[`input-enabled`],checkDisks:e[`input-check-disks`],requireAll:e[`input-require-all`],certificate_id:_(e[`input-certificate-id`],`input-certificate-id`,`text`),cn:_(e[`input-cn`],`input-cn`,`text`),check_private_key:e[`input-check-private-key`],extended_key_usage:e[`input-extended-key-usage`],locations:{paths:e[`input-locations-paths`],trust_stores:e[`input-locations-trust-stores`]},subject_alternative_names:e[`input-subject-alternative-names`],update_window_days:e[`input-update-window-days`],compliance_status:e[`input-compliance-status`],connection_id:_(e[`input-connection-id`],`input-connection-id`,`text`),last_seen:_(e[`input-last-seen`],`input-last-seen`,`text`),os:_(e[`input-os`],`input-os`,`text`),overall:_(e[`input-overall`],`input-overall`,`text`),sensor_config:_(e[`input-sensor-config`],`input-sensor-config`,`text`),state:e[`input-state`],versionOperator:e[`input-version-operator`],auth_state:e[`input-auth-state`],countOperator:e[`input-count-operator`],issue_count:_(e[`input-issue-count`],`input-issue-count`,`text`),eid_last_seen:_(e[`input-eid-last-seen`],`input-eid-last-seen`,`text`),risk_level:e[`input-risk-level`],scoreOperator:e[`input-score-operator`],total_score:e[`input-total-score`],active_threats:e[`input-active-threats`],infected:e[`input-infected`],is_active:e[`input-is-active`],network_status:e[`input-network-status`],operational_state:e[`input-operational-state`],score:e[`input-score`]},match:d(e.match,`match`),name:_(e.name,`name`,`text`),schedule:_(e.schedule,`schedule`,`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(Rp,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name of the device posture rule.`)),e.type===void 0&&(e.type=await b(`type`,`The type of device posture rule.`,[`file`,`application`,`tanium`,`gateway`,`warp`,`disk_encryption`,`serial_number`,`sentinelone`,`carbonblack`,`firewall`,`os_version`,`domain_joined`,`client_certificate`,`client_certificate_v2`,`antivirus`,`unique_client_id`,`kolide`,`tanium_s2s`,`crowdstrike_s2s`,`intune`,`workspace_one`,`sentinelone_s2s`,`custom_s2s`]));let u=g({description:_(e.description,`description`,`text`),expiration:_(e.expiration,`expiration`,`text`),input:{exists:e[`input-exists`],operating_system:e[`input-operating-system`],path:_(e[`input-path`],`input-path`,`text`),sha256:_(e[`input-sha256`],`input-sha256`,`text`),thumbprint:_(e[`input-thumbprint`],`input-thumbprint`,`text`),id:_(e[`input-id`],`input-id`,`text`),domain:_(e[`input-domain`],`input-domain`,`text`),operator:e[`input-operator`],os_distro_name:_(e[`input-os-distro-name`],`input-os-distro-name`,`text`),os_distro_revision:_(e[`input-os-distro-revision`],`input-os-distro-revision`,`text`),os_version_extra:_(e[`input-os-version-extra`],`input-os-version-extra`,`text`),version:_(e[`input-version`],`input-version`,`text`),enabled:e[`input-enabled`],checkDisks:e[`input-check-disks`],requireAll:e[`input-require-all`],certificate_id:_(e[`input-certificate-id`],`input-certificate-id`,`text`),cn:_(e[`input-cn`],`input-cn`,`text`),check_private_key:e[`input-check-private-key`],extended_key_usage:e[`input-extended-key-usage`],locations:{paths:e[`input-locations-paths`],trust_stores:e[`input-locations-trust-stores`]},subject_alternative_names:e[`input-subject-alternative-names`],update_window_days:e[`input-update-window-days`],compliance_status:e[`input-compliance-status`],connection_id:_(e[`input-connection-id`],`input-connection-id`,`text`),last_seen:_(e[`input-last-seen`],`input-last-seen`,`text`),os:_(e[`input-os`],`input-os`,`text`),overall:_(e[`input-overall`],`input-overall`,`text`),sensor_config:_(e[`input-sensor-config`],`input-sensor-config`,`text`),state:e[`input-state`],versionOperator:e[`input-version-operator`],auth_state:e[`input-auth-state`],countOperator:e[`input-count-operator`],issue_count:_(e[`input-issue-count`],`input-issue-count`,`text`),eid_last_seen:_(e[`input-eid-last-seen`],`input-eid-last-seen`,`text`),risk_level:e[`input-risk-level`],scoreOperator:e[`input-score-operator`],total_score:e[`input-total-score`],active_threats:e[`input-active-threats`],infected:e[`input-infected`],is_active:e[`input-is-active`],network_status:e[`input-network-status`],operational_state:e[`input-operational-state`],score:e[`input-score`]},match:d(e.match,`match`),name:_(e.name,`name`,`text`),schedule:_(e.schedule,`schedule`,`text`),type:e.type}),p=await l(`Creating`,async()=>n.send(Rp,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Vp={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/posture/${t.rule_id}`};function Hp(e){return e.usage(`$0 zero-trust devices posture rules delete <rule-id>
|
|
543
|
-
|
|
544
|
-
Deletes a device posture rule.`).positional(`rule-id`,{type:`string`,description:`API 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 Up={command:`delete <rule-id>`,describe:`Delete posture rule`,builder:Hp,handler:async e=>u({command:`zero-trust devices posture rules 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 posture rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/posture/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-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(Vp,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Deleted`})})};var Wp={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/posture/${t.rule_id}`};function Gp(e){return e.usage(`$0 zero-trust devices posture rules get <rule-id>
|
|
545
|
-
|
|
546
|
-
Fetches a single device posture rule.`).positional(`rule-id`,{type:`string`,description:`API UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Kp={command:`get <rule-id>`,describe:`Get posture rule`,builder:Gp,handler:async e=>u({command:`zero-trust devices posture rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices posture rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/posture/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,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(`Loading`,async()=>n.send(Wp,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Loaded`})})};var qp={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/posture`};function Jp(e){return e.usage(`$0 zero-trust devices posture rules list
|
|
547
|
-
|
|
548
|
-
Fetches device posture rules for a Zero Trust account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Yp={command:`list`,describe:`List posture rules`,builder:Jp,handler:async e=>u({command:`zero-trust devices posture rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust devices posture rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/posture`,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(qp,{account_id:a}));s(u,{successLabel:`Loaded`})})};var Xp={method:`PUT`,path:t=>e`/accounts/${t.account_id}/devices/posture/${t.rule_id}`,body:`json`};function Zp(e){return e.usage(`$0 zero-trust devices posture rules update <rule-id>
|
|
549
|
-
|
|
550
|
-
Updates a device posture rule.`).positional(`rule-id`,{type:`string`,description:`API UUID.`,demandOption:!0}).option(`description`,{type:`string`,description:`The description of the device posture rule.`}).option(`expiration`,{type:`string`,description:`Sets the expiration time for a posture check result. If empty, the result remains valid until it is overwritten by new data from the WARP client.`}).option(`input-exists`,{type:`boolean`,description:`Whether or not file exists.`}).option(`input-operating-system`,{type:`string`,description:`Operating system.`,choices:[`windows`,`linux`,`mac`,`android`,`ios`,`chromeos`]}).coerce(`input-operating-system`,e=>_(e,`input-operating-system`,`text`)).option(`input-path`,{type:`string`,description:`File path.`}).option(`input-sha256`,{type:`string`,description:`SHA-256.`}).option(`input-thumbprint`,{type:`string`,description:`Signing certificate thumbprint.`}).option(`input-id`,{type:`string`,description:`List ID.`}).option(`input-domain`,{type:`string`,description:`Domain.`}).option(`input-operator`,{type:`string`,description:`Operator.`,choices:[`<`,`<=`,`>`,`>=`,`==`]}).coerce(`input-operator`,e=>_(e,`input-operator`,`text`)).option(`input-os-distro-name`,{type:`string`,description:`Operating System Distribution Name (linux only).`}).option(`input-os-distro-revision`,{type:`string`,description:`Version of OS Distribution (linux only).`}).option(`input-os-version-extra`,{type:`string`,description:`Additional operating system version details. For Windows, the UBR (Update Build Revision). For Mac or iOS, the Product Version Extra. For Linux, the distribution name and version.`}).option(`input-version`,{type:`string`,description:`Version of OS.`}).option(`input-enabled`,{type:`boolean`,description:`Enabled.`}).option(`input-check-disks`,{type:`string`,array:!0,description:`List of volume names to be checked for encryption.`}).option(`input-require-all`,{type:`boolean`,description:`Whether to check all disks for encryption.`}).option(`input-certificate-id`,{type:`string`,description:`UUID of Cloudflare managed certificate.`}).option(`input-cn`,{type:`string`,description:`Common Name that is protected by the certificate.`}).option(`input-check-private-key`,{type:`boolean`,description:`Confirm the certificate was not imported from another device. We recommend keeping this enabled unless the certificate was deployed without a private key.`}).option(`input-extended-key-usage`,{type:`string`,array:!0,description:`List of values indicating purposes for which the certificate public key can be used.`}).option(`input-locations-paths`,{type:`string`,array:!0,description:`List of paths to check for client certificate on linux.`}).option(`input-locations-trust-stores`,{type:`string`,array:!0,description:`List of trust stores to check for client certificate.`}).option(`input-subject-alternative-names`,{type:`string`,array:!0,description:`List of certificate Subject Alternative Names.`}).option(`input-update-window-days`,{type:`number`,description:`Number of days that the antivirus should be updated within.`}).option(`input-compliance-status`,{type:`string`,description:`Compliance Status.`,choices:[`compliant`,`noncompliant`,`unknown`,`notapplicable`,`ingraceperiod`,`error`]}).coerce(`input-compliance-status`,e=>_(e,`input-compliance-status`,`text`)).option(`input-connection-id`,{type:`string`,description:`Posture Integration ID.`}).option(`input-last-seen`,{type:`string`,description:`For more details on last seen, please refer to the Crowdstrike documentation.`}).option(`input-os`,{type:`string`,description:`Os Version.`}).option(`input-overall`,{type:`string`,description:`Overall.`}).option(`input-sensor-config`,{type:`string`,description:`SensorConfig.`}).option(`input-state`,{type:`string`,description:`For more details on state, please refer to the Crowdstrike documentation.`,choices:[`online`,`offline`,`unknown`]}).coerce(`input-state`,e=>_(e,`input-state`,`text`)).option(`input-version-operator`,{type:`string`,description:`Version Operator.`,choices:[`<`,`<=`,`>`,`>=`,`==`]}).coerce(`input-version-operator`,e=>_(e,`input-version-operator`,`text`)).option(`input-auth-state`,{type:`string`,array:!0,description:`The set of Kolide device authentication states that pass the posture check. Device must match one of the specified states.`}).option(`input-count-operator`,{type:`string`,description:`Count Operator.`,choices:[`<`,`<=`,`>`,`>=`,`==`]}).coerce(`input-count-operator`,e=>_(e,`input-count-operator`,`text`)).option(`input-issue-count`,{type:`string`,description:`The Number of Issues.`}).option(`input-eid-last-seen`,{type:`string`,description:`For more details on eid last seen, refer to the Tanium documentation.`}).option(`input-risk-level`,{type:`string`,description:`For more details on risk level, refer to the Tanium documentation.`,choices:[`low`,`medium`,`high`,`critical`]}).coerce(`input-risk-level`,e=>_(e,`input-risk-level`,`text`)).option(`input-score-operator`,{type:`string`,description:`Score Operator.`,choices:[`<`,`<=`,`>`,`>=`,`==`]}).coerce(`input-score-operator`,e=>_(e,`input-score-operator`,`text`)).option(`input-total-score`,{type:`number`,description:`For more details on total score, refer to the Tanium documentation.`}).option(`input-active-threats`,{type:`number`,description:`The Number of active threats.`}).option(`input-infected`,{type:`boolean`,description:`Whether device is infected.`}).option(`input-is-active`,{type:`boolean`,description:`Whether device is active.`}).option(`input-network-status`,{type:`string`,description:`Network status of device.`,choices:[`connected`,`disconnected`,`disconnecting`,`connecting`]}).coerce(`input-network-status`,e=>_(e,`input-network-status`,`text`)).option(`input-operational-state`,{type:`string`,description:`Agent operational state.`,choices:[`na`,`partially_disabled`,`auto_fully_disabled`,`fully_disabled`,`auto_partially_disabled`,`disabled_error`,`db_corruption`]}).coerce(`input-operational-state`,e=>_(e,`input-operational-state`,`text`)).option(`input-score`,{type:`number`,description:`A value between 0-100 assigned to devices set by the 3rd party posture provider.`}).option(`match`,{type:`string`,description:`The conditions that the client must match to run the rule. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name of the device posture rule.`}).option(`schedule`,{type:`string`,description:"Polling frequency for the WARP client posture check. Default: `5m` (poll every five minutes). Minimum: `1m`."}).option(`type`,{type:`string`,description:`The type of device posture rule.`,choices:[`file`,`application`,`tanium`,`gateway`,`warp`,`disk_encryption`,`serial_number`,`sentinelone`,`carbonblack`,`firewall`,`os_version`,`domain_joined`,`client_certificate`,`client_certificate_v2`,`antivirus`,`unique_client_id`,`kolide`,`tanium_s2s`,`crowdstrike_s2s`,`intune`,`workspace_one`,`sentinelone_s2s`,`custom_s2s`]}).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)`}).conflicts(`input-exists`,/* @__PURE__ */ `input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-exists`,[`input-operating-system`,`input-path`]).conflicts(`input-operating-system`,[`input-check-disks`,`input-require-all`,`input-update-window-days`,`input-compliance-status`,`input-connection-id`,`input-last-seen`,`input-os`,`input-overall`,`input-sensor-config`,`input-state`,`input-version-operator`,`input-auth-state`,`input-count-operator`,`input-issue-count`,`input-eid-last-seen`,`input-risk-level`,`input-score-operator`,`input-total-score`,`input-active-threats`,`input-infected`,`input-is-active`,`input-network-status`,`input-operational-state`,`input-score`]).conflicts(`input-path`,/* @__PURE__ */ `input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-path`,[`input-operating-system`]).conflicts(`input-sha256`,/* @__PURE__ */ `input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-sha256`,[`input-operating-system`,`input-path`]).conflicts(`input-thumbprint`,/* @__PURE__ */ `input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-thumbprint`,[`input-operating-system`,`input-path`]).conflicts(`input-id`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-domain`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-domain`,[`input-operating-system`]).conflicts(`input-operator`,[`input-exists`,`input-path`,`input-sha256`,`input-thumbprint`,`input-id`,`input-domain`,`input-enabled`,`input-check-disks`,`input-require-all`,`input-certificate-id`,`input-cn`,`input-check-private-key`,`input-extended-key-usage`,`input-locations-paths`,`input-locations-trust-stores`,`input-subject-alternative-names`,`input-update-window-days`,`input-compliance-status`,`input-auth-state`,`input-count-operator`,`input-issue-count`]).conflicts(`input-os-distro-name`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-os-distro-name`,[`input-operating-system`,`input-operator`,`input-version`]).conflicts(`input-os-distro-revision`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-os-distro-revision`,[`input-operating-system`,`input-operator`,`input-version`]).conflicts(`input-os-version-extra`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-os-version-extra`,[`input-operating-system`,`input-operator`,`input-version`]).conflicts(`input-version`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-enabled`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-enabled`,[`input-operating-system`]).conflicts(`input-check-disks`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-require-all`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-certificate-id`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-cn`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-cn`,[`input-certificate-id`]).conflicts(`input-check-private-key`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-check-private-key`,[`input-operating-system`,`input-certificate-id`]).conflicts(`input-extended-key-usage`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-extended-key-usage`,[`input-operating-system`,`input-certificate-id`,`input-check-private-key`]).conflicts(`input-locations-paths`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-locations-paths`,[`input-operating-system`,`input-certificate-id`,`input-check-private-key`]).conflicts(`input-locations-trust-stores`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-locations-trust-stores`,[`input-operating-system`,`input-certificate-id`,`input-check-private-key`]).conflicts(`input-subject-alternative-names`,/* @__PURE__ */ `input-exists.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-update-window-days.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-subject-alternative-names`,[`input-operating-system`,`input-certificate-id`,`input-check-private-key`]).conflicts(`input-update-window-days`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-compliance-status.input-connection-id.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).conflicts(`input-compliance-status`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-compliance-status`,[`input-connection-id`]).conflicts(`input-connection-id`,[`input-exists`,`input-operating-system`,`input-path`,`input-sha256`,`input-thumbprint`,`input-id`,`input-domain`,`input-os-distro-name`,`input-os-distro-revision`,`input-os-version-extra`,`input-enabled`,`input-check-disks`,`input-require-all`,`input-certificate-id`,`input-cn`,`input-check-private-key`,`input-extended-key-usage`,`input-locations-paths`,`input-locations-trust-stores`,`input-subject-alternative-names`,`input-update-window-days`]).conflicts(`input-last-seen`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-last-seen`,[`input-connection-id`]).conflicts(`input-os`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-os`,[`input-connection-id`]).conflicts(`input-overall`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-overall`,[`input-connection-id`]).conflicts(`input-sensor-config`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-sensor-config`,[`input-connection-id`]).conflicts(`input-state`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-state`,[`input-connection-id`]).conflicts(`input-version-operator`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-version-operator`,[`input-connection-id`]).conflicts(`input-auth-state`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-auth-state`,[`input-connection-id`]).conflicts(`input-count-operator`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-count-operator`,[`input-connection-id`]).conflicts(`input-issue-count`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-operator.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-issue-count`,[`input-connection-id`]).conflicts(`input-eid-last-seen`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-eid-last-seen`,[`input-connection-id`]).conflicts(`input-risk-level`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-risk-level`,[`input-connection-id`]).conflicts(`input-score-operator`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-score-operator`,[`input-connection-id`]).conflicts(`input-total-score`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state.input-score`.split(`.`)).implies(`input-total-score`,[`input-connection-id`]).conflicts(`input-active-threats`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-score`.split(`.`)).implies(`input-active-threats`,[`input-connection-id`]).conflicts(`input-infected`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-score`.split(`.`)).implies(`input-infected`,[`input-connection-id`]).conflicts(`input-is-active`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-score`.split(`.`)).implies(`input-is-active`,[`input-connection-id`]).conflicts(`input-network-status`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-score`.split(`.`)).implies(`input-network-status`,[`input-connection-id`]).conflicts(`input-operational-state`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-score`.split(`.`)).implies(`input-operational-state`,[`input-connection-id`]).conflicts(`input-score`,/* @__PURE__ */ `input-exists.input-operating-system.input-path.input-sha256.input-thumbprint.input-id.input-domain.input-os-distro-name.input-os-distro-revision.input-os-version-extra.input-version.input-enabled.input-check-disks.input-require-all.input-certificate-id.input-cn.input-check-private-key.input-extended-key-usage.input-locations-paths.input-locations-trust-stores.input-subject-alternative-names.input-update-window-days.input-compliance-status.input-last-seen.input-os.input-overall.input-sensor-config.input-state.input-version-operator.input-auth-state.input-count-operator.input-issue-count.input-eid-last-seen.input-risk-level.input-score-operator.input-total-score.input-active-threats.input-infected.input-is-active.input-network-status.input-operational-state`.split(`.`)).implies(`input-score`,[`input-operator`,`input-connection-id`])}const Qp={command:`update <rule-id>`,describe:`Update posture rule`,builder:Zp,handler:async e=>u({command:`zero-trust devices posture rules update`,classification:{safeFlags:[`input-exists`,`input-operating-system`,`input-operator`,`input-enabled`,`input-require-all`,`input-check-private-key`,`input-compliance-status`,`input-state`,`input-version-operator`,`input-count-operator`,`input-risk-level`,`input-score-operator`,`input-infected`,`input-is-active`,`input-network-status`,`input-operational-state`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices posture rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/posture/${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`),expiration:_(e.expiration,`expiration`,`text`),input:{exists:e[`input-exists`],operating_system:e[`input-operating-system`],path:_(e[`input-path`],`input-path`,`text`),sha256:_(e[`input-sha256`],`input-sha256`,`text`),thumbprint:_(e[`input-thumbprint`],`input-thumbprint`,`text`),id:_(e[`input-id`],`input-id`,`text`),domain:_(e[`input-domain`],`input-domain`,`text`),operator:e[`input-operator`],os_distro_name:_(e[`input-os-distro-name`],`input-os-distro-name`,`text`),os_distro_revision:_(e[`input-os-distro-revision`],`input-os-distro-revision`,`text`),os_version_extra:_(e[`input-os-version-extra`],`input-os-version-extra`,`text`),version:_(e[`input-version`],`input-version`,`text`),enabled:e[`input-enabled`],checkDisks:e[`input-check-disks`],requireAll:e[`input-require-all`],certificate_id:_(e[`input-certificate-id`],`input-certificate-id`,`text`),cn:_(e[`input-cn`],`input-cn`,`text`),check_private_key:e[`input-check-private-key`],extended_key_usage:e[`input-extended-key-usage`],locations:{paths:e[`input-locations-paths`],trust_stores:e[`input-locations-trust-stores`]},subject_alternative_names:e[`input-subject-alternative-names`],update_window_days:e[`input-update-window-days`],compliance_status:e[`input-compliance-status`],connection_id:_(e[`input-connection-id`],`input-connection-id`,`text`),last_seen:_(e[`input-last-seen`],`input-last-seen`,`text`),os:_(e[`input-os`],`input-os`,`text`),overall:_(e[`input-overall`],`input-overall`,`text`),sensor_config:_(e[`input-sensor-config`],`input-sensor-config`,`text`),state:e[`input-state`],versionOperator:e[`input-version-operator`],auth_state:e[`input-auth-state`],countOperator:e[`input-count-operator`],issue_count:_(e[`input-issue-count`],`input-issue-count`,`text`),eid_last_seen:_(e[`input-eid-last-seen`],`input-eid-last-seen`,`text`),risk_level:e[`input-risk-level`],scoreOperator:e[`input-score-operator`],total_score:e[`input-total-score`],active_threats:e[`input-active-threats`],infected:e[`input-infected`],is_active:e[`input-is-active`],network_status:e[`input-network-status`],operational_state:e[`input-operational-state`],score:e[`input-score`]},match:d(e.match,`match`),name:_(e.name,`name`,`text`),schedule:_(e.schedule,`schedule`,`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(`Updating`,async()=>n.send(Xp,{body:t,account_id:a,rule_id:e[`rule-id`]}));s(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await y(`name`,`The name of the device posture rule.`)),e.type===void 0&&(e.type=await b(`type`,`The type of device posture rule.`,[`file`,`application`,`tanium`,`gateway`,`warp`,`disk_encryption`,`serial_number`,`sentinelone`,`carbonblack`,`firewall`,`os_version`,`domain_joined`,`client_certificate`,`client_certificate_v2`,`antivirus`,`unique_client_id`,`kolide`,`tanium_s2s`,`crowdstrike_s2s`,`intune`,`workspace_one`,`sentinelone_s2s`,`custom_s2s`]));let u=g({description:_(e.description,`description`,`text`),expiration:_(e.expiration,`expiration`,`text`),input:{exists:e[`input-exists`],operating_system:e[`input-operating-system`],path:_(e[`input-path`],`input-path`,`text`),sha256:_(e[`input-sha256`],`input-sha256`,`text`),thumbprint:_(e[`input-thumbprint`],`input-thumbprint`,`text`),id:_(e[`input-id`],`input-id`,`text`),domain:_(e[`input-domain`],`input-domain`,`text`),operator:e[`input-operator`],os_distro_name:_(e[`input-os-distro-name`],`input-os-distro-name`,`text`),os_distro_revision:_(e[`input-os-distro-revision`],`input-os-distro-revision`,`text`),os_version_extra:_(e[`input-os-version-extra`],`input-os-version-extra`,`text`),version:_(e[`input-version`],`input-version`,`text`),enabled:e[`input-enabled`],checkDisks:e[`input-check-disks`],requireAll:e[`input-require-all`],certificate_id:_(e[`input-certificate-id`],`input-certificate-id`,`text`),cn:_(e[`input-cn`],`input-cn`,`text`),check_private_key:e[`input-check-private-key`],extended_key_usage:e[`input-extended-key-usage`],locations:{paths:e[`input-locations-paths`],trust_stores:e[`input-locations-trust-stores`]},subject_alternative_names:e[`input-subject-alternative-names`],update_window_days:e[`input-update-window-days`],compliance_status:e[`input-compliance-status`],connection_id:_(e[`input-connection-id`],`input-connection-id`,`text`),last_seen:_(e[`input-last-seen`],`input-last-seen`,`text`),os:_(e[`input-os`],`input-os`,`text`),overall:_(e[`input-overall`],`input-overall`,`text`),sensor_config:_(e[`input-sensor-config`],`input-sensor-config`,`text`),state:e[`input-state`],versionOperator:e[`input-version-operator`],auth_state:e[`input-auth-state`],countOperator:e[`input-count-operator`],issue_count:_(e[`input-issue-count`],`input-issue-count`,`text`),eid_last_seen:_(e[`input-eid-last-seen`],`input-eid-last-seen`,`text`),risk_level:e[`input-risk-level`],scoreOperator:e[`input-score-operator`],total_score:e[`input-total-score`],active_threats:e[`input-active-threats`],infected:e[`input-infected`],is_active:e[`input-is-active`],network_status:e[`input-network-status`],operational_state:e[`input-operational-state`],score:e[`input-score`]},match:d(e.match,`match`),name:_(e.name,`name`,`text`),schedule:_(e.schedule,`schedule`,`text`),type:e.type}),p=await l(`Updating`,async()=>n.send(Xp,{body:u,account_id:a,rule_id:e[`rule-id`]}));s(p,{successLabel:`Updated`})})},$p={command:`rules`,describe:`Operations for devices.posture.rules`,builder:e=>e.command(Bp).command(Up).command(Kp).command(Yp).command(Qp).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},em={command:`posture`,describe:`Operations for devices.posture`,builder:e=>e.command(Lp).command($p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var tm={method:`POST`,path:t=>e`/accounts/${t.account_id}/devices/policy`,body:`json`};function nm(e){return e.usage(`$0 zero-trust devices profiles custom create
|
|
551
|
-
|
|
552
|
-
Creates a device settings profile to be applied to certain devices matching the criteria.`).option(`allow-mode-switch`,{type:`boolean`,description:`Whether to allow the user to switch WARP between modes.`,default:!1}).option(`allow-updates`,{type:`boolean`,description:`Whether to receive update notifications when a new version of the client is available.`,default:!1}).option(`allowed-to-leave`,{type:`boolean`,description:`Whether to allow devices to leave the organization.`,default:!0}).option(`auto-connect`,{type:`number`,description:`The amount of time in seconds to reconnect after having been disabled.`,default:0}).option(`browser-extension-config-proxy-control`,{type:`string`,description:`Whether the user may disable the browser extension proxy.`,choices:[`unlocked`,`locked`]}).coerce(`browser-extension-config-proxy-control`,e=>_(e,`browser-extension-config-proxy-control`,`text`)).option(`browser-extension-config-proxy-enabled`,{type:`boolean`,description:`Whether the browser extension proxy is active.`}).option(`captive-portal`,{type:`number`,description:`Turn on the captive portal after the specified amount of time.`,default:180}).option(`default`,{type:`boolean`,description:`Whether the policy is the account default. WARP group profiles cannot set this field.`,default:!1}).option(`description`,{type:`string`,description:`A description of the policy.`}).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`.",default:!1}).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.`,default:!1}).option(`enabled`,{type:`boolean`,description:`Whether the policy will be applied to matching devices.`,default:!0}).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.`,default:!1}).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(`match`,{type:`string`,description:`The wirefilter expression to match devices. Available values: "identity.email", "identity.groups.id", "identity.groups.name", "identity.groups.email", "identity.service_token_uuid", "identity.saml_attributes", "network", "os.name", "os.version", "device.tags".`}).option(`name`,{type:`string`,description:`The name of the device settings profile.`}).option(`precedence`,{type:`number`,description:`The precedence of the policy. Lower values indicate higher precedence. Policies will be evaluated in ascending order of this field.`}).option(`profile-type`,{type:`string`,description:`The client type to which the device settings profile applies. This field is set when the profile is created and cannot be changed.`,choices:[`warp`,`browser_extension`],default:`warp`}).coerce(`profile-type`,e=>_(e,`profile-type`,`text`)).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.`,default:!0}).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).`,default:!1}).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.`,default:``}).option(`switch-locked`,{type:`boolean`,description:`Whether to allow the user to turn off the WARP switch and disconnect the client.`,default:!1}).option(`tunnel-protocol`,{type:`string`,description:`Determines which tunnel protocol to use.`,default:``}).option(`uninstall-protection`,{type:`boolean`,description:`Determines whether uninstalling the WARP client requires an override code. (Windows only).`,default:!1}).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=>{let t=[`browser-extension-config-proxy-control`,`browser-extension-config-proxy-enabled`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`browser-extension-config-proxy-control`,`browser-extension-config-proxy-enabled`].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 --browser-extension-config-* flag is set`)}return!0}).check(e=>{let t=[`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);if(!e.body&&t){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=>{let t=[`virtual-networks-allowed`,`virtual-networks-default`].some(t=>e[t]!==void 0);if(!e.body&&t){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 rm={command:`create`,describe:`Create a device settings profile`,builder:nm,handler:async e=>u({command:`zero-trust devices profiles custom create`,classification:{safeFlags:[`allow-mode-switch`,`allow-updates`,`allowed-to-leave`,`browser-extension-config-proxy-control`,`browser-extension-config-proxy-enabled`,`default`,`disable-auto-fallback`,`enable-device-credential-authentication`,`enabled`,`exclude-office-ips`,`global-acceleration-allow-manual-override`,`global-acceleration-autoswitch`,`global-acceleration-enabled`,`profile-type`,`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 custom create`,method:`POST`,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`],browser_extension_config:{proxy_control:e[`browser-extension-config-proxy-control`],proxy_enabled:e[`browser-extension-config-proxy-enabled`]},captive_portal:e[`captive-portal`],default:e.default,description:_(e.description,`description`,`text`),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`],enabled:e.enabled,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`],match:_(e.match,`match`,`text`),name:_(e.name,`name`,`text`),precedence:e.precedence,profile_type:e[`profile-type`],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(`Creating`,async()=>n.send(tm,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name of the device settings profile.`));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`],browser_extension_config:{proxy_control:e[`browser-extension-config-proxy-control`],proxy_enabled:e[`browser-extension-config-proxy-enabled`]},captive_portal:e[`captive-portal`],default:e.default,description:_(e.description,`description`,`text`),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`],enabled:e.enabled,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`],match:_(e.match,`match`,`text`),name:_(e.name,`name`,`text`),precedence:e.precedence,profile_type:e[`profile-type`],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(`Creating`,async()=>n.send(tm,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var im={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/policy/${t.policy_id}`};function am(e){return e.usage(`$0 zero-trust devices profiles custom delete <policy-id>
|
|
553
|
-
|
|
554
|
-
Deletes a device settings profile and fetches a list of the remaining profiles for an account.`).positional(`policy-id`,{type:`string`,description:`Policy 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 om={command:`delete <policy-id>`,describe:`Delete a device settings profile`,builder:am,handler:async e=>u({command:`zero-trust devices profiles custom 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 profiles custom delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/policy/${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(im,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Deleted`})})};var sm={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/policy/${t.policy_id}`};function cm(e){return e.usage(`$0 zero-trust devices profiles custom get <policy-id>
|
|
555
|
-
|
|
556
|
-
Fetches a device settings profile by ID.`).positional(`policy-id`,{type:`string`,description:`Policy ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const lm={command:`get <policy-id>`,describe:`Get device settings profile by ID`,builder:cm,handler:async e=>u({command:`zero-trust devices profiles custom get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices profiles custom get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/policy/${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();e.accountId=a;let u=await l(`Loading`,async()=>n.send(sm,{account_id:a,policy_id:e[`policy-id`]}));s(u,{successLabel:`Loaded`})})};var um={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/policies`,query:[`profile_type`]};function dm(e){return e.usage(`$0 zero-trust devices profiles custom list
|
|
557
|
-
|
|
558
|
-
Fetches a list of the device settings profiles for an account.`).option(`profile-type`,{type:`string`,description:`Filter profiles by client type. When omitted, only WARP profiles are returned.`,choices:[`warp`,`browser_extension`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fm={command:`list`,describe:`List device settings profiles`,builder:dm,handler:async e=>u({command:`zero-trust devices profiles custom list`,classification:{safeFlags:[`profile-type`,`dry-run`]}},e,async()=>{let n={profile_type:e[`profile-type`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust devices profiles custom list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/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(um,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var pm={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/devices/policy/${t.policy_id}`,body:`json`};function mm(e){return e.usage(`$0 zero-trust devices profiles custom update <policy-id>
|
|
559
|
-
|
|
560
|
-
Updates a configured device settings profile.`).positional(`policy-id`,{type:`string`,description:`Policy ID`,demandOption:!0}).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(`browser-extension-config-proxy-control`,{type:`string`,description:`Whether the user may disable the browser extension proxy.`,choices:[`unlocked`,`locked`]}).coerce(`browser-extension-config-proxy-control`,e=>_(e,`browser-extension-config-proxy-control`,`text`)).option(`browser-extension-config-proxy-enabled`,{type:`boolean`,description:`Whether the browser extension proxy is active.`}).option(`captive-portal`,{type:`number`,description:`Turn on the captive portal after the specified amount of time.`}).option(`default`,{type:`boolean`,description:`Whether the policy is the account default. WARP group profiles cannot set this field.`}).option(`description`,{type:`string`,description:`A description of the policy.`}).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(`enabled`,{type:`boolean`,description:`Whether the policy will be applied to matching devices.`}).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(`match`,{type:`string`,description:`The wirefilter expression to match devices. Available values: "identity.email", "identity.groups.id", "identity.groups.name", "identity.groups.email", "identity.service_token_uuid", "identity.saml_attributes", "network", "os.name", "os.version", "device.tags".`}).option(`name`,{type:`string`,description:`The name of the device settings profile.`}).option(`precedence`,{type:`number`,description:`The precedence of the policy. Lower values indicate higher precedence. Policies will be evaluated in ascending order of this field.`}).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=>{let t=[`browser-extension-config-proxy-control`,`browser-extension-config-proxy-enabled`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`browser-extension-config-proxy-control`,`browser-extension-config-proxy-enabled`].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 --browser-extension-config-* flag is set`)}return!0}).check(e=>{let t=[`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);if(!e.body&&t){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=>{let t=[`virtual-networks-allowed`,`virtual-networks-default`].some(t=>e[t]!==void 0);if(!e.body&&t){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 hm={command:`update <policy-id>`,describe:`Update a device settings profile`,builder:mm,handler:async e=>u({command:`zero-trust devices profiles custom update`,classification:{safeFlags:[`allow-mode-switch`,`allow-updates`,`allowed-to-leave`,`browser-extension-config-proxy-control`,`browser-extension-config-proxy-enabled`,`default`,`disable-auto-fallback`,`enable-device-credential-authentication`,`enabled`,`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 custom update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/policy/${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({allow_mode_switch:e[`allow-mode-switch`],allow_updates:e[`allow-updates`],allowed_to_leave:e[`allowed-to-leave`],auto_connect:e[`auto-connect`],browser_extension_config:{proxy_control:e[`browser-extension-config-proxy-control`],proxy_enabled:e[`browser-extension-config-proxy-enabled`]},captive_portal:e[`captive-portal`],default:e.default,description:_(e.description,`description`,`text`),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`],enabled:e.enabled,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`],match:_(e.match,`match`,`text`),name:_(e.name,`name`,`text`),precedence:e.precedence,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(pm,{body:t,account_id:a,policy_id:e[`policy-id`]}));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`],browser_extension_config:{proxy_control:e[`browser-extension-config-proxy-control`],proxy_enabled:e[`browser-extension-config-proxy-enabled`]},captive_portal:e[`captive-portal`],default:e.default,description:_(e.description,`description`,`text`),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`],enabled:e.enabled,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`],match:_(e.match,`match`,`text`),name:_(e.name,`name`,`text`),precedence:e.precedence,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(pm,{body:u,account_id:a,policy_id:e[`policy-id`]}));s(p,{successLabel:`Updated`})})},gm={command:`custom`,describe:`Operations for devices.profiles.custom`,builder:e=>e.command(rm).command(om).command(lm).command(fm).command(hm).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var _m={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/policy`};function vm(e){return e.usage(`$0 zero-trust devices profiles default get
|
|
561
|
-
|
|
562
|
-
Fetches the default device settings profile for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ym={command:`get`,describe:`Get the default device settings profile`,builder:vm,handler:async e=>u({command:`zero-trust devices profiles default get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust devices profiles default get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/policy`,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(_m,{account_id:a}));s(u,{successLabel:`Loaded`})})};var bm={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/devices/policy`,body:`json`};function xm(e){return e.usage(`$0 zero-trust devices profiles default update
|
|
563
|
-
|
|
564
|
-
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=>{let t=[`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);if(!e.body&&t){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=>{let t=[`virtual-networks-allowed`,`virtual-networks-default`].some(t=>e[t]!==void 0);if(!e.body&&t){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 Sm={command:`update`,describe:`Update the default device settings profile`,builder:xm,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(bm,{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(bm,{body:u,account_id:a}));s(p,{successLabel:`Updated`})})},Cm={command:`default`,describe:`Operations for devices.profiles.default`,builder:e=>e.command(ym).command(Sm).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},wm={command:`profiles`,describe:`Operations for devices.profiles`,builder:e=>e.command(gm).command(Cm).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Tm={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/registrations`,query:[`id`]};function Em(e){return e.usage(`$0 zero-trust devices registrations bulk-delete
|
|
565
|
-
|
|
566
|
-
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 Dm={command:`bulk-delete`,describe:`Delete registrations`,builder:Em,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(Tm,{account_id:u,...n}));s(d,{successLabel:`Deleted`})})};var Om={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/registrations/${t.registration_id}`};function km(e){return e.usage(`$0 zero-trust devices registrations delete <registration-id>
|
|
567
|
-
|
|
568
|
-
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 Am={command:`delete <registration-id>`,describe:`Delete registration`,builder:km,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(Om,{account_id:a,registration_id:e[`registration-id`]}));s(u,{successLabel:`Deleted`})})};var jm={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/registrations/${t.registration_id}`,query:[`include`]};function Mm(e){return e.usage(`$0 zero-trust devices registrations get <registration-id>
|
|
569
|
-
|
|
570
|
-
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 Nm={command:`get <registration-id>`,describe:`Get registration`,builder:Mm,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(jm,{account_id:u,registration_id:e[`registration-id`],...n}));s(d,{successLabel:`Loaded`})})};var Pm={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 Fm(e){return e.usage(`$0 zero-trust devices registrations list
|
|
571
|
-
|
|
572
|
-
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 Im={command:`list`,describe:`List registrations`,builder:Fm,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(Pm,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Lm={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/registrations/${t.registration_id}/override_codes`};function Rm(e){return e.usage(`$0 zero-trust devices registrations override-codes get <registration-id>
|
|
573
|
-
|
|
574
|
-
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 zm={command:`get <registration-id>`,describe:`Get override codes`,builder:Rm,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(Lm,{account_id:a,registration_id:e[`registration-id`]}));s(u,{successLabel:`Loaded`})})},Bm={command:`override-codes`,describe:`Operations for devices.registrations.override-codes`,builder:e=>e.command(zm).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Vm={command:`registrations`,describe:`Operations for devices.registrations`,builder:e=>e.command(Dm).command(Am).command(Nm).command(Im).command(Bm).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Hm={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/devices/settings`};function Um(e){return e.usage(`$0 zero-trust devices settings delete
|
|
575
|
-
|
|
576
|
-
Resets the current device settings for a Zero Trust account.`).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 Wm={command:`delete`,describe:`Reset device settings`,builder:Um,handler:async e=>u({command:`zero-trust devices settings delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust devices settings delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/settings`,pathParams:{},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(Hm,{account_id:a}));s(u,{successLabel:`Deleted`})})};var Gm={method:`GET`,path:t=>e`/accounts/${t.account_id}/devices/settings`};function Km(e){return e.usage(`$0 zero-trust devices settings get
|
|
577
|
-
|
|
578
|
-
Describes the current device settings for a Zero Trust account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qm={command:`get`,describe:`Get device settings`,builder:Km,handler:async e=>u({command:`zero-trust devices settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust devices settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/devices/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(Gm,{account_id:a}));s(u,{successLabel:`Loaded`})})};var Jm={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/devices/settings`,body:`json`};function Ym(e){return e.usage(`$0 zero-trust devices settings update
|
|
579
|
-
|
|
580
|
-
Updates the device settings for a Zero Trust account.`).option(`disable-for-time`,{type:`number`,description:`Sets the time limit, in seconds, that a user can use an override code to bypass WARP.`}).option(`external-emergency-signal-enabled`,{type:`boolean`,description:`Controls whether the external emergency disconnect feature is enabled.`}).option(`external-emergency-signal-fingerprint`,{type:`string`,description:`The SHA256 fingerprint (64 hexadecimal characters) of the HTTPS server certificate for the external_emergency_signal_url. If provided, the WARP client will use this value to verify the server's identity. The device will ignore any response if the server's certificate fingerprint does not exactly match this value.`}).option(`external-emergency-signal-interval`,{type:`string`,description:`The interval at which the WARP client fetches the emergency disconnect signal, formatted as a duration string (e.g., "5m", "2m30s", "1h"). Minimum 30 seconds.`}).option(`external-emergency-signal-url`,{type:`string`,description:`The HTTPS URL from which to fetch the emergency disconnect signal. Must use HTTPS and have an IPv4 or IPv6 address as the host.`}).option(`gateway-proxy-enabled`,{type:`boolean`,description:`Enable gateway proxy filtering on TCP.`}).option(`gateway-udp-proxy-enabled`,{type:`boolean`,description:`Enable gateway proxy filtering on UDP.`}).option(`root-certificate-installation-enabled`,{type:`boolean`,description:`Enable installation of cloudflare managed root certificate.`}).option(`use-zt-virtual-ip`,{type:`boolean`,description:`Enable using CGNAT virtual IPv4.`}).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 Xm={command:`update`,describe:`Update device settings`,builder:Ym,handler:async e=>u({command:`zero-trust devices settings update`,classification:{safeFlags:[`external-emergency-signal-enabled`,`gateway-proxy-enabled`,`gateway-udp-proxy-enabled`,`root-certificate-installation-enabled`,`use-zt-virtual-ip`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust devices settings update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/settings`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({disable_for_time:e[`disable-for-time`],external_emergency_signal_enabled:e[`external-emergency-signal-enabled`],external_emergency_signal_fingerprint:_(e[`external-emergency-signal-fingerprint`],`external-emergency-signal-fingerprint`,`text`),external_emergency_signal_interval:_(e[`external-emergency-signal-interval`],`external-emergency-signal-interval`,`text`),external_emergency_signal_url:_(e[`external-emergency-signal-url`],`external-emergency-signal-url`,`text`),gateway_proxy_enabled:e[`gateway-proxy-enabled`],gateway_udp_proxy_enabled:e[`gateway-udp-proxy-enabled`],root_certificate_installation_enabled:e[`root-certificate-installation-enabled`],use_zt_virtual_ip:e[`use-zt-virtual-ip`]}):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(Jm,{body:t,account_id:a}));s(r,{successLabel:`Updated`});return}let u=g({disable_for_time:e[`disable-for-time`],external_emergency_signal_enabled:e[`external-emergency-signal-enabled`],external_emergency_signal_fingerprint:_(e[`external-emergency-signal-fingerprint`],`external-emergency-signal-fingerprint`,`text`),external_emergency_signal_interval:_(e[`external-emergency-signal-interval`],`external-emergency-signal-interval`,`text`),external_emergency_signal_url:_(e[`external-emergency-signal-url`],`external-emergency-signal-url`,`text`),gateway_proxy_enabled:e[`gateway-proxy-enabled`],gateway_udp_proxy_enabled:e[`gateway-udp-proxy-enabled`],root_certificate_installation_enabled:e[`root-certificate-installation-enabled`],use_zt_virtual_ip:e[`use-zt-virtual-ip`]}),d=await l(`Updating`,async()=>n.send(Jm,{body:u,account_id:a}));s(d,{successLabel:`Updated`})})},Zm={command:`settings`,describe:`Operations for devices.settings`,builder:e=>e.command(Wm).command(qm).command(Xm).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Qm={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/devices/physical-devices/${t.device_id}`,body:`json`,errors:{409:`ConflictError`}};function $m(e){return e.usage(`$0 zero-trust devices update <device-id>
|
|
581
|
-
|
|
582
|
-
Updates properties of a WARP device.`).positional(`device-id`,{type:`string`,description:`Device ID`,demandOption:!0}).option(`tags`,{type:`string`,description:`Replaces all tags assigned to the physical device. An empty object removes all tags. 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:`Raw JSON request body (bypasses individual flags)`})}const eh={command:`update <device-id>`,describe:`Update device`,builder:$m,handler:async e=>u({command:`zero-trust devices update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.body===void 0&&e.tags===void 0)throw Error(`--body is required unless at least one JSON map flag is provided (--tags).`);if(e.dryRun){let t=await i();c({command:`cf zero-trust devices update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/devices/physical-devices/${e[`device-id`]==null?`<device-id>`:encodeURIComponent(String(e[`device-id`]))}`,pathParams:{"device-id":String(e[`device-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({tags:m(e.tags,`tags`)},[[`tags`]]):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(Qm,{body:t,account_id:a,device_id:e[`device-id`]}));s(r,{successLabel:`Updated`});return}let u=g({tags:m(e.tags,`tags`)},[[`tags`]]),d=await l(`Updating`,async()=>n.send(Qm,{body:u,account_id:a,device_id:e[`device-id`]}));s(d,{successLabel:`Updated`})})},th={command:`devices`,describe:`Operations for devices`,builder:e=>e.command(uf).command(If).command(tp).command(eh).command(sf).command(Ef).command(Nf).command(Qf).command(_p).command(xp).command(em).command(wm).command(Vm).command(Zm).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var nh={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/colos`,query:[`from`,`to`,`sortBy`]};function rh(e){return e.usage(`$0 zero-trust dex colos list
|
|
583
|
-
|
|
584
|
-
List Cloudflare colos that account's devices were connected to during a time period, sorted by usage starting from the most used colo. Colos without traffic are also returned and sorted alphabetically.`).option(`from`,{type:`string`,description:`Start time for connection period in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`to`,{type:`string`,description:`End time for connection period in ISO (RFC3339 - ISO 8601) format.`,demandOption:!0}).option(`sort-by`,{type:`string`,description:`Type of usage that colos should be sorted by. If unspecified, returns all Cloudflare colos sorted alphabetically.`,choices:[`fleet-status-usage`,`application-tests-usage`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ih={command:`list`,describe:`List Cloudflare colos`,builder:rh,handler:async e=>u({command:`zero-trust dex colos list`,classification:{safeFlags:[`sort-by`,`dry-run`]}},e,async()=>{let n={from:e.from,to:e.to,sortBy:e[`sort-by`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust dex colos list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dex/colos`,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(nh,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},ah={command:`colos`,describe:`Operations for dex.colos`,builder:e=>e.command(ih).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oh={method:`POST`,path:t=>e`/accounts/${t.account_id}/dex/commands`,body:`json`};function sh(e){return e.usage(`$0 zero-trust dex commands create
|
|
585
|
-
|
|
586
|
-
Initiate commands for up to 10 devices per account.`).option(`commands`,{type:`string`,description:`List of device-level commands to execute. 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 ch={command:`create`,describe:`Create account commands`,builder:sh,handler:async e=>u({command:`zero-trust dex commands create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dex commands create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/commands`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({commands:d(e.commands,`commands`)}):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(oh,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.commands===void 0)throw Error(`--commands is required (or pass --body with this field set).`);let u=g({commands:d(e.commands,`commands`)}),p=await l(`Creating`,async()=>n.send(oh,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var lh={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/commands/devices`,query:[`page`,`per_page`,`search`]};function uh(e){return e.usage(`$0 zero-trust dex commands eligible-devices list
|
|
587
|
-
|
|
588
|
-
List devices with WARP client support for remote captures which have been connected in the last 1 hour.`).option(`page`,{type:`number`,description:`Page number of paginated results.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`,demandOption:!0}).option(`search`,{type:`string`,description:`Filter devices by name or email.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dh={command:`list`,describe:`List devices eligible for remote captures`,builder:uh,handler:async e=>u({command:`zero-trust dex commands eligible-devices list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],search:e.search};if(e.dryRun){let e=await i();c({command:`cf zero-trust dex commands eligible-devices list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dex/commands/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(lh,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},fh={command:`eligible-devices`,describe:`Operations for dex.commands.eligible-devices`,builder:e=>e.command(dh).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ph={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/commands`,query:[`page`,`per_page`,`from`,`to`,`device_id`,`user_email`,`command_type`,`status`]};function mh(e){return e.usage(`$0 zero-trust dex commands list
|
|
589
|
-
|
|
590
|
-
Retrieves a paginated list of commands issued to devices under the specified account, optionally filtered by time range, device, or other parameters`).option(`page`,{type:`number`,description:`Page number of paginated results.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`,demandOption:!0}).option(`from`,{type:`string`,description:`Start time for the query in ISO (RFC3339 - ISO 8601) format.`}).option(`to`,{type:`string`,description:`End time for the query in ISO (RFC3339 - ISO 8601) format.`}).option(`device-id`,{type:`string`,description:`Unique identifier for a device.`}).option(`user-email`,{type:`string`,description:`Email tied to the device.`}).option(`command-type`,{type:`string`,description:`Optionally filter executed commands by command type.`,choices:[`pcap`,`speed-test`,`warp-diag`]}).option(`status`,{type:`string`,description:`Optionally filter executed commands by status.`,choices:[`PENDING_EXEC`,`PENDING_UPLOAD`,`SUCCESS`,`FAILED`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const hh={command:`list`,describe:`List account commands`,builder:mh,handler:async e=>u({command:`zero-trust dex commands list`,classification:{safeFlags:[`command-type`,`status`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],from:e.from,to:e.to,device_id:e[`device-id`],user_email:e[`user-email`],command_type:e[`command-type`],status:e.status};if(e.dryRun){let e=await i();c({command:`cf zero-trust dex commands list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dex/commands`,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(ph,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var gh={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/commands/quota`};function _h(e){return e.usage(`$0 zero-trust dex commands quota get
|
|
591
|
-
|
|
592
|
-
Retrieves the current quota usage and limits for device commands within a specific account, including the time when the quota will reset`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vh={command:`get`,describe:`Returns account commands usage, quota, and reset time`,builder:_h,handler:async e=>u({command:`zero-trust dex commands quota get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dex commands quota get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dex/commands/quota`,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(gh,{account_id:a}));s(u,{successLabel:`Loaded`})})},yh={command:`quota`,describe:`Operations for dex.commands.quota`,builder:e=>e.command(vh).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function bh(e){return e.usage(`$0 zero-trust dex commands results get <filename>
|
|
593
|
-
|
|
594
|
-
Downloads artifacts for an executed command. Bulk downloads are not supported`).positional(`filename`,{type:`string`,description:"The name of the file to be downloaded, including the `.zip` extension.",demandOption:!0}).option(`command-id`,{type:`string`,description:`Unique identifier for command.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const xh={command:`get <filename>`,describe:`Download command output file`,builder:bh,handler:async e=>u({command:`zero-trust dex commands results get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dex commands results get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/commands/${e[`command-id`]==null?`<command-id>`:encodeURIComponent(String(e[`command-id`]))}/downloads/${e.filename==null?`<filename>`:encodeURIComponent(String(e.filename))}`,pathParams:{"command-id":String(e[`command-id`]??``),filename:String(e.filename??``)},bodyKind:`none`});return}await r(e);let n=e.local?t:await o();e.accountId=n;let a=await l(`Loading`,async()=>te(`/accounts/${n}/dex/commands/${encodeURIComponent(String(e[`command-id`]))}/downloads/${encodeURIComponent(String(e.filename))}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));ee(e.text===!0?a.toString(`utf-8`):a)})},Sh={command:`results`,describe:`Operations for dex.commands.results`,builder:e=>e.command(xh).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ch={command:`commands`,describe:`Operations for dex.commands`,builder:e=>e.command(ch).command(hh).command(fh).command(yh).command(Sh).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var wh={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/fleet-status/live`,query:[`since_minutes`]};function Th(e){return e.usage(`$0 zero-trust dex devices aggregates live get
|
|
595
|
-
|
|
596
|
-
Get details for live (up to 60 minutes) devices using WARP.`).option(`since-minutes`,{type:`number`,description:`Number of minutes before current time.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Eh={command:`get`,describe:`Get live aggregate device details by dimension`,builder:Th,handler:async e=>u({command:`zero-trust dex devices aggregates live get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={since_minutes:e[`since-minutes`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust dex devices aggregates live get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dex/fleet-status/live`,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(wh,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},Dh={command:`live`,describe:`Operations for dex.devices.aggregates.live`,builder:e=>e.command(Eh).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Oh={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/fleet-status/over-time`,query:[`to`,`from`,`colo`,`device_id`]};function kh(e){return e.usage(`$0 zero-trust dex devices aggregates over-time get
|
|
597
|
-
|
|
598
|
-
Get aggregate details for devices using WARP, up to 7 days.`).option(`to`,{type:`string`,description:`End of the time range to query. Timestamp can be provided in ISO 8601 datetime format or milliseconds since epoch.`,demandOption:!0}).option(`from`,{type:`string`,description:`Start of the time range to query. Timestamp can be provided in ISO 8601 datetime format or milliseconds since epoch.`,demandOption:!0}).option(`colo`,{type:`string`,description:`Cloudflare colo airport code.`}).option(`device-id`,{type:`string`,description:`Device-specific ID, given as UUID.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ah={command:`get`,describe:`Get over time aggregate details for devices by dimension`,builder:kh,handler:async e=>u({command:`zero-trust dex devices aggregates over-time get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={to:e.to,from:e.from,colo:e.colo,device_id:e[`device-id`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust dex devices aggregates over-time get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dex/fleet-status/over-time`,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(Oh,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},jh={command:`over-time`,describe:`Operations for dex.devices.aggregates.over-time`,builder:e=>e.command(Ah).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Mh={command:`aggregates`,describe:`Operations for dex.devices.aggregates`,builder:e=>e.command(Dh).command(jh).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Nh={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/devices/${t.device_id}/fleet-status/live`,query:[`since_minutes`,`time_now`,`colo`]};function Ph(e){return e.usage(`$0 zero-trust dex devices get <device-id>
|
|
599
|
-
|
|
600
|
-
Get the latest status of a device given device_id from the device_state table.`).positional(`device-id`,{type:`string`,description:`Device-specific ID, given as UUID.`,demandOption:!0}).option(`since-minutes`,{type:`number`,description:`Number of minutes before current time.`,demandOption:!0}).option(`time-now`,{type:`string`,description:`Current time in ISO format.`}).option(`colo`,{type:`string`,description:`List of data centers to filter results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fh={command:`get <device-id>`,describe:`Get the latest status of a device.`,builder:Ph,handler:async e=>u({command:`zero-trust dex devices get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={since_minutes:e[`since-minutes`],time_now:e[`time-now`],colo:e.colo};if(e.dryRun){let t=await i();c({command:`cf zero-trust dex devices get`,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`]))}/fleet-status/live`,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(Nh,{account_id:u,device_id:e[`device-id`],...n}));s(d,{successLabel:`Loaded`})})};var Ih={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/fleet-status/devices`,query:[`to`,`from`,`page`,`per_page`,`sort_by`,`colo`,`device_id`,`mode`,`status`,`platform`,`version`,`source`]};function Lh(e){return e.usage(`$0 zero-trust dex devices list
|
|
601
|
-
|
|
602
|
-
List details of devices using WARP.`).option(`to`,{type:`string`,description:`End of the time range to query. Timestamp can be provided in ISO 8601 datetime format or milliseconds since epoch.`,demandOption:!0}).option(`from`,{type:`string`,description:`Start of the time range to query. Timestamp can be provided in ISO 8601 datetime format or milliseconds since epoch.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of paginated results.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`,demandOption:!0}).option(`sort-by`,{type:`string`,description:`Dimension to sort results by.`,choices:[`colo`,`device_id`,`mode`,`platform`,`status`,`timestamp`,`version`]}).option(`colo`,{type:`string`,description:`Cloudflare colo airport code.`}).option(`device-id`,{type:`string`,description:`Device-specific ID, given as UUID.`}).option(`device-mode`,{type:`string`,description:`The mode under which the WARP client is run.`}).option(`status`,{type:`string`,description:`Network status.`}).option(`platform`,{type:`string`,description:`Operating system.`}).option(`warp-version`,{type:`string`,description:`WARP client version.`}).option(`source`,{type:`string`,description:"Source:\n * `hourly` - device details aggregated hourly, up to 7 days prior\n * `last_seen` - device details, up to 60 minutes prior. Time windows exceeding 60 minutes will be rejected from June 1st, 2026. Please use 'hourly' or 'raw' instead for longer time ranges.\n * `raw` - device details, up to 7 days prior",choices:[`last_seen`,`hourly`,`raw`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Rh={command:`list`,describe:`List details of devices using WARP.`,builder:Lh,handler:async e=>u({command:`zero-trust dex devices list`,classification:{safeFlags:[`sort-by`,`source`,`dry-run`]}},e,async()=>{let n={to:e.to,from:e.from,page:e.page,per_page:e[`per-page`],sort_by:e[`sort-by`],colo:e.colo,device_id:e[`device-id`],mode:e[`device-mode`],status:e.status,platform:e.platform,version:e[`warp-version`],source:e.source};if(e.dryRun){let e=await i();c({command:`cf zero-trust dex devices list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dex/fleet-status/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(Ih,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var zh={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/devices/${t.device_id}/fleet-status/over-time`,query:[`from`,`to`,`interval`,`colo`]};function Bh(e){return e.usage(`$0 zero-trust dex devices over-time get <device-id>
|
|
603
|
-
|
|
604
|
-
Get time-bucketed status metrics for a specific device.`).positional(`device-id`,{type:`string`,description:`Device-specific ID, given as UUID.`,demandOption:!0}).option(`from`,{type:`string`,description:`Start of the time range to query. Timestamp can be provided in ISO 8601 datetime format or milliseconds since epoch.`,demandOption:!0}).option(`to`,{type:`string`,description:`End of the time range to query. Timestamp can be provided in ISO 8601 datetime format or milliseconds since epoch.`,demandOption:!0}).option(`interval`,{type:`string`,description:`Time interval for aggregate time slots.`,choices:[`minute`,`hour`],demandOption:!0}).option(`colo`,{type:`string`,description:`List of data centers to filter results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Vh={command:`get <device-id>`,describe:`Get the status over time for a device`,builder:Bh,handler:async e=>u({command:`zero-trust dex devices over-time get`,classification:{safeFlags:[`interval`,`dry-run`]}},e,async()=>{let n={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 devices over-time get`,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`]))}/fleet-status/over-time`,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(zh,{account_id:u,device_id:e[`device-id`],...n}));s(d,{successLabel:`Loaded`})})},Hh={command:`over-time`,describe:`Operations for dex.devices.over-time`,builder:e=>e.command(Vh).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Uh={command:`devices`,describe:`Operations for dex.devices`,builder:e=>e.command(Fh).command(Rh).command(Mh).command(Hh).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Wh={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/devices/${t.device_id}/isps`,query:[`page`,`per_page`,`cursor`,`sort_by`,`sort_order`,`from`,`to`]};function Gh(e){return e.usage(`$0 zero-trust dex isps list
|
|
605
|
-
|
|
606
|
-
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 Kh={command:`list`,describe:`List device ISPs`,builder:Gh,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(Wh,{account_id:u,device_id:e[`device-id`],...n}));s(d,{successLabel:`Loaded`})})},qh={command:`isps`,describe:`Operations for dex.isps`,builder:e=>e.command(Kh).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Jh={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/tests/overview`,query:[`colo`,`testName`,`deviceId`,`registration_id`,`page`,`per_page`,`kind`]};function Yh(e){return e.usage(`$0 zero-trust dex overview tests list
|
|
607
|
-
|
|
608
|
-
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 Xh={command:`list`,describe:`List DEX test analytics`,builder:Yh,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(Jh,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Zh={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/tests/unique-devices`,query:[`testName`,`deviceId`]};function Qh(e){return e.usage(`$0 zero-trust dex overview tests unique-devices get
|
|
609
|
-
|
|
610
|
-
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 $h={command:`get`,describe:`Get count of devices targeted`,builder:Qh,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(Zh,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},eg={command:`unique-devices`,describe:`Operations for dex.overview.tests.unique-devices`,builder:e=>e.command($h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},tg={command:`tests`,describe:`Operations for dex.overview.tests`,builder:e=>e.command(Xh).command(eg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ng={command:`overview`,describe:`Operations for dex.overview`,builder:e=>e.command(tg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var rg={method:`POST`,path:t=>e`/accounts/${t.account_id}/dex/rules`,body:`json`};function ig(e){return e.usage(`$0 zero-trust dex rules create
|
|
611
|
-
|
|
612
|
-
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 ag={command:`create`,describe:`Create a DEX Rule`,builder:ig,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(rg,{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(rg,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var og={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dex/rules/${t.rule_id}`};function sg(e){return e.usage(`$0 zero-trust dex rules delete <rule-id>
|
|
613
|
-
|
|
614
|
-
Delete a DEX Rule.`).positional(`rule-id`,{type:`string`,description:`Unique identifier of the rule.`,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 cg={command:`delete <rule-id>`,describe:`Delete a DEX Rule`,builder:sg,handler:async e=>u({command:`zero-trust dex rules 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 dex rules delete`,method:`DELETE`,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:`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(og,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Deleted`})})};var lg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/rules/${t.rule_id}`};function ug(e){return e.usage(`$0 zero-trust dex rules get <rule-id>
|
|
615
|
-
|
|
616
|
-
Get details for a DEX Rule.`).positional(`rule-id`,{type:`string`,description:`Unique identifier of the rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dg={command:`get <rule-id>`,describe:`Get DEX Rule`,builder:ug,handler:async e=>u({command:`zero-trust dex rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dex rules get`,method:`GET`,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:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(lg,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Loaded`})})};var fg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/rules`,query:[`page`,`per_page`,`sort_order`,`sort_by`,`name`]};function pg(e){return e.usage(`$0 zero-trust dex rules list
|
|
617
|
-
|
|
618
|
-
List DEX Rules.`).option(`page`,{type:`number`,description:`Page number of paginated results.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`,demandOption:!0}).option(`sort-order`,{type:`string`,description:`Sort direction for sort_by property.`,choices:[`ASC`,`DESC`]}).option(`sort-by`,{type:`string`,description:`Which property to sort results by.`,choices:[`name`,`created_at`,`updated_at`]}).option(`name`,{type:`string`,description:`Filter results by rule name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mg={command:`list`,describe:`List DEX Rules`,builder:pg,handler:async e=>u({command:`zero-trust dex rules list`,classification:{safeFlags:[`sort-order`,`sort-by`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],sort_order:e[`sort-order`],sort_by:e[`sort-by`],name:e.name};if(e.dryRun){let e=await i();c({command:`cf zero-trust dex rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dex/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(fg,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var hg={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/dex/rules/${t.rule_id}`,body:`json`};function gg(e){return e.usage(`$0 zero-trust dex rules update <rule-id>
|
|
619
|
-
|
|
620
|
-
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 _g={command:`update <rule-id>`,describe:`Update a DEX Rule`,builder:gg,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(hg,{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(hg,{body:u,account_id:a,rule_id:e[`rule-id`]}));s(d,{successLabel:`Updated`})})},vg={command:`rules`,describe:`Operations for dex.rules`,builder:e=>e.command(ag).command(cg).command(dg).command(mg).command(_g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var yg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/http-tests/${t.test_id}`,query:[`deviceId`,`from`,`to`,`interval`,`colo`]};function bg(e){return e.usage(`$0 zero-trust dex test-results http get <test-id>
|
|
621
|
-
|
|
622
|
-
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 xg={command:`get <test-id>`,describe:`Get details and aggregate metrics for an http test`,builder:bg,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(yg,{account_id:u,test_id:e[`test-id`],...n}));s(d,{successLabel:`Loaded`})})};var Sg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/http-tests/${t.test_id}/percentiles`,query:[`deviceId`,`from`,`to`,`colo`]};function Cg(e){return e.usage(`$0 zero-trust dex test-results http percentiles get <test-id>
|
|
623
|
-
|
|
624
|
-
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 wg={command:`get <test-id>`,describe:`Get percentiles for an http test`,builder:Cg,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(Sg,{account_id:u,test_id:e[`test-id`],...n}));s(d,{successLabel:`Loaded`})})},Tg={command:`percentiles`,describe:`Operations for dex.test-results.http.percentiles`,builder:e=>e.command(wg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Eg={command:`http`,describe:`Operations for dex.test-results.http`,builder:e=>e.command(xg).command(Tg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Dg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/traceroute-tests/${t.test_id}`,query:[`deviceId`,`from`,`to`,`interval`,`colo`]};function Og(e){return e.usage(`$0 zero-trust dex test-results traceroute get <test-id>
|
|
625
|
-
|
|
626
|
-
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 kg={command:`get <test-id>`,describe:`Get details and aggregate metrics for a traceroute test`,builder:Og,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(Dg,{account_id:u,test_id:e[`test-id`],...n}));s(d,{successLabel:`Loaded`})})};var Ag={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/traceroute-test-results/${t.test_result_id}/network-path`};function jg(e){return e.usage(`$0 zero-trust dex test-results traceroute network-path get <test-result-id>
|
|
627
|
-
|
|
628
|
-
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 Mg={command:`get <test-result-id>`,describe:`Get details for a specific traceroute test run`,builder:jg,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(Ag,{account_id:a,test_result_id:e[`test-result-id`]}));s(u,{successLabel:`Loaded`})})},Ng={command:`network-path`,describe:`Operations for dex.test-results.traceroute.network-path`,builder:e=>e.command(Mg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Pg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/traceroute-tests/${t.test_id}/percentiles`,query:[`deviceId`,`from`,`to`,`colo`]};function Fg(e){return e.usage(`$0 zero-trust dex test-results traceroute percentiles get <test-id>
|
|
629
|
-
|
|
630
|
-
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 Ig={command:`get <test-id>`,describe:`Get percentiles for a traceroute test`,builder:Fg,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(Pg,{account_id:u,test_id:e[`test-id`],...n}));s(d,{successLabel:`Loaded`})})},Lg={command:`percentiles`,describe:`Operations for dex.test-results.traceroute.percentiles`,builder:e=>e.command(Ig).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Rg={command:`traceroute`,describe:`Operations for dex.test-results.traceroute`,builder:e=>e.command(kg).command(Ng).command(Lg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},zg={command:`test-results`,describe:`Operations for dex.test-results`,builder:e=>e.command(Eg).command(Rg).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Bg={method:`POST`,path:t=>e`/accounts/${t.account_id}/dex/devices/dex_tests`,body:`json`};function Vg(e){return e.usage(`$0 zero-trust dex tests create
|
|
631
|
-
|
|
632
|
-
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 Hg={command:`create`,describe:`Create Device DEX test`,builder:Vg,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(Bg,{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(Bg,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Ug={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dex/devices/dex_tests/${t.dex_test_id}`};function Wg(e){return e.usage(`$0 zero-trust dex tests delete <dex-test-id>
|
|
633
|
-
|
|
634
|
-
Delete a Device DEX test. Returns the remaining device dex tests for the account.`).positional(`dex-test-id`,{type:`string`,description:`Unique identifier for a DEX test.`,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 Gg={command:`delete <dex-test-id>`,describe:`Delete Device DEX test`,builder:Wg,handler:async e=>u({command:`zero-trust dex tests 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 dex tests delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/devices/dex_tests/${e[`dex-test-id`]==null?`<dex-test-id>`:encodeURIComponent(String(e[`dex-test-id`]))}`,pathParams:{"dex-test-id":String(e[`dex-test-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(Ug,{account_id:a,dex_test_id:e[`dex-test-id`]}));s(u,{successLabel:`Deleted`})})};var Kg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/devices/dex_tests/${t.dex_test_id}`};function qg(e){return e.usage(`$0 zero-trust dex tests get <dex-test-id>
|
|
635
|
-
|
|
636
|
-
Fetch a single DEX test.`).positional(`dex-test-id`,{type:`string`,description:`Unique identifier for a DEX test.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Jg={command:`get <dex-test-id>`,describe:`Get Device DEX test`,builder:qg,handler:async e=>u({command:`zero-trust dex tests get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dex tests get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/devices/dex_tests/${e[`dex-test-id`]==null?`<dex-test-id>`:encodeURIComponent(String(e[`dex-test-id`]))}`,pathParams:{"dex-test-id":String(e[`dex-test-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,dex_test_id:e[`dex-test-id`]}));s(u,{successLabel:`Loaded`})})};var Yg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/devices/dex_tests`,query:[`page`,`per_page`,`testName`,`kind`]};function Xg(e){return e.usage(`$0 zero-trust dex tests list
|
|
637
|
-
|
|
638
|
-
Fetch all DEX tests.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`test-name`,{type:`string`,description:`Filter by test name.`}).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 Zg={command:`list`,describe:`List Device DEX tests`,builder:Xg,handler:async e=>u({command:`zero-trust dex tests list`,classification:{safeFlags:[`kind`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],testName:e[`test-name`],kind:e.kind};if(e.dryRun){let e=await i();c({command:`cf zero-trust dex tests list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dex/devices/dex_tests`,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(Yg,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Qg={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/traceroute-tests/${t.test_id}/network-path`,query:[`deviceId`,`from`,`to`,`interval`]};function $g(e){return e.usage(`$0 zero-trust dex tests network-path get <test-id>
|
|
639
|
-
|
|
640
|
-
Get a breakdown of metrics by hop for individual traceroute test runs.`).positional(`test-id`,{type:`string`,description:`Unique identifier for a specific test.`,demandOption:!0}).option(`device-id`,{type:`string`,description:`Device to filter traceroute result runs to.`,demandOption:!0}).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(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const e_={command:`get <test-id>`,describe:`Get network path breakdown for a traceroute test`,builder:$g,handler:async e=>u({command:`zero-trust dex tests network-path get`,classification:{safeFlags:[`interval`,`dry-run`]}},e,async()=>{let n={deviceId:e[`device-id`],from:e.from,to:e.to,interval:e.interval};if(e.dryRun){let t=await i();c({command:`cf zero-trust dex tests network-path 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`]))}/network-path`,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(Qg,{account_id:u,test_id:e[`test-id`],...n}));s(d,{successLabel:`Loaded`})})},t_={command:`network-path`,describe:`Operations for dex.tests.network-path`,builder:e=>e.command(e_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var n_={method:`PUT`,path:t=>e`/accounts/${t.account_id}/dex/devices/dex_tests/${t.dex_test_id}`,body:`json`};function r_(e){return e.usage(`$0 zero-trust dex tests update <dex-test-id>
|
|
641
|
-
|
|
642
|
-
Update a DEX test.`).positional(`dex-test-id`,{type:`string`,description:`Unique identifier for a DEX test.`,demandOption:!0}).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 i_={command:`update <dex-test-id>`,describe:`Update Device DEX test`,builder:r_,handler:async e=>u({command:`zero-trust dex tests update`,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 update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dex/devices/dex_tests/${e[`dex-test-id`]==null?`<dex-test-id>`:encodeURIComponent(String(e[`dex-test-id`]))}`,pathParams:{"dex-test-id":String(e[`dex-test-id`]??``)},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(`Updating`,async()=>n.send(n_,{body:t,account_id:a,dex_test_id:e[`dex-test-id`]}));s(r,{successLabel:`Updated`});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(`Updating`,async()=>n.send(n_,{body:u,account_id:a,dex_test_id:e[`dex-test-id`]}));s(p,{successLabel:`Updated`})})},a_={command:`tests`,describe:`Operations for dex.tests`,builder:e=>e.command(Hg).command(Gg).command(Jg).command(Zg).command(i_).command(t_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var o_={method:`GET`,path:t=>e`/accounts/${t.account_id}/dex/warp-change-events`,query:[`page`,`per_page`,`from`,`to`,`type`,`toggle`,`config_name`,`account_name`,`sort_order`]};function s_(e){return e.usage(`$0 zero-trust dex warp-change-events list
|
|
643
|
-
|
|
644
|
-
List WARP configuration and enablement toggle change events by device.`).option(`page`,{type:`number`,description:`Page number of paginated results.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`,demandOption:!0}).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(`type`,{type:`string`,description:`Filter events by type 'config' or 'toggle'.`,choices:[`config`,`toggle`]}).option(`toggle`,{type:`string`,description:`Filter events by type toggle value. Applicable to type='toggle' events only.`,choices:[`on`,`off`]}).option(`config-name`,{type:`string`,description:`Filter events by WARP configuration name changed from or to. Applicable to type='config' events only.`}).option(`account-name`,{type:`string`,description:`Filter events by account name.`}).option(`sort-order`,{type:`string`,description:`Sort response by event timestamp.`,choices:[`ASC`,`DESC`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c_={command:`list`,describe:`List WARP change events.`,builder:s_,handler:async e=>u({command:`zero-trust dex warp-change-events list`,classification:{safeFlags:[`type`,`toggle`,`sort-order`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],from:e.from,to:e.to,type:e.type,toggle:e.toggle,config_name:e[`config-name`],account_name:e[`account-name`],sort_order:e[`sort-order`]};if(e.dryRun){let e=await i();c({command:`cf zero-trust dex warp-change-events list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dex/warp-change-events`,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(o_,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},l_={command:`warp-change-events`,describe:`Operations for dex.warp-change-events`,builder:e=>e.command(c_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},u_={command:`dex`,describe:`Digital Experience Monitoring — synthetic tests, fleet-wide device metrics, and network path diagnostics`,builder:e=>e.command(ah).command(Ch).command(Uh).command(qh).command(ng).command(vg).command(zg).command(a_).command(l_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var d_={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/custom_prompt_topics`,body:`json`};function f_(e){return e.usage(`$0 zero-trust dlp custom-prompt-topics create
|
|
645
|
-
|
|
646
|
-
Creates a DLP custom prompt topic entry.`).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`profile-id`,{type:`string`,description:`The profile_id field`}).option(`topic`,{type:`string`,description:`The topic field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A new custom prompt topic to create.`})}const p_={command:`create`,describe:`Create custom prompt topic`,builder:f_,handler:async e=>u({command:`zero-trust dlp custom-prompt-topics create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp custom-prompt-topics create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/custom_prompt_topics`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),enabled:e.enabled,name:_(e.name,`name`,`text`),profile_id:_(e[`profile-id`],`profile-id`,`text`),topic:_(e.topic,`topic`,`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(d_,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`The name field`)),e.topic===void 0&&(e.topic=await y(`topic`,`The topic field`));let u=g({description:_(e.description,`description`,`text`),enabled:e.enabled,name:_(e.name,`name`,`text`),profile_id:_(e[`profile-id`],`profile-id`,`text`),topic:_(e.topic,`topic`,`text`)}),d=await l(`Creating`,async()=>n.send(d_,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var m_={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/custom_prompt_topics/${t.entry_id}`};function h_(e){return e.usage(`$0 zero-trust dlp custom-prompt-topics delete <entry-id>
|
|
647
|
-
|
|
648
|
-
Deletes a DLP custom prompt topic entry.`).positional(`entry-id`,{type:`string`,description:`Entry 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 g_={command:`delete <entry-id>`,describe:`Delete custom prompt topic`,builder:h_,handler:async e=>u({command:`zero-trust dlp custom-prompt-topics 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 dlp custom-prompt-topics delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/custom_prompt_topics/${e[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(e[`entry-id`]))}`,pathParams:{"entry-id":String(e[`entry-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(m_,{account_id:a,entry_id:e[`entry-id`]}));s(u,{successLabel:`Deleted`})})};var __={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/custom_prompt_topics/${t.entry_id}`};function v_(e){return e.usage(`$0 zero-trust dlp custom-prompt-topics get <entry-id>
|
|
649
|
-
|
|
650
|
-
Fetches a DLP custom prompt topic entry by ID.`).positional(`entry-id`,{type:`string`,description:`Entry ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y_={command:`get <entry-id>`,describe:`Get custom prompt topic`,builder:v_,handler:async e=>u({command:`zero-trust dlp custom-prompt-topics get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp custom-prompt-topics get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/custom_prompt_topics/${e[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(e[`entry-id`]))}`,pathParams:{"entry-id":String(e[`entry-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(__,{account_id:a,entry_id:e[`entry-id`]}));s(u,{successLabel:`Loaded`})})};var b_={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/custom_prompt_topics`};function x_(e){return e.usage(`$0 zero-trust dlp custom-prompt-topics list
|
|
651
|
-
|
|
652
|
-
Lists all DLP custom prompt topic entries in an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S_={command:`list`,describe:`List custom prompt topics`,builder:x_,handler:async e=>u({command:`zero-trust dlp custom-prompt-topics list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp custom-prompt-topics list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/custom_prompt_topics`,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(b_,{account_id:a}));s(u,{successLabel:`Loaded`})})};var C_={method:`PUT`,path:t=>e`/accounts/${t.account_id}/dlp/custom_prompt_topics/${t.entry_id}`,body:`json`};function w_(e){return e.usage(`$0 zero-trust dlp custom-prompt-topics update <entry-id>
|
|
653
|
-
|
|
654
|
-
Updates a DLP custom prompt topic entry.`).positional(`entry-id`,{type:`string`,description:`Entry ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`topic`,{type:`string`,description:`The topic field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update to be applied to the custom prompt topic.`})}const T_={command:`update <entry-id>`,describe:`Update custom prompt topic`,builder:w_,handler:async e=>u({command:`zero-trust dlp custom-prompt-topics update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp custom-prompt-topics update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/custom_prompt_topics/${e[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(e[`entry-id`]))}`,pathParams:{"entry-id":String(e[`entry-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),enabled:e.enabled,name:_(e.name,`name`,`text`),topic:_(e.topic,`topic`,`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(C_,{body:t,account_id:a,entry_id:e[`entry-id`]}));s(r,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`The name field`)),e.topic===void 0&&(e.topic=await y(`topic`,`The topic field`));let u=g({description:_(e.description,`description`,`text`),enabled:e.enabled,name:_(e.name,`name`,`text`),topic:_(e.topic,`topic`,`text`)}),d=await l(`Updating`,async()=>n.send(C_,{body:u,account_id:a,entry_id:e[`entry-id`]}));s(d,{successLabel:`Updated`})})},E_={command:`custom-prompt-topics`,describe:`Data Loss Prevention - manage custom prompt topics for AI-based content detection`,builder:e=>e.command(p_).command(g_).command(y_).command(S_).command(T_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var D_={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/data_classes`,body:`json`};function O_(e){return e.usage(`$0 zero-trust dlp data-classes create
|
|
655
|
-
|
|
656
|
-
Creates a data class for use in DLP profiles.`).option(`data-tags`,{type:`string`,array:!0,description:`The data_tags field`}).option(`description`,{type:`string`,description:`The description field`}).option(`expression`,{type:`string`,description:`The expression field`}).option(`name`,{type:`string`,description:`The name field`}).option(`sensitivity-levels`,{type:`string`,description:`The sensitivity_levels field. 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:`Attributes of the new data class.`})}const k_={command:`create`,describe:`Creates a new data class`,builder:O_,handler:async e=>u({command:`zero-trust dlp data-classes create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp data-classes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_classes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({data_tags:e[`data-tags`],description:_(e.description,`description`,`text`),expression:_(e.expression,`expression`,`text`),name:_(e.name,`name`,`text`),sensitivity_levels:d(e[`sensitivity-levels`],`sensitivity-levels`)}):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[`data-tags`]===void 0)throw Error(`--data-tags is required (or pass --body with this field set).`);if(e.expression===void 0&&(e.expression=await y(`expression`,`The expression field`)),e.name===void 0&&(e.name=await y(`name`,`The name field`)),e[`sensitivity-levels`]===void 0)throw Error(`--sensitivity-levels is required (or pass --body with this field set).`);let u=g({data_tags:e[`data-tags`],description:_(e.description,`description`,`text`),expression:_(e.expression,`expression`,`text`),name:_(e.name,`name`,`text`),sensitivity_levels:d(e[`sensitivity-levels`],`sensitivity-levels`)}),p=await l(`Creating`,async()=>n.send(D_,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var A_={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/data_classes/${t.data_class_id}`};function j_(e){return e.usage(`$0 zero-trust dlp data-classes delete <data-class-id>
|
|
657
|
-
|
|
658
|
-
Deletes a data class from the account.`).positional(`data-class-id`,{type:`string`,description:`Data class 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 M_={command:`delete <data-class-id>`,describe:`Delete a single data class`,builder:j_,handler:async e=>u({command:`zero-trust dlp data-classes 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 dlp data-classes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_classes/${e[`data-class-id`]==null?`<data-class-id>`:encodeURIComponent(String(e[`data-class-id`]))}`,pathParams:{"data-class-id":String(e[`data-class-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(A_,{account_id:a,data_class_id:e[`data-class-id`]}));s(u,{successLabel:`Deleted`})})};var N_={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/data_classes/${t.data_class_id}`};function P_(e){return e.usage(`$0 zero-trust dlp data-classes get <data-class-id>
|
|
659
|
-
|
|
660
|
-
Gets the configuration for a data class.`).positional(`data-class-id`,{type:`string`,description:`Data class ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F_={command:`get <data-class-id>`,describe:`Retrieve a specific data class`,builder:P_,handler:async e=>u({command:`zero-trust dlp data-classes get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp data-classes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_classes/${e[`data-class-id`]==null?`<data-class-id>`:encodeURIComponent(String(e[`data-class-id`]))}`,pathParams:{"data-class-id":String(e[`data-class-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(N_,{account_id:a,data_class_id:e[`data-class-id`]}));s(u,{successLabel:`Loaded`})})};var I_={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/data_classes`};function L_(e){return e.usage(`$0 zero-trust dlp data-classes list
|
|
661
|
-
|
|
662
|
-
Lists data classes configured for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R_={command:`list`,describe:`Retrieve all data classes in an account`,builder:L_,handler:async e=>u({command:`zero-trust dlp data-classes list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp data-classes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/data_classes`,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(I_,{account_id:a}));s(u,{successLabel:`Loaded`})})};var z_={method:`PUT`,path:t=>e`/accounts/${t.account_id}/dlp/data_classes/${t.data_class_id}`,body:`json`};function B_(e){return e.usage(`$0 zero-trust dlp data-classes update <data-class-id>
|
|
663
|
-
|
|
664
|
-
Updates the configuration for a data class.`).positional(`data-class-id`,{type:`string`,description:`Data class ID`,demandOption:!0}).option(`data-tags`,{type:`string`,array:!0,description:`The data_tags field`}).option(`description`,{type:`string`,description:`The description field`}).option(`expression`,{type:`string`,description:`The expression field`}).option(`name`,{type:`string`,description:`The name field`}).option(`sensitivity-levels`,{type:`string`,description:`The sensitivity_levels field. 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:`Attributes of the data class to update.`})}const V_={command:`update <data-class-id>`,describe:`Update the attributes of a single data class`,builder:B_,handler:async e=>u({command:`zero-trust dlp data-classes update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp data-classes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_classes/${e[`data-class-id`]==null?`<data-class-id>`:encodeURIComponent(String(e[`data-class-id`]))}`,pathParams:{"data-class-id":String(e[`data-class-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({data_tags:e[`data-tags`],description:_(e.description,`description`,`text`),expression:_(e.expression,`expression`,`text`),name:_(e.name,`name`,`text`),sensitivity_levels:d(e[`sensitivity-levels`],`sensitivity-levels`)}):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(z_,{body:t,account_id:a,data_class_id:e[`data-class-id`]}));s(r,{successLabel:`Updated`});return}let u=g({data_tags:e[`data-tags`],description:_(e.description,`description`,`text`),expression:_(e.expression,`expression`,`text`),name:_(e.name,`name`,`text`),sensitivity_levels:d(e[`sensitivity-levels`],`sensitivity-levels`)}),p=await l(`Updating`,async()=>n.send(z_,{body:u,account_id:a,data_class_id:e[`data-class-id`]}));s(p,{successLabel:`Updated`})})},H_={command:`data-classes`,describe:`Data Loss Prevention - manage data classes used to classify sensitive information`,builder:e=>e.command(k_).command(M_).command(F_).command(R_).command(V_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var U_={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_categories`,body:`json`};function W_(e){return e.usage(`$0 zero-trust dlp data-tag-categories create
|
|
665
|
-
|
|
666
|
-
Creates a data tag category, optionally from a template.`).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`tags`,{type:`string`,description:"Tags to create with the category. Mutually exclusive with `template_id`. Provide as a JSON array of objects or @path/to/file.json."}).option(`template-id`,{type:`string`,description:`The template_id field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the new data tag category.`})}const G_={command:`create`,describe:`Creates a new data tag category.`,builder:W_,handler:async e=>u({command:`zero-trust dlp data-tag-categories create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp data-tag-categories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_tag_categories`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`),tags:d(e.tags,`tags`),template_id:_(e[`template-id`],`template-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(U_,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name field`));let u=g({description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`),tags:d(e.tags,`tags`),template_id:_(e[`template-id`],`template-id`,`text`)}),p=await l(`Creating`,async()=>n.send(U_,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var K_={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_categories/${t.category_id}`};function q_(e){return e.usage(`$0 zero-trust dlp data-tag-categories delete <category-id>
|
|
667
|
-
|
|
668
|
-
Deletes a data tag category and its tags.`).positional(`category-id`,{type:`string`,description:`Category 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 J_={command:`delete <category-id>`,describe:`Delete a single data tag category.`,builder:q_,handler:async e=>u({command:`zero-trust dlp data-tag-categories 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 dlp data-tag-categories delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_tag_categories/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}`,pathParams:{"category-id":String(e[`category-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(K_,{account_id:a,category_id:e[`category-id`]}));s(u,{successLabel:`Deleted`})})};var Y_={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_categories/${t.category_id}`};function X_(e){return e.usage(`$0 zero-trust dlp data-tag-categories get <category-id>
|
|
669
|
-
|
|
670
|
-
Gets a data tag category and its tags.`).positional(`category-id`,{type:`string`,description:`Category ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z_={command:`get <category-id>`,describe:`Retrieve a specific data tag category.`,builder:X_,handler:async e=>u({command:`zero-trust dlp data-tag-categories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp data-tag-categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_tag_categories/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}`,pathParams:{"category-id":String(e[`category-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(Y_,{account_id:a,category_id:e[`category-id`]}));s(u,{successLabel:`Loaded`})})};var Q_={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_categories`};function $_(e){return e.usage(`$0 zero-trust dlp data-tag-categories list
|
|
671
|
-
|
|
672
|
-
Lists data tag categories configured for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ev={command:`list`,describe:`Retrieve all data tag categories in an account`,builder:$_,handler:async e=>u({command:`zero-trust dlp data-tag-categories list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp data-tag-categories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/data_tag_categories`,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(Q_,{account_id:a}));s(u,{successLabel:`Loaded`})})};var tv={method:`PUT`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_categories/${t.category_id}`,body:`json`};function nv(e){return e.usage(`$0 zero-trust dlp data-tag-categories update <category-id>
|
|
673
|
-
|
|
674
|
-
Updates a data tag category and its tags.`).positional(`category-id`,{type:`string`,description:`Category ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`tags`,{type:`string`,description:"The desired final state of tags.\n- `None` (omitted): no tag changes.\n- `Some([])`: delete all tags.\n- `Some([...])`: desired final set + order. 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:`Attributes of the data tag category to update.`})}const rv={command:`update <category-id>`,describe:`Update the attributes of a single data tag category.`,builder:nv,handler:async e=>u({command:`zero-trust dlp data-tag-categories update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp data-tag-categories update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_tag_categories/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}`,pathParams:{"category-id":String(e[`category-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`),tags:d(e.tags,`tags`)}):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(tv,{body:t,account_id:a,category_id:e[`category-id`]}));s(r,{successLabel:`Updated`});return}let u=g({description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`),tags:d(e.tags,`tags`)}),p=await l(`Updating`,async()=>n.send(tv,{body:u,account_id:a,category_id:e[`category-id`]}));s(p,{successLabel:`Updated`})})},iv={command:`data-tag-categories`,describe:`Data Loss Prevention - manage categories that organize data tags`,builder:e=>e.command(G_).command(J_).command(Z_).command(ev).command(rv).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var av={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_category_templates/${t.template_id}`};function ov(e){return e.usage(`$0 zero-trust dlp data-tag-category-templates get <template-id>
|
|
675
|
-
|
|
676
|
-
Gets an available data tag category template.`).positional(`template-id`,{type:`string`,description:`Template ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const sv={command:`get <template-id>`,describe:`Retrieve a specific data tag category template.`,builder:ov,handler:async e=>u({command:`zero-trust dlp data-tag-category-templates get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp data-tag-category-templates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_tag_category_templates/${e[`template-id`]==null?`<template-id>`:encodeURIComponent(String(e[`template-id`]))}`,pathParams:{"template-id":String(e[`template-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(av,{account_id:a,template_id:e[`template-id`]}));s(u,{successLabel:`Loaded`})})};var cv={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_category_templates`};function lv(e){return e.usage(`$0 zero-trust dlp data-tag-category-templates list
|
|
677
|
-
|
|
678
|
-
Lists available data tag category templates.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const uv={command:`list`,describe:`Retrieve all data tag category templates in an account`,builder:lv,handler:async e=>u({command:`zero-trust dlp data-tag-category-templates list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp data-tag-category-templates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/data_tag_category_templates`,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(cv,{account_id:a}));s(u,{successLabel:`Loaded`})})},dv={command:`data-tag-category-templates`,describe:`Data Loss Prevention - browse templates for creating data tag categories`,builder:e=>e.command(sv).command(uv).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var fv={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_categories/${t.category_id}/data_tags`,body:`json`};function pv(e){return e.usage(`$0 zero-trust dlp data-tags create <category-id>
|
|
679
|
-
|
|
680
|
-
Creates a data tag in a category.`).positional(`category-id`,{type:`string`,description:`Category ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the new data tag.`})}const mv={command:`create <category-id>`,describe:`Creates a new data tag.`,builder:pv,handler:async e=>u({command:`zero-trust dlp data-tags create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp data-tags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_tag_categories/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}/data_tags`,pathParams:{"category-id":String(e[`category-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({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(`Creating`,async()=>n.send(fv,{body:t,account_id:a,category_id:e[`category-id`]}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name field`));let u=g({description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(fv,{body:u,account_id:a,category_id:e[`category-id`]}));s(d,{successLabel:`Created`})})};var hv={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_categories/${t.category_id}/data_tags/${t.tag_id}`};function gv(e){return e.usage(`$0 zero-trust dlp data-tags delete <tag-id>
|
|
681
|
-
|
|
682
|
-
Deletes a data tag from a category.`).positional(`tag-id`,{type:`string`,description:`Tag ID`,demandOption:!0}).option(`category-id`,{type:`string`,description:`Category 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 _v={command:`delete <tag-id>`,describe:`Delete a single data tag.`,builder:gv,handler:async e=>u({command:`zero-trust dlp data-tags 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 dlp data-tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_tag_categories/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}/data_tags/${e[`tag-id`]==null?`<tag-id>`:encodeURIComponent(String(e[`tag-id`]))}`,pathParams:{"category-id":String(e[`category-id`]??``),"tag-id":String(e[`tag-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(hv,{account_id:a,category_id:e[`category-id`],tag_id:e[`tag-id`]}));s(u,{successLabel:`Deleted`})})};var vv={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_categories/${t.category_id}/data_tags/${t.tag_id}`};function yv(e){return e.usage(`$0 zero-trust dlp data-tags get <tag-id>
|
|
683
|
-
|
|
684
|
-
Gets a data tag from a category.`).positional(`tag-id`,{type:`string`,description:`Tag ID`,demandOption:!0}).option(`category-id`,{type:`string`,description:`Category ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bv={command:`get <tag-id>`,describe:`Retrieve a specific data tag.`,builder:yv,handler:async e=>u({command:`zero-trust dlp data-tags get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp data-tags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_tag_categories/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}/data_tags/${e[`tag-id`]==null?`<tag-id>`:encodeURIComponent(String(e[`tag-id`]))}`,pathParams:{"category-id":String(e[`category-id`]??``),"tag-id":String(e[`tag-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(vv,{account_id:a,category_id:e[`category-id`],tag_id:e[`tag-id`]}));s(u,{successLabel:`Loaded`})})};var xv={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_categories/${t.category_id}/data_tags`};function Sv(e){return e.usage(`$0 zero-trust dlp data-tags list
|
|
685
|
-
|
|
686
|
-
Lists data tags in a category.`).option(`category-id`,{type:`string`,description:`Category ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Cv={command:`list`,describe:`Retrieve all data tags in a data tag category`,builder:Sv,handler:async e=>u({command:`zero-trust dlp data-tags list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp data-tags list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_tag_categories/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}/data_tags`,pathParams:{"category-id":String(e[`category-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(xv,{account_id:a,category_id:e[`category-id`]}));s(u,{successLabel:`Loaded`})})};var wv={method:`PUT`,path:t=>e`/accounts/${t.account_id}/dlp/data_tag_categories/${t.category_id}/data_tags/${t.tag_id}`,body:`json`};function Tv(e){return e.usage(`$0 zero-trust dlp data-tags update <tag-id>
|
|
687
|
-
|
|
688
|
-
Updates a data tag in a category.`).positional(`tag-id`,{type:`string`,description:`Tag ID`,demandOption:!0}).option(`category-id`,{type:`string`,description:`Category ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the data tag to update.`})}const Ev={command:`update <tag-id>`,describe:`Update the attributes of a single data tag.`,builder:Tv,handler:async e=>u({command:`zero-trust dlp data-tags update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp data-tags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/data_tag_categories/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}/data_tags/${e[`tag-id`]==null?`<tag-id>`:encodeURIComponent(String(e[`tag-id`]))}`,pathParams:{"category-id":String(e[`category-id`]??``),"tag-id":String(e[`tag-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({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(wv,{body:t,account_id:a,category_id:e[`category-id`],tag_id:e[`tag-id`]}));s(r,{successLabel:`Updated`});return}let u=g({description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Updating`,async()=>n.send(wv,{body:u,account_id:a,category_id:e[`category-id`],tag_id:e[`tag-id`]}));s(d,{successLabel:`Updated`})})},Dv={command:`data-tags`,describe:`Data Loss Prevention - manage tags used to classify and organize sensitive data`,builder:e=>e.command(mv).command(_v).command(bv).command(Cv).command(Ev).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ov={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/datasets`,body:`json`};function kv(e){return e.usage(`$0 zero-trust dlp datasets create
|
|
689
|
-
|
|
690
|
-
Creates a new DLP (Data Loss Prevention) dataset for storing custom detection patterns. Datasets can contain exact match data, word lists, or EDM (Exact Data Match) configurations.`).option(`case-sensitive`,{type:`boolean`,description:`Only applies to custom word lists.
|
|
691
|
-
Determines if the words should be matched in a case-sensitive manner
|
|
692
|
-
Cannot be set to false if \`secret\` is true or undefined`}).option(`description`,{type:`string`,description:`The description of the dataset.`}).option(`encoding-version`,{type:`number`,description:`Dataset encoding version
|
|
693
|
-
|
|
694
|
-
Non-secret custom word lists with no header are always version 1.
|
|
695
|
-
Secret EDM lists with no header are version 1.
|
|
696
|
-
Multicolumn CSV with headers are version 2.
|
|
697
|
-
Omitting this field provides the default value 0, which is interpreted
|
|
698
|
-
the same as 1.`}).option(`name`,{type:`string`,description:`The name field`}).option(`secret`,{type:`boolean`,description:`Generate a secret dataset.
|
|
699
|
-
|
|
700
|
-
If true, the response will include a secret to use with the EDM encoder.
|
|
701
|
-
If false, the response has no secret and the dataset is uploaded in plaintext.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Dataset description.`})}const Av={command:`create`,describe:`Create a new dataset`,builder:kv,handler:async e=>u({command:`zero-trust dlp datasets create`,classification:{safeFlags:[`case-sensitive`,`secret`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/datasets`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({case_sensitive:e[`case-sensitive`],description:_(e.description,`description`,`text`),encoding_version:e[`encoding-version`],name:_(e.name,`name`,`text`),secret:e.secret}):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(Ov,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name field`));let u=g({case_sensitive:e[`case-sensitive`],description:_(e.description,`description`,`text`),encoding_version:e[`encoding-version`],name:_(e.name,`name`,`text`),secret:e.secret}),d=await l(`Creating`,async()=>n.send(Ov,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var jv={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/datasets/${t.dataset_id}`,response:!1};function Mv(e){return e.usage(`$0 zero-trust dlp datasets delete <dataset-id>
|
|
702
|
-
|
|
703
|
-
This deletes all versions of the dataset.`).positional(`dataset-id`,{type:`string`,description:`Dataset 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 Nv={command:`delete <dataset-id>`,describe:`Delete a dataset`,builder:Mv,handler:async e=>u({command:`zero-trust dlp datasets 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 dlp datasets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-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(jv,{account_id:a,dataset_id:e[`dataset-id`]}));s(u,{successLabel:`Deleted`})})};var Pv={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/datasets/${t.dataset_id}`};function Fv(e){return e.usage(`$0 zero-trust dlp datasets get <dataset-id>
|
|
704
|
-
|
|
705
|
-
Gets a dataset and its latest upload status.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Iv={command:`get <dataset-id>`,describe:`Fetch a specific dataset`,builder:Fv,handler:async e=>u({command:`zero-trust dlp datasets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-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(Pv,{account_id:a,dataset_id:e[`dataset-id`]}));s(u,{successLabel:`Loaded`})})};var Lv={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/datasets`};function Rv(e){return e.usage(`$0 zero-trust dlp datasets list
|
|
706
|
-
|
|
707
|
-
Lists all DLP datasets configured for the account, including custom word lists and EDM datasets.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const zv={command:`list`,describe:`Fetch all datasets`,builder:Rv,handler:async e=>u({command:`zero-trust dlp datasets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp datasets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/datasets`,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(Lv,{account_id:a}));s(u,{successLabel:`Loaded`})})};var Bv={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/datasets/${t.dataset_id}/upload`};function Vv(e){return e.usage(`$0 zero-trust dlp datasets prepare-upload <dataset-id>
|
|
708
|
-
|
|
709
|
-
Creates a new version of a DLP dataset, allowing you to stage changes before activation. Used for single-column EDM and custom word lists.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Hv={command:`prepare-upload <dataset-id>`,describe:`Prepare to upload a new version of a dataset`,builder:Vv,handler:async e=>u({command:`zero-trust dlp datasets prepare-upload`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp datasets prepare-upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/upload`,pathParams:{"dataset-id":String(e[`dataset-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(Bv,{account_id:a,dataset_id:e[`dataset-id`]}));s(u,{successLabel:`Created`})})};var Uv={method:`PUT`,path:t=>e`/accounts/${t.account_id}/dlp/datasets/${t.dataset_id}`,body:`json`};function Wv(e){return e.usage(`$0 zero-trust dlp datasets update <dataset-id>
|
|
710
|
-
|
|
711
|
-
Updates the configuration of an existing DLP dataset, such as its name, description, or detection settings.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID`,demandOption:!0}).option(`case-sensitive`,{type:`boolean`,description:`Determines if the words should be matched in a case-sensitive manner.
|
|
712
|
-
|
|
713
|
-
Only required for custom word lists.`}).option(`description`,{type:`string`,description:`The description of the dataset.`}).option(`name`,{type:`string`,description:`The name of the dataset, must be unique.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Dataset description.`})}const Gv={command:`update <dataset-id>`,describe:`Update details about a dataset`,builder:Wv,handler:async e=>u({command:`zero-trust dlp datasets update`,classification:{safeFlags:[`case-sensitive`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp datasets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({case_sensitive:e[`case-sensitive`],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(Uv,{body:t,account_id:a,dataset_id:e[`dataset-id`]}));s(r,{successLabel:`Updated`});return}let u=g({case_sensitive:e[`case-sensitive`],description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Updating`,async()=>n.send(Uv,{body:u,account_id:a,dataset_id:e[`dataset-id`]}));s(d,{successLabel:`Updated`})})};function Kv(e){return e.usage(`$0 zero-trust dlp datasets upload <dataset-version>
|
|
714
|
-
|
|
715
|
-
This is used for single-column EDMv1 and Custom Word Lists. The EDM format can only be created in the Cloudflare dashboard. For other clients, this operation can only be used for non-secret Custom Word Lists. The body must be a UTF-8 encoded, newline (NL or CRNL) separated list of words to be matched.`).positional(`dataset-version`,{type:`string`,description:`Version`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Dataset. For custom wordlists this contains UTF-8 patterns separated by newline characters.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const qv={command:`upload <dataset-version>`,describe:`Upload a new version of a dataset`,builder:Kv,handler:async e=>u({command:`zero-trust dlp datasets upload`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp datasets upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/upload/${e[`dataset-version`]==null?`<dataset-version>`:encodeURIComponent(String(e[`dataset-version`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"dataset-version":String(e[`dataset-version`]??``)},bodyKind:`octet-stream`,body:e.body});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file){let t=v(e.file),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/dlp/datasets/${encodeURIComponent(String(e[`dataset-id`]))}/upload/${encodeURIComponent(String(e[`dataset-version`]))}`,{body:t,headers:{"Content-Type":`application/octet-stream`}}));s(r,{successLabel:`Created`})}else if(e.body){let t=_(e.body,`body`,`binary`),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/dlp/datasets/${encodeURIComponent(String(e[`dataset-id`]))}/upload/${encodeURIComponent(String(e[`dataset-version`]))}`,{body:t,headers:{"Content-Type":`application/octet-stream`}}));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.`)})},Jv={command:`datasets`,describe:`Data Loss Prevention - manage datasets, versions, and uploads`,builder:e=>e.command(Av).command(Nv).command(Iv).command(zv).command(Hv).command(Gv).command(qv).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Yv={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/document_fingerprints`,body:`json`};function Xv(e){return e.usage(`$0 zero-trust dlp document-fingerprints create
|
|
716
|
-
|
|
717
|
-
Creates a new document fingerprint for DLP scanning. Document fingerprints detect documents that are structurally similar to the uploaded sample.`).option(`description`,{type:`string`,description:`The description field`,default:``}).option(`match-percent`,{type:`number`,description:`The match_percent field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the new document fingerprint.`})}const Zv={command:`create`,describe:`Creates a new document fingerprint.`,builder:Xv,handler:async e=>u({command:`zero-trust dlp document-fingerprints create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp document-fingerprints create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/document_fingerprints`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),match_percent:e[`match-percent`],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(Yv,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`match-percent`]===void 0)throw Error(`--match-percent is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`The name field`));let u=g({description:_(e.description,`description`,`text`),match_percent:e[`match-percent`],name:_(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(Yv,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Qv={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/document_fingerprints/${t.document_fingerprint_id}`,response:!1};function $v(e){return e.usage(`$0 zero-trust dlp document-fingerprints delete <document-fingerprint-id>
|
|
718
|
-
|
|
719
|
-
Removes a document fingerprint from DLP configuration. Documents matching this fingerprint will no longer be detected.`).positional(`document-fingerprint-id`,{type:`string`,description:`Document fingerprint 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 ey={command:`delete <document-fingerprint-id>`,describe:`Delete a single document fingerprint.`,builder:$v,handler:async e=>u({command:`zero-trust dlp document-fingerprints 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 dlp document-fingerprints delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/document_fingerprints/${e[`document-fingerprint-id`]==null?`<document-fingerprint-id>`:encodeURIComponent(String(e[`document-fingerprint-id`]))}`,pathParams:{"document-fingerprint-id":String(e[`document-fingerprint-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(Qv,{account_id:a,document_fingerprint_id:e[`document-fingerprint-id`]}));s(u,{successLabel:`Deleted`})})};var ty={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/document_fingerprints/${t.document_fingerprint_id}`};function ny(e){return e.usage(`$0 zero-trust dlp document-fingerprints get <document-fingerprint-id>
|
|
720
|
-
|
|
721
|
-
Gets a document fingerprint and its latest upload status.`).positional(`document-fingerprint-id`,{type:`string`,description:`Document fingerprint ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ry={command:`get <document-fingerprint-id>`,describe:`Retrieve data about a specific document fingerprint.`,builder:ny,handler:async e=>u({command:`zero-trust dlp document-fingerprints get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp document-fingerprints get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/document_fingerprints/${e[`document-fingerprint-id`]==null?`<document-fingerprint-id>`:encodeURIComponent(String(e[`document-fingerprint-id`]))}`,pathParams:{"document-fingerprint-id":String(e[`document-fingerprint-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(ty,{account_id:a,document_fingerprint_id:e[`document-fingerprint-id`]}));s(u,{successLabel:`Loaded`})})};var iy={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/document_fingerprints`};function ay(e){return e.usage(`$0 zero-trust dlp document-fingerprints list
|
|
722
|
-
|
|
723
|
-
Lists all document fingerprints configured for DLP scanning in the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oy={command:`list`,describe:`Retrieve data about all document fingerprints.`,builder:ay,handler:async e=>u({command:`zero-trust dlp document-fingerprints list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp document-fingerprints list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/document_fingerprints`,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(iy,{account_id:a}));s(u,{successLabel:`Loaded`})})};var sy={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/document_fingerprints/${t.document_fingerprint_id}`,body:`json`};function cy(e){return e.usage(`$0 zero-trust dlp document-fingerprints update <document-fingerprint-id>
|
|
724
|
-
|
|
725
|
-
Updates metadata for an existing document fingerprint, such as its name or description.`).positional(`document-fingerprint-id`,{type:`string`,description:`Document fingerprint ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`match-percent`,{type:`number`,description:`The match_percent field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the document fingerprint to update.`})}const ly={command:`update <document-fingerprint-id>`,describe:`Update the attributes of a single document fingerprint.`,builder:cy,handler:async e=>u({command:`zero-trust dlp document-fingerprints update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp document-fingerprints update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/document_fingerprints/${e[`document-fingerprint-id`]==null?`<document-fingerprint-id>`:encodeURIComponent(String(e[`document-fingerprint-id`]))}`,pathParams:{"document-fingerprint-id":String(e[`document-fingerprint-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),match_percent:e[`match-percent`],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(sy,{body:t,account_id:a,document_fingerprint_id:e[`document-fingerprint-id`]}));s(r,{successLabel:`Created`});return}let u=g({description:_(e.description,`description`,`text`),match_percent:e[`match-percent`],name:_(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(sy,{body:u,account_id:a,document_fingerprint_id:e[`document-fingerprint-id`]}));s(d,{successLabel:`Created`})})};function uy(e){return e.usage(`$0 zero-trust dlp document-fingerprints upload <document-fingerprint-id>
|
|
726
|
-
|
|
727
|
-
Uploads a new document to create or update a fingerprint. The document structure is analyzed to enable detection of similar documents.`).positional(`document-fingerprint-id`,{type:`string`,description:`Document fingerprint ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`File used for document fingerprinting.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const dy={command:`upload <document-fingerprint-id>`,describe:`Uploads a new version for a document fingerprint.`,builder:uy,handler:async e=>u({command:`zero-trust dlp document-fingerprints upload`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp document-fingerprints upload`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/document_fingerprints/${e[`document-fingerprint-id`]==null?`<document-fingerprint-id>`:encodeURIComponent(String(e[`document-fingerprint-id`]))}`,pathParams:{"document-fingerprint-id":String(e[`document-fingerprint-id`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file}});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file!==void 0||e.body!==void 0){let t=new FormData;if(e.file){let n=v(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);let r=await l(`Updating`,async()=>n(a,`PUT`,`/accounts/${u}/dlp/document_fingerprints/${encodeURIComponent(String(e[`document-fingerprint-id`]))}`,{body:t}));s(r,{successLabel:`Updated`})}else if(e.body){let t=_(e.body,`body`,`binary`),r=await l(`Updating`,async()=>n(a,`PUT`,`/accounts/${u}/dlp/document_fingerprints/${encodeURIComponent(String(e[`document-fingerprint-id`]))}`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));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.`)})},fy={command:`document-fingerprints`,describe:`Data Loss Prevention - manage document fingerprints for detecting matching documents`,builder:e=>e.command(Zv).command(ey).command(ry).command(oy).command(ly).command(dy).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var py={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/email/account_mapping`,body:`json`};function my(e){return e.usage(`$0 zero-trust dlp email account-mapping create
|
|
728
|
-
|
|
729
|
-
Creates a mapping between a Cloudflare account and an email provider for DLP email scanning integration.`).option(`auth-requirements-allowed-microsoft-organizations`,{type:`string`,array:!0,description:`The auth_requirements.allowed_microsoft_organizations field`}).option(`auth-requirements-type`,{type:`string`,description:`The auth_requirements.type field`,choices:[`Org`,`NoAuth`]}).coerce(`auth-requirements-type`,e=>_(e,`auth-requirements-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Account mapping.`})}const hy=[{path:[`auth_requirements`],selector:`type`,variants:[{values:[`Org`],schema:{type:`object`,properties:{allowed_microsoft_organizations:{type:`array`,items:{type:`string`}},type:{enum:[`Org`]}},required:[`allowed_microsoft_organizations`,`type`],additionalProperties:!1}},{values:[`NoAuth`],schema:{type:`object`,properties:{type:{enum:[`NoAuth`]}},required:[`type`],additionalProperties:!1}}]}],gy={command:`create`,describe:`Create mapping`,builder:my,handler:async e=>u({command:`zero-trust dlp email account-mapping create`,classification:{safeFlags:[`auth-requirements-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp email account-mapping create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/email/account_mapping`,pathParams:{},bodyKind:`json`,body:e.body===void 0?ne(g({auth_requirements:{allowed_microsoft_organizations:e[`auth-requirements-allowed-microsoft-organizations`],type:e[`auth-requirements-type`]}}),hy):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(py,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`auth-requirements-type`]===void 0&&(e[`auth-requirements-type`]=await b(`auth-requirements-type`,`The auth_requirements.type field`,[`Org`,`NoAuth`]));let u=g({auth_requirements:{allowed_microsoft_organizations:e[`auth-requirements-allowed-microsoft-organizations`],type:e[`auth-requirements-type`]}});ne(u,hy);let d=await l(`Creating`,async()=>n.send(py,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var _y={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/email/account_mapping`};function vy(e){return e.usage(`$0 zero-trust dlp email account-mapping get
|
|
730
|
-
|
|
731
|
-
Retrieves the email provider mapping configuration for DLP email scanning.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const yy={command:`get`,describe:`Get mapping`,builder:vy,handler:async e=>u({command:`zero-trust dlp email account-mapping get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp email account-mapping get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/email/account_mapping`,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(_y,{account_id:a}));s(u,{successLabel:`Loaded`})})},by={command:`account-mapping`,describe:`Data Loss Prevention - configure account mappings for outbound email scanning`,builder:e=>e.command(gy).command(yy).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var xy={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/dlp/email/rules`,body:`json`};function Sy(e){return e.usage(`$0 zero-trust dlp email rules bulk-edit
|
|
732
|
-
|
|
733
|
-
Reorders DLP email scanning rules by updating their priority values. Higher priority rules are evaluated first.`).option(`new-priorities`,{type:`string`,description:`The new_priorities 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:`Rule priorities.`})}const Cy={command:`bulk-edit`,describe:`Update email scanner rule priorities`,builder:Sy,handler:async e=>u({command:`zero-trust dlp email rules bulk-edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp email rules bulk-edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/email/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({new_priorities:m(e[`new-priorities`],`new-priorities`,!0)},[[`new_priorities`]]):f(e.body,[{path:[`new_priorities`],flag:`new-priorities`}])});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body,[{path:[`new_priorities`],flag:`new-priorities`}]),r=await l(`Updating`,async()=>n.send(xy,{body:t,account_id:a}));s(r,{successLabel:`Updated`});return}if(e[`new-priorities`]===void 0)throw Error(`--new-priorities is required (or pass --body with this field set).`);let u=g({new_priorities:m(e[`new-priorities`],`new-priorities`,!0)},[[`new_priorities`]]),d=await l(`Updating`,async()=>n.send(xy,{body:u,account_id:a}));s(d,{successLabel:`Updated`})})};var wy={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/email/rules`,body:`json`};function Ty(e){return e.usage(`$0 zero-trust dlp email rules create
|
|
734
|
-
|
|
735
|
-
Creates a new DLP email scanning rule that defines what content patterns to detect in email messages and what actions to take.`).option(`action-action`,{type:`string`,description:`The action.action field`,choices:[`Block`]}).coerce(`action-action`,e=>_(e,`action-action`,`text`)).option(`action-message`,{type:`string`,description:`The action.message field`}).option(`conditions`,{type:`string`,description:`Triggered if all conditions match. Provide as a JSON array of objects or @path/to/file.json.`}).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Rule description.`})}const Ey={command:`create`,describe:`Create email scanner rule`,builder:Ty,handler:async e=>u({command:`zero-trust dlp email rules create`,classification:{safeFlags:[`action-action`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp email rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/email/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({action:{action:e[`action-action`],message:_(e[`action-message`],`action-message`,`text`)},conditions:d(e.conditions,`conditions`),description:_(e.description,`description`,`text`),enabled:e.enabled,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(wy,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e[`action-action`]===void 0&&(e[`action-action`]=await b(`action-action`,`The action.action field`,[`Block`])),e.conditions===void 0)throw Error(`--conditions is required (or pass --body with this field set).`);if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`The name field`));let u=g({action:{action:e[`action-action`],message:_(e[`action-message`],`action-message`,`text`)},conditions:d(e.conditions,`conditions`),description:_(e.description,`description`,`text`),enabled:e.enabled,name:_(e.name,`name`,`text`)}),p=await l(`Creating`,async()=>n.send(wy,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Dy={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/email/rules/${t.rule_id}`};function Oy(e){return e.usage(`$0 zero-trust dlp email rules delete <rule-id>
|
|
736
|
-
|
|
737
|
-
Removes a DLP email scanning rule. The rule will no longer be applied to email messages.`).positional(`rule-id`,{type:`string`,description:`Rule 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 ky={command:`delete <rule-id>`,describe:`Delete email scanner rule`,builder:Oy,handler:async e=>u({command:`zero-trust dlp email rules 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 dlp email rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/email/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-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(Dy,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Deleted`})})};var Ay={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/email/rules/${t.rule_id}`};function jy(e){return e.usage(`$0 zero-trust dlp email rules get <rule-id>
|
|
738
|
-
|
|
739
|
-
Gets detailed configuration for a specific DLP email scanning rule, including detection patterns and actions.`).positional(`rule-id`,{type:`string`,description:`Rule ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const My={command:`get <rule-id>`,describe:`Get an email scanner rule`,builder:jy,handler:async e=>u({command:`zero-trust dlp email rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp email rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/email/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,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(`Loading`,async()=>n.send(Ay,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Loaded`})})};var Ny={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/email/rules`};function Py(e){return e.usage(`$0 zero-trust dlp email rules list
|
|
740
|
-
|
|
741
|
-
Lists all email scanner rules for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fy={command:`list`,describe:`List all email scanner rules`,builder:Py,handler:async e=>u({command:`zero-trust dlp email rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp email rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/email/rules`,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(Ny,{account_id:a}));s(u,{successLabel:`Loaded`})})};var Iy={method:`PUT`,path:t=>e`/accounts/${t.account_id}/dlp/email/rules/${t.rule_id}`,body:`json`};function Ly(e){return e.usage(`$0 zero-trust dlp email rules update <rule-id>
|
|
742
|
-
|
|
743
|
-
Updates a DLP email scanning rule.`).positional(`rule-id`,{type:`string`,description:`Rule ID`,demandOption:!0}).option(`action-action`,{type:`string`,description:`The action.action field`,choices:[`Block`]}).coerce(`action-action`,e=>_(e,`action-action`,`text`)).option(`action-message`,{type:`string`,description:`The action.message field`}).option(`conditions`,{type:`string`,description:`Triggered if all conditions match. Provide as a JSON array of objects or @path/to/file.json.`}).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Rule description.`})}const Ry={command:`update <rule-id>`,describe:`Update email scanner rule`,builder:Ly,handler:async e=>u({command:`zero-trust dlp email rules update`,classification:{safeFlags:[`action-action`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp email rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/email/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:{action:e[`action-action`],message:_(e[`action-message`],`action-message`,`text`)},conditions:d(e.conditions,`conditions`),description:_(e.description,`description`,`text`),enabled:e.enabled,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(Iy,{body:t,account_id:a,rule_id:e[`rule-id`]}));s(r,{successLabel:`Updated`});return}if(e[`action-action`]===void 0&&(e[`action-action`]=await b(`action-action`,`The action.action field`,[`Block`])),e.conditions===void 0)throw Error(`--conditions is required (or pass --body with this field set).`);if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`The name field`));let u=g({action:{action:e[`action-action`],message:_(e[`action-message`],`action-message`,`text`)},conditions:d(e.conditions,`conditions`),description:_(e.description,`description`,`text`),enabled:e.enabled,name:_(e.name,`name`,`text`)}),p=await l(`Updating`,async()=>n.send(Iy,{body:u,account_id:a,rule_id:e[`rule-id`]}));s(p,{successLabel:`Updated`})})},zy={command:`rules`,describe:`Data Loss Prevention - manage outbound email scanning rules and their priorities`,builder:e=>e.command(Cy).command(Ey).command(ky).command(My).command(Fy).command(Ry).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},By={command:`email`,describe:`Operations for dlp.email`,builder:e=>e.command(by).command(zy).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Vy={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/entries`,body:`json`};function Hy(e){return e.usage(`$0 zero-trust dlp entries create
|
|
744
|
-
|
|
745
|
-
Creates a DLP custom entry.`).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`pattern-regex`,{type:`string`,description:`The pattern.regex field`}).option(`pattern-validation`,{type:`string`,description:`The pattern.validation field`,choices:[`luhn`]}).coerce(`pattern-validation`,e=>_(e,`pattern-validation`,`text`)).option(`profile-id`,{type:`string`,description:`The profile_id field`}).option(`validator-ids`,{type:`string`,array:!0,description:`Validators the new entry should reference, by id, at most 10.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A new entry to create.`})}const Uy={command:`create`,describe:`Create custom entry`,builder:Hy,handler:async e=>u({command:`zero-trust dlp entries create`,classification:{safeFlags:[`enabled`,`pattern-validation`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp entries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/entries`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),enabled:e.enabled,name:_(e.name,`name`,`text`),pattern:{regex:_(e[`pattern-regex`],`pattern-regex`,`text`),validation:e[`pattern-validation`]},profile_id:_(e[`profile-id`],`profile-id`,`text`),validator_ids:e[`validator-ids`]}):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(Vy,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await y(`name`,`The name field`)),e[`pattern-regex`]===void 0&&(e[`pattern-regex`]=await y(`pattern-regex`,`The pattern.regex field`));let u=g({description:_(e.description,`description`,`text`),enabled:e.enabled,name:_(e.name,`name`,`text`),pattern:{regex:_(e[`pattern-regex`],`pattern-regex`,`text`),validation:e[`pattern-validation`]},profile_id:_(e[`profile-id`],`profile-id`,`text`),validator_ids:e[`validator-ids`]}),d=await l(`Creating`,async()=>n.send(Vy,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Wy={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/entries/${t.entry_id}`};function Gy(e){return e.usage(`$0 zero-trust dlp entries delete <entry-id>
|
|
746
|
-
|
|
747
|
-
Deletes a DLP custom entry.`).positional(`entry-id`,{type:`string`,description:`Entry 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 Ky={command:`delete <entry-id>`,describe:`Delete custom entry`,builder:Gy,handler:async e=>u({command:`zero-trust dlp entries 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 dlp entries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/entries/${e[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(e[`entry-id`]))}`,pathParams:{"entry-id":String(e[`entry-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(Wy,{account_id:a,entry_id:e[`entry-id`]}));s(u,{successLabel:`Deleted`})})};var qy={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/entries/${t.entry_id}`};function Jy(e){return e.usage(`$0 zero-trust dlp entries get <entry-id>
|
|
748
|
-
|
|
749
|
-
Fetches a DLP entry by ID.`).positional(`entry-id`,{type:`string`,description:`Entry ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Yy={command:`get <entry-id>`,describe:`Get DLP Entry`,builder:Jy,handler:async e=>u({command:`zero-trust dlp entries get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp entries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/entries/${e[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(e[`entry-id`]))}`,pathParams:{"entry-id":String(e[`entry-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(qy,{account_id:a,entry_id:e[`entry-id`]}));s(u,{successLabel:`Loaded`})})};var Xy={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/entries`};function Zy(e){return e.usage(`$0 zero-trust dlp entries list
|
|
750
|
-
|
|
751
|
-
Lists all DLP entries in an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qy={command:`list`,describe:`List all entries`,builder:Zy,handler:async e=>u({command:`zero-trust dlp entries list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp entries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/entries`,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(Xy,{account_id:a}));s(u,{successLabel:`Loaded`})})};var $y={method:`PUT`,path:t=>e`/accounts/${t.account_id}/dlp/entries/${t.entry_id}`,body:`json`};function eb(e){return e.usage(`$0 zero-trust dlp entries update <entry-id>
|
|
752
|
-
|
|
753
|
-
Updates a DLP entry.`).positional(`entry-id`,{type:`string`,description:`Entry ID`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update to be applied to the entry.`})}const tb={command:`update <entry-id>`,describe:`Update entry`,builder:eb,handler:async e=>u({command:`zero-trust dlp entries update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp entries update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/entries/${e[`entry-id`]==null?`<entry-id>`:encodeURIComponent(String(e[`entry-id`]))}`,pathParams:{"entry-id":String(e[`entry-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({enabled:e.enabled}):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($y,{body:t,account_id:a,entry_id:e[`entry-id`]}));s(r,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=g({enabled:e.enabled}),d=await l(`Updating`,async()=>n.send($y,{body:u,account_id:a,entry_id:e[`entry-id`]}));s(d,{successLabel:`Updated`})})},nb={command:`entries`,describe:`Data Loss Prevention - list and manage detection entries`,builder:e=>e.command(Uy).command(Ky).command(Yy).command(Qy).command(tb).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var rb={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/limits`};function ib(e){return e.usage(`$0 zero-trust dlp limits list
|
|
754
|
-
|
|
755
|
-
Retrieves current DLP usage limits and quotas for the account, including maximum allowed counts and current usage for custom entries, dataset cells, and document fingerprints.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ab={command:`list`,describe:`Fetch limits associated with DLP for account`,builder:ib,handler:async e=>u({command:`zero-trust dlp limits list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp limits list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/limits`,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(rb,{account_id:a}));s(u,{successLabel:`Loaded`})})},ob={command:`limits`,describe:`Data Loss Prevention - view account limits and resource quotas`,builder:e=>e.command(ab).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var sb={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/patterns/validate`,body:`json`};function cb(e){return e.usage("$0 zero-trust dlp patterns validate\n\nValidates whether this pattern is a valid regular expression. Rejects it if the regular expression is too complex or can match an unbounded-length string. The regex will be rejected if it uses `*` or `+`. Bound the maximum number of characters that can be matched using a range, e.g. `{1,100}`.").option(`max-match-bytes`,{type:`number`,description:"Maximum number of bytes that the regular expression can match.\n\nIf this is `null` then there is no limit on the length. Patterns can use\n`*` and `+`. Otherwise repeats should use a range `{m,n}` to restrict\npatterns to the length. If this field is missing, then a default length\nlimit is used.\n\nNote that the length is specified in bytes. Since regular expressions\nuse UTF-8 the pattern `.` can match up to 4 bytes. Hence `.{1,256}`\nhas a maximum length of 1024 bytes."}).option(`regex`,{type:`string`,description:`The regex field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Validation query.`})}const lb={command:`validate`,describe:`Validate a DLP regex pattern`,builder:cb,handler:async e=>u({command:`zero-trust dlp patterns validate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp patterns validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/patterns/validate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({max_match_bytes:e[`max-match-bytes`],regex:_(e.regex,`regex`,`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(`Validating`,async()=>n.send(sb,{body:t,account_id:a}));s(r,{successLabel:`Validated`});return}e.regex===void 0&&(e.regex=await y(`regex`,`The regex field`));let u=g({max_match_bytes:e[`max-match-bytes`],regex:_(e.regex,`regex`,`text`)}),d=await l(`Validating`,async()=>n.send(sb,{body:u,account_id:a}));s(d,{successLabel:`Validated`})})},ub={command:`patterns`,describe:`Data Loss Prevention - validate regular expressions used for content detection`,builder:e=>e.command(lb).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var db={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/profiles/custom`,body:`json`};function fb(e){return e.usage(`$0 zero-trust dlp profiles custom create
|
|
756
|
-
|
|
757
|
-
Creates a DLP custom profile.`).option(`ai-context-enabled`,{type:`boolean`,description:`The ai_context_enabled field`,default:!1}).option(`allowed-match-count`,{type:`number`,description:`Related DLP policies will trigger when the match count exceeds the number set.`,default:0}).option(`confidence-threshold`,{type:`string`,description:`The confidence_threshold field`,default:`low`}).option(`context-awareness-enabled`,{type:`boolean`,description:`If true, scan the context of predefined entries to only return matches surrounded by keywords.`}).option(`context-awareness-skip-files`,{type:`boolean`,description:`If the content type is a file, skip context analysis and return all matches.`}).option(`data-classes`,{type:`string`,array:!0,description:`Data class IDs to associate with the profile.`}).option(`data-tags`,{type:`string`,array:!0,description:`Data tag IDs to associate with the profile.`}).option(`description`,{type:`string`,description:`The description of the profile.`}).option(`entries`,{type:`string`,description:`The entries field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`ocr-enabled`,{type:`boolean`,description:`The ocr_enabled field`,default:!1}).option(`sensitivity-levels`,{type:`string`,description:`Sensitivity levels to associate with the profile. Provide as a JSON array of objects or @path/to/file.json.`}).option(`shared-entries`,{type:`string`,description:`Entries from other profiles (e.g. pre-defined Cloudflare profiles, or your Microsoft Information Protection profiles). 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:`A new profile to create.`}).check(e=>{let t=[`context-awareness-enabled`,`context-awareness-skip-files`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`context-awareness-enabled`,`context-awareness-skip-files`].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 --context-awareness-* flag is set`)}return!0})}const pb={command:`create`,describe:`Create custom profile`,builder:fb,handler:async e=>u({command:`zero-trust dlp profiles custom create`,classification:{safeFlags:[`ai-context-enabled`,`context-awareness-enabled`,`context-awareness-skip-files`,`ocr-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp profiles custom create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/profiles/custom`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({ai_context_enabled:e[`ai-context-enabled`],allowed_match_count:e[`allowed-match-count`],confidence_threshold:_(e[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:e[`context-awareness-enabled`],skip:{files:e[`context-awareness-skip-files`]}},data_classes:e[`data-classes`],data_tags:e[`data-tags`],description:_(e.description,`description`,`text`),entries:d(e.entries,`entries`),name:_(e.name,`name`,`text`),ocr_enabled:e[`ocr-enabled`],sensitivity_levels:d(e[`sensitivity-levels`],`sensitivity-levels`),shared_entries:d(e[`shared-entries`],`shared-entries`)}):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(db,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name field`));let u=g({ai_context_enabled:e[`ai-context-enabled`],allowed_match_count:e[`allowed-match-count`],confidence_threshold:_(e[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:e[`context-awareness-enabled`],skip:{files:e[`context-awareness-skip-files`]}},data_classes:e[`data-classes`],data_tags:e[`data-tags`],description:_(e.description,`description`,`text`),entries:d(e.entries,`entries`),name:_(e.name,`name`,`text`),ocr_enabled:e[`ocr-enabled`],sensitivity_levels:d(e[`sensitivity-levels`],`sensitivity-levels`),shared_entries:d(e[`shared-entries`],`shared-entries`)}),p=await l(`Creating`,async()=>n.send(db,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var mb={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/profiles/custom/${t.profile_id}`};function hb(e){return e.usage(`$0 zero-trust dlp profiles custom delete <profile-id>
|
|
758
|
-
|
|
759
|
-
Deletes a DLP custom profile.`).positional(`profile-id`,{type:`string`,description:`Profile 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 gb={command:`delete <profile-id>`,describe:`Delete custom profile`,builder:hb,handler:async e=>u({command:`zero-trust dlp profiles custom 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 dlp profiles custom delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/profiles/custom/${e[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(e[`profile-id`]))}`,pathParams:{"profile-id":String(e[`profile-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(mb,{account_id:a,profile_id:e[`profile-id`]}));s(u,{successLabel:`Deleted`})})};var _b={method:`PUT`,path:t=>e`/accounts/${t.account_id}/dlp/profiles/custom/${t.profile_id}`,body:`json`};function vb(e){return e.usage(`$0 zero-trust dlp profiles custom update <profile-id>
|
|
760
|
-
|
|
761
|
-
Updates a DLP custom profile.`).positional(`profile-id`,{type:`string`,description:`Profile ID`,demandOption:!0}).option(`ai-context-enabled`,{type:`boolean`,description:`The ai_context_enabled field`}).option(`allowed-match-count`,{type:`number`,description:`The allowed_match_count field`}).option(`confidence-threshold`,{type:`string`,description:`The confidence_threshold field`}).option(`context-awareness-enabled`,{type:`boolean`,description:`If true, scan the context of predefined entries to only return matches surrounded by keywords.`}).option(`context-awareness-skip-files`,{type:`boolean`,description:`If the content type is a file, skip context analysis and return all matches.`}).option(`data-classes`,{type:`string`,array:!0,description:`Data class IDs to associate with the profile. If omitted, existing associations are unchanged.`}).option(`data-tags`,{type:`string`,array:!0,description:`Data tag IDs to associate with the profile. If omitted, existing associations are unchanged.`}).option(`description`,{type:`string`,description:`The description of the profile.`}).option(`entries`,{type:`string`,description:`Custom entries from this profile.
|
|
762
|
-
If this field is omitted, entries owned by this profile will not be changed. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`ocr-enabled`,{type:`boolean`,description:`The ocr_enabled field`}).option(`sensitivity-levels`,{type:`string`,description:`Sensitivity levels to associate with the profile. If omitted, existing associations are unchanged. Provide as a JSON array of objects or @path/to/file.json.`}).option(`shared-entries`,{type:`string`,description:`Other entries, e.g. predefined or integration. 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:`The updated parameters for the profile.`}).check(e=>{let t=[`context-awareness-enabled`,`context-awareness-skip-files`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`context-awareness-enabled`,`context-awareness-skip-files`].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 --context-awareness-* flag is set`)}return!0})}const yb={command:`update <profile-id>`,describe:`Update custom profile`,builder:vb,handler:async e=>u({command:`zero-trust dlp profiles custom update`,classification:{safeFlags:[`ai-context-enabled`,`context-awareness-enabled`,`context-awareness-skip-files`,`ocr-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp profiles custom update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/profiles/custom/${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({ai_context_enabled:e[`ai-context-enabled`],allowed_match_count:e[`allowed-match-count`],confidence_threshold:_(e[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:e[`context-awareness-enabled`],skip:{files:e[`context-awareness-skip-files`]}},data_classes:e[`data-classes`],data_tags:e[`data-tags`],description:_(e.description,`description`,`text`),entries:d(e.entries,`entries`),name:_(e.name,`name`,`text`),ocr_enabled:e[`ocr-enabled`],sensitivity_levels:d(e[`sensitivity-levels`],`sensitivity-levels`),shared_entries:d(e[`shared-entries`],`shared-entries`)}):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(_b,{body:t,account_id:a,profile_id:e[`profile-id`]}));s(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await y(`name`,`The name field`));let u=g({ai_context_enabled:e[`ai-context-enabled`],allowed_match_count:e[`allowed-match-count`],confidence_threshold:_(e[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:e[`context-awareness-enabled`],skip:{files:e[`context-awareness-skip-files`]}},data_classes:e[`data-classes`],data_tags:e[`data-tags`],description:_(e.description,`description`,`text`),entries:d(e.entries,`entries`),name:_(e.name,`name`,`text`),ocr_enabled:e[`ocr-enabled`],sensitivity_levels:d(e[`sensitivity-levels`],`sensitivity-levels`),shared_entries:d(e[`shared-entries`],`shared-entries`)}),p=await l(`Updating`,async()=>n.send(_b,{body:u,account_id:a,profile_id:e[`profile-id`]}));s(p,{successLabel:`Updated`})})},bb={command:`custom`,describe:`Data Loss Prevention - manage custom profiles`,builder:e=>e.command(pb).command(gb).command(yb).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var xb={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/profiles/${t.profile_id}`};function Sb(e){return e.usage(`$0 zero-trust dlp profiles get <profile-id>
|
|
763
|
-
|
|
764
|
-
Fetches a DLP profile by ID.`).positional(`profile-id`,{type:`string`,description:`Profile ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Cb={command:`get <profile-id>`,describe:`Get DLP Profile`,builder:Sb,handler:async e=>u({command:`zero-trust dlp profiles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp profiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/profiles/${e[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(e[`profile-id`]))}`,pathParams:{"profile-id":String(e[`profile-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(xb,{account_id:a,profile_id:e[`profile-id`]}));s(u,{successLabel:`Loaded`})})};var wb={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/profiles`,query:[`all`]};function Tb(e){return e.usage(`$0 zero-trust dlp profiles list
|
|
765
|
-
|
|
766
|
-
Lists all DLP profiles in an account.`).option(`all`,{type:`boolean`,description:`Return all profiles, including those that current account does not have access to.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Eb={command:`list`,describe:`List all profiles`,builder:Tb,handler:async e=>u({command:`zero-trust dlp profiles list`,classification:{safeFlags:[`all`,`dry-run`]}},e,async()=>{let n={all:e.all};if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp profiles list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/profiles`,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(wb,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Db={method:`PUT`,path:t=>e`/accounts/${t.account_id}/dlp/profiles/predefined/${t.profile_id}`,body:`json`};function Ob(e){return e.usage(`$0 zero-trust dlp profiles predefined update <profile-id>
|
|
767
|
-
|
|
768
|
-
Updates a DLP predefined profile. Only supports enabling/disabling entries.`).positional(`profile-id`,{type:`string`,description:`Profile ID`,demandOption:!0}).option(`ai-context-enabled`,{type:`boolean`,description:`The ai_context_enabled field`}).option(`allowed-match-count`,{type:`number`,description:`The allowed_match_count field`}).option(`confidence-threshold`,{type:`string`,description:`The confidence_threshold field`}).option(`context-awareness-enabled`,{type:`boolean`,description:`If true, scan the context of predefined entries to only return matches surrounded by keywords.`}).option(`context-awareness-skip-files`,{type:`boolean`,description:`If the content type is a file, skip context analysis and return all matches.`}).option(`entries`,{type:`string`,description:`The entries field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`ocr-enabled`,{type:`boolean`,description:`The ocr_enabled field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updated parameters for the predefined profile.`}).check(e=>{let t=[`context-awareness-enabled`,`context-awareness-skip-files`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`context-awareness-enabled`,`context-awareness-skip-files`].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 --context-awareness-* flag is set`)}return!0})}const kb={command:`update <profile-id>`,describe:`Update predefined profile`,builder:Ob,handler:async e=>u({command:`zero-trust dlp profiles predefined update`,classification:{safeFlags:[`ai-context-enabled`,`context-awareness-enabled`,`context-awareness-skip-files`,`ocr-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp profiles predefined update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/profiles/predefined/${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({ai_context_enabled:e[`ai-context-enabled`],allowed_match_count:e[`allowed-match-count`],confidence_threshold:_(e[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:e[`context-awareness-enabled`],skip:{files:e[`context-awareness-skip-files`]}},entries:d(e.entries,`entries`),ocr_enabled:e[`ocr-enabled`]}):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(Db,{body:t,account_id:a,profile_id:e[`profile-id`]}));s(r,{successLabel:`Updated`});return}let u=g({ai_context_enabled:e[`ai-context-enabled`],allowed_match_count:e[`allowed-match-count`],confidence_threshold:_(e[`confidence-threshold`],`confidence-threshold`,`text`),context_awareness:{enabled:e[`context-awareness-enabled`],skip:{files:e[`context-awareness-skip-files`]}},entries:d(e.entries,`entries`),ocr_enabled:e[`ocr-enabled`]}),p=await l(`Updating`,async()=>n.send(Db,{body:u,account_id:a,profile_id:e[`profile-id`]}));s(p,{successLabel:`Updated`})})},Ab={command:`predefined`,describe:`Data Loss Prevention - manage predefined profiles`,builder:e=>e.command(kb).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},jb={command:`profiles`,describe:`Data Loss Prevention - list and retrieve profiles`,builder:e=>e.command(Cb).command(Eb).command(bb).command(Ab).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Mb={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/templates/${t.template_id}`};function Nb(e){return e.usage(`$0 zero-trust dlp sensitivity-group-templates get <template-id>
|
|
769
|
-
|
|
770
|
-
Gets an available sensitivity group template.`).positional(`template-id`,{type:`string`,description:`Template ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pb={command:`get <template-id>`,describe:`Retrieve a specific sensitivity group template.`,builder:Nb,handler:async e=>u({command:`zero-trust dlp sensitivity-group-templates get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp sensitivity-group-templates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups/templates/${e[`template-id`]==null?`<template-id>`:encodeURIComponent(String(e[`template-id`]))}`,pathParams:{"template-id":String(e[`template-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(Mb,{account_id:a,template_id:e[`template-id`]}));s(u,{successLabel:`Loaded`})})};var Fb={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/templates`};function Ib(e){return e.usage(`$0 zero-trust dlp sensitivity-group-templates list
|
|
771
|
-
|
|
772
|
-
Lists available sensitivity group templates.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Lb={command:`list`,describe:`Retrieve all sensitivity group templates in an account`,builder:Ib,handler:async e=>u({command:`zero-trust dlp sensitivity-group-templates list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp sensitivity-group-templates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/sensitivity_groups/templates`,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(Fb,{account_id:a}));s(u,{successLabel:`Loaded`})})},Rb={command:`sensitivity-group-templates`,describe:`Data Loss Prevention - browse templates for creating sensitivity groups`,builder:e=>e.command(Pb).command(Lb).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var zb={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups`,body:`json`};function Bb(e){return e.usage(`$0 zero-trust dlp sensitivity-groups create
|
|
773
|
-
|
|
774
|
-
Creates a sensitivity group, optionally from a template.`).option(`description`,{type:`string`,description:`The description field`}).option(`levels`,{type:`string`,description:"Levels to create with the group. Mutually exclusive with `template_id`. Provide as a JSON array of objects or @path/to/file.json."}).option(`name`,{type:`string`,description:`The name field`}).option(`template-id`,{type:`string`,description:`The template_id field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the new sensitivity group.`})}const Vb={command:`create`,describe:`Creates a new sensitivity group.`,builder:Bb,handler:async e=>u({command:`zero-trust dlp sensitivity-groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp sensitivity-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),levels:d(e.levels,`levels`),name:_(e.name,`name`,`text`),template_id:_(e[`template-id`],`template-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(zb,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name field`));let u=g({description:_(e.description,`description`,`text`),levels:d(e.levels,`levels`),name:_(e.name,`name`,`text`),template_id:_(e[`template-id`],`template-id`,`text`)}),p=await l(`Creating`,async()=>n.send(zb,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Hb={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/${t.sensitivity_group_id}`};function Ub(e){return e.usage(`$0 zero-trust dlp sensitivity-groups delete <sensitivity-group-id>
|
|
775
|
-
|
|
776
|
-
Deletes a sensitivity group and its levels.`).positional(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group 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 Wb={command:`delete <sensitivity-group-id>`,describe:`Delete a single sensitivity group.`,builder:Ub,handler:async e=>u({command:`zero-trust dlp sensitivity-groups 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 dlp sensitivity-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups/${e[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(e[`sensitivity-group-id`]))}`,pathParams:{"sensitivity-group-id":String(e[`sensitivity-group-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(Hb,{account_id:a,sensitivity_group_id:e[`sensitivity-group-id`]}));s(u,{successLabel:`Deleted`})})};var Gb={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/${t.sensitivity_group_id}/level_order`};function Kb(e){return e.usage(`$0 zero-trust dlp sensitivity-groups get-level-order <sensitivity-group-id>
|
|
777
|
-
|
|
778
|
-
Gets the current order of sensitivity levels in a group.`).positional(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qb={command:`get-level-order <sensitivity-group-id>`,describe:`Retrieve the ordered list of level IDs for a sensitivity group.`,builder:Kb,handler:async e=>u({command:`zero-trust dlp sensitivity-groups get-level-order`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp sensitivity-groups get-level-order`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups/${e[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(e[`sensitivity-group-id`]))}/level_order`,pathParams:{"sensitivity-group-id":String(e[`sensitivity-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(Gb,{account_id:a,sensitivity_group_id:e[`sensitivity-group-id`]}));s(u,{successLabel:`Loaded`})})};var Jb={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/${t.sensitivity_group_id}`};function Yb(e){return e.usage(`$0 zero-trust dlp sensitivity-groups get <sensitivity-group-id>
|
|
779
|
-
|
|
780
|
-
Gets a sensitivity group and its levels.`).positional(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xb={command:`get <sensitivity-group-id>`,describe:`Retrieve a specific sensitivity group.`,builder:Yb,handler:async e=>u({command:`zero-trust dlp sensitivity-groups get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp sensitivity-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups/${e[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(e[`sensitivity-group-id`]))}`,pathParams:{"sensitivity-group-id":String(e[`sensitivity-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(Jb,{account_id:a,sensitivity_group_id:e[`sensitivity-group-id`]}));s(u,{successLabel:`Loaded`})})};var Zb={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups`};function Qb(e){return e.usage(`$0 zero-trust dlp sensitivity-groups list
|
|
781
|
-
|
|
782
|
-
Lists sensitivity groups configured for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $b={command:`list`,describe:`Retrieve all sensitivity groups in an account`,builder:Qb,handler:async e=>u({command:`zero-trust dlp sensitivity-groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp sensitivity-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/sensitivity_groups`,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(Zb,{account_id:a}));s(u,{successLabel:`Loaded`})})};var ex={method:`PUT`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/${t.sensitivity_group_id}/level_order`,body:`json`};function tx(e){return e.usage(`$0 zero-trust dlp sensitivity-groups update-level-order <sensitivity-group-id>
|
|
783
|
-
|
|
784
|
-
Updates the order of sensitivity levels in a group.`).positional(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`level-ids`,{type:`string`,array:!0,description:`The level_ids field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Desired ordered list of level IDs.`})}const nx={command:`update-level-order <sensitivity-group-id>`,describe:`Set the ordering of levels within a sensitivity group.`,builder:tx,handler:async e=>u({command:`zero-trust dlp sensitivity-groups update-level-order`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp sensitivity-groups update-level-order`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups/${e[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(e[`sensitivity-group-id`]))}/level_order`,pathParams:{"sensitivity-group-id":String(e[`sensitivity-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({level_ids:e[`level-ids`]}):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(ex,{body:t,account_id:a,sensitivity_group_id:e[`sensitivity-group-id`]}));s(r,{successLabel:`Updated`});return}if(e[`level-ids`]===void 0)throw Error(`--level-ids is required (or pass --body with this field set).`);let u=g({level_ids:e[`level-ids`]}),d=await l(`Updating`,async()=>n.send(ex,{body:u,account_id:a,sensitivity_group_id:e[`sensitivity-group-id`]}));s(d,{successLabel:`Updated`})})};var rx={method:`PUT`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/${t.sensitivity_group_id}`,body:`json`};function ix(e){return e.usage(`$0 zero-trust dlp sensitivity-groups update <sensitivity-group-id>
|
|
785
|
-
|
|
786
|
-
Updates a sensitivity group and its levels.`).positional(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`levels`,{type:`string`,description:"The desired final state of levels.\n- `None` (omitted): no level changes.\n- `Some([])`: delete all levels.\n- `Some([...])`: desired final set + order. Provide as a JSON array of objects or @path/to/file.json."}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the sensitivity group to update.`})}const ax={command:`update <sensitivity-group-id>`,describe:`Update the attributes of a single sensitivity group.`,builder:ix,handler:async e=>u({command:`zero-trust dlp sensitivity-groups update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp sensitivity-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups/${e[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(e[`sensitivity-group-id`]))}`,pathParams:{"sensitivity-group-id":String(e[`sensitivity-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({description:_(e.description,`description`,`text`),levels:d(e.levels,`levels`),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(rx,{body:t,account_id:a,sensitivity_group_id:e[`sensitivity-group-id`]}));s(r,{successLabel:`Updated`});return}let u=g({description:_(e.description,`description`,`text`),levels:d(e.levels,`levels`),name:_(e.name,`name`,`text`)}),p=await l(`Updating`,async()=>n.send(rx,{body:u,account_id:a,sensitivity_group_id:e[`sensitivity-group-id`]}));s(p,{successLabel:`Updated`})})},ox={command:`sensitivity-groups`,describe:`Data Loss Prevention - manage sensitivity groups and their level ordering`,builder:e=>e.command(Vb).command(Wb).command(Xb).command(qb).command($b).command(ax).command(nx).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var sx={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/${t.sensitivity_group_id}/levels`,body:`json`};function cx(e){return e.usage(`$0 zero-trust dlp sensitivity-levels create <sensitivity-group-id>
|
|
787
|
-
|
|
788
|
-
Creates a sensitivity level in a group.`).positional(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the new sensitivity level.`})}const lx={command:`create <sensitivity-group-id>`,describe:`Creates a new sensitivity level.`,builder:cx,handler:async e=>u({command:`zero-trust dlp sensitivity-levels create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp sensitivity-levels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups/${e[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(e[`sensitivity-group-id`]))}/levels`,pathParams:{"sensitivity-group-id":String(e[`sensitivity-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({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(`Creating`,async()=>n.send(sx,{body:t,account_id:a,sensitivity_group_id:e[`sensitivity-group-id`]}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`The name field`));let u=g({description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(sx,{body:u,account_id:a,sensitivity_group_id:e[`sensitivity-group-id`]}));s(d,{successLabel:`Created`})})};var ux={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/${t.sensitivity_group_id}/levels/${t.sensitivity_level_id}`};function dx(e){return e.usage(`$0 zero-trust dlp sensitivity-levels delete <sensitivity-level-id>
|
|
789
|
-
|
|
790
|
-
Deletes a sensitivity level from a group.`).positional(`sensitivity-level-id`,{type:`string`,description:`Sensitivity level ID`,demandOption:!0}).option(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group 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 fx={command:`delete <sensitivity-level-id>`,describe:`Delete a single sensitivity level.`,builder:dx,handler:async e=>u({command:`zero-trust dlp sensitivity-levels 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 dlp sensitivity-levels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups/${e[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(e[`sensitivity-group-id`]))}/levels/${e[`sensitivity-level-id`]==null?`<sensitivity-level-id>`:encodeURIComponent(String(e[`sensitivity-level-id`]))}`,pathParams:{"sensitivity-group-id":String(e[`sensitivity-group-id`]??``),"sensitivity-level-id":String(e[`sensitivity-level-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(ux,{account_id:a,sensitivity_group_id:e[`sensitivity-group-id`],sensitivity_level_id:e[`sensitivity-level-id`]}));s(u,{successLabel:`Deleted`})})};var px={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/${t.sensitivity_group_id}/levels/${t.sensitivity_level_id}`};function mx(e){return e.usage(`$0 zero-trust dlp sensitivity-levels get <sensitivity-level-id>
|
|
791
|
-
|
|
792
|
-
Gets a sensitivity level from a group.`).positional(`sensitivity-level-id`,{type:`string`,description:`Sensitivity level ID`,demandOption:!0}).option(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const hx={command:`get <sensitivity-level-id>`,describe:`Retrieve a specific sensitivity level.`,builder:mx,handler:async e=>u({command:`zero-trust dlp sensitivity-levels get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp sensitivity-levels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups/${e[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(e[`sensitivity-group-id`]))}/levels/${e[`sensitivity-level-id`]==null?`<sensitivity-level-id>`:encodeURIComponent(String(e[`sensitivity-level-id`]))}`,pathParams:{"sensitivity-group-id":String(e[`sensitivity-group-id`]??``),"sensitivity-level-id":String(e[`sensitivity-level-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(px,{account_id:a,sensitivity_group_id:e[`sensitivity-group-id`],sensitivity_level_id:e[`sensitivity-level-id`]}));s(u,{successLabel:`Loaded`})})};var gx={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/${t.sensitivity_group_id}/levels`};function _x(e){return e.usage(`$0 zero-trust dlp sensitivity-levels list
|
|
793
|
-
|
|
794
|
-
Lists sensitivity levels in a sensitivity group.`).option(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vx={command:`list`,describe:`Retrieve all sensitivity levels in a sensitivity group`,builder:_x,handler:async e=>u({command:`zero-trust dlp sensitivity-levels list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp sensitivity-levels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups/${e[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(e[`sensitivity-group-id`]))}/levels`,pathParams:{"sensitivity-group-id":String(e[`sensitivity-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(gx,{account_id:a,sensitivity_group_id:e[`sensitivity-group-id`]}));s(u,{successLabel:`Loaded`})})};var yx={method:`PUT`,path:t=>e`/accounts/${t.account_id}/dlp/sensitivity_groups/${t.sensitivity_group_id}/levels/${t.sensitivity_level_id}`,body:`json`};function bx(e){return e.usage(`$0 zero-trust dlp sensitivity-levels update <sensitivity-level-id>
|
|
795
|
-
|
|
796
|
-
Updates a sensitivity level in a group.`).positional(`sensitivity-level-id`,{type:`string`,description:`Sensitivity level ID`,demandOption:!0}).option(`sensitivity-group-id`,{type:`string`,description:`Sensitivity group ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the sensitivity level to update.`})}const xx={command:`update <sensitivity-level-id>`,describe:`Update the attributes of a single sensitivity level.`,builder:bx,handler:async e=>u({command:`zero-trust dlp sensitivity-levels update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp sensitivity-levels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/sensitivity_groups/${e[`sensitivity-group-id`]==null?`<sensitivity-group-id>`:encodeURIComponent(String(e[`sensitivity-group-id`]))}/levels/${e[`sensitivity-level-id`]==null?`<sensitivity-level-id>`:encodeURIComponent(String(e[`sensitivity-level-id`]))}`,pathParams:{"sensitivity-group-id":String(e[`sensitivity-group-id`]??``),"sensitivity-level-id":String(e[`sensitivity-level-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({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(yx,{body:t,account_id:a,sensitivity_group_id:e[`sensitivity-group-id`],sensitivity_level_id:e[`sensitivity-level-id`]}));s(r,{successLabel:`Updated`});return}let u=g({description:_(e.description,`description`,`text`),name:_(e.name,`name`,`text`)}),d=await l(`Updating`,async()=>n.send(yx,{body:u,account_id:a,sensitivity_group_id:e[`sensitivity-group-id`],sensitivity_level_id:e[`sensitivity-level-id`]}));s(d,{successLabel:`Updated`})})},Sx={command:`sensitivity-levels`,describe:`Data Loss Prevention - manage sensitivity levels within sensitivity groups`,builder:e=>e.command(lx).command(fx).command(hx).command(vx).command(xx).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Cx={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/settings`};function wx(e){return e.usage(`$0 zero-trust dlp settings delete
|
|
797
|
-
|
|
798
|
-
Deletes account-level DLP settings and returns the initial values.`).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 Tx={command:`delete`,describe:`Delete (reset) DLP account-level settings to initial values.`,builder:wx,handler:async e=>u({command:`zero-trust dlp settings delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp settings delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/settings`,pathParams:{},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(Cx,{account_id:a}));s(u,{successLabel:`Deleted`})})};var Ex={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/dlp/settings`,body:`json`};function Dx(e){return e.usage(`$0 zero-trust dlp settings edit
|
|
799
|
-
|
|
800
|
-
Missing fields keep their existing values.`).option(`ai-context-analysis`,{type:`boolean`,description:`Whether AI context analysis is enabled at the account level.`}).option(`ocr`,{type:`boolean`,description:`Whether OCR is enabled at the account level.`}).option(`payload-logging-masking-level`,{type:`string`,description:"Masking level for payload logs.\n\n- `full`: The entire payload is masked.\n- `partial`: Only partial payload content is masked.\n- `clear`: No masking is applied to the payload content.\n- `default`: DLP uses its default masking behavior.",choices:[`full`,`partial`,`clear`,`default`]}).coerce(`payload-logging-masking-level`,e=>_(e,`payload-logging-masking-level`,`text`)).option(`payload-logging-public-key`,{type:`string`,description:`Base64-encoded public key for encrypting payload logs.
|
|
801
|
-
|
|
802
|
-
- Set to a non-empty base64 string to enable payload logging with the given key.
|
|
803
|
-
- Set to an empty string to disable payload logging.
|
|
804
|
-
- Omit or set to null to leave unchanged (PATCH) or reset to disabled (PUT).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`DLP settings fields to update.`})}const Ox={command:`edit`,describe:`Partially update DLP account-level settings.`,builder:Dx,handler:async e=>u({command:`zero-trust dlp settings edit`,classification:{safeFlags:[`ai-context-analysis`,`ocr`,`payload-logging-masking-level`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp settings edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/settings`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({ai_context_analysis:e[`ai-context-analysis`],ocr:e.ocr,payload_logging:{masking_level:e[`payload-logging-masking-level`],public_key:_(e[`payload-logging-public-key`],`payload-logging-public-key`,`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(Ex,{body:t,account_id:a}));s(r,{successLabel:`Updated`});return}let u=g({ai_context_analysis:e[`ai-context-analysis`],ocr:e.ocr,payload_logging:{masking_level:e[`payload-logging-masking-level`],public_key:_(e[`payload-logging-public-key`],`payload-logging-public-key`,`text`)}}),d=await l(`Updating`,async()=>n.send(Ex,{body:u,account_id:a}));s(d,{successLabel:`Updated`})})};var kx={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/settings`};function Ax(e){return e.usage(`$0 zero-trust dlp settings get
|
|
805
|
-
|
|
806
|
-
Gets the account-level DLP settings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jx={command:`get`,describe:`Get DLP account-level settings.`,builder:Ax,handler:async e=>u({command:`zero-trust dlp settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/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(kx,{account_id:a}));s(u,{successLabel:`Loaded`})})};var Mx={method:`PUT`,path:t=>e`/accounts/${t.account_id}/dlp/settings`,body:`json`};function Nx(e){return e.usage(`$0 zero-trust dlp settings update
|
|
807
|
-
|
|
808
|
-
Missing fields are reset to initial (unconfigured) values.`).option(`ai-context-analysis`,{type:`boolean`,description:`Whether AI context analysis is enabled at the account level.`}).option(`ocr`,{type:`boolean`,description:`Whether OCR is enabled at the account level.`}).option(`payload-logging-masking-level`,{type:`string`,description:"Masking level for payload logs.\n\n- `full`: The entire payload is masked.\n- `partial`: Only partial payload content is masked.\n- `clear`: No masking is applied to the payload content.\n- `default`: DLP uses its default masking behavior.",choices:[`full`,`partial`,`clear`,`default`]}).coerce(`payload-logging-masking-level`,e=>_(e,`payload-logging-masking-level`,`text`)).option(`payload-logging-public-key`,{type:`string`,description:`Base64-encoded public key for encrypting payload logs.
|
|
809
|
-
|
|
810
|
-
- Set to a non-empty base64 string to enable payload logging with the given key.
|
|
811
|
-
- Set to an empty string to disable payload logging.
|
|
812
|
-
- Omit or set to null to leave unchanged (PATCH) or reset to disabled (PUT).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`New DLP settings.`})}const Px={command:`update`,describe:`Update DLP account-level settings (full replacement).`,builder:Nx,handler:async e=>u({command:`zero-trust dlp settings update`,classification:{safeFlags:[`ai-context-analysis`,`ocr`,`payload-logging-masking-level`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/settings`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({ai_context_analysis:e[`ai-context-analysis`],ocr:e.ocr,payload_logging:{masking_level:e[`payload-logging-masking-level`],public_key:_(e[`payload-logging-public-key`],`payload-logging-public-key`,`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(Mx,{body:t,account_id:a}));s(r,{successLabel:`Updated`});return}let u=g({ai_context_analysis:e[`ai-context-analysis`],ocr:e.ocr,payload_logging:{masking_level:e[`payload-logging-masking-level`],public_key:_(e[`payload-logging-public-key`],`payload-logging-public-key`,`text`)}}),d=await l(`Updating`,async()=>n.send(Mx,{body:u,account_id:a}));s(d,{successLabel:`Updated`})})},Fx={command:`settings`,describe:`Data Loss Prevention - manage account-level settings`,builder:e=>e.command(Tx).command(Ox).command(jx).command(Px).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ix={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/validators/${t.validator_id}`};function Lx(e){return e.usage(`$0 zero-trust dlp validators get <validator-id>
|
|
813
|
-
|
|
814
|
-
Fetches a validator of any kind by ID.`).positional(`validator-id`,{type:`string`,description:`Validator ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Rx={command:`get <validator-id>`,describe:`Get a validator`,builder:Lx,handler:async e=>u({command:`zero-trust dlp validators get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp validators get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/${e[`validator-id`]==null?`<validator-id>`:encodeURIComponent(String(e[`validator-id`]))}`,pathParams:{"validator-id":String(e[`validator-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(Ix,{account_id:a,validator_id:e[`validator-id`]}));s(u,{successLabel:`Loaded`})})};var zx={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/validators`,query:[`kind`]};function Bx(e){return e.usage(`$0 zero-trust dlp validators list
|
|
815
|
-
|
|
816
|
-
Lists the validators configured for the account, of every kind.`).option(`kind`,{type:`string`,description:`Only return validators of this kind. Omit to return every kind.`,choices:[`proximity_words`,`worker`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Vx={command:`list`,describe:`List validators`,builder:Bx,handler:async e=>u({command:`zero-trust dlp validators list`,classification:{safeFlags:[`kind`,`dry-run`]}},e,async()=>{let n={kind:e.kind};if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp validators list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/validators`,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(zx,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Hx={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/validators/proximity_words`,body:`json`};function Ux(e){return e.usage(`$0 zero-trust dlp validators proximity-words create
|
|
817
|
-
|
|
818
|
-
Creates a reusable list of weighted words that detection entries can attach to in order to refine their matches. An account may own at most 100 validators across all kinds.`).option(`name`,{type:`string`,description:`A name for this validator, at most 50 characters.`}).option(`words`,{type:`string`,description:`The words that raise confidence when found near a match, at most 100 per validator. Matching
|
|
819
|
-
ignores case, so the list may not contain the same word twice with different capitalisation.
|
|
820
|
-
Words are stored as sent.
|
|
821
|
-
|
|
822
|
-
For example, a validator for medical record numbers might use
|
|
823
|
-
\`[{"word": "patient", "weight": "strong"}, {"word": "diagnosis", "weight": "moderate"},
|
|
824
|
-
{"word": "mrn", "weight": "weak"}]\`. 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:`Attributes of the new validator.`})}const Wx={command:`create`,describe:`Create a proximity word validator`,builder:Ux,handler:async e=>u({command:`zero-trust dlp validators proximity-words create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp validators proximity-words create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/proximity_words`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({name:_(e.name,`name`,`text`),words:d(e.words,`words`)}):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(Hx,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await y(`name`,`A name for this validator, at most 50 characters.`)),e.words===void 0)throw Error(`--words is required (or pass --body with this field set).`);let u=g({name:_(e.name,`name`,`text`),words:d(e.words,`words`)}),p=await l(`Creating`,async()=>n.send(Hx,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Gx={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/validators/proximity_words/${t.validator_id}`};function Kx(e){return e.usage("$0 zero-trust dlp validators proximity-words delete <validator-id>\n\nDeletes a `proximity_words` validator. Fails with `409` while any detection entry is still attached to it; detach it from those entries first.").positional(`validator-id`,{type:`string`,description:`Validator 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 qx={command:`delete <validator-id>`,describe:`Delete a proximity word validator`,builder:Kx,handler:async e=>u({command:`zero-trust dlp validators proximity-words 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 dlp validators proximity-words delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/proximity_words/${e[`validator-id`]==null?`<validator-id>`:encodeURIComponent(String(e[`validator-id`]))}`,pathParams:{"validator-id":String(e[`validator-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(Gx,{account_id:a,validator_id:e[`validator-id`]}));s(u,{successLabel:`Deleted`})})};var Jx={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/validators/proximity_words/${t.validator_id}`};function Yx(e){return e.usage(`$0 zero-trust dlp validators proximity-words get <validator-id>
|
|
825
|
-
|
|
826
|
-
Fetches a \`proximity_words\` validator by ID.`).positional(`validator-id`,{type:`string`,description:`Validator ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xx={command:`get <validator-id>`,describe:`Get a proximity word validator`,builder:Yx,handler:async e=>u({command:`zero-trust dlp validators proximity-words get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp validators proximity-words get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/proximity_words/${e[`validator-id`]==null?`<validator-id>`:encodeURIComponent(String(e[`validator-id`]))}`,pathParams:{"validator-id":String(e[`validator-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(Jx,{account_id:a,validator_id:e[`validator-id`]}));s(u,{successLabel:`Loaded`})})};var Zx={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/validators/proximity_words`};function Qx(e){return e.usage(`$0 zero-trust dlp validators proximity-words list
|
|
827
|
-
|
|
828
|
-
Lists the \`proximity_words\` validators configured for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $x={command:`list`,describe:`List proximity word validators`,builder:Qx,handler:async e=>u({command:`zero-trust dlp validators proximity-words list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp validators proximity-words list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/validators/proximity_words`,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(Zx,{account_id:a}));s(u,{successLabel:`Loaded`})})};var eS={method:`PUT`,path:t=>e`/accounts/${t.account_id}/dlp/validators/proximity_words/${t.validator_id}`,body:`json`};function tS(e){return e.usage(`$0 zero-trust dlp validators proximity-words update <validator-id>
|
|
829
|
-
|
|
830
|
-
Replaces the name and word list of a \`proximity_words\` validator. Attachments to detection entries are owned from the entry side and are not affected.`).positional(`validator-id`,{type:`string`,description:`Validator ID`,demandOption:!0}).option(`name`,{type:`string`,description:`A name for this validator, at most 50 characters.`}).option(`words`,{type:`string`,description:`The words that raise confidence when found near a match, at most 100 per validator. Matching
|
|
831
|
-
ignores case, so the list may not contain the same word twice with different capitalisation.
|
|
832
|
-
Words are stored as sent.
|
|
833
|
-
|
|
834
|
-
For example, a validator for medical record numbers might use
|
|
835
|
-
\`[{"word": "patient", "weight": "strong"}, {"word": "diagnosis", "weight": "moderate"},
|
|
836
|
-
{"word": "mrn", "weight": "weak"}]\`. 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:`Attributes of the validator to update.`})}const nS={command:`update <validator-id>`,describe:`Update a proximity word validator`,builder:tS,handler:async e=>u({command:`zero-trust dlp validators proximity-words update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp validators proximity-words update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/proximity_words/${e[`validator-id`]==null?`<validator-id>`:encodeURIComponent(String(e[`validator-id`]))}`,pathParams:{"validator-id":String(e[`validator-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({name:_(e.name,`name`,`text`),words:d(e.words,`words`)}):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(eS,{body:t,account_id:a,validator_id:e[`validator-id`]}));s(r,{successLabel:`Updated`});return}if(e.name===void 0&&(e.name=await y(`name`,`A name for this validator, at most 50 characters.`)),e.words===void 0)throw Error(`--words is required (or pass --body with this field set).`);let u=g({name:_(e.name,`name`,`text`),words:d(e.words,`words`)}),p=await l(`Updating`,async()=>n.send(eS,{body:u,account_id:a,validator_id:e[`validator-id`]}));s(p,{successLabel:`Updated`})})},rS={command:`proximity-words`,describe:`Data Loss Prevention - manage proximity-word validators`,builder:e=>e.command(Wx).command(qx).command(Xx).command($x).command(nS).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var iS={method:`POST`,path:t=>e`/accounts/${t.account_id}/dlp/validators/worker`,body:`json`};function aS(e){return e.usage(`$0 zero-trust dlp validators worker create
|
|
837
|
-
|
|
838
|
-
Registers a customer Worker as a validator. An account may own at most 100 validators across all kinds.`).option(`default`,{type:`string`,description:`The default field. Accepts a JSON scalar or plain string, or @path/to/file.`}).option(`name`,{type:`string`,description:`A name for this validator, at most 50 characters.`}).option(`script-tag`,{type:`string`,description:`The public script tag of the customer's Worker that scores matches.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the new validator.`})}const oS={command:`create`,describe:`Create a worker validator`,builder:aS,handler:async e=>u({command:`zero-trust dlp validators worker create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp validators worker create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/worker`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({default:p(e.default,`default`),name:_(e.name,`name`,`text`),script_tag:_(e[`script-tag`],`script-tag`,`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(iS,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await y(`name`,`A name for this validator, at most 50 characters.`)),e[`script-tag`]===void 0&&(e[`script-tag`]=await y(`script-tag`,`The public script tag of the customer's Worker that scores matches.`));let u=g({default:p(e.default,`default`),name:_(e.name,`name`,`text`),script_tag:_(e[`script-tag`],`script-tag`,`text`)}),d=await l(`Creating`,async()=>n.send(iS,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var sS={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dlp/validators/worker/${t.validator_id}`};function cS(e){return e.usage("$0 zero-trust dlp validators worker delete <validator-id>\n\nDeletes a `worker` validator. Fails with `409` while any detection entry is still attached to it; detach it from those entries first.").positional(`validator-id`,{type:`string`,description:`Validator 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 lS={command:`delete <validator-id>`,describe:`Delete a worker validator`,builder:cS,handler:async e=>u({command:`zero-trust dlp validators worker 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 dlp validators worker delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/worker/${e[`validator-id`]==null?`<validator-id>`:encodeURIComponent(String(e[`validator-id`]))}`,pathParams:{"validator-id":String(e[`validator-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(sS,{account_id:a,validator_id:e[`validator-id`]}));s(u,{successLabel:`Deleted`})})};var uS={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/validators/worker/${t.validator_id}`};function dS(e){return e.usage(`$0 zero-trust dlp validators worker get <validator-id>
|
|
839
|
-
|
|
840
|
-
Fetches a \`worker\` validator by ID.`).positional(`validator-id`,{type:`string`,description:`Validator ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fS={command:`get <validator-id>`,describe:`Get a worker validator`,builder:dS,handler:async e=>u({command:`zero-trust dlp validators worker get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp validators worker get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/worker/${e[`validator-id`]==null?`<validator-id>`:encodeURIComponent(String(e[`validator-id`]))}`,pathParams:{"validator-id":String(e[`validator-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(uS,{account_id:a,validator_id:e[`validator-id`]}));s(u,{successLabel:`Loaded`})})};var pS={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/validators/worker`};function mS(e){return e.usage(`$0 zero-trust dlp validators worker list
|
|
841
|
-
|
|
842
|
-
Lists the \`worker\` validators configured for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const hS={command:`list`,describe:`List worker validators`,builder:mS,handler:async e=>u({command:`zero-trust dlp validators worker list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust dlp validators worker list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dlp/validators/worker`,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(pS,{account_id:a}));s(u,{successLabel:`Loaded`})})};var gS={method:`GET`,path:t=>e`/accounts/${t.account_id}/dlp/validators/worker/${t.validator_id}/status`};function _S(e){return e.usage("$0 zero-trust dlp validators worker status get <validator-id>\n\nReports whether the validator's Worker can be used. Returns `worker_not_found` if the Worker cannot be found, and `worker_error` if the Worker does not have a valid validation entrypoint or is returning incorrect responses.").positional(`validator-id`,{type:`string`,description:`Validator ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vS={command:`get <validator-id>`,describe:`Get a worker validator status`,builder:_S,handler:async e=>u({command:`zero-trust dlp validators worker status get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp validators worker status get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/worker/${e[`validator-id`]==null?`<validator-id>`:encodeURIComponent(String(e[`validator-id`]))}/status`,pathParams:{"validator-id":String(e[`validator-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(gS,{account_id:a,validator_id:e[`validator-id`]}));s(u,{successLabel:`Loaded`})})},yS={command:`status`,describe:`Data Loss Prevention - retrieve Worker validator status`,builder:e=>e.command(vS).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var bS={method:`PUT`,path:t=>e`/accounts/${t.account_id}/dlp/validators/worker/${t.validator_id}`,body:`json`};function xS(e){return e.usage(`$0 zero-trust dlp validators worker update <validator-id>
|
|
843
|
-
|
|
844
|
-
Replaces the name, script tag and fallback verdict of a \`worker\` validator. Attachments to detection entries are owned from the entry side and are not affected.`).positional(`validator-id`,{type:`string`,description:`Validator ID`,demandOption:!0}).option(`default`,{type:`string`,description:`The default field. Accepts a JSON scalar or plain string, or @path/to/file.`}).option(`name`,{type:`string`,description:`A name for this validator, at most 50 characters.`}).option(`script-tag`,{type:`string`,description:`The public script tag of the customer's Worker that scores matches.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Attributes of the validator to update.`})}const SS={command:`update <validator-id>`,describe:`Update a worker validator`,builder:xS,handler:async e=>u({command:`zero-trust dlp validators worker update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust dlp validators worker update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dlp/validators/worker/${e[`validator-id`]==null?`<validator-id>`:encodeURIComponent(String(e[`validator-id`]))}`,pathParams:{"validator-id":String(e[`validator-id`]??``)},bodyKind:`json`,body:e.body===void 0?g({default:p(e.default,`default`),name:_(e.name,`name`,`text`),script_tag:_(e[`script-tag`],`script-tag`,`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(bS,{body:t,account_id:a,validator_id:e[`validator-id`]}));s(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await y(`name`,`A name for this validator, at most 50 characters.`)),e[`script-tag`]===void 0&&(e[`script-tag`]=await y(`script-tag`,`The public script tag of the customer's Worker that scores matches.`));let u=g({default:p(e.default,`default`),name:_(e.name,`name`,`text`),script_tag:_(e[`script-tag`],`script-tag`,`text`)}),d=await l(`Updating`,async()=>n.send(bS,{body:u,account_id:a,validator_id:e[`validator-id`]}));s(d,{successLabel:`Updated`})})},CS={command:`worker`,describe:`Data Loss Prevention - manage Worker validators`,builder:e=>e.command(oS).command(lS).command(fS).command(hS).command(SS).command(yS).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},wS={command:`validators`,describe:`Data Loss Prevention - list and retrieve content validators`,builder:e=>e.command(Rx).command(Vx).command(rS).command(CS).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},TS={command:`dlp`,describe:`Operations for dlp`,builder:e=>e.command(E_).command(H_).command(iv).command(dv).command(Dv).command(Jv).command(fy).command(By).command(nb).command(ob).command(ub).command(jb).command(Rb).command(ox).command(Sx).command(Fx).command(wS).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ES={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/app_types`};function DS(e){return e.usage(`$0 zero-trust gateway app-types list
|
|
845
|
-
|
|
846
|
-
List all application and application type mappings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const OS={command:`list`,describe:`List application and application type mappings`,builder:DS,handler:async e=>u({command:`zero-trust gateway app-types list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust gateway app-types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/gateway/app_types`,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(ES,{account_id:a}));s(u,{successLabel:`Loaded`})})},kS={command:`app-types`,describe:`Operations for gateway.app-types`,builder:e=>e.command(OS).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var AS={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/categories`};function jS(e){return e.usage(`$0 zero-trust gateway categories list
|
|
847
|
-
|
|
848
|
-
List all categories.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const MS={command:`list`,describe:`List categories`,builder:jS,handler:async e=>u({command:`zero-trust gateway categories list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust gateway categories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/gateway/categories`,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(AS,{account_id:a}));s(u,{successLabel:`Loaded`})})},NS={command:`categories`,describe:`Operations for gateway.categories`,builder:e=>e.command(MS).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var PS={method:`POST`,path:t=>e`/accounts/${t.account_id}/gateway/certificates/${t.certificate_id}/activate`};function FS(e){return e.usage(`$0 zero-trust gateway certificates activate <certificate-id>
|
|
849
|
-
|
|
850
|
-
Bind a single Zero Trust certificate to the edge.`).positional(`certificate-id`,{type:`string`,description:`Identify the certificate with a UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const IS={command:`activate <certificate-id>`,describe:`Activate a Zero Trust certificate`,builder:FS,handler:async e=>u({command:`zero-trust gateway certificates activate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway certificates activate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}/activate`,pathParams:{"certificate-id":String(e[`certificate-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(PS,{account_id:a,certificate_id:e[`certificate-id`]}));s(u,{successLabel:`Created`})})};var LS={method:`POST`,path:t=>e`/accounts/${t.account_id}/gateway/certificates`,body:`json`};function RS(e){return e.usage(`$0 zero-trust gateway certificates create
|
|
851
|
-
|
|
852
|
-
Create a new Zero Trust certificate.`).option(`validity-period-days`,{type:`number`,description:"Sets the certificate validity period in days (range: 1-10,950 days / ~30 years). Defaults to 1,825 days (5 years). **Important**: This field is only settable during the certificate creation. Certificates becomes immutable after creation - use the `/activate` and `/deactivate` endpoints to manage certificate lifecycle."}).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 zS={command:`create`,describe:`Create Zero Trust certificate`,builder:RS,handler:async e=>u({command:`zero-trust gateway certificates create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/certificates`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({validity_period_days:e[`validity-period-days`]}):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(LS,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}let u=g({validity_period_days:e[`validity-period-days`]}),d=await l(`Creating`,async()=>n.send(LS,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var BS={method:`POST`,path:t=>e`/accounts/${t.account_id}/gateway/certificates/${t.certificate_id}/deactivate`};function VS(e){return e.usage(`$0 zero-trust gateway certificates deactivate <certificate-id>
|
|
853
|
-
|
|
854
|
-
Unbind a single Zero Trust certificate from the edge.`).positional(`certificate-id`,{type:`string`,description:`Identify the certificate with a UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const HS={command:`deactivate <certificate-id>`,describe:`Deactivate a Zero Trust certificate`,builder:VS,handler:async e=>u({command:`zero-trust gateway certificates deactivate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway certificates deactivate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}/deactivate`,pathParams:{"certificate-id":String(e[`certificate-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(BS,{account_id:a,certificate_id:e[`certificate-id`]}));s(u,{successLabel:`Created`})})};var US={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/gateway/certificates/${t.certificate_id}`};function WS(e){return e.usage(`$0 zero-trust gateway certificates delete <certificate-id>
|
|
855
|
-
|
|
856
|
-
Delete a gateway-managed Zero Trust certificate. You must deactivate the certificate from the edge (inactive) before deleting it.`).positional(`certificate-id`,{type:`string`,description:`Identify the certificate 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 GS={command:`delete <certificate-id>`,describe:`Delete Zero Trust certificate`,builder:WS,handler:async e=>u({command:`zero-trust gateway certificates 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 certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"certificate-id":String(e[`certificate-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(US,{account_id:a,certificate_id:e[`certificate-id`]}));s(u,{successLabel:`Deleted`})})};var KS={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/certificates/${t.certificate_id}`};function qS(e){return e.usage(`$0 zero-trust gateway certificates get <certificate-id>
|
|
857
|
-
|
|
858
|
-
Get a single Zero Trust certificate.`).positional(`certificate-id`,{type:`string`,description:`Identify the certificate with a UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const JS={command:`get <certificate-id>`,describe:`Get Zero Trust certificate details`,builder:qS,handler:async e=>u({command:`zero-trust gateway certificates get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"certificate-id":String(e[`certificate-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(KS,{account_id:a,certificate_id:e[`certificate-id`]}));s(u,{successLabel:`Loaded`})})};var YS={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/certificates`};function XS(e){return e.usage(`$0 zero-trust gateway certificates list
|
|
859
|
-
|
|
860
|
-
List all Zero Trust certificates for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ZS={command:`list`,describe:`List Zero Trust certificates`,builder:XS,handler:async e=>u({command:`zero-trust gateway certificates list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust gateway certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/gateway/certificates`,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(YS,{account_id:a}));s(u,{successLabel:`Loaded`})})},QS={command:`certificates`,describe:`Operations for gateway.certificates`,builder:e=>e.command(IS).command(zS).command(HS).command(GS).command(JS).command(ZS).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $S={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/gateway/configuration`,body:`json`};function eC(e){return e.usage("$0 zero-trust gateway configurations edit\n\nUpdate (PATCH) a single subcollection of settings such as `antivirus`, `tls_decrypt`, `activity_log`, `block_page`, `browser_isolation`, `fips`, `body_scanning`, `certificate`, or `max_ttl_secs` without updating the entire configuration object. This endpoint returns an error if any settings collection lacks proper configuration.").option(`settings-activity-log-enabled`,{type:`boolean`,description:`Specify whether to log activity.`}).option(`settings-antivirus-enabled-download-phase`,{type:`boolean`,description:`Specify whether to enable anti-virus scanning on downloads.`}).option(`settings-antivirus-enabled-upload-phase`,{type:`boolean`,description:`Specify whether to enable anti-virus scanning on uploads.`}).option(`settings-antivirus-fail-closed`,{type:`boolean`,description:`Specify whether to block requests for unscannable files.`}).option(`settings-antivirus-notification-settings-enabled`,{type:`boolean`,description:`Specify whether to enable notifications.`}).option(`settings-antivirus-notification-settings-include-context`,{type:`boolean`,description:`Specify whether to include context information as query parameters.`}).option(`settings-antivirus-notification-settings-msg`,{type:`string`,description:`Specify the message to show in the notification.`}).option(`settings-antivirus-notification-settings-support-url`,{type:`string`,description:`Specify a URL that directs users to more information. If unset, the notification opens a block page.`}).option(`settings-block-page-background-color`,{type:`string`,description:"Specify the block page background color in `#rrggbb` format when the mode is customized_block_page."}).option(`settings-block-page-enabled`,{type:`boolean`,description:`Specify whether to enable the custom block page.`}).option(`settings-block-page-footer-text`,{type:`string`,description:`Specify the block page footer text when the mode is customized_block_page.`}).option(`settings-block-page-header-text`,{type:`string`,description:`Specify the block page header text when the mode is customized_block_page.`}).option(`settings-block-page-include-context`,{type:`boolean`,description:`Specify whether to append context to target_uri as query parameters. This applies only when the mode is redirect_uri.`}).option(`settings-block-page-logo-path`,{type:`string`,description:`Specify the full URL to the logo file when the mode is customized_block_page.`}).option(`settings-block-page-mailto-address`,{type:`string`,description:`Specify the admin email for users to contact when the mode is customized_block_page.`}).option(`settings-block-page-mailto-subject`,{type:`string`,description:`Specify the subject line for emails created from the block page when the mode is customized_block_page.`}).option(`settings-block-page-mode`,{type:`string`,description:`Specify whether to redirect users to a Cloudflare-hosted block page or a customer-provided URI.`,choices:[`customized_block_page`,`redirect_uri`]}).coerce(`settings-block-page-mode`,e=>_(e,`settings-block-page-mode`,`text`)).option(`settings-block-page-name`,{type:`string`,description:`Specify the block page title when the mode is customized_block_page.`}).option(`settings-block-page-suppress-footer`,{type:`boolean`,description:`Specify whether to suppress detailed information at the bottom of the block page when the mode is customized_block_page.`}).option(`settings-block-page-target-uri`,{type:`string`,description:`Specify the URI to redirect users to when the mode is redirect_uri.`}).option(`settings-body-scanning-inspection-mode`,{type:`string`,description:"Specify the inspection mode as either `deep` or `shallow`.",choices:[`deep`,`shallow`]}).coerce(`settings-body-scanning-inspection-mode`,e=>_(e,`settings-body-scanning-inspection-mode`,`text`)).option(`settings-browser-isolation-non-identity-enabled`,{type:`boolean`,description:`Specify whether to enable non-identity onramp support for Browser Isolation.`}).option(`settings-browser-isolation-url-browser-isolation-enabled`,{type:`boolean`,description:`Specify whether to enable Clientless Browser Isolation.`}).option(`settings-certificate-id`,{type:`string`,description:`Specify the UUID of the certificate used for interception. Ensure the certificate is available at the edge(previously called 'active'). A nil UUID directs Cloudflare to use the Root CA.`}).option(`settings-custom-certificate-enabled`,{type:`boolean`,description:`Specify whether to enable a custom certificate authority for signing Gateway traffic.`}).option(`settings-custom-certificate-id`,{type:`string`,description:`Specify the UUID of the certificate (ID from MTLS certificate store).`}).option(`settings-extended-email-matching-enabled`,{type:`boolean`,description:`Specify whether to match all variants of user emails (with + or . modifiers) used as criteria in Firewall policies.`}).option(`settings-fips-tls`,{type:`boolean`,description:`Enforce cipher suites and TLS versions compliant with FIPS 140-2.`}).option(`settings-host-selector-enabled`,{type:`boolean`,description:`Specify whether to enable filtering via hosts for egress policies.`}).option(`settings-inspection-mode`,{type:`string`,description:`Define the proxy inspection mode. 1. static: Gateway applies static inspection to HTTP on TCP(80). With TLS decryption on, Gateway inspects HTTPS traffic on TCP(443) and UDP(443). 2. dynamic: Gateway applies protocol detection to inspect HTTP and HTTPS traffic on any port. TLS decryption must remain on to inspect HTTPS traffic.`,choices:[`static`,`dynamic`]}).coerce(`settings-inspection-mode`,e=>_(e,`settings-inspection-mode`,`text`)).option(`settings-max-ttl-secs`,{type:`number`,description:"Account-level cap on DNS response TTLs, in seconds. Gateway rewrites DNS responses so returned record TTLs do not exceed this value. Null means no cap. Each DNS location can inherit, override, or disable it through the location `max_ttl` setting."}).option(`settings-protocol-detection-enabled`,{type:`boolean`,description:`Specify whether to detect protocols from the initial bytes of client traffic.`}).option(`settings-sandbox-enabled`,{type:`boolean`,description:`Specify whether to enable the sandbox.`}).option(`settings-sandbox-fallback-action`,{type:`string`,description:`Specify the action to take when the system cannot scan the file.`,choices:[`allow`,`block`]}).coerce(`settings-sandbox-fallback-action`,e=>_(e,`settings-sandbox-fallback-action`,`text`)).option(`settings-tls-decrypt-enabled`,{type:`boolean`,description:`Specify whether to inspect encrypted HTTP traffic.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify account settings.`}).check(e=>{let t=[`settings-custom-certificate-enabled`,`settings-custom-certificate-id`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`settings-custom-certificate-enabled`].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 --settings-custom-certificate-* flag is set`)}return!0})}const tC={command:`edit`,describe:`Patch Zero Trust account configuration`,builder:eC,handler:async e=>u({command:`zero-trust gateway configurations edit`,classification:{safeFlags:[`settings-activity-log-enabled`,`settings-antivirus-enabled-download-phase`,`settings-antivirus-enabled-upload-phase`,`settings-antivirus-fail-closed`,`settings-antivirus-notification-settings-enabled`,`settings-antivirus-notification-settings-include-context`,`settings-block-page-enabled`,`settings-block-page-include-context`,`settings-block-page-mode`,`settings-block-page-suppress-footer`,`settings-body-scanning-inspection-mode`,`settings-browser-isolation-non-identity-enabled`,`settings-browser-isolation-url-browser-isolation-enabled`,`settings-custom-certificate-enabled`,`settings-extended-email-matching-enabled`,`settings-fips-tls`,`settings-host-selector-enabled`,`settings-inspection-mode`,`settings-protocol-detection-enabled`,`settings-sandbox-enabled`,`settings-sandbox-fallback-action`,`settings-tls-decrypt-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway configurations edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/configuration`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({settings:{activity_log:{enabled:e[`settings-activity-log-enabled`]},antivirus:{enabled_download_phase:e[`settings-antivirus-enabled-download-phase`],enabled_upload_phase:e[`settings-antivirus-enabled-upload-phase`],fail_closed:e[`settings-antivirus-fail-closed`],notification_settings:{enabled:e[`settings-antivirus-notification-settings-enabled`],include_context:e[`settings-antivirus-notification-settings-include-context`],msg:_(e[`settings-antivirus-notification-settings-msg`],`settings-antivirus-notification-settings-msg`,`text`),support_url:_(e[`settings-antivirus-notification-settings-support-url`],`settings-antivirus-notification-settings-support-url`,`text`)}},block_page:{background_color:_(e[`settings-block-page-background-color`],`settings-block-page-background-color`,`text`),enabled:e[`settings-block-page-enabled`],footer_text:_(e[`settings-block-page-footer-text`],`settings-block-page-footer-text`,`text`),header_text:_(e[`settings-block-page-header-text`],`settings-block-page-header-text`,`text`),include_context:e[`settings-block-page-include-context`],logo_path:_(e[`settings-block-page-logo-path`],`settings-block-page-logo-path`,`text`),mailto_address:_(e[`settings-block-page-mailto-address`],`settings-block-page-mailto-address`,`text`),mailto_subject:_(e[`settings-block-page-mailto-subject`],`settings-block-page-mailto-subject`,`text`),mode:e[`settings-block-page-mode`],name:_(e[`settings-block-page-name`],`settings-block-page-name`,`text`),suppress_footer:e[`settings-block-page-suppress-footer`],target_uri:_(e[`settings-block-page-target-uri`],`settings-block-page-target-uri`,`text`)},body_scanning:{inspection_mode:e[`settings-body-scanning-inspection-mode`]},browser_isolation:{non_identity_enabled:e[`settings-browser-isolation-non-identity-enabled`],url_browser_isolation_enabled:e[`settings-browser-isolation-url-browser-isolation-enabled`]},certificate:{id:_(e[`settings-certificate-id`],`settings-certificate-id`,`text`)},custom_certificate:{enabled:e[`settings-custom-certificate-enabled`],id:_(e[`settings-custom-certificate-id`],`settings-custom-certificate-id`,`text`)},extended_email_matching:{enabled:e[`settings-extended-email-matching-enabled`]},fips:{tls:e[`settings-fips-tls`]},host_selector:{enabled:e[`settings-host-selector-enabled`]},inspection:{mode:e[`settings-inspection-mode`]},max_ttl_secs:e[`settings-max-ttl-secs`],protocol_detection:{enabled:e[`settings-protocol-detection-enabled`]},sandbox:{enabled:e[`settings-sandbox-enabled`],fallback_action:e[`settings-sandbox-fallback-action`]},tls_decrypt:{enabled:e[`settings-tls-decrypt-enabled`]}}}):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($S,{body:t,account_id:a}));s(r,{successLabel:`Updated`});return}let u=g({settings:{activity_log:{enabled:e[`settings-activity-log-enabled`]},antivirus:{enabled_download_phase:e[`settings-antivirus-enabled-download-phase`],enabled_upload_phase:e[`settings-antivirus-enabled-upload-phase`],fail_closed:e[`settings-antivirus-fail-closed`],notification_settings:{enabled:e[`settings-antivirus-notification-settings-enabled`],include_context:e[`settings-antivirus-notification-settings-include-context`],msg:_(e[`settings-antivirus-notification-settings-msg`],`settings-antivirus-notification-settings-msg`,`text`),support_url:_(e[`settings-antivirus-notification-settings-support-url`],`settings-antivirus-notification-settings-support-url`,`text`)}},block_page:{background_color:_(e[`settings-block-page-background-color`],`settings-block-page-background-color`,`text`),enabled:e[`settings-block-page-enabled`],footer_text:_(e[`settings-block-page-footer-text`],`settings-block-page-footer-text`,`text`),header_text:_(e[`settings-block-page-header-text`],`settings-block-page-header-text`,`text`),include_context:e[`settings-block-page-include-context`],logo_path:_(e[`settings-block-page-logo-path`],`settings-block-page-logo-path`,`text`),mailto_address:_(e[`settings-block-page-mailto-address`],`settings-block-page-mailto-address`,`text`),mailto_subject:_(e[`settings-block-page-mailto-subject`],`settings-block-page-mailto-subject`,`text`),mode:e[`settings-block-page-mode`],name:_(e[`settings-block-page-name`],`settings-block-page-name`,`text`),suppress_footer:e[`settings-block-page-suppress-footer`],target_uri:_(e[`settings-block-page-target-uri`],`settings-block-page-target-uri`,`text`)},body_scanning:{inspection_mode:e[`settings-body-scanning-inspection-mode`]},browser_isolation:{non_identity_enabled:e[`settings-browser-isolation-non-identity-enabled`],url_browser_isolation_enabled:e[`settings-browser-isolation-url-browser-isolation-enabled`]},certificate:{id:_(e[`settings-certificate-id`],`settings-certificate-id`,`text`)},custom_certificate:{enabled:e[`settings-custom-certificate-enabled`],id:_(e[`settings-custom-certificate-id`],`settings-custom-certificate-id`,`text`)},extended_email_matching:{enabled:e[`settings-extended-email-matching-enabled`]},fips:{tls:e[`settings-fips-tls`]},host_selector:{enabled:e[`settings-host-selector-enabled`]},inspection:{mode:e[`settings-inspection-mode`]},max_ttl_secs:e[`settings-max-ttl-secs`],protocol_detection:{enabled:e[`settings-protocol-detection-enabled`]},sandbox:{enabled:e[`settings-sandbox-enabled`],fallback_action:e[`settings-sandbox-fallback-action`]},tls_decrypt:{enabled:e[`settings-tls-decrypt-enabled`]}}}),d=await l(`Updating`,async()=>n.send($S,{body:u,account_id:a}));s(d,{successLabel:`Updated`})})};var nC={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/configuration`};function rC(e){return e.usage(`$0 zero-trust gateway configurations get
|
|
861
|
-
|
|
862
|
-
Retrieve the current Zero Trust account configuration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const iC={command:`get`,describe:`Get Zero Trust account configuration`,builder:rC,handler:async e=>u({command:`zero-trust gateway configurations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust gateway configurations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/gateway/configuration`,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(nC,{account_id:a}));s(u,{successLabel:`Loaded`})})};var aC={method:`PUT`,path:t=>e`/accounts/${t.account_id}/gateway/configuration`,body:`json`};function oC(e){return e.usage(`$0 zero-trust gateway configurations update
|
|
863
|
-
|
|
864
|
-
Update the current Zero Trust account configuration.`).option(`settings-activity-log-enabled`,{type:`boolean`,description:`Specify whether to log activity.`}).option(`settings-antivirus-enabled-download-phase`,{type:`boolean`,description:`Specify whether to enable anti-virus scanning on downloads.`}).option(`settings-antivirus-enabled-upload-phase`,{type:`boolean`,description:`Specify whether to enable anti-virus scanning on uploads.`}).option(`settings-antivirus-fail-closed`,{type:`boolean`,description:`Specify whether to block requests for unscannable files.`}).option(`settings-antivirus-notification-settings-enabled`,{type:`boolean`,description:`Specify whether to enable notifications.`}).option(`settings-antivirus-notification-settings-include-context`,{type:`boolean`,description:`Specify whether to include context information as query parameters.`}).option(`settings-antivirus-notification-settings-msg`,{type:`string`,description:`Specify the message to show in the notification.`}).option(`settings-antivirus-notification-settings-support-url`,{type:`string`,description:`Specify a URL that directs users to more information. If unset, the notification opens a block page.`}).option(`settings-block-page-background-color`,{type:`string`,description:"Specify the block page background color in `#rrggbb` format when the mode is customized_block_page."}).option(`settings-block-page-enabled`,{type:`boolean`,description:`Specify whether to enable the custom block page.`}).option(`settings-block-page-footer-text`,{type:`string`,description:`Specify the block page footer text when the mode is customized_block_page.`}).option(`settings-block-page-header-text`,{type:`string`,description:`Specify the block page header text when the mode is customized_block_page.`}).option(`settings-block-page-include-context`,{type:`boolean`,description:`Specify whether to append context to target_uri as query parameters. This applies only when the mode is redirect_uri.`}).option(`settings-block-page-logo-path`,{type:`string`,description:`Specify the full URL to the logo file when the mode is customized_block_page.`}).option(`settings-block-page-mailto-address`,{type:`string`,description:`Specify the admin email for users to contact when the mode is customized_block_page.`}).option(`settings-block-page-mailto-subject`,{type:`string`,description:`Specify the subject line for emails created from the block page when the mode is customized_block_page.`}).option(`settings-block-page-mode`,{type:`string`,description:`Specify whether to redirect users to a Cloudflare-hosted block page or a customer-provided URI.`,choices:[`customized_block_page`,`redirect_uri`]}).coerce(`settings-block-page-mode`,e=>_(e,`settings-block-page-mode`,`text`)).option(`settings-block-page-name`,{type:`string`,description:`Specify the block page title when the mode is customized_block_page.`}).option(`settings-block-page-suppress-footer`,{type:`boolean`,description:`Specify whether to suppress detailed information at the bottom of the block page when the mode is customized_block_page.`}).option(`settings-block-page-target-uri`,{type:`string`,description:`Specify the URI to redirect users to when the mode is redirect_uri.`}).option(`settings-body-scanning-inspection-mode`,{type:`string`,description:"Specify the inspection mode as either `deep` or `shallow`.",choices:[`deep`,`shallow`]}).coerce(`settings-body-scanning-inspection-mode`,e=>_(e,`settings-body-scanning-inspection-mode`,`text`)).option(`settings-browser-isolation-non-identity-enabled`,{type:`boolean`,description:`Specify whether to enable non-identity onramp support for Browser Isolation.`}).option(`settings-browser-isolation-url-browser-isolation-enabled`,{type:`boolean`,description:`Specify whether to enable Clientless Browser Isolation.`}).option(`settings-certificate-id`,{type:`string`,description:`Specify the UUID of the certificate used for interception. Ensure the certificate is available at the edge(previously called 'active'). A nil UUID directs Cloudflare to use the Root CA.`}).option(`settings-custom-certificate-enabled`,{type:`boolean`,description:`Specify whether to enable a custom certificate authority for signing Gateway traffic.`}).option(`settings-custom-certificate-id`,{type:`string`,description:`Specify the UUID of the certificate (ID from MTLS certificate store).`}).option(`settings-extended-email-matching-enabled`,{type:`boolean`,description:`Specify whether to match all variants of user emails (with + or . modifiers) used as criteria in Firewall policies.`}).option(`settings-fips-tls`,{type:`boolean`,description:`Enforce cipher suites and TLS versions compliant with FIPS 140-2.`}).option(`settings-host-selector-enabled`,{type:`boolean`,description:`Specify whether to enable filtering via hosts for egress policies.`}).option(`settings-inspection-mode`,{type:`string`,description:`Define the proxy inspection mode. 1. static: Gateway applies static inspection to HTTP on TCP(80). With TLS decryption on, Gateway inspects HTTPS traffic on TCP(443) and UDP(443). 2. dynamic: Gateway applies protocol detection to inspect HTTP and HTTPS traffic on any port. TLS decryption must remain on to inspect HTTPS traffic.`,choices:[`static`,`dynamic`]}).coerce(`settings-inspection-mode`,e=>_(e,`settings-inspection-mode`,`text`)).option(`settings-max-ttl-secs`,{type:`number`,description:"Account-level cap on DNS response TTLs, in seconds. Gateway rewrites DNS responses so returned record TTLs do not exceed this value. Null means no cap. Each DNS location can inherit, override, or disable it through the location `max_ttl` setting."}).option(`settings-protocol-detection-enabled`,{type:`boolean`,description:`Specify whether to detect protocols from the initial bytes of client traffic.`}).option(`settings-sandbox-enabled`,{type:`boolean`,description:`Specify whether to enable the sandbox.`}).option(`settings-sandbox-fallback-action`,{type:`string`,description:`Specify the action to take when the system cannot scan the file.`,choices:[`allow`,`block`]}).coerce(`settings-sandbox-fallback-action`,e=>_(e,`settings-sandbox-fallback-action`,`text`)).option(`settings-tls-decrypt-enabled`,{type:`boolean`,description:`Specify whether to inspect encrypted HTTP traffic.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify account settings.`}).check(e=>{let t=[`settings-custom-certificate-enabled`,`settings-custom-certificate-id`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`settings-custom-certificate-enabled`].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 --settings-custom-certificate-* flag is set`)}return!0})}const sC={command:`update`,describe:`Update Zero Trust account configuration`,builder:oC,handler:async e=>u({command:`zero-trust gateway configurations update`,classification:{safeFlags:[`settings-activity-log-enabled`,`settings-antivirus-enabled-download-phase`,`settings-antivirus-enabled-upload-phase`,`settings-antivirus-fail-closed`,`settings-antivirus-notification-settings-enabled`,`settings-antivirus-notification-settings-include-context`,`settings-block-page-enabled`,`settings-block-page-include-context`,`settings-block-page-mode`,`settings-block-page-suppress-footer`,`settings-body-scanning-inspection-mode`,`settings-browser-isolation-non-identity-enabled`,`settings-browser-isolation-url-browser-isolation-enabled`,`settings-custom-certificate-enabled`,`settings-extended-email-matching-enabled`,`settings-fips-tls`,`settings-host-selector-enabled`,`settings-inspection-mode`,`settings-protocol-detection-enabled`,`settings-sandbox-enabled`,`settings-sandbox-fallback-action`,`settings-tls-decrypt-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway configurations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/gateway/configuration`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({settings:{activity_log:{enabled:e[`settings-activity-log-enabled`]},antivirus:{enabled_download_phase:e[`settings-antivirus-enabled-download-phase`],enabled_upload_phase:e[`settings-antivirus-enabled-upload-phase`],fail_closed:e[`settings-antivirus-fail-closed`],notification_settings:{enabled:e[`settings-antivirus-notification-settings-enabled`],include_context:e[`settings-antivirus-notification-settings-include-context`],msg:_(e[`settings-antivirus-notification-settings-msg`],`settings-antivirus-notification-settings-msg`,`text`),support_url:_(e[`settings-antivirus-notification-settings-support-url`],`settings-antivirus-notification-settings-support-url`,`text`)}},block_page:{background_color:_(e[`settings-block-page-background-color`],`settings-block-page-background-color`,`text`),enabled:e[`settings-block-page-enabled`],footer_text:_(e[`settings-block-page-footer-text`],`settings-block-page-footer-text`,`text`),header_text:_(e[`settings-block-page-header-text`],`settings-block-page-header-text`,`text`),include_context:e[`settings-block-page-include-context`],logo_path:_(e[`settings-block-page-logo-path`],`settings-block-page-logo-path`,`text`),mailto_address:_(e[`settings-block-page-mailto-address`],`settings-block-page-mailto-address`,`text`),mailto_subject:_(e[`settings-block-page-mailto-subject`],`settings-block-page-mailto-subject`,`text`),mode:e[`settings-block-page-mode`],name:_(e[`settings-block-page-name`],`settings-block-page-name`,`text`),suppress_footer:e[`settings-block-page-suppress-footer`],target_uri:_(e[`settings-block-page-target-uri`],`settings-block-page-target-uri`,`text`)},body_scanning:{inspection_mode:e[`settings-body-scanning-inspection-mode`]},browser_isolation:{non_identity_enabled:e[`settings-browser-isolation-non-identity-enabled`],url_browser_isolation_enabled:e[`settings-browser-isolation-url-browser-isolation-enabled`]},certificate:{id:_(e[`settings-certificate-id`],`settings-certificate-id`,`text`)},custom_certificate:{enabled:e[`settings-custom-certificate-enabled`],id:_(e[`settings-custom-certificate-id`],`settings-custom-certificate-id`,`text`)},extended_email_matching:{enabled:e[`settings-extended-email-matching-enabled`]},fips:{tls:e[`settings-fips-tls`]},host_selector:{enabled:e[`settings-host-selector-enabled`]},inspection:{mode:e[`settings-inspection-mode`]},max_ttl_secs:e[`settings-max-ttl-secs`],protocol_detection:{enabled:e[`settings-protocol-detection-enabled`]},sandbox:{enabled:e[`settings-sandbox-enabled`],fallback_action:e[`settings-sandbox-fallback-action`]},tls_decrypt:{enabled:e[`settings-tls-decrypt-enabled`]}}}):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(aC,{body:t,account_id:a}));s(r,{successLabel:`Updated`});return}let u=g({settings:{activity_log:{enabled:e[`settings-activity-log-enabled`]},antivirus:{enabled_download_phase:e[`settings-antivirus-enabled-download-phase`],enabled_upload_phase:e[`settings-antivirus-enabled-upload-phase`],fail_closed:e[`settings-antivirus-fail-closed`],notification_settings:{enabled:e[`settings-antivirus-notification-settings-enabled`],include_context:e[`settings-antivirus-notification-settings-include-context`],msg:_(e[`settings-antivirus-notification-settings-msg`],`settings-antivirus-notification-settings-msg`,`text`),support_url:_(e[`settings-antivirus-notification-settings-support-url`],`settings-antivirus-notification-settings-support-url`,`text`)}},block_page:{background_color:_(e[`settings-block-page-background-color`],`settings-block-page-background-color`,`text`),enabled:e[`settings-block-page-enabled`],footer_text:_(e[`settings-block-page-footer-text`],`settings-block-page-footer-text`,`text`),header_text:_(e[`settings-block-page-header-text`],`settings-block-page-header-text`,`text`),include_context:e[`settings-block-page-include-context`],logo_path:_(e[`settings-block-page-logo-path`],`settings-block-page-logo-path`,`text`),mailto_address:_(e[`settings-block-page-mailto-address`],`settings-block-page-mailto-address`,`text`),mailto_subject:_(e[`settings-block-page-mailto-subject`],`settings-block-page-mailto-subject`,`text`),mode:e[`settings-block-page-mode`],name:_(e[`settings-block-page-name`],`settings-block-page-name`,`text`),suppress_footer:e[`settings-block-page-suppress-footer`],target_uri:_(e[`settings-block-page-target-uri`],`settings-block-page-target-uri`,`text`)},body_scanning:{inspection_mode:e[`settings-body-scanning-inspection-mode`]},browser_isolation:{non_identity_enabled:e[`settings-browser-isolation-non-identity-enabled`],url_browser_isolation_enabled:e[`settings-browser-isolation-url-browser-isolation-enabled`]},certificate:{id:_(e[`settings-certificate-id`],`settings-certificate-id`,`text`)},custom_certificate:{enabled:e[`settings-custom-certificate-enabled`],id:_(e[`settings-custom-certificate-id`],`settings-custom-certificate-id`,`text`)},extended_email_matching:{enabled:e[`settings-extended-email-matching-enabled`]},fips:{tls:e[`settings-fips-tls`]},host_selector:{enabled:e[`settings-host-selector-enabled`]},inspection:{mode:e[`settings-inspection-mode`]},max_ttl_secs:e[`settings-max-ttl-secs`],protocol_detection:{enabled:e[`settings-protocol-detection-enabled`]},sandbox:{enabled:e[`settings-sandbox-enabled`],fallback_action:e[`settings-sandbox-fallback-action`]},tls_decrypt:{enabled:e[`settings-tls-decrypt-enabled`]}}}),d=await l(`Updating`,async()=>n.send(aC,{body:u,account_id:a}));s(d,{successLabel:`Updated`})})},cC={command:`configurations`,describe:`Operations for gateway.configurations`,builder:e=>e.command(tC).command(iC).command(sC).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var lC={method:`POST`,path:t=>e`/accounts/${t.account_id}/gateway`};function uC(e){return e.usage(`$0 zero-trust gateway create
|
|
865
|
-
|
|
866
|
-
Create a Zero Trust account for an existing Cloudflare account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dC={command:`create`,describe:`Create Zero Trust account`,builder:uC,handler:async e=>u({command:`zero-trust gateway create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust gateway create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/gateway`,pathParams:{},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(lC,{account_id:a}));s(u,{successLabel:`Created`})})};var fC={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/dns_destination_ips`};function pC(e){return e.usage(`$0 zero-trust gateway dns-destination-ips list
|
|
867
|
-
|
|
868
|
-
List Zero Trust Gateway IPv4 address pairs for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mC={command:`list`,describe:`List Zero Trust Gateway DNS destination IPv4 address pairs`,builder:pC,handler:async e=>u({command:`zero-trust gateway dns-destination-ips list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust gateway dns-destination-ips list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/gateway/dns_destination_ips`,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(fC,{account_id:a}));s(u,{successLabel:`Loaded`})})},hC={command:`dns-destination-ips`,describe:`Operations for gateway.dns-destination-ips`,builder:e=>e.command(mC).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var gC={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway`};function _C(e){return e.usage(`$0 zero-trust gateway list
|
|
869
|
-
|
|
870
|
-
Retrieve information about the current Zero Trust account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vC={command:`list`,describe:`Get Zero Trust account information`,builder:_C,handler:async e=>u({command:`zero-trust gateway list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust gateway list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/gateway`,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(gC,{account_id:a}));s(u,{successLabel:`Loaded`})})};var yC={method:`POST`,path:t=>e`/accounts/${t.account_id}/gateway/lists`,body:`json`};function bC(e){return e.usage(`$0 zero-trust gateway lists create
|
|
871
|
-
|
|
872
|
-
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 xC={command:`create`,describe:`Create Zero Trust list`,builder:bC,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(yC,{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(yC,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var SC={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/gateway/lists/${t.list_id}`};function CC(e){return e.usage(`$0 zero-trust gateway lists delete <list-id>
|
|
873
|
-
|
|
874
|
-
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 wC={command:`delete <list-id>`,describe:`Delete Zero Trust list`,builder:CC,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(SC,{account_id:a,list_id:e[`list-id`]}));s(u,{successLabel:`Deleted`})})};var TC={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/gateway/lists/${t.list_id}`,body:`json`};function EC(e){return e.usage(`$0 zero-trust gateway lists edit <list-id>
|
|
875
|
-
|
|
876
|
-
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 DC={command:`edit <list-id>`,describe:`Patch Zero Trust list.`,builder:EC,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(TC,{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(TC,{body:u,account_id:a,list_id:e[`list-id`]}));s(p,{successLabel:`Updated`})})};var OC={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/lists/${t.list_id}`};function kC(e){return e.usage(`$0 zero-trust gateway lists get <list-id>
|
|
877
|
-
|
|
878
|
-
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 AC={command:`get <list-id>`,describe:`Get Zero Trust list details`,builder:kC,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(OC,{account_id:a,list_id:e[`list-id`]}));s(u,{successLabel:`Loaded`})})};var jC={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/lists/${t.list_id}/items`,query:[`page`,`per_page`]};function MC(e){return e.usage(`$0 zero-trust gateway lists items list
|
|
879
|
-
|
|
880
|
-
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 NC={command:`list`,describe:`Get Zero Trust list items`,builder:MC,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(jC,{account_id:u,list_id:e[`list-id`],...n}));s(d,{successLabel:`Loaded`})})},PC={command:`items`,describe:`Operations for gateway.lists.items`,builder:e=>e.command(NC).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var FC={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/lists`,query:[`type`,`filter`,`search`,`order_by`,`direction`]};function IC(e){return e.usage(`$0 zero-trust gateway lists list
|
|
881
|
-
|
|
882
|
-
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 LC={command:`list`,describe:`List Zero Trust lists`,builder:IC,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(FC,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var RC={method:`PUT`,path:t=>e`/accounts/${t.account_id}/gateway/lists/${t.list_id}`,body:`json`};function zC(e){return e.usage(`$0 zero-trust gateway lists update <list-id>
|
|
883
|
-
|
|
884
|
-
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 BC={command:`update <list-id>`,describe:`Update Zero Trust list`,builder:zC,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(RC,{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(RC,{body:u,account_id:a,list_id:e[`list-id`]}));s(p,{successLabel:`Updated`})})},VC={command:`lists`,describe:`Operations for gateway.lists`,builder:e=>e.command(xC).command(wC).command(DC).command(AC).command(LC).command(BC).command(PC).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var HC={method:`POST`,path:t=>e`/accounts/${t.account_id}/gateway/locations`,body:`json`};function UC(e){return e.usage(`$0 zero-trust gateway locations create
|
|
885
|
-
|
|
886
|
-
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=>{let t=[`max-ttl-mode`,`max-ttl-ttl-secs`].some(t=>e[t]!==void 0);if(!e.body&&t){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 WC={command:`create`,describe:`Create a Zero Trust Gateway location`,builder:UC,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(HC,{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(HC,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var GC={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/gateway/locations/${t.location_id}`};function KC(e){return e.usage(`$0 zero-trust gateway locations delete <location-id>
|
|
887
|
-
|
|
888
|
-
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 qC={command:`delete <location-id>`,describe:`Delete a Zero Trust Gateway location`,builder:KC,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(GC,{account_id:a,location_id:e[`location-id`]}));s(u,{successLabel:`Deleted`})})};var JC={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/locations/${t.location_id}`};function YC(e){return e.usage(`$0 zero-trust gateway locations get <location-id>
|
|
889
|
-
|
|
890
|
-
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 XC={command:`get <location-id>`,describe:`Get Zero Trust Gateway location details`,builder:YC,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(JC,{account_id:a,location_id:e[`location-id`]}));s(u,{successLabel:`Loaded`})})};var ZC={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/locations`,query:[`filter`,`search`,`order_by`,`direction`]};function QC(e){return e.usage(`$0 zero-trust gateway locations list
|
|
891
|
-
|
|
892
|
-
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 $C={command:`list`,describe:`List Zero Trust Gateway locations`,builder:QC,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(ZC,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var ew={method:`PUT`,path:t=>e`/accounts/${t.account_id}/gateway/locations/${t.location_id}`,body:`json`};function tw(e){return e.usage(`$0 zero-trust gateway locations update <location-id>
|
|
893
|
-
|
|
894
|
-
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=>{let t=[`max-ttl-mode`,`max-ttl-ttl-secs`].some(t=>e[t]!==void 0);if(!e.body&&t){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 nw={command:`update <location-id>`,describe:`Update a Zero Trust Gateway location`,builder:tw,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(ew,{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(ew,{body:u,account_id:a,location_id:e[`location-id`]}));s(p,{successLabel:`Updated`})})},rw={command:`locations`,describe:`Operations for gateway.locations`,builder:e=>e.command(WC).command(qC).command(XC).command($C).command(nw).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var iw={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/logging`};function aw(e){return e.usage(`$0 zero-trust gateway logging get
|
|
895
|
-
|
|
896
|
-
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 ow={command:`get`,describe:`Get logging settings for the Zero Trust account`,builder:aw,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(iw,{account_id:a}));s(u,{successLabel:`Loaded`})})};var sw={method:`PUT`,path:t=>e`/accounts/${t.account_id}/gateway/logging`,body:`json`};function cw(e){return e.usage(`$0 zero-trust gateway logging update
|
|
897
|
-
|
|
898
|
-
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 lw={command:`update`,describe:`Update Zero Trust account logging settings`,builder:cw,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(sw,{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(sw,{body:u,account_id:a}));s(d,{successLabel:`Updated`})})},uw={command:`logging`,describe:`Operations for gateway.logging`,builder:e=>e.command(ow).command(lw).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`POST`,path:t=>e`/accounts/${t.account_id}/gateway/pacfiles`,body:`json`};function dw(e){return e.usage(`$0 zero-trust gateway pacfiles create
|
|
899
|
-
|
|
900
|
-
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 fw={command:`create`,describe:`Create a PAC file`,builder:dw,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($,{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($,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var pw={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/gateway/pacfiles/${t.pacfile_id}`};function mw(e){return e.usage(`$0 zero-trust gateway pacfiles delete <pacfile-id>
|
|
901
|
-
|
|
902
|
-
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 hw={command:`delete <pacfile-id>`,describe:`Delete a PAC file`,builder:mw,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(pw,{account_id:a,pacfile_id:e[`pacfile-id`]}));s(u,{successLabel:`Deleted`})})};var gw={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/pacfiles/${t.pacfile_id}`};function _w(e){return e.usage(`$0 zero-trust gateway pacfiles get <pacfile-id>
|
|
903
|
-
|
|
904
|
-
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 vw={command:`get <pacfile-id>`,describe:`Get a PAC file`,builder:_w,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(gw,{account_id:a,pacfile_id:e[`pacfile-id`]}));s(u,{successLabel:`Loaded`})})};var yw={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/pacfiles`,query:[`page`,`per_page`]};function bw(e){return e.usage(`$0 zero-trust gateway pacfiles list
|
|
905
|
-
|
|
906
|
-
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 xw={command:`list`,describe:`List PAC files`,builder:bw,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(yw,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Sw={method:`PUT`,path:t=>e`/accounts/${t.account_id}/gateway/pacfiles/${t.pacfile_id}`,body:`json`};function Cw(e){return e.usage(`$0 zero-trust gateway pacfiles update <pacfile-id>
|
|
907
|
-
|
|
908
|
-
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 ww={command:`update <pacfile-id>`,describe:`Update a Zero Trust Gateway PAC file`,builder:Cw,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(Sw,{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(Sw,{body:u,account_id:a,pacfile_id:e[`pacfile-id`]}));s(d,{successLabel:`Updated`})})},Tw={command:`pacfiles`,describe:`Operations for gateway.pacfiles`,builder:e=>e.command(fw).command(hw).command(vw).command(xw).command(ww).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ew={method:`POST`,path:t=>e`/accounts/${t.account_id}/gateway/proxy_endpoints`,body:`json`};function Dw(e){return e.usage(`$0 zero-trust gateway proxy-endpoints create
|
|
909
|
-
|
|
910
|
-
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 Ow={command:`create`,describe:`Create a proxy endpoint`,builder:Dw,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(Ew,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}let u=g({kind:e.kind}),d=await l(`Creating`,async()=>n.send(Ew,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var kw={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/gateway/proxy_endpoints/${t.proxy_endpoint_id}`};function Aw(e){return e.usage(`$0 zero-trust gateway proxy-endpoints delete <proxy-endpoint-id>
|
|
911
|
-
|
|
912
|
-
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 jw={command:`delete <proxy-endpoint-id>`,describe:`Delete a proxy endpoint`,builder:Aw,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(kw,{account_id:a,proxy_endpoint_id:e[`proxy-endpoint-id`]}));s(u,{successLabel:`Deleted`})})};var Mw={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/gateway/proxy_endpoints/${t.proxy_endpoint_id}`,body:`json`};function Nw(e){return e.usage(`$0 zero-trust gateway proxy-endpoints edit <proxy-endpoint-id>
|
|
913
|
-
|
|
914
|
-
Update a configured Zero Trust Gateway proxy endpoint.`).positional(`proxy-endpoint-id`,{type:`string`,description:`Proxy endpoint ID`,demandOption:!0}).option(`ips`,{type:`string`,array:!0,description:`Specify the list of CIDRs to restrict ingress connections.`}).option(`name`,{type:`string`,description:`Specify the name of the proxy endpoint.`}).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 Pw={command:`edit <proxy-endpoint-id>`,describe:`Update a proxy endpoint`,builder:Nw,handler:async e=>u({command:`zero-trust gateway proxy-endpoints edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway proxy-endpoints edit`,method:`PATCH`,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:`json`,body:e.body===void 0?g({ips:e.ips,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(Mw,{body:t,account_id:a,proxy_endpoint_id:e[`proxy-endpoint-id`]}));s(r,{successLabel:`Updated`});return}let u=g({ips:e.ips,name:_(e.name,`name`,`text`)}),d=await l(`Updating`,async()=>n.send(Mw,{body:u,account_id:a,proxy_endpoint_id:e[`proxy-endpoint-id`]}));s(d,{successLabel:`Updated`})})};var Fw={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/proxy_endpoints/${t.proxy_endpoint_id}`};function Iw(e){return e.usage(`$0 zero-trust gateway proxy-endpoints get <proxy-endpoint-id>
|
|
915
|
-
|
|
916
|
-
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 Lw={command:`get <proxy-endpoint-id>`,describe:`Get a proxy endpoint`,builder:Iw,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(Fw,{account_id:a,proxy_endpoint_id:e[`proxy-endpoint-id`]}));s(u,{successLabel:`Loaded`})})};var Rw={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/proxy_endpoints`,query:[`filter`,`search`,`order_by`,`direction`]};function zw(e){return e.usage(`$0 zero-trust gateway proxy-endpoints list
|
|
917
|
-
|
|
918
|
-
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 Bw={command:`list`,describe:`List proxy endpoints`,builder:zw,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(Rw,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},Vw={command:`proxy-endpoints`,describe:`Operations for gateway.proxy-endpoints`,builder:e=>e.command(Ow).command(jw).command(Pw).command(Lw).command(Bw).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Hw={method:`POST`,path:t=>e`/accounts/${t.account_id}/gateway/rules`,body:`json`};function Uw(e){return e.usage(`$0 zero-trust gateway rules create
|
|
919
|
-
|
|
920
|
-
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`,`forward`]}).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. When set to enable_read_only_actions, only approved browser commands (find, copy, print, zoom, and select-all) may execute; other keyboard input is blocked from reaching the page. Copy and print remain subject to their independent controls. If this field is absent, keyboard usage remains enabled. Applies only when version == "v2". The enable_read_only_actions value requires an explicit version of "v2".`,choices:[`enabled`,`disabled`,`enable_read_only_actions`]}).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-forward-worker-id`,{type:`string`,description:`Specify the public Worker ID of the target Worker.`}).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=>{let t=[`expiration-duration`,`expiration-expires-at`].some(t=>e[t]!==void 0);if(!e.body&&t){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=>{let t=[`rule-settings-block-page-include-context`,`rule-settings-block-page-target-uri`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`rule-settings-block-page-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-block-page-* flag is set`)}return!0}).check(e=>{let t=[`rule-settings-redirect-include-context`,`rule-settings-redirect-preserve-path-and-query`,`rule-settings-redirect-target-uri`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`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-redirect-* flag is set`)}return!0})}const Ww={command:`create`,describe:`Create a Zero Trust Gateway rule`,builder:Uw,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`]},forward:{worker_id:_(e[`rule-settings-forward-worker-id`],`rule-settings-forward-worker-id`,`text`)},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(Hw,{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`,`forward`])),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`]},forward:{worker_id:_(e[`rule-settings-forward-worker-id`],`rule-settings-forward-worker-id`,`text`)},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(Hw,{body:u,account_id:a}));s(p,{successLabel:`Created`})})};var Gw={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/gateway/rules/${t.rule_id}`};function Kw(e){return e.usage(`$0 zero-trust gateway rules delete <rule-id>
|
|
921
|
-
|
|
922
|
-
Delete a Zero Trust Gateway rule.`).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}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const qw={command:`delete <rule-id>`,describe:`Delete a Zero Trust Gateway rule`,builder:Kw,handler:async e=>u({command:`zero-trust gateway rules 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 rules delete`,method:`DELETE`,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:`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(Gw,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Deleted`})})};var Jw={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/rules/${t.rule_id}`};function Yw(e){return e.usage(`$0 zero-trust gateway rules get <rule-id>
|
|
923
|
-
|
|
924
|
-
Get a single Zero Trust Gateway rule.`).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 Xw={command:`get <rule-id>`,describe:`Get Zero Trust Gateway rule details.`,builder:Yw,handler:async e=>u({command:`zero-trust gateway rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust gateway rules get`,method:`GET`,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:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Jw,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Loaded`})})};var Zw={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/rules/tenant`};function Qw(e){return e.usage(`$0 zero-trust gateway rules list-tenant
|
|
925
|
-
|
|
926
|
-
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 $w={command:`list-tenant`,describe:`List Zero Trust Gateway rules inherited from the parent account`,builder:Qw,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(Zw,{account_id:a}));s(u,{successLabel:`Loaded`})})};var eT={method:`GET`,path:t=>e`/accounts/${t.account_id}/gateway/rules`,query:[`filter`,`search`,`order_by`,`direction`]};function tT(e){return e.usage(`$0 zero-trust gateway rules list
|
|
927
|
-
|
|
928
|
-
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 nT={command:`list`,describe:`List Zero Trust Gateway rules`,builder:tT,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(eT,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var rT={method:`POST`,path:t=>e`/accounts/${t.account_id}/gateway/rules/${t.rule_id}/reset_expiration`};function iT(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 aT={command:`reset-expiration <rule-id>`,describe:`Reset the expiration of a Zero Trust Gateway Rule`,builder:iT,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(rT,{account_id:a,rule_id:e[`rule-id`]}));s(u,{successLabel:`Created`})})};var oT={method:`PUT`,path:t=>e`/accounts/${t.account_id}/gateway/rules/${t.rule_id}`,body:`json`};function sT(e){return e.usage(`$0 zero-trust gateway rules update <rule-id>
|
|
929
|
-
|
|
930
|
-
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`,`forward`]}).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. When set to enable_read_only_actions, only approved browser commands (find, copy, print, zoom, and select-all) may execute; other keyboard input is blocked from reaching the page. Copy and print remain subject to their independent controls. If this field is absent, keyboard usage remains enabled. Applies only when version == "v2". The enable_read_only_actions value requires an explicit version of "v2".`,choices:[`enabled`,`disabled`,`enable_read_only_actions`]}).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-forward-worker-id`,{type:`string`,description:`Specify the public Worker ID of the target Worker.`}).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=>{let t=[`expiration-duration`,`expiration-expires-at`].some(t=>e[t]!==void 0);if(!e.body&&t){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=>{let t=[`rule-settings-block-page-include-context`,`rule-settings-block-page-target-uri`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`rule-settings-block-page-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-block-page-* flag is set`)}return!0}).check(e=>{let t=[`rule-settings-redirect-include-context`,`rule-settings-redirect-preserve-path-and-query`,`rule-settings-redirect-target-uri`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`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-redirect-* flag is set`)}return!0})}const cT={command:`update <rule-id>`,describe:`Update a Zero Trust Gateway rule`,builder:sT,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`]},forward:{worker_id:_(e[`rule-settings-forward-worker-id`],`rule-settings-forward-worker-id`,`text`)},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(oT,{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`,`forward`])),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`]},forward:{worker_id:_(e[`rule-settings-forward-worker-id`],`rule-settings-forward-worker-id`,`text`)},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(oT,{body:u,account_id:a,rule_id:e[`rule-id`]}));s(p,{successLabel:`Updated`})})},lT={command:`rules`,describe:`Operations for gateway.rules`,builder:e=>e.command(Ww).command(qw).command(Xw).command(nT).command($w).command(aT).command(cT).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},uT={command:`gateway`,describe:`Operations for gateway`,builder:e=>e.command(dC).command(vC).command(kS).command(NS).command(QS).command(cC).command(hC).command(VC).command(rw).command(uw).command(Tw).command(Vw).command(lT).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var dT={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/identity_providers`,body:`json`};function fT(e){return e.usage(`$0 zero-trust identity-providers create
|
|
931
|
-
|
|
932
|
-
Adds a new identity provider to Access.
|
|
933
|
-
|
|
934
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).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 pT={command:`create`,describe:`Add an Access identity provider`,builder:fT,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(dT,{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 mT={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/identity_providers/${t.identity_provider_id}`};function hT(e){return e.usage(`$0 zero-trust identity-providers delete <identity-provider-id>
|
|
935
|
-
|
|
936
|
-
Deletes an identity provider from Access.
|
|
937
|
-
|
|
938
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).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(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const gT={command:`delete <identity-provider-id>`,describe:`Delete an Access identity provider`,builder:hT,handler:async e=>u({command:`zero-trust identity-providers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 delete`,method:`DELETE`,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:`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();if(u===`zones`?e.zoneId=d:e.accountId=d,!await x({force:!!e.force}))return;let f=await l(`Deleting`,async()=>n.send(mT,{account_or_zone:u,account_or_zone_id:d,identity_provider_id:e[`identity-provider-id`]}));s(f,{successLabel:`Deleted`})})};var _T={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/idp_federation_grants`,body:`json`};function vT(e){return e.usage(`$0 zero-trust identity-providers federation-grants create
|
|
939
|
-
|
|
940
|
-
Creates an IdP federation grant for the specified identity provider, making it available for federation to other accounts in the same Cloudflare organization. The account must belong to a Cloudflare organization. One-time pin and Cloudflare-managed identity providers cannot be federated. An account can federate at most five identity providers at a time.`).option(`idp-id`,{type:`string`,description:`UID of the identity provider to federate. Must be an existing identity provider in this account. One-time pin and Cloudflare-managed identity providers cannot be federated.`}).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 yT={command:`create`,describe:`Create an IdP federation grant`,builder:vT,handler:async e=>u({command:`zero-trust identity-providers federation-grants create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust identity-providers federation-grants create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/idp_federation_grants`,pathParams:{},bodyKind:`json`,body:e.body===void 0?g({idp_id:_(e[`idp-id`],`idp-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(_T,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`idp-id`]===void 0&&(e[`idp-id`]=await y(`idp-id`,`UID of the identity provider to federate. Must be an existing identity provider in this account. One-time pin and Cloudflare-managed identity providers cannot be federated.`));let u=g({idp_id:_(e[`idp-id`],`idp-id`,`text`)}),d=await l(`Creating`,async()=>n.send(_T,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var bT={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/idp_federation_grants/${t.grant_id}`,errors:{404:`NotFoundError`}};function xT(e){return e.usage(`$0 zero-trust identity-providers federation-grants delete <grant-id>
|
|
941
|
-
|
|
942
|
-
Deletes an IdP federation grant. The identity provider remains in the account, but it is no longer available for federation to other accounts.`).positional(`grant-id`,{type:`string`,description:`UID of the IdP federation grant.`,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 ST={command:`delete <grant-id>`,describe:`Delete an IdP federation grant`,builder:xT,handler:async e=>u({command:`zero-trust identity-providers federation-grants 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 federation-grants delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/idp_federation_grants/${e[`grant-id`]==null?`<grant-id>`:encodeURIComponent(String(e[`grant-id`]))}`,pathParams:{"grant-id":String(e[`grant-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(bT,{account_id:a,grant_id:e[`grant-id`]}));s(u,{successLabel:`Deleted`})})};var CT={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/idp_federation_grants/${t.grant_id}`,errors:{404:`NotFoundError`}};function wT(e){return e.usage(`$0 zero-trust identity-providers federation-grants get <grant-id>
|
|
943
|
-
|
|
944
|
-
Retrieves a single IdP federation grant by its UID.`).positional(`grant-id`,{type:`string`,description:`UID of the IdP federation grant.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const TT={command:`get <grant-id>`,describe:`Get an IdP federation grant`,builder:wT,handler:async e=>u({command:`zero-trust identity-providers federation-grants get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust identity-providers federation-grants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/idp_federation_grants/${e[`grant-id`]==null?`<grant-id>`:encodeURIComponent(String(e[`grant-id`]))}`,pathParams:{"grant-id":String(e[`grant-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(CT,{account_id:a,grant_id:e[`grant-id`]}));s(u,{successLabel:`Loaded`})})};var ET={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/idp_federation_grants`};function DT(e){return e.usage(`$0 zero-trust identity-providers federation-grants list
|
|
945
|
-
|
|
946
|
-
Lists the IdP federation grants owned by the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const OT={command:`list`,describe:`List IdP federation grants`,builder:DT,handler:async e=>u({command:`zero-trust identity-providers federation-grants list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust identity-providers federation-grants list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/idp_federation_grants`,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(ET,{account_id:a}));s(u,{successLabel:`Loaded`})})},kT={command:`federation-grants`,describe:`Operations for identity-providers.federation-grants`,builder:e=>e.command(yT).command(ST).command(TT).command(OT).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var AT={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/identity_providers/${t.identity_provider_id}`};function jT(e){return e.usage(`$0 zero-trust identity-providers get <identity-provider-id>
|
|
947
|
-
|
|
948
|
-
Fetches a configured identity provider.
|
|
949
|
-
|
|
950
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).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})}const MT={command:`get <identity-provider-id>`,describe:`Get an Access identity provider`,builder:jT,handler:async e=>u({command:`zero-trust identity-providers 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 identity-providers get`,method:`GET`,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:`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(AT,{account_or_zone:u,account_or_zone_id:d,identity_provider_id:e[`identity-provider-id`]}));s(f,{successLabel:`Loaded`})})};var NT={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/identity_providers`,query:[`scim_enabled`,`page`,`per_page`]};function PT(e){return e.usage(`$0 zero-trust identity-providers list
|
|
951
|
-
|
|
952
|
-
Lists all configured identity providers.
|
|
953
|
-
|
|
954
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`scim-enabled`,{type:`string`,description:`Indicates to Access to only retrieve identity providers that have the System for Cross-Domain Identity Management (SCIM) enabled.`}).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 FT={command:`list`,describe:`List Access identity providers`,builder:PT,handler:async e=>u({command:`zero-trust identity-providers list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={scim_enabled:e[`scim-enabled`],page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=e.zone===void 0?await i():void 0,r=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;c({command:`cf zero-trust identity-providers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${r}/${a}/access/identity_providers`,pathParams:{"account-or-zone":String(r),"account-or-zone-id":String(a)},query:n,bodyKind:`none`});return}let u=await r(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await o();d===`zones`?e.zoneId=f:e.accountId=f;let p=await l(`Loading`,async()=>u.send(NT,{account_or_zone:d,account_or_zone_id:f,...n}));s(p,{successLabel:`Loaded`})})};var IT={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/identity_providers/${t.identity_provider_id}/saml_certificate`,errors:{403:`ForbiddenError`,404:`NotFoundError`}};function LT(e){return e.usage("$0 zero-trust identity-providers saml-certificate create <identity-provider-id>\n\nCreates a new SAML encryption certificate set and assigns it to the specified SAML Identity Provider. This endpoint is idempotent - if the IdP already has a certificate set assigned, the existing certificate set is returned with a 200 status. **Workflow for enabling SAML encryption:** 1. Call this endpoint to create and assign a certificate set to the IdP 2. Update the IdP configuration (PUT `/identity_providers/{id}`) with: - `config.enable_encryption: true` - `saml_certificate_set_id: <uid from step 1>` 3. Configure the certificate's public key in your external SAML 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})}const RT={command:`create <identity-provider-id>`,describe:`Create SAML encryption certificate for Identity Provider`,builder:LT,handler:async e=>u({command:`zero-trust identity-providers saml-certificate create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf zero-trust identity-providers saml-certificate create`,method:`POST`,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`]))}/saml_certificate`,pathParams:{"identity-provider-id":String(e[`identity-provider-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(IT,{account_id:a,identity_provider_id:e[`identity-provider-id`]}));s(u,{successLabel:`Created`})})},zT={command:`saml-certificate`,describe:`Operations for identity-providers.saml-certificate`,builder:e=>e.command(RT).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var BT={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/identity_providers/${t.identity_provider_id}/scim/groups/${t.group_id}`,response:!1};function VT(e){return e.usage(`$0 zero-trust identity-providers scim groups delete <group-id>
|
|
955
|
-
|
|
956
|
-
Deletes a SCIM Group resource from the identity provider's SCIM population.`).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}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const HT={command:`delete <group-id>`,describe:`Delete a SCIM Group resource`,builder:VT,handler:async e=>u({command:`zero-trust identity-providers scim groups 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 groups 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/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();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(BT,{account_id:a,identity_provider_id:e[`identity-provider-id`],group_id:e[`group-id`]}));s(u,{successLabel:`Deleted`})})};var UT={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/identity_providers/${t.identity_provider_id}/scim/groups/${t.group_id}`};function WT(e){return e.usage(`$0 zero-trust identity-providers scim groups get <group-id>
|
|
957
|
-
|
|
958
|
-
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 GT={command:`get <group-id>`,describe:`Get a SCIM Group resource`,builder:WT,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(UT,{account_id:a,identity_provider_id:e[`identity-provider-id`],group_id:e[`group-id`]}));s(u,{successLabel:`Loaded`})})};var KT={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 qT(e){return e.usage(`$0 zero-trust identity-providers scim groups list
|
|
959
|
-
|
|
960
|
-
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 JT={command:`list`,describe:`List SCIM Group resources`,builder:qT,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(KT,{account_id:u,identity_provider_id:e[`identity-provider-id`],...n}));s(d,{successLabel:`Loaded`})})},YT={command:`groups`,describe:`Operations for identity-providers.scim.groups`,builder:e=>e.command(HT).command(GT).command(JT).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var XT={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/identity_providers/${t.identity_provider_id}/scim/users/${t.user_id}`,response:!1};function ZT(e){return e.usage(`$0 zero-trust identity-providers scim users delete <user-id>
|
|
961
|
-
|
|
962
|
-
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 QT={command:`delete <user-id>`,describe:`Delete a SCIM User resource`,builder:ZT,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(XT,{account_id:a,identity_provider_id:e[`identity-provider-id`],user_id:e[`user-id`]}));s(u,{successLabel:`Deleted`})})};var $T={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/identity_providers/${t.identity_provider_id}/scim/users/${t.user_id}`};function eE(e){return e.usage(`$0 zero-trust identity-providers scim users get <user-id>
|
|
963
|
-
|
|
964
|
-
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 tE={command:`get <user-id>`,describe:`Get a SCIM User resource`,builder:eE,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($T,{account_id:a,identity_provider_id:e[`identity-provider-id`],user_id:e[`user-id`]}));s(u,{successLabel:`Loaded`})})};var nE={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 rE(e){return e.usage(`$0 zero-trust identity-providers scim users list
|
|
965
|
-
|
|
966
|
-
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 iE={command:`list`,describe:`List SCIM User resources`,builder:rE,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(nE,{account_id:u,identity_provider_id:e[`identity-provider-id`],...n}));s(d,{successLabel:`Loaded`})})},aE={command:`users`,describe:`Operations for identity-providers.scim.users`,builder:e=>e.command(QT).command(tE).command(iE).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},oE={command:`scim`,describe:`Operations for identity-providers.scim`,builder:e=>e.command(YT).command(aE).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var sE={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/identity_providers/${t.identity_provider_id}`,body:`json`};function cE(e){return e.usage(`$0 zero-trust identity-providers update <identity-provider-id>
|
|
967
|
-
|
|
968
|
-
Updates a configured identity provider.
|
|
969
|
-
|
|
970
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).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 lE={command:`update <identity-provider-id>`,describe:`Update an Access identity provider`,builder:cE,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(sE,{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.`)})},uE={command:`identity-providers`,describe:`Operations for identity-providers`,builder:e=>e.command(pT).command(gT).command(MT).command(FT).command(lE).command(kT).command(zT).command(oE).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var dE={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/organizations`,body:`json`};function fE(e){return e.usage(`$0 zero-trust organization create
|
|
971
|
-
|
|
972
|
-
Sets up a Zero Trust organization for your account or zone.
|
|
973
|
-
|
|
974
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).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.`,default:!1}).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.",default:!1}).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.`,default:!1}).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.`,default:!1}).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.`,default:!1}).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.`,default:!1}).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=>{let t=[`service-token-inactivity-action`,`service-token-inactivity-enabled`,`service-token-inactivity-inactivity-threshold-days`].some(t=>e[t]!==void 0);if(!e.body&&t){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:`create`,describe:`Create your Zero Trust organization`,builder:fE,handler:async e=>u({command:`zero-trust organization create`,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 create`,method:`POST`,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`],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(`Creating`,async()=>n.send(dE,{body:t,account_or_zone:u,account_or_zone_id:d}));s(r,{successLabel:`Created`});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`],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(`Creating`,async()=>n.send(dE,{body:p,account_or_zone:u,account_or_zone_id:d}));s(m,{successLabel:`Created`})})};var mE={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/organizations/doh`};function hE(e){return e.usage(`$0 zero-trust organization doh get
|
|
975
|
-
|
|
976
|
-
Returns the DoH settings for your Zero Trust organization.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gE={command:`get`,describe:`Get your Zero Trust organization DoH settings`,builder:hE,handler:async e=>u({command:`zero-trust organization doh get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust organization doh get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/organizations/doh`,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(mE,{account_id:a}));s(u,{successLabel:`Loaded`})})};var _E={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/organizations/doh`,body:`json`};function vE(e){return e.usage(`$0 zero-trust organization doh update
|
|
977
|
-
|
|
978
|
-
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 yE={command:`update`,describe:`Update your Zero Trust organization DoH settings`,builder:vE,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(_E,{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(_E,{body:u,account_id:a}));s(d,{successLabel:`Updated`})})},bE={command:`doh`,describe:`Operations for organization.doh`,builder:e=>e.command(gE).command(yE).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var xE={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/organizations`};function SE(e){return e.usage(`$0 zero-trust organization get
|
|
979
|
-
|
|
980
|
-
Returns the configuration for your Zero Trust organization.
|
|
981
|
-
|
|
982
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const CE={command:`get`,describe:`Get your Zero Trust organization`,builder:SE,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(xE,{account_or_zone:u,account_or_zone_id:d}));s(f,{successLabel:`Loaded`})})};var wE={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/organizations/trust_settings`};function TE(e){return e.usage(`$0 zero-trust organization trust-settings delete
|
|
983
|
-
|
|
984
|
-
Resets the trust settings for your Zero Trust organization.`).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 EE={command:`delete`,describe:`Delete Zero Trust organization trust settings`,builder:TE,handler:async e=>u({command:`zero-trust organization trust-settings delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf zero-trust organization trust-settings delete`,method:`DELETE`,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();if(e.accountId=a,!await x({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(wE,{account_id:a}));s(u,{successLabel:`Deleted`})})};var DE={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/organizations/trust_settings`};function OE(e){return e.usage(`$0 zero-trust organization trust-settings get
|
|
985
|
-
|
|
986
|
-
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 kE={command:`get`,describe:`Get Zero Trust organization trust settings`,builder:OE,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(DE,{account_id:a}));s(u,{successLabel:`Loaded`})})};var AE={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/organizations/trust_settings`,body:`json`};function jE(e){return e.usage(`$0 zero-trust organization trust-settings replace
|
|
987
|
-
|
|
988
|
-
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 ME={command:`replace`,describe:`Replace Zero Trust organization trust settings`,builder:jE,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(AE,{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(AE,{body:u,account_id:a}));s(d,{successLabel:`Updated`})})};var NE={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/access/organizations/trust_settings`,body:`json`};function PE(e){return e.usage(`$0 zero-trust organization trust-settings update
|
|
989
|
-
|
|
990
|
-
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 FE={command:`update`,describe:`Update Zero Trust organization trust settings`,builder:PE,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(NE,{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(NE,{body:u,account_id:a}));s(d,{successLabel:`Updated`})})},IE={command:`trust-settings`,describe:`Operations for organization.trust-settings`,builder:e=>e.command(EE).command(kE).command(ME).command(FE).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var LE={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/access/organizations`,body:`json`};function RE(e){return e.usage(`$0 zero-trust organization update
|
|
991
|
-
|
|
992
|
-
Updates the configuration for your Zero Trust organization.
|
|
993
|
-
|
|
994
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).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=>{let t=[`service-token-inactivity-action`,`service-token-inactivity-enabled`,`service-token-inactivity-inactivity-threshold-days`].some(t=>e[t]!==void 0);if(!e.body&&t){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 zE={command:`update`,describe:`Update your Zero Trust organization`,builder:RE,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(LE,{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(LE,{body:p,account_or_zone:u,account_or_zone_id:d}));s(m,{successLabel:`Updated`})})},BE={command:`organization`,describe:`Operations for organization`,builder:e=>e.command(pE).command(CE).command(zE).command(bE).command(IE).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var VE={method:`GET`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/behaviors`};function HE(e){return e.usage(`$0 zero-trust risk-scoring behaviours get
|
|
995
|
-
|
|
996
|
-
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 UE={command:`get`,describe:`Get all behaviors and associated configuration`,builder:HE,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(VE,{account_id:a}));s(u,{successLabel:`Loaded`})})};var WE={method:`PUT`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/behaviors`,body:`json`};function GE(e){return e.usage(`$0 zero-trust risk-scoring behaviours update
|
|
997
|
-
|
|
998
|
-
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 KE={command:`update`,describe:`Update configuration for risk behaviors`,builder:GE,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(WE,{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(WE,{body:u,account_id:a}));s(d,{successLabel:`Updated`})})},qE={command:`behaviours`,describe:`User Risk Scoring - manage behaviors used to calculate user risk scores`,builder:e=>e.command(UE).command(KE).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var JE={method:`GET`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/${t.user_id}`};function YE(e){return e.usage(`$0 zero-trust risk-scoring get <user-id>
|
|
999
|
-
|
|
1000
|
-
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 XE={command:`get <user-id>`,describe:`Get risk event/score information for a specific user`,builder:YE,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(JE,{account_id:a,user_id:e[`user-id`]}));s(u,{successLabel:`Loaded`})})};var ZE={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
|
|
1001
|
-
|
|
1002
|
-
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).
|
|
1003
|
-
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 $E={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(ZE,{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(ZE,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var eD={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/integrations/${t.integration_id}`};function tD(e){return e.usage(`$0 zero-trust risk-scoring integrations delete <integration-id>
|
|
1004
|
-
|
|
1005
|
-
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 nD={command:`delete <integration-id>`,describe:`Delete a risk score integration.`,builder:tD,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(eD,{account_id:a,integration_id:e[`integration-id`]}));s(u,{successLabel:`Deleted`})})};var rD={method:`GET`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/integrations/${t.integration_id}`};function iD(e){return e.usage(`$0 zero-trust risk-scoring integrations get <integration-id>
|
|
1006
|
-
|
|
1007
|
-
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 aD={command:`get <integration-id>`,describe:`Get risk score integration by id.`,builder:iD,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(rD,{account_id:a,integration_id:e[`integration-id`]}));s(u,{successLabel:`Loaded`})})};var oD={method:`GET`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/integrations`};function sD(e){return e.usage(`$0 zero-trust risk-scoring integrations list
|
|
1008
|
-
|
|
1009
|
-
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 cD={command:`list`,describe:`List all risk score integrations for the account.`,builder:sD,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(oD,{account_id:a}));s(u,{successLabel:`Loaded`})})};var lD={method:`GET`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/integrations/reference_id/${t.reference_id}`};function uD(e){return e.usage(`$0 zero-trust risk-scoring integrations references get <reference-id>
|
|
1010
|
-
|
|
1011
|
-
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 dD={command:`get <reference-id>`,describe:`Get risk score integration by reference id.`,builder:uD,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(lD,{account_id:a,reference_id:e[`reference-id`]}));s(u,{successLabel:`Loaded`})})},fD={command:`references`,describe:`User Risk Scoring - retrieve integrations by external reference`,builder:e=>e.command(dD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var pD={method:`PUT`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/integrations/${t.integration_id}`,body:`json`};function mD(e){return e.usage(`$0 zero-trust risk-scoring integrations update <integration-id>
|
|
1012
|
-
|
|
1013
|
-
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).
|
|
1014
|
-
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 hD={command:`update <integration-id>`,describe:`Update a risk score integration.`,builder:mD,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(pD,{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(pD,{body:u,account_id:a,integration_id:e[`integration-id`]}));s(d,{successLabel:`Updated`})})},gD={command:`integrations`,describe:`User Risk Scoring - manage integrations that provide risk score signals`,builder:e=>e.command($E).command(nD).command(aD).command(cD).command(hD).command(fD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var _D={method:`POST`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/${t.user_id}/reset`};function vD(e){return e.usage(`$0 zero-trust risk-scoring reset <user-id>
|
|
1015
|
-
|
|
1016
|
-
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 yD={command:`reset <user-id>`,describe:`Clear the risk score for a particular user`,builder:vD,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(_D,{account_id:a,user_id:e[`user-id`]}));s(u,{successLabel:`Deleted`})})};var bD={method:`GET`,path:t=>e`/accounts/${t.account_id}/zt_risk_scoring/summary`};function xD(e){return e.usage(`$0 zero-trust risk-scoring summary get
|
|
1017
|
-
|
|
1018
|
-
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 SD={command:`get`,describe:`Get risk score info for all users in the account`,builder:xD,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(bD,{account_id:a}));s(u,{successLabel:`Loaded`})})},CD={command:`summary`,describe:`User Risk Scoring - retrieve account risk score summaries`,builder:e=>e.command(SD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},wD={command:`risk-scoring`,describe:`User Risk Scoring - retrieve and reset user risk scores`,builder:e=>e.command(XE).command(yD).command(qE).command(gD).command(CD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var TD={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/access/seats`,body:`json`};function ED(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 DD={command:`edit`,describe:`Update a user seat`,builder:ED,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(TD,{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.`)})},OD={command:`seats`,describe:`Operations for seats`,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}/mfa_authenticators/${t.authenticator_id}`};function AD(e){return e.usage(`$0 zero-trust users mfa authenticators delete <authenticator-id>
|
|
1019
|
-
|
|
1020
|
-
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 jD={command:`delete <authenticator-id>`,describe:`Delete a user's authenticator`,builder:AD,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(kD,{account_id:a,user_id:e[`user-id`],authenticator_id:e[`authenticator-id`]}));s(u,{successLabel:`Deleted`})})},MD={command:`authenticators`,describe:`Operations for users.mfa.authenticators`,builder:e=>e.command(jD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ND={command:`mfa`,describe:`Operations for users.mfa`,builder:e=>e.command(MD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var PD={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/users/${t.user_id}/passkeys/${t.authenticator_id}`};function FD(e){return e.usage(`$0 zero-trust users passkeys delete <authenticator-id>
|
|
1021
|
-
|
|
1022
|
-
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 ID={command:`delete <authenticator-id>`,describe:`Delete a user's passkey`,builder:FD,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(PD,{account_id:a,user_id:e[`user-id`],authenticator_id:e[`authenticator-id`]}));s(u,{successLabel:`Deleted`})})},LD={command:`passkeys`,describe:`Operations for users.passkeys`,builder:e=>e.command(ID).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},RD={command:`users`,describe:`Operations for users`,builder:e=>e.command(ND).command(LD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},zD={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(Nc).command(Bc).command(Qd).command(th).command(u_).command(TS).command(uT).command(uE).command(BE).command(wD).command(OD).command(RD).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{zD as default};
|