Services /
Put deployment service
Required permission
Project > Services > General > Create
Path parameters
projectId
string requiredID of the project
Request body
- {object}
name
string requiredThe name of the service.min length3max length54pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$description
stringA description of the service.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$billing
{object} requireddeploymentPlan
string requiredThe ID of the deployment plan to use.pattern^[A-Za-z0-9-]+$gpu
{object}enabled
booleanconfiguration
{object}gpuType
string requiredtimesliced
booleandeployment
(multiple options: oneOf) requiredDeployment type- {object}Internal deployment
instances
integer requiredThe number of instances to run the service on.buildpack
{object}Allows for customization of buildpack runtimeconfigType
string requiredType of buildpack run configurationone ofdefault, customProcess, customCommand, customEntrypointCustomCommand, originalEntrypointCustomCommandcustomProcess
stringCustom process which should be run. Required in case where `configType` is `customProcess`customEntrypoint
stringCustom entrypoint which should be run. Required in case where `configType` is `customEntrypointCustomCommand`customCommand
stringCustom command which should be run. Required in case where `configType` is `customCommand`, `customEntrypointCustomCommand` or `originalEntrypointCustomCommand`docker
{object}Allows for customization of docker runtimeconfigType
string requiredType of entrypoint & command override configurationone ofdefault, customEntrypoint, customCommand, customEntrypointCustomCommandcustomEntrypoint
stringCustom entrypoint which should be used. Required in case where `configType` is `customEntrypoint` or `customEntrypointCustomCommand`customCommand
stringCustom command which should be used. Required in case where `configType` is `customCommand` or `customEntrypointCustomCommand`storage
{object}ephemeralStorage
{object}storageSize
integerEphemeral storage per container in MBone of1024, 2048, 5120, 10240, 20480, 30720, 40960, 51200, 61440, 81920, 102400, 122880, 153600, 204800min1024max204800shmSize
integerConfigures the amount of available memory-backed disk space available to /dev/shmone of64, 128, 256, 512, 1024, 2048, 5120, 10240min64max10240strategy
{object}Roll out strategy of the servicetype
stringConfigures the instance roll out strategy of your service. Currently only available via feature flag.one ofrecreate, rollout-steady, rollout-balanced, rollout-fastzonalRedundancy
{object}type
stringDefines scheduling behaviour across different zones within the same region.one ofdisabled, preferred, requiredminZones
integerDefines how many zones are required and will prevent containers from additional scheduling into existing zones. (Only relevant if type is set to "required")min1gpu
{object}enabled
booleanconfiguration
{object}gpuType
string requiredtimesliced
booleangracePeriodSeconds
integerThe maximum amount of time the process has to shut down after receiving a SIGTERM signal before it is forcefully shut down SIGKILL by the system.min15max600metadata
{object}Allow setting custom labels and annotations for workloads.labels
{object}Specify custom labels for the workload.annotations
{object}Specify custom annotations for the workload as string or object.internal
{object} requiredid
stringID of the build service to deploymin length3max length54pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$branch
stringBranch to deploybuildSHA
(multiple options: oneOf)Commit SHA to deploy, or 'latest' to deploy the most recent commit- stringA commit sha.min length40max length40
- stringLatest commit.one oflatest
buildId
stringID of the build that should be deployed- {object}External deployment
instances
integer requiredThe number of instances to run the service on.buildpack
{object}Allows for customization of buildpack runtimeconfigType
string requiredType of buildpack run configurationone ofdefault, customProcess, customCommand, customEntrypointCustomCommand, originalEntrypointCustomCommandcustomProcess
stringCustom process which should be run. Required in case where `configType` is `customProcess`customEntrypoint
stringCustom entrypoint which should be run. Required in case where `configType` is `customEntrypointCustomCommand`customCommand
stringCustom command which should be run. Required in case where `configType` is `customCommand`, `customEntrypointCustomCommand` or `originalEntrypointCustomCommand`docker
{object}Allows for customization of docker runtimeconfigType
string requiredType of entrypoint & command override configurationone ofdefault, customEntrypoint, customCommand, customEntrypointCustomCommandcustomEntrypoint
stringCustom entrypoint which should be used. Required in case where `configType` is `customEntrypoint` or `customEntrypointCustomCommand`customCommand
stringCustom command which should be used. Required in case where `configType` is `customCommand` or `customEntrypointCustomCommand`storage
{object}ephemeralStorage
{object}storageSize
integerEphemeral storage per container in MBone of1024, 2048, 5120, 10240, 20480, 30720, 40960, 51200, 61440, 81920, 102400, 122880, 153600, 204800min1024max204800shmSize
integerConfigures the amount of available memory-backed disk space available to /dev/shmone of64, 128, 256, 512, 1024, 2048, 5120, 10240min64max10240strategy
{object}Roll out strategy of the servicetype
stringConfigures the instance roll out strategy of your service. Currently only available via feature flag.one ofrecreate, rollout-steady, rollout-balanced, rollout-fastzonalRedundancy
{object}type
stringDefines scheduling behaviour across different zones within the same region.one ofdisabled, preferred, requiredminZones
integerDefines how many zones are required and will prevent containers from additional scheduling into existing zones. (Only relevant if type is set to "required")min1gpu
{object}enabled
booleanconfiguration
{object}gpuType
string requiredtimesliced
booleangracePeriodSeconds
integerThe maximum amount of time the process has to shut down after receiving a SIGTERM signal before it is forcefully shut down SIGKILL by the system.min15max600metadata
{object}Allow setting custom labels and annotations for workloads.labels
{object}Specify custom labels for the workload.annotations
{object}Specify custom annotations for the workload as string or object.external
{object} requiredimagePath
string requiredImage to be deployed. When not deploying from Dockerhub the URL must be specified.pattern^(?:(?:https?:\/\/)?([a-zA-Z0-9\-]+\.[a-zA-Z0-9\.\-]+)(\/v1)?)?(?:\/)?([a-zA-Z/-9\.\-_]+)(?:\:([a-zA-Z/-9\.\-_\:]+)|\@([a-zA-Z/-9\.\-_\:]+))$credentials
stringID of the saved credentials to use to access this external image.pattern^[A-Za-z0-9-]+$- {object}Choose later
instances
integer requiredThe number of instances to run the service on.buildpack
{object}Allows for customization of buildpack runtimeconfigType
string requiredType of buildpack run configurationone ofdefault, customProcess, customCommand, customEntrypointCustomCommand, originalEntrypointCustomCommandcustomProcess
stringCustom process which should be run. Required in case where `configType` is `customProcess`customEntrypoint
stringCustom entrypoint which should be run. Required in case where `configType` is `customEntrypointCustomCommand`customCommand
stringCustom command which should be run. Required in case where `configType` is `customCommand`, `customEntrypointCustomCommand` or `originalEntrypointCustomCommand`docker
{object}Allows for customization of docker runtimeconfigType
string requiredType of entrypoint & command override configurationone ofdefault, customEntrypoint, customCommand, customEntrypointCustomCommandcustomEntrypoint
stringCustom entrypoint which should be used. Required in case where `configType` is `customEntrypoint` or `customEntrypointCustomCommand`customCommand
stringCustom command which should be used. Required in case where `configType` is `customCommand` or `customEntrypointCustomCommand`storage
{object}ephemeralStorage
{object}storageSize
integerEphemeral storage per container in MBone of1024, 2048, 5120, 10240, 20480, 30720, 40960, 51200, 61440, 81920, 102400, 122880, 153600, 204800min1024max204800shmSize
integerConfigures the amount of available memory-backed disk space available to /dev/shmone of64, 128, 256, 512, 1024, 2048, 5120, 10240min64max10240strategy
{object}Roll out strategy of the servicetype
stringConfigures the instance roll out strategy of your service. Currently only available via feature flag.one ofrecreate, rollout-steady, rollout-balanced, rollout-fastzonalRedundancy
{object}type
stringDefines scheduling behaviour across different zones within the same region.one ofdisabled, preferred, requiredminZones
integerDefines how many zones are required and will prevent containers from additional scheduling into existing zones. (Only relevant if type is set to "required")min1gpu
{object}enabled
booleanconfiguration
{object}gpuType
string requiredtimesliced
booleangracePeriodSeconds
integerThe maximum amount of time the process has to shut down after receiving a SIGTERM signal before it is forcefully shut down SIGKILL by the system.min15max600metadata
{object}Allow setting custom labels and annotations for workloads.labels
{object}Specify custom labels for the workload.annotations
{object}Specify custom annotations for the workload as string or object.ports
[array]- {object}
name
string requiredThe name used to identify the port.min length1max length8pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$internalPort
integer requiredThe port number.min1max65535public
booleanIf true, the port will be exposed publicly.security
{object}credentials
[array]An array of credentials to access the service.- {object}
username
string requiredThe username to access the servicemin length3max length39pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$password
string requiredThe password to access the service with this username.type
string requiredThe type of authentication usedone ofbasic-authip
[array]An array of IP address policies.- {object}
addresses
[array] requiredAn array of IP addresses used for this rule- stringAn IP address used by this rule
action
string requiredThe action for this rule.one ofALLOW, DENYpolicies
[array]An array of IP address policies.- {object}
addresses
[array] requiredAn array of IP addresses used for this rule- stringAn IP address used by this rule
action
string requiredThe action for this rule.one ofALLOW, DENYsso
{object}Configure port authentication via SSOorganizationId
stringID of the SSO organization that the user will have to be a member ofdirectoryGroupIds
[array]Array of directory groups that will have access- string
validateInternalTraffic
booleanEnforce internal traffic through SSO authentication flowsetCookieOnRootDomain
booleanSet SSO authentication cookie on root domainallowInternalTrafficViaPublicDns
booleanAllow internal traffic from same or shared projects via public DNS to skip SSO authentication flowheaders
[array]List of header authentication settings, it checks the presence of all headers and compares it against the expected value. Wildcard (*) is supported.- (multiple options: anyOf)
- {object}Matches provided headers as strings.
regexMode
booleanname
string requiredpattern^[a-zA-Z0-9_\-%$+]+$value
string required- {object}Matches provided headers as regex.
regexMode
booleanname
string requiredvalue
string requiredverificationMode
stringMode used to verify multiple security features like ip policies and SSO authenticationone ofor, andsecurePathConfiguration
{object}enabled
booleanEnable security policies on a path-level styleskipSecurityPoliciesForInternalTrafficViaPublicDns
booleanAllow internal traffic from same or shared projects via public DNS to skip all security policiesrules
[array]- {object}
paths
[array] requiredArray of path objects which represent the paths and their priority for which the security policies will be enforced- (multiple options: oneOf)Data about how the path should be handled.
- {object}Route when the path starts with the provided prefix.
path
string requiredpattern^\/([_a-zA-Z0-9-&?=.]*)((\/[_a-zA-Z0-9-&?=.]+)*(\/)?)?$routingMode
string requiredMode of the path, determining how the URI will be interpreted.one ofprefixpriority
integer requiredmin0max100- {object}Route when the path is an exact match.
path
string requiredpattern^\/([_a-zA-Z0-9-&?=.]*)((\/[_a-zA-Z0-9-&?=.]+)*(\/)?)?$routingMode
string requiredMode of the path, determining how the URI will be interpreted.one ofexactpriority
integer requiredmin0max100- {object}Route when the path matches the provided regex.
path
string requiredroutingMode
string requiredMode of the path, determining how the URI will be interpreted.one ofregexpriority
integer requiredmin0max100accessMode
string requiredSpecify the way the path rule will behave when processing policies. This enables an allow-list/deny-list approach for access control on each pathone ofprotected, unprotectedsecurityPolicies
{object}orPolicies
{object}credentials
[array]An array of credentials to access the service.- {object}
username
string requiredThe username to access the servicemin length3max length39pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$password
string requiredThe password to access the service with this username.type
string requiredThe type of authentication usedone ofbasic-authip
[array]An array of IP address policies.- {object}
addresses
[array] requiredAn array of IP addresses used for this rule- stringAn IP address used by this rule
action
string requiredThe action for this rule.one ofALLOW, DENYpolicies
[array]An array of IP address policies.- {object}
addresses
[array] requiredAn array of IP addresses used for this rule- stringAn IP address used by this rule
action
string requiredThe action for this rule.one ofALLOW, DENYsso
{object}Configure port authentication via SSOorganizationId
stringID of the SSO organization that the user will have to be a member ofdirectoryGroupIds
[array]Array of directory groups that will have access- string
validateInternalTraffic
booleanEnforce internal traffic through SSO authentication flowsetCookieOnRootDomain
booleanSet SSO authentication cookie on root domainallowInternalTrafficViaPublicDns
booleanAllow internal traffic from same or shared projects via public DNS to skip SSO authentication flowheaders
[array]List of header authentication settings, it checks the presence of all headers and compares it against the expected value. Wildcard (*) is supported.- (multiple options: anyOf)
- {object}Matches provided headers as strings.
regexMode
booleanname
string requiredpattern^[a-zA-Z0-9_\-%$+]+$value
string required- {object}Matches provided headers as regex.
regexMode
booleanname
string requiredvalue
string requiredrequiredPolicies
{object}credentials
[array]An array of credentials to access the service.- {object}
username
string requiredThe username to access the servicemin length3max length39pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$password
string requiredThe password to access the service with this username.type
string requiredThe type of authentication usedone ofbasic-authip
[array]An array of IP address policies.- {object}
addresses
[array] requiredAn array of IP addresses used for this rule- stringAn IP address used by this rule
action
string requiredThe action for this rule.one ofALLOW, DENYpolicies
[array]An array of IP address policies.- {object}
addresses
[array] requiredAn array of IP addresses used for this rule- stringAn IP address used by this rule
action
string requiredThe action for this rule.one ofALLOW, DENYsso
{object}Configure port authentication via SSOorganizationId
stringID of the SSO organization that the user will have to be a member ofdirectoryGroupIds
[array]Array of directory groups that will have access- string
validateInternalTraffic
booleanEnforce internal traffic through SSO authentication flowsetCookieOnRootDomain
booleanSet SSO authentication cookie on root domainallowInternalTrafficViaPublicDns
booleanAllow internal traffic from same or shared projects via public DNS to skip SSO authentication flowheaders
[array]List of header authentication settings, it checks the presence of all headers and compares it against the expected value. Wildcard (*) is supported.- (multiple options: anyOf)
- {object}Matches provided headers as strings.
regexMode
booleanname
string requiredpattern^[a-zA-Z0-9_\-%$+]+$value
string required- {object}Matches provided headers as regex.
regexMode
booleanname
string requiredvalue
string requireddomains
[array]An array of domains to redirect to this port. Each domain must first be verified and registered to your account.- stringA domain to redirect to this port.
disableNfDomain
booleanDisable routing on the default code.run domain for public HTTP ports with custom domains.protocol
string requiredThe protocol to use for the port.one ofHTTP, HTTP/2, TCP, UDPruntimeEnvironment
{object}An object containing the runtime environment to set for the serviceruntimeFiles
{object}Secret files as JSON object, encrypted at rest. File path must be absolutehealthChecks
[array]An array of health checks.- {object}A health check object.
protocol
string requiredThe protocol to access the health check with.one ofHTTP, CMD, TCPtype
string requiredThe type of health check.one oflivenessProbe, readinessProbe, startupProbepath
stringThe path of the health check endpoint. Required when protocol is HTTP.pattern^\/([a-zA-Z0-9-._]+\/)*[a-zA-Z0-9-._]+$cmd
stringThe command to run for the health check. Required when protocol is CMDport
integerPort number for the health check endpoint. Required when protocol is HTTP.min1initialDelaySeconds
integer requiredInitial delay, in seconds, before the health check is first run.min1max180periodSeconds
integer requiredThe time between each check, in seconds.min10max600timeoutSeconds
integer requiredThe time to wait for a response before marking the health check as a failure.min1max60failureThreshold
integer requiredThe maximum number of allowed failures.min1max255successThreshold
integerThe number of successes required to mark the health check as a success.min1max255autoscaling
{object}Describes all autoscaling configurationshorizontal
{object}Describes the horizontal autoscaling configurationenabled
boolean requiredWhether horizontal autoscaling should be enabledminReplicas
number requiredMinimum number of replicas which should be running at any timemin1maxReplicas
number requiredMaximum number of replicas which can be running at any timecpu
{object}enabled
boolean requiredWhether autoscaling should take into account cpu usagethresholdPercentage
integer requiredThreshold CPU usage percentage at which the workload will be scaledmin10max100memory
{object}enabled
boolean requiredWhether autoscaling should take into account memory usagethresholdPercentage
integer requiredThreshold memory usage percentage at which the workload will be scaledmin10max100rps
{object}enabled
boolean requiredWhether autoscaling should take into requests-per-secondthresholdValue
integer requiredThreshold rps value on which the workload will be scaledmin1
OR
OR
OR
OR
OR
OR
OR
OR
Response body
- {object}Response object.
data
{object} requiredResult data.name
string requiredThe name of the service.min length3max length54pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$description
stringA description of the service.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$billing
{object} requireddeploymentPlan
string requiredThe ID of the deployment plan to use.pattern^[A-Za-z0-9-]+$gpu
{object}enabled
booleanconfiguration
{object}gpuType
string requiredtimesliced
booleanports
[array]- {object}
name
string requiredThe name used to identify the port.min length1max length8pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$internalPort
integer requiredThe port number.min1max65535public
booleanIf true, the port will be exposed publicly.security
{object}credentials
[array]An array of credentials to access the service.- {object}
username
string requiredThe username to access the servicemin length3max length39pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$password
string requiredThe password to access the service with this username.type
string requiredThe type of authentication usedone ofbasic-authip
[array]An array of IP address policies.- {object}
addresses
[array] requiredAn array of IP addresses used for this rule- stringAn IP address used by this rule
action
string requiredThe action for this rule.one ofALLOW, DENYpolicies
[array]An array of IP address policies.- {object}
addresses
[array] requiredAn array of IP addresses used for this rule- stringAn IP address used by this rule
action
string requiredThe action for this rule.one ofALLOW, DENYsso
{object}Configure port authentication via SSOorganizationId
stringID of the SSO organization that the user will have to be a member ofdirectoryGroupIds
[array]Array of directory groups that will have access- string
validateInternalTraffic
booleanEnforce internal traffic through SSO authentication flowsetCookieOnRootDomain
booleanSet SSO authentication cookie on root domainallowInternalTrafficViaPublicDns
booleanAllow internal traffic from same or shared projects via public DNS to skip SSO authentication flowheaders
[array]List of header authentication settings, it checks the presence of all headers and compares it against the expected value. Wildcard (*) is supported.- (multiple options: anyOf)
- {object}Matches provided headers as strings.
regexMode
booleanname
string requiredpattern^[a-zA-Z0-9_\-%$+]+$value
string required- {object}Matches provided headers as regex.
regexMode
booleanname
string requiredvalue
string requiredverificationMode
stringMode used to verify multiple security features like ip policies and SSO authenticationone ofor, andsecurePathConfiguration
{object}enabled
booleanEnable security policies on a path-level styleskipSecurityPoliciesForInternalTrafficViaPublicDns
booleanAllow internal traffic from same or shared projects via public DNS to skip all security policiesrules
[array]- {object}
paths
[array] requiredArray of path objects which represent the paths and their priority for which the security policies will be enforced- (multiple options: oneOf)Data about how the path should be handled.
- {object}Route when the path starts with the provided prefix.
path
string requiredpattern^\/([_a-zA-Z0-9-&?=.]*)((\/[_a-zA-Z0-9-&?=.]+)*(\/)?)?$routingMode
string requiredMode of the path, determining how the URI will be interpreted.one ofprefixpriority
integer requiredmin0max100- {object}Route when the path is an exact match.
path
string requiredpattern^\/([_a-zA-Z0-9-&?=.]*)((\/[_a-zA-Z0-9-&?=.]+)*(\/)?)?$routingMode
string requiredMode of the path, determining how the URI will be interpreted.one ofexactpriority
integer requiredmin0max100- {object}Route when the path matches the provided regex.
path
string requiredroutingMode
string requiredMode of the path, determining how the URI will be interpreted.one ofregexpriority
integer requiredmin0max100accessMode
string requiredSpecify the way the path rule will behave when processing policies. This enables an allow-list/deny-list approach for access control on each pathone ofprotected, unprotectedsecurityPolicies
{object}orPolicies
{object}credentials
[array]An array of credentials to access the service.- {object}
username
string requiredThe username to access the servicemin length3max length39pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$password
string requiredThe password to access the service with this username.type
string requiredThe type of authentication usedone ofbasic-authip
[array]An array of IP address policies.- {object}
addresses
[array] requiredAn array of IP addresses used for this rule- stringAn IP address used by this rule
action
string requiredThe action for this rule.one ofALLOW, DENYpolicies
[array]An array of IP address policies.- {object}
addresses
[array] requiredAn array of IP addresses used for this rule- stringAn IP address used by this rule
action
string requiredThe action for this rule.one ofALLOW, DENYsso
{object}Configure port authentication via SSOorganizationId
stringID of the SSO organization that the user will have to be a member ofdirectoryGroupIds
[array]Array of directory groups that will have access- string
validateInternalTraffic
booleanEnforce internal traffic through SSO authentication flowsetCookieOnRootDomain
booleanSet SSO authentication cookie on root domainallowInternalTrafficViaPublicDns
booleanAllow internal traffic from same or shared projects via public DNS to skip SSO authentication flowheaders
[array]List of header authentication settings, it checks the presence of all headers and compares it against the expected value. Wildcard (*) is supported.- (multiple options: anyOf)
- {object}Matches provided headers as strings.
regexMode
booleanname
string requiredpattern^[a-zA-Z0-9_\-%$+]+$value
string required- {object}Matches provided headers as regex.
regexMode
booleanname
string requiredvalue
string requiredrequiredPolicies
{object}credentials
[array]An array of credentials to access the service.- {object}
username
string requiredThe username to access the servicemin length3max length39pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$password
string requiredThe password to access the service with this username.type
string requiredThe type of authentication usedone ofbasic-authip
[array]An array of IP address policies.- {object}
addresses
[array] requiredAn array of IP addresses used for this rule- stringAn IP address used by this rule
action
string requiredThe action for this rule.one ofALLOW, DENYpolicies
[array]An array of IP address policies.- {object}
addresses
[array] requiredAn array of IP addresses used for this rule- stringAn IP address used by this rule
action
string requiredThe action for this rule.one ofALLOW, DENYsso
{object}Configure port authentication via SSOorganizationId
stringID of the SSO organization that the user will have to be a member ofdirectoryGroupIds
[array]Array of directory groups that will have access- string
validateInternalTraffic
booleanEnforce internal traffic through SSO authentication flowsetCookieOnRootDomain
booleanSet SSO authentication cookie on root domainallowInternalTrafficViaPublicDns
booleanAllow internal traffic from same or shared projects via public DNS to skip SSO authentication flowheaders
[array]List of header authentication settings, it checks the presence of all headers and compares it against the expected value. Wildcard (*) is supported.- (multiple options: anyOf)
- {object}Matches provided headers as strings.
regexMode
booleanname
string requiredpattern^[a-zA-Z0-9_\-%$+]+$value
string required- {object}Matches provided headers as regex.
regexMode
booleanname
string requiredvalue
string requireddomains
[array]An array of domains to redirect to this port. Each domain must first be verified and registered to your account.- stringA domain to redirect to this port.
disableNfDomain
booleanDisable routing on the default code.run domain for public HTTP ports with custom domains.protocol
(multiple options: oneOf) requiredThe protocol to use for the port.- stringone ofHTTP, HTTP/2
- stringone ofHTTP, HTTP/2, TCP, UDP
runtimeEnvironment
{object}An object containing the runtime environment to set for the serviceruntimeFiles
{object}Secret files as JSON object, encrypted at rest. File path must be absolutehealthChecks
[array]An array of health checks.- {object}A health check object.
protocol
string requiredThe protocol to access the health check with.one ofHTTP, CMD, TCPtype
string requiredThe type of health check.one oflivenessProbe, readinessProbe, startupProbepath
stringThe path of the health check endpoint. Required when protocol is HTTP.pattern^\/([a-zA-Z0-9-._]+\/)*[a-zA-Z0-9-._]+$cmd
stringThe command to run for the health check. Required when protocol is CMDport
integerPort number for the health check endpoint. Required when protocol is HTTP.min1initialDelaySeconds
integer requiredInitial delay, in seconds, before the health check is first run.min1max180periodSeconds
integer requiredThe time between each check, in seconds.min10max600timeoutSeconds
integer requiredThe time to wait for a response before marking the health check as a failure.min1max60failureThreshold
integer requiredThe maximum number of allowed failures.min1max255successThreshold
integerThe number of successes required to mark the health check as a success.min1max255autoscaling
{object}Describes all autoscaling configurationshorizontal
{object}Describes the horizontal autoscaling configurationenabled
boolean requiredWhether horizontal autoscaling should be enabledminReplicas
number requiredMinimum number of replicas which should be running at any timemin1maxReplicas
number requiredMaximum number of replicas which can be running at any timecpu
{object}enabled
boolean requiredWhether autoscaling should take into account cpu usagethresholdPercentage
integer requiredThreshold CPU usage percentage at which the workload will be scaledmin10max100memory
{object}enabled
boolean requiredWhether autoscaling should take into account memory usagethresholdPercentage
integer requiredThreshold memory usage percentage at which the workload will be scaledmin10max100rps
{object}enabled
boolean requiredWhether autoscaling should take into requests-per-secondthresholdValue
integer requiredThreshold rps value on which the workload will be scaledmin1deploymentSysctlSettings
{object}vm.max_map_count
integermin1max1048576serviceType
string requiredType of the service (combined, build or deployment)one ofdeploymentdeployment
{object} requiredinstances
integer requiredThe number of instances to run the service on.buildpack
{object}Allows for customization of buildpack runtimeconfigType
string requiredType of buildpack run configurationone ofdefault, customProcess, customCommand, customEntrypointCustomCommand, originalEntrypointCustomCommandcustomProcess
stringCustom process which should be run. Required in case where `configType` is `customProcess`customEntrypoint
stringCustom entrypoint which should be run. Required in case where `configType` is `customEntrypointCustomCommand`customCommand
stringCustom command which should be run. Required in case where `configType` is `customCommand`, `customEntrypointCustomCommand` or `originalEntrypointCustomCommand`docker
{object}Allows for customization of docker runtimeconfigType
string requiredType of entrypoint & command override configurationone ofdefault, customEntrypoint, customCommand, customEntrypointCustomCommandcustomEntrypoint
stringCustom entrypoint which should be used. Required in case where `configType` is `customEntrypoint` or `customEntrypointCustomCommand`customCommand
stringCustom command which should be used. Required in case where `configType` is `customCommand` or `customEntrypointCustomCommand`storage
{object}ephemeralStorage
{object}storageSize
integerEphemeral storage per container in MBone of1024, 2048, 5120, 10240, 20480, 30720, 40960, 51200, 61440, 81920, 102400, 122880, 153600, 204800min1024max204800shmSize
integerConfigures the amount of available memory-backed disk space available to /dev/shmone of64, 128, 256, 512, 1024, 2048, 5120, 10240min64max10240strategy
{object}Roll out strategy of the servicetype
stringConfigures the instance roll out strategy of your service. Currently only available via feature flag.one ofrecreate, rollout-steady, rollout-balanced, rollout-fastzonalRedundancy
{object}type
stringDefines scheduling behaviour across different zones within the same region.one ofdisabled, preferred, requiredminZones
integerDefines how many zones are required and will prevent containers from additional scheduling into existing zones. (Only relevant if type is set to "required")min1gpu
{object}enabled
booleanconfiguration
{object}gpuType
string requiredtimesliced
booleangracePeriodSeconds
integerThe maximum amount of time the process has to shut down after receiving a SIGTERM signal before it is forcefully shut down SIGKILL by the system.min15max600metadata
{object}Allow setting custom labels and annotations for workloads.labels
{object}Specify custom labels for the workload.annotations
{object}Specify custom annotations for the workload as string or object.internal
{object}id
stringID of the build service to deploymin length3max length54pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$branch
stringBranch to deploybuildSHA
(multiple options: oneOf)Commit SHA to deploy, or 'latest' to deploy the most recent commit- stringA commit sha.min length40max length40
- stringLatest commit.one oflatest
buildId
stringID of the build that should be deployedexternal
{object}imagePath
string requiredImage to be deployed. When not deploying from Dockerhub the URL must be specified.pattern^(?:(?:https?:\/\/)?([a-zA-Z0-9\-]+\.[a-zA-Z0-9\.\-]+)(\/v1)?)?(?:\/)?([a-zA-Z/-9\.\-_]+)(?:\:([a-zA-Z/-9\.\-_\:]+)|\@([a-zA-Z/-9\.\-_\:]+))$credentials
stringID of the saved credentials to use to access this external image.pattern^[A-Za-z0-9-]+$imageUrl
stringImage registry url of the deployed image.id
string requiredIdentifier for the serviceappId
string requiredFull identifier used for service deploymentcluster
{object} requiredCluster informationid
string requiredThe id of the cluster associated with this project.name
string requiredThe name of the cluster associated with this project.namespace
stringNamespace this resource is located within on the cluster.loadBalancers
[array]Load balancer DNS for the cluster.- string
createdAt
stringtime of creationupdatedAt
stringtime of updatestatus
{object} requiredDetails about the current service status.deployment
{object} requiredDetails about the current deployment status.status
string requiredThe current status of the deployment.one ofPENDING, IN_PROGRESS, COMPLETED, FAILEDreason
string requiredThe reason the current deployment was started.one ofSCALING, DEPLOYINGlastTransitionTime
stringThe timestamp of when the deployment reached this status.
OR
OR
OR
OR
OR
OR
OR
PUT /v1/projects/{projectId}/services/deployment
Example request
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request PUT \
--data '{"name":"Example Service","description":"A service description","tags":["my-tag"],"billing":{"deploymentPlan":"nf-compute-20"},"deployment":{"instances":1,"docker":{"configType":"default"},"storage":{"ephemeralStorage":{"storageSize":1024}},"internal":{"id":"example-build-service","branch":"master","buildId":"premium-guide-6393"}},"ports":[{"name":"p01","internalPort":8080,"public":true,"security":{"credentials":[{"username":"admin","password":"password123","type":"basic-auth"}],"ip":[{"addresses":["127.0.0.1"],"action":"DENY"}],"policies":[{"addresses":["127.0.0.1"],"action":"DENY"}],"headers":[{"regexMode":false}],"securePathConfiguration":{"rules":[{"paths":[{"routingMode":"prefix"}],"securityPolicies":{"orPolicies":{"credentials":[{"username":"admin","password":"password123","type":"basic-auth"}],"ip":[{"addresses":["127.0.0.1"],"action":"DENY"}],"policies":[{"addresses":["127.0.0.1"],"action":"DENY"}],"headers":[{"regexMode":false}]},"requiredPolicies":{"credentials":[{"username":"admin","password":"password123","type":"basic-auth"}],"ip":[{"addresses":["127.0.0.1"],"action":"DENY"}],"policies":[{"addresses":["127.0.0.1"],"action":"DENY"}],"headers":[{"regexMode":false}]}}}]}},"domains":["app.example.com"],"protocol":"HTTP"}],"runtimeEnvironment":{"VARIABLE_1":"abcdef","VARIABLE_2":"12345"},"runtimeFiles":{"/dir/fileName":{"data":"VGhpcyBpcyBhbiBleGFtcGxlIHdpdGggYSB0ZW1wbGF0ZWQgJHtOT0RFX0VOVn0gdmFyaWFibGU=","encoding":"utf-8"}},"healthChecks":[{"protocol":"HTTP","type":"readinessProbe","path":"/health-check","port":8080,"initialDelaySeconds":10,"periodSeconds":60,"timeoutSeconds":1,"failureThreshold":3,"successThreshold":1}]}' \
https://api.northflank.com/v1/projects/{projectId}/services/deployment
Example response
200 OK
JSON
{
"data": {
"name": "Example Service",
"description": "A service description",
"tags": [
"my-tag"
],
"billing": {
"deploymentPlan": "nf-compute-20"
},
"ports": [
{
"name": "p01",
"internalPort": 8080,
"public": true,
"security": {
"credentials": [
{
"username": "admin",
"password": "password123",
"type": "basic-auth"
}
],
"ip": [
{
"addresses": [
"127.0.0.1"
],
"action": "DENY"
}
],
"policies": [
{
"addresses": [
"127.0.0.1"
],
"action": "DENY"
}
],
"headers": [
{
"regexMode": false
}
],
"securePathConfiguration": {
"rules": [
{
"paths": [
{
"routingMode": "prefix"
}
],
"securityPolicies": {
"orPolicies": {
"credentials": [
{
"username": "admin",
"password": "password123",
"type": "basic-auth"
}
],
"ip": [
{
"addresses": [
"127.0.0.1"
],
"action": "DENY"
}
],
"policies": [
{
"addresses": [
"127.0.0.1"
],
"action": "DENY"
}
],
"headers": [
{
"regexMode": false
}
]
},
"requiredPolicies": {
"credentials": [
{
"username": "admin",
"password": "password123",
"type": "basic-auth"
}
],
"ip": [
{
"addresses": [
"127.0.0.1"
],
"action": "DENY"
}
],
"policies": [
{
"addresses": [
"127.0.0.1"
],
"action": "DENY"
}
],
"headers": [
{
"regexMode": false
}
]
}
}
}
]
}
},
"domains": [
"app.example.com"
]
}
],
"runtimeEnvironment": {
"VARIABLE_1": "abcdef",
"VARIABLE_2": "12345"
},
"runtimeFiles": {
"/dir/fileName": {
"data": "VGhpcyBpcyBhbiBleGFtcGxlIHdpdGggYSB0ZW1wbGF0ZWQgJHtOT0RFX0VOVn0gdmFyaWFibGU=",
"encoding": "utf-8"
}
},
"healthChecks": [
{
"protocol": "HTTP",
"type": "readinessProbe",
"path": "/health-check",
"port": 8080,
"initialDelaySeconds": 10,
"periodSeconds": 60,
"timeoutSeconds": 1,
"failureThreshold": 3,
"successThreshold": 1
}
],
"serviceType": "deployment",
"deployment": {
"instances": 1,
"docker": {
"configType": "default"
},
"storage": {
"ephemeralStorage": {
"storageSize": 1024
}
},
"internal": {
"id": "example-build-service",
"branch": "master",
"buildId": "premium-guide-6393"
},
"external": {
"imagePath": "nginx:latest",
"credentials": "example-credentials"
}
},
"id": "example-service",
"appId": "/example-user/default-project/example-service",
"cluster": {
"id": "nf-europe-west",
"name": "nf-europe-west",
"namespace": "ns-8zy2mcjh9zn2",
"loadBalancers": [
"lb.659200800000000000000000.northflank.com"
]
},
"status": {
"deployment": {
"status": "COMPLETED",
"reason": "DEPLOYING",
"lastTransitionTime": "2021-11-29T11:47:16.624Z"
}
}
}
}