Create metering label rule

 
MethodURIDescription
POST/v2.0/metering-label-rules

Creates a l3 metering label rule.

This operation requires a request body.

The following table describes the required and optional attributes in the request body:

Table 4.18. Create Metering label rule Request Attributes
Attribute Required Description

direction

Optional

Ingress or egress: The direction in which metering rule is applied. Default: ingress

metering_label_id

Required

The meteting label ID to associate with this metering rule.

excluded

Optional

Specify whether the remote_ip_prefix will be excluded or not from traffic counters of the metering label, ie: to not count the traffic of a specific IP address of a range. Default: False

remote_ip_prefix

Required

The remote IP prefix to be associated with this metering rule. packet.

This operation returns a response body.

Normal response codes: 201

Error response codes: badRequest (400), unauthorized (401), itemNotFound (404), buildInProgress (409)

 Request

 

Example 4.230. Create metering label rule: JSON request

{
   "metering_label_rule":{
      "remote_ip_prefix":"10.0.1.0/24",
      "direction":"ingress",
      "metering_label_id":"e131d186-b02d-4c0b-83d5-0c0725c4f812"
   }
}

 Response

 

Example 4.231. Create metering label rule: JSON response

{
   "metering_label_rule":{
      "remote_ip_prefix":"10.0.1.0/24",
      "direction":"ingress",
      "metering_label_id":"e131d186-b02d-4c0b-83d5-0c0725c4f812",
      "id":"00e13b58-b4f2-4579-9c9c-7ac94615f9ae",
      "excluded":false
   }
}

Questions? Discuss on ask.openstack.org
Found an error? Report a bug against this page


loading table of contents...