Scale Application Instances
put
/paas/service/apaas/api/v1.1/apps/{identityDomainId}/{appName}/instances
Scales an application by changing the number of instances or the memory for each instance. Returns details about the instances.
Request
Supported Media Types
- application/json
Path Parameters
-
appName: string
Name of the application
-
identityDomainId: string
Name of the identity domain for the Oracle Application Container Cloud Service acount
Query Parameters
-
mode(optional): string
Restart mode for application instances. The only allowed option is
rolling
for a rolling restart. Omit this parameter for a concurrent restart.
The request body defines the details of the request.
Root Schema : schema
Type:
string
Response
Supported Media Types
- application/json
202 Response
Accepted
The response body contains information about all application instances.
Root Schema : viewInstances-response
Type:
object
The response body contains information about all application instances.
Show Source
-
applicationDetails(optional):
string
Information about the application
-
identityDomain(optional):
string
Identity Domain of the application
-
processes(optional):
array processes
Process details of an application
Nested Schema : processes
Type:
array
Process details of an application
Show Source
-
Array of:
object viewProcesses
The response body contains information about all application processes.
Nested Schema : viewProcesses
Type:
object
The response body contains information about all application processes.
Show Source
-
instances(optional):
object instances
Instances of the application process
-
processName(optional):
string
Name of the process
Nested Schema : viewInstance
Type:
Show Source
object
-
instanceURL(optional):
string
Instance URL. Use this url to get a description of the application instance.
-
memory(optional):
string
Memory of the instance
-
name(optional):
string
Instance Name. Use this name to manage a specific instance.
-
status(optional):
string
Status of the instance
Examples
The following example shows how to scale application instances and memory by submitting a PUT request on the REST resource using cURL. For more information about cURL, see Use cURL. For more information about endpoint URL structure, including how to determine your region, see Send Requests.
curl -i -X PUT -u joe@example.com:Welcome1! -H "X-ID-TENANT-NAME:ExampleIdentityDomain" \ -H "Content-Type:application/json" -d @scale.json \ https://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain/ExampleAppName/instances
Example of Request Body
The following example shows the contents of the request body in JSON format. This is the contents of the scale.json file listed in the cURL command.
{ "memory": "2G", "instances": 2 }
Example of Response Header
The following shows an example of the response header.
Date:Thu,16Apr201508:43:38GMT Location:https://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain/ExampleAppName/opStatus/157 Retry-After:5 Service-URI:https://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain/ExampleAppName Transfer-Encoding:chunked X-Frame-Options:DENY X-Powered-By:Servlet/2.5JSP/2.1
Example of Response Body
The following example shows the contents of the response body in JSON format.
{ "processes": [ { "processName": "web", "instances": [ { "name": "web.1", "status": "RUNNING", "instanceURI": "https://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain/ExampleAppName/instances/web.1" } ] } ], "identityDomain": "ExampleIdentityDomain", "applicationDetails": "ExampleAppName" }