diff --git a/.changelog/8bc05804dcc64ac6a7a8918c188a2cac.json b/.changelog/8bc05804dcc64ac6a7a8918c188a2cac.json new file mode 100644 index 00000000000..3de81cfebd6 --- /dev/null +++ b/.changelog/8bc05804dcc64ac6a7a8918c188a2cac.json @@ -0,0 +1,8 @@ +{ + "id": "8bc05804-dcc6-4ac6-a7a8-918c188a2cac", + "type": "feature", + "description": "This release adds support for deploying FSx for ONTAP file systems in a single Availability Zone.", + "modules": [ + "service/fsx" + ] +} \ No newline at end of file diff --git a/.changelog/f7879f9175414955b97cbfcb3a2e9120.json b/.changelog/f7879f9175414955b97cbfcb3a2e9120.json new file mode 100644 index 00000000000..7cc847c813a --- /dev/null +++ b/.changelog/f7879f9175414955b97cbfcb3a2e9120.json @@ -0,0 +1,8 @@ +{ + "id": "f7879f91-7541-4955-b97c-bfcb3a2e9120", + "type": "feature", + "description": "Adds support for additional statistics in CloudWatch Metric Streams.", + "modules": [ + "service/cloudwatch" + ] +} \ No newline at end of file diff --git a/service/cloudwatch/api_op_GetMetricData.go b/service/cloudwatch/api_op_GetMetricData.go index a3fbd4f1c6e..600528cddb6 100644 --- a/service/cloudwatch/api_op_GetMetricData.go +++ b/service/cloudwatch/api_op_GetMetricData.go @@ -13,19 +13,28 @@ import ( "time" ) -// You can use the GetMetricData API to retrieve as many as 500 different metrics -// in a single request, with a total of as many as 100,800 data points. 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 +// You can use the GetMetricData API to retrieve CloudWatch metric values. The +// operation can also include a CloudWatch Metrics Insights query, and one or more +// metric math functions. A GetMetricData operation that does not include a query +// can retrieve as many as 500 different metrics in a single request, with a total +// of as many as 100,800 data points. You can also optionally perform metric 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 // (https://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/). Amazon CloudWatch retains metric -// data as follows: +// in the Amazon CloudWatch User Guide. If you include a Metrics Insights query, +// each GetMetricData operation can include only one query. But the same +// GetMetricData operation can also retrieve other metrics. Metrics Insights +// queries can query only the most recent three hours of metric data. For more +// information about Metrics Insights, see Query your metrics with CloudWatch +// Metrics Insights +// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/query_with_cloudwatch-metrics-insights.html). +// 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/). Amazon CloudWatch retains +// metric data as follows: // // * Data points with a period of less than 60 seconds are // available for 3 hours. These data points are high-resolution metrics and are @@ -52,7 +61,15 @@ import ( // were specified when the data was reported to CloudWatch. If you specify a unit, // the operation returns only data that was collected with that unit specified. If // you specify a unit that does not match the data collected, the results of the -// operation are null. CloudWatch does not perform unit conversions. +// operation are null. CloudWatch does not perform unit conversions. Using Metrics +// Insights queries with metric math You can't mix a Metric Insights query and +// metric math syntax in the same expression, but you can reference results from a +// Metrics Insights query within other Metric math expressions. A Metrics Insights +// query without a GROUP BY clause returns a single time-series (TS), and can be +// used as input for a metric math expression that expects a single time series. A +// Metrics Insights query with a GROUP BY clause returns an array of time-series +// (TS[]), and can be used as input for a metric math expression that expects an +// array of time series. func (c *Client) GetMetricData(ctx context.Context, params *GetMetricDataInput, optFns ...func(*Options)) (*GetMetricDataOutput, error) { if params == nil { params = &GetMetricDataInput{} @@ -83,7 +100,8 @@ type GetMetricDataInput struct { // The metric queries to be returned. A single GetMetricData call can include as // many as 500 MetricDataQuery structures. Each of these structures can specify - // either a metric to retrieve, or a math expression to perform on retrieved data. + // either a metric to retrieve, a Metrics Insights query, or a math expression to + // perform on retrieved data. // // This member is required. MetricDataQueries []types.MetricDataQuery diff --git a/service/cloudwatch/api_op_GetMetricStream.go b/service/cloudwatch/api_op_GetMetricStream.go index dd4bd3295bd..609b7459071 100644 --- a/service/cloudwatch/api_op_GetMetricStream.go +++ b/service/cloudwatch/api_op_GetMetricStream.go @@ -66,7 +66,10 @@ type GetMetricStreamOutput struct { // The name of the metric stream. Name *string - // + // The output format for the stream. Valid values are json and opentelemetry0.7. + // For more information about metric stream output formats, see Metric streams + // output formats + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-metric-streams-formats.html). OutputFormat types.MetricStreamOutputFormat // The ARN of the IAM role that is used by this metric stream. @@ -75,6 +78,12 @@ type GetMetricStreamOutput struct { // The state of the metric stream. The possible values are running and stopped. State *string + // Each entry in this array displays information about one or more metrics that + // include extended statistics in the metric stream. For more information about + // extended statistics, see CloudWatch statistics definitions + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html.html). + StatisticsConfigurations []types.MetricStreamStatisticsConfiguration + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/cloudwatch/api_op_PutCompositeAlarm.go b/service/cloudwatch/api_op_PutCompositeAlarm.go index b9d3c5f7a01..ddd3df91b75 100644 --- a/service/cloudwatch/api_op_PutCompositeAlarm.go +++ b/service/cloudwatch/api_op_PutCompositeAlarm.go @@ -16,32 +16,35 @@ import ( // of other alarms that you have created. The composite alarm goes into ALARM state // only if all conditions of the rule are met. The alarms specified in a composite // alarm's rule expression can include metric alarms and other composite alarms. -// Using composite alarms can reduce alarm noise. You can create multiple metric -// alarms, and also create a composite alarm and set up alerts only for the -// composite alarm. For example, you could create a composite alarm that goes into -// ALARM state only when more than one of the underlying metric alarms are in ALARM -// state. Currently, the only alarm actions that can be taken by composite alarms -// are notifying SNS topics. It is possible to create a loop or cycle of composite -// alarms, where composite alarm A depends on composite alarm B, and composite -// alarm B also depends on composite alarm A. In this scenario, you can't delete -// any composite alarm that is part of the cycle because there is always still a -// composite alarm that depends on that alarm that you want to delete. To get out -// of such a situation, you must break the cycle by changing the rule of one of the -// composite alarms in the cycle to remove a dependency that creates the cycle. The -// simplest change to make to break a cycle is to change the AlarmRule of one of -// the alarms to False. Additionally, the evaluation of composite alarms stops if -// CloudWatch detects a cycle in the evaluation path. When this operation creates -// an alarm, the alarm state is immediately set to INSUFFICIENT_DATA. The alarm is -// then evaluated and its state is set appropriately. Any actions associated with -// the new state are then executed. For a composite alarm, this initial time after -// creation is the only time that the alarm can be in INSUFFICIENT_DATA state. When -// you update an existing alarm, its state is left unchanged, but the update -// completely overwrites the previous configuration of the alarm. To use this -// operation, you must be signed on with the cloudwatch:PutCompositeAlarm -// permission that is scoped to *. You can't create a composite alarms if your -// cloudwatch:PutCompositeAlarm permission has a narrower scope. If you are an IAM -// user, you must have iam:CreateServiceLinkedRole to create a composite alarm that -// has Systems Manager OpsItem actions. +// The rule expression of a composite alarm can include as many as 100 underlying +// alarms. Any single alarm can be included in the rule expressions of as many as +// 150 composite alarms. Using composite alarms can reduce alarm noise. You can +// create multiple metric alarms, and also create a composite alarm and set up +// alerts only for the composite alarm. For example, you could create a composite +// alarm that goes into ALARM state only when more than one of the underlying +// metric alarms are in ALARM state. Currently, the only alarm actions that can be +// taken by composite alarms are notifying SNS topics. It is possible to create a +// loop or cycle of composite alarms, where composite alarm A depends on composite +// alarm B, and composite alarm B also depends on composite alarm A. In this +// scenario, you can't delete any composite alarm that is part of the cycle because +// there is always still a composite alarm that depends on that alarm that you want +// to delete. To get out of such a situation, you must break the cycle by changing +// the rule of one of the composite alarms in the cycle to remove a dependency that +// creates the cycle. The simplest change to make to break a cycle is to change the +// AlarmRule of one of the alarms to False. Additionally, the evaluation of +// composite alarms stops if CloudWatch detects a cycle in the evaluation path. +// When this operation creates an alarm, the alarm state is immediately set to +// INSUFFICIENT_DATA. The alarm is then evaluated and its state is set +// appropriately. Any actions associated with the new state are then executed. For +// a composite alarm, this initial time after creation is the only time that the +// alarm can be in INSUFFICIENT_DATA state. When you update an existing alarm, its +// state is left unchanged, but the update completely overwrites the previous +// configuration of the alarm. To use this operation, you must be signed on with +// the cloudwatch:PutCompositeAlarm permission that is scoped to *. You can't +// create a composite alarms if your cloudwatch:PutCompositeAlarm permission has a +// narrower scope. If you are an IAM user, you must have +// iam:CreateServiceLinkedRole to create a composite alarm that has Systems Manager +// OpsItem actions. func (c *Client) PutCompositeAlarm(ctx context.Context, params *PutCompositeAlarmInput, optFns ...func(*Options)) (*PutCompositeAlarmOutput, error) { if params == nil { params = &PutCompositeAlarmInput{} diff --git a/service/cloudwatch/api_op_PutMetricStream.go b/service/cloudwatch/api_op_PutMetricStream.go index 2b2466ea14f..863d6fca6e0 100644 --- a/service/cloudwatch/api_op_PutMetricStream.go +++ b/service/cloudwatch/api_op_PutMetricStream.go @@ -29,10 +29,15 @@ import ( // * Stream // metrics from only the metric namespaces that you list in IncludeFilters. // -// When -// you use PutMetricStream to create a new metric stream, the stream is created in -// the running state. If you use it to update an existing stream, the state of the -// stream is not changed. +// By +// default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT +// statistics for each metric that is streamed. You can use the +// StatisticsConfigurations parameter to have the metric stream also send extended +// statistics in the stream. Streaming extended statistics incurs additional costs. +// For more information, see Amazon CloudWatch Pricing +// (https://aws.amazon.com/cloudwatch/pricing/). When you use PutMetricStream to +// create a new metric stream, the stream is created in the running state. If you +// use it to update an existing stream, the state of the stream is not changed. func (c *Client) PutMetricStream(ctx context.Context, params *PutMetricStreamInput, optFns ...func(*Options)) (*PutMetricStreamOutput, error) { if params == nil { params = &PutMetricStreamInput{} @@ -95,6 +100,19 @@ type PutMetricStreamInput struct { // ExcludeFilters in the same operation. IncludeFilters []types.MetricStreamFilter + // By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT + // statistics for each metric that is streamed. You can use this parameter to have + // the metric stream also send extended statistics in the stream. This array can + // have up to 100 members. For each entry in this array, you specify one or more + // metrics and the list of extended statistics to stream for those metrics. The + // extended statistics that you can stream depend on the stream's OutputFormat. If + // the OutputFormat is json, you can stream any extended statistic that is + // supported by CloudWatch, listed in CloudWatch statistics definitions + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html.html). + // If the OutputFormat is opentelemetry0.7, you can stream percentile statistics + // (p??). + StatisticsConfigurations []types.MetricStreamStatisticsConfiguration + // A list of key-value pairs to associate with the metric stream. You can associate // as many as 50 tags with a metric stream. Tags can help you organize and // categorize your resources. You can also use them to scope user permissions by diff --git a/service/cloudwatch/deserializers.go b/service/cloudwatch/deserializers.go index 5652c7d5c2b..4d2593e4ed1 100644 --- a/service/cloudwatch/deserializers.go +++ b/service/cloudwatch/deserializers.go @@ -8900,6 +8900,332 @@ func awsAwsquery_deserializeDocumentMetricStreamFiltersUnwrapped(v *[]types.Metr *v = sv return nil } +func awsAwsquery_deserializeDocumentMetricStreamStatisticsAdditionalStatistics(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("member", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentMetricStreamStatisticsAdditionalStatisticsUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentMetricStreamStatisticsConfiguration(v **types.MetricStreamStatisticsConfiguration, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.MetricStreamStatisticsConfiguration + if *v == nil { + sv = &types.MetricStreamStatisticsConfiguration{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("AdditionalStatistics", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentMetricStreamStatisticsAdditionalStatistics(&sv.AdditionalStatistics, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IncludeMetrics", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentMetricStreamStatisticsIncludeMetrics(&sv.IncludeMetrics, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentMetricStreamStatisticsConfigurations(v *[]types.MetricStreamStatisticsConfiguration, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.MetricStreamStatisticsConfiguration + if *v == nil { + sv = make([]types.MetricStreamStatisticsConfiguration, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.MetricStreamStatisticsConfiguration + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentMetricStreamStatisticsConfiguration(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentMetricStreamStatisticsConfigurationsUnwrapped(v *[]types.MetricStreamStatisticsConfiguration, decoder smithyxml.NodeDecoder) error { + var sv []types.MetricStreamStatisticsConfiguration + if *v == nil { + sv = make([]types.MetricStreamStatisticsConfiguration, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.MetricStreamStatisticsConfiguration + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentMetricStreamStatisticsConfiguration(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentMetricStreamStatisticsIncludeMetrics(v *[]types.MetricStreamStatisticsMetric, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.MetricStreamStatisticsMetric + if *v == nil { + sv = make([]types.MetricStreamStatisticsMetric, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.MetricStreamStatisticsMetric + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentMetricStreamStatisticsMetric(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentMetricStreamStatisticsIncludeMetricsUnwrapped(v *[]types.MetricStreamStatisticsMetric, decoder smithyxml.NodeDecoder) error { + var sv []types.MetricStreamStatisticsMetric + if *v == nil { + sv = make([]types.MetricStreamStatisticsMetric, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.MetricStreamStatisticsMetric + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentMetricStreamStatisticsMetric(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentMetricStreamStatisticsMetric(v **types.MetricStreamStatisticsMetric, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.MetricStreamStatisticsMetric + if *v == nil { + sv = &types.MetricStreamStatisticsMetric{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("MetricName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.MetricName = ptr.String(xtv) + } + + case strings.EqualFold("Namespace", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Namespace = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentMissingRequiredParameterException(v **types.MissingRequiredParameterException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10550,6 +10876,12 @@ func awsAwsquery_deserializeOpDocumentGetMetricStreamOutput(v **GetMetricStreamO sv.State = ptr.String(xtv) } + case strings.EqualFold("StatisticsConfigurations", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentMetricStreamStatisticsConfigurations(&sv.StatisticsConfigurations, nodeDecoder); err != nil { + return err + } + default: // Do nothing and ignore the unexpected tag element err = decoder.Decoder.Skip() diff --git a/service/cloudwatch/serializers.go b/service/cloudwatch/serializers.go index a8af86c95be..9cda2d6edcd 100644 --- a/service/cloudwatch/serializers.go +++ b/service/cloudwatch/serializers.go @@ -2801,6 +2801,87 @@ func awsAwsquery_serializeDocumentMetricStreamNames(v []string, value query.Valu return nil } +func awsAwsquery_serializeDocumentMetricStreamStatisticsAdditionalStatistics(v []string, value query.Value) error { + if len(v) == 0 { + return nil + } + array := value.Array("member") + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsquery_serializeDocumentMetricStreamStatisticsConfiguration(v *types.MetricStreamStatisticsConfiguration, value query.Value) error { + object := value.Object() + _ = object + + if v.AdditionalStatistics != nil { + objectKey := object.Key("AdditionalStatistics") + if err := awsAwsquery_serializeDocumentMetricStreamStatisticsAdditionalStatistics(v.AdditionalStatistics, objectKey); err != nil { + return err + } + } + + if v.IncludeMetrics != nil { + objectKey := object.Key("IncludeMetrics") + if err := awsAwsquery_serializeDocumentMetricStreamStatisticsIncludeMetrics(v.IncludeMetrics, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeDocumentMetricStreamStatisticsConfigurations(v []types.MetricStreamStatisticsConfiguration, value query.Value) error { + if len(v) == 0 { + return nil + } + array := value.Array("member") + + for i := range v { + av := array.Value() + if err := awsAwsquery_serializeDocumentMetricStreamStatisticsConfiguration(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsquery_serializeDocumentMetricStreamStatisticsIncludeMetrics(v []types.MetricStreamStatisticsMetric, value query.Value) error { + if len(v) == 0 { + return nil + } + array := value.Array("member") + + for i := range v { + av := array.Value() + if err := awsAwsquery_serializeDocumentMetricStreamStatisticsMetric(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsquery_serializeDocumentMetricStreamStatisticsMetric(v *types.MetricStreamStatisticsMetric, value query.Value) error { + object := value.Object() + _ = object + + if v.MetricName != nil { + objectKey := object.Key("MetricName") + objectKey.String(*v.MetricName) + } + + if v.Namespace != nil { + objectKey := object.Key("Namespace") + objectKey.String(*v.Namespace) + } + + return nil +} + func awsAwsquery_serializeDocumentRange(v *types.Range, value query.Value) error { object := value.Object() _ = object @@ -4002,6 +4083,13 @@ func awsAwsquery_serializeOpDocumentPutMetricStreamInput(v *PutMetricStreamInput objectKey.String(*v.RoleArn) } + if v.StatisticsConfigurations != nil { + objectKey := object.Key("StatisticsConfigurations") + if err := awsAwsquery_serializeDocumentMetricStreamStatisticsConfigurations(v.StatisticsConfigurations, objectKey); err != nil { + return err + } + } + if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil { diff --git a/service/cloudwatch/types/types.go b/service/cloudwatch/types/types.go index 69af52184c5..fb0360db5c1 100644 --- a/service/cloudwatch/types/types.go +++ b/service/cloudwatch/types/types.go @@ -207,14 +207,17 @@ type Datapoint struct { noSmithyDocumentSerde } -// A dimension is a name/value pair that is part of the identity of a metric. You -// can assign up to 10 dimensions to a metric. Because dimensions are part of the -// unique identifier for a metric, whenever you add a unique name/value pair to one -// of your metrics, you are creating a new variation of that metric. +// A dimension is a name/value pair that is part of the identity of a metric. +// Because dimensions are part of the unique identifier for a metric, whenever you +// add a unique name/value pair to one of your metrics, you are creating a new +// variation of that metric. For example, many Amazon EC2 metrics publish +// InstanceId as a dimension name, and the actual instance ID as the value for that +// dimension. You can assign up to 10 dimensions to a metric. type Dimension struct { - // The name of the dimension. Dimension names must contain only ASCII characters - // and must include at least one non-whitespace character. + // The name of the dimension. Dimension names must contain only ASCII characters, + // must include at least one non-whitespace character, and cannot start with a + // colon (:). // // This member is required. Name *string @@ -518,8 +521,11 @@ type MetricAlarm struct { // ANOMALY_DETECTION_BAND function used as the threshold for the alarm. ThresholdMetricId *string - // Sets how this alarm is to handle missing data points. If this parameter is - // omitted, the default behavior of missing is used. + // Sets how this alarm is to handle missing data points. The valid values are + // breaching, notBreaching, ignore, and missing. For more information, see + // Configuring how CloudWatch alarms treat missing data + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarms-and-missing-data). + // If this parameter is omitted, the default behavior of missing is used. TreatMissingData *string // The unit of the metric associated with the alarm. @@ -531,11 +537,11 @@ type MetricAlarm struct { // This structure is used in both GetMetricData and PutMetricAlarm. The supported // use of this structure is different for those two operations. When used in // GetMetricData, it 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 500 -// MetricDataQuery structures. When used in PutMetricAlarm, it enables you to -// create an alarm based on a metric math expression. Each MetricDataQuery in the -// array specifies either a metric to retrieve, or a math expression to be +// just retrieving a batch set of data for one metric, or is performing a Metrics +// Insights query or a math expression. A single GetMetricData call can include up +// to 500 MetricDataQuery structures. When used in PutMetricAlarm, it enables you +// to create an alarm based on a metric math expression. Each MetricDataQuery in +// the array specifies either a metric to retrieve, or a math expression to be // performed on retrieved metrics. A single PutMetricAlarm call can include up to // 20 MetricDataQuery structures in the array. The 20 structures can include as // many as 10 structures that contain a MetricStat parameter to retrieve a metric, @@ -565,11 +571,14 @@ type MetricDataQuery struct { // GetMetricData operations. AccountId *string - // The math expression to be performed on the returned data, if this object is - // performing a math expression. This expression can use the Id of the other - // metrics to refer to those metrics, and can also use the Id of other expressions - // to use the result of those expressions. For more information about metric math - // expressions, see Metric Math Syntax and Functions + // This field can contain either a Metrics Insights query, or a metric math + // expression to be performed on the returned data. For more information about + // Metrics Insights queries, see Metrics Insights query components and syntax + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch-metrics-insights-querylanguage) + // in the Amazon CloudWatch User Guide. A math expression can use the Id of the + // other metrics or queries to refer to those metrics, and can also use the Id of + // other expressions to use the result of those expressions. For more information + // about metric math expressions, see Metric Math Syntax and Functions // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax) // in the Amazon CloudWatch User Guide. Within each MetricDataQuery object, you // must specify either Expression or MetricStat but not both. @@ -811,6 +820,56 @@ type MetricStreamFilter struct { noSmithyDocumentSerde } +// By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT +// statistics for each metric that is streamed. This structure contains information +// for one metric that includes extended statistics in the stream. For more +// information about extended statistics, see CloudWatch, listed in CloudWatch +// statistics definitions +// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html.html). +type MetricStreamStatisticsConfiguration struct { + + // The list of extended statistics that are to be streamed for the metrics listed + // in the IncludeMetrics array in this structure. This list can include as many as + // 20 statistics. If the OutputFormat for the stream is opentelemetry0.7, the only + // valid values are p?? percentile statistics such as p90, p99 and so on. If the + // OutputFormat for the stream is json, the valid values are include the + // abbreviations for all of the extended statistics listed in CloudWatch + // statistics definitions + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html.html). + // For example, this includes tm98, wm90, PR(:300), and so on. + // + // This member is required. + AdditionalStatistics []string + + // An array of metric name and namespace pairs that stream the extended statistics + // listed in the value of the AdditionalStatistics parameter. There can be as many + // as 100 pairs in the array. All metrics that match the combination of metric name + // and namespace will be streamed with the extended statistics, no matter their + // dimensions. + // + // This member is required. + IncludeMetrics []MetricStreamStatisticsMetric + + noSmithyDocumentSerde +} + +// This object contains the information for one metric that is to streamed with +// extended statistics. +type MetricStreamStatisticsMetric struct { + + // The name of the metric. + // + // This member is required. + MetricName *string + + // The metric namespace for the metric. + // + // This member is required. + Namespace *string + + noSmithyDocumentSerde +} + // This array is empty if the API operation was successful for all the rules // specified in the request. If the operation could not process one of the rules, // the following data is returned for each of those rules. diff --git a/service/cloudwatch/validators.go b/service/cloudwatch/validators.go index b38172d34c2..df14e800c8c 100644 --- a/service/cloudwatch/validators.go +++ b/service/cloudwatch/validators.go @@ -993,6 +993,80 @@ func validateMetricStat(v *types.MetricStat) error { } } +func validateMetricStreamStatisticsConfiguration(v *types.MetricStreamStatisticsConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetricStreamStatisticsConfiguration"} + if v.IncludeMetrics == nil { + invalidParams.Add(smithy.NewErrParamRequired("IncludeMetrics")) + } else if v.IncludeMetrics != nil { + if err := validateMetricStreamStatisticsIncludeMetrics(v.IncludeMetrics); err != nil { + invalidParams.AddNested("IncludeMetrics", err.(smithy.InvalidParamsError)) + } + } + if v.AdditionalStatistics == nil { + invalidParams.Add(smithy.NewErrParamRequired("AdditionalStatistics")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMetricStreamStatisticsConfigurations(v []types.MetricStreamStatisticsConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetricStreamStatisticsConfigurations"} + for i := range v { + if err := validateMetricStreamStatisticsConfiguration(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMetricStreamStatisticsIncludeMetrics(v []types.MetricStreamStatisticsMetric) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetricStreamStatisticsIncludeMetrics"} + for i := range v { + if err := validateMetricStreamStatisticsMetric(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMetricStreamStatisticsMetric(v *types.MetricStreamStatisticsMetric) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetricStreamStatisticsMetric"} + if v.Namespace == nil { + invalidParams.Add(smithy.NewErrParamRequired("Namespace")) + } + if v.MetricName == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetricName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateRange(v *types.Range) error { if v == nil { return nil @@ -1608,6 +1682,11 @@ func validateOpPutMetricStreamInput(v *PutMetricStreamInput) error { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } + if v.StatisticsConfigurations != nil { + if err := validateMetricStreamStatisticsConfigurations(v.StatisticsConfigurations); err != nil { + invalidParams.AddNested("StatisticsConfigurations", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/fsx/types/enums.go b/service/fsx/types/enums.go index 6b3a7f17a3a..1c4737979dc 100644 --- a/service/fsx/types/enums.go +++ b/service/fsx/types/enums.go @@ -504,7 +504,8 @@ type OntapDeploymentType string // Enum values for OntapDeploymentType const ( - OntapDeploymentTypeMultiAz1 OntapDeploymentType = "MULTI_AZ_1" + OntapDeploymentTypeMultiAz1 OntapDeploymentType = "MULTI_AZ_1" + OntapDeploymentTypeSingleAz1 OntapDeploymentType = "SINGLE_AZ_1" ) // Values returns all known values for OntapDeploymentType. Note that this can be @@ -513,6 +514,7 @@ const ( func (OntapDeploymentType) Values() []OntapDeploymentType { return []OntapDeploymentType{ "MULTI_AZ_1", + "SINGLE_AZ_1", } } diff --git a/service/fsx/types/types.go b/service/fsx/types/types.go index 86feabddd40..c1545ccac37 100644 --- a/service/fsx/types/types.go +++ b/service/fsx/types/types.go @@ -584,7 +584,18 @@ type CreateFileSystemLustreConfiguration struct { type CreateFileSystemOntapConfiguration struct { // Specifies the FSx for ONTAP file system deployment type to use in creating the - // file system. MULTI_AZ_1 is the supported ONTAP deployment type. + // file system. + // + // * MULTI_AZ_1 - (Default) A high availability file system + // configured for Multi-AZ redundancy to tolerate temporary Availability Zone (AZ) + // unavailability. + // + // * SINGLE_AZ_1 - A file system configured for Single-AZ + // redundancy. + // + // For information about the use cases for Multi-AZ and Single-AZ + // deployments, refer to Choosing Multi-AZ or Single-AZ file system deployment + // (https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/high-availability-multiAZ.html). // // This member is required. DeploymentType OntapDeploymentType @@ -608,11 +619,11 @@ type CreateFileSystemOntapConfiguration struct { // The SSD IOPS configuration for the FSx for ONTAP file system. DiskIopsConfiguration *DiskIopsConfiguration - // Specifies the IP address range in which the endpoints to access your file system - // will be created. By default, Amazon FSx selects an unused IP address range for - // you from the 198.19.* range. The Endpoint IP address range you select for your - // file system must exist outside the VPC's CIDR range and must be at least /30 or - // larger. + // (Multi-AZ only) Specifies the IP address range in which the endpoints to access + // your file system will be created. By default, Amazon FSx selects an unused IP + // address range for you from the 198.19.* range. The Endpoint IP address range you + // select for your file system must exist outside the VPC's CIDR range and must be + // at least /30 or larger. EndpointIpAddressRange *string // The ONTAP administrative password for the fsxadmin user with which you @@ -623,10 +634,10 @@ type CreateFileSystemOntapConfiguration struct { // which you want the preferred file server to be located. PreferredSubnetId *string - // Specifies the virtual private cloud (VPC) route tables in which your file - // system's endpoints will be created. You should specify all VPC route tables - // associated with the subnets in which your clients are located. By default, - // Amazon FSx selects your VPC's default route table. + // (Multi-AZ only) Specifies the virtual private cloud (VPC) route tables in which + // your file system's endpoints will be created. You should specify all VPC route + // tables associated with the subnets in which your clients are located. By + // default, Amazon FSx selects your VPC's default route table. RouteTableIds []string // A recurring weekly time, in the format D:HH:MM. D is the day of the week, for @@ -1937,18 +1948,30 @@ type OntapFileSystemConfiguration struct { // specifies 5 AM daily. DailyAutomaticBackupStartTime *string - // The ONTAP file system deployment type. + // Specifies the FSx for ONTAP file system deployment type in use in the file + // system. + // + // * MULTI_AZ_1 - (Default) A high availability file system configured for + // Multi-AZ redundancy to tolerate temporary Availability Zone (AZ) + // unavailability. + // + // * SINGLE_AZ_1 - A file system configured for Single-AZ + // redundancy. + // + // For information about the use cases for Multi-AZ and Single-AZ + // deployments, refer to Choosing Multi-AZ or Single-AZ file system deployment + // (https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/high-availability-multiAZ.html). DeploymentType OntapDeploymentType // The SSD IOPS configuration for the ONTAP file system, specifying the number of // provisioned IOPS and the provision mode. DiskIopsConfiguration *DiskIopsConfiguration - // The IP address range in which the endpoints to access your file system are - // created. The Endpoint IP address range you select for your file system must - // exist outside the VPC's CIDR range and must be at least /30 or larger. If you do - // not specify this optional parameter, Amazon FSx will automatically select a CIDR - // block for you. + // (Multi-AZ only) The IP address range in which the endpoints to access your file + // system are created. The Endpoint IP address range you select for your file + // system must exist outside the VPC's CIDR range and must be at least /30 or + // larger. If you do not specify this optional parameter, Amazon FSx will + // automatically select a CIDR block for you. EndpointIpAddressRange *string // The Management and Intercluster endpoints that are used to access data or to @@ -1962,7 +1985,8 @@ type OntapFileSystemConfiguration struct { // Amazon VPC User Guide. PreferredSubnetId *string - // The VPC route tables in which your file system's endpoints are created. + // (Multi-AZ only) The VPC route tables in which your file system's endpoints are + // created. RouteTableIds []string // The sustained throughput of an Amazon FSx file system in Megabytes per second