DrgRouteRule

class oci.core.models.DrgRouteRule(**kwargs)

Bases: object

A DRG route rule is a mapping between a destination IP address range and a DRG attachment. The map is used to route matching packets. Traffic will be routed across the attachments using Equal-cost multi-path routing (ECMP) if there are multiple rules with identical destinations and none of the rules conflict.

Attributes

DESTINATION_TYPE_CIDR_BLOCK A constant which can be used with the destination_type property of a DrgRouteRule.
DESTINATION_TYPE_SERVICE_CIDR_BLOCK A constant which can be used with the destination_type property of a DrgRouteRule.
ROUTE_PROVENANCE_IPSEC_TUNNEL A constant which can be used with the route_provenance property of a DrgRouteRule.
ROUTE_PROVENANCE_STATIC A constant which can be used with the route_provenance property of a DrgRouteRule.
ROUTE_PROVENANCE_VCN A constant which can be used with the route_provenance property of a DrgRouteRule.
ROUTE_PROVENANCE_VIRTUAL_CIRCUIT A constant which can be used with the route_provenance property of a DrgRouteRule.
ROUTE_TYPE_DYNAMIC A constant which can be used with the route_type property of a DrgRouteRule.
ROUTE_TYPE_STATIC A constant which can be used with the route_type property of a DrgRouteRule.
attributes Gets the attributes of this DrgRouteRule.
destination [Required] Gets the destination of this DrgRouteRule.
destination_type [Required] Gets the destination_type of this DrgRouteRule.
id [Required] Gets the id of this DrgRouteRule.
is_blackhole Gets the is_blackhole of this DrgRouteRule.
is_conflict Gets the is_conflict of this DrgRouteRule.
next_hop_drg_attachment_id [Required] Gets the next_hop_drg_attachment_id of this DrgRouteRule.
route_provenance [Required] Gets the route_provenance of this DrgRouteRule.
route_type Gets the route_type of this DrgRouteRule.

Methods

__init__(**kwargs) Initializes a new DrgRouteRule object with values from keyword arguments.
DESTINATION_TYPE_CIDR_BLOCK = 'CIDR_BLOCK'

A constant which can be used with the destination_type property of a DrgRouteRule. This constant has a value of “CIDR_BLOCK”

DESTINATION_TYPE_SERVICE_CIDR_BLOCK = 'SERVICE_CIDR_BLOCK'

A constant which can be used with the destination_type property of a DrgRouteRule. This constant has a value of “SERVICE_CIDR_BLOCK”

ROUTE_PROVENANCE_IPSEC_TUNNEL = 'IPSEC_TUNNEL'

A constant which can be used with the route_provenance property of a DrgRouteRule. This constant has a value of “IPSEC_TUNNEL”

ROUTE_PROVENANCE_STATIC = 'STATIC'

A constant which can be used with the route_provenance property of a DrgRouteRule. This constant has a value of “STATIC”

ROUTE_PROVENANCE_VCN = 'VCN'

A constant which can be used with the route_provenance property of a DrgRouteRule. This constant has a value of “VCN”

ROUTE_PROVENANCE_VIRTUAL_CIRCUIT = 'VIRTUAL_CIRCUIT'

A constant which can be used with the route_provenance property of a DrgRouteRule. This constant has a value of “VIRTUAL_CIRCUIT”

ROUTE_TYPE_DYNAMIC = 'DYNAMIC'

A constant which can be used with the route_type property of a DrgRouteRule. This constant has a value of “DYNAMIC”

ROUTE_TYPE_STATIC = 'STATIC'

A constant which can be used with the route_type property of a DrgRouteRule. This constant has a value of “STATIC”

__init__(**kwargs)

Initializes a new DrgRouteRule object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • destination (str) – The value to assign to the destination property of this DrgRouteRule.
  • destination_type (str) – The value to assign to the destination_type property of this DrgRouteRule. Allowed values for this property are: “CIDR_BLOCK”, “SERVICE_CIDR_BLOCK”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • next_hop_drg_attachment_id (str) – The value to assign to the next_hop_drg_attachment_id property of this DrgRouteRule.
  • route_type (str) – The value to assign to the route_type property of this DrgRouteRule. Allowed values for this property are: “STATIC”, “DYNAMIC”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • is_conflict (bool) – The value to assign to the is_conflict property of this DrgRouteRule.
  • is_blackhole (bool) – The value to assign to the is_blackhole property of this DrgRouteRule.
  • id (str) – The value to assign to the id property of this DrgRouteRule.
  • route_provenance (str) – The value to assign to the route_provenance property of this DrgRouteRule. Allowed values for this property are: “STATIC”, “VCN”, “VIRTUAL_CIRCUIT”, “IPSEC_TUNNEL”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • attributes (object) – The value to assign to the attributes property of this DrgRouteRule.
attributes

Gets the attributes of this DrgRouteRule. Additional properties for the route, computed by the service.

Returns:The attributes of this DrgRouteRule.
Return type:object
destination

[Required] Gets the destination of this DrgRouteRule. Represents the range of IP addresses to match against when routing traffic.

Potential values:
  • An IP address range (IPv4 or IPv6) in CIDR notation. For example: 192.168.1.0/24

or 2001:0db8:0123:45::/56. * When you’re setting up a security rule for traffic destined for a particular Service through a service gateway, this is the cidrBlock value associated with that Service. For example: oci-phx-objectstorage.

Returns:The destination of this DrgRouteRule.
Return type:str
destination_type

[Required] Gets the destination_type of this DrgRouteRule. The type of destination for the rule.

Allowed values:

  • 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 Service (the rule is for traffic destined for a particular Service through a service gateway).

Allowed values for this property are: “CIDR_BLOCK”, “SERVICE_CIDR_BLOCK”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The destination_type of this DrgRouteRule.
Return type:str
id

[Required] Gets the id of this DrgRouteRule. The Oracle-assigned ID of the DRG route rule.

Returns:The id of this DrgRouteRule.
Return type:str
is_blackhole

Gets the is_blackhole of this DrgRouteRule. Indicates that if the next hop attachment does not exist, so traffic for this route is discarded without notification.

Returns:The is_blackhole of this DrgRouteRule.
Return type:bool
is_conflict

Gets the is_conflict of this DrgRouteRule. Indicates that the route was not imported due to a conflict between route rules.

Returns:The is_conflict of this DrgRouteRule.
Return type:bool
next_hop_drg_attachment_id

[Required] Gets the next_hop_drg_attachment_id of this DrgRouteRule. The OCID of the next hop DRG attachment responsible for reaching the network destination.

A value of BLACKHOLE means traffic for this route is discarded without notification.

Returns:The next_hop_drg_attachment_id of this DrgRouteRule.
Return type:str
route_provenance

[Required] Gets the route_provenance of this DrgRouteRule. The earliest origin of a route. If a route is advertised to a DRG through an IPsec tunnel attachment, and is propagated to peered DRGs via RPC attachments, the route’s provenance in the peered DRGs remains IPSEC_TUNNEL, because that is the earliest origin.

No routes with a provenance IPSEC_TUNNEL or VIRTUAL_CIRCUIT will be exported to IPsec tunnel or virtual circuit attachments, regardless of the attachment’s export distribution.

Allowed values for this property are: “STATIC”, “VCN”, “VIRTUAL_CIRCUIT”, “IPSEC_TUNNEL”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The route_provenance of this DrgRouteRule.
Return type:str
route_type

Gets the route_type of this DrgRouteRule. You can specify static routes for the DRG route table using the API. The DRG learns dynamic routes from the DRG attachments using various routing protocols.

Allowed values for this property are: “STATIC”, “DYNAMIC”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The route_type of this DrgRouteRule.
Return type:str