openstack.telemetry.v2.sample

The Sample Class

The Sample class inherits from Resource.

class openstack.telemetry.v2.sample.Sample(attrs=None, loaded=False)

Caution

This API is a work in progress and is subject to change.

Construct a Resource to interact with a service’s REST API.

The Resource class offers two class methods to construct resource objects, which are preferrable to entering through this initializer. See Resource.new() and Resource.existing().

Parameters:
  • attrs (dict) – The attributes to set when constructing this Resource.
  • loaded (bool) – True if this Resource exists on the server, False if it does not.
counter_name = None

The meter name this sample is for

generated_at = None

When the sample has been generated. Type: datetime object parsed from ISO 8601 formatted string

metadata = None

Arbitrary metadata associated with the sample

project_id = None

The ID of the project this sample was taken for

recorded_at = None

When the sample has been recorded. Type: datetime object parsed from ISO 8601 formatted string

resource_id = None

The ID of the resource this sample was taken for

source = None

The name of the source that identifies where the sample comes from

type = None

The meter type

unit = None

The unit of measure

user_id = None

The ID of the user this sample was taken for

volume = None

The metered value