View All Rules

get

/paas/api/v1.1/instancemgmt/{identityDomainId}/services/dbaas/instances/{serviceId}/accessrules

Returns information about all Oracle Cloud Infrastructure Compute Classic security rules defined for a Database Classic Cloud Service instance.

Request

Path Parameters
  • Identity domain ID for the Database Classic Cloud Service account:
     
    • For a Cloud account with Identity Cloud Service: the identity service ID, which has the form idcs-letters-and-numbers. You can find this ID in the Identity Service Id field on the Overview tab of the Service Details page for Database Classic Cloud Service in My Services.

    • For a traditional cloud account: the name of the identity domain.

  • Name of the Database Classic Cloud Service instance.
Header Parameters
  • Base64 encoding of the user name and password of the user making the request. For more information, see Security, Authentication and Authorization.
  • Identity domain ID for the Database Classic Cloud Service account:
     
    • For a Cloud account with Identity Cloud Service: the identity service ID, which has the form idcs-letters-and-numbers. You can find this ID in the Identity Service Id field on the Overview tab of the Service Details page for Database Classic Cloud Service in My Services.

    • For a traditional cloud account: the name of the identity domain.

Back to Top

Response

Supported Media Types

200 Response

OK. See Status Codes for information about other possible HTTP status codes.
Body ()
Root Schema : Response Body
Type: object
Title: Response Body
Show Source
Nested Schema : accessRules Array
Type: array
Title: accessRules Array
Array of JSON objects, with one element for each rule.
Show Source
Nested Schema : activities Array
Type: array
Title: activities Array
Groups details about ongoing and failed activity messages, if available.
Show Source
Nested Schema : accessRules Array Item
Type: object
Title: accessRules Array Item
Show Source
Nested Schema : activities Array Item
Type: object
Title: activities Array Item
Show Source
Nested Schema : activity Object
Type: object
Title: activity Object
Show Source
Back to Top

Examples

The following example shows how to view the rules for a Database Classic Cloud Service instance by submitting a GET request on the REST endpoint using cURL.

This example uses a traditional cloud account, so the {identityDomainId} path parameter and the X-ID-TENANT-NAME header parameter are set to the account's domain name, which is usexample. The service instance is db12c-xp-si and the Oracle Cloud user name of the user making the call is dbcsadmin.

cURL Command

$ curl --include --request GET \
--user dbcsadmin:password \
--header "X-ID-TENANT-NAME:usexample" \
https://dbaas.oraclecloud.com/paas/api/v1.1/instancemgmt/usexample/services/dbaas/instances/db12c-xp-si/accessrules

HTTP Status Code and Response Headers

HTTP/1.1 200 OK
Date: date-and-time-stamp
Server: Oracle-Application-Server-11g
Content-Length: 1298
X-ORACLE-DMS-ECID: id-string
X-ORACLE-DMS-ECID: id-string
X-Frame-Options: DENY
Vary: Accept-Encoding,User-Agent
Content-Language: en
Content-Type: application/json

Response Body

{
  "accessRules":[
    {
      "ruleName":"ora_p2_ssh",
      "description":"",
      "status":"enabled",
      "source":"PUBLIC-INTERNET",
      "destination":"DB_1",
      "ports":"22",
      "ruleType":"DEFAULT"
    },
    {
      "ruleName":"ora_p2_dblistener",
      "description":"",
      "status":"disabled",
      "source":"PUBLIC-INTERNET",
      "destination":"DB_1",
      "ports":"1521",
      "ruleType":"DEFAULT"
    },
    {
      "ruleName":"ora_p2_http",
      "description":"",
      "status":"disabled",
      "source":"PUBLIC-INTERNET",
      "destination":"DB_1",
      "ports":"80",
      "ruleType":"DEFAULT"
    },
    {
      "ruleName":"ora_p2_httpssl",
      "description":"",
      "status":"enabled",
      "source":"PUBLIC-INTERNET",
      "destination":"DB_1",
      "ports":"443",
      "ruleType":"DEFAULT"
    },
    {
      "ruleName":"ora_p2_httpadmin",
      "description":"",
      "status":"disabled",
      "source":"PUBLIC-INTERNET",
      "destination":"DB_1",
      "ports":"4848",
      "ruleType":"DEFAULT"
    },
    {
      "ruleName":"ora_p2_dbconsole",
      "description":"",
      "status":"disabled",
      "source":"PUBLIC-INTERNET",
      "destination":"DB_1",
      "ports":"1158",
      "ruleType":"DEFAULT"
    },
    {
      "ruleName":"ora_p2_dbexpress",
      "description":"",
      "status":"disabled",
      "source":"PUBLIC-INTERNET",
      "destination":"DB_1",
      "ports":"5500",
      "ruleType":"DEFAULT"
    },
    {
      "ruleName":"ora_trusted_hosts_dblistener",
      "description":"DO NOT MODIFY: A secrule to allow specific IPs to connect to this db",
      "status":"enabled",
      "source":"127.0.0.1\/32",
      "destination":"DB_1",
      "ports":"1521",
      "ruleType":"SYSTEM"
    },
    {
      "ruleName":"example-dblistener",
      "description":"",
      "status":"enabled",
      "source":"192.0.2.0\/24",
      "destination":"DB_1",
      "ports":"1521",
      "ruleType":"USER"
    }
  ],
  "activities":[
    {
      "activity":{
        "message":"Creation of [example-https] access rule(s) is in progress."
      }
    }
  ]
}
Back to Top