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.

Metric

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

type Metric struct { Dimensions []*Dimension `type:"list"` MetricName *string `min:"1" type:"string"` Namespace *string `min:"1" type:"string"` }

Represents a specific metric.

Dimensions

Expands the identity of a metric.

MetricName

Type: *string

The name of the metric. This is a required field.

Namespace

Type: *string

The namespace of the metric.

Method

GoString

func (s Metric) GoString() string

GoString returns the string representation

SetDimensions

func (s *Metric) SetDimensions(v []*Dimension) *Metric

SetDimensions sets the Dimensions field's value.

SetMetricName

func (s *Metric) SetMetricName(v string) *Metric

SetMetricName sets the MetricName field's value.

SetNamespace

func (s *Metric) SetNamespace(v string) *Metric

SetNamespace sets the Namespace field's value.

String

func (s Metric) String() string

String returns the string representation

Validate

func (s *Metric) Validate() error

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

On this page: