48 Database as a Service Administrator REST APIs

This chapter describes the resource models for the Administration flows of Database as a Service (DBaaS) REST APIs, and their responses. The following topics are covered in this chapter:

48.1 Summary of Database as a Service Administrator REST APIs

The table below shows a summary of all the DBaaS Administrator REST APIs covered in this chapter.

Table 48-1 Summary of Administrator DBaaS REST APIs

Resource Data Model GET POST PUT DELETE

PaaS zones

Table 48-3

Section 48.3.1.3.1

Section 48.3.1.3.3

Section 48.3.1.3.4

Not supported

PaaS zone

Table 48-5

Section 48.3.1.3.2

Not supported

Not supported

Section 48.3.1.3.5

Software pools

Table 48-12

Section 48.3.2.3.1

Not supported

Software pool

Table 48-14

Not supported

Not supported

Section 48.3.2.3.10

DBaaS request settings

Table 48-26

Section 48.3.3.4.1

Section 48.3.3.4.2

Not supported

Not supported

DBaaS quota

Table 48-30

Section 48.3.4.4.1

Section 48.3.4.4.2

Section 48.3.4.4.3

Section 48.3.4.4.4

Service templates

Table 48-36

Section 48.3.5.3.1

Section 48.3.5.3

Not supported

Not supported

Service template

Table 48-38

Section 48.3.5.3.2

Not supported

Supported

Section 48.3.5.3.17


Note:

In the table above, ”supported” indicates that the operation is supported on the resource. However, there is no example in the chapter for this operation.

48.2 Creating a New DBaaS Cloud Setup Using REST APIs

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 48-1 Creating a New DBaaS Cloud Resource

Steps for DBaaS Setup

As an example, Table 48-2 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 REST APIs wherever possible. However, you can perform the same operations using EM CLI verbs. To know the corresponding EM CLI verbs refer to Chapter 10, EM CLI Verbs for Database as a Service Administrator.

Table 48-2 Creating DBaaS using REST APIs

Step Action

1

Create a PaaS infrastructure zone.

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

Note: To view the existing PaaS zones perform a GET operation. Refer to Section 48.3.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 48.3.2.3.1, "Viewing Details of the Software Pools Resource"

3

Create DBaaS Request Settings for a user role. Refer to Section 48.3.3.4.2, "Creating Database Request Settings".

4

Create Quota for a user role. Refer to Section 48.3.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 Chapter 47, "EM CLI Verbs for Database as a Service Administrator".

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.

48.3 Database as a Service Administrator Operations REST APIs

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

48.3.1 PaaS Zones and PaaS Zone REST APIs

The REST APIs in this section are categorized as PaaS zones REST APIs and PaaS zone REST 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:

48.3.1.1 PaaS Zones REST APIs

PaaS zones is a collective representation of all the individual PaaS zone resources. PaaS zones has the media type application/oracle.com.cloud.common.PaaSZones+json.

The following table describes the PaaS zones data model.

Table 48-3 PaaS Zones Data Model

Field Type Description Occurs

Name

String

Displays name of this collection resource.

1

Type

String

Type of this collection resource.

1

hasMore

Boolean

Indicates whether there are more elements in the collection.

1

Count

Integer

Number of elements returned.

1

Items

Collection <PaaSZone>

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

1

totalCount

Integer

Total number of PaaS zone resources.

1

canonicalLink

URI

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

1

selfLink

URI

Refers to the resource equivalent to the containing elements.

1


48.3.1.1.1 Supported Request Methods for PaaS Zones

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

Table 48-4 Supported Request Methods for PaaS Zones

GET POST PUT DELETE

Yes

Yes

Yes

No


48.3.1.2 PaaS Zone REST APIs

This resource represents a PaaS Infrastructure Zone. PaaS zone has the media type application/oracle.com.cloud.common.PaaSZone+json.

The following table describes the PaaS zone data model.

Table 48-5 PaaS Zone Data Model

Field Name Description Occurs

Name

String

A human readable name given to the PaaS zone. This field is non-editable.

1

displayName

String

Display name for the PaaS zone.

0..1

guid

String

Unique GUID of the PaaS zone that identifies the resource.

1

description

String

A brief description of the PaaS zone.

0..1

targetType

String

Target type of the PaaS zone to be created..

1

Members

Collection<members>

Members of PaaS zone. These must be added as EM targets in advance.

1

credentials

Collection <PaaSzone_Credential>

Credentials associated with the PaaS zone.

1

placementConstraints

Collection <EntityValueHolder>

Placement constraints for the PaaS zone that allows the cloud administrator to set a maximum ceilings for resource utilization.

0..1

characteristics

Collection <EntityValueHolder>

Characteristics associated with the PaaS zone.

1

canonicalLink

URI

A GET against this URI refreshes the client representation of the PaaS zone.

1


48.3.1.2.1 Supported Request Methods for PaaS Zone

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

Table 48-6 Supported Request Methods for PaaS Zone

GET POST PUT DELETE

Yes

No

No

Yes


48.3.1.3 PaaS Zones and PaaS Zone REST 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:

48.3.1.3.1 Viewing Details of the PaaS Zones Resource

A GET request issued on the Resource Providers resource with the query parameter "type=self_service_zone" provides the details of all the individual PaaS zones which are already existing in the PaaS zones resource.

Table 48-7 GET Request Configuration for Viewing Details of the PaaS Zones Resource

Feature Description

URI

/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/resourceproviders?type=self_service_zone

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

None

Request method

GET


A sample of the response received is shown below:

{
    "name": "Resource Providers",
    "type": "Resource Provider",
    "canonicalLink": {
        "href": "https://example.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/resourceproviders"
    },
    "totalResults": 1,
         "cfwItems": [
        {
            "id": "15",
            "name": "pzone1",
            "type": "self_service_zone",
            "guid": "A3CF2D49CFF3F3E664D073303EA51F8E",
            "canonicalLink": {
                "href": "https://example.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/resourceproviders/15"
            }
        },
        {
            "id": "16",
            "name": "Test Zone 2",
            "type": "self_service_zone",
            "guid": "EF3830C71CC54B50B963376F9217AB95",
            "canonicalLink": {
                "href": "https://example.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/resourceproviders/16"
            }
        },
        {
            "id": "17",
            "name": "test paas zone",
            "type": "self_service_zone",
            "guid": "5D7548C1B879A51CFD894CEA8D5FB19B",
            "canonicalLink": {
                "href": "https://example.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/resourceproviders/17"
            }
        },
        {
            "id": "18",
            "name": "Test Zone",
            "type": "self_service_zone",
            "guid": "34405E0876B271E754B1A829BDFD06B9",
            "canonicalLink": {
                "href": "https://example.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/resourceproviders/18"
            }
        }                
    ]
}
48.3.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:

Table 48-8 GET Request Configuration for Viewing Details of the PaaS Zones Resource

Feature Description

URI

/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/resourceproviders/23

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

None

Request method

GET


A sample of the response received is shown below:

{
    "name": "My Test Zone",
    "type": "self_service_zone",
    "memberTargetType": "host",
    "members": [
        "example.com"
    ],
    "credentials": [
        { "name": "normal_credential_guid",
          "value": "NC_HOST_2015-10-09-095917"}
    ],
    "placementConstraints": [
        {"name": "MAX_CPU_UTILIZATION",
         "value": [ "80" ] },
        {"name": "MAX_MEMORY_ALLOCATION",
          "value": [ "80" ]}
    ],
    "memberConstraints": [],
    "characteristics": [
        {   "name": "ORACLE.SYSMAN.CFW.SELF_SERVICE_ZONE",
            "value": [ "34405E0876B271E754B1A829BDFD06B9" ] },
        {   "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_CONTACT",
            "value": [] },
        {   "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_COST_CENTER",
            "value": [] },
        {   "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_DEPARTMENT",
            "value": [] },
        {   "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_DOWNTIME_CONTACT",
            "value": [] },
        {   "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_LIFECYCLE_STATUS",
            "value": [] },
        {   "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_LINE_OF_BUS",
            "value": [] },
        {   "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_LOCATION",
            "value": [] }
    ],
    "canonicalLink": {"href": "https://example.com/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/resourceproviders/23"}
}
48.3.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:

Table 48-9 POST Request Configuration for Creating a PaaS Zone

Feature Description

URI

/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/resourceproviders

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

{   "useExistingTarget": false,
    "name": "My Test Zone",
    "type": "self_service_zone",
    "credentials": [
        {   "name": "normal_credential_guid",
            "value": "MY_ZONE_CREDS0afb3e85-f" }
    ],
    "memberTargetType": "host",
    "members": [ "example.com" ],
    "placementConstraints": [
        {   "name": "MAX_CPU_UTILIZATION",
            "value": "90"  }
    ] }

Request method

POST


A sample of the response received is shown below.

{
    "message": "Resource provider with name \"My Test Zone\" and type \"self_service_zone\" created successfully.",
    "canonicalLink": {
        "href": "https://example.com:44533/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/resourceproviders/23"
    }
}
48.3.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:

Table 48-10 PUT Request Configuration for Updating a PaaS Zone

Feature Description

URI

/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/resourceproviders/23

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

{   "memberTargetType": "host",
        "credentials": [
        {"name": "normal_credential_guid",
        "value": "NC_HOST_2015-10-09-095917" }
        ],
        "placementConstraints": [
        {"name": "MAX_CPU_UTILIZATION",
        "value": [ "92" ] }
        ] }

Request method

PUT


A sample of the response received is shown below.

{
    "message": "Resource provider with ID \"23\" updated successfully."
}
48.3.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:

Table 48-11 DELETE Request Configuration to delete a PaaS Zone

Feature Description

URI

/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/resourceproviders/23

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Body

None

Request method

DELETE


{
    "message": "Resource provider with ID \"23\" deleted successfully."
}

48.3.2 Software Pools and Software Pool REST APIs

This section covers the following:

48.3.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 media type application/oracle.com.cloud.commom.SoftwarePools+json.

The following table describes the Software pools data model.

Table 48-12 Software Pools Data Model

Field Type Description Occurs

Name

String

Displays name of this collection resource.

1

Type

String

Type of this collection resource.

1

hasMore

Boolean

Indicates whether there are more elements in the collection.

1

Count

Integer

Number of elements returned.

1

Items

Collection <PaaSZone>

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

1

totalCount

Integer

Total number of PaaS zone resources.

1

canonicalLink

URI

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

1

selfLink

URI

Refers to the resource equivalent to the containing elements.

1


48.3.2.1.1 Supported Request Methods for Software Pools

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

Table 48-13 Supported Request Methods for Software Pools

GET POST PUT DELETE

Yes

Yes

Yes

No


48.3.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 media type application/oracle.com.cloud.common.SoftwarPool+json.

The following table describes the Software pool data model.

Table 48-14 Software Pool Data Model

Field Type Description Occurs

Name

String

A human readable name given to the Software pool.

1

ID

String

Pool GUID that uniquely identifies the resource.

1

Description

String

As brief description given to the software pool.

0..1

poolTargetType

String

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.

1

paasZone

String

Name of the PaaS zone associated with this Software Pool.

1

Members

Collection <String>

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

1

memberType

String

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.

1

Constraints

Collection <Entity Value Holder>

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

0..1

Filters

Collection <EntityValueHolder>

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

1

Properties

Collection <String>

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

1

membersToAdd

Collection <String>

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

0..1

membersToRemove

Collection <String>

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

0..1

canonicalLink

URI

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

1


48.3.2.2.1 Supported Request Methods for Software Pool

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

Table 48-15 Supported Request Methods for Software Pool

GET POST PUT DELETE

Yes

No

No

Yes


48.3.2.3 Software Pool REST 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:

48.3.2.3.1 Viewing Details of the Software Pools Resource

Table 48-16 GET Request Configuration for Viewing Details of the Software Pools Resource

Feature Description

URI

/em/websvcs/restful/extws/ cloudservices/admin/cfw/v1/softwarepools

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

None

Request method

GET


A sample of the response received is shown below.

{
  "name": "Software Pools",
  "type": "Software Pool",
  "hasMore": false,
  "count": 4,
  "items": [
    {
      "name": "SI Databases Zone",
      "type": "oracle_cloud_zone",
      "id": "EF658526512C5CFEF593EB295D0CFAD5",
      "zoneName": "Salt Lake City Zone",
      "canonicalLink": "https://xyz.example.com:4473/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/EF658526512C5CFEF593EB295D0CFAD5"
    },
    {
      "name": "Pluggable Databases Pool",
      "type": "pdbaas_pool",
      "id": "9FC634F035161C9260CD943970BAC1C8",
      "zoneName": "Salt Lake City Zone",
      "canonicalLink": "https://xyz.example.com:4473/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/9FC634F035161C9260CD943970BAC1C8"
    },
    {
      "name": "Primary DB Pool",
      "type": "oracle_cloud_zone",
      "id": "B1E3A8872D1A503DA1F1756CD18207B4",
      "zoneName": "Salt Lake City II",
      "canonicalLink": "https://xyz.example.com:4473/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/B1E3A8872D1A503DA1F1756CD18207B4"
    },
    {
      "name": "Standby DB Pool",
      "type": "oracle_cloud_zone",
      "id": "A5B6272EC680EFAB1B53842EC4256AAB",
      "zoneName": "Salt Lake City II",
      "canonicalLink": "https://xyz.example.com:4473/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/A5B6272EC680EFAB1B53842EC4256AAB"
    }
  ],
  "totalCount": 4,
  "canonicalLink": "https://xyz.example.com:4473/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools",
  "selfLink": "https://xyz.example.com:4473/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools"
}
48.3.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:

Table 48-17 GET Request Configuration for Viewing Details of the Software Pool Resource

Feature Description

URI

/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E827809080C16F75E040F20A60511EA2

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

None

Request method

GET


A sample of the response received is 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"
}
48.3.2.3.3 Viewing Details of a Software Pool Capacity

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

In the table below, the URI to view the Software pool capacity is /em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/C0DE0DEB3A8195A4707704360463060B/capacity. However, it can be modified to add certain query parameters to view the desired output. The query parameters and their descriptions are given below:

  • showUsageSummary: Includes resource utilization data at pool level. Values can be ”yes”, ”y”, or ”true” which are all case insensitive. If value is not provided or if the given value is other than the listed values, "usageSummary" will not be available in the response.

  • showMemberLevelUsage: Includes resource utilization data at pool member level. Values can be ”yes”, ”y”, or ”true” which are all case insensitive. If value is not provided or if the given value is other than the listed values, "memberLevelUsage" will not be available in the response.

  • diskGroups: Provides the list of ASM disk group names for storage computation. If the value is not provided, storage values will not be available in the response. Multiple values can be provided by using the format given below in the request URI:

    diskGroups=<Value1>&diskGroups=<Value2>&...

  • cpuMemAveUtilDays: Indicates the number of days to include the collected metrics for computing CPU and memory utilization. If no value is provided, the default value is taken as 7 days.

The configuration for GET on Software pool is as follows:

Table 48-18 GET Request Configuration for Viewing Details of the Software Pool Capacity

Feature Description

URI

/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E284FAAA7FBA6A06F7090115A3E07299/capacity?showMemberLevelUsage=y&showUsageSummary=true&diskGroups=RECOC1&diskGroups=DATAC1&cpuMemAveUtilDays=3

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

None

Request method

GET


A sample of the response received is shown below.

{"name":"DB Pool 1",
"type":"oracle_cloud_zone",
"poolInfo":
   {"poolName":"DB Pool 1",
    "poolId":"C0DE0DEB3A8195A4707704360463060B",
    "poolDescription":"Exadata hosts Oracle Home",
    "dbConfiguration":"Cluster Database",
    "dbVersion":"12.1.0.2.0",
    "paasZone":"zone1"},                                                        "standByPools" :
   [{"poolName":"Standby Pool 1",
     "poolId":"6AF0F5A23BE120F4EAEC29236853D6B8",
     "poolDescription":"Standby Oracle Home",
     "dbConfiguration":"Cluster Database",
     "dbVersion":"12.1.0.2.0",
     "paasZone":"zone2"}],
"usageSummary":
    {"numberOfDbs":"2",
     "numberOfHosts":"2",
     "cores":
        {"total":"64",
         "allocated":"8",
         "available":"56",
         "unit":"cores"},
     "memory":
        {"total":"504",
         "allocated":"3.53",
         "available":"500.47",
         "unit":"GB"},
     "storage":
        {"total":"29073.24",
         "allocated":"12765.99",
         "available":"16307.25",
         "unit":"GB"}},
"memberLevelUsage":
   [{"host":"MyHost1.example.com",
     "oracleHomeLocation":"/u01/app/oracle/product/12.1.0.2/dbhome_1",
     "numberOfDbs":"1",
     "cores":
        {"total":"32",
         "allocated":"4",
         "available":"28",
         "unit":"cores"},
     "cpuUtilizationPercentage":"12.77",
     "memory":
        {"total":"251.99",
         "allocated":"1.77",
         "available":"250.23",
         "unit":"GB"},
         "memoryUtilizationPercentage":"59.66"},
   {"host":"MyHost2.example.com",
     "oracleHomeLocation":"/u01/app/oracle/product/12.1.0.2/dbhome_1",
     "numberOfDbs":"1",
     "cores":
        {"total":"32",
         "allocated":"4",
         "available":"28",
         "unit":"cores"},
     "cpuUtilizationPercentage":"9.45",
     "memory":
        {"total":"251.99",
         "allocated":"1.77",
         "available":"250 .23",
         "unit":"GB"},
     "memoryUtilizationPercentage":"66.75"}],
"canonicalLink":"https://MyHost.example.com:4900/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/C0DE0DEB3A8195A4707704360463060B/capacity"}
48.3.2.3.4 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:

Table 48-19 POST Request Configuration for Creating a Database Pool

Feature Description

URI

/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools

Request 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"}
    ]
  }
}

Note:

  • name: Indicates the name of the pool.

  • poolTargetType: Indicates the target type for DBaaS pool. oracle_cloud_zone is the target type specific for DB OH pool.

  • paasZone: Indicates the name of the PaaS infrastructure zone.

  • members: Is a comma and string separated list of target names of Oracle homes, and members of the pool.

  • constraints: Indicates the constraints on the pool. Allowed values is MAX_INSTANCES.

  • filters: Indicates the filters applicable to define the version and type of the oracle homes of the pool, including VERSION, CONFIGURATION (oracle_database, rac_database) and PLATFORM (provide reference to list of code, for example, 226 for linux).

  • properties: Indicates the collection resource to define properties of the pool like Host credential GUID, Root credential GUID, and Standby pools. To identify the Named credential GUID use the EM CLI verb emcli list_named_credential or emcli get_named_credential.

Request method

POST


A sample of the response received is 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"
}
48.3.2.3.5 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:

Table 48-20 PUT Request Configuration for Updating a Database Pool

Feature Description

URI

/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools

Request 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"}
                                ]}
        }

Note: Ensure at least one member remains as a part of the pool while issuing the request. If all the members are added to the membersToRemove attribute, the PUT request may fail.

Request method

PUT


A sample of the response received is shown below.

Status 200 OK 
Content-Type: application/json 
{
message: "Software Pool  " DB_POOL" updated successfully."
}
48.3.2.3.6 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:

Table 48-21 POST Request Configuration for Creating a Schema Pool

Feature Description

URI

/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

{ 
        "name": "SCHEMA_POOL", 
        "poolTargetType": "schaas_pool",
        "description": "Schema Service Pool",
        "paasZone": "SLC01MDR_ZONE",
        "members": ["simple.example.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"}
                ]
                } 
        }

Request method

POST


A sample of the response received is 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://xyxy.example.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/2CFF36A9E92AAD533253871374857D8C/members",
         "numberOfPoolMembers":"1"},
        "constraints":{
         "canonicalLink":"https://xyxy.example.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/2CFF36A9E92AAD533253871374857D8C/constraints",
         "numberOfConstraints":"5"},
        "filters":{
         "canonicalLink":"https://xyxy.example.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/2CFF36A9E92AAD533253871374857D8C/filters",
         "numberOfFilters":"3"},
        "properties":{
         "canonicalLink":"https://xyxy.example.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://xyxy.example.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/2CFF36A9E92AAD533253871374857D8C",
        "selfLink":"https://xyxy.example.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/2CFF36A9E92AAD533253871374857D8C"
}
48.3.2.3.7 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:

Table 48-22 PUT Request Configuration for Updating a Schema Pool

Feature Description

URI

/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

{ 
        "name": "SCHEMA_POOL", 
        "poolTargetType": "schaas_pool",
        "description": "Schema Service Pool",
        "membersToAdd": [
                "xyxy.example.com"],
        "membersToRemove": [
                "simple.us.example.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"}                          
                ]
                },
        }

Note: Ensure at least one member remains as a part of the pool while issuing the request. If all the members are added to the membersToRemove attribute, the PUT request may fail.

Request method

PUT


A sample of the response received is shown below.

Status 200 OK 
Content-Type: application/json 
{
message: "Software Pool  "SCHEMA_POOL" updated successfully.
}
48.3.2.3.8 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:

Table 48-23 POST Request Configuration for Creating a Pluggable Database Pool

Feature Description

URI

/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools

Request 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"}
                        ]
                } 
        }

Request method

POST


A sample of the response received is 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://xyxy.example.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E82952BD4C94D443E040F20A605114E6/members",
         "numberOfPoolMembers":"1"
        },
        "constraints":{
         "canonicalLink":"https://xyxy.example.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E82952BD4C94D443E040F20A605114E6/constraints",
         "numberOfConstraints":"5"
        },
        "filters":{
         "canonicalLink":"https://xyxy.example.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E82952BD4C94D443E040F20A605114E6/filters",
         "numberOfFilters":"3"
         },
        "properties":{
         "canonicalLink":"https://xyxy.example.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://xyxy.example.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E82952BD4C94D443E040F20A605114E6",
        "selfLink":"https://xyxy.example.com:11180/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E82952BD4C94D443E040F20A605114E6"
}
48.3.2.3.9 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:

Table 48-24 PUT Request Configuration for Updating a Pluggable Database Pool

Feature Description

URI

/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

{ 
        "name": "PDB_POOL", 
        "poolTargetType": "pdbaas_pool",
        "description": "Pluggable Database Pool",
        "membersToAdd": [
                "simple.us.example.com"],
        "membersToRemove": [
                "simple1.us.example.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"}                              
                ]
        },
        }

Note: Ensure at least one member remains as a part of the pool while issuing the request. If all the members are added to the membersToRemove attribute, the PUT request may fail.

Request method

PUT


A sample of the response received is shown below.

Status 200 OK 
Content-Type: application/json 
{
message: "Software Pool  "PDB_POOL" updated successfully."
}
48.3.2.3.10 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:

Table 48-25 DELETE Request Configuration for Deleting a Database/Schema/Pluggable Database Pool

Feature Description

URI

/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/softwarepools/E827809080C16F75E040F20A60511EA2

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Body

None

Request method

DELETE


A sample of the response received is shown below.

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

48.3.3 Database Request Settings REST APIs

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

Note:

Request Settings REST 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:

48.3.3.1 Database Request Settings Resource Model

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 REST APIs and provide examples of supported operations.

48.3.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 media type - application/oracle.com.cloud.common.DbaasRequestSettings+json.

The following table describes the Dbaas Request Settings data model.

Table 48-26 DBaaS Request Settings Data Model

Field Type Description Occurs

uri

URI

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

1

name

String

A human readable name given to the template.

1

description

String

A brief description given to the template

1

resource_state

ResourceState

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.

1

media_type

String

The media type of the service template.

1

service_family_type

String

Dbaas

1

canonicalLink

URI

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

1

RequestSettings

String

The current database request settings.

1


48.3.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 48-27 Supported Operations for DBaas Request Settings

GET POST PUT DELETE

Yes

Yes

Yes

Yes


48.3.3.4 Dbaas Request Settings REST 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:

48.3.3.4.1 Viewing Details of the Dbaas Request Settings Resource

The table below shows the REST API configuration for viewing details of the DBaaS request setting resource.k

Table 48-28 GET Request Configuration for Viewing Details of the DBaaS Request Setting Resource

Feature Description

URI

em/cloud/dbaas/requestsettings

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Body

None

Request method

GET


A sample of the response received 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"
    }
}
48.3.3.4.2 Creating Database Request Settings

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

The configuration for POST to DbaasRequestSettings is as follows:

Table 48-29 POST Request Configuration for Creating DBaaS Request Settings

Feature Description

URI

em/cloud/dbaas/requestsettings

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

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

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

Body

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

Request method

POST


A sample of the response received 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"
}

48.3.4 Database Quota REST APIs

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

Note:

Quota REST 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:

48.3.4.1 Database Quota Resource Model

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 REST APIs and provide examples of supported operations.

48.3.4.2 Dbaas Quota Resource

The Dbaas Quota extends the cloud resource. It describes the quota settings for all roles. Dbaas Quota has the media type application/oracle.com.cloud.common.DbaasQuota+json.

The following table describes the Dbaas Quota data model.

Table 48-30 Dbaas Quota Data Model

Field Type Description Occurs

uri

URI

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

1

name

String

A human readable name given to the template.

1

description

String

A brief description given to the template

1

resource_state

String

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.

1

media_type

String

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

1

service_family_type

String

Dbaas

1

canonicalLink

URI

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

1

databases

String

The databases usage report.

1

schema_services

String

The schema services usage report.

1

pluggable_databases

String

The pluggable databases usage report.

1

memory

String

The memory usage report.

1

storage

String

The storage usage report.

1

Quota

String

The Quota setup details for a role.

1


48.3.4.3 Supported Operations for DbaaS Quota

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

Table 48-31 Supported Operations for DbaaS Quota

GET POST PUT DELETE

Yes

Yes

Yes

Yes


48.3.4.4 Database Quota REST 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:

48.3.4.4.1 Viewing Details of the DBaas Quota Resource

Table 48-32 GET Request Configuration for Viewing Details of the DBaaS Quota Resource

Feature Description

URI

em/cloud/dbaas/quota

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Body

None

Request method

GET


A sample of the response received is 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"
      }
  ]
}
48.3.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 Dbaas Quota is as follows:

Table 48-33 POST Request Configuration for Creating a DBaaS Quota for a Role

Feature Description

URI

em/cloud/dbaas/quota

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

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

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

Body

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

Request method

POST


A sample of the response received 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"
}
48.3.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 DBaas Quota is as shown in the table below.

Table 48-34 PUT Request Configuration for Updating a DBaaS Quota for a Role

Feature Description

URI

em/cloud/dbaas/quota

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

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

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

Body

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

Request method

PUT


A sample of the response received 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-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"
}
48.3.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 DBaas Quota is as follows:

Table 48-35 DELETE Request Configuration for Deleting a DBaaS Quota for a Role

Feature Description

URI

em/cloud/dbaas/quota

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

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

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

Body

{
        "role_name" : "SSA_USER_ROLE"
}

Request method

DELETE


A sample of the response received is shown below.

{
  "uri": "/em/cloud/dbaas/quota",
  "name": "Dbaas User Quota",
  "description": "User Quota for the user",
  "resource_state": {
    "state": "READY",
    "messages": [
      {
        "text": "Quota for Role SSA_USER_ROLE deleted successfully.",
        "date": "2015-12-08T07:18:08+0000"
      }
    ]
  },
  "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"
}

48.3.5 Service Template REST APIs

This section covers the following:

48.3.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 media type application/oracle.com.cloud.common.ServiceTemplates+json.

The following table describes the Service Templates data model.

Table 48-36 Service Templates Data Model

Field Type Description Occurs

Name

String

Displays name of this collection resource.

1

Type

String

Type of this collection resource.

1

hasMore

Boolean

Indicates whether there are more elements in the collection.

1

Count

Integer

Number of elements returned.

1

Items

Collection <ServiceTemplate>

The elements of this collection.

1

totalCount

Integer

Total number of PaaS zone resources.

1

canonicalLink

URI

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

1

selfLink

URI

Refers to the resource equivalent to the containing elements.

1


48.3.5.1.1 Supported Operations for Service Templates

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

Table 48-37 Supported Operations for Service Templates

GET POST PUT DELETE

Yes

Yes

No

No


48.3.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 media type application/oracle.com.cloud.common.ServiceTemplate+json.

The following table describes the Service Template data model.

Table 48-38 Service Template Data Model

Field Type Description Occurs

Name

String

A human readable name given to the ServiceTemplate.

1

ID

String

Service Template ID that uniquely identifies the resource.

1

Description

String

As brief description given to the zone.

0..1

canonicalLink

URI

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

1

serviceFamily

String

Service family

1

serviceType

String

Service type.

1

Roles

Collection <Role>

SSA roles that can access this service template.

0..1

poolIds

Collection <String>

Software Pool Ids associated with this service template.

1

createdOn

String(Date/Time)

Time when the resource was created.

0..1

createdBy

String

The user who created the resource.

1

modifiedOn

String(Date/Time)

Time when the resource was last modified.

0..1

rolesToRemove

Collection <String>

SSA roles to be deleted while editing a PaaS zone.

0..1


48.3.5.2.1 Supported Operations for Service Template

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

Table 48-39 Supported Operations for Service Template

GET POST PUT DELETE

Yes

No

Yes

Yes


48.3.5.3 Service Templates and Service Template REST 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:

48.3.5.3.1 Viewing Details of the Service Templates Resource

The configuration for GET request is shown in the table below.

Table 48-40 GET Request Configuration for Viewing Details of the Service Templates Resource

Feature Description

URI

/em/websvcs/restful/extws/ cloudservices/admin/cfw/v2/servicetemplates

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

None

Request method

GET


A sample of the response received is shown below.

{
  "name": "Service Templates",
  "type": "Service Template",
  "totalResults": 5,
  "cfwItems": [
    {
      "id": "1",
      "name": "Database Creation on Individual Hosts",
      "guid": "203D5C842C2C17C3E053C075B10A73E3",
      "canonicalLink": {
        "href": "https://xyz.example.com:4473/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/1"
      }
    },
    {
      "id": "21",
      "name": "Create Databases on 12_1_0_1_x",
      "guid": "204E31F679D421E8E053C075B10A409A",
      "canonicalLink": {
        "href": "https://xyz.example.com:4473/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/21"
      }
    },
    {
      "id": "81",
      "name": "Create Databases on Clusters - Based on DB Template",
      "guid": "2068CDF3C0200D7CE053C075B10A7811",
      "canonicalLink": {
        "href": "https://xyz.example.com:4473/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/81"
      }
    },
    {
      "id": "61",
      "name": "RMAN ST",
      "guid": "205046BB4D38762EE053C075B10AF091",
      "canonicalLink": {
        "href": "https://xyz.example.com:4473/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/61"
      }
    },
    {
      "id": "41",
      "name": "Database Creation on Cluster",
      "guid": "204F067E22C12CFDE053C075B10A8A26",
      "canonicalLink": {
        "href": "https://xyz.example.com:4473/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/41"
      }
    }
  ],
  "canonicalLink": {
    "href": "https://xyz.example.com:4473/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates"
  }
}
48.3.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:

Table 48-41 GET Request Configuration for Viewing Details of the Service Template Resource

Feature Description

URI

/em/websvcs/restful/extws/ cloudservices/admin/cfw/v2/servicetemplates/61

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

None

Request method

GET


A sample of the response received is shown below.

{
  "id": "61",
  "guid": "205046BB4D38762EE053C075B10AF091",
  "name": "RMAN ST",
  "displayName": "RMAN ST",
  "serviceType": "DB",
  "serviceTemplateTypeId": "81",
  "createdOn": "2015-09-22T05:32:07Z",
  "createdBy": "SYSMAN",
  "modifiedOn": "2015-09-22T05:32:07Z",
  "owner": "SYSMAN",
  "lastModified": "2015-09-22T05:32:07Z",
  "payloads": [
    { "name": "SERVICE_TEMPLATE_PROV_SOURCE",
      "value": null,
      "required": null},
    {"name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:204D498A85D42C6AE053C075B10A6B09:0.1",
      "required": null},
    {"name": "DBDELETE_PRESCRIPT",
      "value": null,
      "required": null},
    {"name": "DBDELETE_POSTSCRIPT",
      "value": null,
      "required": null}
  ],
  "characteristics": [
    { "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_CONTACT",
      "displayName": "Contact",
      "values": [],
      "required": false,
      "editable": true,
      "visible": true},
    { "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_COST_CENTER",
      "displayName": "Cost Center",
      "values": [],
      "required": false,
      "editable": true,
      "visible": true},
    { "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_DEPARTMENT",
      "displayName": "Department",
      "values": [],
      "required": false,
      "editable": true,
      "visible": true},
    { "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_DOWNTIME_CONTACT",
      "displayName": "Downtime Contact",
      "values": [],
      "required": false,
      "editable": true,
      "visible": true},
    { "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_LIFECYCLE_STATUS",
      "displayName": "Lifecycle Status",
      "values": [
        "Development",
        "MissionCritical",
        "Production",
        "Stage",
        "Test"
      ],
      "required": false,
      "editable": true,
      "visible": true},
    { "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_LINE_OF_BUS",
      "displayName": "Line of Business",
      "values": [],
      "required": false,
      "editable": true,
      "visible": true},
    { "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_LOCATION",
      "displayName": "Location",
      "values": [],
      "required": false,
      "editable": true,
      "visible": true},
    { "name": "ORACLE.SYSMAN.SSA.PROVISIONING_TYPE",
      "displayName": "Provisioning Type",
      "values": ["RMAN"],
      "required": false,
      "editable": false,
      "visible": false}
  ],
  "resourceProvider": {
    "lookupCharacteristics": [
      {
        "purposeId": 1,
        "characteristics": [
          { "name": "ORACLE.SYSMAN.SSA.ORACLE_CLOUD_ZONE",
            "displayName": "oracle.sysman.ssa.oracle_cloud_zone",
            "targetType": {
              "targetType": "oracle_cloud_zone",
              "targetTypeName": "Database Pool",
              "parentTargetType": "self_service_zone",
              "parentTargetTypeName": "PaaS Infrastructure Zone"},
            "targets": [
              { "guid": "0CAF930826EDE90D8072E4E3ACA8072A",
                "displayName": "RAC Databases Pool _11_2_0_4" }
            ]
          }
        ]
      }
    ]
  },
  "configurations": [
    { "name": "ssaUser",
      "type": "STRING",
      "value": "",
      "displayName": "ssaUser",
      "required": false,
      "secret": false},
    { "name": "STANDBY_WORK_DIR",
      "type": "STRING",
      "value": "",
      "displayName": "STANDBY_WORK_DIR",
      "required": false,
      "secret": false},
    { "name": "SID_OPTION",
      "type": "STRING",
      "description": "Database SID Option to be used. values are ssauser/prefix",
      "value": "prefix",
      "displayName": "Database SID Option",
      "required": false,
      "secret": false},
    { "name": "PROFILE_VERSION",
      "type": "STRING",
      "description": "Profile version to use",
      "value": "latest",
      "displayName": "Profile version",
      "required": false,
      "secret": false},
    { "name": "DB_TARGET_DISPLAY_NAME",
      "type": "STRING",
      "value": "",
      "displayName": "DB_TARGET_DISPLAY_NAME",
      "required": false,
      "secret": false},
    { "name": "REF_TGT",
      "type": "STRING",
      "value": "xxy.example.com",
      "displayName": "REF_TGT",
      "required": false,
      "secret": false},
    { "name": "USER_PRIVILEGES",
      "type": "STRING",
      "description": "Comma Seperated List of privileges that will be applied on role assigned to the master account.",
      "value": "CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE, CREATE ANY SEQUENCE, CREATE ANY INDEX, CREATE JOB, CREATE ANY MATERIALIZED VIEW, CREATE ANY TABLE, CREATE ANY TRIGGER, CREATE ANY TYPE, CREATE ANY VIEW, CREATE ANY SYNONYM, CREATE ANY DIRECTORY, SELECT ANY DICTIONARY",
      "displayName": "User Privileges",
      "required": false,
      "secret": false},
    { "name": "COMMON_DB_SID",
      "type": "STRING",
      "description": "Database SID Prefix",
      "value": "rmanri",
      "displayName": "Database SID Prefix",
      "required": false,
      "secret": false},
    { "name": "DBAAS_SSA_STANDBY_CUSTOM_PRE_SCRIPTS_URN",
      "type": "STRING",
      "description": "Urn of the software library component which has the standby custom post sql script",
      "value": "",
      "displayName": "URN of the standby pre sql custom script",
      "required": false,
      "secret": false},
    { "name": "DBAAS_SSA_STANDBY_CUSTOM_POST_SCRIPTS_URN",
      "type": "STRING",
      "description": "Urn of the software library component which has the standby custom post sql script",
      "value": "",
      "displayName": "URN of the standby post sql custom script",
      "required": false,
      "secret": false},
    { "name": "ssaTargetName",
      "type": "STRING",
      "value": "",
      "displayName": "ssaTargetName",
      "required": false,
      "secret": false},
    { "name": "DB_USER_NAMES",
      "type": "STRING",
      "description": "Database users from source",
      "value": "",
      "displayName": "Database Users from source",
      "required": false,
      "secret": false},
    { "name": "ssaTargetType",
      "type": "STRING",
      "value": "",
      "displayName": "ssaTargetType",
      "required": false,
      "secret": false},
    { "name": "RAC_ONE_SERVICE_NAME",
      "type": "STRING",
      "description": "The name of service for RAC One Node database.",
      "value": "",
      "displayName": "RAC One Service Name",
      "required": false,
      "secret": false},
    { "name": "RUN_AS_USER",
      "type": "STRING",
      "value": "sys",
      "displayName": "RUN_AS_USER",
      "required": false,
      "secret": false},
    { "name": "NONADMIN_SSA_ACC_DB_USER_NAMES",
      "type": "STRING",
      "description": "Database users from source",
      "value": "OUTLN,ORACLE_OCM,APPQOSSYS,WMSYS,EXFSYS,CTXSYS,XDB,ORDSYS,ORDDATA,ORDPLUGINS,SI_INFORMTN_SCHEMA,MDSYS,OLAPSYS,SYSMAN,APEX_030200,FLOWS_FILES,SCOTT,OWBSYS_AUDIT,OWBSYS",
      "displayName": "Database Users from source",
      "required": false,
      "secret": false},
    { "name": "INIT_PARAMS",
      "type": "VECTOR",
      "description": "The list of initialization values that are as paramName=paramValue",
      "displayName": "INIT_PARAMS",
      "required": false,
      "secret": false,
      "values": [
        "*.db_block_size=8192",
        "*.audit_trail='db'",
        "*.db_name='mdb00008'",
        "*.cpu_count=0",
        "myracdb1.__sga_target=1275068416",
        "*.diagnostic_dest='/u01/app/emga/11.2.0.4'",
        "*.control_files='/oradbnas/mdb00008/controlfile/control01.ctl','/oradbnas//mdb00008/controlfile/control02.ctl'",
        "*.audit_file_dest='/u01/app/emga/11.2.0.4/admin/mdb00008/adump'",
        "*.pga_aggregate_target=423624704",
        "*.processes=150",
        "*.db_create_file_dest='/oradbnas/mdb00008'",
        "*.db_recovery_file_dest='/oradbnas//mdb00008'",
        "*.log_archive_format='%t_%s_%r.dbf'",
        "*.compatible='11.2.0.4.0'",
        "*.db_recovery_file_dest_size=2097152000",
        "*.open_cursors=300",
        "*.remote_login_passwordfile='exclusive'",
        "*.undo_tablespace='UNDOTBS01'",
        "*.db_domain=''"
      ]},
    { "name": "COMMON_DB_DBSNMP_PASSWORD",
      "type": "STRING",
      "description": "DBSNMP Account password",
      "value": "welcome1",
      "displayName": "DBSNMP Account password",
      "required": false,
      "secret": true},
    { "name": "DB_ADMIN_PASSWORD_SAME",
      "type": "STRING",
      "description": "Use the same passwords for SYS, SYSTEM and DBSNMP account",
      "value": "true",
      "displayName": "Use the same passwords for SYS, SYSTEM and DBSNMP account",
      "required": false,
      "secret": false},
    { "name": "DEFAULT_DATABASE_SIZE",
      "type": "STRING",
      "value": "",
      "displayName": "DEFAULT_DATABASE_SIZE",
      "required": false,
      "secret": false},
    { "name": "DBAAS_SSA_CUSTOM_PRE_SCRIPTS_URN",
      "type": "STRING",
      "description": "Urn of the software library component which has the custom post sql script",
      "value": "",
      "displayName": "URN of the pre sql custom script",
      "required": false,
      "secret": false},
    { "name": "RUN_AS_USER_PWD",
      "type": "STRING",
      "value": "",
      "displayName": "RUN_AS_USER_PWD",
      "required": false,
      "secret": false},
    { "name": "IS_RAC_ONE",
      "type": "STRING",
      "description": "Boolean value to show RAC One Target Type, (true/false)",
      "value": "N",
      "displayName": "RAC One Target Type",
      "required": false,
      "secret": false},
    { "name": "PROFILE_VERSION_URN",
      "type": "STRING",
      "description": "Profile Version Selected by user for creating database.",
      "value": "",
      "displayName": "Profile Version Selected",
      "required": false,
      "secret": false},
    { "name": "HOSTS_FOR_PLACEMENT",
      "type": "STRING",
      "description": "Comma separated value of the name of hosts which will be used for the custom placement of the requested database instance. This list of hosts should have their database homes present in the selected zone and pool of the service template.",
      "value": "",
      "displayName": "Host(s) name to be selected in the DB pool for custom placement",
      "required": false,
      "secret": false},
    { "name": "PROVISIONING_TYPE",
      "type": "STRING",
      "value": "",
      "displayName": "PROVISIONING_TYPE",
      "required": false,
      "secret": false},
    { "name": "STANDBY_REQUIRED_LOCK",
      "type": "STRING",
      "value": "",
      "displayName": "STANDBY_REQUIRED_LOCK",
      "required": false,
      "secret": false},
    { "name": "LOCK_DOMAIN_NAME",
      "type": "STRING",
      "description": "Accepts Database Domain Name from SSA user",
      "value": "false",
      "displayName": "Accepts the database Domain Name from SSA user ",
      "required": false,
      "secret": false},
    { "name": "ROLE_NAME",
      "type": "STRING",
      "description": "Name of the database role which will assigned to the master account.",
      "value": "ROLE_Sep_22_2015_11_01_AM",
      "displayName": "Database Role Name",
      "required": false,
      "secret": false},
    { "name": "STANDBY_DATABASE_MASTER",
      "type": "STRING",
      "value": "",
      "displayName": "STANDBY_DATABASE_MASTER",
      "required": false,
      "secret": false},
    { "name": "ASM_DSKGRP_PREFIX",
      "type": "STRING",
      "description": "ASM Diskgroup prefix to be used for all the new diskgroups to be created",
      "value": "",
      "displayName": "ASM Diskgroup Prefix for all new diskgroups",
      "required": false,
      "secret": false},
    { "name": "DB_USER_PASSWORDS",
      "type": "STRING",
      "description": "Passwords for Database users from source",
      "displayName": "Passwords for Database Users from source",
      "required": false,
      "secret": true},
    { "name": "ASM_OPTION",
      "type": "STRING",
      "description": "ASM Diskgroup Option to be used. values are ssauser/prefix",
      "value": "",
      "displayName": "ASM Diskgroup Option",
      "required": false,
      "secret": false},
    { "name": "SELECT_ORACLE_HOME_OPTION",
      "type": "STRING",
      "description": "Option for selecting the DB Oracle Home that includes runtime selection or user selection. Possible values are SELECT_ORACLE_HOME_AT_RUNTIME or SELECT_ORACLE_HOME_FROM_REQUEST",
      "value": "SELECT_ORACLE_HOME_AT_RUNTIME",
      "displayName": "Option for selecting the DB Oracle home",
      "required": false,
      "secret": false},
    { "name": "LISTENER_PORT",
      "type": "STRING",
      "description": "Listener Port (required only for Single Instance Database)",
      "value": "1524",
      "displayName": "Listener Port",
      "required": false,
      "secret": false},
    { "name": "STANDBY_DB_MASTER_DETAILS",
      "type": "VECTOR",
      "displayName": "STANDBY_DB_MASTER_DETAILS",
      "required": false,
      "secret": false,
      "values": []},
    { "name": "COMMON_DOMAIN_NAME",
      "type": "STRING",
      "description": "Database Domain Name",
      "value": "us.example.com",
      "displayName": "Database Domain Name",
      "required": false,
      "secret": false},
    { "name": "WORKLOADS",
      "type": "VECTOR",
      "displayName": "WORKLOADS",
      "required": false,
      "secret": false},
    { "name": "STANDBY_COMMON_DB_SID",
      "type": "STRING",
      "value": "",
      "displayName": "STANDBY_COMMON_DB_SID",
      "required": false,
      "secret": false},
    { "name": "LIVE_CLONE_DATABASE_GUID",
      "type": "STRING",
      "description": "Database Guid to be cloned",
      "value": "",
      "displayName": "Database Guid to be cloned",
      "required": false,
      "secret": false},
    { "name": "COMMON_DB_SYSTEM_PASSWORD",
      "type": "STRING",
      "description": "SYSTEM Account password",
      "value": "welcome1",
      "displayName": "SYSTEM Account password",
      "required": false,
      "secret": true},
    { "name": "USER_INITIATED_BACKUP_LOCATION",
      "type": "STRING",
      "value": "",
      "displayName": "USER_INITIATED_BACKUP_LOCATION",
      "required": false,
      "secret": false},
    { "name": "ssaRequestId",
      "type": "STRING",
      "value": "",
      "displayName": "ssaRequestId",
      "required": false,
      "secret": false},
    { "name": "TARGET_PROP_LIST",
      "type": "VECTOR",
      "description": "The list of initialization values that are as paramName=paramValue",
      "displayName": "TARGET_PROP_LIST",
      "required": false,
      "secret": false,
      "values": [
        "Site:null:false:false",
        "Contact:null:false:false",
        "Downtime Contact:null:false:false",
        "Location:null:false:false",
        "LifeCycle Status:null:false:false",
        "Department:null:false:false",
        "Comment:null:false:false",
        "Line of Business:null:false:false"
      ]},
    { "name": "LIVE_CLONE_TYPE",
      "type": "STRING",
      "description": "Live Clone Type USE_FULLCLONE/USE_SNAPCLONE",
      "value": "",
      "displayName": "Type of Live Clone",
      "required": false,
      "secret": false},
    { "name": "REF_HOST",
      "type": "STRING",
      "value": "xxy.example.com",
      "displayName": "REF_HOST",
      "required": false,
      "secret": false},
    { "name": "CUSTOM_TARGET_PROP_LIST",
      "type": "VECTOR",
      "description": "The list of initialization values that are as paramName=paramValue",
      "displayName": "CUSTOM_TARGET_PROP_LIST",
      "required": false,
      "secret": false,
      "values": []},
    { "name": "STANDBY_LISTENER_PORT",
      "type": "STRING",
      "value": "",
      "displayName": "STANDBY_LISTENER_PORT",
      "required": false,
      "secret": false},
    { "name": "CLONE_OR_FULL_DB",
      "type": "STRING",
      "value": "",
      "displayName": "CLONE_OR_FULL_DB",
      "required": false,
      "secret": false},
    { "name": "DATABASE_TYPE",
      "type": "STRING",
      "description": "Database Type (oracle_database/rac_database)",
      "value": "rac_database",
      "displayName": "Database Type",
      "required": false,
      "secret": false},
    { "name": "PROFILE_COMPONENT_URN",
      "type": "STRING",
      "description": "URN of the Profile component in software library with which the Database will be created",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:204D498A85D42C6AE053C075B10A6B09:0.1",
      "displayName": "URN of the Profile Component to be used for Database Creation",
      "required": false,
      "secret": false},
    { "name": "VALIDATION_SQL",
      "type": "STRING",
      "description": "Sql script for primary database validation",
      "value": "",
      "displayName": "Sql script for primary database validation",
      "required": false,
      "secret": false},
    { "name": "REFRESH_DATABASE",
      "type": "STRING",
      "value": "",
      "displayName": "REFRESH_DATABASE",
      "required": false,
      "secret": false},
    { "name": "REF_ZONE",
      "type": "STRING",
      "value": "Salt Lake City Zone",
      "displayName": "REF_ZONE",
      "required": false,
      "secret": false},
    { "name": "STANDBY_DELAY_DATABASE_MASTER",
      "type": "STRING",
      "value": "",
      "displayName": "STANDBY_DELAY_DATABASE_MASTER",
      "required": false,
      "secret": false},
    { "name": "zoneTargetName",
      "type": "STRING",
      "value": "",
      "displayName": "zoneTargetName",
      "required": false,
      "secret": false},
    { "name": "PRIMARY_PROTECTION_MODE",
      "type": "STRING",
      "value": "",
      "displayName": "PRIMARY_PROTECTION_MODE",
      "required": false,
      "secret": false},
    { "name": "INSTANCE_COUNT",
      "type": "STRING",
      "description": "Number of RAC Database instances required",
      "value": "2",
      "displayName": "Number of RAC instances",
      "required": false,
      "secret": false},
    { "name": "USER_PASSWORD",
      "type": "STRING",
      "description": "User Password to login to the given User Name database account",
      "displayName": "User Password",
      "required": true,
      "secret": true},
    { "name": "MAX_BACKUPS_ALLOWED",
      "type": "STRING",
      "description": "The number of backups enabled for the Database",
      "value": "",
      "displayName": "Number of Backups allowed for the Database",
      "required": false,
      "secret": false},
    { "name": "ENTITY_TYPE",
      "type": "STRING",
      "description": "Entity TYpe USE_PROFILE/USE_DATABASE",
      "value": "USE_PROFILE",
      "displayName": "Entity Type",
      "required": false,
      "secret": false},
    { "name": "DBCREATE_POST_SQL_SCRIPT",
      "type": "STRING",
      "value": "",
      "displayName": "DBCREATE_POST_SQL_SCRIPT",
      "required": false,
      "secret": false},
    { "name": "DBAAS_SSA_CUSTOM_POST_SCRIPTS_URN",
      "type": "STRING",
      "description": "Urn of the software library component which has the custom post sql script",
      "value": "",
      "displayName": "URN of the post sql custom script",
      "required": false,
      "secret": false},
    { "name": "USER_NAME",
      "type": "STRING",
      "description": "User Name (cannot be any of Oracle default accounts) used to login to the requested database",
      "value": "",
      "displayName": "User Name (cannot be any of Oracle default accounts)",
      "required": true,
      "secret": false},
    { "name": "DATABASE_SIZES",
      "type": "VECTOR",
      "displayName": "DATABASE_SIZES",
      "required": false,
      "secret": false,
      "values": []},
    { "name": "ALLOW_BACKUPS",
      "type": "STRING",
      "description": "Should the backup be enabled for the Database",
      "value": "",
      "displayName": "Enable Backups for the Database",
      "required": false,
      "secret": false},
    { "name": "zoneTargetType",
      "type": "STRING",
      "value": "",
      "displayName": "zoneTargetType",
      "required": false,
      "secret": false},
    { "name": "STANDBY_REQUIRED",
      "type": "STRING",
      "value": "false",
      "displayName": "STANDBY_REQUIRED",
      "required": false,
      "secret": false},
    { "name": "STANDBY_DB_DETAILS",
      "type": "VECTOR",
      "displayName": "STANDBY_DB_DETAILS",
      "required": false,
      "secret": false,
      "values": []},
    { "name": "COMMON_DB_SYS_PASSWORD",
      "type": "STRING",
      "description": "SYS Account password",
      "value": "welcome1",
      "displayName": "SYS Account password",
      "required": false,
      "secret": true},
    { "name": "REF_POOL",
      "type": "STRING",
      "value": "RAC Databases Pool _11_2_0_4",
      "displayName": "REF_POOL",
      "required": false,
      "secret": false}
  ],
  "canonicalLink": {"href": "https://xyz.example.com:4473/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/61"},
  "selfLink": {"href": "https://xyz.example.com:4473/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/61"},
  "active": true
}
48.3.5.3.3 Creating a Service Template for DBCA Based Database

A POST operation is issued on Service Templates collection resource to create a DBCA based Database Service Template.The configuration for POST to Service Templates is as follows:

Table 48-42 POST Request Configuration for Creating a Service Template for DBCA Based Database

Feature Description

URI

em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

{
  "name": "Create ST for SI Db using DBCA Template - ASM Subh_2",
  "description": "Creates Single Instance DB",
  "roles": [ "SSA_USER_ROLE" ],
  "serviceType": "DB",
  "serviceTemplateTypeId": "61",
  "rscProvAssocOption": [ "byRscProvInst" ],
  "resourceProvider": {
    "lookupCharacteristics": [
      {
        "characteristics": [
          {
            "name": "ORACLE.SYSMAN.SSA.ORACLE_CLOUD_ZONE",
            "values": [ "137F74D7A8359A60762ED550341A5F47" ],
            "targetType": {
              "targetType": "oracle_cloud_zone",
              "targetTypeName": "Database Pool",
              "parentTargetType": "self_service_zone",
              "parentTargetTypeName": "PaaS Infrastructure Zone"
            }
          }
        ],
        "purposeId": 1
      }
    ]
  },
  "payloads": [ { "name": "PROFILE_COMPONENT_URN", "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:269BA6C90E6A5000E053C075B10A51A3:0.1" } ],
  "configurations": [
    { "name": "REF_ZONE", "value": "Salt Lake City Zone" },
    { "name": "REF_POOL", "value": "SI Databases Pool_Oracle_DB_11g" },
        { "name": "REF_HOST", "value": "xyz.example.com" },
        { "name": "REF_TGT", "value": "xyz.example.com" },
    { "name": "DBCA_TEMPLATE:DB_STORAGE_TYPE", "value": "ASM" },
    { "name": "DBCA_TEMPLATE:REC_STORAGE_TYPE_SAME_AS_DB_FILES", "value": "Y" },
    { "name": "DBCA_TEMPLATE:FLASH_RECOVERY_AREA_SIZE", "value": "4038" },
    { "name": "DBCA_TEMPLATE:DATA_FILE_LOCATION", "value": "DATA" },
    { "name": "DBCA_TEMPLATE:REDO_FILE_LOCATION", "value": "RECO" },
    { "name": "DBCA_TEMPLATE:ARCHIVE_LOG_MODE", "value": "Y" },
    { "name": "DBCA_TEMPLATE:RECOVERY_FILE_LOCATION", "value": "RECO" },
    { "name": "DATABASE_TYPE", "value": "oracle_database" },
    { "name": "COMMON_DOMAIN_NAME", "value": "us.example.com" },
    { "name": "ORACLE.SYSMAN.SSA.PROVISIONING_TYPE", "values": [ "DBCA_TEMPLATE" ] },
    { "name": "ENTITY_TYPE", "value": "USE_PROFILE" },
    { "name": "PROFILE_COMPONENT_URN", "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:269BA6C90E6A5000E053C075B10A51A3:0.1" },
    {
      "name": "USER_PRIVILEGES",
      "value": "CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE, CREATE ANY SEQUENCE, CREATE ANY INDEX, CREATE JOB, CREATE ANY MATERIALIZED VIEW, CREATE ANY TABLE, CREATE ANY TRIGGER, CREATE ANY TYPE, CREATE ANY VIEW, CREATE ANY SYNONYM, CREATE ANY DIRECTORY, SELECT ANY DICTIONARY"
    },
    { "name": "SID_OPTION", "value": "ssauser" },
    { "name": "SELECT_ORACLE_HOME_OPTION", "value": "SELECT_ORACLE_HOME_AT_RUNTIME"},
    { "name": "COMMON_DB_SYS_PASSWORD", "value": "welcome"},
    { "name": "DB_ADMIN_PASSWORD_SAME", "value": "true" },
    { "name": "INIT_PARAMS", "values": [
        "sga_target=1073741824",
        "pga_aggregate_target=1073741824"
      ]
    },
    { "name": "LISTENER_PORT", "value": "1521" },
    { "name": "TARGET_PROP_LIST",
      "values": [
        "Site:null:false:false",
        "Contact:xxxx:false:true",
        "Downtime Contact:null:false:false",
        "Location:null:false:false",
        "LifeCycle Status:null:false:false",
        "Department:null:false:false",
        "Comment:Testing:false:true",
        "Line of Business:null:false:false"
      ]
    }
  ]
}

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
    
  • To derive the REF_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "values" (under "lookupCharacteristics"), execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate "serviceType":"DB" in the JSON response. Note the serviceTemplateTypeId under "serviceType":"DB" and use the value in the POST body shown above.

Request method

POST


Note:

In the REST API body mentioned above:
  • REF_ZONE indicates the reference zone among the zones to be associated with the template.

  • REF_POOL indicates the reference pool among the pools to be associated with the template.

  • REF_HOST indicates the host of the reference target from the pool targets.

  • REF_TGT indicates the reference target from the pool targets.

  • SELECT_ORACLE_HOME_OPTION allows the Oracle home to be automatically selected by entering the value as SELECT_ORACLE_HOME_AT_RUNTIME, or to be selected by the SSA user by entering the value as SELECT_ORACLE_HOME_FROM_REQUEST.

These parameters are mandatory and are required to identify the reference target to create the database.

A sample of the response received is shown below.

{
    "message": "Service template with ID \"1C39F32393A709C3E053C075B10AEE15\" created successfully."
}
48.3.5.3.4 Creating a Service Template for RMAN Based Single Instance Database

A POST operation is issued on Service Templates collection resource to create a RMAN based Single Instance Database Service Template.The configuration for POST to Service Templates is as follows:

Table 48-43 POST Request Configuration for Creating a Service Template for RMAN Based Single Instance Database

Feature Description

URI

em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

{
  "name": "Database Service - RMAN Based with archiving",
  "description": "This creates Database Archiving log mode.",
  "serviceType": "DB",
  "serviceTemplateTypeId": "81",
  "rscProvAssocOption": [
    "byRscProvInst"
  ],
  "resourceProvider": {
    "lookupCharacteristics": [
      {
        "characteristics": [
          {
            "name": "ORACLE.SYSMAN.SSA.ORACLE_CLOUD_ZONE",
            "values": [
              "1898CF93BD39C19BF032672271BC4B44"
            ],
            "targetType": {
              "targetType": "oracle_cloud_zone",
              "targetTypeName": "Database Pool",
              "parentTargetType": "self_service_zone",
              "parentTargetTypeName": "PaaS Infrastructure Zone"
            }
          }
        ],
        "purposeId": 1
      }
    ]
  },
  "payloads": [
    {
      "name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1C14BB2B2E127E23E053C075B10AE31F:0.1"
    }
  ],
  "configurations": [
    {
      "name": "STAGE_LOCATION",
      "value": "/scratch/emga/backups/rman/"
    },
    {
      "name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1C14BB2B2E127E23E053C075B10AE31F:0.1"
    },
    {
      "name": "SELECT_ORACLE_HOME_OPTION",
      "value": "SELECT_ORACLE_HOME_FROM_REQUEST"
    },
    {
      "name": "REF_TGT",
      "value": "sxy.us.example.com"
    },
    {
      "name": "REF_HOST",
      "value": "xyz.example.com"
    },
    {
      "name": "REF_ZONE",
      "value": "Salt Lake City Zone"
    },
    {
      "name": "zoneTargetName",
      "value": "Salt Lake City Zone"
    },
    {
      "name": "REF_POOL",
      "value": "Databases Pool"
    },
    {
      "name": "DATABASE_TYPE",
      "value": "oracle_database"
    },
    {
      "name": "COMMON_DB_SYS_PASSWORD",
      "value": "welcome"
    },
    {
      "name": "LISTENER_PORT",
      "value": "1521"
    },
    {
      "name": "PROFILE_VERSION",
      "value": "latest"
    },
    {
      "name": "COMMON_DB_SID",
      "value": "db"
    },
    {
      "name": "TARGET_PROP_LIST",
      "values": [
        "Contact:9980697299:false:false",
        "Location:null:false:false",
        "LifeCycle Status:null:false:false",
        "Department:null:false:false",
        "Comment:null:false:false",
        "Line of Business:null:false:false"
      ]
    },
    {
      "name": "USER_PRIVILEGES",
      "value": "CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE"
    },
    {
      "name": "RMAN.DB_STORAGE_TYPE",
      "value": "FS"
    },
    {
      "name": "RMAN.FRA_STORAGE_TYPE",
      "value": "FS"
    },
    {
      "name": "RMAN.FRA_SIZE",
      "value": "4038"
    },
    {
      "name": "RMAN.USE_ARCHIVING",
      "value": "YES"
    },
    {
      "name": "RMAN.DATA_FILE_LOCATION",
      "value": "/scratch/emga/app/emga/oradata"
    },
    {
      "name": "RMAN.REDO_FILE_LOCATION",
      "value": "/scratch/emga/app/emga/fast_recovery_area"
    },
    {
      "name": "RMAN.RECOVERY_FILE_LOCATION",
      "value": "/scratch/emga/app/emga/fast_recovery_area"
    },
    {
      "name": "RMAN.WORK_DIR_LOC",
      "value": "/tmp/work"
    },
    {
      "name": "RMAN.DB_ADMIN_PASSWORD_SAME",
      "value": "Y"
    },
    {
      "name": "RMAN.DATABASE_PASSWORDS",
      "value": "welcome"
    },
    {
      "name": "RMAN.BACKUP_LOCATION",
      "value": "/scratch/emga/backups/rman/"
    },
    {
      "name": "RMAN.USE_OFA",
      "value": "N"
    },
    {
      "name": "COMMON_DOMAIN_NAME",
      "value": "us.example.com"
    },
    {
      "name": "CUSTOM_PRE_CREATE_SCRIPTS_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1"
    },
    {
      "name": "CUSTOM_POST_CREATE_SCRIPTS_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1"
    }
  ]
}

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
    
  • To derive the REF_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "values" (under "lookupCharacteristics"), execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate "serviceType":"DB" in the JSON response. Note the serviceTemplateTypeId under "serviceType":"DB" and use the value in the POST body shown above.

Request method

POST


Note:

In the REST API body mentioned above:
  • REF_ZONE indicates the reference zone among the zones to be associated with the template.

  • REF_POOL indicates the reference pool among the pools to be associated with the template.

  • REF_HOST indicates the host of the reference target from the pool targets.

  • REF_TGT indicates the reference target from the pool targets.

  • SELECT_ORACLE_HOME_OPTION allows the Oracle home to be automatically selected by entering the value as SELECT_ORACLE_HOME_AT_RUNTIME, or to be selected by the SSA user by entering the value as SELECT_ORACLE_HOME_FROM_REQUEST.

These parameters are mandatory and are required to identify the reference target to create the database.

A sample of the response received is shown below.

{
    "message": "Service template with ID \"1C39F32393A709C3E053C075B10AEE15\" created successfully."
}
48.3.5.3.5 Creating a Service Template for RMAN Based Single Instance Database With Single Instance Standby

A POST operation is issued on Service Templates collection resource to create a RMAN based Single Instance Database with Single Instance standby Service Template.The configuration for POST to Service Templates is as follows:

Table 48-44 POST Request Configuration for Creating a Service Template for RMAN Based Single Instance Database With Single Instance Standby

Feature Description

URI

em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

{
  "name": "Database Service - RMAN Based with archiving with SI Standby",
  "description": "This creates Database Archiving log mode.",
  "serviceType": "DB",
  "serviceTemplateTypeId": "81",
  "rscProvAssocOption": [
    "byRscProvInst"
  ],
  "resourceProvider": {
    "lookupCharacteristics": [
      {
        "characteristics": [
          {
            "name": "ORACLE.SYSMAN.SSA.ORACLE_CLOUD_ZONE",
            "values": [
              "1898CF93BD39C19BF032672271BC4B44"
            ],
            "targetType": {
              "targetType": "oracle_cloud_zone",
              "targetTypeName": "Database Pool",
              "parentTargetType": "self_service_zone",
              "parentTargetTypeName": "PaaS Infrastructure Zone"
            }
          }
        ],
        "purposeId": 1
      }
    ]
  },
  "payloads": [
    {
      "name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1C14BB2B2E127E23E053C075B10AE31F:0.1"
    }
  ],
  "configurations": [
    {
      "name": "STAGE_LOCATION",
      "value": "/scratch/emga/backups/rman/"
    },
    {
      "name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1C14BB2B2E127E23E053C075B10AE31F:0.1"
    },
    {
      "name": "SELECT_ORACLE_HOME_OPTION",
      "value": "SELECT_ORACLE_HOME_FROM_REQUEST"
    },
    {
      "name": "REF_TGT",
      "value": "xyz.example.com"
    },
    {
      "name": "REF_HOST",
      "value": "xyz.example.com"
    },
    {
      "name": "REF_ZONE",
      "value": "Salt Lake City Zone"
    },
    {
      "name": "zoneTargetName",
      "value": "Salt Lake City Zone"
    },
    {
      "name": "REF_POOL",
      "value": "Databases Pool"
    },
    {
      "name": "DATABASE_TYPE",
      "value": "oracle_database"
    },
    {
      "name": "COMMON_DB_SYS_PASSWORD",
      "value": "welcome"
    },
    {
      "name": "LISTENER_PORT",
      "value": "1521"
    },
    {
      "name": "PROFILE_VERSION",
      "value": "latest"
    },
    {
      "name": "COMMON_DB_SID",
      "value": "db"
    },
    {
      "name": "TARGET_PROP_LIST",
      "values": [
        "Contact:9980697299:false:false",
        "Location:null:false:false",
        "LifeCycle Status:null:false:false",
        "Department:null:false:false",
        "Comment:null:false:false",
        "Line of Business:null:false:false"
      ]
    },
    {
      "name": "USER_PRIVILEGES",
      "value": "CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE"
    },
    {
      "name": "RMAN.DB_STORAGE_TYPE",
      "value": "FS"
    },
    {
      "name": "RMAN.FRA_STORAGE_TYPE",
      "value": "FS"
    },
    {
      "name": "RMAN.FRA_SIZE",
      "value": "4038"
    },
    {
      "name": "RMAN.USE_ARCHIVING",
      "value": "YES"
    },
    {
      "name": "RMAN.DATA_FILE_LOCATION",
      "value": "/scratch/emga/app/emga/oradata"
    },
    {
      "name": "RMAN.REDO_FILE_LOCATION",
      "value": "/scratch/emga/app/emga/fast_recovery_area"
    },
    {
      "name": "RMAN.RECOVERY_FILE_LOCATION",
      "value": "/scratch/emga/app/emga/fast_recovery_area"
    },
    {
      "name": "RMAN.WORK_DIR_LOC",
      "value": "/tmp/work"
    },
    {
      "name": "RMAN.DB_ADMIN_PASSWORD_SAME",
      "value": "Y"
    },
    {
      "name": "RMAN.DATABASE_PASSWORDS",
      "value": "welcome"
    },
    {
      "name": "RMAN.BACKUP_LOCATION",
      "value": "/scratch/emga/backups/rman/"
    },
    {
      "name": "RMAN.USE_OFA",
      "value": "N"
    },
    {
      "name": "COMMON_DOMAIN_NAME",
      "value": "us.example.com"
    },
    {
      "name": "STANDBY_DB_DETAILS",
      "values": [
        "pool=Near DR Pool;databaseSIDPrefix=;databaseType=oracle_database;standbyConfigName=Near DR;redoMode=ASYNC;realtimeQuery=false;databaseDelay=60;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.example.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
    
  • To derive the REF_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "values" (under "lookupCharacteristics"), execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate "serviceType":"DB" in the JSON response. Note the serviceTemplateTypeId under "serviceType":"DB" and use the value in the POST body shown above.

Request method

POST


Note:

In the REST API body mentioned above:
  • REF_ZONE indicates the reference zone among the zones to be associated with the template.

  • REF_POOL indicates the reference pool among the pools to be associated with the template.

  • REF_HOST indicates the host of the reference target from the pool targets.

  • REF_TGT indicates the reference target from the pool targets.

  • SELECT_ORACLE_HOME_OPTION allows the Oracle home to be automatically selected by entering the value as SELECT_ORACLE_HOME_AT_RUNTIME, or to be selected by the SSA user by entering the value as SELECT_ORACLE_HOME_FROM_REQUEST.

These parameters are mandatory and are required to identify the reference target to create the database.

A sample of the response received is shown below.

{
    "message": "Service template with ID \"xxxx\" created successfully."
}
48.3.5.3.6 Creating a Service Template for RMAN Based RAC One Node Database

A POST operation is issued on Service Templates collection resource to create a RMAN based RAC One Node Database Service Template.The configuration for POST to Service Templates is as follows:

Table 48-45 POST Request Configuration for Creating a Service Template for RMAN Based RAC One Node Database

Feature Description

URI

em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

{
  "name": "Create Databases on RAC One database",
  "description": "Creates Databases on RAC.",
  "serviceType": "DB",
  "serviceTemplateTypeId": "81",
  "rscProvAssocOption": [
    "byRscProvInst"
  ],
  "resourceProvider": {
    "lookupCharacteristics": [
      {
        "characteristics": [
          {
            "name": "ORACLE.SYSMAN.SSA.ORACLE_CLOUD_ZONE",
            "values": [
              "647E8750A1C3835557165B499B269FB3"
            ],
            "targetType": {
              "targetType": "oracle_cloud_zone",
              "targetTypeName": "Database Pool",
              "parentTargetType": "self_service_zone",
              "parentTargetTypeName": "PaaS Infrastructure Zone"
            }
          }
        ],
        "purposeId": 1
      }
    ]
  },
  "payloads": [
    {
      "name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1E4F60D72C912160E053C075B10A29F5:0.1"
    }
  ],
  "configurations": [
    {"name": "STAGE_LOCATION",
      "value": "/scratch/emga/backups/rman/"},
    {"name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1E4F60D72C912160E053C075B10A29F5:0.1"},
    {"name":"SELECT_ORACLE_HOME_OPTION",
     "value":"SELECT_ORACLE_HOME_FROM_REQUEST"},
    {"name": "REF_TGT",
      "value": "abc.example.com"},
    {"name": "REF_HOST",
      "value": "adc.example.com"},
    {"name": "REF_ZONE",
      "value": "Salt Lake City Zone"},
    {"name": "zoneTargetName",
      "value": "Salt Lake City Zone"},
    {"name": "REF_POOL",
      "value": "RAC Databases Pool"},
    {"name": "DATABASE_TYPE",
      "value": "rac_database"},
    {"name": "IS_RAC_ONE",
      "value": "Y"},
    {"name": "COMMON_DB_SYS_PASSWORD",
      "value": "welcome"},
    {"name": "LISTENER_PORT",
      "value": "1521"},
    {"name": "PROFILE_VERSION",
      "value": "latest"},
    {"name": "COMMON_DB_SID",
      "value": "db"},
    {"name": "TARGET_PROP_LIST",
      "values": [
        "Contact:9980697299:false:false",
        "Location:null:false:false",
        "LifeCycle Status:null:false:false",
        "Department:null:false:false",
        "Comment:null:false:false",
        "Line of Business:null:false:false"
      ]
    },
    {"name": "USER_PRIVILEGES",
      "value": "CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE"},
    {"name": "RMAN:DB_STORAGE_TYPE",
      "value": "FS"},
    {"name": "RMAN:FRA_SIZE",
      "value": "4038"},
    {"name": "RMAN:USE_ARCHIVING",
      "value": "NO"},
    {"name": "RMAN:DATA_FILE_LOCATION",
      "value": "/scratch/emga/app/emga/oradata"},
    {"name": "RMAN:WORK_DIR_LOC",
      "value": "/tmp/work"},
    {"name": "RMAN:DB_ADMIN_PASSWORD_SAME",
      "value": "Y"},
    {"name": "RMAN:DATABASE_PASSWORDS",
      "value": "welcome"},
    {"name": "RMAN:BACKUP_LOCATION",
      "value": "/oradbnas/backups/rman/"},
    {"name": "RMAN:USE_OFA",
      "value": "N"},
    {"name": "COMMON_DOMAIN_NAME",
      "value": "us.example.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
    
  • To derive the REF_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "values" (under "lookupCharacteristics"), execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate "serviceType":"DB" in the JSON response. Note the serviceTemplateTypeId under "serviceType":"DB" and use the value in the POST body shown above.

Request method

POST


A sample of the response received is shown below.

{
    "message": "Service template with ID \"xxxx\" created successfully."
}
48.3.5.3.7 Creating a Service Template for RMAN Based RAC One Node Database With Standby

A POST operation is issued on Service Templates collection resource to create a RMAN based RAC One Node Database with Standby Service Template.

In the example shown below there are two standbys created, one standby RAC one node database is a Near DR (disaster recovery) created on the same pool as the primary RAC one node database, and the other standby Far DR database is a single instance database created on a different pool. This setup is essential for a disaster recovery setup wherein two standby databases are created for data protection. The POST body shown below can be modified to have only one standby database (either SI or RAC one node) as well.

The configuration is as follows:

Table 48-46 POST Request Configuration for Creating a Service Template for RMAN Based RAC One Node Database With Standby

Feature Description

URI

em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

{
  "name": "RAC One Database Provisioning with RAC One Standby and SI Standby",
  "description": "Creates RAC One Databases with RAC One Standby and SI Standby.",
  "serviceType": "DB",
  "serviceTemplateTypeId": "81",
  "rscProvAssocOption": [
    "byRscProvInst"
  ],
  "resourceProvider": {
    "lookupCharacteristics": [
      {
        "characteristics": [
          {
            "name": "ORACLE.SYSMAN.SSA.ORACLE_CLOUD_ZONE",
            "values": [
              "647E8750A1C3835557165B499B269FB3"
            ],
            "targetType": {
              "targetType": "oracle_cloud_zone",
              "targetTypeName": "Database Pool",
              "parentTargetType": "self_service_zone",
              "parentTargetTypeName": "PaaS Infrastructure Zone"
            }
          }
        ],
        "purposeId": 1
      }
    ]
  },
  "payloads": [
    {"name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1E4F60D72C912160E053C075B10A29F5:0.1"}
  ],
  "configurations": [
    {"name": "STAGE_LOCATION",
      "value": "/scratch/emga/backups/rman/"},
    {"name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1E4F60D72C912160E053C075B10A29F5:0.1"},
    {"name":"SELECT_ORACLE_HOME_OPTION",
     "value":"SELECT_ORACLE_HOME_FROM_REQUEST"},
    {"name": "REF_TGT",
      "value": "adc.example.com"},
    {"name": "REF_HOST",
      "value": "adc.example.com"},
    {"name": "REF_ZONE",
      "value": "Salt Lake City Zone"},
    {"name": "zoneTargetName",
      "value": "Salt Lake City Zone"},
    {"name": "REF_POOL",
      "value": "RAC Databases Pool"},
    {"name": "DATABASE_TYPE",
      "value": "rac_database"},
    {"name": "IS_RAC_ONE",
      "value": "Y"},
    {"name": "COMMON_DB_SYS_PASSWORD",
      "value": "welcome"},
    {"name": "LISTENER_PORT",
      "value": "1521"},
    {"name": "PROFILE_VERSION",
      "value": "latest"},
    {"name": "COMMON_DB_SID",
      "value": "db"},
    {"name": "TARGET_PROP_LIST",
      "values": [
        "Contact:9980697299:false:false",
        "Location:null:false:false",
        "LifeCycle Status:null:false:false",
        "Department:null:false:false",
        "Comment:null:false:false",
        "Line of Business:null:false:false"
      ]
    },
    {"name": "USER_PRIVILEGES",
      "value": "CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE"},
    {"name": "RMAN:DB_STORAGE_TYPE",
      "value": "FS"},
    {"name": "RMAN:FRA_SIZE",
      "value": "4038"},
    {"name": "RMAN:USE_ARCHIVING",
      "value": "NO"},
    {"name": "RMAN:DATA_FILE_LOCATION",
      "value": "/scratch/emga/app/emga/oradata"},
    {"name": "RMAN:WORK_DIR_LOC",
      "value": "/tmp/work"},
    {"name": "RMAN:DB_ADMIN_PASSWORD_SAME",
      "value": "Y"},
    {"name": "RMAN:DATABASE_PASSWORDS",
      "value": "welcome"},
    {"name": "RMAN:BACKUP_LOCATION",
      "value": "/oradbnas/backups/rman/"},
    {"name": "RMAN:USE_OFA",
      "value": "N"},
    {"name": "COMMON_DOMAIN_NAME",
      "value": "us.example.com"},
{"name": "STANDBY_REQUIRED",
   "value": "true"},
  {"name": "STANDBY_DB_DETAILS",
   "value": "",
   "values": [
        "pool=SI Databases Zone - Oracle 11g - Standby;databaseSIDPrefix=st;databaseType=oracle_database;standbyConfigName=Near DR;redoMode=ASYNC;realtimeQuery=false;databaseDelay=60;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.example.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
    
  • To derive the REF_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "values" (under "lookupCharacteristics"), execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate "serviceType":"DB" in the JSON response. Note the serviceTemplateTypeId under "serviceType":"DB" and use the value in the POST body shown above.

Request method

POST


A sample of the response received is shown below.

{
    "message": "Service template with ID \"xxxx\" created successfully."
}
48.3.5.3.8 Creating a Service Template for RMAN Based RAC Database With Standby

A POST operation is issued on Service Templates collection resource to create a RMAN based RAC Database with Standby Service Template.

The configuration to create a RAC database with single instance standby database is similar to the configuration for a RAC database with a RAC one node standby. The only difference in the payloads to create different standbys is defined by the configuration parameter STANDBY_DB_DETAILS.

The sample value for the STANDBY_DB_DETAILS parameter for creating a RAC database with RAC one node standby is:

"pool=Near RAC DR Pool;databaseSIDPrefix=;databaseType=rac_database;isRACOne=Y;standbyConfigName=Near DR;redoMode=ASYNC;realtimeQuery=false;databaseDelay=60;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.example.com

Whereas, the sample value for the STANDBY_DB_DETAILS parameter for creating a RAC database with single instance standby is:

"pool=Near DR Pool;databaseSIDPrefix=;databaseType=oracle_database;standbyConfigName=Near DR;redoMode=ASYNC;realtimeQuery=false;databaseDelay=60;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.example.com"

The sample POST configuration shown below is for a RAC database with single instance standby Service Template. Apply the required value for the STANDBY_DB_DETAILS parameter in the sample shown below:

Table 48-47 POST Request Configuration for Creating a Service Template for RMAN Based RAC Database With Single Instance Standby

Feature Description

URI

em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

{
  "name" : "Create Databases on RAC with SI  Standby",
  "description" : "Creates Databases on RAC.",
  "serviceType" : "DB",
  "serviceTemplateTypeId" : "81",
  "rscProvAssocOption" : [ "byRscProvInst" ],
  "resourceProvider" : {
    "lookupCharacteristics" : [ {
      "characteristics" : [ {
        "name" : "ORACLE.SYSMAN.SSA.ORACLE_CLOUD_ZONE",
        "values" : [ "647E8750A1C3835557165B499B269FB3" ],
        "targetType" : {
          "targetType" : "oracle_cloud_zone",
          "targetTypeName" : "Database Pool",
          "parentTargetType" : "self_service_zone",
          "parentTargetTypeName" : "PaaS Infrastructure Zone"
        }
      } ],
      "purposeId" : 1
    } ]
  },
  "payloads" : [ {
    "name" : "PROFILE_COMPONENT_URN",
    "value" : "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1E4F60D72C912160E053C075B10A29F5:0.1"
  } ],
  "configurations" : [ {
    "name" : "STAGE_LOCATION",
    "value" : "/scratch/emga/backups/rman/"},
    {"name" : "PROFILE_COMPONENT_URN",
    "value" : "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1E4F60D72C912160E053C075B10A29F5:0.1"}
    {"name":"SELECT_ORACLE_HOME_OPTION",
     "value":"SELECT_ORACLE_HOME_FROM_REQUEST"},
    {"name" : "REF_TGT",
    "value" : "adc.us.example.com"},
    {"name" : "REF_HOST",
    "value" : "adc.us.example.com"},
    {"name" : "REF_ZONE",
    "value" : "Salt Lake City Zone"},
    {"name" : "zoneTargetName",
    "value" : "Salt Lake City Zone"},
    {"name" : "REF_POOL",
    "value" : "RAC Databases Pool"},
    {"name" : "DATABASE_TYPE",
    "value" : "oracle_database"},
    {"name" : "COMMON_DB_SYS_PASSWORD",
    "value" : "welcome"},
    {"name" : "LISTENER_PORT",
    "value" : "1521"},
    {"name" : "PROFILE_VERSION",
    "value" : "latest"},
    {"name" : "COMMON_DB_SID",
    "value" : "db"},
    {"name" : "TARGET_PROP_LIST",
    "values" : [ "Contact:9980697299:false:false", "Location:null:false:false", "LifeCycle Status:null:false:false", "Department:null:false:false", "Comment:null:false:false", "Line of Business:null:false:false" ]},
    {"name" : "USER_PRIVILEGES",
    "value" : "CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE"},
    {"name" : "RMAN:DB_STORAGE_TYPE",
    "value" : "FS"},
    {"name" : "RMAN:FRA_SIZE",
    "value" : "4038"},
    {"name" : "RMAN:USE_ARCHIVING",
    "value" : "NO"},
    {"name" : "RMAN:DATA_FILE_LOCATION",
    "value" : "/scratch/emga/app/emga/oradata"},
    {"name" : "RMAN:WORK_DIR_LOC",
    "value" : "/tmp/work"},
    {"name" : "RMAN:DB_ADMIN_PASSWORD_SAME",
    "value" : "Y"},
    {"name" : "RMAN:DATABASE_PASSWORDS",
    "value" : "welcome"},
    {"name" : "RMAN:BACKUP_LOCATION",
    "value" : "/oradbnas/backups/rman/"},
    {"name" : "RMAN:USE_OFA",
    "value" : "N"},
    {"name" : "COMMON_DOMAIN_NAME",
    "value" : "us.example.com"},
    {"name":"CUSTOM_PRE_CREATE_SCRIPTS_URN",
    "value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1"},,
    {"name":"CUSTOM_POST_CREATE_SCRIPTS_URN",
    "value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1"},,
   {"name": "STANDBY_REQUIRED",
    "value": "true"},
   {"name": "STANDBY_DB_DETAILS",
    "value": "",
    "values": [
        "pool=SI Databases Zone - Oracle 11g - Standby;databaseSIDPrefix=st;databaseType=oracle_database;standbyConfigName=Near DR;redoMode=ASYNC;realtimeQuery=false;databaseDelay=60;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.example.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
    
  • To derive the REF_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "values" (under "lookupCharacteristics"), execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate "serviceType":"DB" in the JSON response. Note the serviceTemplateTypeId under "serviceType":"DB" and use the value in the POST body shown above.

Request method

POST


A sample of the response received is shown below.

{
    "message": "Service template with ID \"xxxx\" created successfully."
}
48.3.5.3.9 Creating a Service Template for RAC Database with Standby Using a DBCA Template

A POST operation is issued on ServiceTemplates Collection resource to create a ServiceTemplate for a RAC database with standby using a DBCA template.The configuration for POST to ServiceTemplates is as follows:

Table 48-48 POST Request Configuration for Creating a Service Template for RAC Database with Standby Using a DBCA Template

Feature Description

URI

em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

{
  "name": "Create RAC Db with Standby using DBCA Template - BofA -ASM",
  "description": "Service Template for Non-CDB; 12cR1_2(12.1.0.2); RAC; ASM",
  "serviceType": "DB",
  "serviceTemplateTypeId": "61",
  "rscProvAssocOption": [
    "byRscProvInst"
  ],
  "roles": [
    "SSAUSERROLE"
  ],
  "resourceProvider": {
    "lookupCharacteristics": [
      {
        "characteristics": [
          {
            "name": "ORACLE.SYSMAN.SSA.ORACLE_CLOUD_ZONE",
            "values": [
              "4C5795E605D71F59BAF9F6AD702E25E1"
            ],
            "targetType": {
              "targetType": "oracle_cloud_zone",
              "targetTypeName": "Database Pool",
              "parentTargetType": "self_service_zone",
              "parentTargetTypeName": "PaaS Infrastructure Zone"
            }
          }
        ],
        "purposeId": 1
      }
    ]
  },
  "payloads": [
    {
      "name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:246E84D11ED13BD0E050F90AE5852BC8:0.1"
    }
  ],
  "configurations": [
    {
      "name": "REF_ZONE",
      "value": "Clusters Zone - Oracle DB 12c"
    },
    {
      "name": "REF_HOST",
      "value": "xyz.example.com"
    },
    {
      "name": "REF_POOL",
      "value": "RAC Databases Pool_Oracle_DB_12c"
    },
    {
      "name": "DBCA_TEMPLATE:DB_STORAGE_TYPE",
      "value": "ASM"
    },
    {
      "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": "4038"
    },
    {
      "name": "DBCA_TEMPLATE:DATA_FILE_LOCATION",
      "value": "DATA"
    },
    {
      "name": "DBCA_TEMPLATE:REDO_FILE_LOCATION",
      "value": "DATA1"
    },
    {
      "name": "DBCA_TEMPLATE:RECOVERY_FILE_LOCATION",
      "value": "DATA1"
    },
    {
      "name": "DATABASE_TYPE",
      "value": "rac_database"
    },
    {
      "name": "INSTANCE_COUNT",
      "value": "2"
    },
    {
      "name": "COMMON_DOMAIN_NAME",
      "value": "us.example.com"
    },
    {
      "name": "ORACLE.SYSMAN.SSA.PROVISIONING_TYPE",
      "values": [
        "DBCA_TEMPLATE"
      ]
    },
    {
      "name": "ENTITY_TYPE",
      "value": "USE_PROFILE"
    },
    {
      "name": "REF_TGT",
      "value": "xyz.example.com"
    },
    {
      "name": "SID_OPTION",
      "value": "prefix"
    },
    {
      "name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:246E84D11ED13BD0E050F90AE5852BC8:0.1"
    },
    {
      "name": "PROFILE_VERSION",
      "value": "latest"
    },
    {
      "name": "USER_PRIVILEGES",
      "value": "CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE, CREATE ANY SEQUENCE, CREATE ANY INDEX, CREATE JOB, CREATE ANY MATERIALIZED VIEW, CREATE ANY TABLE, CREATE ANY TRIGGER, CREATE ANY TYPE, CREATE ANY VIEW, CREATE ANY SYNONYM, CREATE ANY DIRECTORY, SELECT ANY DICTIONARY"
    },
    {
      "name": "COMMON_DB_SID",
      "value": "RFTDB"
    },
    {
      "name": "INIT_PARAMS",
      "subconfigurations": [
        "sga_target=1073741824",
        "pga_aggregate_target=1073741824"
      ]
    },
    {
      "name": "SELECT_ORACLE_HOME_OPTION",
      "value": "SELECT_ORACLE_HOME_AT_RUNTIME"
    },
    {
      "name": "COMMON_DB_SYS_PASSWORD",
      "value": "welcome1"
    },
    {
      "name": "DB_ADMIN_PASSWORD_SAME",
      "value": "true"
    },
    {
      "name": "LISTENER_PORT",
      "value": "1521"
    },
    {
      "name": "STANDBY_REQUIRED",
      "value": "true"
    },
    {
      "name": "STANDBY_DB_DETAILS",
      "value": "",
      "values": [
        "pool=SI Databases Zone - Oracle 11g - Standby;databaseSIDPrefix=st;databaseType=oracle_database;standbyConfigName=Near DR;redoMode=ASYNC;realtimeQuery=false;databaseDelay=60;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.example.com"
      ]
    },
    {
      "name": "DATABASE_SIZES",
      "values": [
        "Big",
        "Small"
      ]
    },
    {
      "name": "DEFAULT_DATABASE_SIZE",
      "value": "Big"
    }
  ]
}

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
    
  • To derive the REF_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "values" (under "lookupCharacteristics"), execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate "serviceType":"DB" in the JSON response. Note the serviceTemplateTypeId under "serviceType":"DB" and use the value in the POST body shown above.

Request method

POST


A sample of the response received is shown below.

{
  "message": "Service template with ID \"xxxxx\" created successfully."
}
48.3.5.3.10 Creating a Service Template for DNFS Based Database

A POST operation is issued on Service Templates collection resource to create a DNFS based database Service Template.

The sample POST configuration is shown below:

Table 48-49 POST Request Configuration for Creating a Service Template for DNFS Based Database

Feature Description

URI

em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

{
  "name" : "DB Clones",
  "description" : "This clones a database based on NFS.",
  "serviceType" : "DB",
  "serviceTemplateTypeId" : "81",
  "rscProvAssocOption" : [ "byRscProvInst" ],
  "resourceProvider" : {
    "lookupCharacteristics" : [ {
      "characteristics" : [ {
        "name" : "ORACLE.SYSMAN.SSA.ORACLE_CLOUD_ZONE",
        "values" : [ "1898CF93BD39C19BF032672271BC4B44" ],
        "targetType" : {
          "targetType" : "oracle_cloud_zone",
          "targetTypeName" : "Database Pool",
          "parentTargetType" : "self_service_zone",
          "parentTargetTypeName" : "PaaS Infrastructure Zone"
        }
      } ],
      "purposeId" : 1
    } ]
  },
  "payloads" : [ {
    "name" : "PROFILE_COMPONENT_URN",
    "value" : "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1C14BB2B2E127E23E053C075B10AE31F:0.1"
  } ],
  "configurations" : [ {
    "name" : "STAGE_LOCATION",
    "value" : "/scratch/emga/backups/rman/"}
    {"name" : "PROFILE_COMPONENT_URN",
    "value" : "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1C14BB2B2E127E23E053C075B10AE31F:0.1"}
    {"name":"SELECT_ORACLE_HOME_OPTION",
     "value":"SELECT_ORACLE_HOME_FROM_REQUEST"},
    {"name" : "REF_TGT",
    "value" : "abc.example.com"}
    {"name" : "REF_HOST",
    "value" : "abc.example.com"}
    {"name" : "REF_ZONE",
    "value" : "Salt Lake City Zone"}
    {"name" : "zoneTargetName",
    "value" : "Salt Lake City Zone"}
    {"name" : "REF_POOL",
    "value" : "Databases Pool"}
    {"name" : "DATABASE_TYPE",
    "value" : "oracle_database"}
    {"name" : "COMMON_DB_SYS_PASSWORD",
    "value" : "welcome"}
    {"name" : "LISTENER_PORT",
    "value" : "1521"}
    {"name" : "PROFILE_VERSION",
    "value" : "latest"}
    {"name" : "COMMON_DB_SID",
    "value" : "db"}
    {"name" : "TARGET_PROP_LIST",
    "values" : [ "Contact:9980697299:false:false", "Location:null:false:false", "LifeCycle Status:null:false:false", "Department:null:false:false", "Comment:null:false:false", "Line of Business:null:false:false" ]}
    {"name" : "USER_PRIVILEGES",
    "value" : "CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE"}
    {"name" : "DNFS.DATA_FILE_LOCATION",
    "value" : "/scratch/emga/app/emga/oradata"}
    {"name" : "DNFS.REDO_FILE_LOCATION",
    "value" : "/scratch/emga/app/emga/fast_recovery_area"}
    {"name" : "DNFS.RECOVERY_FILE_LOCATION",
    "value" : "/scratch/emga/app/emga/fast_recovery_area"}
    {"name" : "DNFS.FRA_SIZE",
    "value" : "4038"}
    {"name" : "DNFS.USE_ARCHIVING",
    "value" : "YES"}
    {"name" : "DNFS.WORK_DIR_LOC",
    "value" : "/tmp/work"}
    {"name" : "DNFS.DB_ADMIN_PASSWORD_SAME",
    "value" : "Y"}
    {"name" : "DNFS.BACKUP_LOCATION",
    "value" : "/scratch/emga/backups/rman_image/"}
    {"name" : "DNFS.USE_OFA",
    "value" : "N"}
    {"name" : "COMMON_DOMAIN_NAME",
    "value" : "us.example.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
    
  • To derive the REF_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "values" (under "lookupCharacteristics"), execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate "serviceType":"DB" in the JSON response. Note the serviceTemplateTypeId under "serviceType":"DB" and use the value in the POST body shown above.

Request method

POST


A sample of the response received is shown below.

{
    "message": "Service template with ID \"xxxx\" created successfully."
}
48.3.5.3.11 Creating a Service Template for Snap Clone Single Instance Database (with Archiving Enabled)

A POST operation is issued on Service Templates collection resource to create a Snap Clone single instance database (with archiving enabled) Service Template.

The sample POST configuration is shown below:

Table 48-50 POST Request Configuration for Creating a Service Template for Snap Clone Single Instance Database (with Archiving Enabled)

Feature Description

URI

em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

{
  "name" : "Create Snap Database using Snapshots",
  "description" : "Creates Databases on SI hosts.",
  "serviceType" : "DB",
  "serviceTemplateTypeId" : "81",
  "rscProvAssocOption" : [ "byRscProvInst" ],
  "resourceProvider" : {
    "lookupCharacteristics" : [ {
      "characteristics" : [ {
        "name" : "ORACLE.SYSMAN.SSA.ORACLE_CLOUD_ZONE",
        "values" : [ "503073C7912B1C65B66E240C433012A9" ],
        "targetType" : {
          "targetType" : "oracle_cloud_zone",
          "targetTypeName" : "Database Pool",
          "parentTargetType" : "self_service_zone",
          "parentTargetTypeName" : "PaaS Infrastructure Zone"
        }
      } ],
      "purposeId" : 1
    } ]
  },
  "payloads" : [ {
    "name" : "PROFILE_COMPONENT_URN",
    "value" : "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:247BF4B378FF253FE053C075B10A794A:0.1"
  } ],
  "configurations" : [ {
    "name" : "STAGE_LOCATION",
    "value" : "/scratch/emga/backups/rman/"
  }, {
    "name" : "PROFILE_COMPONENT_URN",
    "value" : "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:247BF4B378FF253FE053C075B10A794A:0.1"
  }, {
    "name" : "REF_TGT",
    "value" : "xyz.example.com"
  }, {
    "name" : "REF_HOST",
    "value" : "xyz.example.com"
  }, {
    "name" : "REF_ZONE",
    "value" : "Single Instances Zone"
  }, {
    "name" : "zoneTargetName",
    "value" : "Single Instances Zone"
  }, {
    "name" : "REF_POOL",
    "value" : "SI Databases Pool - Version 11_2_0_4"
  }, {
    "name" : "DATABASE_TYPE",
    "value" : "oracle_database"
  }, {
    "name" : "COMMON_DB_SYS_PASSWORD",
    "value" : "welcome"
  }, {
    "name" : "LISTENER_PORT",
    "value" : "1521"
  }, {
    "name" : "PROFILE_VERSION",
    "value" : "latest"
  }, {
    "name" : "COMMON_DB_SID",
    "value" : "db"
  }, {
    "name" : "TARGET_PROP_LIST",
    "values" : [ "Contact:9980697299:false:false", "Location:null:false:false", "LifeCycle Status:null:false:false", "Department:null:false:false", "Comment:null:false:false", "Line of Business:null:false:false" ]
  }, {
    "name" : "USER_PRIVILEGES",
    "value" : "CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE"
  }, {
    "name" : "THIN_PROVISIONING:LISTENER_PORT",
    "value" : "1522"
  }, {
    "name" : "THIN_PROVISIONING:REDO_LOG_GROUP_COUNT",
    "value" : "2"
  }, {
    "name" : "THIN_PROVISIONING:TEMP_TABLESPACE_SIZE",
    "value" : "520"
  }, {
    "name" : "THIN_PROVISIONING:USE_ARCHIVING",
    "value" : "YES"
  }, {
    "name" : "THIN_PROVISIONING:MOUNT_POINT_LIST",
    "values" : [ "/hkdb" ]
  }, {
    "name" : "THIN_PROVISIONING:MOUNT_ADDL_SIZE_LIST",
    "values" : [ "5.0" ]
  }, {
    "name" : "THIN_PROVISIONING:REDO_LOG_FILE_TYPE",
    "value" : "Same as source"
  }, {
    "name" : "INIT_PARAMS",
    "values" : [ "sga_target=1073741824", "pga_aggregate_target=1073741824" ]
  }, {
    "name" : "COMMON_DOMAIN_NAME",
    "value" : "us.example.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
    
  • To derive the REF_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "values" (under "lookupCharacteristics"), execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate "serviceType":"DB" in the JSON response. Note the serviceTemplateTypeId under "serviceType":"DB" and use the value in the POST body shown above.

Request method

POST


A sample of the response received is shown below.

{
    "message": "Service template with ID \"xxxx\" created successfully."
}
48.3.5.3.12 Creating a Service Template for Snap Clone Single Instance Database (without Archiving Enabled)

A POST operation is issued on Service Templates collection resource to create a Snap Clone single instance database (without archiving enabled) Service Template.

All the configuration values for the REST API for Snap Clone without archiving would remain the same as in the REST API for Snap Clone with archiving, except for the THIN_PROVISIONING:USE_ARCHIVING parameter. Ensure that the configuration value for "name" : "THIN_PROVISIONING:USE_ARCHIVING" in the body is set to "value" : "No" in the Table 48-50, "POST Request Configuration for Creating a Service Template for Snap Clone Single Instance Database (with Archiving Enabled)" for creating a Snap Clone single instance database (without Archiving enabled) Service template.

48.3.5.3.13 Creating a Service Template for a Schema

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:

Table 48-51 POST Request Configuration for Creating a Service Template for a Schema

Feature Description

URI

/em/websvcs/restful/extws/cloudservices/admin/cfw/v1/servicetemplates

Request 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.example.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

Request method

POST


A sample of the response received 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"
}
48.3.5.3.14 Creating a Service Template for a Pluggable Database

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

Table 48-52 POST Request Configuration for Creating a Service Template for a Pluggable Database

Feature Description

URI

/em/websvcs/restful/extws/ cloudservices/admin/cfw/v1/servicetemplates

Request 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":"SELECT_TARGET_OPTION", "value":"SELECT_TARGET_FROM_REQUEST" },
         {  "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
    
  • To derive the REF_DATA_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "poolIds", execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate "serviceType":"DB" in the JSON response. Note the serviceTemplateTypeId under "serviceType":"DB" and use the value in the POST body shown above.

Request method

POST


Note:

In the table above, the SELECT_TARGET_OPTION parameter defines if the SSA User has the option to select the Container Database (CDB) while requesting for a PDB. If the value for the parameter is set as SELECT_TARGET_FROM_REQUEST, then the SSA User has the option to choose the CDB. If no value is defined, or if the value is set to SELECT_TARGET_AT_RUNTIME, then the placement algorithm selects the CDB.

A sample of the response received 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"
}
48.3.5.3.15 Creating a Service Template for RAC Pluggable Database Using an Empty Pluggable Database

A POST operation is issued on ServiceTemplates Collection resource to create a ServiceTemplate for a RAC Pluggable database using an empty Pluggable database.The configuration for POST to ServiceTemplates is as follows:

Table 48-53 POST Request Configuration for Creating a Service Template for RAC Pluggable Database Using an Empty Pluggable Database

Feature Description

URI

em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

{
  "name": "Create RAC PDBs using empty PDB option",
  "description": "Creates PDBs on cluster.",
  "serviceType": "PDB",
  "serviceTemplateTypeId": "94",
  "rscProvAssocOption": [
    "byRscProvInst"
  ],
  "roles": [
    "SSA_USER_ROLE"
  ],
  "resourceProvider": {
    "lookupCharacteristics": [
      {
        "characteristics": [
          {
            "name": "ORACLE.SYSMAN.SSA.PDBAAS_POOL",
            "values": [
              "DFB8F2A53429AF99EF2020C56E11FEE9"
            ],
            "targetType": {
              "targetType": "pdbaas_pool",
              "targetTypeName": "Pluggable Database Pool",
              "parentTargetType": "self_service_zone",
              "parentTargetTypeName": "PaaS Infrastructure Zone"
            }
          }
        ],
        "purposeId": 1
      }
    ]
  },
  "payloads": [
    {
      "name": "DBDELETE_PRESCRIPT",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:246A484D511C1CFFE053C075B10AEF2D:0.1"
    },
    {
      "name": "DBDELETE_POSTSCRIPT",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:246A484D51201CFFE053C075B10AEF2D:0.1"
    }
  ],
  "characteristics": [
    {
      "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_DEPARTMENT",
      "displayName": "Department",
      "value": "Development",
      "required": true,
      "editable": false,
      "visible": true
    },
    {
      "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_LOCATION",
      "displayName": "Location",
      "values": "Bangalore",
      "required": false,
      "editable": true,
      "visible": true
    }
  ],
  "configurations": [
    {
      "name": "REF_DATA_ZONE",
      "value": "Single Instances Zone"
    },
    {
{
"name":SELECT_TARGET_OPTION"
"value":SELECT_TARGET_FROM_REQUEST"
},
      "name": "CUSTOM_ROLE_NAME",
      "value": "PDBAAS_NOV_13_2015_16_51_PM"
    },
    {
      "name": "TARGET_PROP_LIST",
      "values": [
        "Site:null:false:false",
        "Contact:null:false:false",
        "Downtime Contact:null:false:false",
        "Location:null:false:false",
        "LifeCycle Status:null:false:false",
        "Department:Development:true:true",
        "Comment:This is for testing:false:false",
        "Line of Business:null:false:false"
      ]
    },
    {
      "name": "PDBAAS_CUSTOM_PRE_SCRIPTS_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:2469CA4C8C7B4E34E053C075B10A74AD:0.2"
    },
    {
      "name": "WORKLOADS",
      "subvalues": [
        {
          "name": "Small",
          "subvalues": [
            {
              "name": "name",
              "value": "SmallPdb"
            },
            {
              "name": "description",
              "value": "small workload"
            },
            {
              "name": "default",
              "value": "N"
            },
            {
              "name": "CPU",
              "value": "2"
            },
            {
              "name": "Memory",
              "value": "2"
            },
            {
              "name": "Storage",
              "value": "5"
            },
            {
              "name": "Sessions",
              "value": "100"
            }
          ]
        }
      ]
    },
    {
      "name": "PRIVILEGES",
      "type": "VECTOR",
      "description": "List of privileges of custom new role that will be applied on pluggable database administrator.",
      "displayName": "PRIVILEGES",
      "required": false,
      "secret": false,
      "values": [
        "CREATE SESSION",
        "ALTER SESSION",
        "CREATE DIMENSION",
        "CREATE INDEXTYPE",
        "CREATE ANY OPERATOR",
        "CREATE ANY PROCEDURE",
        "CREATE ANY SEQUENCE",
        "CREATE ANY INDEX",
        "CREATE JOB",
        "CREATE ANY MATERIALIZED VIEW",
        "CREATE ANY TABLE",
        "CREATE ANY TRIGGER",
        "CREATE ANY TYPE",
        "CREATE ANY VIEW",
        "CREATE ANY SYNONYM",
        "CREATE ANY DIRECTORY",
        "SELECT ANY DICTIONARY",
        "SELECT ANY TABLE"
      ]
    },
    {
      "name": "REF_DATA_TARGET_TYPE",
      "value": "rac_database"
    },
        {
      "name": "REF_DATA_ZONE",
          "value": "Clusters Zone - Oracle DB 12c"
          },
    {
      "name": "REF_DATA_HOST",
      "value": "xyz.example.com"
    },
        {
      "name": "REF_DATA_TARGET",
      "value": "cdbfs"
    },
        {
      "name": "REF_DATA_POOL",
      "value": "RAC Pluggable DBs"
    },
    {
      "name": "PDBAAS_CUSTOM_POST_SCRIPTS_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:2469CA4C8C7F4E34E053C075B10A74AD:0.2"
    },
    {
      "name": "SELECT_TARGET_OPTION",
      "value": "SELECT_TARGET_AT_RUNTIME"
    },
    {
      "name": "MAX_TABLESPACE_ALLOWED",
      "value": "1"
    },
    
    
    {
      "name": "ROLE_OPTION",
      "value": "CUSTOM_NEW_ROLE"
    },
    {
      "name": "CREATE_PDB_OPTION",
      "value": "EMPTY_PDB"
    },{
      "name": "INIT_PARAMS",
    "values": [
        "*.cursor_sharing=EXACT",
        "*.open_cursors=300"
      ]
}
 
  ]
}

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
    
  • To derive the REF_DATA_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "poolIds", execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate "serviceType":"DB" in the JSON response. Note the serviceTemplateTypeId under "serviceType":"DB" and use the value in the POST body shown above.

Request method

POST


Note:

In the table above, the SELECT_TARGET_OPTION parameter defines if the SSA User has the option to select the Container Database (CDB) while requesting for a PDB. If the value for the parameter is set as SELECT_TARGET_FROM_REQUEST, then the SSA User has the option to choose the CDB. If no value is defined, or if the value is set to SELECT_TARGET_AT_RUNTIME, then the placement algorithm selects the CDB.

A sample of the response received is shown below.

{
  "message": "Service template with ID \"xxxxx\" created successfully."
}
48.3.5.3.16 Creating a Service Template for RAC Pluggable Database Using a Profile Pluggable Database

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

Table 48-54 POST Request Configuration for Creating a Service Template for RAC Pluggable Database Using a Profile Pluggable Database

Feature Description

URI

em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/json

Body

{
  "name": "Create RAC PDBs using Profile PDB option",
  "description": "Creates PDBs on cluster.",
  "serviceType": "PDB",
  "serviceTemplateTypeId": "94",
  "rscProvAssocOption": [
    "byRscProvInst"
  ],
  "roles": [
    "SSA_USER_ROLE"
  ],
  "resourceProvider": {
    "lookupCharacteristics": [
      {
        "characteristics": [
          {
            "name": "ORACLE.SYSMAN.SSA.PDBAAS_POOL",
            "values": [
              "DFB8F2A53429AF99EF2020C56E11FEE9"
            ],
            "targetType": {
              "targetType": "pdbaas_pool",
              "targetTypeName": "Pluggable Database Pool",
              "parentTargetType": "self_service_zone",
              "parentTargetTypeName": "PaaS Infrastructure Zone"
            }
          }
        ],
        "purposeId": 1
      }
    ]
  },
  "payloads": [
    {
      "name": "DBDELETE_PRESCRIPT",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:246A484D511C1CFFE053C075B10AEF2D:0.1"
    },
    {
      "name": "DBDELETE_POSTSCRIPT",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:246A484D51201CFFE053C075B10AEF2D:0.1"
    }
  ],
  "characteristics": [
    {
      "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_CONTACT",
      "displayName": "Contact",
      "values": [],
      "required": false,
      "editable": true,
      "visible": true
    },
    {
      "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_COST_CENTER",
      "displayName": "Cost Center",
      "values": [],
      "required": false,
      "editable": true,
      "visible": true
    },
    {
      "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_DEPARTMENT",
      "displayName": "Department",
      "values": [],
      "required": false,
      "editable": true,
      "visible": true
    },
    {
      "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_DOWNTIME_CONTACT",
      "displayName": "Downtime Contact",
      "values": [],
      "required": false,
      "editable": true,
      "visible": true
    },
    {
      "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_LIFECYCLE_STATUS",
      "displayName": "Lifecycle Status",
      "values": [
        "Development",
        "MissionCritical",
        "Production",
        "Stage",
        "Test"
      ],
      "required": false,
      "editable": true,
      "visible": true
    },
    {
      "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_LINE_OF_BUS",
      "displayName": "Line of Business",
      "values": [],
      "required": false,
      "editable": true,
      "visible": true
    },
    {
      "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_LOCATION",
      "displayName": "Location",
      "values": [],
      "required": false,
      "editable": true,
      "visible": true
    }
  ],
  "configurations": [
    {
      "name": "REF_DATA_ZONE",
      "value": "Single Instances Zone"
    },
{
"name":SELECT_TARGET_OPTION"
"value":SELECT_TARGET_FROM_REQUEST"
},
    {
      "name": "TARGET_PROP_LIST",
      "values": [
        "Site:null:false:false",
        "Contact:null:false:false",
        "Downtime Contact:null:false:false",
        "Location:null:false:false",
        "LifeCycle Status:null:false:false",
        "Department:Development:true:true",
        "Comment:This is for testing:false:false",
        "Line of Business:null:false:false"
      ]
    },
    {
      "name": "PDBAAS_CUSTOM_PRE_SCRIPTS_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:2469CA4C8C7B4E34E053C075B10A74AD:0.2"
    },
    {
      "name": "WORKLOADS",
      "subvalues": [
        {
          "name": "Small",
          "subvalues": [
            {
              "name": "name",
              "value": "SmallPdb"
            },
            {
              "name": "description",
              "value": "small workload"
            },
            {
              "name": "default",
              "value": "N"
            },
            {
              "name": "CPU",
              "value": "2"
            },
            {
              "name": "Memory",
              "value": "2"
            },
            {
              "name": "Storage",
              "value": "5"
            },
            {
              "name": "Sessions",
              "value": "100"
            }
          ]
        }
      ]
    },
    {
      "name": "ROLE_OPTION",
      "value": "CUSTOM_NEW_ROLE"
    },
    {
      "name": "CUSTOM_ROLE_NAME",
      "value": "PDBAAS_NOV_13_2015_16_51_PM"
    },
    {
      "name": "CUSTOM_ROLE_DESC",
      "value": "New db role to be assigned to pluggable database administrator."
    },
    {
      "name": "PRIVILEGES",
      "values": [
        "CREATE SESSION",
        "ALTER SESSION",
        "CREATE DIMENSION",
        "CREATE INDEXTYPE",
        "CREATE ANY OPERATOR",
        "CREATE ANY PROCEDURE",
        "CREATE ANY SEQUENCE",
        "CREATE ANY INDEX",
        "CREATE JOB",
        "CREATE ANY MATERIALIZED VIEW",
        "CREATE ANY TABLE",
        "CREATE ANY TRIGGER",
        "CREATE ANY TYPE",
        "CREATE ANY VIEW",
        "CREATE ANY SYNONYM",
        "CREATE ANY DIRECTORY",
        "SELECT ANY DICTIONARY",
        "SELECT ANY TABLE"
      ]
    },
    {
      "name": "REF_DATA_TARGET_TYPE",
      "value": "rac_database"
    },
    {
      "name": "REF_DATA_ZONE",
      "value": "Clusters Zone - Oracle DB 12c"
    },
    {
      "name": "REF_DATA_HOST",
      "value": "xyz.example.com"
    },
    {
      "name": "REF_DATA_TARGET",
      "value": "cdbfs"
    },
    {
      "name": "REF_DATA_POOL",
      "value": "RAC Pluggable DBs"
    },
    {
      "name": "PDBAAS_CUSTOM_POST_SCRIPTS_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:2469CA4C8C7F4E34E053C075B10A74AD:0.2"
    },
    {
      "name": "SELECT_TARGET_OPTION",
      "value": "SELECT_TARGET_AT_RUNTIME"
    },
    {
      "name": "MAX_TABLESPACE_ALLOWED",
      "value": "1"
    },
    {
      "name": "CREATE_PDB_OPTION",
      "value": "PDB_FROM_PROFILE"
    },
    {
      "name": "PROFILE_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:246C1E85296C29A1E053C075B10A7DFA:0.1"
    },
    {
      "name": "SHARED_STAGE_LOCATION",
      "value": "/u04/app/hhkaur/product/12.1.0/dbhome_2/rdbms/xml/schema"
    },
    {
      "name": "TABLESPACE_SIZE",
      "values": [
        "0.7715",
        "0.6152",
        "0.0586",
        "0.0049"
      ]
    },
    {
      "name": "INIT_PARAMS",
      "values": [
        "*.cursor_sharing=EXACT",
        "*.open_cursors=300"
      ]
    },
    {
      "name": "PDB_SID_PREFIX",
      "value": "prp"
    }
  ]
}

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
    
  • To derive the REF_DATA_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "poolIds", execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate "serviceType":"DB" in the JSON response. Note the serviceTemplateTypeId under "serviceType":"DB" and use the value in the POST body shown above.

Request method

POST


Note:

In the table above, the SELECT_TARGET_OPTION parameter defines if the SSA User has the option to select the Container Database (CDB) while requesting for a PDB. If the value for the parameter is set as SELECT_TARGET_FROM_REQUEST, then the SSA User has the option to choose the CDB. If no value is defined, or if the value is set to SELECT_TARGET_AT_RUNTIME, then the placement algorithm selects the CDB.

A sample of the response received is shown below.

{
  "message": "Service template with ID \"xxxxx\" created successfully."
}
48.3.5.3.17 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:

Table 48-55 DELETE Request Configuration for Deleting a Database/Schema/Pluggable Database Service Template

Feature Description

URI

/em/websvcs/restful/extws/ cloudservices/admin/cfw/v1/servicetemplates/E87A364660A25B39E040F20A60510FDD

Note: For Database Service Templates the URI is em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/61

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Body

None

Request method

DELETE


A sample of the response received is shown below.

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