Add an Access Control Rule to a Load Balancer

post

/paas/api/v1.1/instancemgmt/{identityDomainId}/services/jaas/instances/{serviceId}/loadbalancer/{loadBalancerName}/rules

This endpoint is applicable only to Oracle Java Cloud Service instances created on Oracle Cloud Infrastructure regions and provisioned with the Oracle-managed load balancer.

Adds an access control rule set to the Oracle-managed load balancer.

The rule set restricts access to application resources based on the source of the request using a user-specified IP address or address range match condition. See Access Control Rules in the Oracle Cloud Infrastructure documentation.

Request

Supported Media Types
Path Parameters
Header Parameters
Body ()
The request body contains configuration details for the access control rule set.
Root Schema : acl-request
Type: object
Show Source
Nested Schema : conditions
Type: array
Groups details about the access control rule.
Show Source
Nested Schema : aclconditions-request
Type: object
Show Source
  • Specifies the type of source the load balancer is to allow access. Valid value: SOURCE_IP_ADDRESS
  • For SOURCE_IP_ADDRESS, specifies an IP address or range of IP addresses using CIDR notation.

    The load balancer denies access to traffic that does not match the condition specified in the source value.

Back to Top

Response

Supported Media Types

202 Response

Accepted.
Body ()
Root Schema : acl-response
Type: object
The response body contains information about the operation.
Show Source
Nested Schema : details
Type: object
Groups details of the operation.
Show Source

400 Response

Bad request.
Body ()
Root Schema : aclfailed-response
Type: object
Show Source
Nested Schema : details
Type: object
Groups details of a bad request.
Show Source
Nested Schema : issues
Type: array
List of operation issues found.
Show Source
Back to Top

Examples

The following example shows how to define an access control rule for the Oracle-managed load balancer by submitting a POST request on the REST resource using cURL.

Note: The command in the example uses the URL structure https://rest_server_url/resource-path, where rest_server_url is the REST server to contact for your identity domain (or Cloud Account). See Send Requests.

cURL Command

curl -i -X POST -u username:password -d @accesscontrolrule.json -H "Content-Type:application/json" -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance/loadbalancer/public/rules

Example of Request Body

The following shows an example of a request body for adding an access control rule.

{
   "name": "accessrule01",
   "type": "AllowAccessPolicy",
   "action": "ALLOW",
   "description": "Allow traffic from clients whose IP address is in 100.100.204.0/24",
   "conditions": [
      {
        "attributeName": "SOURCE_IP_ADDRESS",
        "attributeValue": "100.100.204.0/24"
      }
   ]
}

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 202 Accepted
Date: Fri, 22 Nov 2019 18:10:53 GMT
Location: https://rest_server_url/paas/api/v1.1/activitylog/ExampleIdentityDomain/job/30446
Content-Length: 139
Content-Type: application/vnd.com.oracle.oracloud.provisioning.Service+json
Service-URI: https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance
Retry-After: 60

Example of Response Body

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

{
   "details":{
      "message": "Submitted job to update load balancer configuration for service [ExampleInstance] in domain [ExampleIdentityDomain].",
      "jobId": "30446"
   }
}
Back to Top