Create a Rule

post

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

Creates a new rule for the API Platform Cloud Service instance.

Note: ServiceID is the user specified name for the service and is not the ID that's autogenerated for the instance.

Request

Supported Media Types
Path Parameters
  • Name of the identity domain for the API Platform Cloud Service account.
  • Name of the API Platform Cloud Service instance.

    Note: ServiceID is the user specified name for the service and is not the ID that's autogenerated for the instance.

Header Parameters
Body ()
Root Schema : create-rule
Type: object
Request body
Show Source
  • The description of the rule.
  • The destination to which traffic is allowed. Valid values include:
    • OTD: The Oracle Traffic Director load balancer

    • OTD_ADMIN_HOST: The administration host for the Oracle Traffic Director load balancer

    • WLS_ADMIN_SERVER: The WebLogic Server Administration Server

    • WLS_ADMIN_HOST: The administration host for WebLogic Server

    • WLS_MANAGED_SERVER: A WebLogic Server Managed Server

  • The network port or ports to allow traffic on. Specify a single port or a port range. For example, 8989 or 7000-8000.
  • The name of the rule.
  • The source from which traffic is allowed. Valid values include:
    • PUBLIC-INTERNET: Any host on the internet

    • OTD: The Oracle Traffic Director load balancer

    • OTD_ADMIN_HOST: The administration host for the Oracle Traffic Director load balancer

    • WLS_ADMIN_SERVER: The WebLogic Server Administration Server

    • WLS_MANAGED_SERVER: A WebLogic Server Managed Server

    • DB: The database specified when the API Platform Cloud Service instance was created.

    • A single IP address or a comma-separated list of subnets (in CIDR format) or IPv4 addresses.

  • Status of the rule. Specify whether the status should be enabled or disabled. Specify either disabled or enabled.

Response

202 Response

Accepted. See Status Codes for information about other HTTP status codes.

Examples

The following example shows how to create an access rule by submitting a POST request on the REST resource using cURL. For more information about cURL, see cURL Examples.

curl -i -X POST 
-u apicsadmin:password 
-H "Content-Type: application/json"
-d @accessrule.json
https://example.com:7103/paas/api/v1.1/instancemgmt/apics/services/APICS/instances/testsundBackup/accessrules

Example of Request Body

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

{    
    "ruleName": "my_corp_vnc",
    "description": "corporate to VNC to Admin Server",
    "ports": "5900",
    "status": "enabled",
    "source": "192.168.0.1\/32",
    "destination": "WLS_ADMIN_SERVER"
}

Example of Response Headers

The following shows an example of the response headers.

HTTP/1.1 202 Accepted
Date: Thu, 01 Dec 2016 17:37:20 GMT
Location: https://example.com:7103/paas/api/v1.1/activitylog/apics/job/27025
Content-Length: 0
Content-Type: application/json
X-ORACLE-DMS-ECID: 7077e58cc81a37d2:-4cd90f8:15878a7e3f0:-8000-0000000000010e50
X-Frame-Options: DENY
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS, HEAD
Access-Control-Allow-Headers: Content-Type, api_key, Authorization
Access-Control-Allow-Origin: *