Create a Snapshot
/paas/api/v1.1/instancemgmt/{identityDomainId}/services/jaas/instances/{serviceId}/snapshots
After creating a snapshot, use the endpoint for creating a service instance (described in Create a Service Instance) to create the service instance clone using the snapshot. See About Snapshots and Clones in Administering Oracle Java Cloud Service.
Note that the cloning feature is not supported for the following:
- Service instances that use an Oracle Autonomous Transaction Processing database or Oracle Cloud Infrastructure Database for the infrastructure schema.
- Service instances that were provisioned with Oracle Identity Cloud Service enabled.
(Oracle Cloud Infrastructure Classic and Oracle Cloud at Customer) Additional notes about snapshots and the associated clones and source service instances:
- You cannot take a snapshot of a service instance clone. In other words, you cannot create a snapshot of a service instance that is a clone created from another snapshot.
- You cannot delete a snapshot as long as there exists one or more service instance clones created from the snapshot.
- You cannot scale in a service instance after a snapshot of the instance has been taken.
- You cannot delete a service instance as long as the instance is associated with one or more cloned instances.
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
-
description(optional):
string
Description of the snapshot.
-
name:
string
Name of the snapshot.
A snapshot name can contain ASCII letters (
a
toz
, orA
toZ
), numbers (0
to9
), and only hyphen (-
) as the special character. The name must start with a letter, cannot be more than 50 characters, and should not be a whole word such asconfig
,snapshot
,resources
, ortresources
.
Response
- application/json
202 Response
Location
header returns a REST URI that can be used to view the job status. See View the Status of an Operation by Job Id.object
-
details(optional):
object details
Groups the details of the operation.
-
status(optional):
string
Status of the operation. When first initiated, the status is set to
New
. The status may transition to one of the following values:Completed
andCannot Complete
object
-
jobId(optional):
string
Job ID for the operation.
-
message(optional):
string
System message that describes the operation.
Examples
The following example shows how to create a snapshot of a service instance by submitting a POST 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 POST -u username:password -d @createsnapshot.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/snapshots
Example of Request Body
The following is an example of the request body in JSON format.
{
"name": "mySnapshot-1",
"description": "Snapshot of the service instance ExampleInstance"
}
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 202 Accepted
Date: Fri, 27 Oct 2017 20:24:45 GMT
Location: https://rest_server_url/paas/api/v1.1/activitylog/ExampleIdentityDomain/job/7185473
Content-Length: 133
Content-Language: en
Content-Type: application/json
Example of Response Body
The following shows an example of a response returned in JSON format.
{
"status":"New",
"details":
{
"message":"Snapshot of a service [ExampleInstance] is submitted as an asynchronous job.",
"jobId":"7185473"
}
}