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.

MetricStat

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

type MetricStat struct { Metric *Metric `type:"structure" required:"true"` Period *int64 `min:"1" type:"integer" required:"true"` Stat *string `type:"string" required:"true"` Unit *string `type:"string" enum:"StandardUnit"` }

This structure defines the metric to be returned, along with the statistics, period, and units.

Metric

Represents a specific metric.

Period

Type: *int64

The period, in seconds, to use when retrieving the metric.

Period is a required field

Stat

Type: *string

The statistic to return. It can include any CloudWatch statistic or extended statistic.

Stat is a required field

Unit

Type: *string

The unit to use for the returned data points.

Method

GoString

func (s MetricStat) GoString() string

GoString returns the string representation

SetMetric

func (s *MetricStat) SetMetric(v *Metric) *MetricStat

SetMetric sets the Metric field's value.

SetPeriod

func (s *MetricStat) SetPeriod(v int64) *MetricStat

SetPeriod sets the Period field's value.

SetStat

func (s *MetricStat) SetStat(v string) *MetricStat

SetStat sets the Stat field's value.

SetUnit

func (s *MetricStat) SetUnit(v string) *MetricStat

SetUnit sets the Unit field's value.

String

func (s MetricStat) String() string

String returns the string representation

Validate

func (s *MetricStat) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: