Show / Hide Table of Contents

Class RouteRule

A mapping between a destination IP address range and a virtual device to route matching packets to (a target).

Inheritance
object
RouteRule
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Oci.CoreService.Models
Assembly: OCI.DotNetSDK.Core.dll
Syntax
public class RouteRule

Properties

CidrBlock

Declaration
[JsonProperty(PropertyName = "cidrBlock")]
public string CidrBlock { get; set; }
Property Value
Type Description
string

Deprecated. Instead use destination and destinationType. Requests that include both cidrBlock and destination will be rejected.
A destination IP address range in CIDR notation. Matching packets will be routed to the indicated network entity (the target).
Cannot be an IPv6 prefix.
Example: 0.0.0.0/0

Description

Declaration
[JsonProperty(PropertyName = "description")]
public string Description { get; set; }
Property Value
Type Description
string

An optional description of your choice for the rule.

Destination

Declaration
[JsonProperty(PropertyName = "destination")]
public string Destination { get; set; }
Property Value
Type Description
string

Conceptually, this is the range of IP addresses used for matching when routing traffic. Required if you provide a destinationType.
Allowed values:

  • IP address range in CIDR notation. Can be an IPv4 CIDR block or IPv6 prefix. For Example: 192.168.1.0/24 or 2001:0db8:0123:45::/56. If you set this to an IPv6 prefix, the route rule's target can only be a DRG or internet gateway. IPv6 addressing is supported for all commercial and government regions. See IPv6 Addresses. * The cidrBlock value for a {@link Service}, if you're setting up a route rule for traffic destined for a particular Service through a service gateway. For

DestinationType

Declaration
[JsonProperty(PropertyName = "destinationType")]
[JsonConverter(typeof(ResponseEnumConverter))]
public RouteRule.DestinationTypeEnum? DestinationType { get; set; }
Property Value
Type Description
RouteRule.DestinationTypeEnum?

Type of destination for the rule. Required if you provide a destination.

  • CIDR_BLOCK: If the rule's destination is an IP address range in CIDR notation.
  • SERVICE_CIDR_BLOCK: If the rule's destination is the cidrBlock value for a {@link Service} (the rule is for traffic destined for a particular Service through a service gateway).

NetworkEntityId

Declaration
[Required(ErrorMessage = "NetworkEntityId is required.")]
[JsonProperty(PropertyName = "networkEntityId")]
public string NetworkEntityId { get; set; }
Property Value
Type Description
string

The OCID for the route rule's target. For information about the type of targets you can specify, see Route Tables.

Remarks

Required

RouteType

Declaration
[JsonProperty(PropertyName = "routeType")]
[JsonConverter(typeof(ResponseEnumConverter))]
public RouteRule.RouteTypeEnum? RouteType { get; set; }
Property Value
Type Description
RouteRule.RouteTypeEnum?

A route rule can be STATIC if manually added to the route table, LOCAL if added by OCI to the route table.

In this article
Back to top