Update an Access Rule

put

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

This endpoint is not applicable to service instances created on Oracle Cloud Infrastructure.

Disable, enable, or delete an access rule only. You cannot change the rule details.

The access rules that control external communication to the WebLogic Server Administration Console, Fusion Middleware Control, and Load Balancer Console are disabled by default if you did not set enableAdminConsole to true when you provisioned the service instance. To gain access to the administration consoles, you are required to explicitly enable the access rules for them, namely:

  • ora_p2admin_ahttps for WebLogic Server Administration Console and Fusion Middleware Control
  • ora_p2otd_ahttps for Oracle Traffic Director (Load Balancer) Administration Console

Note:On Oracle Cloud Infrastructure, all the required rules are preconfigured out-of-the-box upon service instance provisioning. To modify the 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

Supported Media Types
Path Parameters
Header Parameters
Body ()
The request body defines the details of the disable, enable, or delete request.
Root Schema : updatesecrule-putrequest
Type: object
Show Source
  • Type of operation to perform on the access rule. Valid values are: update (to disable or enable a rule) and delete (to delete a rule).
  • State of the access rule to update to. This attribute is required only when you disable or enable a rule. Valid value is disable or enable.
Back to Top

Response

Supported Media Types

200 Response

OK (enable or disable rule). See Root-Schema below.

202 Response

Accepted (delete rule).
Body ()
Root Schema : updatesecrule-response
Type: object
Show Source
Back to Top

Examples

The following example shows how to update an access rule by submitting a PUT request on the REST resource using cURL. For more information, see Use cURL.

cURL Command

curl -I -X PUT -u username:Password1! -d @updaterule.json -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest-server_url.com/paas/api/v1.1/instancemgmt/{identityDomainId}/services/SOA/instances/{serviceName}/accessrules/my_rule

Example of Request Header

The following example shows the request header.

-u '{userName}:{password}'
X-ID-TENANT-NAME: {identityDomainId}

Example of Request Body (Disable a Rule)

The following example shows the request for disabling an access rule in JSON format.

{
  "operation": "update",
  "status": "disabled"
}

Example of Response Body (Disable a Rule)

The following example shows the response body returned in JSON format:

{
  "ruleName": "my_rule",
  "description": "new access rule to port 80",
  "status": "disabled",
  "source": "PUBLIC-INTERNET",
  "destination": "OTD_OTD_SERVER",
  "ports": "80",
  "protocol": "tcp",
  "ruleType": "USER"
}

Example of Request Body (Enable a Rule)

The following example shows the request body in JSON format for enabling a rule.
{
  "operation": "update",
  "status": "enabled"
}

Example of Response Body (Enable a Rule)

The following example shows the response body when you enable a rule.
{
  "ruleName": "my_corp_vnc",
  "description": "corporate to VNC to Admin Server",
  "ports": "5900",
  "protocol": "tcp",
  "status": "enabled",
  "source": "192.123.45.6\/32",
  "destination": "WLS_ADMIN_SERVER"
}
Back to Top