Create Metering Label

 
MethodURIDescription
POST/metering-labels

Creates a l3 metering label.

This operation requires a request body.

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

Table 4.17. Create Metering Label Rule Request Attributes
Attribute Required Description

name

Required

The name of the metering label.

description

Optional

Description for the metering label.

This operation returns a response body, which contains the following informations about the metering label:

  • name. Name of the metering label.

  • description. Description of the metering label.

  • tenant_id. The tenant ID for the specified metering label.

  • id. The metering label ID

Normal response codes: 201

Error response codes: badRequest (400), unauthorized (401)

 Request

 

Example 4.218. Create Metering Label Request: JSON

POST /v2.0/metering/metering-labels HTTP/1.1
Host: controlnode:9696
User-Agent: python-neutronclient
Content-Type: application/json
Accept: application/json
X-Auth-Token: c52a1b304fec4ca0ac85dc1741eec6e2

{
   "metering_label":{
      "name":"label1",
      "description":"description of label1"
   }
}

 Response

 

Example 4.219. Create Metering Label Response: JSON

{
  "metering_label": {
    "tenant_id": "45345b0ee1ea477fac0f541b2cb79cd4",
    "description": "description of label1",
    "name": "label1",
    "id": "bc91b832-8465-40a7-a5d8-ba87de442266"
  }
}

Log a bug against this page


loading table of contents...