onPremConnection function creates a connection for components that need to communicate with resources behind a firewall or inside a private network. When an on-prem agent is configured, Prismatic overwrites the connection’s host and port values with the local tunnel endpoint established by the agent.
On-prem connections require required
host and port inputs with onPremControlled: true. These values are automatically overridden by the on-prem agent at runtime — do not use them as configurable user fields.Function signature
Parameters
An object describing the on-premises connection. See fields below.
OnPremConnectionDefinition fields
Unique programmatic identifier for this connection type.
Controls how this connection appears in the Prismatic UI.
The hostname or IP address of the on-premises resource. Must have
onPremControlled: true. When the on-prem agent is active, this value is overridden with the agent tunnel’s local endpoint.The port number of the on-premises resource. Must have
onPremControlled: true. When the on-prem agent is active, this value is overridden with the agent tunnel’s local port.Additional connection inputs (e.g., credentials, database name) beyond
host and port. These follow the standard ConnectionInput shape.OnPremConnectionInput type
OnPremConnectionInput extends ConnectionInput with one additional required field:
onPremControlled: true flag tells the Prismatic platform that this field’s value will be overridden by the on-prem agent when the connection is used in an on-prem context.
Return type
Returns the sameOnPremConnectionDefinition object passed in, after validation. Pass the returned value to the connections array in component.
Example
Related
connection— Define a standard connectionoauth2Connection— Define an OAuth 2.0 connectioncomponent— Register connections in a component- On-prem agent documentation
