RedirectRule

class oci.load_balancer.models.RedirectRule(**kwargs)

Bases: oci.load_balancer.models.rule.Rule

An object that represents the action of returning a specified response code and a redirect URI. Each RedirectRule object is configured for a particular listener and a designated path.

The default response code is 302 Found.

NOTES: * This rule applies only to HTTP listeners. * You can specify this rule only with the rule_condition() type PATH. * A listener can have only one RedirectRule object for a given original path. The path_match_condition() attributeValue specifies the original path.

Attributes

ACTION_ADD_HTTP_REQUEST_HEADER str(object=’’) -> str
ACTION_ADD_HTTP_RESPONSE_HEADER str(object=’’) -> str
ACTION_ALLOW str(object=’’) -> str
ACTION_CONTROL_ACCESS_USING_HTTP_METHODS str(object=’’) -> str
ACTION_EXTEND_HTTP_REQUEST_HEADER_VALUE str(object=’’) -> str
ACTION_EXTEND_HTTP_RESPONSE_HEADER_VALUE str(object=’’) -> str
ACTION_HTTP_HEADER str(object=’’) -> str
ACTION_IP_BASED_MAX_CONNECTIONS str(object=’’) -> str
ACTION_REDIRECT str(object=’’) -> str
ACTION_REMOVE_HTTP_REQUEST_HEADER str(object=’’) -> str
ACTION_REMOVE_HTTP_RESPONSE_HEADER str(object=’’) -> str
action [Required] Gets the action of this Rule.
conditions [Required] Gets the conditions of this RedirectRule.
redirect_uri Gets the redirect_uri of this RedirectRule.
response_code Gets the response_code of this RedirectRule.

Methods

__init__(**kwargs) Initializes a new RedirectRule object with values from keyword arguments.
get_subtype(object_dictionary) Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
ACTION_ADD_HTTP_REQUEST_HEADER = 'ADD_HTTP_REQUEST_HEADER'
ACTION_ADD_HTTP_RESPONSE_HEADER = 'ADD_HTTP_RESPONSE_HEADER'
ACTION_ALLOW = 'ALLOW'
ACTION_CONTROL_ACCESS_USING_HTTP_METHODS = 'CONTROL_ACCESS_USING_HTTP_METHODS'
ACTION_EXTEND_HTTP_REQUEST_HEADER_VALUE = 'EXTEND_HTTP_REQUEST_HEADER_VALUE'
ACTION_EXTEND_HTTP_RESPONSE_HEADER_VALUE = 'EXTEND_HTTP_RESPONSE_HEADER_VALUE'
ACTION_HTTP_HEADER = 'HTTP_HEADER'
ACTION_IP_BASED_MAX_CONNECTIONS = 'IP_BASED_MAX_CONNECTIONS'
ACTION_REDIRECT = 'REDIRECT'
ACTION_REMOVE_HTTP_REQUEST_HEADER = 'REMOVE_HTTP_REQUEST_HEADER'
ACTION_REMOVE_HTTP_RESPONSE_HEADER = 'REMOVE_HTTP_RESPONSE_HEADER'
__init__(**kwargs)

Initializes a new RedirectRule object with values from keyword arguments. The default value of the action attribute of this class is REDIRECT and it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • action (str) – The value to assign to the action property of this RedirectRule. Allowed values for this property are: “ADD_HTTP_REQUEST_HEADER”, “EXTEND_HTTP_REQUEST_HEADER_VALUE”, “REMOVE_HTTP_REQUEST_HEADER”, “ADD_HTTP_RESPONSE_HEADER”, “EXTEND_HTTP_RESPONSE_HEADER_VALUE”, “REMOVE_HTTP_RESPONSE_HEADER”, “ALLOW”, “CONTROL_ACCESS_USING_HTTP_METHODS”, “REDIRECT”, “HTTP_HEADER”, “IP_BASED_MAX_CONNECTIONS”
  • response_code (int) – The value to assign to the response_code property of this RedirectRule.
  • conditions (list[oci.load_balancer.models.RuleCondition]) – The value to assign to the conditions property of this RedirectRule.
  • redirect_uri (oci.load_balancer.models.RedirectUri) – The value to assign to the redirect_uri property of this RedirectRule.
action

[Required] Gets the action of this Rule. Allowed values for this property are: “ADD_HTTP_REQUEST_HEADER”, “EXTEND_HTTP_REQUEST_HEADER_VALUE”, “REMOVE_HTTP_REQUEST_HEADER”, “ADD_HTTP_RESPONSE_HEADER”, “EXTEND_HTTP_RESPONSE_HEADER_VALUE”, “REMOVE_HTTP_RESPONSE_HEADER”, “ALLOW”, “CONTROL_ACCESS_USING_HTTP_METHODS”, “REDIRECT”, “HTTP_HEADER”, “IP_BASED_MAX_CONNECTIONS”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The action of this Rule.
Return type:str
conditions

[Required] Gets the conditions of this RedirectRule.

Returns:The conditions of this RedirectRule.
Return type:list[oci.load_balancer.models.RuleCondition]
static get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

redirect_uri

Gets the redirect_uri of this RedirectRule.

Returns:The redirect_uri of this RedirectRule.
Return type:oci.load_balancer.models.RedirectUri
response_code

Gets the response_code of this RedirectRule. The HTTP status code to return when the incoming request is redirected.

The status line returned with the code is mapped from the standard HTTP specification. Valid response codes for redirection are:

  • 301
  • 302
  • 303
  • 307
  • 308

The default value is 302 (Found).

Example: 301

Returns:The response_code of this RedirectRule.
Return type:int