vendor: update all dependencies

* Update all dependencies
  * Remove all `[[constraint]]` from Gopkg.toml
  * Add in the minimum number of `[[override]]` to build
  * Remove go get of github.com/inconshreveable/mousetrap as it is vendored
  * Update docs with new policy on constraints
This commit is contained in:
Nick Craig-Wood 2018-05-02 17:09:45 +01:00
parent 21383877df
commit 6427029c4e
4902 changed files with 1443417 additions and 227283 deletions

View file

@ -17,7 +17,7 @@ const opDeleteAlarms = "DeleteAlarms"
// DeleteAlarmsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteAlarms operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@ -98,7 +98,7 @@ const opDeleteDashboards = "DeleteDashboards"
// DeleteDashboardsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteDashboards operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@ -184,7 +184,7 @@ const opDescribeAlarmHistory = "DescribeAlarmHistory"
// DescribeAlarmHistoryRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAlarmHistory operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@ -323,7 +323,7 @@ const opDescribeAlarms = "DescribeAlarms"
// DescribeAlarmsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAlarms operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@ -460,7 +460,7 @@ const opDescribeAlarmsForMetric = "DescribeAlarmsForMetric"
// DescribeAlarmsForMetricRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAlarmsForMetric operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@ -535,7 +535,7 @@ const opDisableAlarmActions = "DisableAlarmActions"
// DisableAlarmActionsRequest generates a "aws/request.Request" representing the
// client's request for the DisableAlarmActions operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@ -612,7 +612,7 @@ const opEnableAlarmActions = "EnableAlarmActions"
// EnableAlarmActionsRequest generates a "aws/request.Request" representing the
// client's request for the EnableAlarmActions operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@ -688,7 +688,7 @@ const opGetDashboard = "GetDashboard"
// GetDashboardRequest generates a "aws/request.Request" representing the
// client's request for the GetDashboard operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@ -773,11 +773,101 @@ func (c *CloudWatch) GetDashboardWithContext(ctx aws.Context, input *GetDashboar
return out, req.Send()
}
const opGetMetricData = "GetMetricData"
// GetMetricDataRequest generates a "aws/request.Request" representing the
// client's request for the GetMetricData operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetMetricData for more information on using the GetMetricData
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetMetricDataRequest method.
// req, resp := client.GetMetricDataRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricData
func (c *CloudWatch) GetMetricDataRequest(input *GetMetricDataInput) (req *request.Request, output *GetMetricDataOutput) {
op := &request.Operation{
Name: opGetMetricData,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetMetricDataInput{}
}
output = &GetMetricDataOutput{}
req = c.newRequest(op, input, output)
return
}
// GetMetricData API operation for Amazon CloudWatch.
//
// You can use the GetMetricData API to retrieve as many as 100 different metrics
// in a single request, with a total of as many as 100,800 datapoints. You can
// also optionally perform math expressions on the values of the returned statistics,
// to create new time series that represent new insights into your data. For
// example, using Lambda metrics, you could divide the Errors metric by the
// Invocations metric to get an error rate time series. For more information
// about metric math expressions, see Metric Math Syntax and Functions (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax)
// in the Amazon CloudWatch User Guide.
//
// Calls to the GetMetricData API have a different pricing structure than calls
// to GetMetricStatistics. For more information about pricing, see Amazon CloudWatch
// Pricing (https://aws.amazon.com/cloudwatch/pricing/).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudWatch's
// API operation GetMetricData for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidNextToken "InvalidNextToken"
// The next token specified is invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricData
func (c *CloudWatch) GetMetricData(input *GetMetricDataInput) (*GetMetricDataOutput, error) {
req, out := c.GetMetricDataRequest(input)
return out, req.Send()
}
// GetMetricDataWithContext is the same as GetMetricData with the addition of
// the ability to pass a context and additional request options.
//
// See GetMetricData for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudWatch) GetMetricDataWithContext(ctx aws.Context, input *GetMetricDataInput, opts ...request.Option) (*GetMetricDataOutput, error) {
req, out := c.GetMetricDataRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetMetricStatistics = "GetMetricStatistics"
// GetMetricStatisticsRequest generates a "aws/request.Request" representing the
// client's request for the GetMetricStatistics operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@ -915,7 +1005,7 @@ const opListDashboards = "ListDashboards"
// ListDashboardsRequest generates a "aws/request.Request" representing the
// client's request for the ListDashboards operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@ -999,7 +1089,7 @@ const opListMetrics = "ListMetrics"
// ListMetricsRequest generates a "aws/request.Request" representing the
// client's request for the ListMetrics operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@ -1145,7 +1235,7 @@ const opPutDashboard = "PutDashboard"
// PutDashboardRequest generates a "aws/request.Request" representing the
// client's request for the PutDashboard operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@ -1245,7 +1335,7 @@ const opPutMetricAlarm = "PutMetricAlarm"
// PutMetricAlarmRequest generates a "aws/request.Request" representing the
// client's request for the PutMetricAlarm operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@ -1367,7 +1457,7 @@ const opPutMetricData = "PutMetricData"
// PutMetricDataRequest generates a "aws/request.Request" representing the
// client's request for the PutMetricData operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@ -1485,7 +1575,7 @@ const opSetAlarmState = "SetAlarmState"
// SetAlarmStateRequest generates a "aws/request.Request" representing the
// client's request for the SetAlarmState operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@ -2588,6 +2678,150 @@ func (s *GetDashboardOutput) SetDashboardName(v string) *GetDashboardOutput {
return s
}
type GetMetricDataInput struct {
_ struct{} `type:"structure"`
// The time stamp indicating the latest data to be returned.
//
// EndTime is a required field
EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"`
// The maximum number of data points the request should return before paginating.
// If you omit this, the default of 100,800 is used.
MaxDatapoints *int64 `type:"integer"`
// The metric queries to be returned. A single GetMetricData call can include
// as many as 100 MetricDataQuery structures. Each of these structures can specify
// either a metric to retrieve, or a math expression to perform on retrieved
// data.
//
// MetricDataQueries is a required field
MetricDataQueries []*MetricDataQuery `type:"list" required:"true"`
// Include this value, if it was returned by the previous call, to get the next
// set of data points.
NextToken *string `type:"string"`
// The order in which data points should be returned. TimestampDescending returns
// the newest data first and paginates when the MaxDatapoints limit is reached.
// TimestampAscending returns the oldest data first and paginates when the MaxDatapoints
// limit is reached.
ScanBy *string `type:"string" enum:"ScanBy"`
// The time stamp indicating the earliest data to be returned.
//
// StartTime is a required field
StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"`
}
// String returns the string representation
func (s GetMetricDataInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetMetricDataInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetMetricDataInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetMetricDataInput"}
if s.EndTime == nil {
invalidParams.Add(request.NewErrParamRequired("EndTime"))
}
if s.MetricDataQueries == nil {
invalidParams.Add(request.NewErrParamRequired("MetricDataQueries"))
}
if s.StartTime == nil {
invalidParams.Add(request.NewErrParamRequired("StartTime"))
}
if s.MetricDataQueries != nil {
for i, v := range s.MetricDataQueries {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricDataQueries", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetEndTime sets the EndTime field's value.
func (s *GetMetricDataInput) SetEndTime(v time.Time) *GetMetricDataInput {
s.EndTime = &v
return s
}
// SetMaxDatapoints sets the MaxDatapoints field's value.
func (s *GetMetricDataInput) SetMaxDatapoints(v int64) *GetMetricDataInput {
s.MaxDatapoints = &v
return s
}
// SetMetricDataQueries sets the MetricDataQueries field's value.
func (s *GetMetricDataInput) SetMetricDataQueries(v []*MetricDataQuery) *GetMetricDataInput {
s.MetricDataQueries = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *GetMetricDataInput) SetNextToken(v string) *GetMetricDataInput {
s.NextToken = &v
return s
}
// SetScanBy sets the ScanBy field's value.
func (s *GetMetricDataInput) SetScanBy(v string) *GetMetricDataInput {
s.ScanBy = &v
return s
}
// SetStartTime sets the StartTime field's value.
func (s *GetMetricDataInput) SetStartTime(v time.Time) *GetMetricDataInput {
s.StartTime = &v
return s
}
type GetMetricDataOutput struct {
_ struct{} `type:"structure"`
// The metrics that are returned, including the metric name, namespace, and
// dimensions.
MetricDataResults []*MetricDataResult `type:"list"`
// A token that marks the next batch of returned results.
NextToken *string `type:"string"`
}
// String returns the string representation
func (s GetMetricDataOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetMetricDataOutput) GoString() string {
return s.String()
}
// SetMetricDataResults sets the MetricDataResults field's value.
func (s *GetMetricDataOutput) SetMetricDataResults(v []*MetricDataResult) *GetMetricDataOutput {
s.MetricDataResults = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *GetMetricDataOutput) SetNextToken(v string) *GetMetricDataOutput {
s.NextToken = &v
return s
}
type GetMetricStatisticsInput struct {
_ struct{} `type:"structure"`
@ -2682,8 +2916,8 @@ type GetMetricStatisticsInput struct {
Statistics []*string `min:"1" type:"list"`
// The unit for a given metric. Metrics may be reported in multiple units. Not
// supplying a unit results in all units being returned. If the metric only
// ever reports one unit, specifying a unit has no effect.
// supplying a unit results in all units being returned. If you specify only
// a unit that the metric does not report, the results of the call are null.
Unit *string `type:"string" enum:"StandardUnit"`
}
@ -3009,6 +3243,39 @@ func (s *ListMetricsOutput) SetNextToken(v string) *ListMetricsOutput {
return s
}
// A message returned by the GetMetricDataAPI, including a code and a description.
type MessageData struct {
_ struct{} `type:"structure"`
// The error code or status code associated with the message.
Code *string `type:"string"`
// The message text.
Value *string `type:"string"`
}
// String returns the string representation
func (s MessageData) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s MessageData) GoString() string {
return s.String()
}
// SetCode sets the Code field's value.
func (s *MessageData) SetCode(v string) *MessageData {
s.Code = &v
return s
}
// SetValue sets the Value field's value.
func (s *MessageData) SetValue(v string) *MessageData {
s.Value = &v
return s
}
// Represents a specific metric.
type Metric struct {
_ struct{} `type:"structure"`
@ -3033,6 +3300,32 @@ func (s Metric) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *Metric) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "Metric"}
if s.MetricName != nil && len(*s.MetricName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("MetricName", 1))
}
if s.Namespace != nil && len(*s.Namespace) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Namespace", 1))
}
if s.Dimensions != nil {
for i, v := range s.Dimensions {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDimensions sets the Dimensions field's value.
func (s *Metric) SetDimensions(v []*Dimension) *Metric {
s.Dimensions = v
@ -3303,6 +3596,197 @@ func (s *MetricAlarm) SetUnit(v string) *MetricAlarm {
return s
}
// This structure indicates the metric data to return, and whether this call
// is just retrieving a batch set of data for one metric, or is performing a
// math expression on metric data. A single GetMetricData call can include up
// to 100 MetricDataQuery structures.
type MetricDataQuery struct {
_ struct{} `type:"structure"`
// The math expression to be performed on the returned data, if this structure
// is performing a math expression. For more information about metric math expressions,
// see Metric Math Syntax and Functions (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax)
// in the Amazon CloudWatch User Guide.
//
// Within one MetricDataQuery structure, you must specify either Expression
// or MetricStat but not both.
Expression *string `min:"1" type:"string"`
// A short name used to tie this structure to the results in the response. This
// name must be unique within a single call to GetMetricData. If you are performing
// math expressions on this set of data, this name represents that data and
// can serve as a variable in the mathematical expression. The valid characters
// are letters, numbers, and underscore. The first character must be a lowercase
// letter.
//
// Id is a required field
Id *string `min:"1" type:"string" required:"true"`
// A human-readable label for this metric or expression. This is especially
// useful if this is an expression, so that you know what the value represents.
// If the metric or expression is shown in a CloudWatch dashboard widget, the
// label is shown. If Label is omitted, CloudWatch generates a default.
Label *string `type:"string"`
// The metric to be returned, along with statistics, period, and units. Use
// this parameter only if this structure is performing a data retrieval and
// not performing a math expression on the returned data.
//
// Within one MetricDataQuery structure, you must specify either Expression
// or MetricStat but not both.
MetricStat *MetricStat `type:"structure"`
// Indicates whether to return the time stamps and raw data values of this metric.
// If you are performing this call just to do math expressions and do not also
// need the raw data returned, you can specify False. If you omit this, the
// default of True is used.
ReturnData *bool `type:"boolean"`
}
// String returns the string representation
func (s MetricDataQuery) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s MetricDataQuery) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *MetricDataQuery) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "MetricDataQuery"}
if s.Expression != nil && len(*s.Expression) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Expression", 1))
}
if s.Id == nil {
invalidParams.Add(request.NewErrParamRequired("Id"))
}
if s.Id != nil && len(*s.Id) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Id", 1))
}
if s.MetricStat != nil {
if err := s.MetricStat.Validate(); err != nil {
invalidParams.AddNested("MetricStat", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetExpression sets the Expression field's value.
func (s *MetricDataQuery) SetExpression(v string) *MetricDataQuery {
s.Expression = &v
return s
}
// SetId sets the Id field's value.
func (s *MetricDataQuery) SetId(v string) *MetricDataQuery {
s.Id = &v
return s
}
// SetLabel sets the Label field's value.
func (s *MetricDataQuery) SetLabel(v string) *MetricDataQuery {
s.Label = &v
return s
}
// SetMetricStat sets the MetricStat field's value.
func (s *MetricDataQuery) SetMetricStat(v *MetricStat) *MetricDataQuery {
s.MetricStat = v
return s
}
// SetReturnData sets the ReturnData field's value.
func (s *MetricDataQuery) SetReturnData(v bool) *MetricDataQuery {
s.ReturnData = &v
return s
}
// A GetMetricData call returns an array of MetricDataResult structures. Each
// of these structures includes the data points for that metric, along with
// the time stamps of those data points and other identifying information.
type MetricDataResult struct {
_ struct{} `type:"structure"`
// The short name you specified to represent this metric.
Id *string `min:"1" type:"string"`
// The human-readable label associated with the data.
Label *string `type:"string"`
// A list of messages with additional information about the data returned.
Messages []*MessageData `type:"list"`
// 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.
StatusCode *string `type:"string" enum:"StatusCode"`
// The time stamps for the data points, formatted in Unix timestamp format.
// The number of time stamps always matches the number of values and the value
// for Timestamps[x] is Values[x].
Timestamps []*time.Time `type:"list"`
// The data points for the metric corresponding to Timestamps. The number of
// values always matches the number of time stamps and the time stamp for Values[x]
// is Timestamps[x].
Values []*float64 `type:"list"`
}
// String returns the string representation
func (s MetricDataResult) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s MetricDataResult) GoString() string {
return s.String()
}
// SetId sets the Id field's value.
func (s *MetricDataResult) SetId(v string) *MetricDataResult {
s.Id = &v
return s
}
// SetLabel sets the Label field's value.
func (s *MetricDataResult) SetLabel(v string) *MetricDataResult {
s.Label = &v
return s
}
// SetMessages sets the Messages field's value.
func (s *MetricDataResult) SetMessages(v []*MessageData) *MetricDataResult {
s.Messages = v
return s
}
// SetStatusCode sets the StatusCode field's value.
func (s *MetricDataResult) SetStatusCode(v string) *MetricDataResult {
s.StatusCode = &v
return s
}
// SetTimestamps sets the Timestamps field's value.
func (s *MetricDataResult) SetTimestamps(v []*time.Time) *MetricDataResult {
s.Timestamps = v
return s
}
// SetValues sets the Values field's value.
func (s *MetricDataResult) SetValues(v []*float64) *MetricDataResult {
s.Values = v
return s
}
// Encapsulates the information sent to either create a metric or add new values
// to be aggregated into an existing metric.
type MetricDatum struct {
@ -3433,6 +3917,92 @@ func (s *MetricDatum) SetValue(v float64) *MetricDatum {
return s
}
// This structure defines the metric to be returned, along with the statistics,
// period, and units.
type MetricStat struct {
_ struct{} `type:"structure"`
// The metric to return, including the metric name, namespace, and dimensions.
//
// Metric is a required field
Metric *Metric `type:"structure" required:"true"`
// The period to use when retrieving the metric.
//
// Period is a required field
Period *int64 `min:"1" type:"integer" required:"true"`
// The statistic to return. It can include any CloudWatch statistic or extended
// statistic.
//
// Stat is a required field
Stat *string `type:"string" required:"true"`
// The unit to use for the returned data points.
Unit *string `type:"string" enum:"StandardUnit"`
}
// String returns the string representation
func (s MetricStat) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s MetricStat) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *MetricStat) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "MetricStat"}
if s.Metric == nil {
invalidParams.Add(request.NewErrParamRequired("Metric"))
}
if s.Period == nil {
invalidParams.Add(request.NewErrParamRequired("Period"))
}
if s.Period != nil && *s.Period < 1 {
invalidParams.Add(request.NewErrParamMinValue("Period", 1))
}
if s.Stat == nil {
invalidParams.Add(request.NewErrParamRequired("Stat"))
}
if s.Metric != nil {
if err := s.Metric.Validate(); err != nil {
invalidParams.AddNested("Metric", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetMetric sets the Metric field's value.
func (s *MetricStat) SetMetric(v *Metric) *MetricStat {
s.Metric = v
return s
}
// SetPeriod sets the Period field's value.
func (s *MetricStat) SetPeriod(v int64) *MetricStat {
s.Period = &v
return s
}
// SetStat sets the Stat field's value.
func (s *MetricStat) SetStat(v string) *MetricStat {
s.Stat = &v
return s
}
// SetUnit sets the Unit field's value.
func (s *MetricStat) SetUnit(v string) *MetricStat {
s.Unit = &v
return s
}
type PutDashboardInput struct {
_ struct{} `type:"structure"`
@ -3556,7 +4126,10 @@ type PutMetricAlarmInput struct {
// ComparisonOperator is a required field
ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"`
// The number of datapoints that must be breaching to trigger the alarm.
// The number of datapoints that must be breaching to trigger the alarm. This
// is used only if you are setting an "M out of N" alarm. In that case, this
// value is the M. For more information, see Evaluating an Alarm (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation)
// in the Amazon CloudWatch User Guide.
DatapointsToAlarm *int64 `min:"1" type:"integer"`
// The dimensions for the metric associated with the alarm.
@ -3573,6 +4146,10 @@ type PutMetricAlarmInput struct {
EvaluateLowSampleCountPercentile *string `min:"1" type:"string"`
// The number of periods over which data is compared to the specified threshold.
// If you are setting an alarm which requires that a number of consecutive data
// points be breaching to trigger the alarm, this value specifies that number.
// If you are setting an "M out of N" alarm, this value is the N.
//
// An alarm's total current evaluation period can be no longer than one day,
// so this number multiplied by Period cannot be more than 86,400 seconds.
//
@ -3623,7 +4200,7 @@ type PutMetricAlarmInput struct {
// values are 10, 30, and any multiple of 60.
//
// Be sure to specify 10 or 30 only for metrics that are stored by a PutMetricData
// call with a StorageResolution of 1. If you specify a Period of 10 or 30 for
// call with a StorageResolution of 1. If you specify a period of 10 or 30 for
// a metric that does not have sub-minute resolution, the alarm still attempts
// to gather data at the period rate that you specify. In this case, it does
// not receive data for the attempts that do not correspond to a one-minute
@ -4151,6 +4728,14 @@ const (
HistoryItemTypeAction = "Action"
)
const (
// ScanByTimestampDescending is a ScanBy enum value
ScanByTimestampDescending = "TimestampDescending"
// ScanByTimestampAscending is a ScanBy enum value
ScanByTimestampAscending = "TimestampAscending"
)
const (
// StandardUnitSeconds is a StandardUnit enum value
StandardUnitSeconds = "Seconds"
@ -4261,3 +4846,14 @@ const (
// StatisticMaximum is a Statistic enum value
StatisticMaximum = "Maximum"
)
const (
// StatusCodeComplete is a StatusCode enum value
StatusCodeComplete = "Complete"
// StatusCodeInternalError is a StatusCode enum value
StatusCodeInternalError = "InternalError"
// StatusCodePartialData is a StatusCode enum value
StatusCodePartialData = "PartialData"
)