From cc6589758306fb4c877c9b4d232a2a3512df79b6 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Wed, 14 Dec 2022 19:17:15 +0000 Subject: [PATCH] Regenerated Clients --- .../325319614c9345648efd4656aea71b1f.json | 8 + .../36fb61ebb0f549288791a87a0ab5d250.json | 8 + .../3f0c048027434765bb044e506f9ca327.json | 8 + .../edc336e0ca984d878ab3e2061d7915b2.json | 8 + .../f7664cd488ea45c9af4183a21e954082.json | 8 + .../cloudwatch/api_op_GetMetricStatistics.go | 4 +- .../cloudwatch/api_op_GetMetricWidgetImage.go | 5 +- service/cloudwatch/api_op_PutMetricAlarm.go | 36 ++- service/cloudwatch/deserializers.go | 30 ++ service/cloudwatch/types/enums.go | 16 + service/cloudwatch/types/types.go | 13 +- .../api_op_CreateAnomalySubscription.go | 6 +- service/costexplorer/api_op_GetAnomalies.go | 3 +- .../costexplorer/api_op_GetCostCategories.go | 103 +++++-- .../costexplorer/api_op_GetDimensionValues.go | 103 +++++-- ...op_GetReservationPurchaseRecommendation.go | 103 +++++-- .../api_op_GetRightsizingRecommendation.go | 103 +++++-- service/costexplorer/api_op_GetTags.go | 103 +++++-- .../api_op_UpdateAnomalySubscription.go | 37 ++- service/costexplorer/deserializers.go | 107 +++++++ service/costexplorer/serializers.go | 14 + service/costexplorer/types/enums.go | 84 +++--- service/costexplorer/types/types.go | 280 +++++++++++++----- service/costexplorer/validators.go | 3 - service/kms/internal/endpoints/endpoints.go | 9 + ...op_StartOrganizationServiceAccessUpdate.go | 2 +- service/networkmanager/deserializers.go | 9 + service/networkmanager/serializers.go | 5 + service/networkmanager/types/types.go | 5 + service/redshiftdata/api_client.go | 20 ++ .../api_op_BatchExecuteStatement.go | 55 +++- .../redshiftdata/api_op_CancelStatement.go | 6 +- .../redshiftdata/api_op_DescribeStatement.go | 5 +- service/redshiftdata/api_op_DescribeTable.go | 6 + .../redshiftdata/api_op_ExecuteStatement.go | 47 +++ .../redshiftdata/api_op_GetStatementResult.go | 5 +- service/redshiftdata/api_op_ListDatabases.go | 6 + service/redshiftdata/api_op_ListSchemas.go | 6 + service/redshiftdata/api_op_ListStatements.go | 5 +- service/redshiftdata/api_op_ListTables.go | 8 +- service/redshiftdata/doc.go | 2 +- service/redshiftdata/serializers.go | 10 + service/redshiftdata/types/types.go | 2 +- .../api_op_BatchPutMetrics.go | 8 +- service/sagemakermetrics/types/types.go | 16 +- 45 files changed, 1126 insertions(+), 304 deletions(-) create mode 100644 .changelog/325319614c9345648efd4656aea71b1f.json create mode 100644 .changelog/36fb61ebb0f549288791a87a0ab5d250.json create mode 100644 .changelog/3f0c048027434765bb044e506f9ca327.json create mode 100644 .changelog/edc336e0ca984d878ab3e2061d7915b2.json create mode 100644 .changelog/f7664cd488ea45c9af4183a21e954082.json diff --git a/.changelog/325319614c9345648efd4656aea71b1f.json b/.changelog/325319614c9345648efd4656aea71b1f.json new file mode 100644 index 00000000000..c7e0d767e89 --- /dev/null +++ b/.changelog/325319614c9345648efd4656aea71b1f.json @@ -0,0 +1,8 @@ +{ + "id": "32531961-4c93-4564-8efd-4656aea71b1f", + "type": "feature", + "description": "Appliance Mode support for AWS Cloud WAN.", + "modules": [ + "service/networkmanager" + ] +} \ No newline at end of file diff --git a/.changelog/36fb61ebb0f549288791a87a0ab5d250.json b/.changelog/36fb61ebb0f549288791a87a0ab5d250.json new file mode 100644 index 00000000000..d2438d5d487 --- /dev/null +++ b/.changelog/36fb61ebb0f549288791a87a0ab5d250.json @@ -0,0 +1,8 @@ +{ + "id": "36fb61eb-b0f5-4928-8791-a87a0ab5d250", + "type": "feature", + "description": "This release adds a new --client-token field to ExecuteStatement and BatchExecuteStatement operations. Customers can now run queries with the additional client token parameter to ensures idempotency.", + "modules": [ + "service/redshiftdata" + ] +} \ No newline at end of file diff --git a/.changelog/3f0c048027434765bb044e506f9ca327.json b/.changelog/3f0c048027434765bb044e506f9ca327.json new file mode 100644 index 00000000000..e16845acc23 --- /dev/null +++ b/.changelog/3f0c048027434765bb044e506f9ca327.json @@ -0,0 +1,8 @@ +{ + "id": "3f0c0480-2743-4765-bb04-4e506f9ca327", + "type": "documentation", + "description": "Update SageMaker Metrics documentation.", + "modules": [ + "service/sagemakermetrics" + ] +} \ No newline at end of file diff --git a/.changelog/edc336e0ca984d878ab3e2061d7915b2.json b/.changelog/edc336e0ca984d878ab3e2061d7915b2.json new file mode 100644 index 00000000000..e808fd0563f --- /dev/null +++ b/.changelog/edc336e0ca984d878ab3e2061d7915b2.json @@ -0,0 +1,8 @@ +{ + "id": "edc336e0-ca98-4d87-8ab3-e2061d7915b2", + "type": "feature", + "description": "This release supports percentage-based thresholds on Cost Anomaly Detection alert subscriptions.", + "modules": [ + "service/costexplorer" + ] +} \ No newline at end of file diff --git a/.changelog/f7664cd488ea45c9af4183a21e954082.json b/.changelog/f7664cd488ea45c9af4183a21e954082.json new file mode 100644 index 00000000000..36f79d613e2 --- /dev/null +++ b/.changelog/f7664cd488ea45c9af4183a21e954082.json @@ -0,0 +1,8 @@ +{ + "id": "f7664cd4-88ea-45c9-af41-83a21e954082", + "type": "feature", + "description": "Adding support for Metrics Insights Alarms", + "modules": [ + "service/cloudwatch" + ] +} \ No newline at end of file diff --git a/service/cloudwatch/api_op_GetMetricStatistics.go b/service/cloudwatch/api_op_GetMetricStatistics.go index 4aa58cc521c..107f1e3ff80 100644 --- a/service/cloudwatch/api_op_GetMetricStatistics.go +++ b/service/cloudwatch/api_op_GetMetricStatistics.go @@ -13,9 +13,7 @@ import ( ) // Gets statistics for the specified metric. The maximum number of data points -// returned from a single call is 1,440. If -// -// you request more than 1,440 data +// returned from a single call is 1,440. If you request more than 1,440 data // points, CloudWatch returns an error. To reduce the number of data points, you // can narrow the specified time range and make multiple requests across adjacent // time ranges, or you can increase the specified period. Data points are not diff --git a/service/cloudwatch/api_op_GetMetricWidgetImage.go b/service/cloudwatch/api_op_GetMetricWidgetImage.go index 3331987d370..d5a53b56aad 100644 --- a/service/cloudwatch/api_op_GetMetricWidgetImage.go +++ b/service/cloudwatch/api_op_GetMetricWidgetImage.go @@ -55,10 +55,9 @@ type GetMetricWidgetImageInput struct { // The format of the resulting image. Only PNG images are supported. The default is // png. If you specify png, the API returns an HTTP response with the content-type // set to text/xml. The image data is in a MetricWidgetImage field. For example: - // + // > // - // - // iVBORw0KGgoAAAANSUhEUgAAAlgAAAGQEAYAAAAip... + // iVBORw0KGgoAAAANSUhEUgAAAlgAAAGQEAYAAAAip... // // // 6f0d4192-4d42-11e8-82c1-f539a07e0e3b diff --git a/service/cloudwatch/api_op_PutMetricAlarm.go b/service/cloudwatch/api_op_PutMetricAlarm.go index bca35f7cc45..b6378e10cc6 100644 --- a/service/cloudwatch/api_op_PutMetricAlarm.go +++ b/service/cloudwatch/api_op_PutMetricAlarm.go @@ -12,25 +12,29 @@ import ( ) // Creates or updates an alarm and associates it with the specified metric, metric -// math expression, or anomaly detection model. Alarms based on anomaly detection -// models cannot have Auto Scaling actions. 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. When you update an existing alarm, its state is -// left unchanged, but the update completely overwrites the previous configuration -// of the alarm. If you are an IAM user, you must have Amazon EC2 permissions for -// some alarm operations: +// math expression, anomaly detection model, or Metrics Insights query. For more +// information about using a Metrics Insights query for an alarm, see Create alarms +// on Metrics Insights queries +// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create_Metrics_Insights_Alarm.html). +// Alarms based on anomaly detection models cannot have Auto Scaling actions. 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. When +// you update an existing alarm, its state is left unchanged, but the update +// completely overwrites the previous configuration of the alarm. If you are an IAM +// user, you must have Amazon EC2 permissions for some alarm operations: // -// * The iam:CreateServiceLinkedRole for all alarms with -// EC2 actions +// * The +// iam:CreateServiceLinkedRole for all alarms with EC2 actions // -// * The iam:CreateServiceLinkedRole to create an alarm with Systems -// Manager OpsItem actions. +// * The +// iam:CreateServiceLinkedRole to create an alarm with Systems Manager OpsItem +// actions. // -// The first time you create an alarm in the Amazon Web -// Services Management Console, the CLI, or by using the PutMetricAlarm API, -// CloudWatch creates the necessary service-linked role for you. The service-linked -// roles are called AWSServiceRoleForCloudWatchEvents and +// The first time you create an alarm in the Amazon Web Services +// Management Console, the CLI, or by using the PutMetricAlarm API, CloudWatch +// creates the necessary service-linked role for you. The service-linked roles are +// called AWSServiceRoleForCloudWatchEvents and // AWSServiceRoleForCloudWatchAlarms_ActionSSM. For more information, see Amazon // Web Services service-linked role // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role). diff --git a/service/cloudwatch/deserializers.go b/service/cloudwatch/deserializers.go index 6dc426b23b6..0e312962eda 100644 --- a/service/cloudwatch/deserializers.go +++ b/service/cloudwatch/deserializers.go @@ -8209,6 +8209,19 @@ func awsAwsquery_deserializeDocumentMetricAlarm(v **types.MetricAlarm, decoder s sv.EvaluationPeriods = ptr.Int32(int32(i64)) } + case strings.EqualFold("EvaluationState", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.EvaluationState = types.EvaluationState(xtv) + } + case strings.EqualFold("ExtendedStatistic", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -8309,6 +8322,23 @@ func awsAwsquery_deserializeDocumentMetricAlarm(v **types.MetricAlarm, decoder s sv.StateReasonData = ptr.String(xtv) } + case strings.EqualFold("StateTransitionedTimestamp", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.StateTransitionedTimestamp = ptr.Time(t) + } + case strings.EqualFold("StateUpdatedTimestamp", t.Name.Local): val, err := decoder.Value() if err != nil { diff --git a/service/cloudwatch/types/enums.go b/service/cloudwatch/types/enums.go index 53c620d26bd..8ae0712b54c 100644 --- a/service/cloudwatch/types/enums.go +++ b/service/cloudwatch/types/enums.go @@ -106,6 +106,22 @@ func (ComparisonOperator) Values() []ComparisonOperator { } } +type EvaluationState string + +// Enum values for EvaluationState +const ( + EvaluationStatePartialData EvaluationState = "PARTIAL_DATA" +) + +// Values returns all known values for EvaluationState. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (EvaluationState) Values() []EvaluationState { + return []EvaluationState{ + "PARTIAL_DATA", + } +} + type HistoryItemType string // Enum values for HistoryItemType diff --git a/service/cloudwatch/types/types.go b/service/cloudwatch/types/types.go index fbf1d72fa35..d46095d4811 100644 --- a/service/cloudwatch/types/types.go +++ b/service/cloudwatch/types/types.go @@ -573,6 +573,13 @@ type MetricAlarm struct { // The number of periods over which data is compared to the specified threshold. EvaluationPeriods *int32 + // If the value of this field is PARTIAL_DATA, the alarm is being evaluated based + // on only partial data. This happens if the query used for the alarm returns more + // than 10,000 metrics. For more information, see Create alarms on Metrics Insights + // queries + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create_Metrics_Insights_Alarm.html). + EvaluationState EvaluationState + // The percentile statistic for the metric associated with the alarm. Specify a // value between p0.0 and p100. ExtendedStatistic *string @@ -608,7 +615,11 @@ type MetricAlarm struct { // An explanation for the alarm state, in JSON format. StateReasonData *string - // The time stamp of the last update to the alarm state. + // The date and time that the alarm's StateValue most recently changed. + StateTransitionedTimestamp *time.Time + + // The time stamp of the last update to the value of either the StateValue or + // EvaluationState parameters. StateUpdatedTimestamp *time.Time // The state value for the alarm. diff --git a/service/costexplorer/api_op_CreateAnomalySubscription.go b/service/costexplorer/api_op_CreateAnomalySubscription.go index af5cbe156a1..d2ad6ee5d31 100644 --- a/service/costexplorer/api_op_CreateAnomalySubscription.go +++ b/service/costexplorer/api_op_CreateAnomalySubscription.go @@ -11,10 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Adds a subscription to a cost anomaly detection monitor. You can use each +// Adds an alert subscription to a cost anomaly detection monitor. You can use each // subscription to define subscribers with email or SNS notifications. Email -// subscribers can set a dollar threshold and a time frequency for receiving -// notifications. +// subscribers can set an absolute or percentage threshold and a time frequency for +// receiving notifications. func (c *Client) CreateAnomalySubscription(ctx context.Context, params *CreateAnomalySubscriptionInput, optFns ...func(*Options)) (*CreateAnomalySubscriptionOutput, error) { if params == nil { params = &CreateAnomalySubscriptionInput{} diff --git a/service/costexplorer/api_op_GetAnomalies.go b/service/costexplorer/api_op_GetAnomalies.go index 218b92d129a..b7dbe073fce 100644 --- a/service/costexplorer/api_op_GetAnomalies.go +++ b/service/costexplorer/api_op_GetAnomalies.go @@ -12,7 +12,8 @@ import ( ) // Retrieves all of the cost anomalies detected on your account during the time -// period that's specified by the DateInterval object. +// period that's specified by the DateInterval object. Anomalies are available for +// up to 90 days. func (c *Client) GetAnomalies(ctx context.Context, params *GetAnomaliesInput, optFns ...func(*Options)) (*GetAnomaliesOutput, error) { if params == nil { params = &GetAnomaliesInput{} diff --git a/service/costexplorer/api_op_GetCostCategories.go b/service/costexplorer/api_op_GetCostCategories.go index 3758c149485..4d72ef69597 100644 --- a/service/costexplorer/api_op_GetCostCategories.go +++ b/service/costexplorer/api_op_GetCostCategories.go @@ -39,37 +39,82 @@ type GetCostCategoriesInput struct { // The unique name of the Cost Category. CostCategoryName *string - // Use Expression to filter by cost or by usage. There are two patterns: + // Use Expression to filter in various Cost Explorer APIs. Not all Expression types + // are supported in each API. Refer to the documentation for each specific API to + // see what is supported. There are two patterns: // - // * Simple - // dimension values - You can set the dimension name and values for the filters - // that you plan to use. For example, you can filter for REGION==us-east-1 OR + // * Simple dimension values. + // + // * + // There are three types of simple dimension values: CostCategories, Tags, and + // Dimensions. + // + // * Specify the CostCategories field to define a filter that acts on + // Cost Categories. + // + // * Specify the Tags field to define a filter that acts on Cost + // Allocation Tags. + // + // * Specify the Dimensions field to define a filter that acts on + // the DimensionValues + // (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_DimensionValues.html). + // + // * + // For each filter type, you can set the dimension name and values for the filters + // that you plan to use. + // + // * For example, you can filter for REGION==us-east-1 OR // REGION==us-west-1. For GetRightsizingRecommendation, the Region is a full name - // (for example, REGION==US East (N. Virginia). The Expression example is as - // follows: { "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” - // ] } } The list of dimension values are OR'd together to retrieve cost or usage - // data. You can create Expression and DimensionValues objects using either with* - // methods or set* methods in multiple lines. - // - // * Compound dimension values with - // logical operations - You can use multiple Expression types and the logical - // operators AND/OR/NOT to create a list of one or more Expression objects. By - // doing this, you can filter on more advanced options. For example, you can filter - // on ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND - // (USAGE_TYPE != DataTransfer). The Expression for that is as follows: { "And": [ - // {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" - // ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": - // {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] } - // Because each Expression can have only one operator, the service returns an error - // if more than one is specified. The following example shows an Expression object - // that creates an error. { "And": [ ... ], "DimensionValues": { "Dimension": - // "USAGE_TYPE", "Values": [ "DataTransfer" ] } } - // - // For the - // GetRightsizingRecommendation action, a combination of OR and NOT isn't - // supported. OR isn't supported between different dimensions, or dimensions and - // tags. NOT operators aren't supported. Dimensions are also limited to - // LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. For the + // (for example, REGION==US East (N. Virginia). + // + // * The corresponding Expression for + // this example is as follows: { "Dimensions": { "Key": "REGION", "Values": [ + // "us-east-1", “us-west-1” ] } } + // + // * As shown in the previous example, lists of + // dimension values are combined with OR when applying the filter. + // + // * You can also + // set different match options to further control how the filter behaves. Not all + // APIs support match options. Refer to the documentation for each specific API to + // see what is supported. + // + // * For example, you can filter for linked account names + // that start with “a”. + // + // * The corresponding Expression for this example is as + // follows: { "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ + // "STARTS_WITH" ], "Values": [ "a" ] } } + // + // * Compound Expression types with logical + // operations. + // + // * You can use multiple Expression types and the logical operators + // AND/OR/NOT to create a list of one or more Expression objects. By doing this, + // you can filter by more advanced options. + // + // * For example, you can filter by + // ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND + // (USAGE_TYPE != DataTransfer). + // + // * The corresponding Expression for this example + // is as follows: { "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ + // "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] + // } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] + // }}} ] } + // + // Because each Expression can have only one operator, the service returns + // an error if more than one is specified. The following example shows an + // Expression object that creates an error: { "And": [ ... ], "Dimensions": { + // "Key": "USAGE_TYPE", "Values": [ "DataTransfer" ] } } The following is an + // example of the corresponding error message: "Expression has more than one roots. + // Only one root operator is allowed for each expression: And, Or, Not, Dimensions, + // Tags, CostCategories" + // + // For the GetRightsizingRecommendation action, a + // combination of OR and NOT isn't supported. OR isn't supported between different + // dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions + // are also limited to LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. For the // GetReservationPurchaseRecommendation action, only NOT is supported. AND and OR // aren't supported. Dimensions are limited to LINKED_ACCOUNT. Filter *types.Expression diff --git a/service/costexplorer/api_op_GetDimensionValues.go b/service/costexplorer/api_op_GetDimensionValues.go index b6a3a532a2a..6bd4585d084 100644 --- a/service/costexplorer/api_op_GetDimensionValues.go +++ b/service/costexplorer/api_op_GetDimensionValues.go @@ -199,37 +199,82 @@ type GetDimensionValuesInput struct { // Savings Plans. Context types.Context - // Use Expression to filter by cost or by usage. There are two patterns: + // Use Expression to filter in various Cost Explorer APIs. Not all Expression types + // are supported in each API. Refer to the documentation for each specific API to + // see what is supported. There are two patterns: // - // * Simple - // dimension values - You can set the dimension name and values for the filters - // that you plan to use. For example, you can filter for REGION==us-east-1 OR + // * Simple dimension values. + // + // * + // There are three types of simple dimension values: CostCategories, Tags, and + // Dimensions. + // + // * Specify the CostCategories field to define a filter that acts on + // Cost Categories. + // + // * Specify the Tags field to define a filter that acts on Cost + // Allocation Tags. + // + // * Specify the Dimensions field to define a filter that acts on + // the DimensionValues + // (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_DimensionValues.html). + // + // * + // For each filter type, you can set the dimension name and values for the filters + // that you plan to use. + // + // * For example, you can filter for REGION==us-east-1 OR // REGION==us-west-1. For GetRightsizingRecommendation, the Region is a full name - // (for example, REGION==US East (N. Virginia). The Expression example is as - // follows: { "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” - // ] } } The list of dimension values are OR'd together to retrieve cost or usage - // data. You can create Expression and DimensionValues objects using either with* - // methods or set* methods in multiple lines. - // - // * Compound dimension values with - // logical operations - You can use multiple Expression types and the logical - // operators AND/OR/NOT to create a list of one or more Expression objects. By - // doing this, you can filter on more advanced options. For example, you can filter - // on ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND - // (USAGE_TYPE != DataTransfer). The Expression for that is as follows: { "And": [ - // {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" - // ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": - // {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] } - // Because each Expression can have only one operator, the service returns an error - // if more than one is specified. The following example shows an Expression object - // that creates an error. { "And": [ ... ], "DimensionValues": { "Dimension": - // "USAGE_TYPE", "Values": [ "DataTransfer" ] } } - // - // For the - // GetRightsizingRecommendation action, a combination of OR and NOT isn't - // supported. OR isn't supported between different dimensions, or dimensions and - // tags. NOT operators aren't supported. Dimensions are also limited to - // LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. For the + // (for example, REGION==US East (N. Virginia). + // + // * The corresponding Expression for + // this example is as follows: { "Dimensions": { "Key": "REGION", "Values": [ + // "us-east-1", “us-west-1” ] } } + // + // * As shown in the previous example, lists of + // dimension values are combined with OR when applying the filter. + // + // * You can also + // set different match options to further control how the filter behaves. Not all + // APIs support match options. Refer to the documentation for each specific API to + // see what is supported. + // + // * For example, you can filter for linked account names + // that start with “a”. + // + // * The corresponding Expression for this example is as + // follows: { "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ + // "STARTS_WITH" ], "Values": [ "a" ] } } + // + // * Compound Expression types with logical + // operations. + // + // * You can use multiple Expression types and the logical operators + // AND/OR/NOT to create a list of one or more Expression objects. By doing this, + // you can filter by more advanced options. + // + // * For example, you can filter by + // ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND + // (USAGE_TYPE != DataTransfer). + // + // * The corresponding Expression for this example + // is as follows: { "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ + // "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] + // } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] + // }}} ] } + // + // Because each Expression can have only one operator, the service returns + // an error if more than one is specified. The following example shows an + // Expression object that creates an error: { "And": [ ... ], "Dimensions": { + // "Key": "USAGE_TYPE", "Values": [ "DataTransfer" ] } } The following is an + // example of the corresponding error message: "Expression has more than one roots. + // Only one root operator is allowed for each expression: And, Or, Not, Dimensions, + // Tags, CostCategories" + // + // For the GetRightsizingRecommendation action, a + // combination of OR and NOT isn't supported. OR isn't supported between different + // dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions + // are also limited to LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. For the // GetReservationPurchaseRecommendation action, only NOT is supported. AND and OR // aren't supported. Dimensions are limited to LINKED_ACCOUNT. Filter *types.Expression diff --git a/service/costexplorer/api_op_GetReservationPurchaseRecommendation.go b/service/costexplorer/api_op_GetReservationPurchaseRecommendation.go index e921a2fec4b..23a427a18c9 100644 --- a/service/costexplorer/api_op_GetReservationPurchaseRecommendation.go +++ b/service/costexplorer/api_op_GetReservationPurchaseRecommendation.go @@ -59,37 +59,82 @@ type GetReservationPurchaseRecommendationInput struct { // calculated for individual member accounts only. AccountScope types.AccountScope - // Use Expression to filter by cost or by usage. There are two patterns: + // Use Expression to filter in various Cost Explorer APIs. Not all Expression types + // are supported in each API. Refer to the documentation for each specific API to + // see what is supported. There are two patterns: // - // * Simple - // dimension values - You can set the dimension name and values for the filters - // that you plan to use. For example, you can filter for REGION==us-east-1 OR + // * Simple dimension values. + // + // * + // There are three types of simple dimension values: CostCategories, Tags, and + // Dimensions. + // + // * Specify the CostCategories field to define a filter that acts on + // Cost Categories. + // + // * Specify the Tags field to define a filter that acts on Cost + // Allocation Tags. + // + // * Specify the Dimensions field to define a filter that acts on + // the DimensionValues + // (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_DimensionValues.html). + // + // * + // For each filter type, you can set the dimension name and values for the filters + // that you plan to use. + // + // * For example, you can filter for REGION==us-east-1 OR // REGION==us-west-1. For GetRightsizingRecommendation, the Region is a full name - // (for example, REGION==US East (N. Virginia). The Expression example is as - // follows: { "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” - // ] } } The list of dimension values are OR'd together to retrieve cost or usage - // data. You can create Expression and DimensionValues objects using either with* - // methods or set* methods in multiple lines. - // - // * Compound dimension values with - // logical operations - You can use multiple Expression types and the logical - // operators AND/OR/NOT to create a list of one or more Expression objects. By - // doing this, you can filter on more advanced options. For example, you can filter - // on ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND - // (USAGE_TYPE != DataTransfer). The Expression for that is as follows: { "And": [ - // {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" - // ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": - // {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] } - // Because each Expression can have only one operator, the service returns an error - // if more than one is specified. The following example shows an Expression object - // that creates an error. { "And": [ ... ], "DimensionValues": { "Dimension": - // "USAGE_TYPE", "Values": [ "DataTransfer" ] } } - // - // For the - // GetRightsizingRecommendation action, a combination of OR and NOT isn't - // supported. OR isn't supported between different dimensions, or dimensions and - // tags. NOT operators aren't supported. Dimensions are also limited to - // LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. For the + // (for example, REGION==US East (N. Virginia). + // + // * The corresponding Expression for + // this example is as follows: { "Dimensions": { "Key": "REGION", "Values": [ + // "us-east-1", “us-west-1” ] } } + // + // * As shown in the previous example, lists of + // dimension values are combined with OR when applying the filter. + // + // * You can also + // set different match options to further control how the filter behaves. Not all + // APIs support match options. Refer to the documentation for each specific API to + // see what is supported. + // + // * For example, you can filter for linked account names + // that start with “a”. + // + // * The corresponding Expression for this example is as + // follows: { "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ + // "STARTS_WITH" ], "Values": [ "a" ] } } + // + // * Compound Expression types with logical + // operations. + // + // * You can use multiple Expression types and the logical operators + // AND/OR/NOT to create a list of one or more Expression objects. By doing this, + // you can filter by more advanced options. + // + // * For example, you can filter by + // ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND + // (USAGE_TYPE != DataTransfer). + // + // * The corresponding Expression for this example + // is as follows: { "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ + // "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] + // } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] + // }}} ] } + // + // Because each Expression can have only one operator, the service returns + // an error if more than one is specified. The following example shows an + // Expression object that creates an error: { "And": [ ... ], "Dimensions": { + // "Key": "USAGE_TYPE", "Values": [ "DataTransfer" ] } } The following is an + // example of the corresponding error message: "Expression has more than one roots. + // Only one root operator is allowed for each expression: And, Or, Not, Dimensions, + // Tags, CostCategories" + // + // For the GetRightsizingRecommendation action, a + // combination of OR and NOT isn't supported. OR isn't supported between different + // dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions + // are also limited to LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. For the // GetReservationPurchaseRecommendation action, only NOT is supported. AND and OR // aren't supported. Dimensions are limited to LINKED_ACCOUNT. Filter *types.Expression diff --git a/service/costexplorer/api_op_GetRightsizingRecommendation.go b/service/costexplorer/api_op_GetRightsizingRecommendation.go index 8dffe849b59..9d29e292864 100644 --- a/service/costexplorer/api_op_GetRightsizingRecommendation.go +++ b/service/costexplorer/api_op_GetRightsizingRecommendation.go @@ -48,37 +48,82 @@ type GetRightsizingRecommendationInput struct { // existing Savings Plans or RI benefits, or neither. Configuration *types.RightsizingRecommendationConfiguration - // Use Expression to filter by cost or by usage. There are two patterns: + // Use Expression to filter in various Cost Explorer APIs. Not all Expression types + // are supported in each API. Refer to the documentation for each specific API to + // see what is supported. There are two patterns: // - // * Simple - // dimension values - You can set the dimension name and values for the filters - // that you plan to use. For example, you can filter for REGION==us-east-1 OR + // * Simple dimension values. + // + // * + // There are three types of simple dimension values: CostCategories, Tags, and + // Dimensions. + // + // * Specify the CostCategories field to define a filter that acts on + // Cost Categories. + // + // * Specify the Tags field to define a filter that acts on Cost + // Allocation Tags. + // + // * Specify the Dimensions field to define a filter that acts on + // the DimensionValues + // (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_DimensionValues.html). + // + // * + // For each filter type, you can set the dimension name and values for the filters + // that you plan to use. + // + // * For example, you can filter for REGION==us-east-1 OR // REGION==us-west-1. For GetRightsizingRecommendation, the Region is a full name - // (for example, REGION==US East (N. Virginia). The Expression example is as - // follows: { "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” - // ] } } The list of dimension values are OR'd together to retrieve cost or usage - // data. You can create Expression and DimensionValues objects using either with* - // methods or set* methods in multiple lines. - // - // * Compound dimension values with - // logical operations - You can use multiple Expression types and the logical - // operators AND/OR/NOT to create a list of one or more Expression objects. By - // doing this, you can filter on more advanced options. For example, you can filter - // on ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND - // (USAGE_TYPE != DataTransfer). The Expression for that is as follows: { "And": [ - // {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" - // ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": - // {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] } - // Because each Expression can have only one operator, the service returns an error - // if more than one is specified. The following example shows an Expression object - // that creates an error. { "And": [ ... ], "DimensionValues": { "Dimension": - // "USAGE_TYPE", "Values": [ "DataTransfer" ] } } - // - // For the - // GetRightsizingRecommendation action, a combination of OR and NOT isn't - // supported. OR isn't supported between different dimensions, or dimensions and - // tags. NOT operators aren't supported. Dimensions are also limited to - // LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. For the + // (for example, REGION==US East (N. Virginia). + // + // * The corresponding Expression for + // this example is as follows: { "Dimensions": { "Key": "REGION", "Values": [ + // "us-east-1", “us-west-1” ] } } + // + // * As shown in the previous example, lists of + // dimension values are combined with OR when applying the filter. + // + // * You can also + // set different match options to further control how the filter behaves. Not all + // APIs support match options. Refer to the documentation for each specific API to + // see what is supported. + // + // * For example, you can filter for linked account names + // that start with “a”. + // + // * The corresponding Expression for this example is as + // follows: { "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ + // "STARTS_WITH" ], "Values": [ "a" ] } } + // + // * Compound Expression types with logical + // operations. + // + // * You can use multiple Expression types and the logical operators + // AND/OR/NOT to create a list of one or more Expression objects. By doing this, + // you can filter by more advanced options. + // + // * For example, you can filter by + // ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND + // (USAGE_TYPE != DataTransfer). + // + // * The corresponding Expression for this example + // is as follows: { "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ + // "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] + // } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] + // }}} ] } + // + // Because each Expression can have only one operator, the service returns + // an error if more than one is specified. The following example shows an + // Expression object that creates an error: { "And": [ ... ], "Dimensions": { + // "Key": "USAGE_TYPE", "Values": [ "DataTransfer" ] } } The following is an + // example of the corresponding error message: "Expression has more than one roots. + // Only one root operator is allowed for each expression: And, Or, Not, Dimensions, + // Tags, CostCategories" + // + // For the GetRightsizingRecommendation action, a + // combination of OR and NOT isn't supported. OR isn't supported between different + // dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions + // are also limited to LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. For the // GetReservationPurchaseRecommendation action, only NOT is supported. AND and OR // aren't supported. Dimensions are limited to LINKED_ACCOUNT. Filter *types.Expression diff --git a/service/costexplorer/api_op_GetTags.go b/service/costexplorer/api_op_GetTags.go index 1c3c4f507cf..1f654840d28 100644 --- a/service/costexplorer/api_op_GetTags.go +++ b/service/costexplorer/api_op_GetTags.go @@ -38,37 +38,82 @@ type GetTagsInput struct { // This member is required. TimePeriod *types.DateInterval - // Use Expression to filter by cost or by usage. There are two patterns: + // Use Expression to filter in various Cost Explorer APIs. Not all Expression types + // are supported in each API. Refer to the documentation for each specific API to + // see what is supported. There are two patterns: // - // * Simple - // dimension values - You can set the dimension name and values for the filters - // that you plan to use. For example, you can filter for REGION==us-east-1 OR + // * Simple dimension values. + // + // * + // There are three types of simple dimension values: CostCategories, Tags, and + // Dimensions. + // + // * Specify the CostCategories field to define a filter that acts on + // Cost Categories. + // + // * Specify the Tags field to define a filter that acts on Cost + // Allocation Tags. + // + // * Specify the Dimensions field to define a filter that acts on + // the DimensionValues + // (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_DimensionValues.html). + // + // * + // For each filter type, you can set the dimension name and values for the filters + // that you plan to use. + // + // * For example, you can filter for REGION==us-east-1 OR // REGION==us-west-1. For GetRightsizingRecommendation, the Region is a full name - // (for example, REGION==US East (N. Virginia). The Expression example is as - // follows: { "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” - // ] } } The list of dimension values are OR'd together to retrieve cost or usage - // data. You can create Expression and DimensionValues objects using either with* - // methods or set* methods in multiple lines. - // - // * Compound dimension values with - // logical operations - You can use multiple Expression types and the logical - // operators AND/OR/NOT to create a list of one or more Expression objects. By - // doing this, you can filter on more advanced options. For example, you can filter - // on ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND - // (USAGE_TYPE != DataTransfer). The Expression for that is as follows: { "And": [ - // {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" - // ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": - // {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] } - // Because each Expression can have only one operator, the service returns an error - // if more than one is specified. The following example shows an Expression object - // that creates an error. { "And": [ ... ], "DimensionValues": { "Dimension": - // "USAGE_TYPE", "Values": [ "DataTransfer" ] } } - // - // For the - // GetRightsizingRecommendation action, a combination of OR and NOT isn't - // supported. OR isn't supported between different dimensions, or dimensions and - // tags. NOT operators aren't supported. Dimensions are also limited to - // LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. For the + // (for example, REGION==US East (N. Virginia). + // + // * The corresponding Expression for + // this example is as follows: { "Dimensions": { "Key": "REGION", "Values": [ + // "us-east-1", “us-west-1” ] } } + // + // * As shown in the previous example, lists of + // dimension values are combined with OR when applying the filter. + // + // * You can also + // set different match options to further control how the filter behaves. Not all + // APIs support match options. Refer to the documentation for each specific API to + // see what is supported. + // + // * For example, you can filter for linked account names + // that start with “a”. + // + // * The corresponding Expression for this example is as + // follows: { "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ + // "STARTS_WITH" ], "Values": [ "a" ] } } + // + // * Compound Expression types with logical + // operations. + // + // * You can use multiple Expression types and the logical operators + // AND/OR/NOT to create a list of one or more Expression objects. By doing this, + // you can filter by more advanced options. + // + // * For example, you can filter by + // ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND + // (USAGE_TYPE != DataTransfer). + // + // * The corresponding Expression for this example + // is as follows: { "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ + // "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] + // } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] + // }}} ] } + // + // Because each Expression can have only one operator, the service returns + // an error if more than one is specified. The following example shows an + // Expression object that creates an error: { "And": [ ... ], "Dimensions": { + // "Key": "USAGE_TYPE", "Values": [ "DataTransfer" ] } } The following is an + // example of the corresponding error message: "Expression has more than one roots. + // Only one root operator is allowed for each expression: And, Or, Not, Dimensions, + // Tags, CostCategories" + // + // For the GetRightsizingRecommendation action, a + // combination of OR and NOT isn't supported. OR isn't supported between different + // dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions + // are also limited to LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. For the // GetReservationPurchaseRecommendation action, only NOT is supported. AND and OR // aren't supported. Dimensions are limited to LINKED_ACCOUNT. Filter *types.Expression diff --git a/service/costexplorer/api_op_UpdateAnomalySubscription.go b/service/costexplorer/api_op_UpdateAnomalySubscription.go index f65633839cd..e8565677fc8 100644 --- a/service/costexplorer/api_op_UpdateAnomalySubscription.go +++ b/service/costexplorer/api_op_UpdateAnomalySubscription.go @@ -46,9 +46,44 @@ type UpdateAnomalySubscriptionInput struct { // The new name of the subscription. SubscriptionName *string - // The update to the threshold value for receiving notifications. + // (deprecated) The update to the threshold value for receiving notifications. This + // field has been deprecated. To update a threshold, use ThresholdExpression. + // Continued use of Threshold will be treated as shorthand syntax for a + // ThresholdExpression. + // + // Deprecated: Threshold has been deprecated in favor of ThresholdExpression Threshold *float64 + // The update to the Expression + // (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html) + // object used to specify the anomalies that you want to generate alerts for. This + // supports dimensions and nested expressions. The supported dimensions are + // ANOMALY_TOTAL_IMPACT_ABSOLUTE and ANOMALY_TOTAL_IMPACT_PERCENTAGE. The supported + // nested expression types are AND and OR. The match option GREATER_THAN_OR_EQUAL + // is required. Values must be numbers between 0 and 10,000,000,000. The following + // are examples of valid ThresholdExpressions: + // + // * Absolute threshold: { + // "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ + // "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } + // + // * Percentage threshold: { + // "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ + // "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } + // + // * AND two thresholds + // together: { "And": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", + // "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { + // "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ + // "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] } + // + // * OR two thresholds + // together: { "Or": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", + // "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { + // "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ + // "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] } + ThresholdExpression *types.Expression + noSmithyDocumentSerde } diff --git a/service/costexplorer/deserializers.go b/service/costexplorer/deserializers.go index acfd0b97744..1e1daefaf59 100644 --- a/service/costexplorer/deserializers.go +++ b/service/costexplorer/deserializers.go @@ -5207,6 +5207,11 @@ func awsAwsjson11_deserializeDocumentAnomalySubscription(v **types.AnomalySubscr } } + case "ThresholdExpression": + if err := awsAwsjson11_deserializeDocumentExpression(&sv.ThresholdExpression, value); err != nil { + return err + } + default: _, _ = key, value @@ -8093,6 +8098,74 @@ func awsAwsjson11_deserializeDocumentImpact(v **types.Impact, value interface{}) } } + case "TotalActualSpend": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TotalActualSpend = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.TotalActualSpend = ptr.Float64(f64) + + default: + return fmt.Errorf("expected NullableNonNegativeDouble to be a JSON Number, got %T instead", value) + + } + } + + case "TotalExpectedSpend": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TotalExpectedSpend = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.TotalExpectedSpend = ptr.Float64(f64) + + default: + return fmt.Errorf("expected NullableNonNegativeDouble to be a JSON Number, got %T instead", value) + + } + } + case "TotalImpact": if value != nil { switch jtv := value.(type) { @@ -8127,6 +8200,40 @@ func awsAwsjson11_deserializeDocumentImpact(v **types.Impact, value interface{}) } } + case "TotalImpactPercentage": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TotalImpactPercentage = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.TotalImpactPercentage = ptr.Float64(f64) + + default: + return fmt.Errorf("expected NullableNonNegativeDouble to be a JSON Number, got %T instead", value) + + } + } + default: _, _ = key, value diff --git a/service/costexplorer/serializers.go b/service/costexplorer/serializers.go index 9d004332723..b15699741a3 100644 --- a/service/costexplorer/serializers.go +++ b/service/costexplorer/serializers.go @@ -2177,6 +2177,13 @@ func awsAwsjson11_serializeDocumentAnomalySubscription(v *types.AnomalySubscript } } + if v.ThresholdExpression != nil { + ok := object.Key("ThresholdExpression") + if err := awsAwsjson11_serializeDocumentExpression(v.ThresholdExpression, ok); err != nil { + return err + } + } + return nil } @@ -3993,6 +4000,13 @@ func awsAwsjson11_serializeOpDocumentUpdateAnomalySubscriptionInput(v *UpdateAno } } + if v.ThresholdExpression != nil { + ok := object.Key("ThresholdExpression") + if err := awsAwsjson11_serializeDocumentExpression(v.ThresholdExpression, ok); err != nil { + return err + } + } + return nil } diff --git a/service/costexplorer/types/enums.go b/service/costexplorer/types/enums.go index 1b31332e465..66d41cc4d49 100644 --- a/service/costexplorer/types/enums.go +++ b/service/costexplorer/types/enums.go @@ -245,38 +245,40 @@ type Dimension string // Enum values for Dimension const ( - DimensionAz Dimension = "AZ" - DimensionInstanceType Dimension = "INSTANCE_TYPE" - DimensionLinkedAccount Dimension = "LINKED_ACCOUNT" - DimensionLinkedAccountName Dimension = "LINKED_ACCOUNT_NAME" - DimensionOperation Dimension = "OPERATION" - DimensionPurchaseType Dimension = "PURCHASE_TYPE" - DimensionRegion Dimension = "REGION" - DimensionService Dimension = "SERVICE" - DimensionServiceCode Dimension = "SERVICE_CODE" - DimensionUsageType Dimension = "USAGE_TYPE" - DimensionUsageTypeGroup Dimension = "USAGE_TYPE_GROUP" - DimensionRecordType Dimension = "RECORD_TYPE" - DimensionOperatingSystem Dimension = "OPERATING_SYSTEM" - DimensionTenancy Dimension = "TENANCY" - DimensionScope Dimension = "SCOPE" - DimensionPlatform Dimension = "PLATFORM" - DimensionSubscriptionId Dimension = "SUBSCRIPTION_ID" - DimensionLegalEntityName Dimension = "LEGAL_ENTITY_NAME" - DimensionDeploymentOption Dimension = "DEPLOYMENT_OPTION" - DimensionDatabaseEngine Dimension = "DATABASE_ENGINE" - DimensionCacheEngine Dimension = "CACHE_ENGINE" - DimensionInstanceTypeFamily Dimension = "INSTANCE_TYPE_FAMILY" - DimensionBillingEntity Dimension = "BILLING_ENTITY" - DimensionReservationId Dimension = "RESERVATION_ID" - DimensionResourceId Dimension = "RESOURCE_ID" - DimensionRightsizingType Dimension = "RIGHTSIZING_TYPE" - DimensionSavingsPlansType Dimension = "SAVINGS_PLANS_TYPE" - DimensionSavingsPlanArn Dimension = "SAVINGS_PLAN_ARN" - DimensionPaymentOption Dimension = "PAYMENT_OPTION" - DimensionAgreementEndDateTimeAfter Dimension = "AGREEMENT_END_DATE_TIME_AFTER" - DimensionAgreementEndDateTimeBefore Dimension = "AGREEMENT_END_DATE_TIME_BEFORE" - DimensionInvoicingEntity Dimension = "INVOICING_ENTITY" + DimensionAz Dimension = "AZ" + DimensionInstanceType Dimension = "INSTANCE_TYPE" + DimensionLinkedAccount Dimension = "LINKED_ACCOUNT" + DimensionLinkedAccountName Dimension = "LINKED_ACCOUNT_NAME" + DimensionOperation Dimension = "OPERATION" + DimensionPurchaseType Dimension = "PURCHASE_TYPE" + DimensionRegion Dimension = "REGION" + DimensionService Dimension = "SERVICE" + DimensionServiceCode Dimension = "SERVICE_CODE" + DimensionUsageType Dimension = "USAGE_TYPE" + DimensionUsageTypeGroup Dimension = "USAGE_TYPE_GROUP" + DimensionRecordType Dimension = "RECORD_TYPE" + DimensionOperatingSystem Dimension = "OPERATING_SYSTEM" + DimensionTenancy Dimension = "TENANCY" + DimensionScope Dimension = "SCOPE" + DimensionPlatform Dimension = "PLATFORM" + DimensionSubscriptionId Dimension = "SUBSCRIPTION_ID" + DimensionLegalEntityName Dimension = "LEGAL_ENTITY_NAME" + DimensionDeploymentOption Dimension = "DEPLOYMENT_OPTION" + DimensionDatabaseEngine Dimension = "DATABASE_ENGINE" + DimensionCacheEngine Dimension = "CACHE_ENGINE" + DimensionInstanceTypeFamily Dimension = "INSTANCE_TYPE_FAMILY" + DimensionBillingEntity Dimension = "BILLING_ENTITY" + DimensionReservationId Dimension = "RESERVATION_ID" + DimensionResourceId Dimension = "RESOURCE_ID" + DimensionRightsizingType Dimension = "RIGHTSIZING_TYPE" + DimensionSavingsPlansType Dimension = "SAVINGS_PLANS_TYPE" + DimensionSavingsPlanArn Dimension = "SAVINGS_PLAN_ARN" + DimensionPaymentOption Dimension = "PAYMENT_OPTION" + DimensionAgreementEndDateTimeAfter Dimension = "AGREEMENT_END_DATE_TIME_AFTER" + DimensionAgreementEndDateTimeBefore Dimension = "AGREEMENT_END_DATE_TIME_BEFORE" + DimensionInvoicingEntity Dimension = "INVOICING_ENTITY" + DimensionAnomalyTotalImpactAbsolute Dimension = "ANOMALY_TOTAL_IMPACT_ABSOLUTE" + DimensionAnomalyTotalImpactPercentage Dimension = "ANOMALY_TOTAL_IMPACT_PERCENTAGE" ) // Values returns all known values for Dimension. Note that this can be expanded in @@ -316,6 +318,8 @@ func (Dimension) Values() []Dimension { "AGREEMENT_END_DATE_TIME_AFTER", "AGREEMENT_END_DATE_TIME_BEFORE", "INVOICING_ENTITY", + "ANOMALY_TOTAL_IMPACT_ABSOLUTE", + "ANOMALY_TOTAL_IMPACT_PERCENTAGE", } } @@ -449,13 +453,14 @@ type MatchOption string // Enum values for MatchOption const ( - MatchOptionEquals MatchOption = "EQUALS" - MatchOptionAbsent MatchOption = "ABSENT" - MatchOptionStartsWith MatchOption = "STARTS_WITH" - MatchOptionEndsWith MatchOption = "ENDS_WITH" - MatchOptionContains MatchOption = "CONTAINS" - MatchOptionCaseSensitive MatchOption = "CASE_SENSITIVE" - MatchOptionCaseInsensitive MatchOption = "CASE_INSENSITIVE" + MatchOptionEquals MatchOption = "EQUALS" + MatchOptionAbsent MatchOption = "ABSENT" + MatchOptionStartsWith MatchOption = "STARTS_WITH" + MatchOptionEndsWith MatchOption = "ENDS_WITH" + MatchOptionContains MatchOption = "CONTAINS" + MatchOptionCaseSensitive MatchOption = "CASE_SENSITIVE" + MatchOptionCaseInsensitive MatchOption = "CASE_INSENSITIVE" + MatchOptionGreaterThanOrEqual MatchOption = "GREATER_THAN_OR_EQUAL" ) // Values returns all known values for MatchOption. Note that this can be expanded @@ -470,6 +475,7 @@ func (MatchOption) Values() []MatchOption { "CONTAINS", "CASE_SENSITIVE", "CASE_INSENSITIVE", + "GREATER_THAN_OR_EQUAL", } } diff --git a/service/costexplorer/types/types.go b/service/costexplorer/types/types.go index 05c417d96c1..339fd877d2c 100644 --- a/service/costexplorer/types/types.go +++ b/service/costexplorer/types/types.go @@ -96,37 +96,82 @@ type AnomalyMonitor struct { // The dimensions to evaluate. MonitorDimension MonitorDimension - // Use Expression to filter by cost or by usage. There are two patterns: + // Use Expression to filter in various Cost Explorer APIs. Not all Expression types + // are supported in each API. Refer to the documentation for each specific API to + // see what is supported. There are two patterns: // - // * Simple - // dimension values - You can set the dimension name and values for the filters - // that you plan to use. For example, you can filter for REGION==us-east-1 OR + // * Simple dimension values. + // + // * + // There are three types of simple dimension values: CostCategories, Tags, and + // Dimensions. + // + // * Specify the CostCategories field to define a filter that acts on + // Cost Categories. + // + // * Specify the Tags field to define a filter that acts on Cost + // Allocation Tags. + // + // * Specify the Dimensions field to define a filter that acts on + // the DimensionValues + // (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_DimensionValues.html). + // + // * + // For each filter type, you can set the dimension name and values for the filters + // that you plan to use. + // + // * For example, you can filter for REGION==us-east-1 OR // REGION==us-west-1. For GetRightsizingRecommendation, the Region is a full name - // (for example, REGION==US East (N. Virginia). The Expression example is as - // follows: { "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” - // ] } } The list of dimension values are OR'd together to retrieve cost or usage - // data. You can create Expression and DimensionValues objects using either with* - // methods or set* methods in multiple lines. - // - // * Compound dimension values with - // logical operations - You can use multiple Expression types and the logical - // operators AND/OR/NOT to create a list of one or more Expression objects. By - // doing this, you can filter on more advanced options. For example, you can filter - // on ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND - // (USAGE_TYPE != DataTransfer). The Expression for that is as follows: { "And": [ - // {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" - // ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": - // {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] } - // Because each Expression can have only one operator, the service returns an error - // if more than one is specified. The following example shows an Expression object - // that creates an error. { "And": [ ... ], "DimensionValues": { "Dimension": - // "USAGE_TYPE", "Values": [ "DataTransfer" ] } } - // - // For the - // GetRightsizingRecommendation action, a combination of OR and NOT isn't - // supported. OR isn't supported between different dimensions, or dimensions and - // tags. NOT operators aren't supported. Dimensions are also limited to - // LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. For the + // (for example, REGION==US East (N. Virginia). + // + // * The corresponding Expression for + // this example is as follows: { "Dimensions": { "Key": "REGION", "Values": [ + // "us-east-1", “us-west-1” ] } } + // + // * As shown in the previous example, lists of + // dimension values are combined with OR when applying the filter. + // + // * You can also + // set different match options to further control how the filter behaves. Not all + // APIs support match options. Refer to the documentation for each specific API to + // see what is supported. + // + // * For example, you can filter for linked account names + // that start with “a”. + // + // * The corresponding Expression for this example is as + // follows: { "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ + // "STARTS_WITH" ], "Values": [ "a" ] } } + // + // * Compound Expression types with logical + // operations. + // + // * You can use multiple Expression types and the logical operators + // AND/OR/NOT to create a list of one or more Expression objects. By doing this, + // you can filter by more advanced options. + // + // * For example, you can filter by + // ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND + // (USAGE_TYPE != DataTransfer). + // + // * The corresponding Expression for this example + // is as follows: { "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ + // "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] + // } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] + // }}} ] } + // + // Because each Expression can have only one operator, the service returns + // an error if more than one is specified. The following example shows an + // Expression object that creates an error: { "And": [ ... ], "Dimensions": { + // "Key": "USAGE_TYPE", "Values": [ "DataTransfer" ] } } The following is an + // example of the corresponding error message: "Expression has more than one roots. + // Only one root operator is allowed for each expression: And, Or, Not, Dimensions, + // Tags, CostCategories" + // + // For the GetRightsizingRecommendation action, a + // combination of OR and NOT isn't supported. OR isn't supported between different + // dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions + // are also limited to LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. For the // GetReservationPurchaseRecommendation action, only NOT is supported. AND and OR // aren't supported. Dimensions are limited to LINKED_ACCOUNT. MonitorSpecification *Expression @@ -176,17 +221,52 @@ type AnomalySubscription struct { // This member is required. SubscriptionName *string - // The dollar value that triggers a notification if the threshold is exceeded. - // - // This member is required. - Threshold *float64 - // Your unique account identifier. AccountId *string // The AnomalySubscription Amazon Resource Name (ARN). SubscriptionArn *string + // (deprecated) The dollar value that triggers a notification if the threshold is + // exceeded. This field has been deprecated. To specify a threshold, use + // ThresholdExpression. Continued use of Threshold will be treated as shorthand + // syntax for a ThresholdExpression. One of Threshold or ThresholdExpression is + // required for this resource. + // + // Deprecated: Threshold has been deprecated in favor of ThresholdExpression + Threshold *float64 + + // An Expression + // (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html) + // object used to specify the anomalies that you want to generate alerts for. This + // supports dimensions and nested expressions. The supported dimensions are + // ANOMALY_TOTAL_IMPACT_ABSOLUTE and ANOMALY_TOTAL_IMPACT_PERCENTAGE. The supported + // nested expression types are AND and OR. The match option GREATER_THAN_OR_EQUAL + // is required. Values must be numbers between 0 and 10,000,000,000. One of + // Threshold or ThresholdExpression is required for this resource. The following + // are examples of valid ThresholdExpressions: + // + // * Absolute threshold: { + // "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ + // "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } + // + // * Percentage threshold: { + // "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ + // "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } + // + // * AND two thresholds + // together: { "And": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", + // "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { + // "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ + // "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] } + // + // * OR two thresholds + // together: { "Or": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", + // "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { + // "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ + // "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] } + ThresholdExpression *Expression + noSmithyDocumentSerde } @@ -609,14 +689,20 @@ type DateInterval struct { type DimensionValues struct { // The names of the metadata types that you can use to filter and group your - // results. For example, AZ returns a list of Availability Zones. LINK_ACCOUNT_NAME - // and SERVICE_CODE can only be used in CostCategoryRule - // (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/AAPI_CostCategoryRule.html). + // results. For example, AZ returns a list of Availability Zones. Not all + // dimensions are supported in each API. Refer to the documentation for each + // specific API to see what is supported. LINK_ACCOUNT_NAME and SERVICE_CODE can + // only be used in CostCategoryRule + // (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_CostCategoryRule.html). + // ANOMALY_TOTAL_IMPACT_ABSOLUTE and ANOMALY_TOTAL_IMPACT_PERCENTAGE can only be + // used in AnomalySubscriptions + // (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_AnomalySubscription.html). Key Dimension // The match options that you can use to filter your results. MatchOptions is only - // applicable for actions related to Cost Category. The default values for - // MatchOptions are EQUALS and CASE_SENSITIVE. + // applicable for actions related to Cost Category and Anomaly Subscriptions. Refer + // to the documentation for each specific API to see what is supported. The default + // values for MatchOptions are EQUALS and CASE_SENSITIVE. MatchOptions []MatchOption // The metadata values that you can use to filter and group your results. You can @@ -830,37 +916,82 @@ type ESInstanceDetails struct { noSmithyDocumentSerde } -// Use Expression to filter by cost or by usage. There are two patterns: +// Use Expression to filter in various Cost Explorer APIs. Not all Expression types +// are supported in each API. Refer to the documentation for each specific API to +// see what is supported. There are two patterns: +// +// * Simple dimension values. +// +// * +// There are three types of simple dimension values: CostCategories, Tags, and +// Dimensions. +// +// * Specify the CostCategories field to define a filter that acts on +// Cost Categories. +// +// * Specify the Tags field to define a filter that acts on Cost +// Allocation Tags. +// +// * Specify the Dimensions field to define a filter that acts on +// the DimensionValues +// (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_DimensionValues.html). +// +// * +// For each filter type, you can set the dimension name and values for the filters +// that you plan to use. // -// * Simple -// dimension values - You can set the dimension name and values for the filters -// that you plan to use. For example, you can filter for REGION==us-east-1 OR +// * For example, you can filter for REGION==us-east-1 OR // REGION==us-west-1. For GetRightsizingRecommendation, the Region is a full name -// (for example, REGION==US East (N. Virginia). The Expression example is as -// follows: { "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” -// ] } } The list of dimension values are OR'd together to retrieve cost or usage -// data. You can create Expression and DimensionValues objects using either with* -// methods or set* methods in multiple lines. +// (for example, REGION==US East (N. Virginia). // -// * Compound dimension values with -// logical operations - You can use multiple Expression types and the logical -// operators AND/OR/NOT to create a list of one or more Expression objects. By -// doing this, you can filter on more advanced options. For example, you can filter -// on ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND -// (USAGE_TYPE != DataTransfer). The Expression for that is as follows: { "And": [ -// {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" -// ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": -// {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] } -// Because each Expression can have only one operator, the service returns an error -// if more than one is specified. The following example shows an Expression object -// that creates an error. { "And": [ ... ], "DimensionValues": { "Dimension": -// "USAGE_TYPE", "Values": [ "DataTransfer" ] } } +// * The corresponding Expression for +// this example is as follows: { "Dimensions": { "Key": "REGION", "Values": [ +// "us-east-1", “us-west-1” ] } } // -// For the -// GetRightsizingRecommendation action, a combination of OR and NOT isn't -// supported. OR isn't supported between different dimensions, or dimensions and -// tags. NOT operators aren't supported. Dimensions are also limited to -// LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. For the +// * As shown in the previous example, lists of +// dimension values are combined with OR when applying the filter. +// +// * You can also +// set different match options to further control how the filter behaves. Not all +// APIs support match options. Refer to the documentation for each specific API to +// see what is supported. +// +// * For example, you can filter for linked account names +// that start with “a”. +// +// * The corresponding Expression for this example is as +// follows: { "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ +// "STARTS_WITH" ], "Values": [ "a" ] } } +// +// * Compound Expression types with logical +// operations. +// +// * You can use multiple Expression types and the logical operators +// AND/OR/NOT to create a list of one or more Expression objects. By doing this, +// you can filter by more advanced options. +// +// * For example, you can filter by +// ((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND +// (USAGE_TYPE != DataTransfer). +// +// * The corresponding Expression for this example +// is as follows: { "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ +// "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] +// } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] +// }}} ] } +// +// Because each Expression can have only one operator, the service returns +// an error if more than one is specified. The following example shows an +// Expression object that creates an error: { "And": [ ... ], "Dimensions": { +// "Key": "USAGE_TYPE", "Values": [ "DataTransfer" ] } } The following is an +// example of the corresponding error message: "Expression has more than one roots. +// Only one root operator is allowed for each expression: And, Or, Not, Dimensions, +// Tags, CostCategories" +// +// For the GetRightsizingRecommendation action, a +// combination of OR and NOT isn't supported. OR isn't supported between different +// dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions +// are also limited to LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. For the // GetReservationPurchaseRecommendation action, only NOT is supported. AND and OR // aren't supported. Dimensions are limited to LINKED_ACCOUNT. type Expression struct { @@ -960,9 +1091,24 @@ type Impact struct { // This member is required. MaxImpact float64 - // The cumulative dollar value that's observed for an anomaly. + // The cumulative dollar amount that was actually spent during the anomaly. + TotalActualSpend *float64 + + // The cumulative dollar amount that was expected to be spent during the anomaly. + // It is calculated using advanced machine learning models to determine the typical + // spending pattern based on historical data for a customer. + TotalExpectedSpend *float64 + + // The cumulative dollar difference between the total actual spend and total + // expected spend. It is calculated as TotalActualSpend - TotalExpectedSpend. TotalImpact float64 + // The cumulative percentage difference between the total actual spend and total + // expected spend. It is calculated as (TotalImpact / TotalExpectedSpend) * 100. + // When TotalExpectedSpend is zero, this field is omitted. Expected spend can be + // zero in situations such as when you start to use a service for the first time. + TotalImpactPercentage *float64 + noSmithyDocumentSerde } diff --git a/service/costexplorer/validators.go b/service/costexplorer/validators.go index e2fb7cf77d7..d81657198c3 100644 --- a/service/costexplorer/validators.go +++ b/service/costexplorer/validators.go @@ -798,9 +798,6 @@ func validateAnomalySubscription(v *types.AnomalySubscription) error { if v.Subscribers == nil { invalidParams.Add(smithy.NewErrParamRequired("Subscribers")) } - if v.Threshold == nil { - invalidParams.Add(smithy.NewErrParamRequired("Threshold")) - } if len(v.Frequency) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Frequency")) } diff --git a/service/kms/internal/endpoints/endpoints.go b/service/kms/internal/endpoints/endpoints.go index 2868876ac1c..538d1ba2f98 100644 --- a/service/kms/internal/endpoints/endpoints.go +++ b/service/kms/internal/endpoints/endpoints.go @@ -324,6 +324,15 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "ap-southeast-4-fips", + }: endpoints.Endpoint{ + Hostname: "kms-fips.ap-southeast-4.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-southeast-4", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/networkmanager/api_op_StartOrganizationServiceAccessUpdate.go b/service/networkmanager/api_op_StartOrganizationServiceAccessUpdate.go index ec32bafa410..75af345b896 100644 --- a/service/networkmanager/api_op_StartOrganizationServiceAccessUpdate.go +++ b/service/networkmanager/api_op_StartOrganizationServiceAccessUpdate.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Enables for the Network Manager service for an Amazon Web Services Organization. +// Enables the Network Manager service for an Amazon Web Services Organization. // This can only be called by a management account within the organization. func (c *Client) StartOrganizationServiceAccessUpdate(ctx context.Context, params *StartOrganizationServiceAccessUpdateInput, optFns ...func(*Options)) (*StartOrganizationServiceAccessUpdateOutput, error) { if params == nil { diff --git a/service/networkmanager/deserializers.go b/service/networkmanager/deserializers.go index 6aa5eb703ca..d062988cb99 100644 --- a/service/networkmanager/deserializers.go +++ b/service/networkmanager/deserializers.go @@ -19965,6 +19965,15 @@ func awsRestjson1_deserializeDocumentVpcOptions(v **types.VpcOptions, value inte for key, value := range shape { switch key { + case "ApplianceModeSupport": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.ApplianceModeSupport = jtv + } + case "Ipv6Support": if value != nil { jtv, ok := value.(bool) diff --git a/service/networkmanager/serializers.go b/service/networkmanager/serializers.go index 169329302eb..53e795337aa 100644 --- a/service/networkmanager/serializers.go +++ b/service/networkmanager/serializers.go @@ -6819,6 +6819,11 @@ func awsRestjson1_serializeDocumentVpcOptions(v *types.VpcOptions, value smithyj object := value.Object() defer object.Close() + if v.ApplianceModeSupport { + ok := object.Key("ApplianceModeSupport") + ok.Boolean(v.ApplianceModeSupport) + } + if v.Ipv6Support { ok := object.Key("Ipv6Support") ok.Boolean(v.Ipv6Support) diff --git a/service/networkmanager/types/types.go b/service/networkmanager/types/types.go index d90527e8f57..781035501ef 100644 --- a/service/networkmanager/types/types.go +++ b/service/networkmanager/types/types.go @@ -1340,6 +1340,11 @@ type VpcAttachment struct { // Describes the VPC options. type VpcOptions struct { + // Indicates whether appliance mode is supported. If enabled, traffic flow between + // a source and destination use the same Availability Zone for the VPC attachment + // for the lifetime of that flow. The default value is false. + ApplianceModeSupport bool + // Indicates whether IPv6 is supported. Ipv6Support bool diff --git a/service/redshiftdata/api_client.go b/service/redshiftdata/api_client.go index 7417977fb63..66ff47bdf05 100644 --- a/service/redshiftdata/api_client.go +++ b/service/redshiftdata/api_client.go @@ -4,6 +4,7 @@ package redshiftdata import ( "context" + cryptorand "crypto/rand" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" @@ -15,6 +16,7 @@ import ( smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" @@ -48,6 +50,8 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveDefaultEndpointConfiguration(&options) + resolveIdempotencyTokenProvider(&options) + for _, fn := range optFns { fn(&options) } @@ -84,6 +88,10 @@ type Options struct { // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 + // Provides idempotency tokens values that will be automatically populated into + // idempotent API operations. + IdempotencyTokenProvider IdempotencyTokenProvider + // The logger writer interface to write logging messages to. Logger logging.Logger @@ -378,6 +386,13 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, @@ -416,6 +431,11 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } diff --git a/service/redshiftdata/api_op_BatchExecuteStatement.go b/service/redshiftdata/api_op_BatchExecuteStatement.go index 2f18ac592b4..ce16afc7221 100644 --- a/service/redshiftdata/api_op_BatchExecuteStatement.go +++ b/service/redshiftdata/api_op_BatchExecuteStatement.go @@ -4,6 +4,7 @@ package redshiftdata import ( "context" + "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -26,7 +27,13 @@ import ( // database name, and the database user name. Also, permission to call the // redshift:GetClusterCredentials operation is required. When connecting to a // serverless workgroup, specify the workgroup name and database name. Also, -// permission to call the redshift-serverless:GetCredentials operation is required. +// permission to call the redshift-serverless:GetCredentials operation is +// required. +// +// For more information about the Amazon Redshift Data API and CLI usage +// examples, see Using the Amazon Redshift Data API +// (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html) in the Amazon +// Redshift Management Guide. func (c *Client) BatchExecuteStatement(ctx context.Context, params *BatchExecuteStatementInput, optFns ...func(*Options)) (*BatchExecuteStatementOutput, error) { if params == nil { params = &BatchExecuteStatementInput{} @@ -50,11 +57,19 @@ type BatchExecuteStatementInput struct { // This member is required. Database *string - // One or more SQL statements to run. + // One or more SQL statements to run. The SQL statements are run as a single + // transaction. They run serially in the order of the array. Subsequent SQL + // statements don't start until the previous statement in the array completes. If + // any SQL statement fails, then because they are run as one transaction, all work + // is rolled back. // // This member is required. Sqls []string + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string + // The cluster identifier. This parameter is required when connecting to a cluster // and authenticating using either Secrets Manager or temporary credentials. ClusterIdentifier *string @@ -161,6 +176,9 @@ func (c *Client) addOperationBatchExecuteStatementMiddlewares(stack *middleware. if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } + if err = addIdempotencyToken_opBatchExecuteStatementMiddleware(stack, options); err != nil { + return err + } if err = addOpBatchExecuteStatementValidationMiddleware(stack); err != nil { return err } @@ -179,6 +197,39 @@ func (c *Client) addOperationBatchExecuteStatementMiddlewares(stack *middleware. return nil } +type idempotencyToken_initializeOpBatchExecuteStatement struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpBatchExecuteStatement) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpBatchExecuteStatement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*BatchExecuteStatementInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *BatchExecuteStatementInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opBatchExecuteStatementMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpBatchExecuteStatement{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + func newServiceMetadataMiddleware_opBatchExecuteStatement(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshiftdata/api_op_CancelStatement.go b/service/redshiftdata/api_op_CancelStatement.go index 3b57bf5cbbd..5cb8103b936 100644 --- a/service/redshiftdata/api_op_CancelStatement.go +++ b/service/redshiftdata/api_op_CancelStatement.go @@ -10,7 +10,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Cancels a running query. To be canceled, a query must be running. +// Cancels a running query. To be canceled, a query must be running. For more +// information about the Amazon Redshift Data API and CLI usage examples, see Using +// the Amazon Redshift Data API +// (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html) in the Amazon +// Redshift Management Guide. func (c *Client) CancelStatement(ctx context.Context, params *CancelStatementInput, optFns ...func(*Options)) (*CancelStatementOutput, error) { if params == nil { params = &CancelStatementInput{} diff --git a/service/redshiftdata/api_op_DescribeStatement.go b/service/redshiftdata/api_op_DescribeStatement.go index adbd9e1a802..4cde655f363 100644 --- a/service/redshiftdata/api_op_DescribeStatement.go +++ b/service/redshiftdata/api_op_DescribeStatement.go @@ -15,7 +15,10 @@ import ( // Describes the details about a specific instance when a query was run by the // Amazon Redshift Data API. The information includes when the query started, when // it finished, the query status, the number of rows returned, and the SQL -// statement. +// statement. For more information about the Amazon Redshift Data API and CLI usage +// examples, see Using the Amazon Redshift Data API +// (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html) in the Amazon +// Redshift Management Guide. func (c *Client) DescribeStatement(ctx context.Context, params *DescribeStatementInput, optFns ...func(*Options)) (*DescribeStatementOutput, error) { if params == nil { params = &DescribeStatementInput{} diff --git a/service/redshiftdata/api_op_DescribeTable.go b/service/redshiftdata/api_op_DescribeTable.go index 57b4ca0fd39..9501c5211ea 100644 --- a/service/redshiftdata/api_op_DescribeTable.go +++ b/service/redshiftdata/api_op_DescribeTable.go @@ -29,6 +29,12 @@ import ( // is required. When connecting to a serverless workgroup, specify the workgroup // name and database name. Also, permission to call the // redshift-serverless:GetCredentials operation is required. +// +// For more information +// about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon +// Redshift Data API +// (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html) in the Amazon +// Redshift Management Guide. func (c *Client) DescribeTable(ctx context.Context, params *DescribeTableInput, optFns ...func(*Options)) (*DescribeTableOutput, error) { if params == nil { params = &DescribeTableInput{} diff --git a/service/redshiftdata/api_op_ExecuteStatement.go b/service/redshiftdata/api_op_ExecuteStatement.go index de491d4de38..ebfeb7dff89 100644 --- a/service/redshiftdata/api_op_ExecuteStatement.go +++ b/service/redshiftdata/api_op_ExecuteStatement.go @@ -4,6 +4,7 @@ package redshiftdata import ( "context" + "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/redshiftdata/types" @@ -29,6 +30,12 @@ import ( // required. When connecting to a serverless workgroup, specify the workgroup name // and database name. Also, permission to call the // redshift-serverless:GetCredentials operation is required. +// +// For more information +// about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon +// Redshift Data API +// (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html) in the Amazon +// Redshift Management Guide. func (c *Client) ExecuteStatement(ctx context.Context, params *ExecuteStatementInput, optFns ...func(*Options)) (*ExecuteStatementOutput, error) { if params == nil { params = &ExecuteStatementInput{} @@ -57,6 +64,10 @@ type ExecuteStatementInput struct { // This member is required. Sql *string + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string + // The cluster identifier. This parameter is required when connecting to a cluster // and authenticating using either Secrets Manager or temporary credentials. ClusterIdentifier *string @@ -165,6 +176,9 @@ func (c *Client) addOperationExecuteStatementMiddlewares(stack *middleware.Stack if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } + if err = addIdempotencyToken_opExecuteStatementMiddleware(stack, options); err != nil { + return err + } if err = addOpExecuteStatementValidationMiddleware(stack); err != nil { return err } @@ -183,6 +197,39 @@ func (c *Client) addOperationExecuteStatementMiddlewares(stack *middleware.Stack return nil } +type idempotencyToken_initializeOpExecuteStatement struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpExecuteStatement) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpExecuteStatement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*ExecuteStatementInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *ExecuteStatementInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opExecuteStatementMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpExecuteStatement{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + func newServiceMetadataMiddleware_opExecuteStatement(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshiftdata/api_op_GetStatementResult.go b/service/redshiftdata/api_op_GetStatementResult.go index a78578fe4a5..154e78c2feb 100644 --- a/service/redshiftdata/api_op_GetStatementResult.go +++ b/service/redshiftdata/api_op_GetStatementResult.go @@ -13,7 +13,10 @@ import ( ) // Fetches the temporarily cached result of an SQL statement. A token is returned -// to page through the statement results. +// to page through the statement results. For more information about the Amazon +// Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API +// (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html) in the Amazon +// Redshift Management Guide. func (c *Client) GetStatementResult(ctx context.Context, params *GetStatementResultInput, optFns ...func(*Options)) (*GetStatementResultOutput, error) { if params == nil { params = &GetStatementResultInput{} diff --git a/service/redshiftdata/api_op_ListDatabases.go b/service/redshiftdata/api_op_ListDatabases.go index e67b2650df7..abeefb5aa1f 100644 --- a/service/redshiftdata/api_op_ListDatabases.go +++ b/service/redshiftdata/api_op_ListDatabases.go @@ -27,6 +27,12 @@ import ( // is required. When connecting to a serverless workgroup, specify the workgroup // name and database name. Also, permission to call the // redshift-serverless:GetCredentials operation is required. +// +// For more information +// about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon +// Redshift Data API +// (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html) in the Amazon +// Redshift Management Guide. func (c *Client) ListDatabases(ctx context.Context, params *ListDatabasesInput, optFns ...func(*Options)) (*ListDatabasesOutput, error) { if params == nil { params = &ListDatabasesInput{} diff --git a/service/redshiftdata/api_op_ListSchemas.go b/service/redshiftdata/api_op_ListSchemas.go index 7b12238061e..bcee025d83b 100644 --- a/service/redshiftdata/api_op_ListSchemas.go +++ b/service/redshiftdata/api_op_ListSchemas.go @@ -27,6 +27,12 @@ import ( // is required. When connecting to a serverless workgroup, specify the workgroup // name and database name. Also, permission to call the // redshift-serverless:GetCredentials operation is required. +// +// For more information +// about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon +// Redshift Data API +// (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html) in the Amazon +// Redshift Management Guide. func (c *Client) ListSchemas(ctx context.Context, params *ListSchemasInput, optFns ...func(*Options)) (*ListSchemasOutput, error) { if params == nil { params = &ListSchemasInput{} diff --git a/service/redshiftdata/api_op_ListStatements.go b/service/redshiftdata/api_op_ListStatements.go index 6db83010d93..e58ecd21d20 100644 --- a/service/redshiftdata/api_op_ListStatements.go +++ b/service/redshiftdata/api_op_ListStatements.go @@ -13,7 +13,10 @@ import ( ) // List of SQL statements. By default, only finished statements are shown. A token -// is returned to page through the statement list. +// is returned to page through the statement list. For more information about the +// Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift +// Data API (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html) in the +// Amazon Redshift Management Guide. func (c *Client) ListStatements(ctx context.Context, params *ListStatementsInput, optFns ...func(*Options)) (*ListStatementsOutput, error) { if params == nil { params = &ListStatementsInput{} diff --git a/service/redshiftdata/api_op_ListTables.go b/service/redshiftdata/api_op_ListTables.go index 592991981aa..337d09e66fe 100644 --- a/service/redshiftdata/api_op_ListTables.go +++ b/service/redshiftdata/api_op_ListTables.go @@ -28,7 +28,13 @@ import ( // the database user name. Also, permission to call the // redshift:GetClusterCredentials operation is required. When connecting to a // serverless workgroup, specify the workgroup name and database name. Also, -// permission to call the redshift-serverless:GetCredentials operation is required. +// permission to call the redshift-serverless:GetCredentials operation is +// required. +// +// For more information about the Amazon Redshift Data API and CLI usage +// examples, see Using the Amazon Redshift Data API +// (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html) in the Amazon +// Redshift Management Guide. func (c *Client) ListTables(ctx context.Context, params *ListTablesInput, optFns ...func(*Options)) (*ListTablesOutput, error) { if params == nil { params = &ListTablesInput{} diff --git a/service/redshiftdata/doc.go b/service/redshiftdata/doc.go index d07f4d2868d..5c10c9a7eef 100644 --- a/service/redshiftdata/doc.go +++ b/service/redshiftdata/doc.go @@ -8,5 +8,5 @@ // succeeds. For more information about the Amazon Redshift Data API and CLI usage // examples, see Using the Amazon Redshift Data API // (https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html) in the Amazon -// Redshift Cluster Management Guide. +// Redshift Management Guide. package redshiftdata diff --git a/service/redshiftdata/serializers.go b/service/redshiftdata/serializers.go index 78ddb61a3e3..1853f204cdb 100644 --- a/service/redshiftdata/serializers.go +++ b/service/redshiftdata/serializers.go @@ -609,6 +609,11 @@ func awsAwsjson11_serializeOpDocumentBatchExecuteStatementInput(v *BatchExecuteS object := value.Object() defer object.Close() + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + if v.ClusterIdentifier != nil { ok := object.Key("ClusterIdentifier") ok.String(*v.ClusterIdentifier) @@ -739,6 +744,11 @@ func awsAwsjson11_serializeOpDocumentExecuteStatementInput(v *ExecuteStatementIn object := value.Object() defer object.Close() + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + if v.ClusterIdentifier != nil { ok := object.Key("ClusterIdentifier") ok.String(*v.ClusterIdentifier) diff --git a/service/redshiftdata/types/types.go b/service/redshiftdata/types/types.go index 9245c31580a..14dbcc0d2c3 100644 --- a/service/redshiftdata/types/types.go +++ b/service/redshiftdata/types/types.go @@ -129,7 +129,7 @@ type SqlParameter struct { Name *string // The value of the parameter. Amazon Redshift implicitly converts to the proper - // data type. For more inforation, see Data types + // data type. For more information, see Data types // (https://docs.aws.amazon.com/redshift/latest/dg/c_Supported_data_types.html) in // the Amazon Redshift Database Developer Guide. // diff --git a/service/sagemakermetrics/api_op_BatchPutMetrics.go b/service/sagemakermetrics/api_op_BatchPutMetrics.go index 4e558c56bd6..281b48b9665 100644 --- a/service/sagemakermetrics/api_op_BatchPutMetrics.go +++ b/service/sagemakermetrics/api_op_BatchPutMetrics.go @@ -11,8 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Used to ingest training metrics into SageMaker which can be visualized in -// SageMaker Studio and retrieved with the GetMetrics API. +// Used to ingest training metrics into SageMaker. These metrics can be visualized +// in SageMaker Studio and retrieved with the GetMetrics API. func (c *Client) BatchPutMetrics(ctx context.Context, params *BatchPutMetricsInput, optFns ...func(*Options)) (*BatchPutMetricsOutput, error) { if params == nil { params = &BatchPutMetricsInput{} @@ -35,7 +35,7 @@ type BatchPutMetricsInput struct { // This member is required. MetricData []types.RawMetricData - // The name of Trial Component to associate the metrics with. + // The name of the Trial Component to associate with the metrics. // // This member is required. TrialComponentName *string @@ -45,7 +45,7 @@ type BatchPutMetricsInput struct { type BatchPutMetricsOutput struct { - // Any errors that occur when inserting metric data will appear in this. + // Lists any errors that occur when inserting metric data. Errors []types.BatchPutMetricsError // Metadata pertaining to the operation's result. diff --git a/service/sagemakermetrics/types/types.go b/service/sagemakermetrics/types/types.go index 1682f237648..9f2b49c076f 100644 --- a/service/sagemakermetrics/types/types.go +++ b/service/sagemakermetrics/types/types.go @@ -13,16 +13,16 @@ type BatchPutMetricsError struct { // The error code of an error that occured when attempting to put metrics. // // * - // METRIC_LIMIT_EXCEEDED - The max amount of metrics per resource has been + // METRIC_LIMIT_EXCEEDED: The maximum amount of metrics per resource is // exceeded. // - // * INTERNAL_ERROR - An internal error occured. + // * INTERNAL_ERROR: An internal error occured. // - // * VALIDATION_ERROR - - // The metric data failed validation. + // * VALIDATION_ERROR: The + // metric data failed validation. // - // * CONFLICT_ERROR - Multiple requests - // attempted to modify the same data simultaneously. + // * CONFLICT_ERROR: Multiple requests attempted to + // modify the same data simultaneously. Code PutMetricsErrorCode // An index that corresponds to the metric in the request. @@ -39,7 +39,7 @@ type RawMetricData struct { // This member is required. MetricName *string - // The time when the metric was recorded. + // The time that the metric was recorded. // // This member is required. Timestamp *time.Time @@ -49,7 +49,7 @@ type RawMetricData struct { // This member is required. Value float64 - // Metric step (aka Epoch). + // The metric step (epoch). Step *int32 noSmithyDocumentSerde