3.40.2. Get tenant usage information

 
MethodURIDescription
GET/v2/{tenant_id}/os-simple-tenant-usage/{tenant_id}

Gets usage information for a tenant.

Normal response codes: 200

 3.40.2.1. Request

This table shows the URI parameters for the get tenant usage information request:

NameTypeDescription

{tenant_id}

​String

The ID for the tenant or account in a multi-tenancy cloud.

{tenant_id}

​String

The tenant ID.

 3.40.2.2. Response

 

Example 3.334. Get tenant usage information: JSON response

{
    "tenant_usage": {
        "server_usages": [
            {
                "ended_at": null,
                "flavor": "m1.tiny",
                "hours": 1.0,
                "instance_id": "1f1deceb-17b5-4c04-84c7-e0d4499c8fe0",
                "local_gb": 1,
                "memory_mb": 512,
                "name": "new-server-test",
                "started_at": "2012-10-08T20:10:44.541277",
                "state": "active",
                "tenant_id": "openstack",
                "uptime": 3600,
                "vcpus": 1
            }
        ],
        "start": "2012-10-08T20:10:44.587336",
        "stop": "2012-10-08T21:10:44.587336",
        "tenant_id": "openstack",
        "total_hours": 1.0,
        "total_local_gb_usage": 1.0,
        "total_memory_mb_usage": 512.0,
        "total_vcpus_usage": 1.0
    }
}

 

Example 3.335. Get tenant usage information: XML response

<?xml version='1.0' encoding='UTF-8'?>
<tenant_usage>
  <tenant_id>openstack</tenant_id>
  <total_local_gb_usage>1.0</total_local_gb_usage>
  <total_vcpus_usage>1.0</total_vcpus_usage>
  <total_memory_mb_usage>512.0</total_memory_mb_usage>
  <total_hours>1.0</total_hours>
  <start>2012-10-08 20:10:51.902640</start>
  <stop>2012-10-08 21:10:51.902640</stop>
  <server_usages>
    <server_usage>
      <instance_id>e4521f3b-d9ad-4454-be8a-e2732f0630ef</instance_id>
      <name>new-server-test</name>
      <hours>1.0</hours>
      <memory_mb>512</memory_mb>
      <local_gb>1</local_gb>
      <vcpus>1</vcpus>
      <tenant_id>openstack</tenant_id>
      <flavor>m1.tiny</flavor>
      <started_at>2012-10-08 20:10:51.854331</started_at>
      <ended_at>None</ended_at>
      <state>active</state>
      <uptime>3600</uptime>
    </server_usage>
  </server_usages>
</tenant_usage>

This operation does not return a response body.

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


loading table of contents...