AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

MetricDataResult

import "github.com/aws/aws-sdk-go/service/cloudwatch"

type MetricDataResult struct { Id *string `min:"1" type:"string"` Label *string `type:"string"` Messages []*MessageData `type:"list"` StatusCode *string `type:"string" enum:"StatusCode"` Timestamps []*time.Time `type:"list"` Values []*float64 `type:"list"` }

A GetMetricData call returns an array of MetricDataResult structures. Each of these structures includes the data points for that metric, along with the timestamps of those data points and other identifying information.

Id

Type: *string

The short name you specified to represent this metric.

Label

Type: *string

The human-readable label associated with the data.

Messages

A message returned by the GetMetricDataAPI, including a code and a description.

StatusCode

Type: *string

The status of the returned data. Complete indicates that all data points in the requested time range were returned. PartialData means that an incomplete set of data points were returned. You can use the NextToken value that was returned and repeat your request to get more data points. NextToken is not returned if you are performing a math expression. InternalError indicates that an error occurred. Retry your request using NextToken, if present.

Timestamps

Type: []*time.Time

The timestamps for the data points, formatted in Unix timestamp format. The number of timestamps always matches the number of values and the value for Timestamps[x] is Values[x].

Values

Type: []*float64

The data points for the metric corresponding to Timestamps. The number of values always matches the number of timestamps and the timestamp for Values[x] is Timestamps[x].

Method

GoString

func (s MetricDataResult) GoString() string

GoString returns the string representation

SetId

func (s *MetricDataResult) SetId(v string) *MetricDataResult

SetId sets the Id field's value.

SetLabel

func (s *MetricDataResult) SetLabel(v string) *MetricDataResult

SetLabel sets the Label field's value.

SetMessages

func (s *MetricDataResult) SetMessages(v []*MessageData) *MetricDataResult

SetMessages sets the Messages field's value.

SetStatusCode

func (s *MetricDataResult) SetStatusCode(v string) *MetricDataResult

SetStatusCode sets the StatusCode field's value.

SetTimestamps

func (s *MetricDataResult) SetTimestamps(v []*time.Time) *MetricDataResult

SetTimestamps sets the Timestamps field's value.

SetValues

func (s *MetricDataResult) SetValues(v []*float64) *MetricDataResult

SetValues sets the Values field's value.

String

func (s MetricDataResult) String() string

String returns the string representation

On this page: