Create an Origin Server Pool

post

/rest/vlbrs/{compute_region}/{virtual_load_balancer_resource_id}/originserverpools

When you create a load balancer with Oracle Cloud Infrastructure Load Balancing Classic, you must define one or more servers (referred to as origin servers) to which the load balancer can distribute requests.

Request

Supported Media Types
Path Parameters
Body ()
Root Schema : schema
Type: string
Back to Top

Response

Supported Media Types

200 Response

Success

202 Response

Creation in progress

400 Response

Validation failed

500 Response

Failed. Internal server error.
Back to Top

Examples

cURL Command

The following example shows how to create an origin server pool by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL.

Enter the command on a single line. Line breaks are used in this example for readability.

curl -i -X POST
     -H "Content-Type: application/vnd.com.oracle.oracloud.lbaas.OriginServerPool+json"
     -H "Authorization: Basic d2VibG9naWM6V2VsY29tZTE="
     -d "@requestbody.json"
        "https://serviceId1.balancer.uscom.oraclecloud.com/vlbrs/us1/vlbr1/originserverpools"

serviceId1.balancer.uscom.oraclecloud.com is an example REST endpoint URL. Change this value to the REST endpoint URL of your Oracle Cloud Infrastructure Load Balancing Classic site. For information about finding out REST endpoint URL for your site, see Send Requests.

Example of Request Body

The following shows an example of the request body content in the requestbody.json file.

{
	"status":"ENABLED",
	"tags":[
		"ospooltag1",
		"ospooltag2"
	],
	"origin_servers":[
		{
			"status":"ENABLED",
			"hostname":"example.com",
			"port":3691
		}
	],
	"name":"originserverpool1"
}

Example of Response Body

The following example shows the response body in JSON format.

{
	"name":"originserverpool1",
	"uri":"https://serviceId1.balancer.uscom.oraclecloud.com/vlbrs/us1/vlbr1/originserverpools/originserverpool1",
	"origin_servers":[
		{
			"hostname":"example.com",
			"status":"ENABLED","port":3691
		}
	],
	"status":"ENABLED",
	"tags":[
		"ospooltag1",
		"ospooltag2"
	],
		"state":"HEALTHY"
}

Use the uri provided in the response body to access the resource and check its status.

Back to Top