Class RouteRule.Builder

  • Enclosing class:
    RouteRule

    public static class RouteRule.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • cidrBlock

        public RouteRule.Builder cidrBlock​(String cidrBlock)
        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 CIDR.

        Example: 0.0.0.0/0

        Parameters:
        cidrBlock - the value to set
        Returns:
        this builder
      • destination

        public RouteRule.Builder destination​(String destination)
        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 or IPv6 CIDR. For example: 192.168.1.0/24 or 2001:0db8:0123:45::/56. If you set this to an IPv6 CIDR, 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](https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm).

        The cidrBlock value for a Service, if you're setting up a route rule for traffic destined for a particular Service through a service gateway. For example: oci-phx-objectstorage.

        Parameters:
        destination - the value to set
        Returns:
        this builder
      • destinationType

        public RouteRule.Builder destinationType​(RouteRule.DestinationType destinationType)
        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 Service (the rule is for traffic destined for a particular Service through a service gateway).

        Parameters:
        destinationType - the value to set
        Returns:
        this builder
      • networkEntityId

        public RouteRule.Builder networkEntityId​(String networkEntityId)
        The OCID for the route rule’s target.

        For information about the type of targets you can specify, see Route Tables.

        Parameters:
        networkEntityId - the value to set
        Returns:
        this builder
      • description

        public RouteRule.Builder description​(String description)
        An optional description of your choice for the rule.
        Parameters:
        description - the value to set
        Returns:
        this builder
      • routeType

        public RouteRule.Builder routeType​(RouteRule.RouteType routeType)
        A route rule can be STATIC if manually added to the route table, LOCAL if added by OCI to the route table.
        Parameters:
        routeType - the value to set
        Returns:
        this builder