{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Create a Containers application.\n\nUse `scheduling_policy: \"default\"` for a scheduler-backed application. The\nContainers scheduler maintains the requested instance count and manages\ndeployment configuration, placement, scaling, versions, and rollouts.\n\nUse `scheduling_policy: \"durable_object\"` for a Durable Object-managed\napplication. Each Durable Object creates and manages the lifecycle of its\ncontainer instance. Supply `name`, `scheduling_policy`, and `durable_objects`,\nwith optional `configuration` and optional top-level `observability` settings.\nDeployment configuration, scaling, constraints, versions, and rollouts do not apply.\n","properties":{"path":{"type":"object","properties":{"account_id":{"type":"string","examples":["account-123"],"description":"Account identifier."}},"required":["account_id"],"additionalProperties":false},"body":{"$ref":"#/definitions/cc_ContainersCreateApplicationRequest"}},"required":["path","body"],"additionalProperties":false,"definitions":{"cc_ContainersCreateApplicationRequest":{"description":"Create a Containers application.\nSet `scheduling_policy` to `default` for a\nscheduler-backed application with deployment configuration, instance counts,\nconstraints, versions, and rollouts. Set it to `durable_object` for a\nDurable Object-managed application where each Durable Object creates and manages\nthe lifecycle of its container instance. For `durable_object` requests, supply\n`name`, `scheduling_policy`, and `durable_objects`, with optional `configuration`\nand top-level `observability` settings.\n","oneOf":[{"$ref":"#/definitions/cc_ContainersCreateScheduledApplicationRequest"},{"$ref":"#/definitions/cc_ContainersCreateDurableObjectApplicationRequest"}]},"cc_ContainersCreateScheduledApplicationRequest":{"description":"Create a scheduler-backed Containers application. The Containers scheduler\nmaintains the requested instance count and applies deployment configuration,\nplacement, scaling, versions, and rollouts.\n","type":"object","properties":{"configuration":{"description":"Defines the deployment configuration for every deployment in this application.\n","allOf":[{"$ref":"#/definitions/cc_UserDeploymentConfiguration"}]},"constraints":{"$ref":"#/definitions/cc_ApplicationConstraints"},"durable_objects":{"description":"Optionally associates this scheduler-backed application with a Durable Object namespace.","allOf":[{"$ref":"#/definitions/cc_DurableObjectsConfiguration"}]},"instances":{"description":"The initial number of deployments to create.","type":"integer","minimum":0},"max_instances":{"description":"Sets the maximum number of instances that the application can run.","type":"integer","minimum":0},"name":{"description":"The name for this application.","type":"string"},"observability":{"description":"Top-level observability settings for the application.\nThis field is mutually exclusive with configuration.observability.\n","allOf":[{"$ref":"#/definitions/cc_ApplicationObservability"}]},"rollout_active_grace_period":{"$ref":"#/definitions/cc_ApplicationRolloutActiveGracePeriod"},"scheduling_policy":{"allOf":[{"$ref":"#/definitions/cc_ScheduledApplicationSchedulingPolicy"}]}},"additionalProperties":false,"required":["name","scheduling_policy","instances","max_instances","configuration"]},"cc_ContainersCreateDurableObjectApplicationRequest":{"description":"Create a Durable Object-managed Containers application. Each Durable Object\ncreates and manages the lifecycle of its container instance. Supply `name`,\n`scheduling_policy`, and `durable_objects`, with optional `configuration` and\ntop-level `observability` settings. `constraints.jurisdiction` selects the\njurisdiction of the application's primary control-plane object at creation time.\nDeployment configuration, instance counts, scaling, other placement constraints,\nversions, and rollouts do not apply.\n","type":"object","properties":{"configuration":{"description":"Configuration for a Durable Object-managed application.","allOf":[{"$ref":"#/definitions/cc_DurableObjectApplicationConfiguration"}]},"constraints":{"$ref":"#/definitions/cc_DurableObjectApplicationConstraints"},"durable_objects":{"description":"The customer-owned Durable Object namespace that owns this application and its instances.","allOf":[{"$ref":"#/definitions/cc_DurableObjectsConfiguration"}]},"name":{"description":"The name for this application.","type":"string"},"observability":{"$ref":"#/definitions/cc_DurableObjectApplicationObservability"},"scheduling_policy":{"allOf":[{"$ref":"#/definitions/cc_DurableObjectApplicationSchedulingPolicy"}]}},"additionalProperties":false,"required":["name","scheduling_policy","durable_objects"]},"cc_UserDeploymentConfiguration":{"description":"User-specified container configuration.","type":"object","properties":{"authorized_keys":{"type":"array","items":{"$ref":"#/definitions/cc_UserSSHPublicKey"}},"command":{"$ref":"#/definitions/cc_Command"},"entrypoint":{"$ref":"#/definitions/cc_Entrypoint"},"environment_variables":{"description":"Container environment variables.","type":"array","items":{"$ref":"#/definitions/cc_EnvironmentVariable"}},"image":{"$ref":"#/definitions/cc_Image"},"instance_type":{"$ref":"#/definitions/cc_InstanceType"},"observability":{"$ref":"#/definitions/cc_DeploymentObservability"}},"required":["image"]},"cc_ApplicationConstraints":{"type":"object","properties":{"jurisdiction":{"$ref":"#/definitions/cc_ApplicationJurisdiction"},"regions":{"type":"array","items":{"$ref":"#/definitions/cc_Region"}}}},"cc_DurableObjectsConfiguration":{"description":"Set of properties to configure a Durable Object-backed application.","oneOf":[{"$ref":"#/definitions/cc_DurableObjectsConfigurationNamespaceId"},{"$ref":"#/definitions/cc_DurableObjectsConfigurationScriptAndClass"}]},"cc_ApplicationObservability":{"description":"Settings for application observability such as logging. Supported fields depend\non the application's scheduling policy. Durable Object-managed applications\naccept only `logs.enabled`.\n","type":"object","properties":{"logs":{"$ref":"#/definitions/cc_ObservabilityLogs"}}},"cc_ApplicationRolloutActiveGracePeriod":{"description":"Grace period for active instances to stay alive before becoming eligible for shutdown signal due to a rollout, in seconds.\nDefaults to 0.\n","type":"integer","default":0,"maximum":604800,"minimum":0},"cc_ScheduledApplicationSchedulingPolicy":{"description":"Selects a scheduler-backed application. Use `default` when the Containers\nscheduler should maintain the requested number of instances and manage deployment\nconfiguration, placement, scaling, versions, and rollouts.\n","type":"string","enum":["default"]},"cc_DurableObjectApplicationConfiguration":{"description":"Application-wide settings for a Durable Object-managed application.","type":"object","properties":{"authorized_keys":{"type":"array","items":{"$ref":"#/definitions/cc_UserSSHPublicKey"}},"wrangler_ssh":{"$ref":"#/definitions/cc_WranglerSSHConfig"}},"additionalProperties":false},"cc_DurableObjectApplicationConstraints":{"description":"The jurisdiction of a Durable Object-managed application's primary control-plane object.\nSet this when creating the application; it cannot be changed afterwards.\nOther placement constraints are not supported by this scheduling policy.\n","type":"object","properties":{"jurisdiction":{"type":"string","enum":["eu","fedramp","us"]}},"additionalProperties":false,"required":["jurisdiction"]},"cc_DurableObjectApplicationObservability":{"description":"Application-wide logging settings for a Durable Object-managed application.\nThe application publishes these settings to its runtime metadata. Updating\nthem does not create a deployment or rollout.\n","type":"object","properties":{"logs":{"description":"Application-wide logging settings.","type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean","default":false}}}},"additionalProperties":false},"cc_DurableObjectApplicationSchedulingPolicy":{"description":"Selects a Durable Object-managed application. Each Durable Object creates and\nmanages the lifecycle of its container instance. Configure application-wide\nobservability settings here. Deployment configuration, scaling, placement\nconstraints, versions, and rollouts do not apply.\n","type":"string","enum":["durable_object"]},"cc_UserSSHPublicKey":{"description":"User-provided SSH public key.","type":"object","properties":{"name":{"description":"Optional human readable name for this key.","type":"string"},"public_key":{"$ref":"#/definitions/cc_SSHPublicKey"}},"required":["public_key"]},"cc_Command":{"description":"The command that runs when the container starts, passed to the entrypoint.\nYou can override this at run-time. If you override only the command,\nit gets passed to the default entrypoint specified in the image.\n","type":"array","items":{"$ref":"#/definitions/cc_ExecFormParam"},"examples":[["myapp","--default-option"]]},"cc_Entrypoint":{"description":"The entry point for the container, specifying the executable to run when the container starts.\nYou can override this at run-time. If you do, the default command from the image is ignored.\nSpecify both entrypoint and command at run-time to completely replace the image defaults.\n","type":"array","items":{"$ref":"#/definitions/cc_ExecFormParam"},"examples":[["/bin/bash"]]},"cc_EnvironmentVariable":{"description":"An environment variable with a value set.","type":"object","properties":{"name":{"$ref":"#/definitions/cc_EnvironmentVariableName"},"value":{"$ref":"#/definitions/cc_EnvironmentVariableValue"}},"required":["name","value"]},"cc_Image":{"description":"Image url.","type":"string"},"cc_InstanceType":{"description":"The instance type configures vCPU, memory, and disk.\n\n- \"lite\": 1/16 vCPU, 256 MiB memory, 2 GB disk\n- \"basic\": 1/4 vCPU, 1 GiB memory, 4 GB disk\n- \"standard-1\": 1/2 vCPU, 4 GiB memory, 8 GB disk\n- \"standard-2\": 1 vCPU, 6 GiB memory, 12 GB disk\n- \"standard-3\": 2 vCPU, 8 GiB memory, 16 GB disk\n- \"standard-4\": 4 vCPU, 12 GiB memory, 20 GB disk\n","type":"string","default":"lite","anyOf":[{"enum":["lite","basic","standard-1","standard-2","standard-3","standard-4"],"type":"string"}],"examples":["lite"]},"cc_DeploymentObservability":{"description":"Settings for deployment observability such as logging.","type":"object","properties":{"logs":{"$ref":"#/definitions/cc_ObservabilityLogs"}}},"cc_ApplicationJurisdiction":{"description":"Restricts placement to datacenters in the selected jurisdiction. Choose \"eu\", \"fedramp\", or \"us\". When combined with regions, EU supports EEUR and WEUR while FedRAMP and US support ENAM and WNAM.","type":"string"},"cc_Region":{"description":"Represents a group of datacenters. Choose one of \"AFR\", \"APAC\", \"EEUR\", \"ENAM\", \"WNAM\", \"ME\", \"OC\", \"SAM\", or \"WEUR\".\n","type":"string","examples":["WNAM"]},"cc_DurableObjectsConfigurationNamespaceId":{"description":"Durable object configuration using a namespace ID.","type":"object","properties":{"namespace_id":{"description":"The namespace ID of the durable object namespace to use for this application.","type":"string","examples":["14758f1afd44c09b7992073ccf00b43d"]}},"required":["namespace_id"]},"cc_DurableObjectsConfigurationScriptAndClass":{"description":"Durable object configuration using script and class names.","type":"object","properties":{"class_name":{"description":"The class name of the durable object.","type":"string"},"script_name":{"description":"The script name where the durable object class is defined.","type":"string"}},"required":["script_name","class_name"]},"cc_ObservabilityLogs":{"description":"Observability logging settings.","type":"object","properties":{"enabled":{"type":"boolean","default":false}}},"cc_WranglerSSHConfig":{"description":"Configuration properties for connecting with SSH to a container using Wrangler.","type":"object","properties":{"enabled":{"type":"boolean","default":true},"port":{"type":"integer","default":22,"maximum":65535,"minimum":1}}},"cc_SSHPublicKey":{"description":"An SSH public key.","type":"string"},"cc_ExecFormParam":{"type":"string"},"cc_EnvironmentVariableName":{"description":"An environment variable name.","type":"string"},"cc_EnvironmentVariableValue":{"description":"An environment variable value.","type":"string"}}},"name":"Create a new application","id":"cloudflare.createapplication","example":{"path":{"account_id":"account-123"},"body":{"name":"example","scheduling_policy":"default","instances":1,"max_instances":1,"configuration":{"image":"example"}}},"maxRequests":1,"summary":false}}