Class ControlAccessUsingHttpMethodsRule
- java.lang.Object
-
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
- com.oracle.bmc.loadbalancer.model.Rule
-
- com.oracle.bmc.loadbalancer.model.ControlAccessUsingHttpMethodsRule
-
@Generated(value="OracleSDKGenerator", comments="API Version: 20170115") public final class ControlAccessUsingHttpMethodsRule extends Rule
An object that represents the action of returning a specified response code when the requested HTTP method is not in the list of allowed methods for the listener.The load balancer does not forward a disallowed request to the back end servers. The default response code is 405 Method Not Allowed.
If you set the response code to 405 or leave it blank, the system adds an "allow" response header that contains a list of the allowed methods for the listener. If you set the response code to anything other than 405 (or blank), the system does not add the "allow" response header with a list of allowed methods.
This rule applies only to HTTP listeners. No more than one ControlAccessUsingHttpMethodsRule object can be present in a given listener.
Note: Objects should always be created or deserialized using theControlAccessUsingHttpMethodsRule.Builder
. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of theControlAccessUsingHttpMethodsRule.Builder
, which maintain a set of all explicitly set fields calledControlAccessUsingHttpMethodsRule.Builder.__explicitlySet__
. ThehashCode()
andequals(Object)
methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ControlAccessUsingHttpMethodsRule.Builder
-
Nested classes/interfaces inherited from class com.oracle.bmc.loadbalancer.model.Rule
Rule.Action
-
-
Constructor Summary
Constructors Constructor Description ControlAccessUsingHttpMethodsRule(List<String> allowedMethods, Integer statusCode)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ControlAccessUsingHttpMethodsRule.Builder
builder()
Create a new builder.boolean
equals(Object o)
List<String>
getAllowedMethods()
The list of HTTP methods allowed for this listener.Integer
getStatusCode()
The HTTP status code to return when the requested HTTP method is not in the list of allowed methods.int
hashCode()
ControlAccessUsingHttpMethodsRule.Builder
toBuilder()
String
toString()
String
toString(boolean includeByteArrayContents)
Return a string representation of the object.
-
-
-
Constructor Detail
-
ControlAccessUsingHttpMethodsRule
@Deprecated public ControlAccessUsingHttpMethodsRule(List<String> allowedMethods, Integer statusCode)
Deprecated.
-
-
Method Detail
-
builder
public static ControlAccessUsingHttpMethodsRule.Builder builder()
Create a new builder.
-
toBuilder
public ControlAccessUsingHttpMethodsRule.Builder toBuilder()
-
getAllowedMethods
public List<String> getAllowedMethods()
The list of HTTP methods allowed for this listener.By default, you can specify only the standard HTTP methods defined in the [HTTP Method Registry](http://www.iana.org/assignments/http-methods/http-methods.xhtml). You can also see a list of supported standard HTTP methods in the Load Balancing service documentation at [Managing Rule Sets](https://docs.oracle.com/iaas/Content/Balance/Tasks/managingrulesets.htm).
Your backend application must be able to handle the methods specified in this list.
The list of HTTP methods is extensible. If you need to configure custom HTTP methods, contact [My Oracle Support](http://support.oracle.com/) to remove the restriction for your tenancy.
Example: ["GET", "PUT", "POST", "PROPFIND"]
- Returns:
- the value
-
getStatusCode
public Integer getStatusCode()
The HTTP status code to return when the requested HTTP method is not in the list of allowed methods.The associated status line returned with the code is mapped from the standard HTTP specification. The default value is 405 (Method Not Allowed).
Example: 403
- Returns:
- the value
-
toString
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.
-
-