Policy Routing
Overview
A policy routing is a network technique used to make routing decisions based on policy route rule sets. You can match packets between a destination port and a source port, or match a destination IP address with the source IP address by configuring a group of policy route rules. You can also configure route tables and route entries to send your business data packets to destination addresses according to the specified route paths.
Inventory
Policy Route Rule Set Inventory
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The UUID. For more information, see Resource Property. | 3.6.0 | ||
| name | The name. For more information, see Resource Property. | 3.6.0 | ||
| description | The description. For more information, see Resource Property. | Yes | 3.6.0 | |
| rules | The policy route rule. | 3.6.0 | ||
| groupBy | Groups rows into subgroups based on values of columns or expressions. This field is equivalent to the Group By clause in MySQL, such as groupBy=type. | Yes | 3.6.0 | |
| createDate | The creation date. For more information, see Resource Property. | 3.6.0 | ||
| lastOpDate | The last operation date. For more information, see Resource Property. | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 |
Sample
{
"inventories": [
{
"name": "name",
"description": "example-des",
"rules": [
{
"uuid": "2e05ab3c36323487baea2414005817ee",
"ruleNumber": 1.0,
"ruleSetUuid": "4c86543d473f3127885b3ffc8be5ec88",
"tableUuid": "d2ad1f7ad9aa354e8da24829bbd31a05",
"destIp": "192.168.1.1",
"sourceIp": "10.0.0.1",
"destPort": "22",
"sourcePort": "80",
"protocol": "tcp",
"state": "enable"
}
]
}
]
}
Policy Route Rule Set and L3 Network Reference Inventory
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| id | 3.6.0 | |||
| l3NetworkUuid | The L3 network UUID. | 3.6.0 | ||
| ruleSetUuid | The UUID of the policy route rule set. | 3.6.0 | ||
| groupBy | Groups rows into subgroups based on values of columns or expressions. This field is equivalent to the Group By clause in MySQL, such as groupBy=type. | Yes | 3.6.0 | |
| createDate | The creation date. For more information, see Resource Property. | 3.6.0 | ||
| lastOpDate | The last operation date. For more information, see Resource Property. | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 |
Sample
{
"inventories": [
{
"id": 1.0,
"l3NetworkUuid": "764cba1766563fd683ef1fcf76c7295c",
"ruleSetUuid": "ddb87b28f0253810b753fc9ae62ebd31"
}
]
}
Policy Route Rule Set and vRouter Reference Inventory
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| id | 3.6.0 | |||
| vRouterUuid | The vRouter UUID. | 3.6.0 | ||
| ruleSetUuid | The UUID of the policy route rule set. | 3.6.0 | ||
| groupBy | Groups rows into subgroups based on values of columns or expressions. This field is equivalent to the Group By clause in MySQL, such as groupBy=type. | Yes | 3.6.0 | |
| createDate | The creation date. For more information, see Resource Property. | 3.6.0 | ||
| lastOpDate | The last operation date. For more information, see Resource Property. | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 |
Sample
{
"inventories": [
{
"id": 1.0,
"vRouterUuid": "8715faa19cb03995a864330766fdc77c",
"ruleSetUuid": "2e27f9015ad3357996546fd51c2d808e"
}
]
}
Policy Route Table Inventory
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The UUID. For more information, see Resource Property. | 3.6.0 | ||
| tableNumber | The route table No. | 3.6.0 | ||
| routes | The rule. | 3.6.0 | ||
| groupBy | Groups rows into subgroups based on values of columns or expressions. This field is equivalent to the Group By clause in MySQL, such as groupBy=type. | Yes | 3.6.0 | |
| createDate | The creation date. For more information, see Resource Property. | 3.6.0 | ||
| lastOpDate | The last operation date. For more information, see Resource Property. | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 |
Samples
{
"inventories": [
{
"uuid": "6e39025e9eb432fda488f19e7104fdf0",
"tableNumber": 1.0,
"description": "example-des",
"routes": [
{
"tableUuid": "90f075232c383565ac3dbc09554c4152",
"destinationCidr": "192.168.1.0/24",
"nextHopIp": "192.168.1.1",
"distance": 1.0
}
]
}
]
}
Policy Route Table and vRouter Reference Inventory
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| id | 3.6.0 | |||
| tableUuid | The policy route table UUID. | 3.6.0 | ||
| vRouterUuid | The vRouter UUID. | 3.6.0 | ||
| groupBy | Groups rows into subgroups based on values of columns or expressions. This field is equivalent to the Group By clause in MySQL, such as groupBy=type. | Yes | 3.6.0 | |
| createDate | The creation date. For more information, see Resource Property. | 3.6.0 | ||
| lastOpDate | The last operation date. For more information, see Resource Property. | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 |
Sample
{
"inventories": [
{
"id": 1.0,
"tableUuid": "cc3bb710f9d43cedb044213253363604",
"vRouterUuid": "f281299552813438acc3c5a400802a78"
}
]
}
Policy Route Table Route Entry Inventory
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The UUID. For more information, see Resource Property. | 3.6.0 | ||
| tableUuid | The policy route table UUID. | 3.6.0 | ||
| destinationCidr | The destination CIDR. | 3.6.0 | ||
| nextHopIp | The next hop IP address. | 3.6.0 | ||
| distance | The priority. | 3.6.0 | ||
| groupBy | Groups rows into subgroups based on values of columns or expressions. This field is equivalent to the Group By clause in MySQL, such as groupBy=type. | Yes | 3.6.0 | |
| createDate | The creation date. For more information, see Resource Property. | 3.6.0 | ||
| lastOpDate | The last operation date. For more information, see Resource Property. | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 |
Sample
{
"inventories": [
{
"tableUuid": "49bf5678360b38058ab7096715e219f4",
"destinationCidr": "192.168.1.0/24",
"nextHopIp": "192.168.1.1",
"distance": 1.0
}
]
}
Policy Route Rule Inventory
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The UUID. For more information, see Resource Property. | 3.6.0 | ||
| ruleNumber | The priority. | 3.6.0 | ||
| ruleSetUuid | The UUID of the policy route rule set. | 3.6.0 | ||
| tableUuid | The policy route table UUID. | 3.6.0 | ||
| destIp | The destination IP address. | 3.6.0 | ||
| sourceIp | The source IP address. | 3.6.0 | ||
| destPort | The destination port. | 3.6.0 | ||
| sourcePort | The source port. | 3.6.0 | ||
| groupBy | Groups rows into subgroups based on values of columns or expressions. This field is equivalent to the Group By clause in MySQL, such as groupBy=type. | Yes | 3.6.0 | |
| createDate | The creation date. For more information, see Resource Property. | 3.6.0 | ||
| lastOpDate | The last operation date. For more information, see Resource Property. | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 |
Sample
{
"inventories": [
{
"uuid": "538840755c1a36e0b79f1d04097b252e",
"ruleNumber": 1.0,
"ruleSetUuid": "7cb413c84b243290a7105e8c21f42b59",
"tableUuid": "d29940b692f33c0eaf96b0193029636c",
"destIp": "192.168.1.1",
"sourceIp": "80",
"destPort": "22",
"protocol": "tcp",
"state": "enable"
}
]
}
Operations
CreatePolicyRouteRuleSet
Creates a policy route rule set. For example,
CreatePolicyRouteRuleSet name=name vRouterUuid=74cc4fed46f633f2a618b0e06d122377
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| name | The resource name. | 3.6.0 | ||
| description | The detailed description of the resource. | Yes | 3.6.0 | |
| vRouterUuid | The vRouter UUID. | 3.6.0 | ||
| type | Yes |
|
3.9.0 | |
| resourceUuid | Yes | 3.6.0 | ||
| tagUuids | The tag UUID list. | Yes | 3.6.0 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| timeout | Yes |
DeletePolicyRouteRuleSet
Deletes a policy route rule set. For example,
DeletePolicyRouteRuleSet uuid=f430004bc0ed315c89eb7909a48d27e7
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The resource UUID. | 3.6.0 | ||
| deleteMode | The delete mode. | Yes | 3.6.0 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| timeout | Yes |
UpdatePolicyRouteRuleSet
Updates the property of a policy route rule set. For example,
UpdatePolicyRouteRuleSet uuid=e58212f4cd0c3f2f96d27dde19de1383 name=name1
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The resource UUID. | 3.6.0 | ||
| name | The resource name. | Yes | 3.6.0 | |
| description | The detailed description of the resource. | Yes | 3.6.0 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| timeout | Yes |
QueryPolicyRouteRuleSet
Queries a policy route rule set. For example,
QueryPolicyRouteRuleSet
Primitive Fields of Query
QueryPolicyRouteRuleSetL3Ref
Queries the reference between a policy route rule set and a network. For example,
QueryPolicyRouteRuleSetL3Ref
Primitive Fields of Query
See Policy Route Rule Set and L3 Network Reference Inventory.
QueryPolicyRouteRuleSetVRouterRef
Queries the reference between a policy route rule set and a single node vRouter. For example,
QueryPolicyRouteRuleSetVRouterRef
Primitive Fields of Query
CreatePolicyRouteRule
Creates a policy route rule. For example,
CreatePolicyRouteRule ruleSetUuid=ec2472bf205931318e02a2bb5356c0ee tableUuid=b4c03beba98c3502ac53d784dd9bfe61 ruleNumber=1001.0
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| ruleSetUuid | The UUID of the policy route rule set. | 3.6.0 | ||
| tableUuid | The policy route table UUID. | 3.6.0 | ||
| ruleNumber | The rule priority. | 3.6.0 | ||
| destIp | The destination IP address. | Yes | 3.6.0 | |
| sourceIp | The source IP address. | Yes | 3.6.0 | |
| destPort | The destination port. | Yes | 3.6.0 | |
| sourcePort | The source port. | Yes | 3.6.0 | |
| protocol | The protocol. | Yes | 3.6.0 | |
| resourceUuid | Yes | 3.6.0 | ||
| tagUuids | The tag UUID list. | Yes | 3.6.0 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| timeout | Yes |
DeletePolicyRouteRule
Deletes a policy route rule. For example,
DeletePolicyRouteRule uuid=b02689c3b5513b8db2bb5f45a8c7b169
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The resource UUID. | 3.6.0 | ||
| deleteMode | Yes | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| timeout | Yes |
CreatePolicyRouteTable
Creates a policy route table. For example,
CreatePolicyRouteTable vRouterUuid=efe77450940f3dfe9023f2589fdeda25 number=1.0
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| vRouterUuid | The vRouter UUID. | 3.6.0 | ||
| number | The table number. | 3.6.0 | ||
| description | The detailed description of the resource. | Yes | 3.6.0 | |
| resourceUuid | Yes | 3.6.0 | ||
| tagUuids | The tag UUID list. | Yes | 3.6.0 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| timeout | Yes |
DeletePolicyRouteTable
Deletes a policy route table. For example,
DeletePolicyRouteTable uuid=4c24bf6b15d3338ab1d66eac97eec58b
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The resource UUID. | 3.6.0 | ||
| deleteMode | Yes | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| timeout | Yes |
QueryPolicyRouteTable
Queries a policy route table. For example,
QueryPolicyRouteTable
Primitive Fields of Query
QueryPolicyRouteTableVRouterRef
Queries the reference between a policy route table and a single node vRouter. For example,
QueryPolicyRouteTableVRouterRef
Primitive Fields of Query
CreatePolicyRouteTableRouteEntry
Creates a policy route. For example,
CreatePolicyRouteTableRouteEntry tableUuid=ef44a453884a3b93867d6ec0b7dd5716 destinationCidr=192.168.1.0/24 nextHopIp=192.168.1.1
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| tableUuid | The policy route table UUID. | 3.6.0 | ||
| destinationCidr | The destination CIDR address. | 3.6.0 | ||
| nextHopIp | The next hop IP address. | 3.6.0 | ||
| distance | The priority. | Yes | 3.6.0 | |
| resourceUuid | Yes | 3.6.0 | ||
| tagUuids | The tag UUID list. | Yes | 3.6.0 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| timeout | Yes |
DeletePolicyRouteTableRouteEntry
Deletes a route entry of a policy route. For example,
DeletePolicyRouteTableRouteEntry uuid=7e28a7059fb33a8bb2d7c61b7951303e
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The resource UUID. | 3.6.0 | ||
| deleteMode | 3.6.0 | |||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| timeout | Yes |
QueryPolicyRouteTableRouteEntry
Queries a policy route. For example,
QueryPolicyRouteTableRouteEntry
Primitive Fields of Query
QueryPolicyRouteRule
Queries a policy route rule. For example,
QueryPolicyRouteRule
Primitive Fields of Query
AttachPolicyRouteRuleSetToL3
Attaches a policy route rule set to an L3 network. For example,
AttachPolicyRouteRuleSetToL3 l3Uuid=1e6eb259093e3fa2a30c837ae69d259c ruleSetUuid=8748b8be922938bbb430ed9cbe3e4e46
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| l3Uuid | The L3 network UUID. | 3.6.0 | ||
| ruleSetUuid | The UUID of the policy route rule set. | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| timeout | Yes |
DetachPolicyRouteRuleSetFromL3
Detaches a policy route rule set from an L3 network. For example,
DetachPolicyRouteRuleSetFromL3 l3Uuid=1e6eb259093e3fa2a30c837ae69d259c ruleSetUuid=8748b8be922938bbb430ed9cbe3e4e46
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| l3Uuid | The L3 network UUID. | 3.6.0 | ||
| ruleSetUuid | The UUID of the policy route rule set. | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| timeout | Yes |
GetPolicyRouteRuleSetFromVirtualRouter
Obtains the policy route rule set from a virtual router. For example,
GetPolicyRouteRuleSetFromVirtualRouter vmInstanceUuid=de191bb7f4763ce580fd7e2ed457cde8
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| vmInstanceUuid | The VM instance UUID. | 3.9.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.9.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.9.0 | |
| timeout | Yes |
Tags
You can create a user tag on a policy route rule set by using resourceType=PolicyRouteRuleSetVO. For example,
CreateUserTag resourceType=PolicyRouteRuleSetVO tag=golden-ResourceStack resourceUuid=74cc4fed46f633f2a618b0e06d122377You can create a user tag on a policy route rule by using resourceType=PolicyRouteRuleVO. For example,
CreateUserTag resourceType=PolicyRouteRuleVO tag=golden-ResourceStack resourceUuid=ec2472bf205931318e02a2bb5356c0eeYou can create a user tag on a policy route by using resourceType=PolicyRouteTableRouteEntryVO. For example,
CreateUserTag resourceType=PolicyRouteTableRouteEntryVO tag=golden-ResourceStack resourceUuid=f44a453884a3b93867d6ec0b7dd5716
