{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Deployments configure how [Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions) are deployed to traffic. A deployment can consist of multiple versions of a Worker.","properties":{"path":{"type":"object","properties":{"account_id":{"$ref":"#/definitions/workers_identifier"},"script_name":{"$ref":"#/definitions/workers_script_name"}},"required":["account_id","script_name"],"additionalProperties":false},"query":{"type":"object","properties":{"force":{"type":"boolean","description":"If set to true, the deployment will be created even if normally blocked by something such rolling back to an older version when a secret has changed."}},"required":[],"additionalProperties":false},"body":{"$ref":"#/definitions/workers_deployment"}},"required":["path","body"],"additionalProperties":false,"definitions":{"workers_identifier":{"description":"Identifier.","type":"string","maxLength":32,"examples":["023e105f4ecef8ad9ca31a8372d0c353"]},"workers_script_name":{"description":"Name of the script.","type":"string","pattern":"^[a-z0-9_][a-z0-9-_]*$","examples":["this-is_my_script-01"]},"workers_deployment":{"type":"object","properties":{"annotations":{"type":"object","properties":{"workers/message":{"description":"Human-readable message about the deployment. Truncated to 1000 bytes if longer.","type":"string","maxLength":1000,"examples":["Deploy bug fix."]}}},"code_update_strategy":{"description":"Choose whether to apply Durable Object code updates immediately or defer them. When omitted, the default strategy applies.","oneOf":[{"$ref":"#/definitions/workers_code_update_strategy"},{"enum":[null],"type":["object","null"]}]},"strategy":{"type":"string","enum":["percentage"]},"versions":{"description":"Worker versions included in this deployment. Each object must contain a `version_id` UUID and a `percentage`; percentages across all objects must total 100. In the `cf` CLI, pass the entire array as one JSON value to `--versions`, either inline, for example `--versions '[{\"version_id\":\"023e105f-2a42-4f8b-a1c1-73f6a2a30c0f\",\"percentage\":100}]'`, or from a JSON file with `--versions @versions.json`.","type":"array","items":{"properties":{"percentage":{"description":"Percentage of traffic served by this version.","type":"number","maximum":100,"minimum":0.01,"examples":[100]},"version_id":{"description":"Identifier of the Worker Version.","type":"string","format":"uuid"}},"required":["version_id","percentage"],"type":"object"},"examples":[[{"percentage":100,"version_id":"023e105f-2a42-4f8b-a1c1-73f6a2a30c0f"}]]}},"required":["strategy","versions"]},"workers_code_update_strategy":{"oneOf":[{"additionalProperties":false,"properties":{"mode":{"description":"Apply Durable Object code updates immediately.","type":"string","enum":["immediate"]}},"required":["mode"],"type":"object"},{"additionalProperties":false,"properties":{"max_delay":{"description":"Set the maximum number of seconds to wait before forcing the update. When omitted, the default maximum delay applies.","type":["number","null"],"maximum":86400,"minimum":0,"multipleOf":0.001},"mode":{"description":"Allow active Durable Objects to hibernate before updating their code.","type":"string","enum":["deferred"]}},"required":["mode"],"type":"object"}]}}},"name":"Create Worker Deployment","id":"cloudflare.worker-deployments-create-deployment","example":{"path":{"account_id":"023e105f4ecef8ad9ca31a8372d0c353","script_name":"this-is_my_script-01"},"body":{"strategy":"percentage","versions":[{"percentage":100,"version_id":"023e105f-2a42-4f8b-a1c1-73f6a2a30c0f"}]}},"maxRequests":1,"summary":false}}