Scale In a Service Instance
/paas/api/v1.1/instancemgmt/{identityDomainId}/services/jaas/instances/{serviceId}/servers
- Remove one node in the WLS application cluster
- Remove the secondary OTD node (if Oracle Traffic Director is provisioned as a user-managed load balancer)
- Remove one node in the WLS caching (data grid) cluster
When you are scaling in a service instance that uses IP reservations (application cluster nodes only), the IP reservation associated with the removed node is released but not deleted.
You cannot scale in a service instance if the instance is provisioned at the Virtual Image (BASIC
) service level.
On Oracle Cloud Infrastructure Classic and Oracle Cloud at Customer: A service instance cannot be scaled in if a snapshot of the instance has been taken.
On Oracle Cloud Infrastructure and Oracle Cloud Infrastructure Classic: Many of the administration and lifecycle operations that you run for an Oracle Java Cloud Service instance affect the billing for the infrastructure resources that are used by the instance. See Effect of Lifecycle and Administration Operations on Billing.
Request
- application/json
-
identityDomainId: string
Identity domain ID for the Oracle Java Cloud Service account.
-
serviceId: string
Name of the Oracle Java Cloud Service instance.
-
Authorization: string
Base64 encoded user name and password separated by a colon or OAuth access token obtained from Oracle Identity Cloud Service. See Authenticate.
-
X-ID-TENANT-NAME: string
Identity domain ID for the Oracle Java Cloud Service account.
object
-
components:
object components
Groups properties for the Oracle WebLogic Server component (
WLS
) or the Oracle Traffice Director (OTD
) component. Only one component type can be scaled at a time. -
force(optional):
boolean
Flag that specifies whether to force removal even when there is a problem that might prevent scaling in.
object
WLS
) or the Oracle Traffice Director (OTD
) component. Only one component type can be scaled at a time.-
OTD(optional):
object OTD
Properties for the Oracle Traffic Director (OTD) component.
-
WLS(optional):
object WLS
Properties for the Oracle WebLogic Server (WLS) component.
object
-
hosts:
array hosts
Name of the host that contains the secondary OTD node. You cannot remove the primary node host.
object
-
hosts:
array hosts
A single host name.
If supported in your account, a list of host names separated by commas can be specified.
When scaling in the caching (data grid) cluster: All data grid nodes can be removed, however know that all data in the cache will be lost, and the empty caching cluster is not removed.
array
array
If supported in your account, a list of host names separated by commas can be specified.
When scaling in the caching (data grid) cluster: All data grid nodes can be removed, however know that all data in the cache will be lost, and the empty caching cluster is not removed.
Response
- application/json
202 Response
Location
header returns a URI that can be used to view the job status. See View the Status of an Operation by Job Id.object
issues
array for warning messages.-
details:
object details
Groups details of the operation.
object
-
issues(optional):
array issues
Groups strings of warning messages, if any.
-
jobId:
string
Job ID for the operation. Not available if the response status code is 400.
-
message:
string
System message that describes the operation.
400 Response
See Status Codes for information about other possible HTTP status codes.
object
issues
array for validation error messages.-
details(optional):
object details
Groups details of the request.
object
-
issues(optional):
array issues
Groups strings of validation error messages, if any.
-
message(optional):
string
System message that describes the request.
Examples
The following example shows how to scale in an Oracle Java Cloud Service instance by submitting a PUT request on the REST resource using cURL.
Note: The command in this example uses the URL structure https://rest_server_url/resource-path
, where rest_server_url
is the REST server to contact for your identity domain (or Cloud Account). See Send Requests.
cURL Command
curl -i -X PUT -u username:password -d @scalein.json -H "Content-Type:application/json" -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance/servers
Example of Request Body
The following shows an example of the request body for removing a host from the WLS component.
{
"components": {
"WLS": {
"hosts": ["exampleinstance-wls-2"]
}
},
"force": true
}
The following shows an example of the request body for removing the secondary node from the OTD component.
{
"components": {
"OTD": {
"hosts": ["exampleinstance-lb-2"]
}
},
"force": true
}
Example of Response Header
The following shows an example of the response header. The Location
header returns the URI that can be used to view the job status. See View the Status of an Operation by Job Id.
HTTP/1.1 202 Accepted
Date: Sat, 24 Jun 2017 18:04:20 GMT
Transfer-Encoding: chunked
Location: https://rest_server_url/paas/api/v1.1/activitylog/ExampleIdentityDomain/job/171220
Content-Type: application/vnd.com.oracle.oracloud.provisioning.Service+json
Service-URI: https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance
Retry-After: 60
Example of Response Body
The following shows an example of a 202 response returned in JSON format.
{
"details":
{
"message":"Submitted job to scale in service [ExampleInstance] in domain [ExampleIdentityDomain].",
"jobId":"171220"
}
}
The following shows an example of a 400 response.
{
"details": {
"message": "PSM-LCM-00012 The node [example2instance-wls-2] doesn't exist in component [WLS] for service [ExampleInstance]. You can only specify host names that are provisioned using the component parameter hosts."
}
}