View All Rules
/paas/api/v1.1/instancemgmt/{identityDomainId}/services/dbaas/instances/{serviceId}/accessrules
Request
-
identityDomainId: string
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.
-
serviceId: string
Name of the Database Classic Cloud Service instance.
-
Authorization: string
Base64 encoding of the user name and password of the user making the request. For more information, see Security, Authentication and Authorization.
-
X-ID-TENANT-NAME: string
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.
Response
- application/json
200 Response
object
Response Body
-
accessRules(optional):
array accessRules Array
Title:
accessRules Array
Array of JSON objects, with one element for each rule. -
activities(optional):
array activities Array
Title:
activities Array
Groups details about ongoing and failed activity messages, if available.
array
accessRules Array
-
Array of:
object accessRules Array Item
Title:
accessRules Array Item
array
activities Array
-
Array of:
object activities Array Item
Title:
activities Array Item
object
accessRules Array Item
-
description(optional):
string
The Description of the rule.
-
destination(optional):
string
The value
DB_1
. -
ports(optional):
string
The ports for the rule.
-
ruleName(optional):
string
The name of the rule.
-
ruleType(optional):
string
The type of the rule; one of:
DEFAULT
,SYSTEM
orUSER
. -
source(optional):
string
IP addresses and subnets from which traffic is allowed.
-
status(optional):
string
The status of the rule; one of:
disabled
orenabled
.
object
activities Array Item
-
activity(optional):
object activity Object
Title:
activity Object
object
activity Object
-
errors(optional):
string
Error encountered for an ongoing or failed activity.
-
message(optional):
string
Message of an ongoing or failed activity.
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." } } ] }