Add an Access Rule
/paas/api/v1.1/instancemgmt/{identityDomainId}/services/SOA/instances/{serviceId}/accessrules
Adds a new access rule to an Oracle SOA Cloud Service instance.
Note:On Oracle Cloud Infrastructure, all the required rules are preconfigured out-of-the-box upon service instance provisioning. To add rules using the REST API, use the security-related Core Services APIs in the Oracle Cloud Infrastructure documentation. See also Security Lists in the Oracle Cloud Infrastructure documentation.
Request
- application/json
-
identityDomainId: string
Identity domain ID for the Oracle SOA Cloud Service account.
-
serviceId: string
Name of the Oracle SOA Cloud Service instance.
-
X-ID-TENANT-NAME: string
Identity domain ID for the Oracle SOA Cloud Service account.
object
-
description:
string
Description of the rule.
-
destination:
string
Destination network. Specify the service component to allow traffic to. For example,
WLS_ADMIN_SERVER
for the virtual machine where the WebLogic Administration Server is running, orOTD
for the virtual machine that contains the Oracle Traffic Director administration server. -
ports:
string
Network port. Specify a single port or a port range. For example,
8989
or7000-8000
. -
protocol(optional):
string
Communication protocol. Valid values are:
tcp
orudp
. Default istcp
. -
ruleName:
string
Name of the rule.
-
source:
string
Network address of source. Specify the hosts from which traffic is allowed. Valid values include:
PUBLIC-INTERNET
for any host on the Internet- A single IP address or a comma-separated list of subnets (in CIDR format) or IPv4 addresses
- A service component name. Valid values include
WLS_ADMIN_SERVER
,WLS_MANAGED_SERVER
,OTD
,DB
-
status:
string
Status of the rule. Specify whether the status should be enabled or disabled. Valid value:
disabled
orenabled
.
Response
- application/json
202 Response
Examples
The following example shows how to add a new access rule by submitting a POST request on the REST resource using cURL. For more information, see Use cURL.
cURL Command
curl -i -X POST -u username:Password1! -d @createrule.json -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest-server_url.com/paas/api/v1.1/instancemgmt/{identityDomainId}/services/SOA/instances/{serviceName}/accessrules
Example of Request Header
The following example shows the request header.
-u '{userName}:{password}' X-ID-TENANT-NAME: {identityDomainId}
Example of Request Body
The following example shows the request in JSON format.
{ "ruleName": "my_rule", "description": "new access rule to port 80", "ports": "80", "protocol": "tcp", "status": "enabled", "source": "PUBLIC-INTERNET", "destination": "OTD_OTD_SERVER" }