Skip Headers
Oracle® Enterprise Manager Cloud Administration Guide
12c Release 4 (12.1.0.4)

E28814-13
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

32 Database as a Service Family APIs

This chapter describes the resource models for Database as a Service (DBaaS) APIs, Schema as a Service APIs, and the REST request/response interactions. The following topics are covered in this chapter:

32.1 REST APIs to Create a New DBaaS Cloud Setup

The Cloud Administrator sets up the cloud infrastructure for DBaaS. The figure below illustrates the steps to be followed to setup the DBaaS cloud setup.

Figure 32-1 Creating a New DBaaS Cloud Resource

Steps for DBaaS Setup

As an example, Table 32-1 illustrates a step-by-step process to create DBaaS using REST APIs and EM CLI verbs (where necessary).

Note:

The process below provides references to the APIs wherever possible. However, you can perform the same operations using EM CLI verbs. To know the corresponding EM CLI verbs refer to Section 32.4, "EM CLI For Administrator Flows".

Table 32-1 Creating DBaaS using APIs

Step Action

1

Create a PaaS infrastructure zone.

Refer to Section 32.2.1.3.3, "Creating a PaaS Zone".

Note: To view the existing PaaS zones perform a GET operation. Refer to Section 32.2.1.3.1, "Viewing Details of the PaaS Zones Resource".

2

Create one of the following Database Pools:

Note: To view the existing Database Pools perform a GET operation. Refer to Section 32.2.2.3.1, "Viewing Deatils of the Software Pools Resource"

3

Create DBaaS Request Settings for a user role. Refer to Section 32.2.3.4.1, "Viewing Details of the Dbaas Request Settings Resource".

4

Create Quota for a user role. Refer to Section 32.2.4.4.2, "Creating DbaaS Quota for a Role".

Note: This step is optional.

5

Create a Profile to capture the source database information for provisioning. Refer to Section 32.4.6, "Using EM CLI to Create Database Profiles".

A profile can represent a complete database or a set of related schemas that form an application.

6

Create a Service Template for any one of the following based on the selected Database Pool:


The DBaaS cloud setup is ready to be administered.

32.2 REST APIs for Administrator Flows

This section covers all the APIs for the Cloud Administrator flows. The APIs in this section are classified as follows:

32.2.1 PaaS Zones and PaaS Zone APIs

The APIs in this section are categorized as PaaS zones APIs and PaaS zone APIs. PaaS zone represents a PaaS Infrastructure Zone whereas PaaS zones is a collection resource representing a Cloud Administrator's view of a group of all the accessible individual PaaS zone resources.

This section covers the following:

32.2.1.1 PaaS Zones APIs

PaaS zones is a collective representation of all the individual PaaS zone resources. PaaS zones has the following media type and payload:

Type Description
Media Type application/oracle.com.cloud.common.PaaSZones+json
Support Payload json
URI Format em/websvcs/restful/extws/cloudservices/admin/cfw/v1/paaszones/

The following table describes the PaaS zones data model.

Table 32-2 PaaS Zones Data Model

Field Name Occurs Description

Name

String

1

Displays name of this collection resource.

Type

String

1

Type of this collection resource.

hasMore

Boolean

1

Indicates whether there are more elements in the collection.

Count

Integer

1

Number of elements returned.

Items

Collection <PaaSZone>

1

List of PaaS zone resources. If there are no intances, the items will be present but will be empty.

totalCount

Integer

1

Total number of PaaS zone resources.

canonicalLink

URI

1

A GET against this URI refreshes the client representation of this resource.

selfLink

URI

1

Refers to the resource equivalent to the containing elements.


32.2.1.1.1 Supported Operations for PaaS Zones

The following table lists all the operations that are supported on the PaaS zones resources.

Table 32-3 Supported Operations for PaaS Zones

Operation

GET

POST

PUT

DELETE

Support

Yes

Yes

Yes

Yes


32.2.1.2 PaaS Zone APIs

This resource represents a PaaS Infrastructure Zone. PaaS zone has the following media type and payload:

Type Description
Media type application/oracle.com.cloud.common.PaaSZone+json
Supported payload json
URI format em/websvcs/restful/extws/cloudservices/admin/cfw/v1/paaszones/{zoneId}

The following table describes the PaaS zone data model.

Table 32-4 PaaS Zone Data Model

Field Name Occurs Description

Name

String

1

A human readable name given to the PaaS zone.

ID

String

1

Zone ID. GET method will have value for this element.

Description

String

0..1

As brief description given to the zone.

Credential

String

1

Global Named Credentials to be used for provisioning in this PaaS Infrastructure Zone.

Members

Collection <String>

1

Members of PaaS zone. They can be either Host members or Oracle VM Zone members.

memberType

String

1

The target type of the members of PaaS zone. It can be either "host" for Host members or "oracle_vm_zone" for Oracle VM Zone members.

Constraints

Collection <Software Pool>

0..1

Placement policy constraints allow the cloud administrator to set maximum thresholds for any host.

Roles

Collection <String>

0..1

SSA roles that can access this PaaS Infrastructure Zone.

Pools

Collection <Software Pool>

0..1

Software Pools associated with this PaaS zone

membersToAdd

Collection <String>

0..1

Host or Oracle VM Zone targets to be added to an existing PaaS zone while editing it

membersToRemove

Collection <String>

0..1

Host or Oracle VM Zone targets to be removed from an existing PaaS zone while editing it.

rolesToAdd

Collection <String>

0..1

SSA roles to be added while editing a PaaS zone.

rolesToRemove

Collection <String>

0..1

SSA roles to be deleted while editing a PaaS zone.


32.2.1.2.1 Supported Operations for PaaS Zone

The following table lists all the operations that are supported on the PaaS zone resources.

Table 32-5 Supported Operations for PaaS Zone

Operation

GET

POST

PUT

DELETE

Support

Yes

Yes

Yes

Yes


32.2.1.3 PaaS Zones and PaaS Zone APIs Examples

The following sections provide examples of interaction with Enterprise Manager Cloud Control 12.1.0.3 with Cloud Application plug-in 12.1.0.7 and higher. The following examples are covered:

32.2.1.3.1 Viewing Details of the PaaS Zones Resource

A GET request performed on the PaaS zones resource provides the details of all the individual PaaS zones which are already existing in the PaaS zones resource.

  • URL

    https://example.oracle.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/paaszones/

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/json

  • Method

    GET

    The resource returned as the complete PaaS zones resource is as follows:

Status 200 OK 
Content-Type: application/json  
{
  "name" : "Paas Zones",
  "type" : "Paas Infrastructure Zone",
  "hasMore" : false,
  "count" : 4,
  "items" : [ {
    "name" : "pzone1",
    "id" : "A3CF2D49CFF3F3E664D073303EA51F8E",
    "type" : "self_service_zone",
    "canonicalLink" : 
"https://example.oracle.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/p
aaszones/A3CF2D49CFF3F3E664D073303EA51F8E"
\  }, {
    "name" : "Test Zone 2",
    "id" : "EF3830C71CC54B50B963376F9217AB95",
    "type" : "self_service_zone",
    "description" : "with MAX_CPU_UTILIZATION ",
    "canonicalLink" :
 "https://example.oracle.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/
paaszones/EF3830C71CC54B50B963376F9217AB95"
  }, {
    "name" : "test paas zone",
    "id" : "5D7548C1B879A51CFD894CEA8D5FB19B",
    "type" : "self_service_zone",
    "canonicalLink" :
"https://example.oracle.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/
paaszones/5D7548C1B879A51CFD894CEA8D5FB19B"
  }, {
    "name" : "Test Zone",
    "id" : "CACBB07A674F280DF84FC4CBFA76DFA7",
    "type" : "self_service_zone",
    "description" : "with MAX_CPU_UTILIZATION ",
    "canonicalLink" :
"https://example.oracle.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/
paaszones/CACBB07A674F280DF84FC4CBFA76DFA7"
  } ],
  "totalCount" : 4,
  "canonicalLink" :
"https://example.oracle.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/
paaszones",
  "selfLink" :
"https://example.oracle.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/
paaszones"
}
32.2.1.3.2 Viewing Details of the PaaS Zone Resource

The GET request on the PaaS zone resource can be issued to retrieve its details. The configuration for GET to PaaS zone is as follows:

  • URL

    https://example.oracle.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/paaszones/ A3CF2D49CFF3F3E664D073303EA51F8E

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/json

  • Method

    GET

The response from the above interaction is shown below.

Status 200 OK 
Content-Type: application/json
{
  "name" : "pzone1",
  "description" : "This zone contains Host members",
  "type" : "PaaS Infrastructure Zone",
  "id" : "A3CF2D49CFF3F3E664D073303EA51F8E",
  "credential" : "SXAASJUNITHOSTCRED",
  "members" : {
    "canonicalLink" :
"https://example.oracle.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/
paaszones/A3CF2D49CFF3F3E664D073303EA51F8E/members",
    "memberType" : "host",
    "numberOfHostMembers" : "2"
  },
  "constraints" : {
    "canonicalLink" :
"https://example.oracle.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/
paaszones/A3CF2D49CFF3F3E664D073303EA51F8E/constraints",
    "numberOfConstraints" : "2"
  },
  "roles" : {
    "canonicalLink" :
"https://example.oracle.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/
paaszones/A3CF2D49CFF3F3E664D073303EA51F8E/roles",
    "numberOfUserRoles" : "1"
  },
  "pools" : {
    "canonicalLink" :
"https://example.oracle.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/
paaszones/A3CF2D49CFF3F3E664D073303EA51F8E/pools",
    "numberOfSoftwarePools" : "0"
  },
  "createdOn" : "2013-05-22 01:50:30",
  "createdBy" : null,
  "modifiedOn" : null,
  "modifiedBy" : null,
  "owner" : "SYSMAN",
  "etag" : null,
  "lastModified" : null,
  "canonicalLink" :
"https://example.oracle.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/
paaszones/A3CF2D49CFF3F3E664D073303EA51F8E",
  "selfLink" :
"https://example.oracle.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/
paaszones/A3CF2D49CFF3F3E664D073303EA51F8E"
32.2.1.3.3 Creating a PaaS Zone

A PaaS zone is created with a POST request on the PaaS zones collection resource.

The configuration for POST to PaaS zones is as follows:

  • URL https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/paaszones/

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/json

  • Body

    {
        "name":"My Test Zone",
        "description":"This is a TestZone",
        "credential":"NCAIME",
        "memberType":"host",
        "members":[
            "slc05gvt.us.oracle.com"
        ],
        "constraint":[
            {
                "name":"MAX_CPU_UTILIZATION",
                "value":"85"
            },
            {
                "name":"MAX_MEMORY_ALLOCATION",
                "value":"95"
            }
        ],
        "roles":[
            "SSACOREROLE1",
            "SSACOREROLE2"
        ],
        
    }
    
  • Method

    POST

    The response from the above interaction is shown below.

    Status 201 Created 
    Content-Type: application/json
    {
      "name" : "My Test Zone",
      "description" : "This is a TestZone",
      "type" : "PaaS Infrastructure Zone",
      "id" : "DDBFEFDAD2AE6490E040F00AA37D4C67",
      "credential" : "NCAIME",
      "members" : {
        "canonicalLink" : 
    "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/
    paaszones/DDBFEFDAD2AE6490E040F00AA37D4C67/members",
        "memberType" : "host",
        "numberOfHostMembers" : "1"
      },
      "constraints" : {
        "canonicalLink" : 
    "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/
    paaszones/DDBFEFDAD2AE6490E040F00AA37D4C67/constraints",
        "numberOfConstraints" : "2"
      },
      "roles" : {
        "canonicalLink" : 
    "https://cloudcompany.com.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/paaszones/DDBFEFDAD2AE6490E040F00AA37D4C67/roles",
        "numberOfUserRoles" : "2"
      },
      "pools" : {
        "canonicalLink" : 
    "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/paaszones/DDBFEFDAD2AE6490E040F00AA37D4C67/pools",
        "numberOfSoftwarePools" : "0"
      },
      "createdOn" : "2013-05-27 20:57:18",
      "createdBy" : null,
      "modifiedOn" : null,
      "modifiedBy" : null,
      "owner" : "SYSMAN",
      "etag" : null,
      "lastModified" : null,
      "canonicalLink" : 
    "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/
    paaszones/DDBFEFDAD2AE6490E040F00AA37D4C67",
      "selfLink" : 
    "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/
    paaszones/DDBFEFDAD2AE6490E040F00AA37D4C67"
    }
    
32.2.1.3.4 Updating a PaaS Zone

The PUT request with payload updates an existing PaaS Infrastructure Zone.

The configuration for PUT to PaaS zones is as follows:

  • URL https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/paaszones/

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/json

  • Body

    {    "name":"My Test Zone",
        "credential":"NCAIME2",
        "description":"Description_01",
        "membersToAdd":[
            "somehost.com",
            "someotherhost.com"
        ],
        "membersToRemove":[
            "removehost.com",
            "removeotherhost2.com"
        ]
        ,
        "rolesToAdd":[
            "ROLE_1",
            "ROLE_2"
        ],
        "rolesToRemove":[
            "ROLE_1_1",
            "ROLE_2_1"
        ],
        "constraints":[
            {
                "name":"MAX_MEMORY_ALLOCATION",
                "value":"80"
            },
             {
                "name":"MAX_CPU_UTILIZATION",
                "value":"80"
            }
        ]
    }
    
  • Method

    PUT

    The response from the above interaction is shown below.

    Status 200 OK
    Content-Type: application/json
    {
      "message" : "PaaS Infrastructure Zone "My Test Zone" updated successfully."
    }
    
32.2.1.3.5 Deleting a PaaS Zone

The DELETE request on the URI of the PaaS zone can be issued to delete a PaaS zone Instance.The configuration for deleting in PaaS zone is as follows:

  • URL

    https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/paaszones/DDBFEFDAD2AE6490E040F00AA37D4C67

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

  • Method

    DELETE

The response from the above interaction is as shown below.

Status 200 OK 
Content-Type: application/json
{
  "message" : "PaaS Infrastructure Zone  "DDBFEFDAD2AE6490E040F00AA37D4C67" deleted    successfully."
}

32.2.2 Software Pools and Software Pool APIs

This section covers the following:

32.2.2.1 Software Pools

Software pools is a collection resource representing an SSA Administrator's view of all the accessible individual Software pool resources. Software pools has the following media type and payload:

Type Description
Media Type application/oracle.com.cloud.common.SoftwarePools +json
Support Payload json
URI Format em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/

The following table describes the Software pools data model.

Table 32-6 Software Pools Data Model

Field Name Occurs

Name

String

1

Displays name of this collection resource.

Type

String

1

Type of this collection resource.

hasMore

Boolean

1

Indicates whether there are more elements in the collection.

Count

Integer

1

Number of elements returned.

Items

Collection <PaaSZone>

1

List of PaaS zone resources. If there are no intances, the items will be present but will be empty.

totalCount

Integer

1

Total number of PaaS zone resources.

canonicalLink

URI

1

A GET against this URI refreshes the client representation of this resource.

selfLink

URI

1

Refers to the resource equivalent to the containing elements.


32.2.2.1.1 Supported Operations for Software Pools

The following table lists all the operations that are supported on the Software pools resources.

Table 32-7 Supported Operations for Software Pools

Operation

GET

POST

PUT

DELETE

Support

Yes

Yes

Yes

Yes


32.2.2.2 Software Pool

A Software pool resource represents a collection of homogeneous servers or clusters that are used to service requests within a PaaS Infrastructure Zone. All members within a Software pool must be of the same type and must belong to the same PaaS Infrastructure Zone.Software pool has the following media type and payload:

Type Description
Media Type application/oracle.com.cloud.common.SoftwarePool+json
Support Payload json
URI Format em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepool/{poolId}

The following table describes the Software pool data model.

Table 32-8 Software Pool Data Model

Field Name Occurs

Name

String

1

A human readable name given to the Software pool.

ID

String

1

Pool GUID that uniquely identifies the resource.

Description

String

0..1

As brief description given to the software pool.

poolTargetType

String

1

Target type of the Software Pool to be created. Example : "oracle_cloud_zone" for Database Pool, "schaas_pool" for Schema Pool, ”pdbaas_pool” for Pluggable Database Pool.

paasZone

String

1

Name of the PaaS zone associated with this Software Pool.

Members

Collection <String>

1

Members of PaaS zone. They can be either Host members or Oracle VM Zone members.

memberType

String

1

The target type of the members of PaaS zone. It can be either "host" for Host members or "oracle_vm_zone" for Oracle VM Zone members.

Constraints

Collection <Entity Value Holder>

0..1

Placement Policy Constraints for a software pool allow the self service administrator to set maximum ceilings for resource utilization.

Filters

Collection <EntityValueHolder>

1

Filters on a Software Pool restrict the addition of member targets to it with a set criteria.

Properties

Collection <String>

1

Additional properties that need to be specified for a specific pool target type.

membersToAdd

Collection <String>

0..1

Targets to be added to an existing Software Pool while editing it.

membersToRemove

Collection <String>

0..1

Targetst to be removed from an existing Software Pool while editing it.

canonicalLink

URI

1

A GET against this URI refreshes the client representation of this resource.


32.2.2.2.1 Supported Operations for Software Pool

The following table lists all the operations that are supported on the Software pool resources.

Table 32-9 Supported Operations for Software Pool

Operation

GET

POST

PUT

DELETE

Support

Yes

Yes

Yes

Yes


32.2.2.3 Software Pool API Examples

The following sections provide examples of interaction with Enterprise Manager Cloud Control 12.1.0.3 with Cloud Application plug-in 12.1.0.7 and higher. The following examples are covered here:

32.2.2.3.1 Viewing Deatils of the Software Pools Resource
  • URL

    https:// cloudcompany.com/em/websvcs/restful/extws/ cloudservices/admin/cfw/v1/softwarepools

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/json

  • Method

    GET

The resource returned as the complete Software pools resource is shown below.

Status 200 OK 
Content-Type: application/json 
{
name: "Software Pools"
type: "Software Pool"
hasMore: false
count: 2
items: [2]
0:  {
name: "IT_MW_Pool_2"
type: "mwaas_zone"
id: "E284FAAA7FBA6A06F7090115A3E07299"
zoneName: "IT_MW_Zone1"
canonicalLink: 
"https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E284FAAA7FBA6A06F7090115A3E07299"
description: "Middleware Pool of Oracle Homes of Version 10.3.5.0"
}-
1:  {
name: "IT_MW_Pool1"
type: "mwaas_zone"
id: "DD73A46E9E3C9866E040F00AE5235A7F"
zoneName: "IT_MW_Zone1"
canonicalLink:
"https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/DD73A46E9E3C9866E040F00AE5235A7F"
description: "Middleware Pool of Oracle Homes"
}-
-
totalCount: 2
canonicalLink: 
"https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/"
selfLink: 
"https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/"
}
32.2.2.3.2 Viewing Details of a Software Pool Resource

The GET request on the Software pool URI can be issued to retrieve its details.

The configuration for GET on Software pool is as follows:

  • URL

    https:// cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E284FAAA7FBA6A06F7090115A3E07299

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/json

  • Method

    GET

The response from the above interaction is as shown below.

{
        "name":"DB_POOL",
        "description":"Database Pool of Oracle Homes",
        "type":"Database Zone",
        "id":"E827809080C16F75E040F20A60511EA2",
        "zoneName":"SLC01MDR_ZONE",
        "members":{
                "canonicalLink":"https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E827809080C16F75E040F20A60511EA2/members",
                "numberOfPoolMembers":"1"
        },
        "constraints":{
                "canonicalLink":"https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E827809080C16F75E040F20A60511EA2/constraints",
                "numberOfConstraints":"1"
        },
        "filters":{
                "canonicalLink":"https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E827809080C16F75E040F20A60511EA2/filters",
                "numberOfFilters":"3"
        },
        "properties":{
          "canonicalLink":https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E827809080C16F75E040F20A60511EA2/properties",
          "numberOfPropertiess":"0"
        },
        "createdOn":"2013-10-07 06:27:17",
        "createdBy":null,
        "modifiedOn":null,
        "modifiedBy":null,
        "owner":"SYSMAN",
        "etag":null,
        "lastModified":null,
        "canonicalLink":"https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E827809080C16F75E040F20A60511EA2",
        "selfLink":"https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E827809080C16F75E040F20A60511EA2"
}
32.2.2.3.3 Creating a Database Pool

A POST operation is issued on Software Pools Collection resource to create a Database Pool.

The configuration for POST to Software pools is as follows:

  • URL

    https:// cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/json

  • Body

    { 
            "name": "DB_POOL", 
            "poolTargetType": "oracle_cloud_zone",
            "description": "Database Pool of Oracle Homes",
            "paasZone": "SLC01MDR_ZONE",
            "members": ["OraDb11g_home1_2_slc01mdr"],
            "serviceFamily":"DBAAS",
            "serviceType":"DBAAS",
            "constraints": 
                                    {"items": [{"name": "MAX_INSTANCES", "value": "10"}]},
            "filters": 
                             {"items": [{"name": "CONFIGURATION","value": "oracle_database"},
                    {"name": "VERSION","value": "11.2.0.2.0"},
                             {"name": "PLATFORM","value": "226"}]} 
         ]} ,
    "properties": 
            {"items": [
                    {"name": "host_credential_guid", "value": 
    "E84E88308E46A725E040F20A605125DD"},
                    {"name": "root_credential_guid", "value": 
    "E84E88308E46A725E040F20A605125DD"},
    {"name": "standby_pools", "value": "DB_POOL1| DB_POOL2"}
                    ]}
            }
    
  • Method

    POST

    The response from the above interaction is as shown below.

    {
            "name":"DB_POOL",
            "description":"Database Pool of Oracle Homes",
            "type":"Database Zone",
            "id":"E827809080C16F75E040F20A60511EA2",
            "zoneName":"SLC01MDR_ZONE",
            "members":{
                    "canonicalLink":"https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E827809080C16F75E040F20A60511EA2/members",
                    "numberOfPoolMembers":"1"
            },
            "constraints":{
                    "canonicalLink":"https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E827809080C16F75E040F20A60511EA2/constraints",
                    "numberOfConstraints":"1"
            },
            "filters":{
                    "canonicalLink":"https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E827809080C16F75E040F20A60511EA2/filters",
                    "numberOfFilters":"3"
            },
            "properties":{
              "canonicalLink":https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E827809080C16F75E040F20A60511EA2/properties",
              "numberOfPropertiess":"0"
            },
            "createdOn":"2013-10-07 06:27:17",
            "createdBy":null,
            "modifiedOn":null,
            "modifiedBy":null,
            "owner":"SYSMAN",
            "etag":null,
            "lastModified":null,
            "canonicalLink":"https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E827809080C16F75E040F20A60511EA2",
            "selfLink":"https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E827809080C16F75E040F20A60511EA2"
    }
    
32.2.2.3.4 Updating a Database Pool

A PUT operation is issued on Software Pools Collection resource to update a Database Pool.

The configuration for PUT to Software pools is as follows:

  • URL https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/json

  • Body

    { 
            "name": "DB_POOL", 
            "poolTargetType": "oracle_cloud_zone",
            "description": "Database Pool of Oracle Homes",
            "membersToAdd": [
                    "OraDb11g_home1_2_abc"],
            "membersToRemove": [
                    "OraDb11g_home1_2_abc"],
            "constraints": 
                 {"items": [{"name": "MAX_INSTANCES", "value": "8"}]},
     "properties": 
                    {"items": [
                    {"name": "host_credential_guid", "value": "E84E88308E46A725E040F20A605125DD"},
                    {"name": "root_credential_guid", "value": "E84E88308E46A725E040F20A605125DD"},
                    {"name": "standby_pools", "value": "DB_POOL"}
                                    ]}
            }
    
  • Method

    PUT

    The response from the above interaction is as shown below.

    Status 200 OK 
    Content-Type: application/json 
    {
    message: "Software Pool  " DB_POOL" updated successfully."
    }
    
32.2.2.3.5 Creating a Schema Pool

A POST operation is issued on Software Pools Collection resource to create a Software Pool.

The configuration for POST to Software pools is as follows:

  • URL

    https:// cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/json

  • Body

    { 
            "name": "SCHEMA_POOL", 
            "poolTargetType": "schaas_pool",
            "description": "Schema Service Pool",
            "paasZone": "SLC01MDR_ZONE",
            "members": ["simple.us.oracle.com"],
            "serviceFamily":"DBAAS",
            "serviceType":"SCHEMA",
            "constraints": 
                    {
                    "items": [
                            {"name": "MAX_SERVICES", "value": "20"},
                            {"name": "USE_WORKLOAD", "value": "true"},
                            {"name": "MAX_CPU_USAGE", "value": "90"},                                           
                            {"name": "MAX_MEMORY_USAGE", "value": "90"},
                            {"name": "ENFORCE_CPU", "value": "true"}                           
                            ]
                                    },
            "filters": 
                    {
                    "items": [
                    {"name": "TARGET_TYPE","value": "oracle_database"},
                    {"name": "VERSION","value": "11.2.0.2.0"},
                    {"name": "PLATFORM","value": "226"}
                    ]
                    } 
            }
    
  • Method

    POST

    The response from the above interaction is as shown below.

    Status 201 Created 
    Content-Type: application/json
    {
            "name":"SCHEMA_POOL",
            "description":"Schema Service Pool",
            "type":"Schema Pool",
            "id":"2CFF36A9E92AAD533253871374857D8C",
            "zoneName":"SLC01MDR_ZONE",
            "members":{
             "canonicalLink":"https://slc03rdr.us.oracle.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/2CFF36A9E92AAD533253871374857D8C/members",
             "numberOfPoolMembers":"1"},
            "constraints":{
             "canonicalLink":"https://slc03rdr.us.oracle.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/2CFF36A9E92AAD533253871374857D8C/constraints",
             "numberOfConstraints":"5"},
            "filters":{
             "canonicalLink":"https://slc03rdr.us.oracle.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/2CFF36A9E92AAD533253871374857D8C/filters",
             "numberOfFilters":"3"},
            "properties":{
             "canonicalLink":"https://slc03rdr.us.oracle.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/2CFF36A9E92AAD533253871374857D8C/properties",
             "numberOfPropertiess":"0"},
            "createdOn":"2013-10-07 08:13:48",
            "createdBy":null,
            "modifiedOn":null,
            "modifiedBy":null,
            "owner":"SYSMAN",
            "etag":null,
            "lastModified":null,
            "canonicalLink":"https://slc03rdr.us.oracle.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/2CFF36A9E92AAD533253871374857D8C",
            "selfLink":"https://slc03rdr.us.oracle.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/2CFF36A9E92AAD533253871374857D8C"
    }
    
32.2.2.3.6 Updating a Schema Pool

A PUT operation is issued on Software Pools Collection resource to update a Software Pool.

The configuration for PUT to Software pools is as follows:

  • URL

    https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/json

  • Body

    { 
            "name": "SCHEMA_POOL", 
            "poolTargetType": "schaas_pool",
            "description": "Schema Service Pool",
            "membersToAdd": [
                    "simple.us.oracle.com"],
            "membersToRemove": [
                    "simple.us.oracle.com"],
            "constraints": 
                    {
                    "items": [
                    {"name": "MAX_SERVICES", "value": "10"},
                    {"name": "USE_WORKLOAD", "value": "false"},
                    {"name": "MAX_CPU_USAGE", "value": "90"},                                           
                    {"name": "MAX_MEMORY_USAGE", "value": "90"},
                    {"name": "ENFORCE_CPU", "value": "false"}                          
                    ]
                    },
            }
    
  • Method

    PUT

    The response from the above interaction is as shown below.

    Status 200 OK 
    Content-Type: application/json 
    {
    message: "Software Pool  "SCHEMA_POOL" updated successfully.
    
32.2.2.3.7 Creating a Pluggable Database Pool

A POST operation is issued on Software Pools collection resource to create a Software Pool.The configuration for POST to Software pools is as follows:

  • URL

    https:// cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/json

  • Body

    { 
            "name": "PDB_POOL", 
            "poolTargetType": "pdbaas_pool",
            "description": "Pluggable Database Pool",
            "paasZone": "PDB_ZONE",
            "members": ["database"],
            "serviceFamily":"DBAAS",
            "serviceType":"PDB",
            "constraints": 
                    {
                    "items": [
                    {"name": "MAX_PDB_SERVICES", "value": "20"},
                    {"name": "PDBS_USE_WORKLOAD", "value": "true"},
                    {"name": "MAX_CPU_USAGE_BY_PDBS", "value": "90"},                                             
                    {"name": "MAX_MEMORY_USAGE_BY_PDBS", "value": "90"},
                    {"name": "PDBS_ENFORCE_CPU", "value": "true"}                               
                    ]
            },
            "filters": 
                    {
                    "items": [
                            {"name": "TARGET_TYPE_CDB","value": "oracle_database"},
                            {"name": "VERSION_CDB","value": "12.1.0.1.0"},
                            {"name": "PLATFORM_CDB","value": "226"}
                            ]
                    } 
            }
    
  • Method

    POST

    The response from the above interaction is as shown below.

    Status 201 Created 
    Content-Type: application/json
    {
            "name":"PDB_POOL",
            "description":"Pluggable Database Pool",
            "type":"Pdb Pool",
            "id":"E82952BD4C94D443E040F20A605114E6",
            "zoneName":"PDB_ZONE",
            "members":{
             "canonicalLink":"https://slc03rdr.us.oracle.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E82952BD4C94D443E040F20A605114E6/members",
             "numberOfPoolMembers":"1"
            },
            "constraints":{
             "canonicalLink":"https://slc03rdr.us.oracle.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E82952BD4C94D443E040F20A605114E6/constraints",
             "numberOfConstraints":"5"
            },
            "filters":{
             "canonicalLink":"https://slc03rdr.us.oracle.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E82952BD4C94D443E040F20A605114E6/filters",
             "numberOfFilters":"3"
             },
            "properties":{
             "canonicalLink":"https://slc03rdr.us.oracle.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E82952BD4C94D443E040F20A605114E6/properties",
             "numberOfPropertiess":"0"},
            "createdOn":"2013-10-07 08:29:51",
            "createdBy":null,
            "modifiedOn":null,
            "modifiedBy":null,
            "owner":"SYSMAN",
            "etag":null,
            "lastModified":null,
            "canonicalLink":"https://slc03rdr.us.oracle.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E82952BD4C94D443E040F20A605114E6",
            "selfLink":"https://slc03rdr.us.oracle.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E82952BD4C94D443E040F20A605114E6"
    }
    
32.2.2.3.8 Updating a Pluggable Database Pool

A PUT operation is issued on Software Pools Collection resource to update a Software Pool.

The configuration for PUT to Software pools is as follows:

  • URL

    https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/json

  • Body

    { 
            "name": "PDB_POOL", 
            "poolTargetType": "pdbaas_pool",
            "description": "Pluggable Database Pool",
            "membersToAdd": [
                    "simple.us.oracle.com"],
            "membersToRemove": [
                    "simple1.us.oracle.com"],
            "constraints": 
                    {
                    "items": [
                    {"name": "MAX_PDB_SERVICES", "value": "10"},
                    {"name": "PDBS_USE_WORKLOAD", "value": "false"},
                    {"name": "MAX_CPU_USAGE_BY_PDBS", "value": "90"},                                             
                    {"name": "MAX_MEMORY_USAGE_BY_PDBS", "value": "90"},
                    {"name": "PDBS_ENFORCE_CPU", "value": "false"}                              
                    ]
            },
            }
    
  • Method

    PUT

    The response from the above interaction is shown below.

    Status 200 OK 
    Content-Type: application/json 
    {
    message: "Software Pool  "PDB_POOL" updated successfully."
    }
    
32.2.2.3.9 Deleting a Database / Schema / Pluggable Database Pool

To delete a SoftwrePool Instance raise the DELETE request on the URI of the Database pool.The configuration for deleting a Software pool is as follows:

  • URL

    https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E827809080C16F75E040F20A60511EA2

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

  • Method

    DELETE

    The response from the above interaction is shown below.

    Status 200 OK 
    Content-Type: application/json 
    {
    message: "Software Pool " E827809080C16F75E040F20A60511EA2" deleted successfully."
    }
    

32.2.3 Database Request Settings APIs

This section describes the REST request/response interactions for Database Request Settings.

Note:

Request Settings APIs are only supported by the Oracle Cloud Application plug-in version 12.1.0.7.0 and higher.

The topics covered in this section are:

32.2.3.1 Resource Model for Database Request Settings

Cloud resources are organized by common service entities, and specific services (for example, Database Request Settings) provide resources by extending these common service entities. The Database Request Settings is a cloud resource for which instance does not exist.The following sections describe the resources that are supported by the Database Request Settings APIs and provide examples of supported operations.

32.2.3.2 Dbaas Request Settings Resource

The Dbaas Request Settings extends the cloud resource. It describes the database request settings related to service instances. Dbaas Request Settings has the following media type and payload:

Type Description
Media Type application/oracle.com.cloud.common.DbaasRequestSettings+json
Support Payload json
URI Format /em/cloud/dbaas/requestsettings

The following table describes the Dbaas Request Settings data model.

Table 32-10 DBaaS Request Settings Data Model

Field Type Occurs Description

uri

URI

1

A GET against this URI refreshes the client representation of the resources accessible to this user.

name

String

1

A human readable name given to the template.

description

String

1

A brief description given to the template

resource_state

ResourceState

1

The validity of the fields on a GET should be guaranteed only when the resource state is READY. Otherwise, the client should not assume the validity of the fields.

media_type

String

1

The media type of the service template.

service_family_type

String

1

Dbaas

canonicalLink

URI

1

Can be used to perform cloud interactions like GET and POST.

RequestSettings

String

1

The current database request settings.


32.2.3.3 Supported Operations for Dbaas Request Settings

The following table lists all the operations that are supported on the database quota service resources.

Table 32-11 Supported Operations for DbaasRequestSettings

Operation

GET

POST

PUT

DELETE

Support

Yes

Yes

Yes

Yes


32.2.3.4 Dbaas Request Settings API Examples

The following sections provide examples of interaction with Enterprise Manager Cloud Control 12.1.0.3 with Cloud Application plug-in 12.1.0.7 and higher. The following examples are covered:

32.2.3.4.1 Viewing Details of the Dbaas Request Settings Resource
  • URL

    https://example.mycompany.com/em/cloud/dbaas/requestsettings

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

  • Method

    GET

The complete DbaasRequestSettings resource that is displayed is shown below.

{
  "uri" : "/em/cloud/dbaas/requestsettings" ,
  "name" : "Dbaas Request Settings" ,
  "description" : "Dbaas Request settings" ,
  "resource_state" :     {
      "state" : "READY"
    } ,
  "media_type" : "application/oracle.com.cloud.common.DbaasRequestSettings+json" ,
  "service_family_type" : "dbaas" ,
  "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/requestsettings" ,
  "Request Settings" :     {
      "futureReservationLength" : "No Reservation" ,
      "defaultRetirementPeriod" : "No Reservation" ,
      "maximumArchiveDuration" : "No Reservation"
    }
}
32.2.3.4.2 Updating Database Request Settings

This section describes how to update the request settings using the cloud resources.

The configuration for POST to DbaasRequestSettings is as follows:

  • URL

    https://example.mycompany.com/em/cloud/dbaas/requestsettings

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/oracle.com.cloud.common.DbaasRequestSettings+jsonAccept: application/oracle.com.cloud.common.DbaasRequestSettings+json

  • Body

    {
            "future_reservation_length" : "2 Months", 
            "maximum_archive_duration" : "10 Weeks",
            "default_retirement_period" : "No Reservation"
            }
    
  • Method

    POST

The response from the above interaction is shown below.

{
  "uri" : "/em/cloud/dbaas/requestsettings" ,
  "name" : "Dbaas Request Settings" ,
  "description" : "Dbaas Request settings" ,
  "resource_state" :     {
      "state" : "READY" ,
      "messages" : 
      [
          {
            "date" : "2013-08-27T09:13:03+0000" ,
            "text" : "Request settings have been updated."
          }
      ]
    } ,
  "media_type" : "application/oracle.com.cloud.common.DbaasRequestSettings+json" ,
  "service_family_type" : "dbaas" ,
  "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/requestsettings"
}

32.2.4 Database Quota APIs

This section describes the REST request/response interactions for setting up Quota.

Note:

Quota APIs are only supported by the Oracle Cloud Application plug-in version 12.1.0.7.0 and higher.

The topics covered in this section are:

32.2.4.1 Resource Model for Database Quota

Cloud resources are organized by common service entities, and specific services (for example, Database Quota) provide resources by extending these common service entities. The Database Quota is a cloud resource for which an instance does not exist.

The following sections describe the resources that are supported by the Database Quota APIs and provide examples of supported operations.

32.2.4.2 Dbaas Quota Resource

The Dbaas Quota extends the cloud resource. It describes the quota settings for all roles. Dbaas Quota has the following media type and payload:

Type Description
Media Type application/oracle.com.cloud.common.DbaasQuota+json
Support Payload json
URI Format /em/cloud/dbaas/quota

The following table describes the DbaasQuota data model.

Table 32-12 DbaasQuota Data Model

Field Type Occurs Description

uri

URI

1

A GET against this URI refreshes the client representation of the resources accessible to this user.

name

String

1

A human readable name given to the template.

description

String

1

A brief description given to the template

resource_state

String

1

The validity of the fields on a GET should be guaranteed only when the resource state is READY. Otherwise, the client should not assume the validity of the fields.

media_type

String

1

The media type of the service template that. this type represents

service_family_type

String

1

Dbaas

canonicalLink

URI

1

Can be used to perform cloud interactions like GET and POST.

databases

String

1

The databases usage report.

schema_services

String

1

The schema services usage report.

pluggable_databases

String

1

The pluggable databases usage report.

memory

String

1

The memory usage report.

storage

String

1

The storage usage report.

Quota

String

1

The Quota setup details for a role.


32.2.4.3 Supported Operations for DbaaS Quota

The following table lists all the operations that are supported on the Database quota resources.

Table 32-13 Supported Operations for DbaaSQuota

Operation

GET

POST

PUT

DELETE

Support

Yes

Yes

Yes

Yes


32.2.4.4 Database Quota API Examples

The following sections provide examples of interaction with Enterprise Manager Cloud Control 12.1.0.3 with Cloud Application plug-in 12.1.0.7 and higher. The following examples are covered:

32.2.4.4.1 Viewing Details of the Dbaas Quota Resource
  • URL

    https://example.mycompany.com/em/cloud/dbaas/quota

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

  • Method

    GET

The resource returned as the complete DbaasQuota resource is as shown below.

{
  "uri" : "/em/cloud/dbaas/quota" ,
  "name" : "Dbaas User Quota" ,
  "description" : "User Quota for the user" ,
  "resource_state" :     {
      "state" : "READY"
    } ,
  "media_type" : "application/oracle.com.cloud.common.DbaasQuota+json" ,
  "service_family_type" : "dbaas" ,
  "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/quota" ,
  "databases" :     {
      "quota" : "Unlimited" ,
      "used" : "1" ,
      "unit" : "Instance"
    } ,
  "schema_services" :     {
      "quota" : "Unlimited" ,
      "used" : "1" ,
      "unit" : "Instance"
    } ,
  "pluggable_databases" :     {
      "quota" : "Unlimited" ,
      "used" : "1" ,
      "unit" : "Instance"
    } ,
  "memory" :     {
      "quota" : "Unlimited" ,
      "used" : "0.79" ,
      "unit" : "GB"
    } ,
  "storage" :     {
      "quota" : "Unlimited" ,
      "used" : "3.38" ,
      "unit" : "GB"
    } ,
  "Quotas" : 
  [
      {
        "Role Name" : "DBAAS_ROLE" ,
        "Memory(GB)" : "99" ,
        "Storage(GB)" : "99" ,
        "Number of Database Requests" : "99" ,
        "Number of Schema Service Requests" : "99" ,
        "Number of Pluggable database Service Requests" : "99"
      }
  ]
}
32.2.4.4.2 Creating DbaaS Quota for a Role

This section describes how to create/setup a quota for a role using the Cloud resources.

The configuration for POST to DbaasQuota is as follows:

  • URL

    https://example.mycompany.com/em/cloud/dbaas/quota

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/oracle.com.cloud.common.DbaasQuota+jsonAccept: application/oracle.com.cloud.common.DbaasQuota+json

  • Body

      {
            "role_name" : "DBAAS_ROLE",       
            "databases" : "10",
            "schema_services" : "21",
            "pluggable_databases" : "22",
            "storage" : "99",
            "memory" : "99"
            }
    
  • Method

    POST

The response from the above interaction is shown below.

{
  "uri" : "/em/cloud/dbaas/quota" ,
  "name" : "Dbaas User Quota" ,
  "description" : "User Quota for the user" ,
  "resource_state" :     {
      "state" : "READY" ,
      "messages" : 
      [
          {
            "date" : "2013-08-27T08:58:48+0000" ,
            "text" : "Quota for Role DBAAS_ROLE setup successfully."
          }
      ]
    } ,
  "media_type" : "application/oracle.com.cloud.common.DbaasQuota+json" ,
  "service_family_type" : "dbaas" ,
  "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/quota"
}
32.2.4.4.3 Updating DbaaS Quota for a Role

This section describes how update the quota already setup for a role using the Cloud resources.The configuration for PUT to DbaasQuota is as follows:

  • URL

    https://example.mycompany.com/em/cloud/dbaas/quota

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/oracle.com.cloud.common.DbaasQuota+jsonAccept: application/oracle.com.cloud.common.DbaasQuota+json

  • Body

    {
            "role_name" : "DBAAS_ROLE",       
            "databases" : "10",
            "schema_services" : "21",
            "pluggable_databases" : "22",
            "storage" : "99",
            "memory" : "99"
             
    
  • Method

    PUT

    The response from the above interaction is as shown below.

    {
      "uri" : "/em/cloud/dbaas/quota" ,
      "name" : "Dbaas User Quota" ,
      "description" : "User Quota for the user" ,
      "resource_state" :     {
          "state" : "READY" ,
          "messages" : 
          [
              {
                "date" : "2013-08-27T09:01:56+0000" ,
                "text" : "Quota for Role DBAAS_ROLE updated successfully."
              }
          ]
        } ,
      "media_type" : "application/oracle.com.cloud.common.DbaasQuota+json" ,
      "service_family_type" : "dbaas" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/quota"
    }
    
32.2.4.4.4 Deleting DbaaS Quota for a Role

This section describes how delete the quota setup for a role using the Cloud resources.The configuration for deleting in DbaasQuota is as follows:

  • URL

    https://example.mycompany.com/em/cloud/dbaas/quota

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/oracle.com.cloud.common.DbaasQuota+jsonAccept: application/oracle.com.cloud.common.DbaasQuota+json

  • Body

    {
            "role_name" : "DBAAS_ROLE",       
             
    
  • Method

    DELETE

    The response from the above interaction is as shown below.

    {  "uri" : "/em/cloud/dbaas/quota" ,  "name" : "Dbaas User Quota" ,  "description" : "User Quota for the user" ,  "resource_state" :     {      "state" : "READY" ,      "messages" :       [          {            "date" : "2013-08-27T08:58:32+0000" ,            "text" : "Quota for Role DBAAS_ROLE deleted successfully."          }      ]    } ,  "media_type" : "application/oracle.com.cloud.common.DbaasQuota+json" ,  "service_family_type" : "dbaas" ,  "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/quota"}
    

32.2.5 Service Template APIs

This section covers the following:

32.2.5.1 Service Templates Resource

Service Templates is a collection resource representing a Cloud Administrator's view of all the accessible service template resources. Service Templates has the following media type and payload:

Type Description
Media Type application/oracle.com.cloud.common.ServiceTemplates+json
Support Payload json
URI Format em/websvcs/restful/extws/cloudservices/admin/cfw/v1/servicetemplates/

The following table describes the ServiceTemplates data model.

Table 32-14 Service Templates Data Model

Field Name Occurs

Name

String

1

Displays name of this collection resource.

Type

String

1

Type of this collection resource.

hasMore

Boolean

1

Indicates whether there are more elements in the collection.

Count

Integer

1

Number of elements returned.

Items

Collection <ServiceTemplate>

1

The elements of this collection.

totalCount

Integer

1

Total number of PaaS zone resources.

canonicalLink

URI

1

A GET against this URI refreshes the client representation of this resource.

selfLink

URI

1

Refers to the resource equivalent to the containing elements.


32.2.5.1.1 Supported Operations for Service Templates

The following table lists all the operations that are supported on the Service Templates resource.

Table 32-15 Supported Operations for Service Templates

Opertion

GET

POST

PUT

DELETE

Support

Yes

Yes

Yes

Yes


32.2.5.2 Service Template Resource

A service template is a standardized service definition that can be used by self service users to provision a service instance. Service Template has the following media type and payload:

Type Description
Media Type application/oracle.com.cloud.common.ServiceTemplate+json
Support Payload json
URI Format em/websvcs/restful/extws/cloudservices/admin/cfw/v1/servicetemplates/{templateId}

The following table describes the Service Template data model.

Table 32-16 Service Template Data Model

Field Name Occurs

Name

String

1

A human readable name given to the ServiceTemplate.

ID

String

1

Service Template ID that uniquely identifies the resource.

Description

String

0..1

As brief description given to the zone.

canonicalLink

URI

1

A GET against this URI refreshes the client representation of this resource.

serviceFamily

String

1

Service family

serviceType

String

1

Service type.

Roles

Collection <Role>

0..1

SSA roles that can access this service template.

poolIds

Collection <String>

1

Software Pool Ids associated with this service template.

createdOn

String(Date/Time)

0..1

Time when the resource was created.

createdBy

String

1

The user who created the resource.

modifiedOn

String(Date/Time)

0..1

Time when the resource was last modified.

rolesToRemove

Collection <String>

0..1

SSA roles to be deleted while editing a PaaS zone.


32.2.5.2.1 Supported Operations for Service Template

The following table lists all the operations that are supported on the Service Template resources.

Table 32-17 Supported Operations for Service Template

Operation

GET

POST

PUT

DELETE

Support

Yes

Yes

Yes

Yes


32.2.5.3 Service Templates and Service Template APIs Examples

The following sections provide examples of interaction with Enterprise Manager Cloud Control 12.1.0.3 with Cloud Application plug-in 12.1.0.7 and higher. The following examples are covered:

32.2.5.3.1 Viewing Details of the Service Templates Resource
  • URL

    https:// cloudcompany.com/em/websvcs/restful/extws/ cloudservices/admin/cfw/v1/servicetemplates

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/json

  • Method

    GET

The resource returned as the complete ServiceTemplates resource is as follows:

{
    "name":"Service Templates",
    "type":"Service Template",
    "hasMore":false,
    "items":[
        {
            "id":"E821074692058B5DE040F00AA37D75AB",
            "name":"ST_DB_SCH_01",
            "serviceFamily":"DBAAS",
            "description":"Database Schema Service Template",
            "canonicalLink":"https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/servicetemplates/E821074692058B5DE040F00AA37D75AB"
        }
    ],
    "totalCount":1,
    "canonicalLink":"https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/servicetemplates"
} 
32.2.5.3.2 Viewing Details of the ServiceTemplate Resource

The GET request on the ServiceTemplate URI can be issued to retrieve its details.The configuration for GET to ServiceTemplate is as follows:

  • URL

    https:// cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/servicetemplates/E821074692058B5DE040F00AA37D75AB

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/json

  • Method

    GET

The response from the above interaction is shown below.

{
        "name":"Platinum - Star Hotel Application on 2-node RAC Database with Multiple Standbys",
        "serviceFamily":"DBAAS",
        "serviceType":"DB",
        "type":"Service Template",
        "description":"Provisions Star Hotel Application on 2-node 11.2.0.4 RAC Database with RAC & SI Standbys",
        "id":"F98595A8E45A5B9DE043A4BBF00A4C40","pools":[
                {"name":"RAC_11204_Tier_1","id":"F985A268D9715B9FE043A4BBF00A3573","type":"oracle_cloud_zone","zone":{"id":"F985A268D9175B9FE043A4BBF00A3573","name":"Salt Lake City DC"}}],
        "roles":[{"name":"SSA_USER_ROLE","description":null}],
        "serviceExecutableMeta":{
        "type":"CDP",
        "configurations":[
                {"id":"INIT_PARAMS","name":"Initialization parameter values","value":"","values":["undo_tablespace=UNDOTBS1","db_name=null","log_archive_format=%t_%s_%r.dbf","diagnostic_dest=/scratch/app/oracle","db_recovery_file_dest_size=4385144832","open_cursors=300","audit_trail=DB","db_block_size=8192","*.cpu_count=0","db_create_file_dest={ORACLE_BASE}/oradata","audit_file_dest={ORACLE_BASE}/admin/{DB_UNIQUE_NAME}/adump","remote_login_passwordfile=EXCLUSIVE","compatible=11.2.0.4.0","processes=150","db_recovery_file_dest={ORACLE_BASE}/fast_recovery_area","control_files=(\"{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/current.260.845112505\", \"{ORACLE_BASE}/fast_recovery_area/{DB_UNIQUE_NAME}/current.256.845112505\")","memory_target=763363328"]},
                {"id":"PROFILE_COMPONENT_URN","name":"URN of the Profile Component to be used for Database Creation","value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:F96FFFD3E2FB69FDE043A4BBF00A7E42:0.1"},
                {"id":"LIVE_CLONE_DATABASE_GUID","name":"Database Guid to be cloned","value":""},
                {"id":"ENTITY_TYPE","name":"Entity Type","value":"USE_PROFILE"},
                {"id":"LIVE_CLONE_TYPE","name":"Type of Live Clone","value":""},
                {"id":"DATABASE_TYPE","name":"Database Type","value":"rac_database"},
                {"id":"DBAAS_SSA_CUSTOM_PRE_SCRIPTS_URN","name":"Pre-script","value":""},
                {"id":"DBAAS_SSA_CUSTOM_POST_SCRIPTS_URN","name":"Post-script","value":""},
                {"id":"USER_NAME","name":"User Name (cannot be any of Oracle default accounts)","value":""},
                {"id":"USER_PASSWORD","name":"User Password"},
                {"id":"INSTANCE_COUNT","name":"Number of RAC Database Instances","value":"2"},
                {"id":"COMMON_DB_SYSTEM_PASSWORD","name":"SYSTEM Account password","value":"***********"},
                {"id":"COMMON_DB_DBSNMP_PASSWORD","name":"DBSNMP Account password","value":"***********"},
                {"id":"COMMON_DB_SYS_PASSWORD","name":"SYS Account password","value":"***********"},
                {"id":"DB_ADMIN_PASSWORD_SAME","name":"Use the same passwords for SYS, SYSTEM and DBSNMP account","value":"true"},
                {"id":"COMMON_DB_SID","name":"Database SID Prefix","value":"db"},
                        {"id":"SID_OPTION","name":"Database SID Option","value":"ssauser"},
                {"id":"COMMON_DOMAIN_NAME","name":"Database Domain Name","value":"us.oracle.com"},
                {"id":"LISTENER_PORT","name":"Listener Port","value":"1521"},
                {"id":"ALLOW_BACKUPS","name":"Enable Backups for the Database","value":""},
                {"id":"MAX_BACKUPS_ALLOWED","name":"Number of Backups allowed for the Database","value":""},
                {"id":"NONADMIN_SSA_ACC_DB_USER_NAMES","name":"Non Admin SSA Accessible users","value":""},
                {"id":"DB_USER_NAMES","name":"Database Users from source","value":""},
                {"id":"DB_USER_PASSWORDS","name":"Passwords for Database"},
                {"id":"STANDBY_REQUIRED","name":"STANDBY_REQUIRED","value":"true"},         {"id":"STANDBY_REQUIRED_LOCK","name":"STANDBY_REQUIRED_LOCK","value":"false"},                {"id":"STANDBY_LISTENER_PORT","name":"STANDBY_LISTENER_PORT","value":""},
                {"id":"PROVISIONING_TYPE","name":"PROVISIONING_TYPE","value":""},
                {"id":"STANDBY_DATABASE_MASTER","name":"STANDBY_DATABASE_MASTER","value":""},
        {"id":"STANDBY_COMMON_DB_SID","name":"STANDBY_COMMON_DB_SID","value":""},
        {"id":"STANDBY_DB_DETAILS","name":"STANDBY_DB_DETAILS","value":"","values":["pool=RAC_11204_Tier_2;databaseSIDPrefix=;databaseType=rac_database;standbyConfigName=Near DR;redoMode=SYNC;realtimeQuery=true;databaseRACInstanceCount=2;databaseDelay=30;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.oracle.com","pool=SI_11204;databaseSIDPrefix=;databaseType=oracle_database;standbyConfigName=Far DR;redoMode=ASYNC;realtimeQuery=false;databaseRACInstanceCount=2;databaseDelay=60;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.oracle.com"]},
        {"id":"STANDBY_DELAY_DATABASE_MASTER","name":"STANDBY_DELAY_DATABASE_MASTER","value":""},
        {"id":"STANDBY_WORK_DIR","name":"STANDBY_WORK_DIR","value":"/tmp"},
        {"id":"PRIMARY_PROTECTION_MODE","name":"PRIMARY_PROTECTION_MODE","value":"MAXIMIZE AVAILABILITY"},
        {"id":"DBAAS_SSA_STANDBY_CUSTOM_PRE_SCRIPTS_URN","name":"URN of the standby pre sql custom script","value":""},
        {"id":"DBAAS_SSA_STANDBY_CUSTOM_POST_SCRIPTS_URN","name":"URN of the standby post sql custom script","value":""},
                {"id":"CLONE_OR_FULL_DB","name":"CLONE_OR_FULL_DB","value":""},
        {"id":"USER_INITIATED_BACKUP_LOCATION","name":"USER_INITIATED_BACKUP_LOCATION","value":""},
                {"id":"ASM_OPTION","name":"ASM Diskgroup Option","value":""},
                {"id":"ASM_DSKGRP_PREFIX","name":"ASM Diskgroup Prefix for all new diskgroups","value":""}
        ]},
        "createdOn":null,
        "createdBy":null,
        "modifiedOn":null,
        "modifiedBy":null,
        "owner":"SYSMAN",
        "etag":null,
        "lastModified":null,
        "canonicalLink":"https://slc04sgs.us.oracle.com:5416/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/servicetemplates/F98595A8E45A5B9DE043A4BBF00A4C40",
        "selfLink":"https://slc04sgs.us.oracle.com:5416/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/servicetemplates/F98595A8E45A5B9DE043A4BBF00A4C40"
}
32.2.5.3.3 Creating a Database Service Template

A POST operation is issued on ServiceTemplates Collection resource to create a Database Service Template.The configuration for POST to ServiceTemplates is as follows:

  • URL

    https:// cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/servicetemplates

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/json

  • Body

    {
        "name":"TestDbTemplate1",
        "serviceType":"DB",
        "serviceFamily":"DBAAS",
        "description":"This is a test database dbca service template 1",
        "poolIds":[ "F66D9FD94B4651A007D48A5732F3284F" ],
        "roles":[
            { "name":"SSA_USER_ROLE1" }
        ],
       "serviceExecutableMeta":{
            "type":"CDP",
                    "configurations":[
             { "name":"PROFILE_COMPONENT_URN", "value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbCreateTemplate:E87A7B5AA40CC345E040F20A605121D6:0.1" },
             { "name":"DATABASE_TYPE","value":"oracle_database" },
             { "name":"COMMON_DB_SYSTEM_PASSWORD", "value":"welcome" },
             { "name":"COMMON_DB_DBSNMP_PASSWORD", "value":"welcome" },
             { "name":"COMMON_DB_SYS_PASSWORD","value":"welcome" },
             { "name":"SID_OPTION", "value":"ssauser "},
             { "name":"COMMON_DB_SID","value":"mydb1" },
             { "name":"COMMON_DOMAIN_NAME","value":"us.oracle.com" },
             { "name":"LISTENER_PORT", "value":"1521"},
             { "name":"STAGE_LOCATION", "value":"/scratch" },
             { "name":"REF_ZONE", "value":"ABC_ZONE" },
             { "name":"REF_POOL",   "value":"DBPOOL" },
             { "name":"REF_HOST", "value":"abc.us.oracle.com" },
             { "name":"REF_TGT","value":"abc.us.oracle.com" },
             { "name":"DBCA_TEMPLATE:DB_STORAGE_TYPE",  "value":"FS" },
             { "name":"DBCA_TEMPLATE:DATA_FILE_LOCATION","value":"{ORACLE_BASE}/mydir/oradata" },
             { "name":"DBCA_TEMPLATE:REC_STORAGE_TYPE_SAME_AS_DB_FILES", "value":"Y" },
             { "name":"DBCA_TEMPLATE:ARCHIVE_LOG_MODE", "value":"N" },
             { "name":"DBCA_TEMPLATE:FLASH_RECOVERY_AREA_SIZE", "value":"2048" },
             { "name":"DBCA_TEMPLATE:RECOVERY_FILE_LOCATION","value":"{ORACLE_BASE}/mydir/fra" },
             { "name":"DBCA_TEMPLATE:REDO_FILE_LOCATION", "value":"{ORACLE_BASE}/mydir/fra"  },
             {"name":"DBAAS_SSA_CUSTOM_PRE_SCRIPTS_URN","value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1"},
             {"name":"DBAAS_SSA_CUSTOM_POST_SCRIPTS_URN","value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1"},
             {
                "name":"INIT_PARAMS",
                "subconfigurations":[
                   { "name":"INIT_PARAMS:1", "value":"sga_target=1073741824" },
                   { "name":"INIT_PARAMS:2", "value":"pga_aggregate_target=1073741824"  }
                ]
             }
          ],
          "payloads":[
             {
                "id":"4",
                "name":"oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:E482D893171AC51BE040F00A87254669:0.1"
             },
             {
                "id":"3",
                "name":"oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:E482D893171AC51BE040F00A87254669:0.1"
             }
          ],
     
    { "name":"STANDBY_REQUIRED","value":"true" },
    { "name":"STANDBY_REQUIRED_LOCK","value":"false" },
    { "name":"STANDBY_WORK_DIR","value":"/tmp" },
    { "name":"PRIMARY_PROTECTION_MODE","value":"MAXIMIZE AVAILABILITY" },
    { "name":"DBAAS_SSA_STANDBY_CUSTOM_PRE_SCRIPTS_URN","value":"" },
    { "name":"DBAAS_SSA_STANDBY_CUSTOM_POST_SCRIPTS_URN","value":"" },
    { "name":"STANDBY_DB_DETAILS","value":"","values":[
    "pool=RAC_11204_Tier_2;databaseSIDPrefix=;databaseType=rac_database;standbyConfigName=Near DR;redoMode=SYNC;realtimeQuery=true;databaseRACInstanceCount=2;databaseDelay=30;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.oracle.com",
    "pool=SI_11204;databaseSIDPrefix=;databaseType=oracle_database;standbyConfigName=Far DR;redoMode=ASYNC;realtimeQuery=false;databaseRACInstanceCount=2;databaseDelay=60;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.oracle.com"]} 
        }
    }
    

    Note:

    To get the software library ID of the "DBAAS_SSA_CUSTOM_PRE_SCRIPTS_URN" and "DBAAS_SSA_CUSTOM_POST_SCRIPTS_URN" run the EM CLI command emcli list_swlib_entities -name="<Pre or Post Standby Database Script>" -show_entity_rev_id. The ID is provided at the end of the output. For example, in the output shown below, oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1 is the ID.
    Pre or Post Standby Database Script,0.1,Pre or Post Standby Database Script,Ready,Directives,,Production,ORACLE,,,oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1
    
  • Method

    POST

The response from the above interaction is shown below.

{
        "name":"TestDbTemplate1",
        "serviceFamily":"DBAAS",
        "serviceType":"DB",
        "type":"Service Template",
        "description":"This is a test database dbca service template 1",
        "id":"E88690EB9B2DB218E040F20A605108AF",
        "pools":[
                {
                "name":"DB_POOL",
                "id":"F66D9FD94B4651A007D48A5732F3284F",
                "type":"oracle_cloud_zone",
                "zone": { 
"id":"2F1E72A95EC21F8F666451B5413FF99A", "name":"ABC_ZONE"
                        }
                }
                ],
        "roles":[
                {        "name":"SSA_USER_ROLE1","description":null }
        ],
        "serviceExecutableMeta":{
                "type":"CDP",
                "configurations":[
                        {
                        "id":"INIT_PARAMS",
                        "name":"Initialization parameter values",
                        "value":"",
                        "values":["pga_aggregate_target=1073741824","sga_target=1073741824"]
                        },
                        {
                        "id":"PROFILE_COMPONENT_URN",
                        "name":"URN of the Profile Component to be used for Database Creation",                                 "value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbCreateTemplate:E87A7B5AA40CC345E040F20A605121D6:0.1"
                        },
                        {
                        "id":"DATABASE_TYPE",
                        "name":"Database Type",
                        "value":"oracle_database"
                        },
                        {
                        "id":"DBAAS_SSA_CUSTOM_PRE_SCRIPTS_URN",
                        "name":"Pre-script",
                        "value":""
                        },
                        {
                        "id":"DBAAS_SSA_CUSTOM_POST_SCRIPTS_URN",
                        "name":"Post-script",
                        "value":""
                        },
                        {
                        "id":"USER_NAME",
                        "name":"User Name (cannot be any of Oracle default accounts)",
                        "value":""
                        },
                        {
                        id":"USER_PASSWORD",
                        "name":"User Password"
                        },
                        {
                        "id":"INSTANCE_COUNT",
                        "name":"Number of RAC Database Instances",
                        "value":"2"
                        },
                        {
                        "id":"COMMON_DB_SYSTEM_PASSWORD",
                        "name":"SYSTEM Account password",
                        "value":"welcome"
                        },
                        {
                        "id":"COMMON_DB_DBSNMP_PASSWORD",
                        "name":"DBSNMP Account password",
                        "value":"welcome"
                        },
                        {
                        "id":"COMMON_DB_SYS_PASSWORD",
                        "name":"SYS Account password",
                        "value":"welcome"
                        },
                        {
                        "id":"DB_ADMIN_PASSWORD_SAME",
                        "name":"Use the same passwords for SYS, SYSTEM and DBSNMP account",
                        "value":"true"
                        },
                        {
                        "id":"COMMON_DB_SID",
                        "name":"Database SID Prefix",
                        "value":"mydb1"
                        },
                        {
                        "id":"COMMON_DOMAIN_NAME",
                        "name":"Database Domain Name",
                        "value":"us.oracle.com"
                        },
                        {
                        "id":"LISTENER_PORT",
                        "name":"Listener Port",
                        "value":"1521"
                        },
                        {
                        "id":"ALLOW_BACKUPS",
                        "name":"Enable Backups for the Database",
                        "value":""
                        },
                        {
                        "id":"MAX_BACKUPS_ALLOWED",
                        "name":"Number of Backups allowed for the Database",
                        "value":""
                        },
                        {
                        "id":"NONADMIN_SSA_ACC_DB_USER_NAMES",
                        "name":"Non Admin SSA Accessible users",
                        "value":""
                        },
                        {
                        "id":"DB_USER_NAMES",
                        "name":"Database Users from source",
                        "value":""
                        },
                        {
                        "id":"DB_USER_PASSWORDS",
                        "name":"Passwords for Database"
                        },
                        {
                        "id":"STANDBY_REQUIRED",
                        "name":"STANDBY_REQUIRED",
                        "value":"true"
                        },
                        {
                        "id":"STANDBY_REQUIRED_LOCK",
                        "name":"STANDBY_REQUIRED_LOCK",
                        "value":"false"
                        },
                        {
                        "id":"STANDBY_LISTENER_PORT",
                        "name":"STANDBY_LISTENER_PORT",
                        "value":""
                        },
                        {
                        "id":"STANDBY_DATABASE_MASTER",
                        "name":"STANDBY_DATABASE_MASTER",
                        "value":""
                        },
                        {
                        "id":"STANDBY_COMMON_DB_SID",
                        "name":"STANDBY_COMMON_DB_SID",
                        "value":""
                        },
                        {
                        "id":"STANDBY_DB_DETAILS",
                        "name":"STANDBY_DB_DETAILS",
                        "value":"",
                                "values":["pool=RAC_11204_Tier_2;databaseSIDPrefix=;databaseType=rac_database;standbyConfigName=Near DR;redoMode=SYNC;realtimeQuery=true;databaseRACInstanceCount=2;databaseDelay=30;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.oracle.com", "pool=SI_11204;databaseSIDPrefix=;databaseType=oracle_database;standbyConfigName=Far DR;redoMode=ASYNC;realtimeQuery=false;databaseRACInstanceCount=2;databaseDelay=60;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.oracle.com"]
},
                        {
                        "id":"STANDBY_DELAY_DATABASE_MASTER",
                        "name":"STANDBY_DELAY_DATABASE_MASTER",
                        "value":""
                        },
                        {
                        "id":"STANDBY_WORK_DIR",
                        "name":"STANDBY_WORK_DIR",
                        "value":"/tmp"
                        },
                        {
                        "id":"PRIMARY_PROTECTION_MODE",
                        "name":"PRIMARY_PROTECTION_MODE",
                        "value":"MAXIMIZE AVAILABILITY"
                        },
                        {
                        "id":"DBAAS_SSA_STANDBY_CUSTOM_PRE_SCRIPTS_URN",
                        "name":"URN of the standby pre sql custom script",
                        "value":""
                        },
                        {
                        "id":"DBAAS_SSA_STANDBY_CUSTOM_POST_SCRIPTS_URN",
                        "name":"URN of the standby post sql custom script",
                        "value":""
                        },
                        {
                        "id":"CLONE_OR_FULL_DB",
                        "name":"CLONE_OR_FULL_DB",
                        "value":""
                        },               
                ]
        },
        "createdOn":null,
        "createdBy":null,
        "modifiedOn":null,
        "modifiedBy":null,
        "owner":"SYSMAN",
        "etag":null,
        "lastModified":null,
        "canonicalLink":"https://abc.mycompany.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/servicetemplates/E88690EB9B2DB218E040F20A605108AF",
        "selfLink":"https://abc.mycompany.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/servicetemplates/E88690EB9B2DB218E040F20A605108AF"
}
32.2.5.3.4 Creating a Schema Service Template

A POST operation is issued on Service Templates Collection resource to create a Schema Service Template.The configuration for POST to ServiceTemplates is as follows:

  • URL

    https:// cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/servicetemplates

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/json

  • Body

    {
                    "name":"TestSchaasTemplate3",
                    "serviceType":"SCHEMA",
                    "serviceFamily":"DBAAS",
                    "description":"This is a test schaas service template 1",
                    "poolIds":[ "9D3187DE6B1115791D71D2827FB98558" ],
                    "roles":[
                            { "name":"SSA_USER_ROLE1" }
                    ],
               "serviceExecutableMeta":{
                    "type":"CDP",
                    "configurations":[
                    { "name":"ROLE_NAME", "value":"SampleRole" },
                    { "name":"MAX_NUMBER_OF_SCHEMAS","value":"2" },
                    { "name":"ENFORCE_STORAGE_CONSTRAINT","value":"NO_LIMIT" },
                    { "name":"AUTO_EXTEND_BLOCK_SIZE","value":"1024" },
                    { "name":"REF_ZONE","value":"ABC_ZONE" },
                    { "name":"REF_POOL","value":"SCH_POOL" },
                    { "name":"REF_HOST","value":"abc.mycompany.com" },
                    { "name":"REF_DB","value":"simple.us.oracle.com" },
                    { "name":"CREATE_SCHEMA_OPTION","value":"EMPTY_SCHEMAS" },
                    { "name":"SCHAAS_CUSTOM_PRE_SCRIPTS_URN","value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1"},
                    { "name":"SCHAAS_CUSTOM_POST_SCRIPTS_URN","value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1"},
                    { 
                       "name":"REMAP_TABLESPACE_LIST",
                       "value":"",
                       "values":["TBSP1","TBSP2","TBSP3"]
                    },
                    { 
                       "name":"REMAP_TABLESPACE_INIT_SIZE_LIST",
                       "value":"",
                       "values":["TBSP1:0.1","TBSP2:0.2","TBSP3:0.3"]
                    },
                    { 
                       "name":"REMAP_TABLESPACE_INCR_SIZE_LIST",
                       "value":"",
                       "values":["TBSP1:0.1","TBSP2:0.2","TBSP3:0.3"]
                    },
                    { 
                       "name":"REMAP_TABLESPACE_MAX_SIZE_LIST",
                       "value":"",
                       "values":["TBSP1:50.0","TBSP2:30","TBSP3:20"]
                    },               
            
                    { "name":"CREATE_SCHEMA_OPTION","value":"EMPTY_SCHEMAS" },
                                    {
                    "name":"WORKLOADS",
                    "subconfigurations":[                    
                    {
                    "name":"WORK_LOADS:1",
                    "subconfigurations":[
                    { "name":"name",  "value":"large "  },
                    { "name":"description", "value":"large workload" },
                    {   "name":"default",    "value":"Y" },
                    {   "name":"CPU",  "value":"6" },
                    {   "name":"Memory", "value":"4048"    },
                    {   "name":"Storage", "value":"2024"   }
                    ]
            }
            ]
            }
            ]
            }
            }
    

    Note:

    To get the software library ID of the "SCHAAS_CUSTOM_PRE_SCRIPTS_URN" and "SCHAAS_CUSTOM_POST_SCRIPTS_URN" run the EM CLI command emcli list_swlib_entities -name="<Pre or Post Standby Database Script>" -show_entity_rev_id. The ID is provided at the end of the output. For example, in the output shown below, oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1 is the ID.
    Pre or Post Standby Database Script,0.1,Pre or Post Standby Database Script,Ready,Directives,,Production,ORACLE,,,oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1
    
  • Method

    POST

The response from the above interaction is shown below.

{
  "name": "TestSchaasTemplate3",
  "serviceFamily": "DBAAS",
  "serviceType": "SCHEMA",
  "type": "Service Template",
  "description": "This is a test schaas service template 1",
  "id": "E87A364660A25B39E040F20A60510FDD",
  "pools": [
    {
      "name": "SCH_POOL",
      "id": "9D3187DE6B1115791D71D2827FB98558",
      "type": "schaas_pool",
      "zone": {
        "id": "2F1E72A95EC21F8F666451B5413FF99A",
        "name": "ABC_ZONE"
      }
    }
  ],
  "roles": [
    {
      "name": "SSA_USER_ROLE1",
      "description": null
    }
  ],
  "serviceExecutableMeta": {
    "type": "CDP",
    "configurations": [
      {
        "id": "targets",
        "name": "targets",
        "value": ""
      },
      {
        "id": "ssaRequestId",
        "name": "ssaRequestId",
        "value": ""
      },
      {
        "id": "ssaUser",
        "name": "ssaUser",
        "value": ""
      },
      {
        "id": "ssaTargetName",
        "name": "ssaTargetName",
        "value": ""
      },
      {
        "id": "ssaTargetType",
        "name": "ssaTargetType",
        "value": ""
      },
      {
        "id": "zoneTargetName",
        "name": "zoneTargetName",
        "value": ""
      },
      {
        "id": "zoneTargetType",
        "name": "zoneTargetType",
        "value": ""
      },
      {
        "id": "REQUEST_NAME",
        "name": "REQUEST_NAME",
        "value": ""
      },
      {
        "id": "SERV_TEMPLATE_GUID",
        "name": "SERV_TEMPLATE_GUID",
        "value": ""
      },
      {
        "id": "CREATE_SCHEMA_OPTION",
        "name": "Option for creating user schemas",
        "value": "EMPTY_SCHEMAS"
      },
      {
        "id": "MAX_NUMBER_OF_SCHEMAS",
        "name": "Maximum number of schemas permissible",
        "value": "2"
      },
      {
        "id": "DB_PROFILE_URN",
        "name": "Database Profile Component's URN",
        "value": ""
      },
      {
        "id": "REMAP_SCHEMA_LIST",
        "name": "Schema list",
        "value": "",
        "values": []
      },
      {
        "id": "MASTER_ACCOUNT",
        "name": "Master Account",
        "value": ""
      },
      {
        "id": "ROLE_NAME",
        "name": "Database Role Name",
        "value": "TestSchaasTemplate3_Oct_11_"
      },
      {
        "id": "SCHEMA_PRIVILEGES",
        "name": "Schema Privileges",
        "value": "",
        "values": [
          "CREATE TYPE",
          "CREATE SEQUENCE",
          "CREATE DIMENSION",
          "CREATE INDEXTYPE",
          "CREATE SESSION",
          "CREATE SYNONYM",
          "CREATE OPERATOR",
          "CREATE VIEW",
          "CREATE TABLE",
          "CREATE TRIGGER",
          "CREATE PROCEDURE"
        ]
      },
      {
        "id": "ENFORCE_STORAGE_CONSTRAINT",
        "name": "Enforces Storage Constraint",
        "value": "false"
      },
      {
        "id": "INITIAL_BLOCK_SIZE",
        "name": "Initial Storage Size",
        "value": ""
      },
      {
        "id": "AUTO_EXTEND_BLOCK_SIZE",
        "name": "Auto extend block size",
        "value": ""
      },
      {
        "id": "TABLESPACE_ENCRYPTION_ALGORITHM",
        "name": "Tablespace Encryption",
        "value": ""
      },
      {
        "id": "SHARED_STAGE_LOCATION",
        "name": "Staging Location",
        "value": ""
      },
      {
        "id": "WORKING_DIRECTORY",
        "name": "Working Directory",
        "value": ""
      },
      {
        "id": "SCHAAS_CUSTOM_PRE_SCRIPTS_URN",
        "name": "Pre-script",
        "value": ""
      },
      {
        "id": "SCHAAS_CUSTOM_POST_SCRIPTS_URN",
        "name": "Post-script",
        "value": ""
      },
      {
        "id": "SCHEMA_PASSWORD_LIST",
        "name": "Schema password list",
        "value": "",
        "values": []
      },
      {
        "id": "CUSTOM_USER_SELECTED_SCRIPT_URN",
        "name": "Custom Script URN",
        "value": "",
        "values": []
      },
      {
        "id": "DBSERVICE_NAME",
        "name": "Database Service Name",
        "value": ""
      }
    ]
  },
  "createdOn": null,
  "createdBy": null,
  "modifiedOn": null,
  "modifiedBy": null,
  "owner": "SYSMAN",
  "etag": null,
  "lastModified": null,
  "canonicalLink": "https://abc.mycompany.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/servicetemplates/E87A364660A25B39E040F20A60510FDD",
  "selfLink": "https://abc.mycompany.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/servicetemplates/E87A364660A25B39E040F20A60510FDD"
}
32.2.5.3.5 Creating a Pluggable Database Service Template

A POST operation is issued on ServiceTemplates Collection resource to create a Pluggable Database ServiceTemplate.The configuration for POST to ServiceTemplates is as follows:

  • URL

    https:// cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/servicetemplates

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/json

  • Body

    {
        "name":"TestPDbTemplate1",
        "serviceType":"PDB",
        "serviceFamily":"DBAAS",
        "description":"This is a test pluggable database service template 1",
        "poolIds":[ "FF394120842D8C71CC92BE6A4D5A488E" ],     
        "roles":[
            { "name":"SSA_USER_ROLE1" }
        ],
       "serviceExecutableMeta":{
            "type":"CDP",
            "configurations":[
             {
                "name":"TABLESPACE_ENCRYPTION_ALGORITHM",
                "subconfigurations":[
                   {  "name":"name", "value":"NONE" }
                ]
             },
             {  "name":"MAX_TABLESPACE_ALLOWED", "value":"2" },
             {  "name":"PDB_SID_PREFIX", "value":"mypdb" },
             {  "name":"ENFORCE_STORAGE_CONSTRAINT", "value":"NO_LIMIT" },
             {  "name":"AUTO_EXTEND_BLOCK_SIZE","value":"1024" },
             {  "name":"REF_DATA_ZONE", "value":"PDB_Zone" },             
             {  "name":"REF_DATA_TARGET", "value":"database" },          
             {  "name":"REF_DATA_TARGET_TYPE", "value":"oracle_database" },                
             {  "name":"REF_DATA_POOL","value":"PDB_POOL" },
             {  "name":"REF_DATA_HOST", "value":"abc.mycompany.com" },
             {  "name":"CREATE_PDB_OPTION", "value":"EMPTY_PDB" },
             {"name":"PDBAAS_CUSTOM_PRE_SCRIPTS_URN","value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1"},
             {"name":"PDBAAS_CUSTOM_POST_SCRIPTS_URN","value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1"},
        {  "name":"PRIVILEGES",
                   "value":"",            
                   "values":["CREATE TYPE","CREATE VIEW","CREATE DIMENSION","CREATE SESSION","CREATE TRIGGER","CREATE OPERATOR","CREATE SYNONYM","CREATE TABLE","CREATE PROCEDURE","CREATE INDEXTYPE","CREATE SEQUENCE"]
                },
             {  "name":"ROLE_OPTION","value":"CUSTOM_NEW_ROLE" },
             {
                "name":"INIT_PARAMS",
                "subconfigurations":[
                   { "name":"INIT_PARAMS:1", "value":"*.cursor_sharing=EXACT" },
                   { "name":"INIT_PARAMS:2", "value":"*.open_cursors=200"  }
                ]
             },
                     {
                "name":"WORKLOADS",
                "subconfigurations":[
                   {
                      "name":"WORK_LOADS:1",
                      "subconfigurations":[
                         { "name":"name", "value":"SmallPdb" },
                         { "name":"description", "value":"small workload" },
                         {  "name":"default", "value":"N" },
                         {  "name":"CPU", "value":"2" },
                         {  "name":"Memory", "value":"2048" },
                         {  "name":"Storage", "value":"1024" },
                         {  "name":"Sessions", "value":"100" }
                      ]
                   }
                ]
             }
          ]
       }
    }
    

    Note:

    To get the software library ID of the "PDBAAS_CUSTOM_PRE_SCRIPTS_URN" and "PDBAAS_CUSTOM_POST_SCRIPTS_URN" run the EM CLI command emcli list_swlib_entities -name="<Pre or Post Standby Database Script>" -show_entity_rev_id. The ID is provided at the end of the output. For example, in the output shown below, oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1 is the ID.
    Pre or Post Standby Database Script,0.1,Pre or Post Standby Database Script,Ready,Directives,,Production,ORACLE,,,oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1
    
  • Method

    POST

    The response from the above interaction is shown below.

    {
    "name":"TestPDbTemplate1",
    "serviceFamily":"DBAAS",
    "serviceType":"PDB",
    "type":"Service Template",
    "description":"This is a test pluggable database service template 1",
    "id":"E8887DEEE424BEAEE040F20A605118CE",
    "pools":[
            {
            "name":"PDB_POOL",
            "id":"FF394120842D8C71CC92BE6A4D5A488E",
            "type":"pdbaas_pool",
            "zone":{"id":"B60C4DA1398F41BEBC862D5A10A0C713", 
                    "name":"PDB_Zone"}
            }
    ],
    "roles":[
            {"name":"SSA_USER_ROLE1","description":null}
            ],
    "serviceExecutableMeta":{
            "type":"CDP",
            "configurations":[
            {"id":"CREATE_PDB_OPTION","name":"Option for creating Pluggable Database","value":"EMPTY_PDB"},
            {"id":"PROFILE_URN","name":"Profile Component's URN","value":""},
            {"id":"MAX_TABLESPACE_ALLOWED","name":"Maximum number of Tablespaces","value":"2"},
    {"id":"ENFORCE_STORAGE_CONSTRAINT","name":"Enforce Storage Constraint","value":"false"},
            {"id":"TABLESPACE_ENCRYPTION_ALGORITHM","name":"Tablespace Encryption","value":"","values":["NONE"]},
            {"id":"TABLESPACE_SIZE","name":"Tablespace Size","value":"","values":[]},
            {"id":"SHARED_STAGE_LOCATION","name":"Staging Location","value":""},
            {"id":"WORKING_DIRECTORY","name":"Working Directory","value":""},
            {"id":"PDBAAS_CUSTOM_PRE_SCRIPTS_URN","name":"URN of the pre sql custom script","value":""},
            {"id":"PDBAAS_CUSTOM_POST_SCRIPTS_URN","name":"URN of the post sql custom script","value":""},
            {"id":"PDB_SID_PREFIX","name":"Pluggable Database SID Prefix","value":"mypdb"},
            {"id":"PDB_ADMIN_USER_NAME","name":"Pluggable Database Administrator","value":""},
            {"id":"PDB_ADMIN_PASSWORD","name":"Pluggable Administrator Password"},
            {"id":"PDB_SERVICE_NAME_PREFIX","name":"Pluggable Database Service Name Prefix","value":""},
            {"id":"PDBSERVICE_NAME","name":"Pluggable Database Service Name","value":""},
            {"id":"ROLE_OPTION","name":"Role Option Custom New Role/ Existing Roles","value":"CUSTOM_NEW_ROLE"},
            {"id":"INIT_PARAMS","name":"Initialization parameter values passed as list","value":"","values":["*.open_cursors=200","*.cursor_sharing=EXACT"]},
            {"id":"CUSTOM_ROLE_NAME","name":"Database Role Name","value":"PDBAAS_OCT_12_2013_02_13_AM"},
            {"id":"CUSTOM_ROLE_DESC","name":"Database Role Description","value":"New db role to be assigned to pluggable database administrator."},
            {"id":"PRIVILEGES","name":"Custom Role Privileges","value":"","values":["CREATE ANY SYNONYM","CREATE ANY OPERATOR","CREATE SESSION","CREATE JOB","CREATE ANY TYPE","CREATE INDEXTYPE","SELECT ANY DICTIONARY","CREATE ANY SEQUENCE","CREATE DIMENSION","CREATE ANY DIRECTORY","CREATE ANY INDEX","CREATE ANY TABLE","CREATE ANY PROCEDURE","ALTER SESSION","CREATE ANY MATERIALIZED VIEW","CREATE ANY TRIGGER","CREATE ANY VIEW"]},
            {"id":"ROLES","name":"List of roles selected from reference database","value":"","values":[]}
                    ]
            },
    "createdOn":null,
    "createdBy":null,
    "modifiedOn":null,
    "modifiedBy":null,
    "owner":"SYSMAN",
    "etag":null,
    "lastModified":null,
    "canonicalLink":"https://abc.mycompany.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/servicetemplates/E8887DEEE424BEAEE040F20A605118CE",
    "selfLink":"https://abc.mycompany.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/servicetemplates/E8887DEEE424BEAEE040F20A605118CE"
    }
    
32.2.5.3.6 Deleting a Database / Schema / Pluggable Database Service Template

The DELETE request on the URI of the Service Template can be issued to delete a ServiceTemplate Instance. The configuration for deleting in ServiceTemplate is as follows:

  • URL

    https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/servicetemplates/ E87A364660A25B39E040F20A60510FDD

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

  • Method

    DELETE

The response from the above interaction is shown below.

{
  "message": "Service Template \"E87A364660A25B39E040F20A60510FDD\" deleted successfully."
}

32.3 REST APIs for SSA User Flows

The REST APIs for the SSA user are classified based on the database type. The sections under which these APIs are covered are listed below.

32.3.1 Database as a Service APIs

This section describes the resource model for Database as a Service (DBaaS) APIs, and the REST request or response interactions.

This section contains the following topics:

Note:

DBaaS APIs are only supported by the Oracle Cloud Application plug-in versions:
  • 12.1.0.4.0 with patch # 16085618

  • 12.1.0.5.0 and higher

32.3.1.1 Resource Model for Database as a Service

Cloud resources are organized by common service entities and specific services (for example, Database as a Service) provide resources by extending these common service entities. Figure 32-2 shows the DBaaS resource model:

Figure 32-2 Database as a Service Resource Model

dbaas resource model

The following sections describe the resources that are supported by the Database as a Service family type and provide examples of supported operations.

The resource models are:

32.3.1.1.1 DB Zone

DB Zone extends application/oracle.com.cloud.common.Zone. This resource represents the view of a PaaS Infrastructure Zone that supports DBaaS resources. DB Zone has the following media type and payload:

Type Description
Media Type application/oracle.com.cloud.common.DbZone+json
Support Payload json
URI Format /em/cloud/dbaas/zone/<zone id>

The following table describes the DB Zone data model.

Table 32-18 DB Zone Data Model

Field Type Occurs Description

uri

URI

1

A GET against this URI refreshes the client representation of the Zone definition to this user.

name

String

1

Name of the Zone. SHALL be a UNICODE string to support different languages.

description

String

0..1

Human readable description of the Zone. SHALL be a UNICODE string to support different languages.

resource_state

ResourceState

1

The resource state of the resource.

context_id

String

1

Zone GUID

resource_state

ResourceState

1

The resource state of the resource.

service_family_type

String

1

The name of the service family type that this zone is associated with.

It is "dbaas" for this.

templates

Collection <ServiceTemplate>

1

Collection of the service templates that this zone supports and can be deployed into. Currently, DBPlatformTemplate is the only supported type.

service_instances

Collection <ServiceInstance>

1

Collection of the service instances that are created in this zone.

media_type

String

1

The media type of the resource.

canonicalLink

URI

1

Can be used to perform cloud interactions like GET and POST.


32.3.1.1.2 DB Platform Template

The DB Platform Template extends the Service Template resource. This resource represents service templates created for creating databases. The databases may be created using profiles which are created using database templates, rman backups, and SnapClone. It is permissible to accept the Service Template media type on an instance of DB Platform Template. It is a preconfigured deployable service that realizes a DB Platform Instance resource. DB Platform Template has the following media type and payload:

Type Description
Media Type application/oracle.com.cloud.common.DbPlatformTemplate+json
Support Payload json
URI Format /em/cloud/dbaas/dbplatformtemplate/<template id>

The following table describes the DB Platform Template data model.

Table 32-19 DB Platform Template Data Model

Field Type Occurs Description

uri

URI

1

A GET against this URI refreshes the client representation of the resources accessible to this user.

name

String

1

A human readable name given to the template.

description

String

0..1

A brief description given to the template

created

Timestamp

1

Date and time, in ISO 8601 format, when the template was created/last modified.

zones

Collection <DbZone>

1

List of all zones on which this service template is published

resource_state

ResourceState

1

The validity of the fields on a GET should be guaranteed only when the resource state is READY. Otherwise, the client should not assume the validity of the fields.

service_family_type

String

1

Denotes the type of Service Template. For example, "dbaas".

service_instances

Collection <DBPlatformInstance>

1

All service instances created based on this DBPlatformTemplate.

media_type

String

1

The media type of the service template that this type represents.

db_type

String

1

Type of the Database when provisioned. It can have one of the two values: "oracle_database" and "rac_database".

instance_configurable_params

String[]

1

List of parameters required to provision a DbPlatformInstance from this template. Username and Password in this case.

deployment_params

List<Object>

1

Description of the parameters (username and password) which are required while creating a service instance.

type

String

1

The type of the service template which is "dbaas" by default.

subtype

String

1

The sub type of the instance created based on this template.

It has a value "db" in this case.

node_count

 

0..1

Number of Nodes. Implicit 1 for SI DB and explicit count for the RAC Db types.

db_version

String

0..1

Version of the database which can be created using this template.

context_id

URI

1

The unique id of the template.

canonicalLink

URI

1

Can be used to perform cloud interactions like GET and POST.

sid_option

String

1

Option for the ssa user to specify database SID while requesting DB. This field can have either of the following values:

  • 'ssauser' - SSA user needs to specify SID

  • 'prefix' - SSA user need not to specify SID

standby_enabled

String

1

Indicates whether standby is enabled in the template.

standbydbs

List<Object>

1

List of standby database configurations.

standby_protection_mode

String

1

Indicates the protection mode of the standby database.


32.3.1.1.3 DB Platform Instance

The DB Platform Instance extends the Service Instance resource. It is linked to an Oracle Database Instance or Cluster Database target in Enterprise Manager Cloud Control. DB Platform Instance has the following media type and payload:

Type Description
Media Type application/oracle.com.cloud.common.DbPlatformInstance+json
Support Payload json
URI Format /em/cloud/dbaas/dbplatforminstance/byrequest/<request id>

The following table describes the DB Platform Instance Data Model.

Table 32-20 DB Platform Instance Data Model

Field Type Occurs Description

uri

URI

1

A GET against this URI refreshes the client representation of the resources accessible to this user.

name

String

1

A human readable name given to the instance.

[POST]

destination_zone

Zone

1

The Zone to which the instance is deployed.

[POST]

media_type

String

1

Indicates the additional media type that clients can use to perform a GET.

available_space

Float

0..1

Available space for this database instance.

resource_state

ResourceState

1

The validity of the fields on a GET should be guaranteed only when the resource state is READY. Otherwise, the client should not assume the validity of the fields.

based_on

DbPlatformTemplate

1

The db platform template on which this instance is published.

connect_string

String

0..1

Connect String required to establish a connection to this database instance.

created

String

1

Time of creation.

target_type

String

1

Indicates the type of the database: "oracle_database" for Single Instance database and "rac_database" for RAC database.

status

String

1

Status of the Database instance.

db_version

String

0..1

Version of the Database.

last_backup

Timestamp

0..1

Time at which the last backup of this database was taken.

load

Float

0..1

Current average active sessions of this instance.

master_username

String

1

Name of the master user of this database.

total_sessions

Integer

0..1

Total number of sessions for this database

total_sga^

Float

0..1

Total SGA for this database.

up_time^

Integer

1

Total number of hours since when this database is up.

context_id

String

1

The request id of this instance.

canonicalLink

URI

1

Can be used to perform cloud interactions like GET and DELETE for this instance.

instances

List<Object>

0..1

List all the node level details of the database instance (exists only when the type is "rac_database").

measurable_attributes

List<Object>

1

List of all the attributes with their units which can be measured.

total_memory*^

String

0..1

Total memory used by the instance (node).

active_sessions*

Float

0..1

Current average active sessions for this instance (node).

cpu_utilization*^

Percentage

0..1

CPU utilization of this instance (node).

db_time*^

Float

0..1

Database time of this instance (node).

cpu_count*^

Integer

0..1

Number of CPU cores on the host on which the instance (node) is deployed.

allocated_sessions*

Integer

0..1

Number of sessions currently allocated.

name*

String

0..1

Name of the node (exists as an field in the list of "instances" field).

standby_databases

List<Object>

1

List of standby databases configured for this instance.

standby_database_configured

String

1

Indicates if standby database is configured for this service instance.


Note:

* In case of database instance type "oracle_database", the above fields exist as it is in the DBPlatformInstance Data model. In case of type "rac_database", these fields exist as part of "instances" field and occur for each node of the cluster database.

^ - These attributes can be measured in units and so are represented as Json Objects (like a map) having "name" (as the name of the attribute), "value" (as the value of the attribute) and "units" (as the unit of the attribute). Each such field is a list element of "measurable_attributes" field (which exists at instance level for oracle_database and at RAC node level in case of rac_database).

32.3.1.2 Supported Operations for DBaaS Resources

The following table lists all the operations that are supported on the various Database as a Service resources.

Table 32-21 Supported Operations for DBaaS Resources

Resource Supported Operations (GET, POST, PUT, and DELETE)

Cloud

GET

Service Family Type

GET

DB Zone

GET, and POST

DB Platform Template [Service Template]

GET, and POST

DB Platform Instance [Service Instance]

GET, POST, and DELETE


32.3.1.3 Database as a Service API Examples

The following sections provide examples of interaction with Enterprise Manager Cloud Control 12.1.0.2 with Cloud Application plug-in 12.1.0.4 and higher. The following examples are covered:

32.3.1.3.1 Viewing Details of All the Cloud Resources

Use the top level /em/cloud to introspect the Cloud resource. The operation explained herein lists all the resources accessible to the user.

  • URL

    https://example.us.oracle.com/em/cloud

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=X-specification-Version: 10001

  • Method

    GET

The Cloud resource is as follows:

{
  "uri": "/em/cloud",
  "name": "Oracle Cloud by Enterprise Manager",
  "description": "This represents the Cloud resource of the Oracle Enterprise Manager Cloud Management solution",
  "resource_state": {
    "state": "READY"
  },
  "media_type": "application/oracle.com.cloud.common.Cloud+json",
  "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud",
  "zones": {
    "media_type": "application/oracle.com.cloud.common.Zone+json",
    "total": "4",
    "elements": [
      {
        "uri": "/em/cloud/jaas/zone/9708491651C090AB4B847C2F3CD177DE",
        "name": "SLC00ECXY_ZONE",
        "media_type": "application/oracle.com.cloud.jaas.Zone+json",
        "service_family_type": "jaas",
        "type": "jaas",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/jaas/zone/9708491651C090AB4B847C2F3CD177DE"
      },
      {
        "uri": "/em/cloud/jaas/zone/B329742A13BE0D63703BF0C0E4F98FB9",
        "name": "SLC01NBV_ZONE",
        "media_type": "application/oracle.com.cloud.jaas.Zone+json",
        "service_family_type": "jaas",
        "type": "jaas",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/jaas/zone/B329742A13BE0D63703BF0C0E4F98FB9"
      },
      {
        "uri": "/em/cloud/dbaas/zone/9708491651C090AB4B847C2F3CD177DE",
        "name": "SLC00ECXY_ZONE",
        "description": "",
        "media_type": "application/oracle.com.cloud.common.DbZone+json",
        "service_family_type": "dbaas",
        "type": "self_service_zone",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/zone/9708491651C090AB4B847C2F3CD177DE"
      },
      {
        "uri": "/em/cloud/dbaas/zone/B329742A13BE0D63703BF0C0E4F98FB9",
        "name": "SLC01NBV_ZONE",
        "description": "SLC01NBV_ZONE",
        "media_type": "application/oracle.com.cloud.common.DbZone+json",
        "service_family_type": "dbaas",
        "type": "self_service_zone",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/zone/B329742A13BE0D63703BF0C0E4F98FB9"
      }
    ]
  },
  "service_templates": {
    "media_type": "application/oracle.com.cloud.common.ServiceTemplate+json",
    "total": "2",
    "elements": [
      {
        "uri": "/em/cloud/dbaas/dbplatformtemplate/DEC94FE6D49DAA21E040F20A60511D14",
        "name": "SLC01NBV_SNAPCLONE_ST",
        "description": "",
        "media_type": "application/oracle.com.cloud.common.DbPlatformTemplate+json",
        "service_family_type": "dbaas",
        "type": "dbaas",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatformtemplate/DEC94FE6D49DAA21E040F20A60511D14"
      },
      {
        "uri": "/em/cloud/dbaas/dbplatformtemplate/DECCA0E18357F28DE040F20A60514D49",
        "name": "SLC00ECXY_DBCA_ST",
        "description": "",
        "media_type": "application/oracle.com.cloud.common.DbPlatformTemplate+json",
        "service_family_type": "dbaas",
        "type": "dbaas",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatformtemplate/DECCA0E18357F28DE040F20A60514D49"
      }
    ]
  },
  "service_family_types": {
    "media_type": "application/oracle.com.cloud.common.ServiceFamilyType+json",
    "total": "4",
    "elements": [
      {
        "uri": "/em/cloud/service_family_type/jaas",
        "name": "jaas",
        "media_type": "application/oracle.com.cloud.common.ServiceFamilyType+json",
        "type": "jaas",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/service_family_type/jaas"
      },
      {
        "uri": "/em/cloud/service_family_type/dbaas",
        "name": "dbaas",
        "media_type": "application/oracle.com.cloud.common.ServiceFamilyType+json",
        "type": "dbaas",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/service_family_type/dbaas"
      },
      {
        "uri": "/em/cloud/service_family_type/opc",
        "name": "opc",
        "media_type": "application/oracle.com.cloud.common.ServiceFamilyType+json",
        "type": "opc",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/service_family_type/opc"
      },
      {
        "uri": "/em/cloud/service_family_type/iaas",
        "name": "iaas",
        "media_type": "application/oracle.com.cloud.iaas.IaasServiceFamilyType+json",
        "type": "iaas",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/service_family_type/iaas"
      }
    ]
  },
  "service_requests": {
    "media_type": "application/oracle.com.cloud.common.Request+json",
    "total": "1",
    "elements": [
      {
        "uri": "/em/cloud/request/DEC87CE5B1DA175DE040F20A605150F8",
        "name": "SLC01NBV_DBCA_ST - Mon Jun 10 00:20:08 PDT 2013_CREATE_20_25",
        "media_type": "application/oracle.com.cloud.common.Request+json",
        "status": "SUCCESS",
        "lifecycle_type": "CREATE",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/request/DEC87CE5B1DA175DE040F20A605150F8"
      }
    ]
  }
}

Note:

Even though the Accept type was not specified, the Web service still unambiguously returns the cloud resource as the "/em/cloud" address uniquely identifies the cloud as the default resource to be returned.
32.3.1.3.2 Filtering Output for Specific Resource Attributes

The following description indicates the interaction with the cloud resource for identifying specific attributes:

  • URL

    https://example.us.oracle.com/em/cloud?service_family_types,name

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

  • Method

    GET

The selective attributes are as follows:

{
  "name": "Oracle Cloud by Enterprise Manager",
  "service_family_types": {
    "media_type": "application/oracle.com.cloud.common.ServiceFamilyType+json",
    "total": "4",
    "elements": [
      {
        "uri": "/em/cloud/service_family_type/jaas",
        "name": "jaas",
        "media_type": "application/oracle.com.cloud.common.ServiceFamilyType+json",
        "type": "jaas",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/service_family_type/jaas"
      },
      {
        "uri": "/em/cloud/service_family_type/dbaas",
        "name": "dbaas",
        "media_type": "application/oracle.com.cloud.common.ServiceFamilyType+json",
        "type": "dbaas",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/service_family_type/dbaas"
      },
      {
        "uri": "/em/cloud/service_family_type/opc",
        "name": "opc",
        "media_type": "application/oracle.com.cloud.common.ServiceFamilyType+json",
        "type": "opc",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/service_family_type/opc"
      },
      {
        "uri": "/em/cloud/service_family_type/iaas",
        "name": "iaas",
        "media_type": "application/oracle.com.cloud.iaas.IaasServiceFamilyType+json",
        "type": "iaas",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/service_family_type/iaas"
      }
    ]
  }
} 

This feature, where only selective attributes are gathered and returned to the client, is supported on all the common resources.

32.3.1.3.3 Viewing Details of the Service Family Type Resource

The GET operation on the Service Family Type resource lists all the DBaaS resources accessible to a user. The configuration for the Service Family Type resource is as follows:

  • URL

    https://example.us.oracle.com/em/cloud/service_family_type/dbaas

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

  • Method

    GET

The returned headers and content for this interaction is shown below.

X-specification-version: 10001
Content-Type: application/oracle.com.cloud.common.ServiceFamilyType+json; charset=ISO-8859-1
{
  "uri": "/em/cloud/service_family_type/dbaas",
  "name": "dbaas",
  "resource_state": {
    "state": "READY"
  },
  "media_type": "application/oracle.com.cloud.common.ServiceFamilyType+json",
  "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/service_family_type/dbaas",
  "type": "dbaas",
  "service_templates": {
    "media_type": "application/oracle.com.cloud.common.ServiceTemplate+json",
    "total": "2",
    "elements": [
      {
        "uri": "/em/cloud/dbaas/dbplatformtemplate/DEC94FE6D49DAA21E040F20A60511D14",
        "name": "SLC01NBV_SNAPCLONE_ST",
        "description": "",
        "media_type": "application/oracle.com.cloud.common.DbPlatformTemplate+json",
        "service_family_type": "dbaas",
        "type": "dbaas",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatformtemplate/DEC94FE6D49DAA21E040F20A60511D14"
      },
      {
        "uri": "/em/cloud/dbaas/dbplatformtemplate/DECCA0E18357F28DE040F20A60514D49",
        "name": "SLC00ECXY_DBCA_ST",
        "description": "",
        "media_type": "application/oracle.com.cloud.common.DbPlatformTemplate+json",
        "service_family_type": "dbaas",
        "type": "dbaas",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatformtemplate/DECCA0E18357F28DE040F20A60514D49"
      }
    ]
  },
  "zones": {
    "media_type": "application/oracle.com.cloud.common.Zone+json",
    "total": "2",
    "elements": [
      {
        "uri": "/em/cloud/dbaas/zone/9708491651C090AB4B847C2F3CD177DE",
        "name": "SLC00ECXY_ZONE",
        "description": "",
        "media_type": "application/oracle.com.cloud.common.DbZone+json",
        "service_family_type": "dbaas",
        "type": "self_service_zone",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/zone/9708491651C090AB4B847C2F3CD177DE"
      },
      {
        "uri": "/em/cloud/dbaas/zone/B329742A13BE0D63703BF0C0E4F98FB9",
        "name": "SLC01NBV_ZONE",
        "description": "SLC01NBV_ZONE",
        "media_type": "application/oracle.com.cloud.common.DbZone+json",
        "service_family_type": "dbaas",
        "type": "self_service_zone",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/zone/B329742A13BE0D63703BF0C0E4F98FB9"
      }
    ]
  },
  "instance_types": {
    "media_type": "application/oracle.com.cloud.common.InstanceType+json",
    "total": "1",
    "elements": [
      {
        "uri": "/em/cloud/instance_type/dbPlatformInstance%40dbaas",
        "name": "dbPlatformInstance",
        "description": "Db Instance",
        "media_type": "application/oracle.com.cloud.common.InstanceType+json",
        "instance_media_type": "application/oracle.com.cloud.common.DbPlatformInstance+json",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/instance_type/dbPlatformInstance%40dbaas"
      }
    ]
  },
  "service_requests": {
    "media_type": "application/oracle.com.cloud.common.Request+json",
    "total": "1",
    "elements": [
      {
        "uri": "/em/cloud/request/DEC87CE5B1DA175DE040F20A605150F8",
        "name": "SLC01NBV_DBCA_ST - Mon Jun 10 00:20:08 PDT 2013_CREATE_20_25",
        "media_type": "application/oracle.com.cloud.common.Request+json",
        "status": "SUCCESS",
        "lifecycle_type": "CREATE",
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/request/DEC87CE5B1DA175DE040F20A605150F8"
      }
    ]
  }
}

The media type application/oracle.com.cloud.common.ServiceFamilyType+json is returned automatically as the most detailed resource.

32.3.1.3.4 Viewing Details of the Service Instance Type Resource

A GET request on a Service Instance Type resource list all the supported services that are provided by a particular service family type.

  • URL

    https://example.us.oracle.com/em/cloud/instance_type/dbPlatformInstance%40dbaas

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

  • Method

    GET

The Service Instance Type resource is displayed as shown below.

{
  "uri" : "/em/cloud/instance_type/dbPlatformInstance%40dbaas" ,
  "name" : "dbPlatformInstance" ,
  "description" : "Db Instance" ,
  "media_type" : "application/oracle.com.cloud.common.InstanceType+json" ,
  "instance_media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" , ,
  "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/instance_type/dbPlatformInstance%40dbaas"
}
32.3.1.3.5 Viewing Details of the DB Zone

A GET request on a zone lists all the resources available in the zone. The DB zone resource configuration is as follows:

  • URL

    https://example.us.oracle.com/em/cloud/dbaas/zone/82CF1C28FA20A183C99D138FF8065F19

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

  • Method

    GET

Shown below is the Zone resource, automatically cast to the application/oracle.com.cloud.common.DbZone+json media type:

{
  "uri" : "/em/cloud/dbaas/zone/B49F86387B81DAED9A3D672D722CF29D" ,
  "name" : "RAC SSAZONE" ,
  "description" : "SSA Zone with RAC Nodes" ,
  "resource_state" :     {
      "state" : "READY"
    } ,
  "context_id" : "B49F86387B81DAED9A3D672D722CF29D" ,
  "media_type" : "application/oracle.com.cloud.common.DbZone+json" ,
  "service_family_type" : "dbaas" ,
  "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/zone/B49F86387B81DAED9A3D672D722CF29D" ,
  "type" : "self_service_zone" ,
  "service_instances" :     {
      "media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
      "total" : "1" ,
      "elements" : 
      [
          {
            "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/1" ,
            "name" : "db000000.mycompany.com" ,
            "media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
            "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatforminstance/byrequest/1" ,
            "type" : "rac_database"
          }
      ]
    } ,
  "templates" :     {
      "media_type" : "application/oracle.com.cloud.common.DbPlatformTemplate+json" ,
      "total" : "1" ,
      "elements" : 
      [
          {
            "uri" : "/em/cloud/dbaas/dbplatformtemplate/DE039DAC33FFEA6FE040E80A687848A6" ,
            "name" : "12101_RACFileSystem_ServiceTemplate" ,
            "description" : "12101 RAC FileSystem Service Template" ,
            "media_type" : "application/oracle.com.cloud.common.DbPlatformTemplate+json" ,
            "service_family_type" : "dbaas" ,
            "type" : "dbaas" ,
            "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatformtemplate/DE039DAC33FFEA6FE040E80A687848A6"
          }
      ]
    }
}
32.3.1.3.6 Viewing Details of the DB Platform Template Resource

A GET request on the DB Platform Template resource provides details of a DB Service Template.

As shown in previous examples, the elements in the collection shown all have media_type as an attribute to clearly indicate what its resource type is.

  • URL

    https://example.oracle.com/em/cloud/dbaas/dbplatformtemplate/CC3BBB665A6BC6FFE040F00AEF252456

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

  • Method

    GET

The returned DbPlatformTemplate resource is as shown below.

{
  "uri" : "/em/cloud/dbaas/dbplatformtemplate/F985CAE9AB916591E043A4BBF00A235D" ,
  "name" : "Platinum - Star Hotel Application on 2-node RAC Database with Multiple Standbys" ,
  "description" : "Provisions Star Hotel Application on 2-node 11.2.0.4 RAC Database with RAC & SI Standbys" ,
  "resource_state" :     {
      "state" : "READY"
    } ,
  "media_type" : "application/oracle.com.cloud.common.DbPlatformTemplate+json" ,
  "service_family_type" : "dbaas" ,
  "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatformtemplate/F985CAE9AB916591E043A4BBF00A235D" ,
  "type" : "dbaas" ,
  "created" : "2014-05-16T13:57:22+0000" ,
  "zones" :     {
      "media_type" : "application/oracle.com.cloud.common.DbZone+json" ,
      "total" : "1" ,
      "elements" : 
      [
          {
            "uri" : "/em/cloud/dbaas/zone/F985A268D9175B9FE043A4BBF00A3573" ,
            "name" : "Salt Lake City DC" ,
            "description" : "" ,
            "context_id" : "F985A268D9175B9FE043A4BBF00A3573" ,
            "media_type" : "application/oracle.com.cloud.common.DbZone+json" ,
            "service_family_type" : "dbaas" ,
            "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/zone/F985A268D9175B9FE043A4BBF00A3573" ,
            "type" : "self_service_zone"
          }
      ]
    } ,
  "service_instances" :     {
      "media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
      "total" : "1" ,
      "elements" : 
      [
          {
            "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/1" ,
            "name" : "StrwdPlt.us.oracle.com" ,
            "media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
            "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatforminstance/byrequest/1" ,
            "target_type" : "rac_database"
          }
      ]
    } ,
  "deployment_params" : 
  [
      {
        "name" : "username" ,
        "description" : "Master account Username" ,
        "type" : "STRING" ,
        "require" : "true" ,
        "sensitive" : "false"
      } ,
      {
        "name" : "password" ,
        "description" : "Password for the Master account" ,
        "type" : "STRING" ,
        "require" : "true" ,
        "sensitive" : "true"
      } ,
      {
        "name" : "database_sid" ,
        "description" : "Database SID. Required only if sid_option is ssauser." ,
        "type" : "STRING" ,
        "require" : "true" ,
        "sensitive" : "false"
      } ,
      {
        "name" : "service_name" ,
        "description" : "Database Service Name" ,
        "type" : "STRING" ,
        "require" : "true" ,
        "sensitive" : "false"
      } ,
      {
        "name" : "standbydbs" ,
        "description" : "List of the standby databases. Required only if standby database is enabled and required" ,
        "type" : "LIST" ,
        "defaultValue" : 
        [
            {
              "name" : "standbydb_name" ,
              "description" : "Name of the standby database, specified in the standbydbs list" ,
              "type" : "STRING" ,
              "require" : "true" ,
              "sensitive" : "false"
            } ,
            {
              "name" : "standbydb_sid" ,
              "description" : "SID of the standby database" ,
              "type" : "STRING" ,
              "require" : "true" ,
              "sensitive" : "false"
            }
        ] ,
        "require" : "false" ,
        "sensitive" : "false"
      }
  ] ,
  "subtype" : "db" ,
  "db_type" : "rac_database" ,
  "node_count" : "2" ,
  "sid_option" : "ssauser" ,
  "standbydbs" : 
  [
      {
        "standbydb_name" : "Near DR" ,
        "standbydb_type" : "rac_database"
      } ,
      {
        "standbydb_name" : "Far DR" ,
        "standbydb_type" : "oracle_database"
      }
  ] ,
  "standby_enabled" : "true" ,
  "standby_protection_mode" : "MAXIMIZE AVAILABILITY" ,
  "instance_configurable_params" :     {
      "username" : "" ,
      "password" : "" ,
      "database_sid" : "" ,
      "service_name" : ""
    }
}
32.3.1.3.7 Creating a Database Instance

This section describes how to create a service instance using Cloud resources. As DB is a service instance in the service family type dbaas, you need to identify the zone of the same family type to create the database. There are two approaches to creating a database:

  1. By issuing a POST request on the DB Zone on which the database is to reside.

  2. By issuing a POST request on the DB Platform Template of which the database is to be based on.

Note the attributes in the submitted body for the POST. The pattern is the same for other service instance creations. Since the intention is clear, the zone attribute is not required while performing POST on the DB Zone. Similarly, the based_on attribute is not needed when performing POST on the DB Platform Template.

The two approaches to create a database are described in the following sections:

Creating a Database by Passing a Request on the DB Zone 

The configuration for performing POST to the Db Zone is as follows:

  • URL

    https://example.oracle.com/em/cloud/dbaas/zone/82CF1C28FA20A183C99D138FF8065F19

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/oracle.com.cloud.common.DbPlatformInstance+json

    Accept: application/oracle.com.cloud.common.DbPlatformInstance+json

  • Body

    {
           "based_on": "/em/cloud/dbaas/dbplatformtemplate/CC3BBB665A6BC6FFE040F00AEF252456",
           "name": "<Request name>",
           "description": "<Request Description>",
           "start_date": "2013-08-02T14:20:00ZAsia/Calcutta",
           "end_date": "2013-08-02T17:20:00ZAsia/Calcutta",
           "params":
           { 
                "username": "Master Account username for the DB",
                "password": "Password for the Master Account on the DB" ,
                "database_sid" : "Database SID" ,
                "service_name" : "Name of the additional service to be created",
                    "standbydbs":
                       [
                            {
                             "standbydb_name":"STBY2",
                             "standbydb_sid":"stio62"
                            }                        
                       ]
           }
      }  
    
  • Method

    POST

The response received from the above interaction is as shown below.

{
  "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/21" ,
  "name" : "Test_create_intance" ,
  "resource_state" :     {
      "state" : "INITIATED"
    } ,
  "media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
  "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatforminstance/byrequest/22" ,
  "status" : "SCHEDULED"
}

Creating a Database by Passing a Request on the DB Platform Template 

The configuration for performing POST to the DbPlatformTemplate is as follows:

  • URL

    https://example.oracle.com/em/cloud/dbaas/dbplatformtemplate/CC3BBB665A6BC6FFE040F00AEF252456

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/oracle.com.cloud.common.DbPlatformInstance+json

    Accept: application/oracle.com.cloud.common.DbPlatformInstance+json

  • Body

    {
           "zone": "/em/cloud/dbaas/zone/82CF1C28FA20A183C99D138FF8065F19",
           "name": "<Request name>",
           "description": "<Request Description>",
           "params":
           { 
                "username": "Master Account username for the DB",
                "password": "Password for the Master Account on the DB",
                "database_sid" : "Database SID" ,
                "service_name" : "Name of the additional service to be created",
                       "standbydbs":
                       [
                            {
                             "standbydb_name":"STBY2",
                             "standbydb_sid":"stio62"
                            }                        
                       ]
           }
    }
    
  • Method

    POST

The response received from the above interaction is shown below.

{
  "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/22" ,
  "name" : "Test_create_intance" ,
  "resource_state" :     {
      "state" : "INITIATED"
    } ,
  "media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
  "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatforminstance/byrequest/23" ,
  "status" : "SCHEDULED"
}

The response shown above is the same as the previous version. If the zone is not specified, then it is not possible for the web service to determine where the DB should be deployed.

32.3.1.3.8 Viewing the Database Creation Details

After the POST is performed for the database creation, you can perform the GET operation on the resource identified by the return URI to keep track of the status.

  • URL

    https://example.oracle.com/em/cloud/dbaas/dbplatforminstance/byrequest/7

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Accept: application/oracle.com.cloud.common.DbPlatformInstance+json

  • Method

    GET

The response received is as shown below.

{
    "uri": "/em/cloud/dbaas/dbplatforminstance/byrequest/22",
    "name": "Test_create_intance_CREATE_55_42",
    "description": "Create Database for test.",
    "resource_state":
    {
      "state": "CREATING"
    },
    "context_id": "22",
    "media_type": "application/oracle.com.cloud.common.DbPlatformInstance+json",
    "status": "IN_PROGRESS",
    "created": "2013-06-07 23:09:04" ,
    "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatforminstance/byrequest/22"
}

Note that the resource_state attribute shows CREATING state to indicate that the database is being created. If the GET operation is performed after the database is created, the response displays the database resource in READY state, as shown below:

{
  "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/22" ,
  "name" : "db000000.mycompany.com" ,
  "resource_state" :     {
      "state" : "READY"
    } ,
  "context_id" : "22" , 
  "media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
  "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatforminstance/byrequest/22" ,
  "status" : "RUNNING" ,
  "created" : "2013-08-03 02:23:04" ,
  "based_on" : "/em/cloud/dbaas/dbplatformtemplate/E300FBE134EAB347E040F10A58535F16" ,
  "connect_string" : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=cluster_name)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=db000000.mycompany.com)))" ,
  "target_type" : "rac_database" ,
  "destination_zone" : "/em/cloud/dbaas/zone/B49F86387B81DAED9A3D672D722CF29D" ,
  "total_sessions" : "165" ,
  "last_backup" : "null" ,
  "master_username" : "InstanceUser1" ,
  "db_version" : "12.1.0.1.0" ,
  "measurable_attributes" :
  [
      {
        "name" : "up_time" ,
        "value" : "0" ,
        "units" : "Hours"
      } ,
      {
        "name" : "total_sga" ,
        "value" : "4778.555" ,
        "units" : "MB"
      } ,
      {
        "name" : "available_space" ,
        "value" : "699.813" ,
        "units" : "MB"
      }
  ] ,
  "instances" :
  [
      {
        "name" : "db000000. mycompany.com_db0000001" ,
        "average_active_sessions" : ".031" ,
        "allocated_sessions" : "70" ,
        "measurable_attributes" :  
        [
            {
              "name" : "cpu_utilization" ,
              "value" : "0.199" ,
              "units" : "%"
            } ,
            {
              "name" : "total_memory" ,
              "value" : "2723.867" ,
              "units" : "MB"
            } ,
            {
              "name" : "db_time" ,
              "value" : "3.103" ,
              "units" : "CentiSeconds Per Second"
            } ,
            {
              "name" : "cpu_count" ,
              "value" : "6" ,
              "units" : "Cores"
            }
        ]
      } ,
      {
        "name" : "db000000. mycompany.com_db0000002" ,
        "average_active_sessions" : ".007" ,
        "allocated_sessions" : "69" ,
        "measurable_attributes" :
        [
            {
              "name" : "cpu_utilization" ,
              "value" : "0.049" ,
              "units" : "%"
            } ,
            {
              "name" : "total_memory" ,
              "value" : "2705.378" ,
              "units" : "MB"
            } ,
            {
              "name" : "db_time" ,
              "value" : ".663" ,
              "units" : "CentiSeconds Per Second"
            } ,
            {
              "name" : "cpu_count" ,
              "value" : "6" ,
              "units" : "Cores"
            }
        ]
      },
        "standby_databases" : 
        [
         {
                "Target Name" : "PltFDR.us.oracle.com" ,
                "Target Type" : "oracle_database" ,
                "Open Mode" : "MOUNTED"
        } ,
        {
                "Target Name" : "PltNDR.us.oracle.com" ,
                "Target Type" : "rac_database" ,
                "Open Mode" : "READ ONLY"
        }
        ] ,
        "standby_database_configured" : "true"
  ]
}

The output in case of a single instance database (type:oracle_database) is as below:

{
  "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/81" ,
  "name" : "sidb0001.host1.mycompany.com" ,
  "resource_state" :     {
      "state" : "READY"
    } ,
  "context_id" : "81" ,
  "media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
  "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatforminstance/byrequest/81" ,
  "status" : "RUNNING" ,
  "created" : "2013-08-05 18:06:52" ,
  "based_on" : "/em/cloud/dbaas/dbplatformtemplate/E33736E8238CE06BE040F20A54666216" ,
  "connect_string" : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST= host1.mycompany.com)(PORT=1521)))(CONNECT_DATA=(SID=sidb0001)))" ,
  "target_type" : "oracle_database" ,
  "destination_zone" : "/em/cloud/dbaas/zone/E33720BF45C45E24E040F20A54666214" ,
  "total_sessions" : "43" ,
  "last_backup" : "null" ,
  "master_username" : "InstanceUser1" ,
  "db_version" : "11.2.0.1.0" ,
  "average_active_sessions" : ".118" ,
  "allocated_sessions" : "42" ,
  "measurable_attributes" :
  [
      {
        "name" : "up_time" ,
        "value" : "0" ,
        "units" : "Hours"
      } ,
      {
        "name" : "total_sga" ,
        "value" : "398.203" ,
        "units" : "MB"
      } ,
      {
        "name" : "available_space" ,
        "value" : "982.063" ,
        "units" : "MB"
      } ,
      {
        "name" : "cpu_utilization" ,
        "value" : "11.206" ,
        "units" : "%"
      } ,
      {
        "name" : "total_memory" ,
        "value" : "533.485" ,
        "units" : "MB"
      } ,
      {
        "name" : "db_time" ,
        "value" : "11.822" ,
        "units" : "CentiSeconds Per Second"
      } ,
      {
        "name" : "cpu_count" ,
        "value" : "1" ,
        "units" : "Cores"
      }
  ],
        "standby_databases" : 
        [
                {
                "Target Name" : "PltFDR.us.oracle.com" ,
                "Target Type" : "oracle_database" ,
                "Open Mode" : "MOUNTED"
                }        
        ] ,
        "standby_database_configured" : "true"
}
32.3.1.3.9 Deleting a Database Instance

The DELETE operation on the URI of the resource can be run to delete a DB Service Instance. The configuration values for the DELETE operation are:

  • URL

    https://example.oracle.com/em/em/cloud/dbaas/dbplatforminstance/byrequest/7

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Accept: application/oracle.com.cloud.common.DbPlatformInstance+json

  • Method

    DELETE

The web service response with code 200 is returned as shown below.

{
  "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/22" ,
  "name" : "db000000.mycompany.com" ,
  "resource_state" :     {
      "state" : "DESTROYING" ,
      "messages" :
      [
          {
            "text" : "Submit 'DELETE' operation on 'application/oracle.com.cloud.common.DbPlatformInstance+json' 'db000000.mycompany.com'.  The process has job id '41'" ,
            "date" : "2013-06-07T23:16:20+0000"
          }
      ]
    } ,
  "context_id" : "22" ,
  "media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
  "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatforminstance/byrequest/22" ,
  "type" : "rac_database"
}

After a few minutes, the GET operation on the database URI will result in the following interaction:

  • URL

    https://example.oracle.com/em/cloud/dbaas/dbplatforminstance/byrequest/7

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

  • Method

    GET

The web service responds with the following details:

{
  "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/23" ,
  "name" : "sidb0001.host1.mycompany.com" ,
  "resource_state" :     {
      "state" : "DESTROYING"
    } ,
  "context_id" : "23" ,
  "media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
  "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatforminstance/byrequest/23" ,
  "status" : "RUNNING" ,
  "created" : "2013-06-09 07:56:57" ,
  "based_on" : "/em/cloud/dbaas/dbplatformtemplate/DEB2BDE2F773E356E040E50AD2E56BE9" ,
  "connect_string" : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host1.mycompany.com)(PORT=1521)))(CONNECT_DATA=(SID=sidb0001)))" ,
  "type" : "oracle_database" ,
  "destination_zone" : "/em/cloud/dbaas/zone/DEB2E2920C20D2E1E040E50AD2E56BEF" ,
  "up_time" : "0" ,
  "load" : "0.156456056384199" ,
  "total_sessions" : "46" ,
  "total_sga" : "398.203125" ,
  "available_space" : "0.19097900390625" ,
  "last_backup" : "null" ,
  "master_username" : "InstanceUser1" ,
  "db_version" : "11.2.0.1.0" ,
  "active_sessions" : ".156" ,
  "cpu_utilization" : "5.35" ,
  "db_time" : "15.646" ,
  "cpu_count" : "1" ,
  "allocated_sessions" : "39" ,
  "total_memory" : "524.384 MB"
}

The database status indicates DELETED after the database is deleted.

32.3.1.3.10 Lifecycle operations on a Database Instance

The POST request on the URI of the resource can be issued to perform an operation on a database.

You can perform the following operations using a POST request:

Shutting down a Database

The configurations for the POST on a DbPlatformInstance is as follows:

  • URL: https://example.mycompany.com/em/cloud/dbaas/dbplatforminstance/byrequest/7

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/oracle.com.cloud.common.DbPlatformInstance+json Accept: application/oracle.com.cloud.common.DbPlatformInstance+json

  • Body

    {
            "operation" : "SHUTDOWN"
            }
    
  • Method

    POST

    The response from the above interaction is shown below.

    {
      "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/101" ,
      "name" : "dbc00000.slc01lxj.us.oracle.com" ,
      "resource_state" :     {
          "state" : "INITIATED" ,
          "messages" : 
          [
              {
                "date" : "2013-08-27T07:12:30+0000" ,
                "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/127" ,
                "text" : "Successfully submitted SHUTDOWN operation on service instance. Request id - 127."
              }
          ]
        } ,
      "context_id" : "101" ,
      "media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatforminstance/byrequest/101" ,
      "status" : "RUNNING" ,
      "created" : "2013-08-26 05:09:13" ,
      "based_on" : "/em/cloud/dbaas/dbplatformtemplate/E4D9626BC260F517E040F20A605152CD" ,
      "connect_string" : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521)))(CONNECT_DATA=(SID=dbc00000)))" ,
      "target_type" : "oracle_database" ,
      "destination_zone" : "/em/cloud/dbaas/zone/675B859C36772FB7856771B1D57F79F8" ,
      "total_sessions" : "62" ,
      "last_backup" : "null" ,
      "master_username" : "test" ,
      "db_version" : "11.2.0.2.0" ,
      "average_active_sessions" : ".01" ,
      "allocated_sessions" : "50" ,
      "measurable_attributes" : 
      [
          {
            "name" : "up_time" ,
            "value" : "19" ,
            "units" : "Hours"
          } ,
          {
            "name" : "total_sga" ,
            "value" : "398.203" ,
            "units" : "MB"
          } ,
          {
            "name" : "available_space" ,
            "value" : "537.172" ,
            "units" : "MB"
          } ,
          {
            "name" : "cpu_utilization" ,
            "value" : "0.506" ,
            "units" : "%"
          } ,
          {
            "name" : "total_memory" ,
            "value" : "604.652" ,
            "units" : "MB"
          } ,
          {
            "name" : "db_time" ,
            "value" : "1.041" ,
            "units" : "CentiSeconds Per Second"
          } ,
          {
            "name" : "cpu_count" ,
            "value" : "2" ,
            "units" : "Cores"
          }
      ]
    }
    

Starting up a Database

The configurations for the POST on a DbPlatformInstance is as follows:

  • URL: https://example.mycompany.com/em/cloud/dbaas/dbplatforminstance/byrequest/7

  • Headers: Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/oracle.com.cloud.common.DbPlatformInstance+json

    Accept: application/oracle.com.cloud.common.DbPlatformInstance+json

  • Body

    {
            "operation" : "STARTUP"
            }
    
  • Method

    POST

    The response from the above interaction is shown below.

    {
      "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/101" ,
      "name" : "dbc00000.slc01lxj.us.oracle.com" ,
      "resource_state" :     {
          "state" : "INITIATED" ,
          "messages" : 
          [
              {
                "date" : "2013-08-27T07:16:52+0000" ,
                "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/128" ,
                "text" : "Successfully submitted STARTUP operation on service instance. Request id - 128."
              }
          ]
        } ,
      "context_id" : "101" ,
      "media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatforminstance/byrequest/101" ,
      "status" : "STOPPED" ,
      "created" : "2013-08-26 05:09:13" ,
      "based_on" : "/em/cloud/dbaas/dbplatformtemplate/E4D9626BC260F517E040F20A605152CD" ,
      "connect_string" : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521)))(CONNECT_DATA=(SID=dbc00000)))" ,
      "target_type" : "oracle_database" ,
      "destination_zone" : "/em/cloud/dbaas/zone/675B859C36772FB7856771B1D57F79F8" ,
      "total_sessions" : "null" ,
      "last_backup" : "null" ,
      "master_username" : "test" ,
      "db_version" : "null" ,
      "average_active_sessions" : "null" ,
      "allocated_sessions" : "null" ,
      "measurable_attributes" : 
      [
          {
            "name" : "up_time" ,
            "value" : "null" ,
            "units" : "Hours"
          } ,
          {
            "name" : "total_sga" ,
            "value" : "null" ,
            "units" : "MB"
          } ,
          {
            "name" : "available_space" ,
            "value" : "null" ,
            "units" : "MB"
          } ,
          {
            "name" : "cpu_utilization" ,
            "value" : "null" ,
            "units" : "%"
          } ,
          {
            "name" : "total_memory" ,
            "value" : "null" ,
            "units" : "MB"
          } ,
          {
            "name" : "db_time" ,
            "value" : "null" ,
            "units" : "CentiSeconds Per Second"
          } ,
          {
            "name" : "cpu_count" ,
            "value" : "null" ,
            "units" : "Cores"
          }
      ]
    }
    

Scheduling a Backup of the Database

For scheduling, the backup user has to provide the time at which backups needs to scheduled. This should be in the YYYY-MM-DDTHH:MM:SSZFullTimeZonename format.

For example to schedule in PST time user should enter 2013-08-27T12:34:45ZAmerica/Los_Angeles.

The time zone portion is optional. If you do not want to provide the time zone, then enter 2013-08-27T12:34:45Z.

The configurations for the POST on a DbPlatformInstance is as follows:

  • URL: https://example.mycompany.com/em/cloud/dbaas/dbplatforminstance/byrequest/7

  • Headers:

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/oracle.com.cloud.common.DbPlatformInstance+json

    Accept: application/oracle.com.cloud.common.DbPlatformInstance+json

  • Body

    {
            "operation" : "BACKUP",
     "backup_schedule" : "2013-08-27T12:34:45ZAsia/Calcutta"
            }
    
  • Method

    POST

    The response from the above interaction is shown below.

    {
      "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/101" ,
      "name" : "dbc00000.slc01lxj.us.oracle.com" ,
      "resource_state" :     {
          "state" : "INITIATED" ,
          "messages" : 
          [
              {
                "date" : "2013-08-27T07:17:56+0000" ,
                "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/129" ,
                "text" : "Successfully submitted BACKUP operation on service instance. Request id - 129."
              }
          ]
        } ,
      "context_id" : "101" ,
      "media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatforminstance/byrequest/101" ,
      "status" : "RUNNING" ,
      "created" : "2013-08-26 05:09:13" ,
      "based_on" : "/em/cloud/dbaas/dbplatformtemplate/E4D9626BC260F517E040F20A605152CD" ,
      "connect_string" : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=slc01lxj.us.oracle.com)(PORT=1521)))(CONNECT_DATA=(SID=dbc00000)))" ,
      "target_type" : "oracle_database" ,
      "destination_zone" : "/em/cloud/dbaas/zone/675B859C36772FB7856771B1D57F79F8" ,
      "total_sessions" : "0" ,
      "last_backup" : "null" ,
      "master_username" : "test" ,
      "db_version" : "11.2.0.2.0" ,
      "average_active_sessions" : "null" ,
      "allocated_sessions" : "46" ,
      "measurable_attributes" : 
      [
          {
            "name" : "up_time" ,
            "value" : "0" ,
            "units" : "Hours"
          } ,
          {
            "name" : "total_sga" ,
            "value" : "398.203" ,
            "units" : "MB"
          } ,
          {
            "name" : "available_space" ,
            "value" : "537.172" ,
            "units" : "MB"
          } ,
          {
            "name" : "cpu_utilization" ,
            "value" : "null" ,
            "units" : "%"
          } ,
          {
            "name" : "total_memory" ,
            "value" : "575.043" ,
            "units" : "MB"
          } ,
          {
            "name" : "db_time" ,
            "value" : "null" ,
            "units" : "CentiSeconds Per Second"
          } ,
          {
            "name" : "cpu_count" ,
            "value" : "2" ,
            "units" : "Cores"
          }
      ]
    }
    

    After the backup job is completed, the GET operation yields the response shown below.

    {
      "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/101" ,
      "name" : "dbc00000.slc01lxj.us.oracle.com" ,
      "resource_state" :     {
          "state" : "READY"
        } ,
      "context_id" : "101" ,
      "media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatforminstance/byrequest/101" ,
      "status" : "RUNNING" ,
      "created" : "2013-08-26 05:09:13" ,
      "based_on" : "/em/cloud/dbaas/dbplatformtemplate/E4D9626BC260F517E040F20A605152CD" ,
      "connect_string" : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=slc01lxj.us.oracle.com)(PORT=1521)))(CONNECT_DATA=(SID=dbc00000)))" ,
      "target_type" : "oracle_database" ,
      "destination_zone" : "/em/cloud/dbaas/zone/675B859C36772FB7856771B1D57F79F8" ,
      "total_sessions" : "64" ,
      "last_backup" : "2013-08-27 07:24:04.0" ,
      "master_username" : "test" ,
      "db_version" : "11.2.0.2.0" ,
      "average_active_sessions" : ".027" ,
      "allocated_sessions" : "50" ,
      "measurable_attributes" : 
      [
          {
            "name" : "up_time" ,
            "value" : "0" ,
            "units" : "Hours"
          } ,
          {
            "name" : "total_sga" ,
            "value" : "398.203" ,
            "units" : "MB"
          } ,
          {
            "name" : "available_space" ,
            "value" : "537.172" ,
            "units" : "MB"
          } ,
          {
            "name" : "cpu_utilization" ,
            "value" : "0.496" ,
            "units" : "%"
          } ,
          {
            "name" : "total_memory" ,
            "value" : "578.12" ,
            "units" : "MB"
          } ,
          {
            "name" : "db_time" ,
            "value" : "2.736" ,
            "units" : "CentiSeconds Per Second"
          } ,
          {
            "name" : "cpu_count" ,
            "value" : "2" ,
            "units" : "Cores"
          }
      ] ,
      "RMAN_backup_list" : 
      [
          {
            "Key" : "1" ,
            "Tag" : "ORA$OEM_LEVEL_0" ,
            "Completed Time" : "Aug 27, 2013 12:24:02 AM" ,
            "Contents" : "SPFILE,CONTROLFILE" ,
            "Status" : "AVAILABLE"
          }
      ]
    }
    

Restoring a Database from a Backup

To restore a database from a backup, the user has to provide the point-in-time when the database is to be restored. The time mentioned should be in the YYYY-MM-DDTHH:MM:SSZFullTimeZonename format.

For example, to schedule in PST time you should enter 2013-08-27T12:34:45ZAmerica/Los_Angeles. Time zone is optional. If you do not want to provide the time zone, enter 2013-08-27T12:34:45Z.

The restore time is based on the backups available. Refer to RMAN_backup_list section in the output of the GET request.

The configurations for the POST on a DbPlatformInstance is as follows:

  • URL: https://example.mycompany.com/em/cloud/dbaas/dbplatforminstance/byrequest/7

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/oracle.com.cloud.common.DbPlatformInstance+json

    Accept: application/oracle.com.cloud.common.DbPlatformInstance+json

  • Body

    {
            "operation" : "RESTORE",
            "restore_date" : "2013-08-27T12:34:45Z"
            }
    
  • Method

    POST

    The response from the above interaction is shown below.

    {
      "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/101" ,
      "name" : "dbc00000.slc01lxj.us.oracle.com" ,
      "resource_state" :     {
          "state" : "INITIATED" ,
          "messages" : 
          [
              {
                "date" : "2013-08-27T07:17:56+0000" ,
                "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/129" ,
                "text" : "Successfully submitted RESTORE operation on service instance. Request id - 130."
              }
          ]
        } ,
      "context_id" : "101" ,
      "media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatforminstance/byrequest/101" ,
      "status" : "RUNNING" ,
      "created" : "2013-08-26 05:09:13" ,
      "based_on" : "/em/cloud/dbaas/dbplatformtemplate/E4D9626BC260F517E040F20A605152CD" ,
      "connect_string" : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521)))(CONNECT_DATA=(SID=dbc00000)))" ,
      "target_type" : "oracle_database" ,
      "destination_zone" : "/em/cloud/dbaas/zone/675B859C36772FB7856771B1D57F79F8" ,
      "total_sessions" : "0" ,
      "last_backup" : "null" ,
      "master_username" : "test" ,
      "db_version" : "11.2.0.2.0" ,
      "average_active_sessions" : "null" ,
      "allocated_sessions" : "46" ,
      "measurable_attributes" : 
      [
          {
            "name" : "up_time" ,
            "value" : "0" ,
            "units" : "Hours"
          } ,
          {
            "name" : "total_sga" ,
            "value" : "398.203" ,
            "units" : "MB"
          } ,
          {
            "name" : "available_space" ,
            "value" : "537.172" ,
            "units" : "MB"
          } ,
          {
            "name" : "cpu_utilization" ,
            "value" : "null" ,
            "units" : "%"
          } ,
          {
            "name" : "total_memory" ,
            "value" : "575.043" ,
            "units" : "MB"
          } ,
          {
            "name" : "db_time" ,
            "value" : "null" ,
            "units" : "CentiSeconds Per Second"
          } ,
          {
            "name" : "cpu_count" ,
            "value" : "2" ,
            "units" : "Cores"
          }
      ]
    }
    
32.3.1.3.11 Lifecycle operations on a Snap clone Database Instance

The POST request on the URI of the resource can be run to perform an operation on a database. The following operations can be performed by using POST.

Creating a Snapshot

The configurations for the POST on a DbPlatformInstance is as follows:

  • URL: https://example.mycompany.com/em/cloud/dbaas/dbplatforminstance/byrequest/7

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/oracle.com.cloud.common.DbPlatformInstance+json

    Accept: application/oracle.com.cloud.common.DbPlatformInstance+json

  • Body

    {
            "operation" : "CREATE_PROFILE",
            "snapshot_name" : "test_api_export",
            "snapshot_desc" : "testing export option from APIs"
            }
    
  • Method

    POST

    The response from the above interaction is shown below.

    {
      "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/101" ,
      "name" : "dbc00000.slc01lxj.us.oracle.com" ,
      "resource_state" :     {
          "state" : "INITIATED" ,
          "messages" : 
          [
              {
                "date" : "2013-08-27T07:17:56+0000" ,
                "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/129" ,
                "text" : "Successfully submitted CREATE_PROFILE operation on service instance. Request id - 130."
              }
          ]
        } ,
      "context_id" : "101" ,
      "media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatforminstance/byrequest/101" ,
      "status" : "RUNNING" ,
      "created" : "2013-08-26 05:09:13" ,
      "based_on" : "/em/cloud/dbaas/dbplatformtemplate/E4D9626BC260F517E040F20A605152CD" ,
      "connect_string" : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521)))(CONNECT_DATA=(SID=dbc00000)))" ,
      "target_type" : "oracle_database" ,
      "destination_zone" : "/em/cloud/dbaas/zone/675B859C36772FB7856771B1D57F79F8" ,
      "total_sessions" : "0" ,
      "last_backup" : "null" ,
      "master_username" : "test" ,
      "db_version" : "11.2.0.2.0" ,
      "average_active_sessions" : "null" ,
      "allocated_sessions" : "46" ,
      "measurable_attributes" : 
      [
          {
            "name" : "up_time" ,
            "value" : "0" ,
            "units" : "Hours"
          } ,
          {
            "name" : "total_sga" ,
            "value" : "398.203" ,
            "units" : "MB"
          } ,
          {
            "name" : "available_space" ,
            "value" : "537.172" ,
            "units" : "MB"
          } ,
          {
            "name" : "cpu_utilization" ,
            "value" : "null" ,
            "units" : "%"
          } ,
          {
            "name" : "total_memory" ,
            "value" : "575.043" ,
            "units" : "MB"
          } ,
          {
            "name" : "db_time" ,
            "value" : "null" ,
            "units" : "CentiSeconds Per Second"
          } ,
          {
            "name" : "cpu_count" ,
            "value" : "2" ,
            "units" : "Cores"
          }
      ]
    }
    

    After the create snapshot operation is completed, the response of a GET operations yields the result shown below.

    {
      "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/101" ,
      "name" : "dbc00000.slc01lxj.us.oracle.com" ,
      "resource_state" :     {
          "state" : "INITIATED" ,
          "messages" : 
          [
              {
                "date" : "2013-08-27T07:17:56+0000" ,
                "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/143" ,
                "text" : "Successfully submitted CREATE_PROFILE operation on service instance. Request id - 143."
              }
          ]
        } ,
      "context_id" : "101" ,
      "media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatforminstance/byrequest/101" ,
      "status" : "RUNNING" ,
      "created" : "2013-08-26 05:09:13" ,
      "based_on" : "/em/cloud/dbaas/dbplatformtemplate/E4D9626BC260F517E040F20A605152CD" ,
      "connect_string" : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521)))(CONNECT_DATA=(SID=dbc00000)))" ,
      "target_type" : "oracle_database" ,
      "destination_zone" : "/em/cloud/dbaas/zone/675B859C36772FB7856771B1D57F79F8" ,
      "total_sessions" : "0" ,
      "last_backup" : "null" ,
      "master_username" : "test" ,
      "db_version" : "11.2.0.2.0" ,
      "average_active_sessions" : "null" ,
      "allocated_sessions" : "46" ,
      "measurable_attributes" : 
      [
          {
            "name" : "up_time" ,
            "value" : "0" ,
            "units" : "Hours"
          } ,
          {
            "name" : "total_sga" ,
            "value" : "398.203" ,
            "units" : "MB"
          } ,
          {
            "name" : "available_space" ,
            "value" : "537.172" ,
            "units" : "MB"
          } ,
          {
            "name" : "cpu_utilization" ,
            "value" : "null" ,
            "units" : "%"
          } ,
          {
            "name" : "total_memory" ,
            "value" : "575.043" ,
            "units" : "MB"
          } ,
          {
            "name" : "db_time" ,
            "value" : "null" ,
            "units" : "CentiSeconds Per Second"
          } ,
          {
            "name" : "cpu_count" ,
            "value" : "2" ,
            "units" : "Cores"
          }
      ]
    "snapclone_profile_list" : 
      [
          {
            "Name" : "test_api_export" ,
            "Description" : "testing export option from APIs" ,
            "URN" : "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:E4E9E7EE230BF965E040F20A60517256:0.1" ,
            "Submission Guid" : "DD269BBA774E0159E040F20A60513010" ,
            "Creation Date" : "Mon Aug 20 05:54:03 PDT 2013" ,
            "Status" : "Ready"
          }
      ]
    }
    

Restoring from a Snapshot List

The configurations for the POST on a DbPlatformInstance is as follows:

  • URL: https://example.mycompany.com/em/cloud/dbaas/dbplatforminstance/byrequest/7

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/oracle.com.cloud.common.DbPlatformInstance+json

    Accept: application/oracle.com.cloud.common.DbPlatformInstance+json

  • Body

    {
            "operation" : "RESTORE_PROFILE",
            "snapshot_urn" : "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:DECAD7B3145E6808E040F20A605130A2:0.1"
            }
    
  • Method

    POST

    The response from the above interaction is shown below.

    {
      "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/101" ,
      "name" : "dbc00000.slc01lxj.us.oracle.com" ,
      "resource_state" :     {
          "state" : "INITIATED" ,
          "messages" : 
          [
              {
                "date" : "2013-08-27T07:17:56+0000" ,
                "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/144" ,
                "text" : "Successfully submitted RESTORE_PROFILE operation on service instance. Request id - 144."
              }
          ]
        } ,
      "context_id" : "101" ,
      "media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatforminstance/byrequest/101" ,
      "status" : "RUNNING" ,
      "created" : "2013-08-26 05:09:13" ,
      "based_on" : "/em/cloud/dbaas/dbplatformtemplate/E4D9626BC260F517E040F20A605152CD" ,
      "connect_string" : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521)))(CONNECT_DATA=(SID=dbc00000)))" ,
      "target_type" : "oracle_database" ,
      "destination_zone" : "/em/cloud/dbaas/zone/675B859C36772FB7856771B1D57F79F8" ,
      "total_sessions" : "0" ,
      "last_backup" : "null" ,
      "master_username" : "test" ,
      "db_version" : "11.2.0.2.0" ,
      "average_active_sessions" : "null" ,
      "allocated_sessions" : "46" ,
      "measurable_attributes" : 
      [
          {
            "name" : "up_time" ,
            "value" : "0" ,
            "units" : "Hours"
          } ,
          {
            "name" : "total_sga" ,
            "value" : "398.203" ,
            "units" : "MB"
          } ,
          {
            "name" : "available_space" ,
            "value" : "537.172" ,
            "units" : "MB"
          } ,
          {
            "name" : "cpu_utilization" ,
            "value" : "null" ,
            "units" : "%"
          } ,
          {
            "name" : "total_memory" ,
            "value" : "575.043" ,
            "units" : "MB"
          } ,
          {
            "name" : "db_time" ,
            "value" : "null" ,
            "units" : "CentiSeconds Per Second"
          } ,
          {
            "name" : "cpu_count" ,
            "value" : "2" ,
            "units" : "Cores"
          }
      ]
    }
    

Deleting a Snapshot

The configurations for the POST on a DbPlatformInstance is as follows:

  • URL: https://example.mycompany.com/em/cloud/dbaas/dbplatforminstance/byrequest/7

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/oracle.com.cloud.common.DbPlatformInstance+json

    Accept: application/oracle.com.cloud.common.DbPlatformInstance+json

  • Body

    {
            "operation" : " DELETE_PROFILE",
            "snapshot_urn" : "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:DECAD7B3145E6808E040F20A605130A2:0.1"   }
    
  • Method

    POST

    The response from the above interaction is shown below.

    {
      "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/101" ,
      "name" : "dbc00000.slc01lxj.us.oracle.com" ,
      "resource_state" :     {
          "state" : "INITIATED" ,
          "messages" : 
          [
              {
                "date" : "2013-08-27T07:17:56+0000" ,
                "uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/148" ,
                "text" : "Successfully submitted DELETE_PROFILE operation on service instance. Request id - 148."
              }
          ]
        } ,
      "context_id" : "101" ,
      "media_type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/dbplatforminstance/byrequest/101" ,
      "status" : "RUNNING" ,
      "created" : "2013-08-26 05:09:13" ,
      "based_on" : "/em/cloud/dbaas/dbplatformtemplate/E4D9626BC260F517E040F20A605152CD" ,
      "connect_string" : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521)))(CONNECT_DATA=(SID=dbc00000)))" ,
      "target_type" : "oracle_database" ,
      "destination_zone" : "/em/cloud/dbaas/zone/675B859C36772FB7856771B1D57F79F8" ,
      "total_sessions" : "0" ,
      "last_backup" : "null" ,
      "master_username" : "test" ,
      "db_version" : "11.2.0.2.0" ,
      "average_active_sessions" : "null" ,
      "allocated_sessions" : "46" ,
      "measurable_attributes" : 
      [
          {
            "name" : "up_time" ,
            "value" : "0" ,
            "units" : "Hours"
          } ,
          {
            "name" : "total_sga" ,
            "value" : "398.203" ,
            "units" : "MB"
          } ,
          {
            "name" : "available_space" ,
            "value" : "537.172" ,
            "units" : "MB"
          } ,
          {
            "name" : "cpu_utilization" ,
            "value" : "null" ,
            "units" : "%"
          } ,
          {
            "name" : "total_memory" ,
            "value" : "575.043" ,
            "units" : "MB"
          } ,
          {
            "name" : "db_time" ,
            "value" : "null" ,
            "units" : "CentiSeconds Per Second"
          } ,
          {
            "name" : "cpu_count" ,
            "value" : "2" ,
            "units" : "Cores"
          }
      ]
    }
    

32.3.2 Schema as a Service APIs

This section describes the resource model for Schema as a Service (SchaaS) API and the REST request/response interactions.

Note:

SchaaS APIs are only supported by the Oracle Cloud Application plug-in version 12.1.0.6.0 and higher

This section contains the following topics:

32.3.2.1 Resource Model for Schema as a Service

Cloud resources are organized by common service entities, and specific services (for example, Schema as a Service) provide resources by extending these common service entities. The figure below shows the SchaaS resource model.

Figure 32-3 Schema as a Service Resource Model

Schema as a Service Resource Model

The following sections describe the resources that are supported by the Schema as a Service APIs and provide examples of supported operations. Schema as a Service uses the same Cloud, Service Family, and DB Zone resources as described in Section 32.3.1.1, "Resource Model for Database as a Service".

. The following resource models are described:

32.3.2.1.1 Schema Platform Template

The Schema Platform Template extends the Service Template resource. It represents the service template created for Schema Service creation. It can be a template for creating a schema service using profile based schemas (schema with data) or for creating a schemas service containing empty schemas.

It is permissible to accept the Service Template media type on an instance of Schema Platform Template. It is a preconfigured deployable service that realizes a Schema Platform Instance resource. Schema Platform Template has the following media type and payload:

Type Description
Media Type application/oracle.com.cloud.common.SchemaPlatformTemplate
Support Payload json
URI Format /em/cloud/dbaas/schemaplatformtemplate/<template id>

The following table describes the Schema Platform Template Data Model.

Table 32-22 Schema Platform Template Data Model

Field Type Occurs Description

uri

URI

1

A GET against this URI refreshes the client representation of the resources accessible to this user.

name

String

1

A human readable name given to the template.

description

String

0..1

A brief description given to the template.

created

Timestamp

1

Date and time, in ISO 8601 format, when the template was created/last modified.

resource_state

ResourceState

1

The validity of the fields on a GET should be guaranteed only when the resource state is READY. Otherwise, the client should not assume the validity of the fields.

zones

Collection <DbZone>

0..1

List of all zones configured for this template.

service_instances

Collection <SchemaPlatformInstance>

0..1

All service instances created based on this SchemaPlatformTemplate.

media_type

String

1

The media type of the service template that this type represents.

params

Object

1

List of parameters required to provision a Schema Platform Instance from this template.

deployment_params

List<Object>

1

Description of the parameters which are required while creating a service instance.

type

String

1

The type of the service template which is "dbaas" by default.

subtype

String

1

The sub type of the instance created based on this template.

It has a value "schema" in this case.

template_type

String

1

Type of this template based on how the template got created. It can have any of two values : "EMPTY_SCHEMAS" or "SCHEMAS_FROM_PROFILE".

max_number_of_schemas

Integer

0..1

Maximum number of schemas that can be created in a single instance request. This field exists only if template_type is "EMPTY_SCHEMAS".

workloads

List<Object>

0..1

List all the workloads defined for this template and list the attributes for each one of them.

canonicalLink

URI

1

Can be used to perform cloud interactions like GET and POST.

tablespace_list

List<Object>

1

List of tablespaces in schema.


32.3.2.1.2 Schema Platform Instance

The Schema Platform Instance extends the Service Instance resource. It is linked to Oracle Database Service target in Enterprise Manager Cloud Control. Schema Platform Instance has the following media type and payload:

Type Description
Media Type application/oracle.com.cloud.common.SchemaPlatformInstance
Support Payload json
URI Format /em/cloud/dbaas/schemaplatforminstance/byrequest/<request id>

The following table describes the Schema Platform Instance data model:

Table 32-23 Schema Platform Instance Data Model

Field Type Occurs Description

uri

URI

1

A GET against this URI refreshes the client representation of the resources accessible to this user.

name

String

1

A human readable name given given to the database service[POST]

destination_zone

Zone

1

The Zone to which the database service is deployed

[POST]

created

Timestamp

1

Date and time, in ISO 8601 format, when the template was created/last modified.

resource_state

ResourceState

1

The validity of the fields on a GET should be guaranteed only when the resource state is READY. Otherwise, the client should not assume the validity of the fields.

based_on

SchemaPlatformTemplate

1

The schema platform template on which this database service is published.

media_type

String

1

Indicates the additional media type that clients can use to perform a GET.

canonicalLink

URI

1

Can be used to perform cloud interactions like GET and POST.

type

String

1

Type of the database service. It has the default value "oracle_dbsvc".

connect_string

String

0..1

Connect String required to establish a connection to this database service.

status

String

1

Status of the database service.

db_version

String

0..1

Version of the database on which this service is running.

context_id

String

1

The request id of this database service.


32.3.2.2 Supported Operations for Schema as a Service Resources

The following table lists all the operations that are supported on the various Schema as a Service resources.

Table 32-24 Supported Operations

Resource Operations (GET, POST, PUT, and DELETE)

Cloud

GET

Service Family Type

GET

DB Zone

GET, and POST

Schema Platform Template [Service Template]

GET, and POST

Schema Platform Instance [Service Instance]

GET, POST, and DELETE


32.3.2.3 Schema as a Service API Examples

The following sections provide examples of interaction with Enterprise Manager Cloud Control 12.1.0.3 with Cloud Application plug-in 12.1.0.6 and higher. The examples for GET on cloud, GET on dbaas family type and GET on Db Zone are covered in the Dbaas APIs section. The following examples are covered:

32.3.2.3.1 Viewing Details of the Schema Platform Template Resource

A GET request on the Schema Platform Template resource provides the details of the resource.

  • URL

    https://example.mycompany.com/em/cloud/dbaas/schemaplatformtemplate/DE3F8D882F132F45E040F00AAA2330C5

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

  • Method

    GET

This resource returned as the complete SchemaPlatformTemplate resource is shown below.

{
  "max_number_of_schemas" : "" ,
  "media_type" : "application/oracle.com.cloud.common.SchemaPlatformTemplate+json" ,
  "resource_state" :     {
      "state" : "READY"
    } ,
  "tablespace_list" : 
  [
    "DUMPTBSP1" ,
    "DUMPTBSP2"
  ] ,
  "params" :     {
      "schema" : 
      [
          {
            "username" : "" ,
            "password" : "" ,
            "original_name" : "SCHEMA_USER_1"
          } ,
          {
            "username" : "" ,
            "password" : "" ,
            "original_name" : "SCHEMA_USER_2"
          }
      ] ,
      "service_name_prefix" : "" ,
      "workload_name" : "" ,
      "tablespaces" : 
      [
          {
            "old_tablespace_name" : "DUMPTBSP1" ,
            "new_tablespace_name" : ""
          } ,
          {
            "old_tablespace_name" : "DUMPTBSP2" ,
            "new_tablespace_name" : ""
          }
      ]
    } ,
  "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/schemaplatformtemplate/FADFFB8A434244F1E043797EF00A63AE" ,
  "template_type" : "SCHEMAS_FROM_PROFILE" ,
  "type" : "dbaas" ,
  "zones" :     {
      "total" : "1" ,
      "media_type" : "application/oracle.com.cloud.common.DbZone+json" ,
      "elements" : 
      [
          {
            "media_type" : "application/oracle.com.cloud.common.DbZone+json" ,
            "context_id" : "2348838861AFF7BC02912C402605D49F" ,
            "description" : "SSA Zone with SI Nodes" ,
            "service_family_type" : "dbaas" ,
            "name" : "SI SSAZONE" ,
            "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/zone/2348838861AFF7BC02912C402605D49F" ,
            "type" : "self_service_zone" ,
            "uri" : "/em/cloud/dbaas/zone/2348838861AFF7BC02912C402605D49F"
          }
      ]
    } ,
  "uri" : "/em/cloud/dbaas/schemaplatformtemplate/FADFFB8A434244F1E043797EF00A63AE" ,
  "service_instances" :     {
      "total" : "1" ,
      "media_type" : "application/oracle.com.cloud.common.SchemaPlatformInstance+json" ,
      "elements" : 
      [
          {
            "media_type" : "application/oracle.com.cloud.common.SchemaPlatformInstance+json" ,
            "name" : "SIFSDifftbspc" ,
            "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/schemaplatforminstance/byrequest/1" ,
            "target_type" : "oracle_dbsvc" ,
            "uri" : "/em/cloud/dbaas/schemaplatforminstance/byrequest/1"
          }
      ]
    } ,
  "created" : "2014-06-02T19:38:04+0000" ,
  "description" : "11204 SIDB FileSystem Schema Service Template - Import Schema - Different TableSpace for Each Schema" ,
  "name" : "11204_SIFS_SCHEMATEMPLATE_IMPORTSCHEMA_DIFFTBSPC" ,
  "subtype" : "schema" ,
  "workloads" : 
  [
      {
        "description" : "LARGE" ,
        "name" : "LARGE" ,
        "attributes" : 
        [
            {
              "name" : "CPU" ,
              "value" : "1" ,
              "units" : "cores"
            } ,
            {
              "name" : "Memory" ,
              "value" : "1" ,
              "units" : "GB"
            } ,
            {
              "name" : "Storage" ,
              "value" : "10" ,
              "units" : "GB"
            }
        ]
      } ,
      {
        "description" : "MEDIUM" ,
        "name" : "MEDIUM" ,
        "attributes" : 
        [
            {
              "name" : "CPU" ,
              "value" : "0.5" ,
              "units" : "cores"
            } ,
            {
              "name" : "Memory" ,
              "value" : "0.5" ,
              "units" : "GB"
            } ,
            {
              "name" : "Storage" ,
              "value" : "5" ,
              "units" : "GB"
            }
        ]
      } ,
      {
        "description" : "SMALL" ,
        "name" : "SMALL" ,
        "attributes" : 
        [
            {
              "name" : "CPU" ,
              "value" : "0.3" ,
              "units" : "cores"
            } ,
            {
              "name" : "Memory" ,
              "value" : "0.3" ,
              "units" : "GB"
            } ,
            {
              "name" : "Storage" ,
              "value" : "3" ,
              "units" : "GB"
            }
        ]
      }
  ] ,
  "schema_list" : 
  [
    "SCHEMA_USER_1" ,
    "SCHEMA_USER_2"
  ] ,
  "deployment_params" : 
  [
      {
        "description" : "Master account schema. Not Required for the SCHEMAS_FROM_PROFILE Schema templates" ,
        "name" : "masterAccount" ,
        "require" : "false" ,
        "type" : "STRING" ,
        "sensitive" : "false"
      } ,
      {
        "description" : "Prefix for the service name instances" ,
        "name" : "service_name_prefix" ,
        "require" : "true" ,
        "type" : "STRING" ,
        "sensitive" : "false"
      } ,
      {
        "description" : "WorkLoad name to be associated with the request" ,
        "name" : "workload_name" ,
        "require" : "true" ,
        "type" : "STRING" ,
        "sensitive" : "false"
      } ,
      {
        "description" : "Common password for all schema users." ,
        "name" : "common_password" ,
        "require" : "false" ,
        "type" : "STRING" ,
        "sensitive" : "true"
      } ,
      {
        "description" : "List of schema to be created" ,
        "name" : "schema" ,
        "require" : "true" ,
        "defaultValue" : 
        [
            {
              "description" : "New schema name" ,
              "name" : "username" ,
              "require" : "true" ,
              "type" : "STRING" ,
              "sensitive" : "false"
            } ,
            {
              "description" : "Original schema name. Required only for the SCHEMAS_FROM_PROFILE Schema templates" ,
              "name" : "original_name" ,
              "require" : "false" ,
              "type" : "STRING" ,
              "sensitive" : "false"
            } ,
            {
              "description" : "Password for the schema. Required only if common_password is not specified." ,
              "name" : "password" ,
              "require" : "false" ,
              "type" : "STRING" ,
              "sensitive" : "true"
            }
        ] ,
        "type" : "LIST" ,
        "sensitive" : "false"
      } ,
      {
        "description" : "List of tablespaces remap. Required only for the SCHEMAS_FROM_PROFILE Schema templates." ,
        "name" : "tablespaces" ,
        "require" : "false" ,
        "defaultValue" : 
        [
            {
              "description" : "New tablespace name." ,
              "name" : "new_tablespace_name" ,
              "require" : "true" ,
              "type" : "STRING" ,
              "sensitive" : "false"
            } ,
            {
              "description" : "Original tablespace name." ,
              "name" : "old_tablespace_name" ,
              "require" : "true" ,
              "type" : "STRING" ,
              "sensitive" : "false"
            }
        ] ,
        "type" : "LIST" ,
        "sensitive" : "false"
      }
  ]
}
32.3.2.3.2 Creating a Schema Service

This section describes how to create a database service using the Cloud resources. As Database service is also a service instance in the service family type dbaas, you need to identify the zone of the same family type in which to create the database service. There are two approaches to creating a database service:

  • By passing a POST request on the DB Zone on which DB service is to be created

  • By passing a POST request on the Schema Platform Template resource of which the database service is to be based on

Note the attributes in the submitted body for the POST. The pattern is the same for other service instance creations. Since the intention is clear, the zone attribute is not required while performing the POST operation to the Db Zone. Similarly, the based_on attribute is not needed when performing the POST operation to the SchemaPlatformTemplate.

The following operations are described in this section:

Creating a Schema by Passing a Request on the DB Zone 

The configuration for performing POST to DB Zone is as follows:

  • URL

    https://example.mycompany.com/em/cloud/dbaas/zone/82CF1C28FA20A183C99D138FF8065F19

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/oracle.com.cloud.common.SchemaPlatformInstance+json

    Accept: application/oracle.com.cloud.common.SchemaPlatformInstance+json

  • Body for a profile based schema template for multiple schemas:

    {
      "name" : "TestService0" ,
      "params" :     {
          "schema" :
          [
              {
                "username" : "Schema_User11_01" ,
                "password" : "Schema_User1" ,
                "tablespace_name" : "tbsp01"
              } ,
              {
                "username" : "Schema_User11_02" ,
                "password" : "Schema_User1" ,
                "tablespace_name" : "tbsp02"
              } ,
              {
                "username" : "Schema_User11_03" ,
                "password" : "Schema_User1" ,
                "tablespace_name" : "tbsp03"
              } ,
              {
                "username" : "Schema_User11_04" ,
                "password" : "Schema_User1" ,
                "tablespace_name" : "tbsp04"
              }
          ] ,
          "workload_name" : "default_workload" ,
          "service_name" : "TestService0" ,
          "masterAccount" : "Schema_User11_01"
        } ,
      "zone" : "/em/cloud/dbaas/zone/9A71CBEABCA367D0D425697DC39B3AF9"
    }
    
  • Body for a Profile based schema template for a single schema:

    {
      "name" : "TestService0" ,
      "params" :     {
          "schema" :
          [
              {
                "username" : "Schema_User11_01" ,
                "password" : "Schema_User1" ,
                "tablespace_name" : "tbsp01"
              } ,
          "workload_name" : "default_workload" ,
          "service_name" : "TestService0" ,
          "masterAccount" : "Schema_User11_01"
        } ,
      "zone" : "/em/cloud/dbaas/zone/9A71CBEABCA367D0D425697DC39B3AF9"
    }
    
  • Method

    POST

The response from any of the above interaction is the same. The response is shown below.

{
  "uri" : "/em/cloud/dbaas/schemaplatforminstance/byrequest/22" ,
  "name" : "TestRequest" ,
  "resource_state" :     {
      "state" : "INITIATED"
    } ,
  "media_type" : "application/oracle.com.cloud.common.SchemaPlatformInstance+json" ,
  "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/schemaplatforminstance/byrequest/22" ,
  "status" : "SCHEDULED"
}

Creating a Schema by Passing a Request on the Schema Platform Template 

The configurations for performing POST to the Schema Platform Template is as follows:

  • URL

    https://example.mycompany.com/em/cloud/dbaas/schemaplatformtemplate/CC3BBB665A6BC6FFE040F00AEF252456

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/oracle.com.cloud.common.SchemaPlatformInstance+json

    Accept: application/oracle.com.cloud.common.SchemaPlatformInstance+json

  • Body for a Profile Based Schema Template

    {
      "based_on" : "/em/cloud/dbaas/schemaplatformtemplate/FADFFB8A434244F1E043797EF00A63AE" ,
      "name" : "Test Service" ,
      "params" :     {
          "schema" :
          [
              {
                "username" : "Schaas_Api_User_1" ,
                "original_name" : "SCHEMA_USER_1" ,
                "password" : "welcome1"
              } ,
              {
                "username" : "Schaas_Api_User_2" ,
                "original_name" : "SCHEMA_USER_2" ,
                "password" : "welcome1"
              }
          ] ,
          "workload_name" : "SMALL" ,
          "service_name" : "TestService" ,
          "masterAccount" : "Schema_User11_01"
          "tablespaces" :
          [
              {
                "old_tablespace_name" : "DUMPTBSP2" ,
                "new_tablespace_name" : "tablespace2"
              } ,
              {
                "old_tablespace_name" : "DUMPTBSP1" ,
                "new_tablespace_name" : "tablespace1"
              }
          ]
        }
    }
    
  • Method

    POST

The response from the above interaction is shown below.

{
  "uri" : "/em/cloud/dbaas/schemaplatforminstance/byrequest/23" ,
  "name" : "TestRequest" ,
  "resource_state" :     {
      "state" : "INITIATED"
    } ,
  "media_type" : "application/oracle.com.cloud.common.SchemaPlatformInstance+json" ,
  "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/schemaplatforminstance/byrequest/23" ,
  "status" : "SCHEDULED"
}

The response shown above is the same as the previous version. If the zone is not specified, then it is not possible for the web service to determine where the database service should be deployed.

32.3.2.3.3 Viewing Details of the Schema Service Creation

After the database service creation has been performed by performing the POST operation, you can perform the GET operation to get the resource identified by the return URI to keep track of the status.

  • URL

    https://example.mycompany.com/em/cloud/dbaas/schemaplatforminstance/byrequest/22

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Accept: application/oracle.com.cloud.common.SchemaPlatformInstance+json

  • Method

    GET

The response received is shown below.

{
    "uri": "/em/cloud/dbaas/schemaplatforminstance/byrequest/22",
    "name": "TestRequest_CREATE_55_42",
    "description": "Create Service for test.",
    "resource_state":
    {
      "state": "CREATING"
    },
    "context_id": "22",
    "media_type": "application/oracle.com.cloud.common.SchemaPlatformInstance+json",
    "status": "IN_PROGRESS",
    "created": "2013-06-07 23:09:04" ,
    "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/schemaplatforminstance/byrequest/22"
}

Note that the resource_state attribute shows CREATING to indicate that the database service is being created. After the database service is created, the GET operation returns the database service resource with READY state, as shown below:

{
  "uri": "/em/cloud/dbaas/schemaplatforminstance/byrequest/22",
  "name": "Service_1_35E576F22E97E",
  "resource_state": {
    "state": "READY"
  },
  "context_id": "22",
  "media_type": "application/oracle.com.cloud.common.SchemaPlatformInstance+json",
  "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/schemaplatforminstance/byrequest/22",
  "status": "RUNNING",
  "created": "2013-06-10 02:45:32",
  "based_on": "/em/cloud/dbaas/schemaplatformtemplate/DECA1100F797EF10E040F00AFBB123E7",
  "target_type": "oracle_dbsvc",
  "connect_string": "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=abc.mycompany.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=Service_1_35E576F22E97E.mycompany.com)))",
  "destination_zone": "/em/cloud/dbaas/zone/34C1FC23A7503E1CC9C490C9670635F9",
  "db_version": "11.2.0.3.0"
}
32.3.2.3.4 Deleting a Schema Service

The DELETE request can be issued on the URI of the resource to delete a database service. The configuration for the DELETE request is as follows:

  • URL

    https://example.mycompany.com/em/cloud/dbaas/schemaplatforminstance/byrequest/22

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Accept: application/oracle.com.cloud.common.SchemaPlatformInstance+json

  • Method

    DELETE

The web service response with code 200 is returned. A sample of the same is shown below.

{
  "uri" : "/em/cloud/dbaas/schemaplatforminstance/byrequest/22" ,
  "name" : "Service_1_35E576F22E97E" ,
  "resource_state" :     {
      "state" : "DESTROYING" ,
      "messages" :
      [
          {
            "text" : "Submit 'DELETE' operation on 'application/oracle.com.cloud.common.SchemaPlatformInstance+json' 'Service_1_35E576F22E97E'.  The process has job id '41'" ,
            "date" : "2013-06-07T23:16:20+0000"
          }
      ]
    } ,
  "context_id" : "22" ,
  "media_type" : "application/oracle.com.cloud.common.SchemaPlatformInstance +json" ,
  "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/schemaplatforminstance/byrequest/22" ,
  "type" : "oracle_dbsvc"
}

After some time, a GET request on the database service URI results in the following interaction:

  • URL

    https://example.mycompany.com/em/cloud/dbaas/schemaplatforminstance/byrebyrequest/22

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

  • Method

    GET

The web service returns the following:

{
  "uri": "/em/cloud/dbaas/schemaplatforminstance/byrequest/22",
  "name": "Service_1_35E576F22E97E",
  "resource_state": {
    "state": "DESTROYING"
  },
  "context_id": "2",
  "media_type": "application/oracle.com.cloud.common.SchemaPlatformInstance+json",
  "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/schemaplatforminstance/byrequest/2",
  "status": "RUNNING",
  "created": "2013-06-10 02:45:32",
  "based_on": "/em/cloud/dbaas/schemaplatformtemplate/DECA1100F797EF10E040F00AFBB123E7",
  "type": "oracle_dbsvc",
  "connect_string": "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host1.mycompany.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=Service_1_35E576F22E97E.mycompany.com)))",
  "destination_zone": "/em/cloud/dbaas/zone/34C1FC23A7503E1CC9C490C9670635F9",
  "db_version": "11.2.0.3.0"
}

The status of the database service shows DELETED after the schema service is deleted.

32.3.2.3.5 Life Cycle Operations of a Schema Service

The POST request can be issued on the URI of the resource to perform an operation on a schema service.

The following life cycle operations can be performed using the POST request:

Exporting a Schema

For exporting schema, the user can optionally provide the date at which the export should be taken. The date and time should be in the YYYY-MM-DDTHH:MM:SSZFullTimeZonename format.

For example to schedule in PST time user should enter 2013-08-27T12:34:45ZAmerica/Los_Angeles.

However, the time zone is optional. If you do not want to provide the time zone, then enter: 2013-08-27T12:34:45Z.

The configurations for the POST on a SchemaPlatformInstance is described below:

  • URL https://example.mycompany.com/em/cloud/dbaas/schemaplatforminstance/byrequest/7

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/oracle.com.cloud.common.SchemaPlatformInstance +json

    Accept: application/oracle.com.cloud.common.SchemaPlatformInstance+json

  • Body

    {
            "operation" : "EXPORT",
            "profile_name" : "test_api_export",
            "profile_desc" : "testing export option from APIs",
            "export_schedule" : "2013-07-31T02:10:45ZAsia/Calcutta   "
            }
    
  • Method

    POST

    The following is the response from the above interaction:

    {
      "uri" : "/em/cloud/dbaas/schemaplatforminstance/byrequest/123" ,
      "name" : "Service_8E958EC718B11" ,
      "resource_state" :     {
          "state" : "INITIATED" ,
          "messages" : 
          [
              {
                "date" : "2013-08-27T07:34:43+0000" ,
                "text" : "Successfully submitted EXPORT operation on schema instance. Request id - 130." ,
                "uri" : "/em/cloud/dbaas/schemaplatforminstance/byrequest/130"
              }
          ]
        } ,
      "context_id" : "123" ,
      "media_type" : "application/oracle.com.cloud.common.SchemaPlatformInstance+json" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/schemaplatforminstance/byrequest/123" ,
      "target_type" : "oracle_dbsvc"
    }
    

    After the export operation is completed, a GET operation on schema service yields below output

    {
      "uri" : "/em/cloud/dbaas/schemaplatforminstance/byrequest/123" ,
      "name" : "Service_8E958EC718B11" ,
      "resource_state" :     {
          "state" : "READY"
        } ,
      "context_id" : "123" ,
      "media_type" : "application/oracle.com.cloud.common.SchemaPlatformInstance+json" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/schemaplatforminstance/byrequest/123" ,
      "status" : "RUNNING" ,
      "created" : "2013-08-26 23:49:30" ,
      "based_on" : "/em/cloud/dbaas/schemaplatformtemplate/E4D9626BC252F517E040F20A605152CD" ,
      "target_type" : "oracle_dbsvc" ,
      "connect_string" : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=Service_8E958EC718B11.us.oracle.com)))" ,
      "destination_zone" : "/em/cloud/dbaas/zone/675B859C36772FB7856771B1D57F79F8" ,
      "schema_list" : 
      [
          {
            "service_name_prefix" : "" ,
            "workload_name" : "" ,
            "schema" : 
            [
                {
                  "username" : "" ,
                  "original_name" : "schema200" ,
                  "password" : ""
                }
            ]
          }
      ] ,
      "db_version" : "11.2.0.2.0" ,
      "export_dump_list" : 
      [
          {
            "name" : "test_api_export" ,
            "description" : "testing export option from APIs" ,
            "URN" : "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:E4E9E7EE230BF965E040F20A60517256:0.1" ,
            "status" : "Ready"
          }
      ]
    }
    

Restoring a Schema from Exported Schema Dumps

The restore schema from dump activity is based on the available export dumps. Refer to export_dump_list section in the output of the GET request to view the URN of the dump.

The configurations for the POST on a SchemaPlatformInstance are described below:

  • URL https://example.mycompany.com/em/cloud/dbaas/schemaplatforminstance/byrequest/7

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/oracle.com.cloud.common.SchemaPlatformInstance +json

    Accept: application/oracle.com.cloud.common.SchemaPlatformInstance+json

  • Body

    {
            "operation" : "IMPORT",
            "profile_urn" : "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:DECB2AAA09CCD711E040F20A60514F92:0.1"
            }
    
  • Method

    POST

    The response from the above interaction is shown below.

    {
      "uri" : "/em/cloud/dbaas/schemaplatforminstance/byrequest/123" ,
      "name" : "Service_8E958EC718B11" ,
      "resource_state" :     {
          "state" : "INITIATED" ,
          "messages" : 
          [
              {
                "date" : "2013-08-27T07:34:43+0000" ,
                "text" : "Successfully submitted IMPORT operation on schema instance. Request id - 132." ,
                "uri" : "/em/cloud/dbaas/schemaplatforminstance/byrequest/132"
              }
          ]
        } ,
      "context_id" : "123" ,
      "media_type" : "application/oracle.com.cloud.common.SchemaPlatformInstance+json" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/schemaplatforminstance/byrequest/123" ,
      "target_type" : "oracle_dbsvc"
    }
    

Deleting Exported Schema Dumps

Deleting the export dump depends on the available export dumps. Refer to export_dump_list section in the output of the GET request to view the URN of the dump.

The configuration for the POST on a SchemaPlatformInstance is as follows:

  • URL https://example.mycompany.com/em/cloud/dbaas/schemaplatforminstance/byrequest/7

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/oracle.com.cloud.common.SchemaPlatformInstance +json

    Accept: application/oracle.com.cloud.common.SchemaPlatformInstance+json

  • Body

    {
            "operation" : "DELETE_EXPORT",
            "profile_urn" : "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:DECB2AAA09CCD711E040F20A60514F92:0.1"
            }
    
  • Method

    POST

    The following is the response from the above interaction:

    {
      "uri" : "/em/cloud/dbaas/schemaplatforminstance/byrequest/123" ,
      "name" : "Service_8E958EC718B11" ,
      "resource_state" :     {
          "state" : "INITIATED" ,
          "messages" : 
          [
              {
                "date" : "2013-08-27T07:34:43+0000" ,
                "text" : "Successfully submitted DELETE_EXPORT operation on schema instance. Request id - 135." ,
                "uri" : "/em/cloud/dbaas/schemaplatforminstance/byrequest/135"
              }
          ]
        } ,
      "context_id" : "123" ,
      "media_type" : "application/oracle.com.cloud.common.SchemaPlatformInstance+json" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/schemaplatforminstance/byrequest/123" ,
      "target_type" : "oracle_dbsvc"
    }
    

Changing Schema Passwords

The configuration for the POST on a SchemaPlatformInstance is as follows:

  • URL https://example.mycompany.com/em/cloud/dbaas/schemaplatforminstance/byrequest/7

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/oracle.com.cloud.common.SchemaPlatformInstance +json

    Accept: application/oracle.com.cloud.common.SchemaPlatformInstance+json

  • Body

    {
            "operation" : "CHANGE_PWD",
            "schema_name" : "schema1",
            "new_password" : "welcome"
            }
    
  • Method

    POST

    The response from the above interaction is shown below.

    {
      "uri" : "/em/cloud/dbaas/schemaplatforminstance/byrequest/123" ,
      "name" : "Service_8E958EC718B11" ,
      "resource_state" :     {
          "state" : "INITIATED" ,
          "messages" : 
          [
              {
                "date" : "2013-08-27T07:34:43+0000" ,
                "text" : "Successfully submitted CHANGE_PWD operation on schema instance. Request id - 136." ,
                "uri" : "/em/cloud/dbaas/schemaplatforminstance/byrequest/136"
              }
          ]
        } ,
      "context_id" : "123" ,
      "media_type" : "application/oracle.com.cloud.common.SchemaPlatformInstance+json" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/schemaplatforminstance/byrequest/123" ,
      "target_type" : "oracle_dbsvc"
    }
    

32.3.3 Pluggable Database as a Service APIs

This section describes the resource model for Pluggable Database as a Service (PdbaaS) API and the REST request/response interactions.

Note:

PdbaaS APIs are only supported by the Oracle Cloud Application plug-in version 12.1.0.7.0 and above.

32.3.3.1 Resource Model for Pluggable Database as a Service

Cloud resources are organized by common service entities, and specific services (for example, Pluggable Database as a Service) provide resources by extending these common service entities. The figure below shows the PdbaaS resource model.

Figure 32-4 Pluggable Database as a Service Resource Model

Pluggable Database as a service resource model

The following sections describe the resources that are supported by the Pluggable Database as a Service APIs and provide examples of supported operations. Pluggable Database as a Service uses the same Cloud, Service Family, and DB Zone resources as described in Section 32.3.1.1, "Resource Model for Database as a Service".

The following resource models are described in this section:

32.3.3.1.1 Pluggable Db Platform Template

The Pluggable Db Platform Template extends the Service Template resource. It represents the service template created for Pluggable Database creation. It can be a template for creating a pluggable database using profile based pluggable database (pdb with data) or for creating an empty pluggable database. It is permissible to accept the ServiceTemplate media type on an instance of Pluggable Db Platform Template. It is a preconfigured deployable service that realizes a Pluggable Db Platform Instance resource. Pluggable Db Platform Template has the following media type and payload:

Type Description
Media Type application/oracle.com.cloud.common.PluggableDbPlatformTemplate+json
Support Payload json
URI Format /em/cloud/dbaas/pluggabledbplatformtemplate/<template id>

The following table describes the Schema Platform Template Data Model.

Table 32-25 Schema Platform Template Data Model

Field Type Occurs Description

uri

URI

1

A GET against this URI refreshes the client representation of the resources accessible to this user.

name

String

1

A human readable name given to the template.

description

String

0..1

A brief description given to the template.

created

Timestamp

1

Date and time, in ISO 8601 format, when the template was created/last modified.

zones

Collection <DbZone>

0..1

List of all zones configured for this template.

resource_state

ResourceState

1

The validity of the fields on a GET should be guaranteed only when the resource state is READY. Otherwise, the client should not assume the validity of the fields.

service_instances

Collection <SchemaPlatformInstance>

0..1

All service instances created based on this SchemaPlatformTemplate.

media_type

String

1

The media type of the service template that this type represents.

params

Object

1

List of parameters required to provision a Schema Platform Instance from this template.

deployment_params

List<Object>

1

Description of the parameters which are required while creating a service instance.

type

String

1

The type of the service template which is "dbaas" by default.

subtype

String

1

The sub type of the instance created based on this template.

It has a value "schema" in this case.

template_type

String

1

Type of this template based on how the template got created. It can have any of two values : "EMPTY_SCHEMAS" or "SCHEMAS_FROM_PROFILE".

workloads

List<Object>

0..1

List all the workloads defined for this template and list the attributes for each one of them.

canonicalLink

URI

1

Can be used to perform cloud interactions like GET and POST.

number_of_tablespaces

String

1

Number of tablespaces.


32.3.3.1.2 Pluggable Db Platform Instance

The Pluggable Db Platform Instance extends the Service Instance resource. It is linked to Pluggable Database target in Enterprise Manager Cloud Control. Pluggable Db Platform Instance has the following media type and payload:

Type Description
Media Type application/oracle.com.cloud.common.PluggableDbPlatformInstance+json
Support Payload json
URI Format /em/cloud/dbaas/pluggabledbplatforminstance/byrequest/<request id>

The following table describes the Schema Platform Instance Data Model:

Table 32-26 Schema Platform Instance Data Model

Field Type Occurs Description

uri

URI

1

A GET against this URI refreshes the client representation of the resources accessible to this user.

name

String

1

A human readable name given given to the pluggable database

destination_zone

Zone

1

The Zone to which the pluggable database is deployed

media_type

String

1

Indicates the additional media type that clients can use to perform a GET.

resource_state

ResourceState

1

The validity of the fields on a GET should be guaranteed only when the resource state is READY. Otherwise, the client should not assume the validity of the fields.

based_on

PluggableDbPlatformTemplate

1

The pluggable db platform template on which this database service is published.

connect_string

String

0..1

Connect String required to establish a connection to this database service.

created

Timestamp

1

Date and time, in ISO 8601 format, when the template was created/last modified.

target_type

String

1

Target type of this service instance. It has the default value oracle_pdb

status

String

1

Status of the pluggable database.

db_version

String

0..1

Version of the database on which pluggable db is running.

context_id

String

1

The request id of this pluggable database.

canonicalLink

URI

1

Can be used to perform cloud interactions like GET and DELETE.


32.3.3.2 Operations Supported on Pluggable Database Resources

The following table lists all the operations that are supported on the various Pluggable Database as Service resources.

Table 32-27 Supported Operations

Resource Operations (GET, POST, PUT, and DELETE)

Cloud

GET

Service Family Type

GET

DB Zone

GET, and POST

PluggableDb Platform Template [Service Template]

GET, and POST

PluggableDb Platform Instance [Service Instance]

GET, POST, and DELETE


32.3.3.3 Pluggable Database API Examples

The following sections provide examples of interaction with Enterprise Manager Cloud Control 12.1.0.3 with Cloud Application plug-in 12.1.0.7 and higher. The examples for GET on cloud, GET on dbaas family type and GET on Db Zone are covered in the Dbaas APIs section. The following examples are covered:

32.3.3.3.1 Viewing Details of the Pluggable Db Platform Template Resource

A GET request on a Pluggable Db Platform Template provides the details about a Pluggable DB service template.

  • URL

    https://example.mycompany.com/em/cloud/dbaas/pluggabledbplatformtemplate/E32F474628FCCE5AE040E50ACA84603A

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

  • Method

    GET

    This is the resource returned as the complete PluggableDbPlatformTemplate resource:

    {
      "media_type" : "application/oracle.com.cloud.common.PluggableDbPlatformTemplate+json" ,
      "resource_state" :     {
          "state" : "READY"
        } ,
      "params" :     {
          "username" : "" ,
          "pdb_name" : "" ,
          "workload_name" : "" ,
          "service_name" : "" ,
          "password" : "" ,
          "tablespaces" : 
          [      ]
        } ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/pluggabledbplatformtemplate/FADF7229EB960330E043E176F00ADE61" ,
      "template_type" : "EMPTY_PDB" ,
      "type" : "dbaas" ,
      "zones" :     {
          "total" : "1" ,
          "media_type" : "application/oracle.com.cloud.common.DbZone+json" ,
          "elements" : 
          [
              {
                "media_type" : "application/oracle.com.cloud.common.DbZone+json" ,
                "context_id" : "9A71CBEABCA367D0D425697DC39B3AF9" ,
                "description" : "New Self Service Zone 1" ,
                "service_family_type" : "dbaas" ,
                "name" : "SsaZone_1" ,
                "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/zone/9A71CBEABCA367D0D425697DC39B3AF9" ,
                "type" : "self_service_zone" ,
                "uri" : "/em/cloud/dbaas/zone/9A71CBEABCA367D0D425697DC39B3AF9"
              }
          ]
        } ,
      "uri" : "/em/cloud/dbaas/pluggabledbplatformtemplate/FADF7229EB960330E043E176F00ADE61" ,
      "service_instances" :     {
          "total" : "0" ,
          "media_type" : "application/oracle.com.cloud.common.PluggableDbPlatformInstance+json" ,
          "elements" : 
          [      ]
        } ,
      "created" : "2014-06-02T18:20:20+0000" ,
      "description" : "Empty PDB use case" ,
      "name" : "my_pdb_service_template" ,
      "subtype" : "pdb" ,
      "workloads" : 
      [
          {
            "description" : "my first test of workload chars" ,
            "name" : "Large" ,
            "attributes" : 
            [
                {
                  "name" : "CPU" ,
                  "value" : "0.4" ,
                  "units" : "cores"
                } ,
                {
                  "name" : "Memory" ,
                  "value" : "0.5" ,
                  "units" : "GB"
                } ,
                {
                  "name" : "Sessions" ,
                  "value" : "200" ,
                  "units" : "units"
                } ,
                {
                  "name" : "Storage" ,
                  "value" : "4" ,
                  "units" : "GB"
                }
            ]
          } ,
          {
            "description" : "my first test of workload chars" ,
            "name" : "Medium" ,
            "attributes" : 
            [
                {
                  "name" : "CPU" ,
                  "value" : "0.3" ,
                  "units" : "cores"
                } ,
                {
                  "name" : "Memory" ,
                  "value" : "0.34" ,
                  "units" : "GB"
                } ,
                {
                  "name" : "Sessions" ,
                  "value" : "150" ,
                  "units" : "units"
                } ,
                {
                  "name" : "Storage" ,
                  "value" : "2" ,
                  "units" : "GB"
                }
            ]
          } ,
          {
            "description" : "my first test of workload chars" ,
            "name" : "Small" ,
            "attributes" : 
            [
                {
                  "name" : "CPU" ,
                  "value" : "0.2" ,
                  "units" : "cores"
                } ,
                {
                  "name" : "Memory" ,
                  "value" : "0.25" ,
                  "units" : "GB"
                } ,
                {
                  "name" : "Sessions" ,
                  "value" : "100" ,
                  "units" : "units"
                } ,
                {
                  "name" : "Storage" ,
                  "value" : "2" ,
                  "units" : "GB"
                }
            ]
          } ,
          {
            "description" : "my first test of workload chars" ,
            "name" : "my_default_workload1" ,
            "attributes" : 
            [
                {
                  "name" : "CPU" ,
                  "value" : "0.25" ,
                  "units" : "cores"
                } ,
                {
                  "name" : "Memory" ,
                  "value" : "0.3" ,
                  "units" : "GB"
                } ,
                {
                  "name" : "Sessions" ,
                  "value" : "50" ,
                  "units" : "units"
                } ,
                {
                  "name" : "Storage" ,
                  "value" : "3" ,
                  "units" : "GB"
                }
            ]
          }
      ] ,
      "number_of_tablespaces" : "1" ,
      "deployment_params" : 
      [
          {
            "description" : "Name of the additional service created as part of the pdb service request" ,
            "name" : "service_name" ,
            "require" : "true" ,
            "type" : "STRING" ,
            "sensitive" : "false"
          } ,
          {
            "description" : "WorkLoad name to be associated with the request" ,
            "name" : "workload_name" ,
            "require" : "true" ,
            "type" : "STRING" ,
            "sensitive" : "false"
          } ,
          {
            "description" : "Pluggable database admin username" ,
            "name" : "username" ,
            "require" : "true" ,
            "type" : "STRING" ,
            "sensitive" : "false"
          } ,
          {
            "description" : "Pluggable database admin user password" ,
            "name" : "password" ,
            "require" : "true" ,
            "type" : "STRING" ,
            "sensitive" : "true"
          } ,
          {
            "description" : "Name of Pluggable database" ,
            "name" : "pdb_name" ,
            "require" : "true" ,
            "type" : "STRING" ,
            "sensitive" : "false"
          } ,
          {
            "description" : "List of tablespace names. Required only for EMPTY_PDB templates" ,
            "name" : "tablespaces" ,
            "require" : "false" ,
            "type" : "LIST" ,
            "sensitive" : "false"
          }
      ]
    }
    
32.3.3.3.2 Creating a Pluggable Database

This section describes how to create a pluggable database using the Cloud resources.

As Pluggable Database is also a service instance in the service family type "dbaas", you need to identify the zone of the same family type in which to create the pluggable database. There are two approaches to create a pluggable database:

Note the attributes in the submitted body for the POST. The pattern is the same for other service instance creations. Because the intention is clear, the "zone" attribute is not required while POSTing to the Db Zone. Similarly, the "based_on" attribute is not needed when POSTing to the PluggableDbPlatformTemplate.

Creating a Pluggable Database by Passing a Request on the DB Zone

The following shows the configuration for POSTing to Db Zone:

  • URL

    https://example.mycompany.com/em/cloud/dbaas/zone/82CF1C28FA20A183C99D138FF8065F19

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type:

    application/oracle.com.cloud.common.PluggableDbPlatformInstance+json

    Accept:

    application/oracle.com.cloud.common.PluggableDbPlatformInstance+json

  • Body

    {
      "based_on" : "/em/cloud/dbaas/pluggabledbplatformtemplate/FADF7229EB960330E043E176F00ADE61" ,
      "name" : "Test Service" ,
      "params" :     {
          "username" : "Pdbaas_Api_User" ,
          "pdb_name" : "pdb_lrgemg880" ,
          "workload_name" : "Small" ,
          "service_name" : "TestService" ,
          "password" : "welcome1" ,
          "tablespaces" :
          [
            "tbsp1"
          ]
        }
    }
    
  • Method

    POST

    The following is the response from the above interaction:

    {
      "uri": "/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/31",
      "name": "Test Service",
      "resource_state": {
        "state": "INITIATED"
      },
      "media_type": "application/oracle.com.cloud.common.PluggableDbPlatformInstance+json",
      "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/31",
      "status": "SCHEDULED"
    }
    

Creating a Pluggable Database by Passing a Request on the Pluggable DB Platform Template

The following describes the configurations for POSTing to the PluggableDbPlatformTemplate:

  • URL

    https://example.mycompany.com/em/cloud/dbaas/pluggabledbplatformtemplate/CC3BBB665A6BC6FFE040F00AEF252456

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type:C

    application/oracle.com.cloud.common.PluggableDbPlatformInstance

    Accept:

    application/oracle.com.cloud.common.PluggableDbPlatformInstance+json

  • Body

    {
      "zone": "/em/cloud/dbaas/zone/34C1FC23A7503E1CC9C490C9670635F9" ,
      "name" : "Test Service" ,
      "params" :     {
          "username" : "SampleUser2" ,
          "password" : "welcome1" ,
          "workload_name" : "w11" ,
          "pdb_name" : "pdb_lrgemg880" ,
                "service_name" : "TestService" ,
          "tablespaces" :
          [
            "tbsp1"
          ]
        }
    }
    
  • Method

    POST

    The following is the response from the above interaction:

    {
      "uri": "/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/32",
      "name": "Test Service",
      "resource_state": {
        "state": "INITIATED"
      },
      "media_type": "application/oracle.com.cloud.common.PluggableDbPlatformInstance+json",
      "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/32",
      "status": "SCHEDULED"
    }
    

    This response is the same as the previous version. If the zone is not specified, then it is not possible for the Web service to determine where the pluggable database should be deployed.

32.3.3.3.3 Viewing Details of the Pluggable Database Creation

A GET request on a Pluggable Db Platform Instance provides the status and other information about the resource.

  • URL

    https://example.mycompany.com/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/31

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Accept: application/oracle.com.cloud.common.PluggableDbPlatformInstance+json

  • Method

    GET

    The following is the response:

    {
      "uri": "/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/31",
      "name": "Test Service_CREATE_11_53",
      "description": "Create Database for \"Test Service\".", 
      "resource_state":
        {
          "state": "CREATING"
        },
        "context_id": "31",
        "media_type": "application/oracle.com.cloud.common.PluggableDbPlatformInstance+json",
        "status": "IN_PROGRESS",
        "created": "2013-06-07 23:09:04" ,
        "canonicalLink": "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/31"
    }
    

    Note that the resource_state attribute shows CREATING state which indicates that the pluggable database is being created. After the pluggable database is created, the GET operation returns the pluggable database resource with READY state, as shown below:

    {
      "destination_zone" : "/em/cloud/dbaas/zone/9A71CBEABCA367D0D425697DC39B3AF9" ,
      "media_type" : "application/oracle.com.cloud.common.PluggableDbPlatformInstance+json" ,
      "db_version" : "12.1.0.1.0" ,
      "resource_state" :     {
          "state" : "READY"
        } ,
      "status" : "RUNNING" ,
      "based_on" : "/em/cloud/dbaas/pluggabledbplatformtemplate/E33799E249513428E040F50A994210F5" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/31" ,
      "connect_string" : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=MYPDB_000)(INSTANCE_NAME=t105kfv)(UR=A)(SERVER=DEDICATED)))" ,
      "uri" : "/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/31" ,
      "context_id" : "31" ,
      "created" : "2013-08-05 17:30:30" ,
      "name" : "database_MYPDB_000" ,
      "target_type" : "oracle_pdb" 
    }
    
32.3.3.3.4 Deleting a Pluggable Database Instance

The DELETE request on the URI of the resource can be issued to delete a pluggable database. For example, the following DELETE request is issued:

  • URL

    https://example.mycompany.com/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/7

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Accept: application/oracle.com.cloud.common.PluggableDbPlatformInstance+json

  • Method

    DELETE

    The following Web service response with code 200 is returned:

    {
      "media_type" : "application/oracle.com.cloud.common.PluggableDbPlatformInstance+json" ,
      "context_id" : "7" ,
      "resource_state" :     {
          "state" : "DESTROYING" ,
          "messages" :
          [
              {
                "text" : "Submit 'DELETE' operation on 'application/oracle.com.cloud.common.PluggableDbPlatformInstance+json' 'database_MYPDB_000'.  The process has job id '24'" ,
                "date" : "2013-08-05T17:35:56+0000"
              }
          ]
        } ,
      "name" : "database_MYPDB_000" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/7" ,
      "target_type" : "oracle_pdb" ,
      "uri" : "/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/7" 
    }
    

    After some time, the GET request on the database service URI will result in the following interaction:

    • URL

      https://example.mycompany.com/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/22

    • Headers

      Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    • Method

      GET

      The Web service returns the following:

      {  
        "destination_zone" : "/em/cloud/dbaas/zone/9A71CBEABCA367D0D425697DC39B3AF9" ,
        "media_type" : "application/oracle.com.cloud.common.PluggableDbPlatformInstance+json" ,
        "db_version" : "12.1.0.1.0" ,
        "resource_state" :     {
            "state" : "READY"
          } ,
        "status" : "DESTROYING" ,
        "based_on" : "/em/cloud/dbaas/pluggabledbplatformtemplate/E33799E249513428E040F50A994210F5" ,
        "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/7" ,
        "connect_string" : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=MYPDB_000)(INSTANCE_NAME=t105kfv)(UR=A)(SERVER=DEDICATED)))" ,
        "uri" : "/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/7" ,
        "context_id" : "7" ,
        "created" : "2013-08-05 17:30:30" ,
        "name" : "database_MYPDB_000" ,
        "target_type" : "oracle_pdb"
      }
      

      Note that the status of the pluggable database will be "DELETED" once the pluggable database instance is deleted.

32.3.3.3.5 Lifecycle operations on a Pluggable Database Instance

The POST request on the URI of the resource can be issued to perform an operation on a pluggable database.

You can perform the following tasks using POST request:

Shutting Down a Pluggable Database 

The following describes the configurations for the POST on a PluggableDbPlatformInstance:

  • URL: https://example.mycompany.com/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/7

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/oracle.com.cloud.common.PluggableDbPlatformInstance+json

    Accept: application/oracle.com.cloud.common.PluggableDbPlatformInstance+json

  • Body

    {
            "operation" : "SHUTDOWN"
            }
    
  • Method

    POST

    The following is the response from the above interaction:

    {
      "uri" : "/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/81" ,
      "name" : "database_PDBSERVICE_000" ,
      "resource_state" :     {
          "state" : "INITIATED" ,
          "messages" : 
          [
              {
                "date" : "2013-08-27T06:56:25+0000" ,
                "uri" : "/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/124" ,
                "text" : "Successfully submitted SHUTDOWN operation on service instance. Request id - 124."
              }
          ]
        } ,
      "context_id" : "81" ,
      "media_type" : "application/oracle.com.cloud.common.PluggableDbPlatformInstance+json" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/81" ,
      "status" : "RUNNING" ,
      "created" : "2013-08-26 04:19:14" ,
      "based_on" : "/em/cloud/dbaas/pluggabledbplatformtemplate/E49AA1BAC2DBA0ECE040F20A60517942" ,
      "target_type" : "oracle_pdb" ,
      "connect_string" : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST= host1)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=PDB_000)(INSTANCE_NAME=tbugt)(UR=A)(SERVER=DEDICATED)))" ,
      "destination_zone" : "/em/cloud/dbaas/zone/0129A72DB32D4199B59ABFA64085EAB3" ,
      "db_version" : "12.1.0.1.0"
    }
    

Starting up a Pluggable Database 

  • URL: https://example.mycompany.com/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/7

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/oracle.com.cloud.common.PluggableDbPlatformInstance+json

    Accept: application/oracle.com.cloud.common.PluggableDbPlatformInstance+json

  • Body

    {
            "operation" : "STARTUP"
            }
    
  • Method

    POST

    The following is the response from the above interaction:

    {
      "uri" : "/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/81" ,
      "name" : "database_PDBSERVICE_000" ,
      "resource_state" :     {
          "state" : "INITIATED" ,
          "messages" : 
          [
              {
                "date" : "2013-08-27T06:58:58+0000" ,
                "uri" : "/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/125" ,
                "text" : "Successfully submitted STARTUP operation on service instance. Request id - 125."
              }
          ]
        } ,
      "context_id" : "81" ,
      "media_type" : "application/oracle.com.cloud.common.PluggableDbPlatformInstance+json" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/81" ,
      "status" : "STOPPED" ,
      "created" : "2013-08-26 04:19:14" ,
      "based_on" : "/em/cloud/dbaas/pluggabledbplatformtemplate/E49AA1BAC2DBA0ECE040F20A60517942" ,
      "target_type" : "oracle_pdb" ,
      "connect_string" : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST= host1)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=PDB_000)(INSTANCE_NAME=tbugt)(UR=A)(SERVER=DEDICATED)))" ,
      "destination_zone" : "/em/cloud/dbaas/zone/0129A72DB32D4199B59ABFA64085EAB3" ,
      "db_version" : "12.1.0.1.0"
    }
    

Scheduling a Backup for a Pluggable Database 

The following describes the configurations for the POST on a PluggableDbPlatformInstance:

For scheduling backup user has to provide the time at which backups needs to scheduled. This should in format of YYYY-MM-DDTHH:MM:SSZFullTimeZonename.

For example to schedule in PST time user should give 2013-08-27T12:34:45ZAmerica/Los_Angeles

However timezone part is optional. If you do not want to provide it, you can do as follows: 2013-08-27T12:34:45Z

  • URL: https://example.mycompany.com/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/7

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/oracle.com.cloud.common.PluggableDbPlatformInstance+json

    Accept: application/oracle.com.cloud.common.PluggableDbPlatformInstance+json

  • Body

    {
            "operation" : "BACKUP",
     "backup_schedule" : "2013-08-27T12:34:45ZAsia/Calcutta"
            }
    
  • Method

    POST

    The following is the response from the above interaction:

    {
      "uri" : "/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/81" ,
      "name" : "database_PDBSERVICE_000" ,
      "resource_state" :     {
          "state" : "INITIATED" ,
          "messages" : 
          [
              {
                "date" : "2013-08-27T07:01:15+0000" ,
                "uri" : "/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/126" ,
                "text" : "Successfully submitted BACKUP operation on service instance. Request id - 126."
              }
          ]
        } ,
      "context_id" : "81" ,
      "media_type" : "application/oracle.com.cloud.common.PluggableDbPlatformInstance+json" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/81" ,
      "status" : "RUNNING" ,
      "created" : "2013-08-26 04:19:14" ,
      "based_on" : "/em/cloud/dbaas/pluggabledbplatformtemplate/E49AA1BAC2DBA0ECE040F20A60517942" ,
      "target_type" : "oracle_pdb" ,
      "connect_string" : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=PDB_000)(INSTANCE_NAME=tbugt)(UR=A)(SERVER=DEDICATED)))" ,
      "destination_zone" : "/em/cloud/dbaas/zone/0129A72DB32D4199B59ABFA64085EAB3" ,
      "db_version" : "12.1.0.1.0"
    "RMAN_backup_list" : 
      [
          {
            "Key" : "1" ,
            "Tag" : "ORA$OEM_LEVEL_0" ,
            "Completed Time" : "Aug 27, 2013 12:24:02 AM" ,
            "Contents" : "SPFILE,CONTROLFILE" ,
            "Status" : "AVAILABLE"
          }
      ]
    }
    

Restoring a Pluggable Database from a Backup 

The following describes the configurations for the POST on a PluggableDbPlatformInstance:

For restorting from backup ,the user has to provide the point-in-time to which database is to be restored. This should in format of YYYY-MM-DDTHH:MM:SSZFullTimeZonename.

For example to schedule in PST time user should give 2013-08-27T12:34:45ZAmerica/Los_Angeles

However timezone part is optional. If you do not want to provide it, you can do as follows: 2013-08-27T12:34:45Z

The restore time is based on backups available, please refer to RMAN_backup_list section in the output of GET request

  • URL: https://example.mycompany.com/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/7

  • Headers

    Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

    Content-Type: application/oracle.com.cloud.common.PluggableDbPlatformInstance+json

    Accept: application/oracle.com.cloud.common.PluggableDbPlatformInstance+json

  • Body

    {
            "operation" : "RESTORE",
            "restore_date" : "2013-08-27T12:34:45Z"
            }
    
  • Method

    POST

    The following is the response from the above interaction:

    {
      "uri" : "/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/81" ,
      "name" : "database_PDBSERVICE_000" ,
      "resource_state" :     {
          "state" : "INITIATED" ,
          "messages" : 
          [
              {
                "date" : "2013-08-27T07:01:15+0000" ,
                "uri" : "/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/146" ,
                "text" : "Successfully submitted RESTORE operation on service instance. Request id - 146."
              }
          ]
        } ,
      "context_id" : "81" ,
      "media_type" : "application/oracle.com.cloud.common.PluggableDbPlatformInstance+json" ,
      "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/pluggabledbplatforminstance/byrequest/81" ,
      "status" : "RUNNING" ,
      "created" : "2013-08-26 04:20:14" ,
      "based_on" : "/em/cloud/dbaas/pluggabledbplatformtemplate/E49AA1BAC2DBA0ECE040F20A60517942" ,
      "target_type" : "oracle_pdb" ,
      "connect_string" : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=PDB_000)(INSTANCE_NAME=tbugt)(UR=A)(SERVER=DEDICATED)))" ,
      "destination_zone" : "/em/cloud/dbaas/zone/0129A72DB32D4199B59ABFA64085EAB3" ,
      "db_version" : "12.1.0.1.0"
    }
    

32.4 EM CLI For Administrator Flows

The Enterprise Manager Command Line Interface (EM CLI) enables you to access Enterprise Manager Cloud Control functionality from text-based consoles (shells and command windows) for a variety of operating systems. You can call Enterprise Manager Functionality using custom scripts, such as SQL*Plus, OS shell, Perl, or Tcl, thus easily integrating Enterprise Manager Functionality with a company's business process.

This section provides details on the EM CLI verbs for Enterprise Manager Self Service Applications Administration users.

EMCLI verbs will be supported for the following operations in Enterprise Manager Release 12.1.0.4:

All PaaS Infrastructure Zone EM CLI operations are available only to users with a EM_CLOUD_ADMINISTRATOR role and Software Pool operations can be performed only by users with a EM_SSA_ADMINISTRATOR role. EM CLI verbs will obtain user information from the security context and verify only those users authorized to perform these operations.

32.4.1 PaaS Zone EM CLI Verbs

The following table provides details of the supported verbs for the PaaS zone resource.

Table 32-28 Paas Zone API

Verb Description Format

create_paas_zone

Creates a PaaS Infrastructure Zone

  • name - Name of the PaaS Infrastructure Zone to be created

  • credential - Global Named Credentials to be used for provisioning in this PaaS Infrastructure Zone.

  • hosts - Comma separated list of the Host targets to be added as members of this Paas Infrastructure Zone. PaaS Infrastructure Zone can contain either hosts or Oracle VM Zones as members. "ovm_zones - Comma separated list of the Oracle VM Zone targets to be added as members of this Paas Infrastructure Zone.

  • roles - Comma separated list of SSA roles that can access this PaaS Infrastructure Zone.

  • description - Description of the PaaS Infrastructure Zone.

  • cpu_utilization - Placement Policy Constraints allow the cloud administrator to set maximum thresholds for any host. Value entered must be between 1 and 100. If not provided, default value is taken to be 80 percent. Parameter is not needed if Oracle VM Zone targets are added as members.

  • memory_utilization - Another Placement Policy Constraint for PaaS Infrastructure Zone. Value entered must be between 1 and 100. If not provided, default value is taken to be 80 percent. Parameter is not needed if Oracle VM Zone targets are added as members.

Example:

emcli create_paas_zone 
   -name=MyPaaSZone 
   -credential=AIME__N 
   -hosts=slc13rdr.us.oracle.com 
   -roles="SSA_USER_ROLE1" 
   -description="Test PaaS zone" 
   -cpu_utilization=90 
   -memory_utilization=90

Sample Output:

PaaS Infrastructure Zone "MyPaaSZone" created successfully.

emcli create_paas_zone-name=<Name of PaaS zone>

-credential=<Global Named Credential>

[-hosts=<Host1,Host2,Host3...>]

[-ovm_zones=<OVMZone1,OVMZone2,OVMZone3...>]

[-roles=<SsaRole1,SsaRole2,..>]

[-description=<Description of PaaS zone>]

[-cpu_utilization=<Value between 1 and 100>]

[-memory_utilization=<Value between 1 and 100>]

update_paas_zone

Updates a PaaS Infrastructure Zone.

  • name - Name of the existing PaaS Infrastructure Zone.

  • credential - Global Named Credentials to be updated.

  • add_hosts - Comma separated list of the Host targets to be added as members of this Paas Infrastructure Zone. The hosts to be added must not be already added to other existing PaaS zones.

  • remove_hosts - Comma separated list of the Host targets to be removed as members from this Paas Infrastructure Zone.

  • add_ovm_zones - Comma separated list of the Oracle VM Zone targets to be added as members of this Paas Infrastructure Zone. The Oracle VM Zones to be added must not be already added to other existing PaaS zones.

  • remove_ovm_zones - Comma separated list of the Oracle VM Zone targets to be removed as members from this Paas Infrastructure Zone.

  • add_roles - Comma separated list of SSA roles to be added that can access this PaaS Infrastructure Zone.

  • remove_roles - Comma separated list of SSA roles to be removed from: this PaaS Infrastructure Zone.

  • description - Updated description of the PaaS Infrastructure Zone.

  • cpu_utilization - Placement Policy Constraints allow the cloud administrator to set maximum thresholds for any host. Value entered must be between 1 and 100.

  • memory_utilization - Another Placement Policy Constraint for PaaS Infrastructure Zone. Value entered must be between 1 and 100.

Example:

emcli update_paas_zone 
    -name=MyPaaSZone 
    -credential=AIME_N 
    -add_hosts=slc13rdr.us.oracle.com  
    -remove_hosts=slc13a.us.oracle.com 
    -add_roles="SSA_USER_ROLE1"  
    -remove_roles="SSA_USER_ROLE2" 
    -description="Test PaaS zone" 
    -cpu_utilization=90 
    -memory_utilization=90 

Sample Output:

PaaS Infrastructure Zone "MyPaaSZone" updated successfully. 

emcli update_paas_zone-name=<Name of PaaS zone>

[-description=<Description of PaaS zone>]

[-credential=<Global Named Credential>]

[-add_hosts=<Host1,Host2,Host3...>]

[-remove_hosts=<Host4,Host5...>]

[-add_ovm_zones=<OVMZone1,OVMZone2,OVMZone3...>]

[-remove_ovm_zones=<OVMZone4,OVMZone5...>]

[-add_roles=<SsaRole1,SsaRole2,..>]

[-remove_roles=<SsaRole3,SsaRole4,..>]

[-cpu_utilization=<Value between 1 and 100>]

[-memory_utilization=<Value between 1 and 100>]

delete_paas_zone

Deletes a PaaS Infrastructure Zone. PaaS Infrastructure Zone cannot be deleted if there is an existing Software Pool associated with it.

name - Name of the existing PaaS Infrastructure Zone to be deleted.

Example:

emcli delete_paas_zone 
       -name=MyPaaSZone 

Sample Output:

PaaS Infrastructure Zone "MyPaaSZone" deleted successfully

emcli delete_paas_zone -name=<Name of PaaS zone>

get_paas_zone_detail

Retrieves the PaaS Infrastructure Zone details.

name - Details of the existing PaaS Infrastructure Zone, such as Name, Description, Named Credentials, Number of Hosts, Roles, Maximum Memory Allocation (%), and Maximum CPU Utilization (%).

Example:

emcli  get_paas_zone_detail 
    -name=MyPaaSZone

Sample Output:

Name               MyPaaSZone                                                         
  Description        TEST zone                                                         
  Named Credentials  AIME_N                                                       
  Number of Hosts    1                                                                
  Roles              SSA_USER_ROLE1                                                   
  Maximum Memory Allocation (%)   90                                                               
  Maximum CPU Utilization (%)     90  

emcli get_paas_zone_detail -name=<Name of PaaS zone>


32.4.2 Software Pool EM CLI Verbs

The following table provides details of the supported verbs for the Software Pool resource.

Table 32-29 Pool APIs

Verb Description Format

create_pool

Creates a database pool.

  • name - Name of the database pool to be created.

  • target_type - Target type of the software pool to be created.

  • paas_zone - Name of PaaS Infrastructure Zone in which the Software Pool is to be created.

  • members - Comma separated list of targets to be added as members of the database pool.

  • description - Description of the database pool.

  • placement_constraints - Comma separated key value pairs of the placement constraints that allow the self service administrator to set maximum ceilings for resource utilization. This provides protection for the members of the database pool in terms of resource consumption. Refer to the get_pool_allowed_placement_constraints verb to get the available placement constraints for a pool target type.

  • member_constraints - Comma separated key value pairs that restricts the addition of member targets to a database pool with a set criteria. Refer to the get_pool_allowed_member_constraints verb to get the available member constraints and their possible values for a pool target type.

  • properties - Comma separated key value pairs for additional properties that need to be specified based on the database pool target type.

Example:

emcli  create_pool
    -name=MyDbPool
    -target_type=oracle_cloud_zone
    -paas_zone=MyPaaSZone
    -members=OraDb11g_home1_1_slc03qtn
    -description="Test Database Pool"
    -member_constraints= 
      "CONFIGURATION=oracle_database, 
       VERSION=11.2.0.2.0, 
       PLATFORM=226"
    -placement_constraints= 
       "MAX_INSTANCES=7"
    -properties= 
"host_credential_guid=DBA449B8967AAF77E040F00A73B11F55,
root_credential_guid=DBA449B8967AAF77E040F00A73B11F55"

Sample Output:

Software Pool "MyDbPool" created successfully.

emcli create_pool -name=<Name of Software Pool>

-target_type=<Target type of Software Pool>

-paas_zone=<Paas Infrastructure Zone of Software Pool>

-members=<Member1, Member2...>

[-description=<Description of Software Pool>]

[-placement_constraints=<constraint1=value1, constraint2=value2...>]

[-member_constraints=<constraint1=value1, constraint2=value2>]

[-properties=<property1=value1, property2=value2>]

update_pool

Updates a a Database Pool.

  • "name - Name of the existing Software Pool.

  • "target_type - Target type of the existing Software Pool. For example: "mwaas_zone" for Middleware Pool, "oracle_cloud_zone" for Database Pool, and "schaas_pool" for Schema Pool.

  • "description - Description of the Software Pool.

  • "add_members - Comma separated list of targets to be added as members of the Software Pool. The targets to be added must satisfy the member constraints of the Software Pool.

  • "remove_members - Member targets to be removed from the Software Pool.

  • "placement_constraints - Comma separated key value pairs of the placement constraints that allow the self service administrator to set maximum ceilings for resource utilization. This provides protection for the members of the Software Pool in terms of resource consumption.

  • "properties - Comma separated key value pairs for properties that need to be updated based on the Software Pool target type

Example:

emcli update_pool
    -name=MyDbPool
    -target_type=oracle_cloud_zone
    -paas_zone=MyPaaSZone
    -add_members=
          OraDb11g_home1_1_slc03qtn
    -remove_members= 
          OraDb11g_home1_2_slc01mdr
    -description="Test Database Pool"
    -placement_constraints= 
       "MAX_INSTANCES=7"
    -properties= 
"host_credential_guid=DBA449B8967AAF77E040F00A73B11F55,
root_credential_guid=DBA449B8967AAF77E040F00A73B11F55"

Sample Output:

Software Pool "MyDbPool" updated successfully. 

emcli update_pool -name=<Name of Software Pool>

-target_type=<Target type of Software Pool>

[-description=<Description of Software Pool>]

[-add_members=<Member1, Member2...>]

[-remove_members=<Member4, Member5...>]

[-placement_constraints=<constraint1=value1,constraint2=value2...>]

[-properties=<property1=value1, property2=value2>]

delete_pool

Deletes a Database Pool. Software Pool cannot be deleted if there is an existing Service Template associated with it.

  • name - Name of an existing Software Pool.

  • target - Target type of the Software Pool.

Example:

emcli delete_pool
   -name=MyDbPool
    -target_type=oracle_cloud_zone       

Sample Output:

Software Pool "MyDbPool" deleted successfully.

emcli delete_pool -name=<Name of Software Pool>

-target_type=<Target type of Software Pool>

get_pool_detail

Retrieves the Database Pool details, such as name, target type, description, PaaS Infrastructure Zone, number of members, placement constraints, and member constraints.

  • name - Name of the Software Pool.

  • target - Target type of the Software Pool

Example:

emcli get_pool_detail
    -name=MyDbPool
    -target_type=oracle_cloud_zone

Sample Output:

Name              MyDbPool                                                  Target Type       oracle_cloud_zone                                                Description       Test Database Pool                                                 Paas Infrastructure Zone SLC01MDR_ZONE                                                      Number of Members               1                                                                Placement Constraints MAX_INSTANCES : 10                                                 Member Constraints CONFIGURATION : Database Instance ,  VERSION : 11.2.0.2.0 , PLATFORM : Linux x86-64

emcli get_pool_detail -name=<Name of Software Pool>

-target_type=mwaas_zone

create_pool

Creates a Schema Pool.

  • name - Name of the Pool to be created

  • target_type - Target type of the Software Pool to be created

  • paas_zone - Name of PaaS Infrastructure Zone in which the Software Pool is to be created.

  • members - Comma separated list of targets to be added as members of the Software Pool.

  • description - Description of the Software Pool.

  • placement_constraints - Comma separated key value pairs of the placement constraints that allow the self service administrator to set maximum ceilings for resource utilization. This provides protection for the members of the Software Pool in terms of resource consumption. Refer to the get_pool_allowed_placement_constraints verb to get the available placement constraints for a pool target type.

  • member_constraints - Comma separated key value pairs that restricts the addition of member targets to a Software Pool with a set criteria. Refer to the get_pool_allowed_member_constraints verb to get the available member constraints and their possible values for a pool target type.

  • properties - Comma separated key value pairs for additional properties that need to be specified based on the Software Pool target type.

Example:

emcli  create_pool
    -name= MySchemaPool
    -target_type= schaas_pool
    -paas_zone=MyPaaSZone
    -members= simple.us.oracle.com
    -description="Test Schema Pool"
    -member_constraints= 
      " TARGET_TYPE=oracle_database, 
       VERSION=11.2.0.2.0, 
       PLATFORM=226"
    -placement_constraints= 
       "MAX_SERVICES=7,
        USE_WORKLOAD=true,  
        MAX_CPU_USAGE=90, 
        MAX_MEMORY_USAGE=90, 
        ENFORCE_CPU=true"
    -properties= 
"host_credential_guid=DBA449B8967AAF77E040F00A73B11F55,
database_credential_guid =DBA449B8967AAF77E040F00A73B11F55"

Sample Output:

Software Pool "MySchemaPool" created successfully.

emcli create_pool -name=<Name of Software Pool>

-target_type=<Target type of Software Pool>

-paas_zone=<Paas Infrastructure Zone of Software Pool>

-members=<Member1, Member2...>

[-description=<Description of Software Pool>]

[-placement_constraints=<constraint1=value1, constraint2=value2...>]

[-member_constraints=<constraint1=value1, constraint2=value2>]

[-properties=<property1=value1, property2=value2>]

update_pool

Updates a a Schema Pool.

  • name - Name of the existing Software Pool.

  • target_type - Target type of the existing Software Pool. For example: "mwaas_zone" for Middleware Pool, "oracle_cloud_zone" for Database Pool, and "schaas_pool" for Schema Pool.

  • description - Description of the Software Pool.

  • add_members - Comma separated list of targets to be added as members of the Software Pool. The targets to be added must satisfy the member constraints of the Software Pool.

  • remove_members - Member targets to be removed from the Software Pool.

  • placement_constraints - Comma separated key value pairs of the placement constraints that allow the self service administrator to set maximum ceilings for resource utilization. This provides protection for the members of the Software Pool in terms of resource consumption.

  • properties - Comma separated key value pairs for properties that need to be updated based on the Software Pool target type

Example:

emcli update_pool
    -name= MySchemaPool
    -target_type= schaas_pool
    -add_members=
          simple.us.oracle.com
    -remove_members= 
          Simple1.us.oracle.com
    -description="Test Database Pool"
    -placement_constraints= 
       "MAX_SERVICES=17,
        USE_WORKLOAD=false,  
        MAX_CPU_USAGE=90,  
        MAX_MEMORY_USAGE=90, 
        ENFORCE_CPU=false"    

Sample Output:

Software Pool "MySchemaPool" updated successfully.y. 

emcli update_pool -name=<Name of Software Pool>

-target_type=<Target type of Software Pool>

[-description=<Description of Software Pool>]

[-add_members=<Member1, Member2...>]

[-remove_members=<Member4, Member5...>]

[-placement_constraints=<constraint1=value1,constraint2=value2...>]

[-properties=<property1=value1, property2=value2>]

delete_pool

Deletes a Schema Pool. Software Pool cannot be deleted if there is an existing Service Template associated with it.

  • name - Name of an existing Software Pool.

  • target - Target type of the Software Pool.

Example:

emcli delete_pool
    -name=MySchemaPool
    -target_type= schaas_pool

Sample Output:

Software Pool "MySchemaPool" deleted successfully.

emcli delete_pool -name=<Name of Software Pool>

-target_type=<Target type of Software Pool>

get_pool_detail

Retrieves the Schema Pool details, such as name, target type, description, PaaS Infrastructure Zone, number of members, placement constraints, and member constraints.

  • name - Name of the Software Pool.

  • target - Target type of the Software Pool

Example:

emcli get_pool_detail
    -name=MySchemaPool
    -target_type= schaas_pool

Sample Output:

Name                MySchemaPool
Target Type         schaas_pool                                                       Description         Test Schema Pool                                                 Paas Infrastructure Zone SLC01MDR_ZONE                                                    Number of Members   1                                                                Placement Constraints           MAX_CPU_USAGE : 90 , ENFORCE_CPU : false , MAX_MEMORY_USAGE : 90 , MAX_SERVICES : 17 , USE_WORKLOAD : false                       
Member Constraints              VERSION : 11.2.0.2.0 , PLATFORM : Linux x86-64 , TARGET_TYPE : Database Instance

emcli get_pool_detail -name=<Name of Software Pool>

-target_type=mwaas_zone

create_pool

Creates a Pluggable Database Pool.

  • name - Name of the Database Pool to be created

  • target_type - Target type of the Software Pool to be created

  • paas_zone - Name of PaaS Infrastructure Zone in which the Software Pool is to be created.

  • members - Comma separated list of targets to be added as members of the Software Pool.

  • description - Description of the Software Pool.

  • placement_constraints - Comma separated key value pairs of the placement constraints that allow the self service administrator to set maximum ceilings for resource utilization. This provides protection for the members of the Software Pool in terms of resource consumption. Refer to the get_pool_allowed_placement_constraints verb to get the available placement constraints for a pool target type.

  • member_constraints - Comma separated key value pairs that restricts the addition of member targets to a Software Pool with a set criteria. Refer to the get_pool_allowed_member_constraints verb to get the available member constraints and their possible values for a pool target type.

  • properties - Comma separated key value pairs for additional properties that need to be specified based on the Software Pool target type.

Example:

emcli  create_pool
    -name= MyPdbPool
    -target_type= pdbaas_pool
    -paas_zone=MyPaaSZone
    -members= database
    -description="Test PDB Pool"
    -member_constraints= 
      TARGET_TYPE_CDB=oracle_database, 
      VERSION_CDB=12.1.0.1.0, 
      PLATFORM_CDB=226"
    -placement_constraints= 
        "MAX_PDB_SERVICES=7, 
        PDBS_USE_WORKLOAD=true, 
        MAX_CPU_USAGE_BY_PDBS=90,  
        MAX_MEMORY_USAGE_BY_PDBS=90, 
        PDBS_ENFORCE_CPU=true"
    -properties= 
"host_credential_guid=DBA449B8967AAF77E040F00A73B11F55, gi_credential_guid=DBA449B8967AAF77E040F00A73B11F55,
cdb_credential_guid =DBA449B8967AAF77E040F00A73B11F55"

emcli create_pool -name=<Name of Software Pool>-target_type=<Target type of Software Pool>-paas_zone=<Paas Infrastructure Zone of Software Pool>-members=<Member1, Member2...>[-description=<Description of Software Pool>][-placement_constraints=<constraint1=value1, constraint2=value2...>][-member_constraints=<constraint1=value1, constraint2=value2>][-properties=<property1=value1, property2=value2>]

 

Sample Output:

Software Pool "MySchemaPool" created successfully.

 

update_pool

Updates a Pluggable Database Pool.

  • name - Name of the existing Software Pool.

  • target_type - Target type of the existing Software Pool. For example: "mwaas_zone" for Middleware Pool, "oracle_cloud_zone" for Database Pool, and "schaas_pool" for Schema Pool.

  • description - Description of the Software Pool.

  • add_members - Comma separated list of targets to be added as members of the Software Pool. The targets to be added must satisfy the member constraints of the Software Pool.

  • remove_members - Member targets to be removed from the Software Pool.

  • placement_constraints - Comma separated key value pairs of the placement constraints that allow the self service administrator to set maximum ceilings for resource utilization. This provides protection for the members of the Software Pool in terms of resource consumption.

  • properties - Comma separated key value pairs for properties that need to be updated based on the Software Pool target type

Example:

emcli update_pool
    -name= MyPdbPool
    -target_type= pdbaas_pool
    -paas_zone=MyPaaSZone
    -add_members=database
    -remove_members=database    
    -description="Test PDB Pool"
    -placement_constraints= 
        "MAX_PDB_SERVICES=7, 
        PDBS_USE_WORKLOAD=true, 
        MAX_CPU_USAGE_BY_PDBS=90,  
        MAX_MEMORY_USAGE_BY_PDBS=90, 
        PDBS_ENFORCE_CPU=true"
    -properties= 
"host_credential_guid=DBA449B8967AAF77E040F00A73B11F55, gi_credential_guid=DBA449B8967AAF77E040F00A73B11F55,
cdb_credential_guid =DBA449B8967AAF77E040F00A73B11F55"

Sample Output:

Software Pool "MyPdbPool" updated successfully. 

emcli update_pool -name=<Name of Software Pool>

-target_type=<Target type of Software Pool>

[-description=<Description of Software Pool>]

[-add_members=<Member1, Member2...>]

[-remove_members=<Member4, Member5...>]

[-placement_constraints=<constraint1=value1,constraint2=value2...>]

[-properties=<property1=value1, property2=value2>]

delete_pool

Deletes a Pluggable Database Pool. Software Pool cannot be deleted if there is an existing Service Template associated with it.

  • name - Name of an existing Software Pool.

  • target - Target type of the Software Pool.

Example:

emcli delete_pool
    -name= MyPdbPool
    -target_type= pdbaas_pool

Sample Output:

Software Pool "MyPdbPool" deleted successfully.

emcli delete_pool -name=<Name of Software Pool>

-target_type=<Target type of Software Pool>

get_pool_detail

Retrieves the Pluggable Database Pool details, such as name, target type, description, PaaS Infrastructure Zone, number of members, placement constraints, and member constraints.

  • name - Name of the Software Pool.

  • target - Target type of the Software Pool

Example:

emcli get_pool_detail
    -name= MyPdbPool
    -target_type= pdbaas_pool 

Sample Output:

Name                 MyPdbPool                                                        Target Type          pdbaas_pool                                                      Description          Test PDB Pool                                                    Paas Infrastructure Zone  PDB_ZONE                                                         Number of Members     1                                                                Placement Constraints           
   MAX_MEMORY_USAGE_BY_PDBS : 90 ,     
   MAX_CPU_USAGE_BY_PDBS : 90 , 
    MAX_PDB_SERVICES : 7 ,  
    PDBS_ENFORCE_CPU : false , 
    PDBS_USE_WORKLOAD :false                                                           
Member Constraints              
  PLATFORM_CDB : Linux x86-64 ,  
  TARGET_TYPE_CDB : Database Instance,
  VERSION_CDB : 12.1.0.1.0

emcli get_pool_detail -name=<Name of Software Pool>

-target_type=mwaas_zone


32.4.3 Database Quota EM CLI Verbs

The following table provides details of the supported verbs for Database Quota.

Verb Description Format
create_database_quota Creates database quota for a EM_SSA_USER role.
  • role_name: Name of SSA User Role for which Quota is to be created

  • databases: Number of database service requests allowed.

  • schema_services: Number of schema service requests allowed.

  • pluggable_databases: Number of pluggable database requests allowed.

  • memory: Amount of memory usage allowed.

  • storage: Amount of storage usage allowed.

Example

emcli create_dbaas_quota
           -role_name="My Role"
           -databases="10"
           -schema_services="10"
           -pluggable_databases="10"
           -memory="99"
           -storage="99"

Sample Output
Quota for "MyRole" setup successfully.
emcli create_dbaas_quota

-role_name="<Name of SSA User Role>"

-databases="<Number of Database Requests>"

-schema_services="<Number of Schema Service Requests>"

-pluggable_databases="<Number of Pluggable Database Service Requests>"

-memory="<Memory(GB)>"

-storage="<Storage(GB)>"

update_dbaas_quota Updates the database quota for the SSA user role.
  • role_name - Name of the SSA User Role for which quota is to be updated.

  • databases - Number of database service requests allowed.

  • schema_services - Number of schema service requests allowed.

  • pluggable_databases - Number of PDB service requests allowed.

  • memory - Amount of memory usage Allowed.

  • storage - Amount of storage usage allowed.

Example

emcli update_dbaas_quota
        -role_name="My Role"
        -databases="10"
        -schema_services="10"
        -pluggable_databases="10"
        -memory="99"
        -storage="99"   

Sample Output   
Quota for "My Role" updated successfully. 
emcli update_dbaas_quota

-role_name="<Name of SSA User Role>"

-databases="<Number of Database Requests>"

-schema_services="<Number of Schema Service Requests>"

-pluggable_databases="<Number of Pluggable Database Service Requests>"

-memory="<Memory(GB)>"

-storage="<Storage(GB)>"

delete_dbaas_quota Deletes the database quota for a SSA User Role.
  • role_name - Name of the SSA User Role for which quota is to be deleted.

Example

emcli delete_dbaas_quota           -role_name="My Role"

Sample Output
Quota for "My Role" deleted successfully.
emcli delete_dbaas_quota

-role_name="<Name of SSA User Role">

get_dbaas_quota Lists the database quota setup for SSA User Roles.

Example

emcli get_dbaas_quota  
     
Sample Output:
ROLE_NAME: SSA_USER_ROLE1 NUMBER_OF_SCHEMA_SERVICES: 99
MEMORY: 99
STORAGE: 99
NUMBER_OF_PLUGGABLE_DATABASES: 99NUMBER_OF_DB_INSTANCES : 99

Quotas for Roles retrieved successfully
emcli get_dbaas_quota

32.4.4 Database Request Settings EM CLI Verbs

The following table provides details of the supported verbs for Database Request Settings.

Table 32-30 Database Request Settings EM CLI Verbs

Verb Description Format

update_dbaas_request_settings

Updates the Database Request Settings

'"future_reservation_length - Amount of time in advance a Self Service user can Schedule a request.

"maximum_archive_duration - Amount of time after which the ''Completed'', Self Service Create Requests will be purged from the Repository.

"default_retirement_period - The maximum amount of time for which Self Service user can retain a service instance.

Example:

emcli update_dbaas_request_settings
  -future_reservation_length="2 Months"
  -maximum_archive_duration="10 Weeks"
  -default_retirement_period="No Reservation"

Sample Output:

Request settings updated successfully

emcli update_dbaas_request_settings

-future_reservation_length="<Future Request Scheduling Period>"

-maximum_archive_duration="<Request Purging Duration>"

-default_retirement_period="<Default Retention Duration>"

get_dbaas_request_settings

Retrieves the PaaS Infrastructure Zone details.

Example:

emcli get_dbaas_request_settings

Sample Output:

Future Reservation Length  : 2 Months
 Maximum Archive Duration : 10 Weeks
 Default Retirement Period : 1 Years
Request Settings retrieved successfully.

emcli get_dbaas_request_settings

cleanup_dbaas_requests

Cleans up a failed request from the host and Enterprise Manager. The options "ids" and "pool_name" cannot be used together.

  • ids: The Request Id used to filter cloud requests separated by semicolon (;).

  • pool_name: The name of the pool from which requests have to be cleaned up.

  • pool_type: The possible values are:

    For database pools: database

    For schema pools: schema

    For PDBs: pluggable database

  • user: The user name to be used to filter requests that are to be deleted.

  • all: Cleans up all requests, both successful and failed. It also cancels requests that are in scheduled but does not clean up requests that are "in progress" state. If this option not specified, only failed requests are cleaned up by default.

Example:

emcli cleanup_dbaas_requests -ids="10"

Cleans up of the specified request.

emcli cleanup_dbaas_requests -ids="10;11;12

Cleans up specified requests i.e. with ids, 10, 11 and 12.

emcli cleanup_dbaas_requests -pool_name="database_pool" -pool_type="database"

Cleans up all failed database requests.

emcli cleanup_dbaas_requests -pool_name="database_pool" -pool_type="database" -all

Cleans up all requests - both failed and successful. This process essentially resets the pool.

emcli cleanup_dbaas_requests -pool_name="database_pool" -pool_type="database" -all -user="SSA_USER"

Cleans up all requests for a specific user - both failed and successful. This option is useful in cases where the user is no longer in the system and the administrator wants to cleanup all the service instances owned by this user.

emcli help cleanup_dbaas_requests

-ids="<request id>"

-pool_name="<pool name>"

-pool_type="<database|schema|pluggable_database>"

-user="<SSA User name>"

-all


See REST API equivalent for the verbs explained above at Database Request Settings APIs.

32.4.5 Service Template EM CLI Verbs

The table below lists the supported verbs for Service Template resource.

The metadata file content samples are provided after the table.

Table 32-31 Service Template EM CLI Verbs

Verb Description Format

create_service_template

Creates a Database Service Template

The input_file shall be a json based metadata file which shall have the necessary configuration for the specific service template creation.

A Sample JSON service executable metadata file for DBCA based database service template is attached at the end.

Example:

emcli create_service_template
  -name="Database service template"
  -service_family="DBAAS"
  -service_type="DB"
  -pool_target_type=  
           "oracle_cloud_zone"
   -software_pools="MyPoolOH"
   -roles="SSA_USER_ROLE"
   -description="Database small instance service template."
        -input_file="data:executable.json"

Sample Output:

Service Template "My Service Template" created successfully

emcli create_service_template

-name="<Name of Service Template>"

-service_family="<Service family for which the Service Template is being created>"

-service_type="<Service type for which the Service Template is being created>"]

-pool_target_type="Target type of Software Pools to be associated with the Service Template"

-software_pools="<SwPool1,SwPool2,SwPool3,...>"

[-roles="<SsaRole1,SsaRole2,..>"]

[-description="<Description of Service Template>"]

[-input_file="data:<Name of Service executable MetaData File>"]

create_service_template

Creates a Pluggable Database Service Template

The input_file shall be a json based metadata file which shall have the necessary configuration for the specific service template creation.

A Sample JSON service executable metadata file for PDB service template is attached at the end.

Example:

emcli create_service_template
  -name="PDB service template"
  -service_family="DBAAS"
  -service_type="PDB"
  -pool_target_type=  
           "pdbaas_pool"
   -software_pools="MyPDBPool"
   -roles="SSA_USER_ROLE"
   -description="PDB small instance service template."
        -input_file="data:executable.json"

Sample Output:

Service Template "My PDB Service Template" created successfully. 

emcli create_service_template

-name="<Name of Service Template>"

-service_family="<Service family for which the Service Template is being created>"

-service_type="<Service type for which the Service Template is being created>"]

-pool_target_type="Target type of Software Pools to be associated with the Service Template"

-software_pools="<SwPool1,SwPool2,SwPool3,...>"

[-roles="<SsaRole1,SsaRole2,..>"]

[-description="<Description of Service Template>"]

[-input_file="data:<Name of Service executable MetaData File>"]

create_service_template

Creates a Schema Service Template

The input_file shall be a json based metadata file which shall have the necessary configuration for the specific service template creation.

A Sample JSON service executable metadata file for schme service template

Example:

emcli create_service_template
  -name="Schema service template"
  -service_family="DBAAS"
  -service_type="SCHEMA"
  -pool_target_type=  
           "schaas_pool"
   -software_pools="MySCHPool"
   -roles="SSA_USER_ROLE"
   -description="Schema small instance service template."
        -input_file="data:executable.json

Sample Output:

Service Template "My Schema Service Template" created successfully

emcli create_service_template

-name="<Name of Service Template>"

-service_family="<Service family for which the Service Template is being created>"

-service_type="<Service type for which the Service Template is being created>"]

-pool_target_type="Target type of Software Pools to be associated with the Service Template"

-software_pools="<SwPool1,SwPool2,SwPool3,...>"

[-roles="<SsaRole1,SsaRole2,..>"]

[-description="<Description of Service Template>"]

[-input_file="data:<Name of Service executable MetaData File>"]

get_service_templates

Retrieves the list of available service templates based on the service family passed.

Example:

emcli get_service_templates 
     -service_family="DBAAS"

Sample Output:

Name Service Family                      Description                                       
ServiceTemplate1                         DBAAS ServiceTemplate1Description                                                           

emcli get_service_templates[-service_family="<Service family filter used for filtering the service templates>"]emcli create_service_template

-

delete_service_template

Deletes the Service Template

Example:

emcli delete_service_template
     -name="Database service template"
     -service_family="DBAAS"

Sample Output:

Service Template with name " Database service template " and service family " DBAAS " deleted successfully.

emcli delete_service_template

-name="<Name of Service Template>"]

-service_family="<Service family to which the Service Template belongs>"]


Samples of Service Template executable metadata files are listed below:

32.4.5.1 DBCA Based Service Template Metadata File

{
        "type":"CDP",
        "configurations":[
         { "name":"PROFILE_COMPONENT_URN", "value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbCreateTemplate:E87A7B5AA40CC345E040F20A605121D6:0.1" },
         { "name":"DATABASE_TYPE","value":"oracle_database" },
         { "name":"COMMON_DB_SYSTEM_PASSWORD", "value":"welcome" },
         { "name":"COMMON_DB_DBSNMP_PASSWORD", "value":"welcome" },
         { "name":"COMMON_DB_SYS_PASSWORD","value":"welcome" },
         { "name":"COMMON_DB_SID","value":"mydb1" },
         { "name":"COMMON_DOMAIN_NAME","value":"us.oracle.com" },
         { "name":"LISTENER_PORT", "value":"1521"},
         { "name":"STAGE_LOCATION", "value":"/scratch" },
         { "name":"REF_ZONE", "value":"SLC01MDR_ZONE" },
         { "name":"REF_POOL",   "value":"DB_POOL" },
         { "name":"REF_HOST", "value":"slc01mdr.us.oracle.com" },
         { "name":"REF_TGT","value":"slc01mdr.us.oracle.com" },
         { "name":"DBCA_TEMPLATE:DB_STORAGE_TYPE",  "value":"FS" },
         { "name":"DBCA_TEMPLATE:DATA_FILE_LOCATION","value":"{ORACLE_BASE}/mydir/oradata" },
         { "name":"DBCA_TEMPLATE:REC_STORAGE_TYPE_SAME_AS_DB_FILES", "value":"Y" },
         { "name":"DBCA_TEMPLATE:ARCHIVE_LOG_MODE", "value":"N" },
         { "name":"DBCA_TEMPLATE:FLASH_RECOVERY_AREA_SIZE", "value":"2048" },
         { "name":"DBCA_TEMPLATE:RECOVERY_FILE_LOCATION","value":"{ORACLE_BASE}/mydir/fra" },
         { "name":"DBCA_TEMPLATE:REDO_FILE_LOCATION", "value":"{ORACLE_BASE}/mydir/fra"  },
         {
                "name":"INIT_PARAMS",
                "subconfigurations":[
                   { "name":"INIT_PARAMS:1", "value":"sga_target=1073741824" },
           { "name":"INIT_PARAMS:2", "value":"pga_aggregate_target=1073741824"  }
                ]
         }
          ],
          "payloads":[
         {
        "id":"4",
                                "name":"oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:E482D893171AC51BE040F00A87254669:0.1"
         },
         {
        "id":"3",
        "name":"oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:E482D893171AC51BE040F00A87254669:0.1"
         }
          ]      
    }

32.4.5.2 Standby DBCA Based Service Template Metadata File

{
                "name":"TestDbTemplate1",
                "serviceType":"DB",
                "serviceFamily":"DBAAS",
                "description":"This is a test database dbca service template 1",
                "poolIds":[ "D125A1536E9ADC36CC24EAB058B9E7AC" ],
            "serviceExecutableMeta":{
                        "type":"CDP",
                        "configurations":[
                         { "name":"PROFILE_COMPONENT_URN", "value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:F1EA40D2AE964994E0436051F20AFE32:0.1" },
                         { "name":"DATABASE_TYPE","value":"rac_database" },
                         { "name":"COMMON_DB_SYSTEM_PASSWORD", "value":"welcome" },
                         { "name":"COMMON_DB_DBSNMP_PASSWORD", "value":"welcome" },
                         { "name":"COMMON_DB_SYS_PASSWORD","value":"welcome" },
                         { "name":"DB_ADMIN_PASSWORD_SAME", "value":"true" },
                         { "name":"INSTANCE_COUNT","value":"2" },
                         { "name":"SID_OPTION", "value":"ssauser  "},
                         { "name":"COMMON_DB_SID","value":"mydb1" },
                         { "name":"COMMON_DOMAIN_NAME",  "value":"us.oracle.com" },
                         { "name":"LISTENER_PORT", "value":"1521"},
                         { "name":"STAGE_LOCATION", "value":"/scratch" },
                         { "name":"REF_ZONE", "value":"SLC00ECPQ_ZONE" },
                         { "name":"REF_POOL",   "value":"PRIMARY_RAC_POOL" },
                         { "name":"REF_HOST", "value":"slc00ecp.us.oracle.com" },
                         { "name":"REF_TGT","value":"slc00ecp.us.oracle.com" },
                         { "name":"DBCA_TEMPLATE:DB_STORAGE_TYPE",  "value":"ASM" },
                         { "name":"DBCA_TEMPLATE:DATA_FILE_LOCATION","value":"DATA" },
                         { "name":"DBCA_TEMPLATE:REC_STORAGE_TYPE_SAME_AS_DB_FILES", "value":"Y" },
                         { "name":"DBCA_TEMPLATE:ARCHIVE_LOG_MODE", "value":"Y" },
                         { "name":"DBCA_TEMPLATE:FLASH_RECOVERY_AREA_SIZE", "value":"2048" },
                         { "name":"DBCA_TEMPLATE:RECOVERY_FILE_LOCATION","value":"RECO" },
                         { "name":"DBCA_TEMPLATE:REDO_FILE_LOCATION", "value":"RECO"  },
                         {
                                "name":"INIT_PARAMS",
                                "subconfigurations":[
                                   { "name":"INIT_PARAMS:1", "value":"sga_target=1073741824" },
                                   { "name":"INIT_PARAMS:2", "value":"pga_aggregate_target=1073741824"  }
                                ]
                         },
                        { "name":"STANDBY_REQUIRED","value":"true" },
{ "name":"STANDBY_REQUIRED_LOCK","value":"false" },
{ "name":"STANDBY_WORK_DIR","value":"/tmp" },
{ "name":"PRIMARY_PROTECTION_MODE","value":"MAXIMIZE AVAILABILITY" },
{ "name":"DBAAS_SSA_STANDBY_CUSTOM_PRE_SCRIPTS_URN","value":"" },
{ "name":"DBAAS_SSA_STANDBY_CUSTOM_POST_SCRIPTS_URN","value":"" },
{ "name":"STANDBY_DB_DETAILS","value":"","values":[
"pool=RAC_11204_Tier_2;databaseSIDPrefix=;databaseType=rac_database;standbyConfigName=Near DR;redoMode=SYNC;realtimeQuery=true;databaseRACInstanceCount=2;databaseDelay=30;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.oracle.com",
"pool=SI_11204;databaseSIDPrefix=;databaseType=oracle_database;standbyConfigName=Far DR;redoMode=ASYNC;realtimeQuery=false;databaseRACInstanceCount=2;databaseDelay=60;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.oracle.com"]}
                 
                  ]                
    }
}

32.4.5.3 RMAN Based Service Template Metadata File

{
"type":"CDP",
        "configurations":[
         { "name":"PROFILE_COMPONENT_URN", "value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB
_DbProfile:E9F67B964802DD32E040F20A60514EB5:0.1" },
         { "name":"DATABASE_TYPE","value":"oracle_database" },
         { "name":"COMMON_DB_SYSTEM_PASSWORD", "value":"welcome" },
         { "name":"COMMON_DB_DBSNMP_PASSWORD", "value":"welcome" },
         { "name":"COMMON_DB_SYS_PASSWORD","value":"welcome" },
         { "name":"COMMON_DB_SID","value":"norm" },
         { "name":"COMMON_DOMAIN_NAME","value":"us.oracle.com" },
         { "name":"LISTENER_PORT", "value":"1521"},
         { "name":"STAGE_LOCATION", "value":"/tmp/rman_backup/backup1383140909156"},         
         { "name":"REF_ZONE", "value":"SLC01HZK_ZONE" },
         { "name":"REF_POOL",   "value":"PRIMARY_DB2" },
         { "name":"REF_HOST", "value":"slc01hzk.us.oracle.com" },
         { "name":"REF_TGT","value":"slc01hzk.us.oracle.com" },
         { "name":"RMAN:DB_STORAGE_TYPE",  "value":"FS" },
         { "name":"RMAN:FRA_STORAGE_TYPE",  "value":"FS" },  
         { "name":"RMAN:DATA_FILE_LOCATION","value":"/scratch/app/oracle/oradata" },
         { "name":"RMAN:RECOVERY_FILE_LOCATION","value":"/scratch/app/oracle/fra" },
         { "name":"RMAN:REDO_FILE_LOCATION", "value":"/scratch/app/oracle/fra"  },
         { "name":"RMAN:FRA_SIZE", "value":"5000" },        
         { "name":"RMAN:REC_STORAGE_TYPE_SAME_AS_DB_FILES", "value":"Y" },
         { "name":"RMAN:USE_ARCHIVING", "value":"Y" },      
         {
                "name":"INIT_PARAMS",
                "subconfigurations":[
                   { "name":"INIT_PARAMS:1", "value":"sga_target=314572800" },
           { "name":"INIT_PARAMS:2", "value":"pga_aggregate_target=209715200"  },
{ "name":"INIT_PARAMS:3", "value":"*.control_files='/scratch/app/oracle/oradata/simple/control01.ctl','/scratch/app/oracle/fast_recovery_area/simple/control02.ctl'"  },
{ "name":"INIT_PARAMS:4", "value":"*.db_name='simple'"  }
                ]
         }
          ]              
    }

32.4.5.4 Clone DB Based Service Template Metadata File

{
"type":"CDP",
        "configurations":[
         { "name":"PROFILE_COMPONENT_URN", "value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:E9F67B964802DD32E040F20A60514EB5:0.1" },
         { "name":"DATABASE_TYPE","value":"oracle_database" },
         { "name":"COMMON_DB_SYSTEM_PASSWORD", "value":"welcome" },
         { "name":"COMMON_DB_DBSNMP_PASSWORD", "value":"welcome" },
         { "name":"COMMON_DB_SYS_PASSWORD","value":"welcome" },
         { "name":"COMMON_DB_SID","value":"norm" },
         { "name":"COMMON_DOMAIN_NAME","value":"us.oracle.com" },
         { "name":"LISTENER_PORT", "value":"1521"},
         { "name":"STAGE_LOCATION", "value":"/tmp/rman_backup/backup1383140909156"},         
         { "name":"REF_ZONE", "value":"SLC01HZK_ZONE" },
        { "name":"SID_OPTION", "value":"ssauser   "},
         { "name":"COMMON_DB_SID","value":"mydb1" },
         { "name":"REF_POOL",   "value":"PRIMARY_DB2" },
         { "name":"REF_HOST", "value":"slc01hzk.us.oracle.com" },
         { "name":"REF_TGT","value":"slc01hzk.us.oracle.com" },
         { "name":"RMAN:DB_STORAGE_TYPE",  "value":"FS" },
         { "name":"RMAN:FRA_STORAGE_TYPE",  "value":"FS" },  
         { "name":"RMAN:DATA_FILE_LOCATION","value":"/scratch/app/oracle/oradata" },
         { "name":"RMAN:RECOVERY_FILE_LOCATION","value":"/scratch/app/oracle/fra" },
         { "name":"RMAN:REDO_FILE_LOCATION", "value":"/scratch/app/oracle/fra"  },
         { "name":"RMAN:FRA_SIZE", "value":"5000" },        
         { "name":"RMAN:REC_STORAGE_TYPE_SAME_AS_DB_FILES", "value":"Y" },
         { "name":"RMAN:ARCHIVE_LOG_MODE",  "value":"Y" },   
         { "name":"RMAN:FLASH_RECOVERY_AREA_SIZE",  "value":"5000" },         
         { "name":"CLONE_OR_FULL_DB", "value":"CLONE_DB" },
         { "name":"USER_INITIATED_BACKUP_LOCATION", "value":"/tmp" },
         { "name":"ALLOW_BACKUPS", "value":"true" },
         { "name":"MAX_BACKUPS_ALLOWED", "value":"7" },
         { "name":"STAGE_LOCATION", "value":"/tmp" },
         { "name":"RMAN:USE_ARCHIVING", "value":"Y" },      
         {
                "name":"INIT_PARAMS",
                "subconfigurations":[
                   { "name":"INIT_PARAMS:1", "value":"sga_target=314572800" },
           { "name":"INIT_PARAMS:2", "value":"pga_aggregate_target=209715200"  },
{ "name":"INIT_PARAMS:3", "value":"*.control_files='/scratch/app/oracle/oradata/simple/control01.ctl','/scratch/app/oracle/fast_recovery_area/simple/control02.ctl'"  },
{ "name":"INIT_PARAMS:4", "value":"*.db_name='simple'"  }
                ]
         }
          ]              
    }

32.4.5.5 Snapclone Based Service Template Metadata File

{
        "type":"CDP",   
        "configurations" : [ { "name" : "INIT_PARAMS",
            "subconfigurations" : [ { "name" : "INIT_PARAMS:1",
                  "value" : "sga_target=1073741824"
                },
                { "name" : "INIT_PARAMS:2",
                  "value" : "pga_aggregate_target=1073741824"
                }
              ]
          },
          { "name" : "PROFILE_COMPONENT_URN",
            "value" : "oracle:defaultService:em:provisioning:1:cmp:COMP
_Component:SUB_DbProfile:EDD58FC05F3753EAE04313B2F00AA070:0.1"
          },
                  {
                "name":"REF_ZONE",
                "value":"Zone1"
            },
            {
                "name":"REF_POOL",
                "value":"pool1"
            },
            {
                "name":"REF_HOST",
                "value":"slc03qzp.us.oracle.com"
            },
            {
                "name":"REF_TGT",
                "value":"slc03qzp.us.oracle.com"
            },
          { "name" : "DATABASE_TYPE",
            "value" : "oracle_database"
          },
          { "name" : "INSTANCE_COUNT",
            "value" : "2"
          },
          { "name" : "COMMON_DB_SYSTEM_PASSWORD",
            "value" : "welcome1"
          },
          { "name" : "COMMON_DB_DBSNMP_PASSWORD",
            "value" : "welcome1"
          },
          { "name" : "COMMON_DB_SYS_PASSWORD",
            "value" : "welcome1"
          },
          { "name" : "DB_ADMIN_PASSWORD_SAME",
            "value" : "true"
          },
          { "name" : "COMMON_DB_SID",
            "value" : "snapdb"
          },
          { "name" : "COMMON_DOMAIN_NAME",
            "value" : "us.oracle.com"
          },
          { "name" : "Database SID",
            "value" : "testdb1"
          },
          { "name" : "LISTENER_PORT",
            "value" : "1521"
          },
          { "name" : "ALLOW_BACKUPS",
            "value" : "true"
          },
          { "name" : "MAX_BACKUPS_ALLOWED",
            "value" : "7"
          },
          { "name" : "THIN_PROVISIONING:MOUNT_ADDL_SIZE_LIST",
            "subconfigurations" : [ { "name" : "MOUNT_ADDL_SIZE_LIST:1",
                  "value" : "10"
                },
                { "name" : "MOUNT_ADDL_SIZE_LIST:2",
                  "value" : "10"
                }
              ]
          },
          { "name" : "THIN_PROVISIONING:MOUNT_POINT_LIST",
            "subconfigurations" : [ { "name" : "MOUNT_POINT_LIST:1",
                  "value" : "/mnt1"
                },
                { "name" : "MOUNT_POINT_LIST:2",
                  "value" : "/mnt2"
                }
              ]
          }
        ],
      "type" : "CDP"
    },
  "serviceFamily" : "DBAAS",
  "serviceType" : "DB"
}

32.4.5.6 Empty PDB Based Service Template Metadata File

{
        "type":"CDP",
        "configurations":[
         {
                "name":"TABLESPACE_ENCRYPTION_ALGORITHM",
                "subconfigurations":[
                   {  "name":"name", "value":"NONE" }
                ]
         },
         {  "name":"MAX_TABLESPACE_ALLOWED", "value":"2" },
         {  "name":"PDB_SID_PREFIX", "value":"mypdb" },
         {  "name":"ENFORCE_STORAGE_CONSTRAINT", "value":"NO_LIMIT" },
         {  "name":"AUTO_EXTEND_BLOCK_SIZE","value":"1024" },
         {  "name":"REF_DATA_ZONE", "value":"PDB_Zone" },             
         {  "name":"REF_DATA_TARGET", "value":"database" },          
         {  "name":"REF_DATA_TARGET_TYPE", "value":"oracle_database" },       
         {  "name":"REF_DATA_POOL","value":"PDB_POOL" },
         {  "name":"REF_DATA_HOST", "value":"abc.mycompany.com" },
         {  "name":"CREATE_PDB_OPTION", "value":"EMPTY_PDB" },
         {  "name":"ROLE_OPTION","value":"CUSTOM_NEW_ROLE" },
         {  "name":"PRIVILEGES",
            "value":"",            
            "values":["CREATE TYPE","CREATE VIEW","CREATE DIMENSION","CREATE SESSION","CREATE TRIGGER","CREATE OPERATOR","CREATE SYNONYM","CREATE TABLE","CREATE PROCEDURE","CREATE INDEXTYPE","CREATE SEQUENCE"]
         },
         {
                "name":"INIT_PARAMS",
                "subconfigurations":[
                   { "name":"INIT_PARAMS:1", "value":"*.cursor_sharing=EXACT" },
                   { "name":"INIT_PARAMS:2", "value":"*.open_cursors=200"  }
                  ]
         },
         {
                "name":"WORKLOADS",
                "subconfigurations":[
                   {
                          "name":"WORK_LOADS:1",
                          "subconfigurations":[
                         { "name":"name", "value":"SmallPdb" },
                         { "name":"description", "value":"small workload" },
                         {  "name":"default", "value":"N" },
                         {  "name":"CPU", "value":"2" },
                         {  "name":"Memory", "value":"2048" },
                         {  "name":"Storage", "value":"1024" },
                         {  "name":"Sessions", "value":"100" }
                  ]
           }
        ]
      }
    ]
}

32.4.5.7 Schema Based Service Template Metadata File

{
        "type":"CDP",
        "configurations":[
                { "name":"ROLE_NAME", "value":"SampleRole" },
                { "name":"MAX_NUMBER_OF_SCHEMAS","value":"2" },
                { "name":"ENFORCE_STORAGE_CONSTRAINT","value":"NO_LIMIT" },
                { "name":"AUTO_EXTEND_BLOCK_SIZE","value":"1024" },
                { "name":"REF_ZONE","value":"ABC_ZONE" },
                { "name":"REF_POOL","value":"SCH_POOL" },
                { "name":"REF_HOST","value":"abc.mycompany.com" },
                { "name":"REF_DB","value":"simple.us.oracle.com" },
                { "name":"CREATE_SCHEMA_OPTION","value":"EMPTY_SCHEMAS" },
             { 
                   "name":"REMAP_TABLESPACE_LIST",
                   "value":"",
                   "values":["TBSP1","TBSP2","TBSP3"]
             },
               { 
                  "name":"REMAP_TABLESPACE_INIT_SIZE_LIST",
                  "value":"",
                  "values":["TBSP1:0.1","TBSP2:0.2","TBSP3:0.3"]
               },
               { 
                  "name":"REMAP_TABLESPACE_INCR_SIZE_LIST",
                  "value":"",
                  "values":["TBSP1:0.1","TBSP2:0.2","TBSP3:0.3"]
               },
               {   
                  "name":"REMAP_TABLESPACE_MAX_SIZE_LIST",
                  "value":"",
                   "values":["TBSP1:50.0","TBSP2:30","TBSP3:20"]
             },                  
                {
                "name":"WORKLOADS",
                "subconfigurations":[                    
                {
                        "name":"WORK_LOADS:1",
                        "subconfigurations":[
                        { "name":"name",  "value":"large "  },
                        { "name":"description", "value":"large workload" },
                        {   "name":"default",    "value":"Y" },
                        {   "name":"CPU",  "value":"6" },
                        {   "name":"Memory", "value":"4048"    },
                        {   "name":"Storage", "value":"2024"   }
                ]
                }
        ]
     }
  ]
}

32.4.6 Using EM CLI to Create Database Profiles

This section explains the different Database Provisioning Profiles used in Database as a Service and Schema as a Service. It also explains how these profiles can be created using the EMCLI verbs exposed in the 12.1.0.3 database plug-in. The following topics are covered:

32.4.6.1 About Database Provisioning Profile Types

The following are the four types of Database provisioning profiles used in Database as a Service and Schema as a Service:

DBCA Template

The DBCA template supports both structure plus data and structure only types. This database provisioning profile is created from the production or source database registered with Enterprise Manager.

Note:

Structure and data requires a shutdown of the database. It should be used for very small databases (< 50GB).

RMAN

This data content of this database provisioning profile comprises the RMAN Backup pieces. Any of the following methods can be used to create the RMAN profile:

  • Hot RMAN Backup

    This option is enabled only when the archive log mode on the source database is turned ON.

  • Cold RMAN Backup

    In this case, the source database is brought down to take the RMAN backup

  • Existing Backup

    This option can be used when the RMAN backup is already taken on the source and you want to use one of the existing RMAN backups to create a profile.

  • Existing Backup pieces when there is no access to the source database

    Create profile source database using existing backup pieces when there is no access to the source database. This option can be used when the RMAN backup is already taken on the source and kept in a known location. This option is only supported using EMCLI.

Snapclone

The data content of this database provisioning profile is derived from Snapshot information on the Filer (NetApp or SunZFS filer) of all the volumes where the datafiles for the source database are kept.

Schema

The data content of this database provisioning profile is compiled from an export dump created using the Data Pump tool. You can choose to export Schema objects (structure only) or the Schema with data (structure + data).

Note that you cannot export empty schemas or include Oracle schemas (these schemas are not available for selection). Schemas that are filtered out are listed below:

Table 32-32 Filtered Out Schema

ANONYMOUS

DMSYS

OASPUBLIC

OWBSYS

TSMSYS

APEX_030200

EXFSYS

ODM

OWBSYS_AUDIT

WEBSYS

APEX_PUBLIC_USER

FLOWS_

ODM_MTR

SCOTT

WK_PROXY

APPQOSSYS

FLOWS_03000

OLAPSYS

SI_INFORMTN_SCHEMA

WK_TEST

AURORA$JIS$UTILITY$

FLOWS_FILES

ORACLE_OCM

SPATIAL_CSW_ADMIN_USR

WKPROXY

AURORA$ORB$UNAUTHENTICATED

LBACSYS

ORDDATA

SPATIAL_WFS_ADMIN_USR

WKSYS

BI

MDDATA

ORDPLUGINS

SYS

WMSYS

CTXSYS

MDSYS

ORDSYS

SYSMAN

XDB

DBSNMP

MGMT_VIEW

OSE$HTTP$ADMIN

SYSTEM

XS$NULL

DIP

MTSSYS

OUTLN

TRACESRV

 

32.4.6.2 Creating Provisioning Profiles using EMCLI

This method allows the administrators or cloud provisioning operators to create the database provisioning profile using EMCLI verbs. The following is the syntax of the verb introduced in the 12.1.0.3 database plug-in:

emcli create_dbprofile -input_file=data:<Prop file name>

This command takes in a property file that completely describes the type of profile that will be created and the options used.

32.4.6.3 Sample EM CLI Property Files

The following sections provide sample EMCLI property files for the database provisioning profiles:

DBCA Template

Table 32-33 EMCLI Property Files for DBCA Template

Name Required Description Variable

Reference Database

true

The source database from which the profile will be created

REFERENCE_DATABASE=

Type of the reference database

true

The target type of the source database (oracle_database or rac_database)

REFERENCE_DATABASE_TYPE=

Reference Node

false

The reference node from which the profile will be created. Applicable only for RAC and Cluster targets

REF_NODE_SELECTED=

Backup mechanism for data

false

Variable to identify what mode needs to be used for creating backup data. Possible values are EXPORT, DBCA_TEMPLATE, RMAN, THIN_PROVISIONING

DATA_CONTENT_MODE=DBCA_TEMPLATE

The content that will be included in the backup

false

The data content that gets included in the backup can metadata or data. Possible values are METADATA_ONLY and METADATA_AND_DATA.

DATA_CONTENT=METADATA_AND_DATA

Reference Host Credentials

true

The credentials that will be used for OS authentication. Format is <Cred Name:Owner>. If this is not provided,preferred credentials will be checked against NormalHostCreds.

REF_HOST_CREDENTIALS=

Database Credentials

false

The credentials that will be used for performing database authentication. Format is <Cred Name:Owner>. If this is not provided, preferred credentials will be checked against SysDbaCreds

REF_DB_CREDENTIALS=

Convert to OFA format

false

Converts to the OFA format

CONVERT_TO_OFA=

Profile Name

true

Name of the profile

PROFILE_NAME=

Profile Description

false

Name with which the profile should be created.

PROFILE_DESC=

Profile location

true

Location of the profile in software library

PROFILE_LOCATION=

Profile Version

false

Version of the profile. If none is specified, the Database version shall be used.

PROFILE_VERSION=

Profile Vendor

false

Vendor of the profile. Default is Oracle.

PROFILE_VENDOR=

Profile notes

false

Notes for the profile.

PROFILE_NOTES=

Working Directory

false

Working directory is the location where the files are staged.

WORKING_DIRECTORY=

Is the profile initiated by end user

true

Is the profile initiated by end user as part of backup process or the database.

USER_INITIATED=false


New RMAN Backup from the Source Database

Table 32-34 EMCLI Property Files for a New RMAN Backup

Name Required Description Variable

Reference Database

true

The source database from which the profile will be created

REFERENCE_DATABASE=

Type of the reference database

true

The target type of the source database (oracle_database or rac_database)

REFERENCE_DATABASE_TYPE=

Reference Node

false

The reference node from which the profile will be created. Applicable only for RAC and Cluster targets

REF_NODE_SELECTED=

Backup mechanism for data

false

Variable to identify what mode needs to be used for creating backup data. Possible values are EXPORT, DBCA_TEMPLATE, RMAN, and THIN_PROVISIONING

DATA_CONTENT_MODE=RMAN

The content that will be included in the backup

false

The data content that gets included in the backup can metadata or data. Possible values are METADATA_ONLY and METADATA_AND_DATA.

DATA_CONTENT=METADATA_AND_DATA

Reference Host Credentials

true

The credentials that will be used for OS authentication. Format is <Cred Name:Owner>. If this is not provided,preferred credentials will be checked against NormalHostCreds.

REF_HOST_CREDENTIALS=

Database Credentials

false

The credentials that will be used for performing database authentication. Format is <Cred Name:Owner>. If this is not provided, preferred credentials will be checked against SysDbaCreds

REF_DB_CREDENTIALS=

Profile Name

true

Name of the profile

PROFILE_NAME=

Profile Description

false

Name with which the profile should be created.

PROFILE_DESC=

Profile location

true

Location of the profile in software library

PROFILE_LOCATION=

Profile Version

false

Version of the profile. If none is specified, the Database version shall be used.

PROFILE_VERSION=

Profile Vendor

false

Vendor of the profile. Default is Oracle.

PROFILE_VENDOR=

Profile notes

false

Notes for the profile.

PROFILE_NOTES=

Working Directory

false

Working directory is the location where the files are staged.

WORKING_DIRECTORY=

Is the profile initiated by end user

true

Is the profile initiated by end user as part of backup process or the database.

USER_INITIATED=false

Is Database target available

false

Is Database target available. Must be set to 'true' for this use case.

DB_TARGET_AVAILABLE=true

Backup Type

false

Backup type.

RMAN.BACKUP_TYPE=

Number of RMAN Channels to use(Default No of Channels : 2

false

Number of Channels to be used. Possible Values: like 1, 2 or 3.

RMAN.RMAN_CHANNELS=

Retain backup until

false

Retain backup until. Format: mm/dd/yyyy.

RMAN.RETAIN_UNTIL=

Encryption Type

false

Encryption Type. Possible Values: ON, OFF.

RMAN.ENCRYPTION_TYPE=

Encryption Password/Key

false

Encryption key which was used to encrypt the backup.

RMAN.ENCRYPTION_PASSWORD=

Compression Type

false

Compression type. Possible Values: HIGH, MEDIUM, LOW.

RMAN.COMPRESSION_TYPE=

RMAN Backup Location

true

Location of the RMAN Backups.

RMAN.RMAN_BACKUP_LOCATION=

Backup file format

false

Backup file format.

RMAN.BACKUP_FILE_FORMAT=

Backup file tag

false

Backup file tag.

RMAN.BACKUP_FILE_TAG=

Source: Control File Location

false

Location of the Control File.

RMAN.CONTROL_FILE_NAME=

Control File Tag

false

Control File Tag.

RMAN.CONTROL_FILE_TAG=

Source: Database SID

false

Database SID of the source database.

RMAN.ORACLE_DB_SID=

Initialize File Name

false

Initialize file name.

RMAN.INIT_FILE_NAME=

User List File Name

false

Name of the users list file. this file should be kept in location specified for RMAN_BACKUP_LOCATION.

RMAN.USERLIST_FILE_NAME=

GDB Name of source Db

false

GDB Name of source Db.

RMAN.DATABASE_NAME=

use existing RMAN Backup

true

use existing RMAN Backup. This should be set to 'NO' for this use case.

RMAN.USE_EXISTING_BACKUP=NO


Existing RMAN Backup from the Source Database

Table 32-35 EMCLI Property Files for a Existing RMAN Backup

Name Required Description Variable

Reference Database

true

The source database from which the profile will be created

REFERENCE_DATABASE=

Type of the reference database

true

The target type of the source database (oracle_database or rac_database)

REFERENCE_DATABASE_TYPE=

Reference Node

false

The reference node from which the profile will be created. Applicable only for RAC and Cluster targets

REF_NODE_SELECTED=

Backup mechanism for data

false

Variable to identify what mode needs to be used for creating backup data. Possible values are EXPORT, DBCA_TEMPLATE, RMAN, and THIN_PROVISIONING

DATA_CONTENT_MODE=RMAN

The content that will be included in the backup

false

The data content that gets included in the backup can metadata or data. Possible values are METADATA_ONLY and METADATA_AND_DATA.

DATA_CONTENT=METADATA_AND_DATA

Reference Host Credentials

true

The credentials that will be used for OS authentication. Format is <Cred Name:Owner>. If this is not provided,preferred credentials will be checked against NormalHostCreds.

REF_HOST_CREDENTIALS=

Database Credentials

false

The credentials that will be used for performing database authentication. Format is <Cred Name:Owner>. If this is not provided, preferred credentials will be checked against SysDbaCreds

REF_DB_CREDENTIALS=

Profile Name

true

Name of the profile

PROFILE_NAME=

Profile Description

false

Name with which the profile should be created.

PROFILE_DESC=

Profile location

true

Location of the profile in software library.

PROFILE_LOCATION=

Profile Version

false

Version of the profile. If none is specified, the Database version shall be used.

PROFILE_VERSION=

Profile Vendor

false

Vendor of the profile. Default is Oracle.

PROFILE_VENDOR=

Profile notes

false

Notes for the profile.

PROFILE_NOTES=

Working Directory

false

Working directory is the location where the files are staged.

WORKING_DIRECTORY=

Is the profile initiated by end user

true

Is the profile initiated by end user as part of backup process or the database.

USER_INITIATED=false

Is Database target available

false

Is Database target available. Must be set to 'true' for this use case.

DB_TARGET_AVAILABLE=true

Platform Name of Source Database

false

Platform Name of Source Database. For example, Linux x86-64 or Oracle Solaris on x86-64 (64-bit).

SOURCE_DB_PLATFORM_NAME=

Backup Type

false

Backup type.

RMAN.BACKUP_TYPE=

Number of RMAN Channels to use(Default No of Channels : 2

false

Number of Channels to be used. Possible Values: like 1, 2 or 3.

RMAN.RMAN_CHANNELS=

Retain backup until

false

Retain backup until. Format: mm/dd/yyyy.

RMAN.RETAIN_UNTIL=

Encryption Type

false

Encryption Type. Possible Values: ON, OFF.

RMAN.ENCRYPTION_TYPE=

Source:Encryption Password/Key

false

Encryption key which was used to encrypt the backup.

RMAN.ENCRYPTION_PASSWORD=

Compression Type

false

Compression type. Possible Values: HIGH, MEDIUM, LOW.

RMAN.COMPRESSION_TYPE=

RMAN Backup Location

true

Location of the RMAN Backups.

RMAN.RMAN_BACKUP_LOCATION=

Backup file format

false

Backup file format.

RMAN.BACKUP_FILE_FORMAT=

Backup file tag

false

Backup file tag.

RMAN.BACKUP_FILE_TAG=

Source: Control File Location

false

Location of the Control File.

RMAN.CONTROL_FILE_NAME=

Control File Tag

false

Control File Tag.

RMAN.CONTROL_FILE_TAG=

Source: Database SID

false

Database SID of the source database.

RMAN.ORACLE_DB_SID=

Initialize File Name

false

Initialize file name.

RMAN.INIT_FILE_NAME=

User List File Name

false

Name of the users list file. this file should be kept in location specified for RMAN_BACKUP_LOCATION.

RMAN.USERLIST_FILE_NAME=

GDB Name of source Db

false

GDB Name of source Db.

RMAN.DATABASE_NAME=

use existing RMAN Backup

true

use existing RMAN Backup. This should be set to 'YES' for this use case.

RMAN.USE_EXISTING_BACKUP=YES


Existing RMAN Backup on the Stage Location

Table 32-36 EMCLI Property Files for a Existing RMAN Backup on the Stage Location

Name Required Description Variable

Reference Database

true

The source database from which the profile will be created

REFERENCE_DATABASE=

Type of the reference database

true

The target type of the source database (oracle_database or rac_database)

REFERENCE_DATABASE_TYPE=

Reference Node

false

The reference node from which the profile will be created. Applicable only for RAC and Cluster targets

REF_NODE_SELECTED=

Backup mechanism for data

false

Variable to identify what mode needs to be used for creating backup data. Possible values are EXPORT, DBCA_TEMPLATE, RMAN, and THIN_PROVISIONING

DATA_CONTENT_MODE=RMAN

The content that will be included in the backup

false

The data content that gets included in the backup can metadata or data. Possible values are METADATA_ONLY and METADATA_AND_DATA.

DATA_CONTENT=METADATA_AND_DATA

Reference Host Credentials

true

The credentials that will be used for OS authentication. Format is <Cred Name:Owner>. If this is not provided,preferred credentials will be checked against NormalHostCreds.

REF_HOST_CREDENTIALS=

Database Credentials

false

The credentials that will be used for performing database authentication. Format is <Cred Name:Owner>. If this is not provided, preferred credentials will be checked against SysDbaCreds

REF_DB_CREDENTIALS=

Profile Name

true

Name of the profile

PROFILE_NAME=

Profile Description

false

Name with which the profile should be created.

PROFILE_DESC=

Profile location

true

Location of the profile in software library.

PROFILE_LOCATION=

Profile Version

false

Version of the profile. If none is specified, the Database version shall be used.

PROFILE_VERSION=

Profile Vendor

false

Vendor of the profile. Default is Oracle.

PROFILE_VENDOR=

Profile notes

false

Notes for the profile.

PROFILE_NOTES=

Working Directory

false

Working directory is the location where the files are staged.

WORKING_DIRECTORY=

Is the profile initiated by end user

true

Is the profile initiated by end user as part of backup process or the database.

USER_INITIATED=false

Is Database target available

false

Is Database target available. Must be set to 'false' for this use case.

DB_TARGET_AVAILABLE=false

Platform Name of Source Database

false

Platform Name of Source Database. For example, Linux x86-64 or Oracle Solaris on x86-64 (64-bit).

SOURCE_DB_PLATFORM_NAME=

Backup Type

false

Backup type.

RMAN.BACKUP_TYPE=

Number of RMAN Channels to use(Default No of Channels : 2

false

Number of Channels to be used. Possible Values: like 1, 2 or 3.

RMAN.RMAN_CHANNELS=

Retain backup until

false

Retain backup until. Format: mm/dd/yyyy.

RMAN.RETAIN_UNTIL=

Encryption Type

false

Encryption Type. Possible Values: ON, OFF.

RMAN.ENCRYPTION_TYPE=

Source:Encryption Password/Key

false

Encryption key which was used to encrypt the backup.

RMAN.ENCRYPTION_PASSWORD=

Compression Type

false

Compression type. Possible Values: HIGH, MEDIUM, LOW.

RMAN.COMPRESSION_TYPE=

RMAN Backup Location

true

Location of the RMAN Backups.

RMAN.RMAN_BACKUP_LOCATION=

Backup file format

false

Backup file format. Possible Values: %U

RMAN.BACKUP_FILE_FORMAT=

Source: Control File Location

false

Location of the Control File.

RMAN.CONTROL_FILE_NAME=

Control File Tag

false

Control File Tag. Default: control01.ctl

RMAN.CONTROL_FILE_TAG=

Source: Database SID

false

Database SID of the source database.

RMAN.ORACLE_DB_SID=

Initialize File Name

false

Initialize file name.

RMAN.INIT_FILE_NAME=

User List File Name

false

Name of the users list file. this file should be kept in location specified for RMAN_BACKUP_LOCATION.

RMAN.USERLIST_FILE_NAME=

GDB Name of source Db

false

GDB Name of source Db.

RMAN.DATABASE_NAME=

RMDB Version

false

RMDBS version

RMAN.DATABASE_VERSION=


Snapclone Database

Table 32-37 EMCLI Property Files for Snapclone Database

Name Required Description Variable

Reference Database

true

The source database from which the profile will be created

REFERENCE_DATABASE=

Type of the reference database

true

The target type of the source database (oracle_database or rac_database)

REFERENCE_DATABASE_TYPE=

Reference Node

false

The reference node from which the profile will be created. Applicable only for RAC and Cluster targets

REF_NODE_SELECTED=

Backup mechanism for data

false

Variable to identify what mode needs to be used for creating backup data. Possible values are EXPORT, DBCA_TEMPLATE, RMAN, and THIN_PROVISIONING

DATA_CONTENT_MODE=THIN_PROVISIONING

The content that will be included in the backup

false

The data content that gets included in the backup can metadata or data. Possible values are METADATA_ONLY and METADATA_AND_DATA.

DATA_CONTENT=METADATA_AND_DATA

Reference Host Credentials

true

The credentials that will be used for OS authentication. Format is <Cred Name:Owner>. If this is not provided,preferred credentials will be checked against NormalHostCreds.

REF_HOST_CREDENTIALS=

Database Credentials

false

The credentials that will be used for performing database authentication. Format is <Cred Name:Owner>. If this is not provided, preferred credentials will be checked against SysDbaCreds

REF_DB_CREDENTIALS=

Profile Name

true

Name of the profile

PROFILE_NAME=

Profile Description

false

Name with which the profile should be created.

PROFILE_DESC=

Profile location

true

Location of the profile in software library.

PROFILE_LOCATION=

Profile Version

false

Version of the profile. If none is specified, the Database version shall be used.

PROFILE_VERSION=

Profile Vendor

false

Vendor of the profile. Default is Oracle.

PROFILE_VENDOR=

Profile notes

false

Notes for the profile.

PROFILE_NOTES=

Working Directory

false

Working directory is the location where the files are staged.

WORKING_DIRECTORY=

Is the profile initiated by end user

true

Is the profile initiated by end user as part of backup process or the database.

USER_INITIATED=false


Schema Database

Table 32-38 EMCLI Property Files for Schema Database

Name Required Description Variable

Reference Database

true

The source database from which the profile will be created

REFERENCE_DATABASE=

Type of the reference database

true

The target type of the source database (oracle_database or rac_database)

REFERENCE_DATABASE_TYPE=

Reference Node

false

The reference node from which the profile will be created. Applicable only for RAC and Cluster targets

REF_NODE_SELECTED=

Backup mechanism for data

false

Variable to identify what mode needs to be used for creating backup data. Possible values are EXPORT, DBCA_TEMPLATE, RMAN, and THIN_PROVISIONING

DATA_CONTENT_MODE=EXPORT

The content that will be included in the backup

false

The data content that gets included in the backup can metadata or data. Possible values are METADATA_ONLY and METADATA_AND_DATA.

DATA_CONTENT=METADATA_AND_DATA

Reference Host Credentials

true

The credentials that will be used for OS authentication. Format is <Cred Name:Owner>. If this is not provided,preferred credentials will be checked against NormalHostCreds.

REF_HOST_CREDENTIALS=

Database Credentials

false

The credentials that will be used for performing database authentication. Format is <Cred Name:Owner>. If this is not provided, preferred credentials will be checked against SysDbaCreds

REF_DB_CREDENTIALS=

Profile Name

true

Name of the profile

PROFILE_NAME=

Profile Description

false

Name with which the profile should be created.

PROFILE_DESC=

Profile location

true

Location of the profile in software library.

PROFILE_LOCATION=

Profile Version

false

Version of the profile. If none is specified, the Database version shall be used.

PROFILE_VERSION=

Profile Vendor

false

Vendor of the profile. Default is Oracle.

PROFILE_VENDOR=

Profile notes

false

Notes for the profile.

PROFILE_NOTES=

Data gold image name

true

Entity name of the data gold image

DATA_GOLD_IMAGE_ENTITY_NAME=

Working Directory

false

Working directory is the location where the files are staged.

WORKING_DIRECTORY=

Schemas to be exported

true

List of schemas that needs to be included as part of the export.

EXPORT.SCHEMA_INCLUDE_LIST.0=

Dump Directories

false

List of directory objects that needs to be used for storing export. Format: directory=dir1,file_name=file1%U.dmp[,max_size=1MB].

EXPORT.DUMP_DIRECTORY_LIST.0=

Log Directory

false

Log directory location where the log file generated during export.

PORT.LOG_FILE_DIRECTORY=

Degree of Parallelism

false

Degree of Parallelism indicates the number of threads. For example, 1 or 2 or 3...

EXPORT.DEGREE_OF_PARALLELISM=