Applicationproperty
Last updated
Last updated
The ApplicationProperty is an element that adds meaning to the element. E.g. you can define that an application uses a certain network port, or requires a password or multiple ports, and a preset password, or have the system generate a unique password for each . These properties are necessary for the system to function properly.
ApplicationProperties can only be set for the Game.
propertyId
string
N/A
Yes
Unique identifier of the element
propertyType
int
Yes
No
Type ID of the property
propertyKey
string
Yes
No
The name of the property
propertyValue
mixed
Only for network port
No
The value of the property
Table 1: ApplicationProperty element structure
The characters allowed for a propertyKey are : a-z, A-Z, 0-9, _
A property key must start with a lowercase character.
The maximum length of a propertyKey is 50 characters.
Any UTF-8 character is allowed in a propertyValue.
The maximum length of a propertyValue is 150 characters.
ApplicationProperty elements consist of a propertyType
, a propertyKey
and a propertyValue
. The propertyType
indicates the functionality of the property. The propertyKey
gives the property a name and the value
a value. Not all property types require a value. E.g. if you have a property of propertyType
password16
, you can leave propertyValue
empty. This means we will generate a password, in this case with a length of 16 characters. If however you do enter a propertyValue
, then we take that as the password and the system will not generate a new random password. You can find all available property types and usages in the next chapter.
A propertyType is indicated by its numerical ID. The following types are available:
0
raw value
mixed
yes
A custom raw value. This property's key and value will be passed to ApplicationBuilds, ApplicationInstances and labels as-is.
1
public network port
0 or a number between 10240 - 29999 (inclusive)
yes
2
password8
string
no
An 8 character password. If no value provided, we generate a unique password for every ApplicationInstance.
3
password16
string
no
A 16 character password. If no value provided, we generate a unique password for every ApplicationInstance.
4
password24
string
no
A 24 character password. If no value provided, we generate a unique password for every ApplicationInstance.
5
public network port range
a number between 2 and 200
yes
A number indicating the size of the desired public port range.
6
private network port
0 or a number between 30000 - 49151
yes
7
private network port range
a number between 2 and 200
yes
A number indicating the size of the desired private port range.
Table 2: Property types
When the platform deploys a new ApplicationInstance and you have added an ApplicationProperty of type public network port
or private network port
(or multiple), it will find a unique network port to use, per host. Which port is selected depends on the following logic:
If you enter a value of 0 for the network port property, the platform will find a completely random port within the range of 10240 - 29999 (public range) or 30000 - 49151 (private range).
If you enter a value between 10240 - 29999 (public) or 30000 - 49151 (private), the platform will take that value as the starting point to find a free port. If the given value is a free network port, then that will be used. If the port is already occupied by another instance, it is incremented and checked for availability again. This increment continues until a free network ports has been found for your application instance to use.
Public network ports can be accessed from the internet and as such must be used for connections of players to your game server.
Just like with the single port property type, port ranges will be generated uniquely for each ApplicationInstance.
An ApplicationProperty's value can be overridden at later stages, in the listed order:
As such, an override on DeploymentRegion level always wins. If no override for a DeploymentRegion is present, an override of the ApplicationBuild will win. If no override for an ApplicationBuild is present, the original property value defined for the Application will win.
You can assign any number of ApplicationProperties to an Application. There is no limitation there. The only rule is that you must have unique propertyKey names per Application.
Indicates a default or random network port for your application to use. Please see the for more information.
Indicates a default or random network port for your application to use. Please see the for more information.
In the property value, you indicate the size of the desired port range by entering a number between 2 - 200 (inclusive). Our platform will then generate a port range for each ApplicationInstance and make it available via . The port range notation of the variable at that point will be e.g.: 10500-10520
.
All rules for also apply for private network ports. The only difference is that all ports generated for a private network port are not accessible from the internet and should only be used for internal services.
All rules for also apply for private network port ranges. The only difference is that all ports generated for a private network port range are not accessible from the internet and should only be used for internal services.
An Application's properties will be inherited by all elements belonging to said Application.
an ApplicationBuild will inherit an Application's properties. Its values can be overridden in the ApplicationBuild ()
a DeploymentRegion can override a property on a per-region basis. This can be useful if you want to define different property values for each deployment region, allowing you to start your applications with region-based startup parameters ()
Every property you define will become available as platform variables that can be used in configuration related properties: ApplicationBuild.startupParameters and ApplicationBuildConfiguration.configContents. Please see the topic for more details.
See also: