View All Access Rules

get

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

Returns information about all access rules defined for a MySQL Cloud Service instance.

The access rules that control external access to the MySQL Server, and MySQL Enterprise Monitor are disabled by default. To gain access to the administration consoles, you are required to explicitly enable the access rules for them.

Request

Path Parameters
Header Parameters

Response

Supported Media Types

200 Response

OK. See Status Codes for information about other possible HTTP status codes.
Body ()
The response body contains information about the access rules.
Root Schema : access-rules-view-response
Type: object
The response body contains information about the access rules.
Show Source
Nested Schema : accessRules
Type: array
Groups details about access rules.
Show Source
Nested Schema : activities
Type: array
Groups details about ongoing and failed activity messages, if available.
Show Source
Nested Schema : access-rules-details
Type: object
Show Source
Nested Schema : access-rules-activities
Type: object
Show Source
Nested Schema : activity
Type: array
Groups messages and errors for ongoing and failed activities.
Show Source
Nested Schema : access-rules-errors
Type: object
Show Source

Examples

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

Note: The command in this example uses the URL structure https://rest_server_url/resource-path, where rest_server_url is the Oracle Public Cloud or Oracle Cloud Machine REST server to contact for your identity domain or tenant name. See Send Requests for the appropriate URL structure to use on Oracle Public Cloud or Oracle Cloud Machine.

cURL Command

curl -i -X GET \
  -u "username:password" \
  -H "X-ID-TENANT-NAME: ExampleIdentityDomain" \
  -H "Accept: application/json" \
  https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/MySQLCS/instances/MyTestInstance/accessrules

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK
Server: Oracle-Application-Server-11g
X-ORACLE-DMS-ECID: RU6F0Z005aviE10RHT050Zua0F000p7Id
X-ORACLE-DMS-ECID: RU6F0Z005aviE10RHT050Zua0F000p7Id
X-Frame-Options: DENY
Content-Language: en
Content-Type: application/json
Vary: user-agent
Date: Tue, 25 Oct 2016 23:45:51 GMT
Content-Length: 1145
Connection: keep-alive

Example of Response Body

The following shows an example of the response body in JSON format.

{
    "accessRules": [
        {
            "ruleName": "ora_p2admin_ssh",
            "description": "Permit public access to SSH port",
            "status": "enabled",
            "source": "PUBLIC-INTERNET",
            "destination": "mysql_MASTER",
            "ports": "22",
            "protocol": "tcp",
            "ruleType": "DEFAULT"
        },
        {
            "ruleName": "ora_p2admin_mysql",
            "description": "Permit public access to MySQL port",
            "status": "disabled",
            "source": "PUBLIC-INTERNET",
            "destination": "mysql_MASTER",
            "ports": "3306",
            "protocol": "tcp",
            "ruleType": "DEFAULT"
        },
        {
            "ruleName": "ora_trusted_hosts_mysql",
            "description": "DO NOT MODIFY: Permit specific IPs to access MySQL port ",
            "status": "enabled",
            "source": "127.0.0.1\/32",
            "destination": "mysql_MASTER",
            "ports": "3306",
            "protocol": "tcp",
            "ruleType": "SYSTEM"
        },
        {
            "ruleName": "ora_p2admin_em",
            "description": "Permit public access to Enterprise Monitor https port",
            "status": "disabled",
            "source": "PUBLIC-INTERNET",
            "destination": "mysql_MASTER",
            "ports": "18443",
            "protocol": "tcp",
            "ruleType": "DEFAULT"
        },
        {
            "ruleName": "sys_infra2mys_admin_ssh",
            "description": "DO NOT MODIFY: Permit PSM to ssh to admin host",
            "status": "enabled",
            "source": "PAAS-INFRA",
            "destination": "mysql_ADMIN_HOST",
            "ports": "22",
            "protocol": "tcp",
            "ruleType": "SYSTEM"
        }
    ],
    "activities": [

    ]
}