Delete a Service Instance
/paas/api/v1.1/instancemgmt/{identityDomainId}/services/jaas/instances/{serviceId}
If the service instance uses IP reservations on WebLogic Managed Server nodes (and user-managed load balancer nodes, if OTD is configured), those IP reservations are released and returned to the pool of pre-allocated IP reservations with the status of UNUSED. Released IP reservations are not deleted when the service instance is deleted.
The delete (terminate) operation removes all service instance backups except the final backup (if there is one). This means it is a good practice to preserve one or more full backups before you delete a service instance.
On Oracle Cloud Infrastructure Classic and Oracle Cloud at Customer: You cannot delete a service instance as long as the instance is associated with one or more cloned instances that were created from a snapshot.
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
-
dbaName:
string
User name for the database administrator.
-
dbaPassword:
string
The database administrator password that was specified when the infrastructure schema database was created.
-
force(optional):
boolean
Flag that specifies whether you want to force the removal of the service instance even if the database instance cannot be reached to delete the database schemas. If set to
true
, you may need to delete the associated database schemas manually on the database instance if they are not deleted as part of the service instance delete operation. The default value isfalse
.Note that
force
replacesforceDelete
, which is deprecated. -
skipBackupOnTerminate(optional):
boolean
Flag that specifies whether you want to back up the service instance or skip backing up the instance before deleting it. The default value is
true
(that is, skip backing up).
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 delete 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 @deleteservice.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
Example of Request Body
The following shows an example of the request body in JSON format.
{
"dbaName": "mydbausername",
"dbaPassword": "Mypassword2!",
"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
Location: https://rest_server_url/paas/api/v1.1/activitylog/ExampleIdentityDomain/job/5028794
Content-Language: en
Service-URI: https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance
Content-Type: application/vnd.com.oracle.oracloud.provisioning.Service+json
Date: Mon, 17 Apr 2017 22:46:03 GMT
Example of Response Body
The following shows an example of the response document returned in JSON format.
{
"details":
{
"message":"Submitted job to delete service [ExampleInstance] in domain [ExampleIdentityDomain].",
"jobId":"5028794"
}
}