Addons /
Patch addon
Required permission
Project > Addons > General > Update
Path parameters
projectId
string requiredID of the project
addonId
string requiredID of the addon
Request body
- {object}
description
stringA description of the addon.
max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$billing
{object}deploymentPlan
stringThe ID of the deployment plan to use.
pattern^[A-Za-z0-9-]+$storageClass
stringThe type of storage. Only configurable if the relevant feature flag is enabled for you account
one ofssd, hddstorage
integerThe size of the addon storage, in megabytes.
min4096replicas
integerThe number of addon replicas to run.
zonalRedundancy
stringDefines scheduling behaviour across different zones within the same region.
one ofrequired, disabledtlsEnabled
booleanEnables access to the addon via TLS (if supported by the addon type).
externalAccessEnabled
booleanEnables external access to the addon via TLS (if supported by the addon type).
ipPolicies
[array]An array of IP address policies.
- {object}
addresses
[array] requiredAn array of IP addresses used for this rule
- string
An IP address used by this rule
action
string requiredThe action for this rule.
one ofALLOW, DENYtypeSpecificSettings
{object}redisMaxMemoryPolicy
stringRedis only: Key eviction policy at memory pressure.
one ofnoeviction, allkeys-lru, allkeys-lfu, volatile-lru, volatile-lfu, allkeys-random, volatile-random, volatile-ttlredisSentinelEnabled
booleanRedis only: Deploy Redis with Sentinel high availability. Default: false
postgresqlWalLevel
stringPostgreSQL only: Configure wal_level setting.
one ofreplica, logicalpostgresqlConnectionPoolerEnabled
booleanPostgreSQL only: Run connection pooler in front of postgres instance.
postgresqlConnectionPoolerReplicas
integerPostgreSQL only: Number of connection pooler instances in case connection pooler is enabled.
min1max3postgresqlReadConnectionPoolerEnabled
booleanPostgreSQL only: Run connection pooler in front of read-only postgres instance.
postgresqlReadConnectionPoolerReplicas
integerPostgreSQL only: Number of read-only connection pooler instances in case read-only connection pooler is enabled.
min1max3backupSchedules
[array]- {object}
scheduling
{object} requiredSchedule for the backup.
interval
string requiredThe interval between backups. Each addon can only have one backup schedule of each interval for each backup type.
one ofhourly, daily, weeklyminute
[array] requiredAn array of minutes when the backup should be performed.
- integer
A minute when the backup should be performed.
min0max59 hour
[array]An array of hours in 24 hour format when the backup should be performed. At these hours, a backup will be performed at each of the minutes provided in the
minute
field. Required fordaily
andweekly
intervals and unavailable forhourly
intervals.- integer
An hour when the backup should be performed, in 24 hour format.
min0max23 day
[array]An array of days of the week when the backup should be performed, where
0
represents Monday and6
represents Sunday. On these days, a backup will be performed at each of the minutes provided in theminute
field whenever it is an hour from thehour
field. Required forweekly
intervals and unavailable forhourly
anddaily
intervals.- integer
A day of the week when the backup should be performed, where
0
represents Monday and6
represents Sunday.min0max6 backupType
string requiredThe type of the backup to be performed.
one ofdump, snapshotcompressionType
stringThe compression algorithm of the backup. Only applicable for dump backups. Defaults to
gz
.one ofgz, zstdretentionTime
integer requiredThe time the backup is retained for, in days.
hourly
backups have a maximum retention of 7 days,daily
backups have a maximum retention of 60 days andweekly
backups have a maximum retention of 120 days.min1max120
Response body
- {object}
Response object.
data
{object} requiredResult data.
name
string requiredThe name of the addon.
min length3max length39pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$description
stringA description of the addon.
max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$type
string requiredThe identifier for the type of addon. Addon types can be found at the Get Addon Types endpoint.
version
string requiredThe version of the addon type to use. If set to
latest
, the addon will be created with the most recent addon version. If set to a major version appended with-latest
, e.g.14-latest
, the addon will be created with the most recent minor version belonging to that major version.billing
{object} requireddeploymentPlan
string requiredThe ID of the deployment plan to use.
pattern^[A-Za-z0-9-]+$storageClass
stringThe type of storage. Only configurable if the relevant feature flag is enabled for you account
one ofssd, hddstorage
integer requiredThe size of the addon storage, in megabytes.
min4096replicas
integer requiredThe number of addon replicas to run.
min1zonalRedundancy
stringDefines scheduling behaviour across different zones within the same region.
one ofrequired, disabledsource
{object}Optional object containing data about an existing addon to fork. If provided, the addon will be created from that existing addon backup.
addonId
string requiredID of the addon to fork.
pattern^[A-Za-z0-9-]+$backupId
string requiredID of a backup belonging to that addon to use for the fork.
pattern^[A-Za-z0-9-]+$tlsEnabled
booleanEnables access to the addon via TLS (if supported by the addon type).
externalAccessEnabled
booleanEnables external access to the addon via TLS (if supported by the addon type).
ipPolicies
[array]An array of IP address policies.
- {object}
addresses
[array] requiredAn array of IP addresses used for this rule
- string
An IP address used by this rule
action
string requiredThe action for this rule.
one ofALLOW, DENYpitrEnabled
booleanEnables point-in-time recovery (PITR) for the addon (if supported by the addon type).
typeSpecificSettings
{object}redisMaxMemoryPolicy
stringRedis only: Key eviction policy at memory pressure.
one ofnoeviction, allkeys-lru, allkeys-lfu, volatile-lru, volatile-lfu, allkeys-random, volatile-random, volatile-ttlredisSentinelEnabled
booleanRedis only: Deploy Redis with Sentinel high availability. Default: false
postgresqlWalLevel
stringPostgreSQL only: Configure wal_level setting.
one ofreplica, logicalpostgresqlConnectionPoolerEnabled
booleanPostgreSQL only: Run connection pooler in front of postgres instance.
postgresqlConnectionPoolerReplicas
integerPostgreSQL only: Number of connection pooler instances in case connection pooler is enabled.
min1max3postgresqlReadConnectionPoolerEnabled
booleanPostgreSQL only: Run connection pooler in front of read-only postgres instance.
postgresqlReadConnectionPoolerReplicas
integerPostgreSQL only: Number of read-only connection pooler instances in case read-only connection pooler is enabled.
min1max3customCredentials
{object}dbName
stringCustom database name. Not supported for all addon types.
backupSchedules
[array]- {object}
scheduling
{object} requiredSchedule for the backup.
interval
string requiredThe interval between backups. Each addon can only have one backup schedule of each interval for each backup type.
one ofhourly, daily, weeklyminute
[array] requiredAn array of minutes when the backup should be performed.
- integer
A minute when the backup should be performed.
min0max59 hour
[array]An array of hours in 24 hour format when the backup should be performed. At these hours, a backup will be performed at each of the minutes provided in the
minute
field. Required fordaily
andweekly
intervals and unavailable forhourly
intervals.- integer
An hour when the backup should be performed, in 24 hour format.
min0max23 day
[array]An array of days of the week when the backup should be performed, where
0
represents Monday and6
represents Sunday. On these days, a backup will be performed at each of the minutes provided in theminute
field whenever it is an hour from thehour
field. Required forweekly
intervals and unavailable forhourly
anddaily
intervals.- integer
A day of the week when the backup should be performed, where
0
represents Monday and6
represents Sunday.min0max6 backupType
string requiredThe type of the backup to be performed.
one ofdump, snapshotcompressionType
stringThe compression algorithm of the backup. Only applicable for dump backups. Defaults to
gz
.one ofgz, zstdretentionTime
integer requiredThe time the backup is retained for, in days.
hourly
backups have a maximum retention of 7 days,daily
backups have a maximum retention of 60 days andweekly
backups have a maximum retention of 120 days.min1max120id
string requiredIdentifier for the addon.
appId
string requiredFull identifier used for deployment
status
string requiredThe current state of the addon.
one ofpreDeployment, triggerAllocation, allocating, postDeployment, running, paused, scaling, upgrading, resetting, backup, restore, failed, deleting, deletedcluster
{object}id
requiredone ofaws-cluster-idname
requiredone ofAWS Cluster Namenamespace
one ofns-krbfnmxfv5x8-createdAt
stringtime of creation
updatedAt
stringtime of update
PATCH /v1/projects/{projectId}/addons/{addonId}
Example request
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request PATCH \
--data '{"description":"An addon description","tags":["my-tag"],"billing":{"deploymentPlan":"nf-compute-20","storageClass":"ssd","storage":4096,"replicas":1},"ipPolicies":[{"addresses":["127.0.0.1"],"action":"DENY"}],"backupSchedules":[{"scheduling":{"interval":"weekly","minute":[30],"hour":[18],"day":[4]},"backupType":"snapshot","compressionType":"gz","retentionTime":7}]}' \
https://api.northflank.com/v1/projects/{projectId}/addons/{addonId}
Example response
200 OK
JSON
{
"data": {
"name": "Example Addon",
"description": "An addon description",
"tags": [
"my-tag"
],
"type": "postgresql",
"version": "latest",
"billing": {
"deploymentPlan": "nf-compute-20",
"storageClass": "ssd",
"storage": 4096,
"replicas": 1
},
"source": {
"addonId": "existing-addon",
"backupId": "existing-backup"
},
"ipPolicies": [
{
"addresses": [
"127.0.0.1"
],
"action": "DENY"
}
],
"backupSchedules": [
{
"scheduling": {
"interval": "weekly",
"minute": [
30
],
"hour": [
18
],
"day": [
4
]
},
"backupType": "snapshot",
"compressionType": "gz",
"retentionTime": 7
}
],
"id": "example-addon",
"appId": "/example-user/default-project/example-addon",
"status": "running"
}
}