resources.configureNetwork
POST
/resources/{resourceId}/network-profile
const url = 'https://example.com/api/resources/example/network-profile';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"networkProfile":{"internalPort":1,"upstreamProtocol":"http","exposureMode":"none","targetServiceName":"example","hostPort":1}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/resources/example/network-profile \ --header 'Content-Type: application/json' \ --data '{ "networkProfile": { "internalPort": 1, "upstreamProtocol": "http", "exposureMode": "none", "targetServiceName": "example", "hostPort": 1 } }'Configures ports, protocols, and exposure behavior for resource access. Public docs: /docs/resources/profiles/health-network/#resource-network-profile
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” resourceId
required
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
networkProfile
required
object
internalPort
required
integer
upstreamProtocol
string
exposureMode
string
targetServiceName
string
hostPort
integer
Responses
Section titled “ Responses ”OK
Media type application/json
object
id
required
string
Example generated
{ "id": "example"}