Create a Rule
/paas/api/v1.1/instancemgmt/{identityDomainId}/services/APICS/instances/{serviceId}/accessrules
Note: ServiceID is the user specified name for the service and is not the ID that's autogenerated for the instance.
Request
- application/json
-
identityDomainId: string
Name of the identity domain for the API Platform Cloud Service account.
-
serviceId: string
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.
-
Authorization: string
Base64 encoding of the user name and password of the user making the request. For more information, see Security, Authentication and Authorization.
object-
description:
string
The description of the rule.
-
destination:
string
The destination to which traffic is allowed. Valid values include:
OTD: The Oracle Traffic Director load balancerOTD_ADMIN_HOST: The administration host for the Oracle Traffic Director load balancerWLS_ADMIN_SERVER: The WebLogic Server Administration ServerWLS_ADMIN_HOST: The administration host for WebLogic ServerWLS_MANAGED_SERVER: A WebLogic Server Managed Server
-
ports:
string
The network port or ports to allow traffic on. Specify a single port or a port range. For example,
8989or7000-8000. -
ruleName:
string
The name of the rule.
-
source:
string
The source from which traffic is allowed. Valid values include:
PUBLIC-INTERNET: Any host on the internetOTD: The Oracle Traffic Director load balancerOTD_ADMIN_HOST: The administration host for the Oracle Traffic Director load balancerWLS_ADMIN_SERVER: The WebLogic Server Administration ServerWLS_MANAGED_SERVER: A WebLogic Server Managed ServerDB: 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:
string
Status of the rule. Specify whether the status should be enabled or disabled. Specify either
disabledorenabled.
Response
202 Response
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: *