diff --git a/.changelog/327bef418b5a4eb18f675ecef22d1605.json b/.changelog/327bef418b5a4eb18f675ecef22d1605.json new file mode 100644 index 00000000000..0df0063da47 --- /dev/null +++ b/.changelog/327bef418b5a4eb18f675ecef22d1605.json @@ -0,0 +1,8 @@ +{ + "id": "327bef41-8b5a-4eb1-8f67-5ecef22d1605", + "type": "feature", + "description": "Add support for feature integration with AWS Backup.", + "modules": [ + "service/rds" + ] +} \ No newline at end of file diff --git a/.changelog/50d583c79f5947dcb23d08775d44a077.json b/.changelog/50d583c79f5947dcb23d08775d44a077.json new file mode 100644 index 00000000000..6b8d68c339a --- /dev/null +++ b/.changelog/50d583c79f5947dcb23d08775d44a077.json @@ -0,0 +1,8 @@ +{ + "id": "50d583c7-9f59-47dc-b23d-08775d44a077", + "type": "feature", + "description": "SageMaker Neo now supports data input shape derivation for Pytorch 2.0 and XGBoost compilation job for cloud instance targets. You can skip DataInputConfig field during compilation job creation. You can also access derived information from model in DescribeCompilationJob response.", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/6638aa041ef64885a67c27e003a5fde0.json b/.changelog/6638aa041ef64885a67c27e003a5fde0.json new file mode 100644 index 00000000000..3dec0e6ed2d --- /dev/null +++ b/.changelog/6638aa041ef64885a67c27e003a5fde0.json @@ -0,0 +1,8 @@ +{ + "id": "6638aa04-1ef6-4885-a67c-27e003a5fde0", + "type": "feature", + "description": "This release adds support for line item filtering in for the custom line item resource.", + "modules": [ + "service/billingconductor" + ] +} \ No newline at end of file diff --git a/.changelog/6c9c94ecc8e948dba744435227eed1bf.json b/.changelog/6c9c94ecc8e948dba744435227eed1bf.json new file mode 100644 index 00000000000..40677efb05a --- /dev/null +++ b/.changelog/6c9c94ecc8e948dba744435227eed1bf.json @@ -0,0 +1,8 @@ +{ + "id": "6c9c94ec-c8e9-48db-a744-435227eed1bf", + "type": "feature", + "description": "This release adds Lambda event structure version config support for LAMBDA target groups. It also adds newline support for auth policies.", + "modules": [ + "service/vpclattice" + ] +} \ No newline at end of file diff --git a/.changelog/81a0d33d3fa8447a927556ea5dfca4ee.json b/.changelog/81a0d33d3fa8447a927556ea5dfca4ee.json new file mode 100644 index 00000000000..b67b3f6ec90 --- /dev/null +++ b/.changelog/81a0d33d3fa8447a927556ea5dfca4ee.json @@ -0,0 +1,8 @@ +{ + "id": "81a0d33d-3fa8-447a-9275-56ea5dfca4ee", + "type": "documentation", + "description": "Documentation only update for Amazon ECS.", + "modules": [ + "service/ecs" + ] +} \ No newline at end of file diff --git a/.changelog/aa0e6020918442ac9202987f3fb0e600.json b/.changelog/aa0e6020918442ac9202987f3fb0e600.json new file mode 100644 index 00000000000..44edc379062 --- /dev/null +++ b/.changelog/aa0e6020918442ac9202987f3fb0e600.json @@ -0,0 +1,8 @@ +{ + "id": "aa0e6020-9184-42ac-9202-987f3fb0e600", + "type": "documentation", + "description": "Added support for Ubuntu 22.04 that was not picked up in a previous Trebuchet request. Doc-only update.", + "modules": [ + "service/cloud9" + ] +} \ No newline at end of file diff --git a/.changelog/b1828e5d91a244f6a2931a3814137532.json b/.changelog/b1828e5d91a244f6a2931a3814137532.json new file mode 100644 index 00000000000..b8ce8b1d07b --- /dev/null +++ b/.changelog/b1828e5d91a244f6a2931a3814137532.json @@ -0,0 +1,8 @@ +{ + "id": "b1828e5d-91a2-44f6-a293-1a3814137532", + "type": "feature", + "description": "Improve Endpoint Ruleset test coverage.", + "modules": [ + "service/eventbridge" + ] +} \ No newline at end of file diff --git a/.changelog/ce02de89f39d4c88ab895e190dfed9cf.json b/.changelog/ce02de89f39d4c88ab895e190dfed9cf.json new file mode 100644 index 00000000000..62af08b7056 --- /dev/null +++ b/.changelog/ce02de89f39d4c88ab895e190dfed9cf.json @@ -0,0 +1,8 @@ +{ + "id": "ce02de89-f39d-4c88-ab89-5e190dfed9cf", + "type": "feature", + "description": "This release adds support to provide recommendations for G4dn and P3 instances that use NVIDIA GPUs.", + "modules": [ + "service/computeoptimizer" + ] +} \ No newline at end of file diff --git a/.changelog/daa3e42425fd410085ca24e26134433e.json b/.changelog/daa3e42425fd410085ca24e26134433e.json new file mode 100644 index 00000000000..6892785afdb --- /dev/null +++ b/.changelog/daa3e42425fd410085ca24e26134433e.json @@ -0,0 +1,8 @@ +{ + "id": "daa3e424-25fd-4100-85ca-24e26134433e", + "type": "feature", + "description": "Introducing Amazon EC2 C7gd, M7gd, and R7gd Instances with up to 3.8 TB of local NVMe-based SSD block-level storage. These instances are powered by AWS Graviton3 processors, delivering up to 25% better performance over Graviton2-based instances.", + "modules": [ + "service/ec2" + ] +} \ No newline at end of file diff --git a/service/billingconductor/deserializers.go b/service/billingconductor/deserializers.go index 444c65a4998..ed462225056 100644 --- a/service/billingconductor/deserializers.go +++ b/service/billingconductor/deserializers.go @@ -6895,6 +6895,130 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return nil } +func awsRestjson1_deserializeDocumentLineItemFilter(v **types.LineItemFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LineItemFilter + if *v == nil { + sv = &types.LineItemFilter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Attribute": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LineItemFilterAttributeName to be of type string, got %T instead", value) + } + sv.Attribute = types.LineItemFilterAttributeName(jtv) + } + + case "MatchOption": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MatchOption to be of type string, got %T instead", value) + } + sv.MatchOption = types.MatchOption(jtv) + } + + case "Values": + if err := awsRestjson1_deserializeDocumentLineItemFilterValuesList(&sv.Values, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLineItemFiltersList(v *[]types.LineItemFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.LineItemFilter + if *v == nil { + cv = []types.LineItemFilter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LineItemFilter + destAddr := &col + if err := awsRestjson1_deserializeDocumentLineItemFilter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLineItemFilterValuesList(v *[]types.LineItemFilterValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.LineItemFilterValue + if *v == nil { + cv = []types.LineItemFilterValue{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LineItemFilterValue + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LineItemFilterValue to be of type string, got %T instead", value) + } + col = types.LineItemFilterValue(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentListBillingGroupAccountGrouping(v **types.ListBillingGroupAccountGrouping, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6962,6 +7086,11 @@ func awsRestjson1_deserializeDocumentListCustomLineItemChargeDetails(v **types.L return err } + case "LineItemFilters": + if err := awsRestjson1_deserializeDocumentLineItemFiltersList(&sv.LineItemFilters, value); err != nil { + return err + } + case "Percentage": if err := awsRestjson1_deserializeDocumentListCustomLineItemPercentageChargeDetails(&sv.Percentage, value); err != nil { return err diff --git a/service/billingconductor/serializers.go b/service/billingconductor/serializers.go index 1d4c6082f1e..f7504802622 100644 --- a/service/billingconductor/serializers.go +++ b/service/billingconductor/serializers.go @@ -3030,6 +3030,13 @@ func awsRestjson1_serializeDocumentCustomLineItemChargeDetails(v *types.CustomLi } } + if v.LineItemFilters != nil { + ok := object.Key("LineItemFilters") + if err := awsRestjson1_serializeDocumentLineItemFiltersList(v.LineItemFilters, ok); err != nil { + return err + } + } + if v.Percentage != nil { ok := object.Key("Percentage") if err := awsRestjson1_serializeDocumentCustomLineItemPercentageChargeDetails(v.Percentage, ok); err != nil { @@ -3113,6 +3120,54 @@ func awsRestjson1_serializeDocumentCustomLineItemPercentageChargeDetails(v *type return nil } +func awsRestjson1_serializeDocumentLineItemFilter(v *types.LineItemFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Attribute) > 0 { + ok := object.Key("Attribute") + ok.String(string(v.Attribute)) + } + + if len(v.MatchOption) > 0 { + ok := object.Key("MatchOption") + ok.String(string(v.MatchOption)) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsRestjson1_serializeDocumentLineItemFilterValuesList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentLineItemFiltersList(v []types.LineItemFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentLineItemFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentLineItemFilterValuesList(v []types.LineItemFilterValue, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + func awsRestjson1_serializeDocumentListAccountAssociationsFilter(v *types.ListAccountAssociationsFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3359,6 +3414,13 @@ func awsRestjson1_serializeDocumentUpdateCustomLineItemChargeDetails(v *types.Up } } + if v.LineItemFilters != nil { + ok := object.Key("LineItemFilters") + if err := awsRestjson1_serializeDocumentLineItemFiltersList(v.LineItemFilters, ok); err != nil { + return err + } + } + if v.Percentage != nil { ok := object.Key("Percentage") if err := awsRestjson1_serializeDocumentUpdateCustomLineItemPercentageChargeDetails(v.Percentage, ok); err != nil { diff --git a/service/billingconductor/types/enums.go b/service/billingconductor/types/enums.go index 6ad41f00689..a71899e1e89 100644 --- a/service/billingconductor/types/enums.go +++ b/service/billingconductor/types/enums.go @@ -123,6 +123,54 @@ func (CustomLineItemType) Values() []CustomLineItemType { } } +type LineItemFilterAttributeName string + +// Enum values for LineItemFilterAttributeName +const ( + LineItemFilterAttributeNameLineItemType LineItemFilterAttributeName = "LINE_ITEM_TYPE" +) + +// Values returns all known values for LineItemFilterAttributeName. 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 (LineItemFilterAttributeName) Values() []LineItemFilterAttributeName { + return []LineItemFilterAttributeName{ + "LINE_ITEM_TYPE", + } +} + +type LineItemFilterValue string + +// Enum values for LineItemFilterValue +const ( + LineItemFilterValueSavingsPlanNegation LineItemFilterValue = "SAVINGS_PLAN_NEGATION" +) + +// Values returns all known values for LineItemFilterValue. 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 (LineItemFilterValue) Values() []LineItemFilterValue { + return []LineItemFilterValue{ + "SAVINGS_PLAN_NEGATION", + } +} + +type MatchOption string + +// Enum values for MatchOption +const ( + MatchOptionNotEqual MatchOption = "NOT_EQUAL" +) + +// Values returns all known values for MatchOption. 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 (MatchOption) Values() []MatchOption { + return []MatchOption{ + "NOT_EQUAL", + } +} + type PricingRuleScope string // Enum values for PricingRuleScope diff --git a/service/billingconductor/types/types.go b/service/billingconductor/types/types.go index f7de5a2fb22..da7225ec1dd 100644 --- a/service/billingconductor/types/types.go +++ b/service/billingconductor/types/types.go @@ -198,6 +198,9 @@ type CustomLineItemChargeDetails struct { // custom line item. Flat *CustomLineItemFlatChargeDetails + // A representation of the line item filter. + LineItemFilters []LineItemFilter + // A CustomLineItemPercentageChargeDetails that describes the charge details of a // percentage custom line item. Percentage *CustomLineItemPercentageChargeDetails @@ -342,6 +345,34 @@ type FreeTierConfig struct { noSmithyDocumentSerde } +// A representation of the line item filter for your custom line item. You can use +// line item filters to include or exclude specific resource values from the +// billing group's total cost. For example, if you create a custom line item and +// you want to filter out a value, such as Savings Plan discounts, you can update +// LineItemFilter to exclude it. +type LineItemFilter struct { + + // The attribute of the line item filter. This specifies what attribute that you + // can filter on. + // + // This member is required. + Attribute LineItemFilterAttributeName + + // The match criteria of the line item filter. This parameter specifies whether + // not to include the resource value from the billing group total cost. + // + // This member is required. + MatchOption MatchOption + + // The values of the line item filter. This specifies the values to filter on. + // Currently, you can only exclude Savings Plan discounts. + // + // This member is required. + Values []LineItemFilterValue + + noSmithyDocumentSerde +} + // The filter on the account ID of the linked account, or any of the following: // MONITORED : linked accounts that are associated to billing groups. UNMONITORED : // linked accounts that are not associated to billing groups. Billing Group Arn : @@ -417,6 +448,9 @@ type ListCustomLineItemChargeDetails struct { // flat custom line item. Flat *ListCustomLineItemFlatChargeDetails + // A representation of the line item filter. + LineItemFilters []LineItemFilter + // A ListCustomLineItemPercentageChargeDetails that describes the charge details // of a percentage custom line item. Percentage *ListCustomLineItemPercentageChargeDetails @@ -652,6 +686,9 @@ type UpdateCustomLineItemChargeDetails struct { // of a flat custom line item. Flat *UpdateCustomLineItemFlatChargeDetails + // A representation of the line item filter. + LineItemFilters []LineItemFilter + // An UpdateCustomLineItemPercentageChargeDetails that describes the new charge // details of a percentage custom line item. Percentage *UpdateCustomLineItemPercentageChargeDetails diff --git a/service/billingconductor/validators.go b/service/billingconductor/validators.go index 8730f85898a..1d68d8544a2 100644 --- a/service/billingconductor/validators.go +++ b/service/billingconductor/validators.go @@ -707,6 +707,11 @@ func validateCustomLineItemChargeDetails(v *types.CustomLineItemChargeDetails) e if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) } + if v.LineItemFilters != nil { + if err := validateLineItemFiltersList(v.LineItemFilters); err != nil { + invalidParams.AddNested("LineItemFilters", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -744,6 +749,44 @@ func validateCustomLineItemPercentageChargeDetails(v *types.CustomLineItemPercen } } +func validateLineItemFilter(v *types.LineItemFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LineItemFilter"} + if len(v.Attribute) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Attribute")) + } + if len(v.MatchOption) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("MatchOption")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLineItemFiltersList(v []types.LineItemFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LineItemFiltersList"} + for i := range v { + if err := validateLineItemFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateUpdateCustomLineItemChargeDetails(v *types.UpdateCustomLineItemChargeDetails) error { if v == nil { return nil @@ -759,6 +802,11 @@ func validateUpdateCustomLineItemChargeDetails(v *types.UpdateCustomLineItemChar invalidParams.AddNested("Percentage", err.(smithy.InvalidParamsError)) } } + if v.LineItemFilters != nil { + if err := validateLineItemFiltersList(v.LineItemFilters); err != nil { + invalidParams.AddNested("LineItemFilters", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/cloud9/api_op_CreateEnvironmentEC2.go b/service/cloud9/api_op_CreateEnvironmentEC2.go index c90e68d6993..a29ed57de12 100644 --- a/service/cloud9/api_op_CreateEnvironmentEC2.go +++ b/service/cloud9/api_op_CreateEnvironmentEC2.go @@ -85,11 +85,13 @@ type CreateEnvironmentEC2Input struct { // - Amazon Linux (default): amazonlinux-1-x86_64 // - Amazon Linux 2: amazonlinux-2-x86_64 // - Ubuntu 18.04: ubuntu-18.04-x86_64 + // - Ubuntu 22.04: ubuntu-22.04-x86_64 // SSM paths // - Amazon Linux (default): // resolve:ssm:/aws/service/cloud9/amis/amazonlinux-1-x86_64 // - Amazon Linux 2: resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64 // - Ubuntu 18.04: resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64 + // - Ubuntu 22.04: resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64 ImageId *string // The Amazon Resource Name (ARN) of the environment owner. This ARN can be the diff --git a/service/computeoptimizer/deserializers.go b/service/computeoptimizer/deserializers.go index 9c439f38fdf..e391d10a7fa 100644 --- a/service/computeoptimizer/deserializers.go +++ b/service/computeoptimizer/deserializers.go @@ -3632,6 +3632,11 @@ func awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendation(v **types.Au return err } + case "currentInstanceGpuInfo": + if err := awsAwsjson10_deserializeDocumentGpuInfo(&sv.CurrentInstanceGpuInfo, value); err != nil { + return err + } + case "currentPerformanceRisk": if value != nil { jtv, ok := value.(string) @@ -3756,6 +3761,11 @@ func awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendationOption(v **ty return err } + case "instanceGpuInfo": + if err := awsAwsjson10_deserializeDocumentGpuInfo(&sv.InstanceGpuInfo, value); err != nil { + return err + } + case "migrationEffort": if value != nil { jtv, ok := value.(string) @@ -5449,6 +5459,133 @@ func awsAwsjson10_deserializeDocumentGetRecommendationErrors(v *[]types.GetRecom return nil } +func awsAwsjson10_deserializeDocumentGpu(v **types.Gpu, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Gpu + if *v == nil { + sv = &types.Gpu{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "gpuCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected GpuCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.GpuCount = int32(i64) + } + + case "gpuMemorySizeInMiB": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected GpuMemorySizeInMiB to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.GpuMemorySizeInMiB = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentGpuInfo(v **types.GpuInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.GpuInfo + if *v == nil { + sv = &types.GpuInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "gpus": + if err := awsAwsjson10_deserializeDocumentGpus(&sv.Gpus, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentGpus(v *[]types.Gpu, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Gpu + if *v == nil { + cv = []types.Gpu{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Gpu + destAddr := &col + if err := awsAwsjson10_deserializeDocumentGpu(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson10_deserializeDocumentInferredWorkloadSaving(v **types.InferredWorkloadSaving, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5591,6 +5728,11 @@ func awsAwsjson10_deserializeDocumentInstanceRecommendation(v **types.InstanceRe sv.AccountId = ptr.String(jtv) } + case "currentInstanceGpuInfo": + if err := awsAwsjson10_deserializeDocumentGpuInfo(&sv.CurrentInstanceGpuInfo, value); err != nil { + return err + } + case "currentInstanceType": if value != nil { jtv, ok := value.(string) @@ -5633,6 +5775,15 @@ func awsAwsjson10_deserializeDocumentInstanceRecommendation(v **types.InstanceRe return err } + case "idle": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceIdle to be of type string, got %T instead", value) + } + sv.Idle = types.InstanceIdle(jtv) + } + case "inferredWorkloadTypes": if err := awsAwsjson10_deserializeDocumentInferredWorkloadTypes(&sv.InferredWorkloadTypes, value); err != nil { return err @@ -5802,6 +5953,11 @@ func awsAwsjson10_deserializeDocumentInstanceRecommendationOption(v **types.Inst for key, value := range shape { switch key { + case "instanceGpuInfo": + if err := awsAwsjson10_deserializeDocumentGpuInfo(&sv.InstanceGpuInfo, value); err != nil { + return err + } + case "instanceType": if value != nil { jtv, ok := value.(string) diff --git a/service/computeoptimizer/types/enums.go b/service/computeoptimizer/types/enums.go index 4f0d6f7a3f0..f547e477b57 100644 --- a/service/computeoptimizer/types/enums.go +++ b/service/computeoptimizer/types/enums.go @@ -290,60 +290,66 @@ type ExportableAutoScalingGroupField string // Enum values for ExportableAutoScalingGroupField const ( - ExportableAutoScalingGroupFieldAccountId ExportableAutoScalingGroupField = "AccountId" - ExportableAutoScalingGroupFieldAutoScalingGroupArn ExportableAutoScalingGroupField = "AutoScalingGroupArn" - ExportableAutoScalingGroupFieldAutoScalingGroupName ExportableAutoScalingGroupField = "AutoScalingGroupName" - ExportableAutoScalingGroupFieldFinding ExportableAutoScalingGroupField = "Finding" - ExportableAutoScalingGroupFieldUtilizationMetricsCpuMaximum ExportableAutoScalingGroupField = "UtilizationMetricsCpuMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsMemoryMaximum ExportableAutoScalingGroupField = "UtilizationMetricsMemoryMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsEbsReadOpsPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsEbsReadOpsPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsEbsWriteOpsPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsEbsWriteOpsPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsEbsReadBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsEbsReadBytesPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsEbsWriteBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsEbsWriteBytesPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsDiskReadOpsPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsDiskReadOpsPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsDiskWriteOpsPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsDiskWriteOpsPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsDiskReadBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsDiskReadBytesPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsDiskWriteBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsDiskWriteBytesPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsNetworkInBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsNetworkInBytesPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsNetworkOutBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsNetworkOutBytesPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsNetworkPacketsInPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsNetworkPacketsInPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsNetworkPacketsOutPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsNetworkPacketsOutPerSecondMaximum" - ExportableAutoScalingGroupFieldLookbackPeriodInDays ExportableAutoScalingGroupField = "LookbackPeriodInDays" - ExportableAutoScalingGroupFieldCurrentConfigurationInstanceType ExportableAutoScalingGroupField = "CurrentConfigurationInstanceType" - ExportableAutoScalingGroupFieldCurrentConfigurationDesiredCapacity ExportableAutoScalingGroupField = "CurrentConfigurationDesiredCapacity" - ExportableAutoScalingGroupFieldCurrentConfigurationMinSize ExportableAutoScalingGroupField = "CurrentConfigurationMinSize" - ExportableAutoScalingGroupFieldCurrentConfigurationMaxSize ExportableAutoScalingGroupField = "CurrentConfigurationMaxSize" - ExportableAutoScalingGroupFieldCurrentOnDemandPrice ExportableAutoScalingGroupField = "CurrentOnDemandPrice" - ExportableAutoScalingGroupFieldCurrentStandardOneYearNoUpfrontReservedPrice ExportableAutoScalingGroupField = "CurrentStandardOneYearNoUpfrontReservedPrice" - ExportableAutoScalingGroupFieldCurrentStandardThreeYearNoUpfrontReservedPrice ExportableAutoScalingGroupField = "CurrentStandardThreeYearNoUpfrontReservedPrice" - ExportableAutoScalingGroupFieldCurrentVcpus ExportableAutoScalingGroupField = "CurrentVCpus" - ExportableAutoScalingGroupFieldCurrentMemory ExportableAutoScalingGroupField = "CurrentMemory" - ExportableAutoScalingGroupFieldCurrentStorage ExportableAutoScalingGroupField = "CurrentStorage" - ExportableAutoScalingGroupFieldCurrentNetwork ExportableAutoScalingGroupField = "CurrentNetwork" - ExportableAutoScalingGroupFieldRecommendationOptionsConfigurationInstanceType ExportableAutoScalingGroupField = "RecommendationOptionsConfigurationInstanceType" - ExportableAutoScalingGroupFieldRecommendationOptionsConfigurationDesiredCapacity ExportableAutoScalingGroupField = "RecommendationOptionsConfigurationDesiredCapacity" - ExportableAutoScalingGroupFieldRecommendationOptionsConfigurationMinSize ExportableAutoScalingGroupField = "RecommendationOptionsConfigurationMinSize" - ExportableAutoScalingGroupFieldRecommendationOptionsConfigurationMaxSize ExportableAutoScalingGroupField = "RecommendationOptionsConfigurationMaxSize" - ExportableAutoScalingGroupFieldRecommendationOptionsProjectedUtilizationMetricsCpuMaximum ExportableAutoScalingGroupField = "RecommendationOptionsProjectedUtilizationMetricsCpuMaximum" - ExportableAutoScalingGroupFieldRecommendationOptionsProjectedUtilizationMetricsMemoryMaximum ExportableAutoScalingGroupField = "RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum" - ExportableAutoScalingGroupFieldRecommendationOptionsPerformanceRisk ExportableAutoScalingGroupField = "RecommendationOptionsPerformanceRisk" - ExportableAutoScalingGroupFieldRecommendationOptionsOnDemandPrice ExportableAutoScalingGroupField = "RecommendationOptionsOnDemandPrice" - ExportableAutoScalingGroupFieldRecommendationOptionsStandardOneYearNoUpfrontReservedPrice ExportableAutoScalingGroupField = "RecommendationOptionsStandardOneYearNoUpfrontReservedPrice" - ExportableAutoScalingGroupFieldRecommendationOptionsStandardThreeYearNoUpfrontReservedPrice ExportableAutoScalingGroupField = "RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice" - ExportableAutoScalingGroupFieldRecommendationOptionsVcpus ExportableAutoScalingGroupField = "RecommendationOptionsVcpus" - ExportableAutoScalingGroupFieldRecommendationOptionsMemory ExportableAutoScalingGroupField = "RecommendationOptionsMemory" - ExportableAutoScalingGroupFieldRecommendationOptionsStorage ExportableAutoScalingGroupField = "RecommendationOptionsStorage" - ExportableAutoScalingGroupFieldRecommendationOptionsNetwork ExportableAutoScalingGroupField = "RecommendationOptionsNetwork" - ExportableAutoScalingGroupFieldLastRefreshTimestamp ExportableAutoScalingGroupField = "LastRefreshTimestamp" - ExportableAutoScalingGroupFieldCurrentPerformanceRisk ExportableAutoScalingGroupField = "CurrentPerformanceRisk" - ExportableAutoScalingGroupFieldRecommendationOptionsSavingsOpportunityPercentage ExportableAutoScalingGroupField = "RecommendationOptionsSavingsOpportunityPercentage" - ExportableAutoScalingGroupFieldRecommendationOptionsEstimatedMonthlySavingsCurrency ExportableAutoScalingGroupField = "RecommendationOptionsEstimatedMonthlySavingsCurrency" - ExportableAutoScalingGroupFieldRecommendationOptionsEstimatedMonthlySavingsValue ExportableAutoScalingGroupField = "RecommendationOptionsEstimatedMonthlySavingsValue" - ExportableAutoScalingGroupFieldEffectiveRecommendationPreferencesCpuVendorArchitectures ExportableAutoScalingGroupField = "EffectiveRecommendationPreferencesCpuVendorArchitectures" - ExportableAutoScalingGroupFieldEffectiveRecommendationPreferencesEnhancedInfrastructureMetrics ExportableAutoScalingGroupField = "EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics" - ExportableAutoScalingGroupFieldEffectiveRecommendationPreferencesInferredWorkloadTypes ExportableAutoScalingGroupField = "EffectiveRecommendationPreferencesInferredWorkloadTypes" - ExportableAutoScalingGroupFieldInferredWorkloadTypes ExportableAutoScalingGroupField = "InferredWorkloadTypes" - ExportableAutoScalingGroupFieldRecommendationOptionsMigrationEffort ExportableAutoScalingGroupField = "RecommendationOptionsMigrationEffort" + ExportableAutoScalingGroupFieldAccountId ExportableAutoScalingGroupField = "AccountId" + ExportableAutoScalingGroupFieldAutoScalingGroupArn ExportableAutoScalingGroupField = "AutoScalingGroupArn" + ExportableAutoScalingGroupFieldAutoScalingGroupName ExportableAutoScalingGroupField = "AutoScalingGroupName" + ExportableAutoScalingGroupFieldFinding ExportableAutoScalingGroupField = "Finding" + ExportableAutoScalingGroupFieldUtilizationMetricsCpuMaximum ExportableAutoScalingGroupField = "UtilizationMetricsCpuMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsMemoryMaximum ExportableAutoScalingGroupField = "UtilizationMetricsMemoryMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsEbsReadOpsPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsEbsReadOpsPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsEbsWriteOpsPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsEbsWriteOpsPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsEbsReadBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsEbsReadBytesPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsEbsWriteBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsEbsWriteBytesPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsDiskReadOpsPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsDiskReadOpsPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsDiskWriteOpsPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsDiskWriteOpsPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsDiskReadBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsDiskReadBytesPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsDiskWriteBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsDiskWriteBytesPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsNetworkInBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsNetworkInBytesPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsNetworkOutBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsNetworkOutBytesPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsNetworkPacketsInPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsNetworkPacketsInPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsNetworkPacketsOutPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsNetworkPacketsOutPerSecondMaximum" + ExportableAutoScalingGroupFieldLookbackPeriodInDays ExportableAutoScalingGroupField = "LookbackPeriodInDays" + ExportableAutoScalingGroupFieldCurrentConfigurationInstanceType ExportableAutoScalingGroupField = "CurrentConfigurationInstanceType" + ExportableAutoScalingGroupFieldCurrentConfigurationDesiredCapacity ExportableAutoScalingGroupField = "CurrentConfigurationDesiredCapacity" + ExportableAutoScalingGroupFieldCurrentConfigurationMinSize ExportableAutoScalingGroupField = "CurrentConfigurationMinSize" + ExportableAutoScalingGroupFieldCurrentConfigurationMaxSize ExportableAutoScalingGroupField = "CurrentConfigurationMaxSize" + ExportableAutoScalingGroupFieldCurrentOnDemandPrice ExportableAutoScalingGroupField = "CurrentOnDemandPrice" + ExportableAutoScalingGroupFieldCurrentStandardOneYearNoUpfrontReservedPrice ExportableAutoScalingGroupField = "CurrentStandardOneYearNoUpfrontReservedPrice" + ExportableAutoScalingGroupFieldCurrentStandardThreeYearNoUpfrontReservedPrice ExportableAutoScalingGroupField = "CurrentStandardThreeYearNoUpfrontReservedPrice" + ExportableAutoScalingGroupFieldCurrentVcpus ExportableAutoScalingGroupField = "CurrentVCpus" + ExportableAutoScalingGroupFieldCurrentMemory ExportableAutoScalingGroupField = "CurrentMemory" + ExportableAutoScalingGroupFieldCurrentStorage ExportableAutoScalingGroupField = "CurrentStorage" + ExportableAutoScalingGroupFieldCurrentNetwork ExportableAutoScalingGroupField = "CurrentNetwork" + ExportableAutoScalingGroupFieldRecommendationOptionsConfigurationInstanceType ExportableAutoScalingGroupField = "RecommendationOptionsConfigurationInstanceType" + ExportableAutoScalingGroupFieldRecommendationOptionsConfigurationDesiredCapacity ExportableAutoScalingGroupField = "RecommendationOptionsConfigurationDesiredCapacity" + ExportableAutoScalingGroupFieldRecommendationOptionsConfigurationMinSize ExportableAutoScalingGroupField = "RecommendationOptionsConfigurationMinSize" + ExportableAutoScalingGroupFieldRecommendationOptionsConfigurationMaxSize ExportableAutoScalingGroupField = "RecommendationOptionsConfigurationMaxSize" + ExportableAutoScalingGroupFieldRecommendationOptionsProjectedUtilizationMetricsCpuMaximum ExportableAutoScalingGroupField = "RecommendationOptionsProjectedUtilizationMetricsCpuMaximum" + ExportableAutoScalingGroupFieldRecommendationOptionsProjectedUtilizationMetricsMemoryMaximum ExportableAutoScalingGroupField = "RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum" + ExportableAutoScalingGroupFieldRecommendationOptionsPerformanceRisk ExportableAutoScalingGroupField = "RecommendationOptionsPerformanceRisk" + ExportableAutoScalingGroupFieldRecommendationOptionsOnDemandPrice ExportableAutoScalingGroupField = "RecommendationOptionsOnDemandPrice" + ExportableAutoScalingGroupFieldRecommendationOptionsStandardOneYearNoUpfrontReservedPrice ExportableAutoScalingGroupField = "RecommendationOptionsStandardOneYearNoUpfrontReservedPrice" + ExportableAutoScalingGroupFieldRecommendationOptionsStandardThreeYearNoUpfrontReservedPrice ExportableAutoScalingGroupField = "RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice" + ExportableAutoScalingGroupFieldRecommendationOptionsVcpus ExportableAutoScalingGroupField = "RecommendationOptionsVcpus" + ExportableAutoScalingGroupFieldRecommendationOptionsMemory ExportableAutoScalingGroupField = "RecommendationOptionsMemory" + ExportableAutoScalingGroupFieldRecommendationOptionsStorage ExportableAutoScalingGroupField = "RecommendationOptionsStorage" + ExportableAutoScalingGroupFieldRecommendationOptionsNetwork ExportableAutoScalingGroupField = "RecommendationOptionsNetwork" + ExportableAutoScalingGroupFieldLastRefreshTimestamp ExportableAutoScalingGroupField = "LastRefreshTimestamp" + ExportableAutoScalingGroupFieldCurrentPerformanceRisk ExportableAutoScalingGroupField = "CurrentPerformanceRisk" + ExportableAutoScalingGroupFieldRecommendationOptionsSavingsOpportunityPercentage ExportableAutoScalingGroupField = "RecommendationOptionsSavingsOpportunityPercentage" + ExportableAutoScalingGroupFieldRecommendationOptionsEstimatedMonthlySavingsCurrency ExportableAutoScalingGroupField = "RecommendationOptionsEstimatedMonthlySavingsCurrency" + ExportableAutoScalingGroupFieldRecommendationOptionsEstimatedMonthlySavingsValue ExportableAutoScalingGroupField = "RecommendationOptionsEstimatedMonthlySavingsValue" + ExportableAutoScalingGroupFieldEffectiveRecommendationPreferencesCpuVendorArchitectures ExportableAutoScalingGroupField = "EffectiveRecommendationPreferencesCpuVendorArchitectures" + ExportableAutoScalingGroupFieldEffectiveRecommendationPreferencesEnhancedInfrastructureMetrics ExportableAutoScalingGroupField = "EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics" + ExportableAutoScalingGroupFieldEffectiveRecommendationPreferencesInferredWorkloadTypes ExportableAutoScalingGroupField = "EffectiveRecommendationPreferencesInferredWorkloadTypes" + ExportableAutoScalingGroupFieldInferredWorkloadTypes ExportableAutoScalingGroupField = "InferredWorkloadTypes" + ExportableAutoScalingGroupFieldRecommendationOptionsMigrationEffort ExportableAutoScalingGroupField = "RecommendationOptionsMigrationEffort" + ExportableAutoScalingGroupFieldCurrentInstanceGpuInfo ExportableAutoScalingGroupField = "CurrentInstanceGpuInfo" + ExportableAutoScalingGroupFieldRecommendationOptionsInstanceGpuInfo ExportableAutoScalingGroupField = "RecommendationOptionsInstanceGpuInfo" + ExportableAutoScalingGroupFieldUtilizationMetricsGpuPercentageMaximum ExportableAutoScalingGroupField = "UtilizationMetricsGpuPercentageMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsGpuMemoryPercentageMaximum ExportableAutoScalingGroupField = "UtilizationMetricsGpuMemoryPercentageMaximum" + ExportableAutoScalingGroupFieldRecommendationOptionsProjectedUtilizationMetricsGpuMaximum ExportableAutoScalingGroupField = "RecommendationOptionsProjectedUtilizationMetricsGpuPercentageMaximum" + ExportableAutoScalingGroupFieldRecommendationOptionsProjectedUtilizationMetricsGpuMemoryMaximum ExportableAutoScalingGroupField = "RecommendationOptionsProjectedUtilizationMetricsGpuMemoryPercentageMaximum" ) // Values returns all known values for ExportableAutoScalingGroupField. Note that @@ -406,6 +412,12 @@ func (ExportableAutoScalingGroupField) Values() []ExportableAutoScalingGroupFiel "EffectiveRecommendationPreferencesInferredWorkloadTypes", "InferredWorkloadTypes", "RecommendationOptionsMigrationEffort", + "CurrentInstanceGpuInfo", + "RecommendationOptionsInstanceGpuInfo", + "UtilizationMetricsGpuPercentageMaximum", + "UtilizationMetricsGpuMemoryPercentageMaximum", + "RecommendationOptionsProjectedUtilizationMetricsGpuPercentageMaximum", + "RecommendationOptionsProjectedUtilizationMetricsGpuMemoryPercentageMaximum", } } @@ -475,63 +487,70 @@ type ExportableInstanceField string // Enum values for ExportableInstanceField const ( - ExportableInstanceFieldAccountId ExportableInstanceField = "AccountId" - ExportableInstanceFieldInstanceArn ExportableInstanceField = "InstanceArn" - ExportableInstanceFieldInstanceName ExportableInstanceField = "InstanceName" - ExportableInstanceFieldFinding ExportableInstanceField = "Finding" - ExportableInstanceFieldFindingReasonCodes ExportableInstanceField = "FindingReasonCodes" - ExportableInstanceFieldLookbackPeriodInDays ExportableInstanceField = "LookbackPeriodInDays" - ExportableInstanceFieldCurrentInstanceType ExportableInstanceField = "CurrentInstanceType" - ExportableInstanceFieldUtilizationMetricsCpuMaximum ExportableInstanceField = "UtilizationMetricsCpuMaximum" - ExportableInstanceFieldUtilizationMetricsMemoryMaximum ExportableInstanceField = "UtilizationMetricsMemoryMaximum" - ExportableInstanceFieldUtilizationMetricsEbsReadOpsPerSecondMaximum ExportableInstanceField = "UtilizationMetricsEbsReadOpsPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsEbsWriteOpsPerSecondMaximum ExportableInstanceField = "UtilizationMetricsEbsWriteOpsPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsEbsReadBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsEbsReadBytesPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsEbsWriteBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsEbsWriteBytesPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsDiskReadOpsPerSecondMaximum ExportableInstanceField = "UtilizationMetricsDiskReadOpsPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsDiskWriteOpsPerSecondMaximum ExportableInstanceField = "UtilizationMetricsDiskWriteOpsPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsDiskReadBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsDiskReadBytesPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsDiskWriteBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsDiskWriteBytesPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsNetworkInBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsNetworkInBytesPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsNetworkOutBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsNetworkOutBytesPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsNetworkPacketsInPerSecondMaximum ExportableInstanceField = "UtilizationMetricsNetworkPacketsInPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsNetworkPacketsOutPerSecondMaximum ExportableInstanceField = "UtilizationMetricsNetworkPacketsOutPerSecondMaximum" - ExportableInstanceFieldCurrentOnDemandPrice ExportableInstanceField = "CurrentOnDemandPrice" - ExportableInstanceFieldCurrentStandardOneYearNoUpfrontReservedPrice ExportableInstanceField = "CurrentStandardOneYearNoUpfrontReservedPrice" - ExportableInstanceFieldCurrentStandardThreeYearNoUpfrontReservedPrice ExportableInstanceField = "CurrentStandardThreeYearNoUpfrontReservedPrice" - ExportableInstanceFieldCurrentVcpus ExportableInstanceField = "CurrentVCpus" - ExportableInstanceFieldCurrentMemory ExportableInstanceField = "CurrentMemory" - ExportableInstanceFieldCurrentStorage ExportableInstanceField = "CurrentStorage" - ExportableInstanceFieldCurrentNetwork ExportableInstanceField = "CurrentNetwork" - ExportableInstanceFieldRecommendationOptionsInstanceType ExportableInstanceField = "RecommendationOptionsInstanceType" - ExportableInstanceFieldRecommendationOptionsProjectedUtilizationMetricsCpuMaximum ExportableInstanceField = "RecommendationOptionsProjectedUtilizationMetricsCpuMaximum" - ExportableInstanceFieldRecommendationOptionsProjectedUtilizationMetricsMemoryMaximum ExportableInstanceField = "RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum" - ExportableInstanceFieldRecommendationOptionsPlatformDifferences ExportableInstanceField = "RecommendationOptionsPlatformDifferences" - ExportableInstanceFieldRecommendationOptionsPerformanceRisk ExportableInstanceField = "RecommendationOptionsPerformanceRisk" - ExportableInstanceFieldRecommendationOptionsVcpus ExportableInstanceField = "RecommendationOptionsVcpus" - ExportableInstanceFieldRecommendationOptionsMemory ExportableInstanceField = "RecommendationOptionsMemory" - ExportableInstanceFieldRecommendationOptionsStorage ExportableInstanceField = "RecommendationOptionsStorage" - ExportableInstanceFieldRecommendationOptionsNetwork ExportableInstanceField = "RecommendationOptionsNetwork" - ExportableInstanceFieldRecommendationOptionsOnDemandPrice ExportableInstanceField = "RecommendationOptionsOnDemandPrice" - ExportableInstanceFieldRecommendationOptionsStandardOneYearNoUpfrontReservedPrice ExportableInstanceField = "RecommendationOptionsStandardOneYearNoUpfrontReservedPrice" - ExportableInstanceFieldRecommendationOptionsStandardThreeYearNoUpfrontReservedPrice ExportableInstanceField = "RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice" - ExportableInstanceFieldRecommendationsSourcesRecommendationSourceArn ExportableInstanceField = "RecommendationsSourcesRecommendationSourceArn" - ExportableInstanceFieldRecommendationsSourcesRecommendationSourceType ExportableInstanceField = "RecommendationsSourcesRecommendationSourceType" - ExportableInstanceFieldLastRefreshTimestamp ExportableInstanceField = "LastRefreshTimestamp" - ExportableInstanceFieldCurrentPerformanceRisk ExportableInstanceField = "CurrentPerformanceRisk" - ExportableInstanceFieldRecommendationOptionsSavingsOpportunityPercentage ExportableInstanceField = "RecommendationOptionsSavingsOpportunityPercentage" - ExportableInstanceFieldRecommendationOptionsEstimatedMonthlySavingsCurrency ExportableInstanceField = "RecommendationOptionsEstimatedMonthlySavingsCurrency" - ExportableInstanceFieldRecommendationOptionsEstimatedMonthlySavingsValue ExportableInstanceField = "RecommendationOptionsEstimatedMonthlySavingsValue" - ExportableInstanceFieldEffectiveRecommendationPreferencesCpuVendorArchitectures ExportableInstanceField = "EffectiveRecommendationPreferencesCpuVendorArchitectures" - ExportableInstanceFieldEffectiveRecommendationPreferencesEnhancedInfrastructureMetrics ExportableInstanceField = "EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics" - ExportableInstanceFieldEffectiveRecommendationPreferencesInferredWorkloadTypes ExportableInstanceField = "EffectiveRecommendationPreferencesInferredWorkloadTypes" - ExportableInstanceFieldInferredWorkloadTypes ExportableInstanceField = "InferredWorkloadTypes" - ExportableInstanceFieldRecommendationOptionsMigrationEffort ExportableInstanceField = "RecommendationOptionsMigrationEffort" - ExportableInstanceFieldEffectiveRecommendationPreferencesExternalMetricsSource ExportableInstanceField = "EffectiveRecommendationPreferencesExternalMetricsSource" - ExportableInstanceFieldInstanceState ExportableInstanceField = "InstanceState" - ExportableInstanceFieldTags ExportableInstanceField = "Tags" - ExportableInstanceFieldExternalMetricStatusCode ExportableInstanceField = "ExternalMetricStatusCode" - ExportableInstanceFieldExternalMetricStatusReason ExportableInstanceField = "ExternalMetricStatusReason" + ExportableInstanceFieldAccountId ExportableInstanceField = "AccountId" + ExportableInstanceFieldInstanceArn ExportableInstanceField = "InstanceArn" + ExportableInstanceFieldInstanceName ExportableInstanceField = "InstanceName" + ExportableInstanceFieldFinding ExportableInstanceField = "Finding" + ExportableInstanceFieldFindingReasonCodes ExportableInstanceField = "FindingReasonCodes" + ExportableInstanceFieldLookbackPeriodInDays ExportableInstanceField = "LookbackPeriodInDays" + ExportableInstanceFieldCurrentInstanceType ExportableInstanceField = "CurrentInstanceType" + ExportableInstanceFieldUtilizationMetricsCpuMaximum ExportableInstanceField = "UtilizationMetricsCpuMaximum" + ExportableInstanceFieldUtilizationMetricsMemoryMaximum ExportableInstanceField = "UtilizationMetricsMemoryMaximum" + ExportableInstanceFieldUtilizationMetricsEbsReadOpsPerSecondMaximum ExportableInstanceField = "UtilizationMetricsEbsReadOpsPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsEbsWriteOpsPerSecondMaximum ExportableInstanceField = "UtilizationMetricsEbsWriteOpsPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsEbsReadBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsEbsReadBytesPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsEbsWriteBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsEbsWriteBytesPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsDiskReadOpsPerSecondMaximum ExportableInstanceField = "UtilizationMetricsDiskReadOpsPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsDiskWriteOpsPerSecondMaximum ExportableInstanceField = "UtilizationMetricsDiskWriteOpsPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsDiskReadBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsDiskReadBytesPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsDiskWriteBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsDiskWriteBytesPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsNetworkInBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsNetworkInBytesPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsNetworkOutBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsNetworkOutBytesPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsNetworkPacketsInPerSecondMaximum ExportableInstanceField = "UtilizationMetricsNetworkPacketsInPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsNetworkPacketsOutPerSecondMaximum ExportableInstanceField = "UtilizationMetricsNetworkPacketsOutPerSecondMaximum" + ExportableInstanceFieldCurrentOnDemandPrice ExportableInstanceField = "CurrentOnDemandPrice" + ExportableInstanceFieldCurrentStandardOneYearNoUpfrontReservedPrice ExportableInstanceField = "CurrentStandardOneYearNoUpfrontReservedPrice" + ExportableInstanceFieldCurrentStandardThreeYearNoUpfrontReservedPrice ExportableInstanceField = "CurrentStandardThreeYearNoUpfrontReservedPrice" + ExportableInstanceFieldCurrentVcpus ExportableInstanceField = "CurrentVCpus" + ExportableInstanceFieldCurrentMemory ExportableInstanceField = "CurrentMemory" + ExportableInstanceFieldCurrentStorage ExportableInstanceField = "CurrentStorage" + ExportableInstanceFieldCurrentNetwork ExportableInstanceField = "CurrentNetwork" + ExportableInstanceFieldRecommendationOptionsInstanceType ExportableInstanceField = "RecommendationOptionsInstanceType" + ExportableInstanceFieldRecommendationOptionsProjectedUtilizationMetricsCpuMaximum ExportableInstanceField = "RecommendationOptionsProjectedUtilizationMetricsCpuMaximum" + ExportableInstanceFieldRecommendationOptionsProjectedUtilizationMetricsMemoryMaximum ExportableInstanceField = "RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum" + ExportableInstanceFieldRecommendationOptionsPlatformDifferences ExportableInstanceField = "RecommendationOptionsPlatformDifferences" + ExportableInstanceFieldRecommendationOptionsPerformanceRisk ExportableInstanceField = "RecommendationOptionsPerformanceRisk" + ExportableInstanceFieldRecommendationOptionsVcpus ExportableInstanceField = "RecommendationOptionsVcpus" + ExportableInstanceFieldRecommendationOptionsMemory ExportableInstanceField = "RecommendationOptionsMemory" + ExportableInstanceFieldRecommendationOptionsStorage ExportableInstanceField = "RecommendationOptionsStorage" + ExportableInstanceFieldRecommendationOptionsNetwork ExportableInstanceField = "RecommendationOptionsNetwork" + ExportableInstanceFieldRecommendationOptionsOnDemandPrice ExportableInstanceField = "RecommendationOptionsOnDemandPrice" + ExportableInstanceFieldRecommendationOptionsStandardOneYearNoUpfrontReservedPrice ExportableInstanceField = "RecommendationOptionsStandardOneYearNoUpfrontReservedPrice" + ExportableInstanceFieldRecommendationOptionsStandardThreeYearNoUpfrontReservedPrice ExportableInstanceField = "RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice" + ExportableInstanceFieldRecommendationsSourcesRecommendationSourceArn ExportableInstanceField = "RecommendationsSourcesRecommendationSourceArn" + ExportableInstanceFieldRecommendationsSourcesRecommendationSourceType ExportableInstanceField = "RecommendationsSourcesRecommendationSourceType" + ExportableInstanceFieldLastRefreshTimestamp ExportableInstanceField = "LastRefreshTimestamp" + ExportableInstanceFieldCurrentPerformanceRisk ExportableInstanceField = "CurrentPerformanceRisk" + ExportableInstanceFieldRecommendationOptionsSavingsOpportunityPercentage ExportableInstanceField = "RecommendationOptionsSavingsOpportunityPercentage" + ExportableInstanceFieldRecommendationOptionsEstimatedMonthlySavingsCurrency ExportableInstanceField = "RecommendationOptionsEstimatedMonthlySavingsCurrency" + ExportableInstanceFieldRecommendationOptionsEstimatedMonthlySavingsValue ExportableInstanceField = "RecommendationOptionsEstimatedMonthlySavingsValue" + ExportableInstanceFieldEffectiveRecommendationPreferencesCpuVendorArchitectures ExportableInstanceField = "EffectiveRecommendationPreferencesCpuVendorArchitectures" + ExportableInstanceFieldEffectiveRecommendationPreferencesEnhancedInfrastructureMetrics ExportableInstanceField = "EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics" + ExportableInstanceFieldEffectiveRecommendationPreferencesInferredWorkloadTypes ExportableInstanceField = "EffectiveRecommendationPreferencesInferredWorkloadTypes" + ExportableInstanceFieldInferredWorkloadTypes ExportableInstanceField = "InferredWorkloadTypes" + ExportableInstanceFieldRecommendationOptionsMigrationEffort ExportableInstanceField = "RecommendationOptionsMigrationEffort" + ExportableInstanceFieldEffectiveRecommendationPreferencesExternalMetricsSource ExportableInstanceField = "EffectiveRecommendationPreferencesExternalMetricsSource" + ExportableInstanceFieldInstanceState ExportableInstanceField = "InstanceState" + ExportableInstanceFieldTags ExportableInstanceField = "Tags" + ExportableInstanceFieldExternalMetricStatusCode ExportableInstanceField = "ExternalMetricStatusCode" + ExportableInstanceFieldExternalMetricStatusReason ExportableInstanceField = "ExternalMetricStatusReason" + ExportableInstanceFieldCurrentInstanceGpuInfo ExportableInstanceField = "CurrentInstanceGpuInfo" + ExportableInstanceFieldRecommendationOptionsInstanceGpuInfo ExportableInstanceField = "RecommendationOptionsInstanceGpuInfo" + ExportableInstanceFieldUtilizationMetricsGpuPercentageMaximum ExportableInstanceField = "UtilizationMetricsGpuPercentageMaximum" + ExportableInstanceFieldUtilizationMetricsGpuMemoryPercentageMaximum ExportableInstanceField = "UtilizationMetricsGpuMemoryPercentageMaximum" + ExportableInstanceFieldRecommendationOptionsProjectedUtilizationMetricsGpuPercentageMaximum ExportableInstanceField = "RecommendationOptionsProjectedUtilizationMetricsGpuPercentageMaximum" + ExportableInstanceFieldRecommendationOptionsProjectedUtilizationMetricsGpuMemoryPercentageMaximum ExportableInstanceField = "RecommendationOptionsProjectedUtilizationMetricsGpuMemoryPercentageMaximum" + ExportableInstanceFieldIdle ExportableInstanceField = "Idle" ) // Values returns all known values for ExportableInstanceField. Note that this can @@ -596,6 +615,13 @@ func (ExportableInstanceField) Values() []ExportableInstanceField { "Tags", "ExternalMetricStatusCode", "ExternalMetricStatusReason", + "CurrentInstanceGpuInfo", + "RecommendationOptionsInstanceGpuInfo", + "UtilizationMetricsGpuPercentageMaximum", + "UtilizationMetricsGpuMemoryPercentageMaximum", + "RecommendationOptionsProjectedUtilizationMetricsGpuPercentageMaximum", + "RecommendationOptionsProjectedUtilizationMetricsGpuMemoryPercentageMaximum", + "Idle", } } @@ -758,6 +784,7 @@ const ( ExportableVolumeFieldRecommendationOptionsEstimatedMonthlySavingsValue ExportableVolumeField = "RecommendationOptionsEstimatedMonthlySavingsValue" ExportableVolumeFieldRootVolume ExportableVolumeField = "RootVolume" ExportableVolumeFieldTags ExportableVolumeField = "Tags" + ExportableVolumeFieldCurrentConfigurationRootVolume ExportableVolumeField = "CurrentConfigurationRootVolume" ) // Values returns all known values for ExportableVolumeField. Note that this can @@ -795,6 +822,7 @@ func (ExportableVolumeField) Values() []ExportableVolumeField { "RecommendationOptionsEstimatedMonthlySavingsValue", "RootVolume", "Tags", + "CurrentConfigurationRootVolume", } } @@ -983,6 +1011,24 @@ func (InferredWorkloadTypesPreference) Values() []InferredWorkloadTypesPreferenc } } +type InstanceIdle string + +// Enum values for InstanceIdle +const ( + InstanceIdleTrue InstanceIdle = "True" + InstanceIdleFalse InstanceIdle = "False" +) + +// Values returns all known values for InstanceIdle. 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 (InstanceIdle) Values() []InstanceIdle { + return []InstanceIdle{ + "True", + "False", + } +} + type InstanceRecommendationFindingReasonCode string // Enum values for InstanceRecommendationFindingReasonCode @@ -1003,6 +1049,10 @@ const ( InstanceRecommendationFindingReasonCodeDiskIopsUnderProvisioned InstanceRecommendationFindingReasonCode = "DiskIOPSUnderprovisioned" InstanceRecommendationFindingReasonCodeDiskThroughputOverProvisioned InstanceRecommendationFindingReasonCode = "DiskThroughputOverprovisioned" InstanceRecommendationFindingReasonCodeDiskThroughputUnderProvisioned InstanceRecommendationFindingReasonCode = "DiskThroughputUnderprovisioned" + InstanceRecommendationFindingReasonCodeGpuUnderProvisioned InstanceRecommendationFindingReasonCode = "GPUUnderprovisioned" + InstanceRecommendationFindingReasonCodeGpuOverProvisioned InstanceRecommendationFindingReasonCode = "GPUOverprovisioned" + InstanceRecommendationFindingReasonCodeGpuMemoryUnderProvisioned InstanceRecommendationFindingReasonCode = "GPUMemoryUnderprovisioned" + InstanceRecommendationFindingReasonCodeGpuMemoryOverProvisioned InstanceRecommendationFindingReasonCode = "GPUMemoryOverprovisioned" ) // Values returns all known values for InstanceRecommendationFindingReasonCode. @@ -1027,6 +1077,10 @@ func (InstanceRecommendationFindingReasonCode) Values() []InstanceRecommendation "DiskIOPSUnderprovisioned", "DiskThroughputOverprovisioned", "DiskThroughputUnderprovisioned", + "GPUUnderprovisioned", + "GPUOverprovisioned", + "GPUMemoryUnderprovisioned", + "GPUMemoryOverprovisioned", } } @@ -1371,6 +1425,8 @@ const ( MetricNameNetworkOutBytesPerSecond MetricName = "NETWORK_OUT_BYTES_PER_SECOND" MetricNameNetworkPacketsInPerSecond MetricName = "NETWORK_PACKETS_IN_PER_SECOND" MetricNameNetworkPacketsOutPerSecond MetricName = "NETWORK_PACKETS_OUT_PER_SECOND" + MetricNameGpuPercentage MetricName = "GPU_PERCENTAGE" + MetricNameGpuMemoryPercentage MetricName = "GPU_MEMORY_PERCENTAGE" ) // Values returns all known values for MetricName. Note that this can be expanded @@ -1392,6 +1448,8 @@ func (MetricName) Values() []MetricName { "NETWORK_OUT_BYTES_PER_SECOND", "NETWORK_PACKETS_IN_PER_SECOND", "NETWORK_PACKETS_OUT_PER_SECOND", + "GPU_PERCENTAGE", + "GPU_MEMORY_PERCENTAGE", } } diff --git a/service/computeoptimizer/types/types.go b/service/computeoptimizer/types/types.go index e72a7d75d2c..a8bbe2c00fe 100644 --- a/service/computeoptimizer/types/types.go +++ b/service/computeoptimizer/types/types.go @@ -63,6 +63,10 @@ type AutoScalingGroupRecommendation struct { // group. CurrentConfiguration *AutoScalingGroupConfiguration + // Describes the GPU accelerator settings for the current instance type of the + // Auto Scaling group. + CurrentInstanceGpuInfo *GpuInfo + // The risk of the current Auto Scaling group not meeting the performance needs of // its workloads. The higher the risk, the more likely the current Auto Scaling // group configuration has insufficient capacity and cannot meet workload @@ -123,6 +127,10 @@ type AutoScalingGroupRecommendationOption struct { // An array of objects that describe an Auto Scaling group configuration. Configuration *AutoScalingGroupConfiguration + // Describes the GPU accelerator settings for the recommended instance type of the + // Auto Scaling group. + InstanceGpuInfo *GpuInfo + // The level of effort required to migrate from the current instance type to the // recommended instance type. For example, the migration effort is Low if Amazon // EMR is the inferred workload type and an Amazon Web Services Graviton instance @@ -746,6 +754,28 @@ type GetRecommendationError struct { noSmithyDocumentSerde } +// Describes the GPU accelerators for the instance type. +type Gpu struct { + + // The number of GPUs for the instance type. + GpuCount int32 + + // The total size of the memory for the GPU accelerators for the instance type, in + // MiB. + GpuMemorySizeInMiB int32 + + noSmithyDocumentSerde +} + +// Describes the GPU accelerator settings for the instance type. +type GpuInfo struct { + + // Describes the GPU accelerators for the instance type. + Gpus []Gpu + + noSmithyDocumentSerde +} + // The estimated monthly savings after you adjust the configurations of your // instances running on the inferred workload types to the recommended // configurations. If the inferredWorkloadTypes list contains multiple entries, @@ -782,6 +812,9 @@ type InstanceRecommendation struct { // The Amazon Web Services account ID of the instance. AccountId *string + // Describes the GPU accelerator settings for the current instance type. + CurrentInstanceGpuInfo *GpuInfo + // The instance type of the current instance. CurrentInstanceType *string @@ -904,6 +937,9 @@ type InstanceRecommendation struct { // in the Amazon Elastic Compute Cloud User Guide. FindingReasonCodes []InstanceRecommendationFindingReasonCode + // Describes if an Amazon EC2 instance is idle. + Idle InstanceIdle + // The applications that might be running on the instance as inferred by Compute // Optimizer. Compute Optimizer can infer if one of the following applications // might be running on the instance: @@ -952,6 +988,9 @@ type InstanceRecommendation struct { // Describes a recommendation option for an Amazon EC2 instance. type InstanceRecommendationOption struct { + // Describes the GPU accelerator settings for the recommended instance type. + InstanceGpuInfo *GpuInfo + // The instance type of the instance recommendation. InstanceType *string @@ -1452,12 +1491,13 @@ type MetricSource struct { // recommendation option had you used that resource during the analyzed period. // Compare the utilization metric data of your resource against its projected // utilization metric data to determine the performance difference between your -// current resource and the recommended option. The Cpu and Memory metrics are the -// only projected utilization metrics returned when you run the -// GetEC2RecommendationProjectedMetrics action. Additionally, the Memory metric is -// returned only for resources that have the unified CloudWatch agent installed on -// them. For more information, see Enabling Memory Utilization with the CloudWatch -// Agent (https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent) +// current resource and the recommended option. The Cpu , Memory , GPU , and +// GPU_MEMORY metrics are the only projected utilization metrics returned when you +// run the GetEC2RecommendationProjectedMetrics action. Additionally, these +// metrics are only returned for resources with the unified CloudWatch agent +// installed on them. For more information, see Enabling Memory Utilization with +// the CloudWatch Agent (https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent) +// and Enabling NVIDIA GPU utilization with the CloudWatch Agent (https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#nvidia-cw-agent) // . type ProjectedMetric struct { @@ -1468,14 +1508,22 @@ type ProjectedMetric struct { // analyzed period. This metric identifies the processing power required to run an // application on the recommendation option. Depending on the instance type, tools // in your operating system can show a lower percentage than CloudWatch when the - // instance is not allocated a full processor core. Units: Percent + // instance is not allocated a full processor core. // - Memory - The percentage of memory that would be in use on the recommendation // option had you used that resource during the analyzed period. This metric // identifies the amount of memory required to run an application on the - // recommendation option. Units: Percent The Memory metric is returned only for - // resources that have the unified CloudWatch agent installed on them. For more + // recommendation option. Units: Percent The Memory metric is only returned for + // resources with the unified CloudWatch agent installed on them. For more // information, see Enabling Memory Utilization with the CloudWatch Agent (https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent) // . + // - GPU - The projected percentage of allocated GPUs if you adjust your + // configurations to Compute Optimizer's recommendation option. + // - GPU_MEMORY - The projected percentage of total GPU memory if you adjust your + // configurations to Compute Optimizer's recommendation option. The GPU and + // GPU_MEMORY metrics are only returned for resources with the unified CloudWatch + // Agent installed on them. For more information, see Enabling NVIDIA GPU + // utilization with the CloudWatch Agent (https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#nvidia-cw-agent) + // . Name MetricName // The timestamps of the projected utilization metric. @@ -1612,7 +1660,7 @@ type RecommendationSummary struct { // An array of objects that describes the estimated monthly saving amounts for the // instances running on the specified inferredWorkloadTypes . The array contains - // the top three savings opportunites for the instances running inferred workload + // the top five savings opportunites for the instances that run inferred workload // types. InferredWorkloadSavings []InferredWorkloadSaving @@ -1838,6 +1886,12 @@ type UtilizationMetric struct { // that have the unified CloudWatch agent installed on them. For more information, // see Enabling Memory Utilization with the CloudWatch Agent (https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent) // . + // - GPU - The percentage of allocated GPUs that currently run on the instance. + // - GPU_MEMORY - The percentage of total GPU memory that currently runs on the + // instance. The GPU and GPU_MEMORY metrics are only returned for resources with + // the unified CloudWatch Agent installed on them. For more information, see + // Enabling NVIDIA GPU utilization with the CloudWatch Agent (https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#nvidia-cw-agent) + // . // - EBS_READ_OPS_PER_SECOND - The completed read operations from all EBS volumes // attached to the instance in a specified period of time. Unit: Count // - EBS_WRITE_OPS_PER_SECOND - The completed write operations to all EBS volumes diff --git a/service/ec2/types/enums.go b/service/ec2/types/enums.go index 71625318224..89684d4e914 100644 --- a/service/ec2/types/enums.go +++ b/service/ec2/types/enums.go @@ -3484,6 +3484,30 @@ const ( InstanceTypeHpc7a24xlarge InstanceType = "hpc7a.24xlarge" InstanceTypeHpc7a48xlarge InstanceType = "hpc7a.48xlarge" InstanceTypeHpc7a96xlarge InstanceType = "hpc7a.96xlarge" + InstanceTypeC7gdMedium InstanceType = "c7gd.medium" + InstanceTypeC7gdLarge InstanceType = "c7gd.large" + InstanceTypeC7gdXlarge InstanceType = "c7gd.xlarge" + InstanceTypeC7gd2xlarge InstanceType = "c7gd.2xlarge" + InstanceTypeC7gd4xlarge InstanceType = "c7gd.4xlarge" + InstanceTypeC7gd8xlarge InstanceType = "c7gd.8xlarge" + InstanceTypeC7gd12xlarge InstanceType = "c7gd.12xlarge" + InstanceTypeC7gd16xlarge InstanceType = "c7gd.16xlarge" + InstanceTypeM7gdMedium InstanceType = "m7gd.medium" + InstanceTypeM7gdLarge InstanceType = "m7gd.large" + InstanceTypeM7gdXlarge InstanceType = "m7gd.xlarge" + InstanceTypeM7gd2xlarge InstanceType = "m7gd.2xlarge" + InstanceTypeM7gd4xlarge InstanceType = "m7gd.4xlarge" + InstanceTypeM7gd8xlarge InstanceType = "m7gd.8xlarge" + InstanceTypeM7gd12xlarge InstanceType = "m7gd.12xlarge" + InstanceTypeM7gd16xlarge InstanceType = "m7gd.16xlarge" + InstanceTypeR7gdMedium InstanceType = "r7gd.medium" + InstanceTypeR7gdLarge InstanceType = "r7gd.large" + InstanceTypeR7gdXlarge InstanceType = "r7gd.xlarge" + InstanceTypeR7gd2xlarge InstanceType = "r7gd.2xlarge" + InstanceTypeR7gd4xlarge InstanceType = "r7gd.4xlarge" + InstanceTypeR7gd8xlarge InstanceType = "r7gd.8xlarge" + InstanceTypeR7gd12xlarge InstanceType = "r7gd.12xlarge" + InstanceTypeR7gd16xlarge InstanceType = "r7gd.16xlarge" ) // Values returns all known values for InstanceType. Note that this can be @@ -4187,6 +4211,30 @@ func (InstanceType) Values() []InstanceType { "hpc7a.24xlarge", "hpc7a.48xlarge", "hpc7a.96xlarge", + "c7gd.medium", + "c7gd.large", + "c7gd.xlarge", + "c7gd.2xlarge", + "c7gd.4xlarge", + "c7gd.8xlarge", + "c7gd.12xlarge", + "c7gd.16xlarge", + "m7gd.medium", + "m7gd.large", + "m7gd.xlarge", + "m7gd.2xlarge", + "m7gd.4xlarge", + "m7gd.8xlarge", + "m7gd.12xlarge", + "m7gd.16xlarge", + "r7gd.medium", + "r7gd.large", + "r7gd.xlarge", + "r7gd.2xlarge", + "r7gd.4xlarge", + "r7gd.8xlarge", + "r7gd.12xlarge", + "r7gd.16xlarge", } } diff --git a/service/ecs/api_op_PutAccountSetting.go b/service/ecs/api_op_PutAccountSetting.go index 67f1bbfe883..7e025bad7c7 100644 --- a/service/ecs/api_op_PutAccountSetting.go +++ b/service/ecs/api_op_PutAccountSetting.go @@ -93,11 +93,12 @@ type PutAccountSettingInput struct { // enabled , disabled , on , and off . When you specify // fargateTaskRetirementWaitPeriod for the name , the following are the valid // values: - // - 0 - immediately retire the tasks and patch Fargate There is no advanced - // notification. Your tasks are retired immediately, and Fargate is patched without - // any notification. - // - 7 -wait 7 calendar days to retire the tasks and patch Fargate - // - 14 - wait 14 calendar days to retire the tasks and patch Fargate + // - 0 - Amazon Web Services sends the notification, and immediately retires the + // affected tasks. + // - 7 - Amazon Web Services sends the notification, and waits 7 calendar days to + // retire the tasks. + // - 14 - Amazon Web Services sends the notification, and waits 14 calendar days + // to retire the tasks. // // This member is required. Value *string diff --git a/service/ecs/api_op_PutAccountSettingDefault.go b/service/ecs/api_op_PutAccountSettingDefault.go index 097c78c75d7..c22d14f3215 100644 --- a/service/ecs/api_op_PutAccountSettingDefault.go +++ b/service/ecs/api_op_PutAccountSettingDefault.go @@ -69,11 +69,12 @@ type PutAccountSettingDefaultInput struct { // enabled , disabled , on , and off . When you specify // fargateTaskRetirementWaitPeriod for the name , the following are the valid // values: - // - 0 - immediately retire the tasks and patch Fargate There is no advanced - // notification. Your tasks are retired immediately, and Fargate is patched without - // any notification. - // - 7 -wait 7 calendar days to retire the tasks and patch Fargate - // - 14 - wait 14 calendar days to retire the tasks and patch Fargate + // - 0 - Amazon Web Services sends the notification, and immediately retires the + // affected tasks. + // - 7 - Amazon Web Services sends the notification, and waits 7 calendar days to + // retire the tasks. + // - 14 - Amazon Web Services sends the notification, and waits 14 calendar days + // to retire the tasks. // // This member is required. Value *string diff --git a/service/eventbridge/endpoints_test.go b/service/eventbridge/endpoints_test.go index df0ef3dfbc9..8c8bc11e127 100644 --- a/service/eventbridge/endpoints_test.go +++ b/service/eventbridge/endpoints_test.go @@ -17,8 +17,8 @@ import ( // For region af-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("af-south-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -56,8 +56,8 @@ func TestEndpointCase0(t *testing.T) { // For region ap-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("ap-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -95,8 +95,8 @@ func TestEndpointCase1(t *testing.T) { // For region ap-northeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("ap-northeast-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -134,8 +134,8 @@ func TestEndpointCase2(t *testing.T) { // For region ap-northeast-2 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("ap-northeast-2"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -173,8 +173,8 @@ func TestEndpointCase3(t *testing.T) { // For region ap-northeast-3 with FIPS disabled and DualStack disabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("ap-northeast-3"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -212,8 +212,8 @@ func TestEndpointCase4(t *testing.T) { // For region ap-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("ap-south-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -251,8 +251,8 @@ func TestEndpointCase5(t *testing.T) { // For region ap-southeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("ap-southeast-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -290,8 +290,8 @@ func TestEndpointCase6(t *testing.T) { // For region ap-southeast-2 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("ap-southeast-2"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -329,8 +329,8 @@ func TestEndpointCase7(t *testing.T) { // For region ap-southeast-3 with FIPS disabled and DualStack disabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("ap-southeast-3"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -368,8 +368,8 @@ func TestEndpointCase8(t *testing.T) { // For region ca-central-1 with FIPS disabled and DualStack disabled func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("ca-central-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -407,8 +407,8 @@ func TestEndpointCase9(t *testing.T) { // For region eu-central-1 with FIPS disabled and DualStack disabled func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("eu-central-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -446,8 +446,8 @@ func TestEndpointCase10(t *testing.T) { // For region eu-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("eu-north-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -485,8 +485,8 @@ func TestEndpointCase11(t *testing.T) { // For region eu-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("eu-south-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -524,8 +524,8 @@ func TestEndpointCase12(t *testing.T) { // For region eu-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("eu-west-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -563,8 +563,8 @@ func TestEndpointCase13(t *testing.T) { // For region eu-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("eu-west-2"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -602,8 +602,8 @@ func TestEndpointCase14(t *testing.T) { // For region eu-west-3 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("eu-west-3"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -641,8 +641,8 @@ func TestEndpointCase15(t *testing.T) { // For region me-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("me-south-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -680,8 +680,8 @@ func TestEndpointCase16(t *testing.T) { // For region sa-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("sa-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -719,8 +719,8 @@ func TestEndpointCase17(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -758,8 +758,8 @@ func TestEndpointCase18(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -797,8 +797,8 @@ func TestEndpointCase19(t *testing.T) { // For region us-east-2 with FIPS disabled and DualStack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-2"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -836,8 +836,8 @@ func TestEndpointCase20(t *testing.T) { // For region us-east-2 with FIPS enabled and DualStack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-east-2"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -875,8 +875,8 @@ func TestEndpointCase21(t *testing.T) { // For region us-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-west-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -914,8 +914,8 @@ func TestEndpointCase22(t *testing.T) { // For region us-west-1 with FIPS enabled and DualStack disabled func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-west-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -953,8 +953,8 @@ func TestEndpointCase23(t *testing.T) { // For region us-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-west-2"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -992,8 +992,8 @@ func TestEndpointCase24(t *testing.T) { // For region us-west-2 with FIPS enabled and DualStack disabled func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-west-2"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -1031,8 +1031,8 @@ func TestEndpointCase25(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -1070,8 +1070,8 @@ func TestEndpointCase26(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -1109,8 +1109,8 @@ func TestEndpointCase27(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -1148,8 +1148,8 @@ func TestEndpointCase28(t *testing.T) { // For region cn-northwest-1 with FIPS disabled and DualStack disabled func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-northwest-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -1187,8 +1187,8 @@ func TestEndpointCase29(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -1226,8 +1226,8 @@ func TestEndpointCase30(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -1265,8 +1265,8 @@ func TestEndpointCase31(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -1304,8 +1304,8 @@ func TestEndpointCase32(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -1343,8 +1343,8 @@ func TestEndpointCase33(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -1382,8 +1382,8 @@ func TestEndpointCase34(t *testing.T) { // For region us-gov-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-gov-west-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -1421,8 +1421,8 @@ func TestEndpointCase35(t *testing.T) { // For region us-gov-west-1 with FIPS enabled and DualStack disabled func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-gov-west-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -1460,8 +1460,8 @@ func TestEndpointCase36(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -1499,8 +1499,8 @@ func TestEndpointCase37(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -1538,8 +1538,8 @@ func TestEndpointCase38(t *testing.T) { // For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -1577,8 +1577,8 @@ func TestEndpointCase39(t *testing.T) { // For region us-iso-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-iso-west-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -1616,8 +1616,8 @@ func TestEndpointCase40(t *testing.T) { // For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -1636,8 +1636,8 @@ func TestEndpointCase41(t *testing.T) { // For region us-iso-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -1675,8 +1675,8 @@ func TestEndpointCase42(t *testing.T) { // For region us-iso-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -1695,8 +1695,8 @@ func TestEndpointCase43(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -1734,8 +1734,8 @@ func TestEndpointCase44(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -1754,8 +1754,8 @@ func TestEndpointCase45(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -1793,8 +1793,8 @@ func TestEndpointCase46(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase47(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -1813,8 +1813,8 @@ func TestEndpointCase47(t *testing.T) { // For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase48(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1892,8 +1892,8 @@ func TestEndpointCase49(t *testing.T) { // For custom endpoint with fips enabled and dualstack disabled func TestEndpointCase50(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1913,8 +1913,8 @@ func TestEndpointCase50(t *testing.T) { // For custom endpoint with fips disabled and dualstack enabled func TestEndpointCase51(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -2187,3 +2187,24 @@ func TestEndpointCase59(t *testing.T) { t.Errorf("expect properties to match\n%s", diff) } } + +// Valid EndpointId with DualStack enabled and partition does not support DualStack +func TestEndpointCase60(t *testing.T) { + var params = EndpointParameters{ + EndpointId: ptr.String("abc123.456def"), + UseDualStack: ptr.Bool(true), + UseFIPS: ptr.Bool(false), + Region: ptr.String("us-isob-east-1"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/internetmonitor/internal/endpoints/endpoints.go b/service/internetmonitor/internal/endpoints/endpoints.go index 3f82bcb8d28..e9be0a06616 100644 --- a/service/internetmonitor/internal/endpoints/endpoints.go +++ b/service/internetmonitor/internal/endpoints/endpoints.go @@ -203,7 +203,7 @@ var defaultPartitions = endpoints.Partitions{ Region: "ca-central-1", Variant: endpoints.FIPSVariant, }: { - Hostname: "internetmonitor-fips.ca-central-1.api.aws", + Hostname: "internetmonitor-fips.ca-central-1.amazonaws.com", }, endpoints.EndpointKey{ Region: "eu-central-1", @@ -274,7 +274,7 @@ var defaultPartitions = endpoints.Partitions{ Region: "us-east-1", Variant: endpoints.FIPSVariant, }: { - Hostname: "internetmonitor-fips.us-east-1.api.aws", + Hostname: "internetmonitor-fips.us-east-1.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-east-2", @@ -285,7 +285,7 @@ var defaultPartitions = endpoints.Partitions{ Region: "us-east-2", Variant: endpoints.FIPSVariant, }: { - Hostname: "internetmonitor-fips.us-east-2.api.aws", + Hostname: "internetmonitor-fips.us-east-2.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-west-1", @@ -296,7 +296,7 @@ var defaultPartitions = endpoints.Partitions{ Region: "us-west-1", Variant: endpoints.FIPSVariant, }: { - Hostname: "internetmonitor-fips.us-west-1.api.aws", + Hostname: "internetmonitor-fips.us-west-1.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-west-2", @@ -307,7 +307,7 @@ var defaultPartitions = endpoints.Partitions{ Region: "us-west-2", Variant: endpoints.FIPSVariant, }: { - Hostname: "internetmonitor-fips.us-west-2.api.aws", + Hostname: "internetmonitor-fips.us-west-2.amazonaws.com", }, }, }, diff --git a/service/rds/api_op_ModifyDBCluster.go b/service/rds/api_op_ModifyDBCluster.go index fdb0563c3af..d9032b6fc0c 100644 --- a/service/rds/api_op_ModifyDBCluster.go +++ b/service/rds/api_op_ModifyDBCluster.go @@ -82,6 +82,10 @@ type ModifyDBClusterInput struct { // applied automatically. Valid for Cluster Type: Multi-AZ DB clusters only AutoMinorVersionUpgrade *bool + // The Amazon Resource Name (ARN) of the recovery point in Amazon Web Services + // Backup. + AwsBackupRecoveryPointArn *string + // The target backtrack window, in seconds. To disable backtracking, set this // value to 0 . Valid for Cluster Type: Aurora MySQL DB clusters only Default: 0 // Constraints: diff --git a/service/rds/deserializers.go b/service/rds/deserializers.go index 6eedd128faf..2fd4cc06a1c 100644 --- a/service/rds/deserializers.go +++ b/service/rds/deserializers.go @@ -14238,6 +14238,9 @@ func awsAwsquery_deserializeOpErrorRestoreDBClusterFromSnapshot(response *smithy case strings.EqualFold("DBSnapshotNotFound", errorCode): return awsAwsquery_deserializeErrorDBSnapshotNotFoundFault(response, errorBody) + case strings.EqualFold("DBSubnetGroupDoesNotCoverEnoughAZs", errorCode): + return awsAwsquery_deserializeErrorDBSubnetGroupDoesNotCoverEnoughAZs(response, errorBody) + case strings.EqualFold("DBSubnetGroupNotFoundFault", errorCode): return awsAwsquery_deserializeErrorDBSubnetGroupNotFoundFault(response, errorBody) @@ -24676,6 +24679,19 @@ func awsAwsquery_deserializeDocumentDBCluster(v **types.DBCluster, decoder smith return err } + case strings.EqualFold("AwsBackupRecoveryPointArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.AwsBackupRecoveryPointArn = ptr.String(xtv) + } + case strings.EqualFold("BacktrackConsumedChangeRecords", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -25614,6 +25630,19 @@ func awsAwsquery_deserializeDocumentDBClusterAutomatedBackup(v **types.DBCluster return err } + case strings.EqualFold("AwsBackupRecoveryPointArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.AwsBackupRecoveryPointArn = ptr.String(xtv) + } + case strings.EqualFold("BackupRetentionPeriod", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -29983,6 +30012,19 @@ func awsAwsquery_deserializeDocumentDBInstanceAutomatedBackup(v **types.DBInstan sv.AvailabilityZone = ptr.String(xtv) } + case strings.EqualFold("AwsBackupRecoveryPointArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.AwsBackupRecoveryPointArn = ptr.String(xtv) + } + case strings.EqualFold("BackupRetentionPeriod", t.Name.Local): val, err := decoder.Value() if err != nil { diff --git a/service/rds/serializers.go b/service/rds/serializers.go index 6a4e79ba70a..b38a6dee067 100644 --- a/service/rds/serializers.go +++ b/service/rds/serializers.go @@ -13447,6 +13447,11 @@ func awsAwsquery_serializeOpDocumentModifyDBClusterInput(v *ModifyDBClusterInput objectKey.Boolean(*v.AutoMinorVersionUpgrade) } + if v.AwsBackupRecoveryPointArn != nil { + objectKey := object.Key("AwsBackupRecoveryPointArn") + objectKey.String(*v.AwsBackupRecoveryPointArn) + } + if v.BacktrackWindow != nil { objectKey := object.Key("BacktrackWindow") objectKey.Long(*v.BacktrackWindow) diff --git a/service/rds/types/types.go b/service/rds/types/types.go index f6a615dff60..ceee72dcff3 100644 --- a/service/rds/types/types.go +++ b/service/rds/types/types.go @@ -471,6 +471,10 @@ type DBCluster struct { // created. AvailabilityZones []string + // The Amazon Resource Name (ARN) of the recovery point in Amazon Web Services + // Backup. + AwsBackupRecoveryPointArn *string + // The number of change records stored for Backtrack. BacktrackConsumedChangeRecords *int64 @@ -770,6 +774,10 @@ type DBClusterAutomatedBackup struct { // . AvailabilityZones []string + // The Amazon Resource Name (ARN) of the recovery point in Amazon Web Services + // Backup. + AwsBackupRecoveryPointArn *string + // The retention period for the automated backups. BackupRetentionPeriod *int32 @@ -1684,6 +1692,10 @@ type DBInstanceAutomatedBackup struct { // . AvailabilityZone *string + // The Amazon Resource Name (ARN) of the recovery point in Amazon Web Services + // Backup. + AwsBackupRecoveryPointArn *string + // The retention period for the automated backups. BackupRetentionPeriod *int32 diff --git a/service/sagemaker/api_op_DescribeCompilationJob.go b/service/sagemaker/api_op_DescribeCompilationJob.go index 82f39394921..f4cfc5b4987 100644 --- a/service/sagemaker/api_op_DescribeCompilationJob.go +++ b/service/sagemaker/api_op_DescribeCompilationJob.go @@ -124,6 +124,9 @@ type DescribeCompilationJobOutput struct { // job, which depends on the size of the compilation job container. CompilationStartTime *time.Time + // Information that SageMaker Neo automatically derived about the model. + DerivedInformation *types.DerivedInformation + // The inference image to use when compiling a model. Specify an image only if the // target device is a cloud instance. InferenceImage *string diff --git a/service/sagemaker/deserializers.go b/service/sagemaker/deserializers.go index e0f0f788e64..e1b989773b9 100644 --- a/service/sagemaker/deserializers.go +++ b/service/sagemaker/deserializers.go @@ -41540,6 +41540,46 @@ func awsAwsjson11_deserializeDocumentDeploymentStageStatusSummary(v **types.Depl return nil } +func awsAwsjson11_deserializeDocumentDerivedInformation(v **types.DerivedInformation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DerivedInformation + if *v == nil { + sv = &types.DerivedInformation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DerivedDataInputConfig": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataInputConfig to be of type string, got %T instead", value) + } + sv.DerivedDataInputConfig = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentDeviceDeploymentSummaries(v *[]types.DeviceDeploymentSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -78241,6 +78281,11 @@ func awsAwsjson11_deserializeOpDocumentDescribeCompilationJobOutput(v **Describe } } + case "DerivedInformation": + if err := awsAwsjson11_deserializeDocumentDerivedInformation(&sv.DerivedInformation, value); err != nil { + return err + } + case "FailureReason": if value != nil { jtv, ok := value.(string) diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index 36b4d612abc..dc4d787821a 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -3329,6 +3329,17 @@ type DeploymentStageStatusSummary struct { noSmithyDocumentSerde } +// Information that SageMaker Neo automatically derived about the model. +type DerivedInformation struct { + + // The data input configuration that SageMaker Neo automatically derived for the + // model. When SageMaker Neo derives this information, you don't need to specify + // the data input configuration when you create a compilation job. + DerivedDataInputConfig *string + + noSmithyDocumentSerde +} + // Specifies weight and capacity values for a production variant. type DesiredWeightAndCapacity struct { @@ -6918,6 +6929,19 @@ type InferenceSpecification struct { // trained. type InputConfig struct { + // Identifies the framework in which the model was trained. For example: + // TENSORFLOW. + // + // This member is required. + Framework Framework + + // The S3 path where the model artifacts, which result from model training, are + // stored. This path must point to a single gzip compressed tar archive (.tar.gz + // suffix). + // + // This member is required. + S3Uri *string + // Specifies the name and shape of the expected data inputs for your trained model // with a JSON dictionary form. The data inputs are Framework specific. // - TensorFlow : You must specify the name and shape (NHWC format) of the @@ -7018,23 +7042,8 @@ type InputConfig struct { // . For example: // - "DataInputConfig": {"input_tensor:0": [1, 224, 224, 3]} // - "CompilerOptions": {"output_names": ["output_tensor:0"]} - // - // This member is required. DataInputConfig *string - // Identifies the framework in which the model was trained. For example: - // TENSORFLOW. - // - // This member is required. - Framework Framework - - // The S3 path where the model artifacts, which result from model training, are - // stored. This path must point to a single gzip compressed tar archive (.tar.gz - // suffix). - // - // This member is required. - S3Uri *string - // Specifies the framework version to use. This API field is only supported for // the MXNet, PyTorch, TensorFlow and TensorFlow Lite frameworks. For information // about framework versions supported for cloud targets and edge devices, see @@ -8377,8 +8386,8 @@ type ModelInput struct { // The model latency threshold. type ModelLatencyThreshold struct { - // The model latency percentile threshold. For custom load tests, specify the - // value as P95 . + // The model latency percentile threshold. Acceptable values are P95 and P99 . For + // custom load tests, specify the value as P95 . Percentile *string // The model latency percentile value in milliseconds. diff --git a/service/sagemaker/validators.go b/service/sagemaker/validators.go index b186092abf4..4ef6d1552f1 100644 --- a/service/sagemaker/validators.go +++ b/service/sagemaker/validators.go @@ -8323,9 +8323,6 @@ func validateInputConfig(v *types.InputConfig) error { if v.S3Uri == nil { invalidParams.Add(smithy.NewErrParamRequired("S3Uri")) } - if v.DataInputConfig == nil { - invalidParams.Add(smithy.NewErrParamRequired("DataInputConfig")) - } if len(v.Framework) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Framework")) } diff --git a/service/ssooidc/internal/endpoints/endpoints.go b/service/ssooidc/internal/endpoints/endpoints.go index 8df344e93e5..00410fa9d54 100644 --- a/service/ssooidc/internal/endpoints/endpoints.go +++ b/service/ssooidc/internal/endpoints/endpoints.go @@ -267,6 +267,14 @@ var defaultPartitions = endpoints.Partitions{ Region: "eu-west-3", }, }, + endpoints.EndpointKey{ + Region: "il-central-1", + }: endpoints.Endpoint{ + Hostname: "oidc.il-central-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "il-central-1", + }, + }, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{ diff --git a/service/transfer/internal/endpoints/endpoints.go b/service/transfer/internal/endpoints/endpoints.go index 3212ba019c1..530755e314b 100644 --- a/service/transfer/internal/endpoints/endpoints.go +++ b/service/transfer/internal/endpoints/endpoints.go @@ -250,6 +250,9 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "il-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-central-1", }: endpoints.Endpoint{}, diff --git a/service/vpclattice/api_op_CreateServiceNetworkVpcAssociation.go b/service/vpclattice/api_op_CreateServiceNetworkVpcAssociation.go index 193bfd835c2..8970f5ae9bb 100644 --- a/service/vpclattice/api_op_CreateServiceNetworkVpcAssociation.go +++ b/service/vpclattice/api_op_CreateServiceNetworkVpcAssociation.go @@ -23,11 +23,10 @@ import ( // in the Amazon VPC Lattice User Guide. You can't use this operation if there is a // disassociation in progress. If the association fails, retry by deleting the // association and recreating it. As a result of this operation, the association -// gets created in the service network account and the VPC owner account. If you -// add a security group to the service network and VPC association, the association -// must continue to always have at least one security group. You can add or edit -// security groups at any time. However, to remove all security groups, you must -// first delete the association and recreate it without security groups. +// gets created in the service network account and the VPC owner account. Once a +// security group is added to the VPC association it cannot be removed. You can add +// or update the security groups being used for the VPC association once a security +// group is attached. To remove all security groups you must reassociate the VPC. func (c *Client) CreateServiceNetworkVpcAssociation(ctx context.Context, params *CreateServiceNetworkVpcAssociationInput, optFns ...func(*Options)) (*CreateServiceNetworkVpcAssociationOutput, error) { if params == nil { params = &CreateServiceNetworkVpcAssociationInput{} diff --git a/service/vpclattice/api_op_DeleteAuthPolicy.go b/service/vpclattice/api_op_DeleteAuthPolicy.go index 04daed4922f..22c13597443 100644 --- a/service/vpclattice/api_op_DeleteAuthPolicy.go +++ b/service/vpclattice/api_op_DeleteAuthPolicy.go @@ -15,11 +15,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the specified auth policy. If an auth is set to AWS_IAM and the auth -// policy is deleted, all requests will be denied by default. If you are trying to -// remove the auth policy completely, you must set the auth_type to NONE . If auth -// is enabled on the resource, but no auth policy is set, all requests will be -// denied. +// Deletes the specified auth policy. If an auth is set to Amazon Web Services_IAM +// and the auth policy is deleted, all requests will be denied by default. If you +// are trying to remove the auth policy completely, you must set the auth_type to +// NONE . If auth is enabled on the resource, but no auth policy is set, all +// requests will be denied. func (c *Client) DeleteAuthPolicy(ctx context.Context, params *DeleteAuthPolicyInput, optFns ...func(*Options)) (*DeleteAuthPolicyOutput, error) { if params == nil { params = &DeleteAuthPolicyInput{} diff --git a/service/vpclattice/api_op_GetAuthPolicy.go b/service/vpclattice/api_op_GetAuthPolicy.go index 2a8e2e8057f..7a24adba3ba 100644 --- a/service/vpclattice/api_op_GetAuthPolicy.go +++ b/service/vpclattice/api_op_GetAuthPolicy.go @@ -58,8 +58,8 @@ type GetAuthPolicyOutput struct { Policy *string // The state of the auth policy. The auth policy is only active when the auth type - // is set to AWS_IAM . If you provide a policy, then authentication and - // authorization decisions are made based on this policy and the client's IAM + // is set to Amazon Web Services_IAM . If you provide a policy, then authentication + // and authorization decisions are made based on this policy and the client's IAM // policy. If the auth type is NONE , then any auth policy you provide will remain // inactive. For more information, see Create a service network (https://docs.aws.amazon.com/vpc-lattice/latest/ug/service-networks.html#create-service-network) // in the Amazon VPC Lattice User Guide. diff --git a/service/vpclattice/api_op_GetResourcePolicy.go b/service/vpclattice/api_op_GetResourcePolicy.go index 71f805b611d..1244107aa75 100644 --- a/service/vpclattice/api_op_GetResourcePolicy.go +++ b/service/vpclattice/api_op_GetResourcePolicy.go @@ -16,7 +16,8 @@ import ( ) // Retrieves information about the resource policy. The resource policy is an IAM -// policy created on behalf of the resource owner when they share a resource. +// policy created by AWS RAM on behalf of the resource owner when they share a +// resource. func (c *Client) GetResourcePolicy(ctx context.Context, params *GetResourcePolicyInput, optFns ...func(*Options)) (*GetResourcePolicyOutput, error) { if params == nil { params = &GetResourcePolicyInput{} @@ -34,7 +35,7 @@ func (c *Client) GetResourcePolicy(ctx context.Context, params *GetResourcePolic type GetResourcePolicyInput struct { - // The Amazon Resource Name (ARN) of the service network or service. + // An IAM policy. // // This member is required. ResourceArn *string @@ -44,7 +45,7 @@ type GetResourcePolicyInput struct { type GetResourcePolicyOutput struct { - // An IAM policy. + // The Amazon Resource Name (ARN) of the service network or service. Policy *string // Metadata pertaining to the operation's result. diff --git a/service/vpclattice/api_op_PutAuthPolicy.go b/service/vpclattice/api_op_PutAuthPolicy.go index 784bbd62a23..6a691daab4f 100644 --- a/service/vpclattice/api_op_PutAuthPolicy.go +++ b/service/vpclattice/api_op_PutAuthPolicy.go @@ -16,8 +16,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates or updates the auth policy. The policy string in JSON must not contain -// newlines or blank lines. +// Creates or updates the auth policy. func (c *Client) PutAuthPolicy(ctx context.Context, params *PutAuthPolicyInput, optFns ...func(*Options)) (*PutAuthPolicyOutput, error) { if params == nil { params = &PutAuthPolicyInput{} @@ -35,8 +34,7 @@ func (c *Client) PutAuthPolicy(ctx context.Context, params *PutAuthPolicyInput, type PutAuthPolicyInput struct { - // The auth policy. The policy string in JSON must not contain newlines or blank - // lines. + // The auth policy. // // This member is required. Policy *string @@ -52,13 +50,12 @@ type PutAuthPolicyInput struct { type PutAuthPolicyOutput struct { - // The auth policy. The policy string in JSON must not contain newlines or blank - // lines. + // The auth policy. Policy *string // The state of the auth policy. The auth policy is only active when the auth type - // is set to AWS_IAM . If you provide a policy, then authentication and - // authorization decisions are made based on this policy and the client's IAM + // is set to Amazon Web Services_IAM . If you provide a policy, then authentication + // and authorization decisions are made based on this policy and the client's IAM // policy. If the Auth type is NONE , then, any auth policy you provide will remain // inactive. For more information, see Create a service network (https://docs.aws.amazon.com/vpc-lattice/latest/ug/service-networks.html#create-service-network) // in the Amazon VPC Lattice User Guide. diff --git a/service/vpclattice/api_op_PutResourcePolicy.go b/service/vpclattice/api_op_PutResourcePolicy.go index 77a6b62d805..8ef0028165e 100644 --- a/service/vpclattice/api_op_PutResourcePolicy.go +++ b/service/vpclattice/api_op_PutResourcePolicy.go @@ -36,8 +36,7 @@ func (c *Client) PutResourcePolicy(ctx context.Context, params *PutResourcePolic type PutResourcePolicyInput struct { - // An IAM policy. The policy string in JSON must not contain newlines or blank - // lines. + // An IAM policy. // // This member is required. Policy *string diff --git a/service/vpclattice/api_op_UpdateServiceNetworkVpcAssociation.go b/service/vpclattice/api_op_UpdateServiceNetworkVpcAssociation.go index 32c25a245eb..6a27a5825d6 100644 --- a/service/vpclattice/api_op_UpdateServiceNetworkVpcAssociation.go +++ b/service/vpclattice/api_op_UpdateServiceNetworkVpcAssociation.go @@ -16,11 +16,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates the service network and VPC association. If you add a security group to -// the service network and VPC association, the association must continue to always -// have at least one security group. You can add or edit security groups at any -// time. However, to remove all security groups, you must first delete the -// association and recreate it without security groups. +// Updates the service network and VPC association. Once you add a security group, +// it cannot be removed. func (c *Client) UpdateServiceNetworkVpcAssociation(ctx context.Context, params *UpdateServiceNetworkVpcAssociationInput, optFns ...func(*Options)) (*UpdateServiceNetworkVpcAssociationOutput, error) { if params == nil { params = &UpdateServiceNetworkVpcAssociationInput{} @@ -38,7 +35,8 @@ func (c *Client) UpdateServiceNetworkVpcAssociation(ctx context.Context, params type UpdateServiceNetworkVpcAssociationInput struct { - // The IDs of the security groups. + // The IDs of the security groups. Once you add a security group, it cannot be + // removed. // // This member is required. SecurityGroupIds []string diff --git a/service/vpclattice/deserializers.go b/service/vpclattice/deserializers.go index 4adfaf55599..203f9029fb3 100644 --- a/service/vpclattice/deserializers.go +++ b/service/vpclattice/deserializers.go @@ -1353,6 +1353,9 @@ func awsRestjson1_deserializeOpErrorCreateServiceNetworkServiceAssociation(respo } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) @@ -5608,6 +5611,9 @@ func awsRestjson1_deserializeOpErrorGetTargetGroup(response *smithyhttp.Response } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -5858,6 +5864,9 @@ func awsRestjson1_deserializeOpErrorListAccessLogSubscriptions(response *smithyh } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -7016,6 +7025,9 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -8006,6 +8018,9 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -9372,6 +9387,9 @@ func awsRestjson1_deserializeOpErrorUpdateTargetGroup(response *smithyhttp.Respo } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) @@ -12320,6 +12338,15 @@ func awsRestjson1_deserializeDocumentTargetGroupConfig(v **types.TargetGroupConf sv.IpAddressType = types.IpAddressType(jtv) } + case "lambdaEventStructureVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LambdaEventStructureVersion to be of type string, got %T instead", value) + } + sv.LambdaEventStructureVersion = types.LambdaEventStructureVersion(jtv) + } + case "port": if value != nil { jtv, ok := value.(json.Number) @@ -12465,6 +12492,15 @@ func awsRestjson1_deserializeDocumentTargetGroupSummary(v **types.TargetGroupSum sv.IpAddressType = types.IpAddressType(jtv) } + case "lambdaEventStructureVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LambdaEventStructureVersion to be of type string, got %T instead", value) + } + sv.LambdaEventStructureVersion = types.LambdaEventStructureVersion(jtv) + } + case "lastUpdatedAt": if value != nil { jtv, ok := value.(string) diff --git a/service/vpclattice/endpoints_test.go b/service/vpclattice/endpoints_test.go index a90a00a6931..1ae9f928bba 100644 --- a/service/vpclattice/endpoints_test.go +++ b/service/vpclattice/endpoints_test.go @@ -14,12 +14,12 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://vpc-lattice-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://vpc-lattice-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,12 +53,12 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://vpc-lattice-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://vpc-lattice-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,12 +92,12 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://vpc-lattice.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://vpc-lattice.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,12 +131,12 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://vpc-lattice.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://vpc-lattice.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -326,32 +326,12 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -362,7 +342,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://vpc-lattice-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://vpc-lattice-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,32 +365,12 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://vpc-lattice.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://vpc-lattice-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,12 +404,12 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://vpc-lattice-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://vpc-lattice.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,12 +443,12 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://vpc-lattice-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://vpc-lattice.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,12 +482,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -538,7 +518,7 @@ func TestEndpointCase14(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://vpc-lattice.us-east-1.api.aws") + uri, _ := url.Parse("https://vpc-lattice-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,12 +541,32 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://vpc-lattice.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://vpc-lattice.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,9 +603,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -623,9 +623,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -662,9 +662,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -682,9 +682,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -718,12 +718,12 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,12 +758,51 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,11 +819,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/vpclattice/serializers.go b/service/vpclattice/serializers.go index 20324513807..f1aa5776f4a 100644 --- a/service/vpclattice/serializers.go +++ b/service/vpclattice/serializers.go @@ -4571,6 +4571,11 @@ func awsRestjson1_serializeDocumentTargetGroupConfig(v *types.TargetGroupConfig, ok.String(string(v.IpAddressType)) } + if len(v.LambdaEventStructureVersion) > 0 { + ok := object.Key("lambdaEventStructureVersion") + ok.String(string(v.LambdaEventStructureVersion)) + } + if v.Port != nil { ok := object.Key("port") ok.Integer(*v.Port) diff --git a/service/vpclattice/types/enums.go b/service/vpclattice/types/enums.go index 89652c92a6f..b0b63243336 100644 --- a/service/vpclattice/types/enums.go +++ b/service/vpclattice/types/enums.go @@ -78,6 +78,26 @@ func (IpAddressType) Values() []IpAddressType { } } +type LambdaEventStructureVersion string + +// Enum values for LambdaEventStructureVersion +const ( + // This is the default lambda event structure version + LambdaEventStructureVersionV1 LambdaEventStructureVersion = "V1" + // Indicates use of lambda event structure version 2 + LambdaEventStructureVersionV2 LambdaEventStructureVersion = "V2" +) + +// Values returns all known values for LambdaEventStructureVersion. 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 (LambdaEventStructureVersion) Values() []LambdaEventStructureVersion { + return []LambdaEventStructureVersion{ + "V1", + "V2", + } +} + type ListenerProtocol string // Enum values for ListenerProtocol diff --git a/service/vpclattice/types/types.go b/service/vpclattice/types/types.go index 4b88b5614b4..d9b690c00fa 100644 --- a/service/vpclattice/types/types.go +++ b/service/vpclattice/types/types.go @@ -635,23 +635,6 @@ type TargetFailure struct { // target group configuration. type TargetGroupConfig struct { - // The port on which the targets are listening. For HTTP, the default is 80 . For - // HTTPS, the default is 443 - // - // This member is required. - Port *int32 - - // The protocol to use for routing traffic to the targets. Default is the protocol - // of a target group. - // - // This member is required. - Protocol TargetGroupProtocol - - // The ID of the VPC. - // - // This member is required. - VpcIdentifier *string - // The health check configuration. HealthCheck *HealthCheckConfig @@ -660,9 +643,23 @@ type TargetGroupConfig struct { // defaults to ipv4 . IpAddressType IpAddressType + // Lambda event structure version + LambdaEventStructureVersion LambdaEventStructureVersion + + // The port on which the targets are listening. For HTTP, the default is 80 . For + // HTTPS, the default is 443 + Port *int32 + + // The protocol to use for routing traffic to the targets. Default is the protocol + // of a target group. + Protocol TargetGroupProtocol + // The protocol version. Default value is HTTP1 . ProtocolVersion TargetGroupProtocolVersion + // The ID of the VPC. + VpcIdentifier *string + noSmithyDocumentSerde } @@ -684,6 +681,9 @@ type TargetGroupSummary struct { // defaults to ipv4 . IpAddressType IpAddressType + // Lambda event structure version + LambdaEventStructureVersion LambdaEventStructureVersion + // The date and time that the target group was last updated, specified in ISO-8601 // format. LastUpdatedAt *time.Time diff --git a/service/vpclattice/validators.go b/service/vpclattice/validators.go index ec0fb2d3adf..3b747c79e0f 100644 --- a/service/vpclattice/validators.go +++ b/service/vpclattice/validators.go @@ -1344,27 +1344,6 @@ func validateTarget(v *types.Target) error { } } -func validateTargetGroupConfig(v *types.TargetGroupConfig) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "TargetGroupConfig"} - if v.Port == nil { - invalidParams.Add(smithy.NewErrParamRequired("Port")) - } - if len(v.Protocol) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Protocol")) - } - if v.VpcIdentifier == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcIdentifier")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - func validateTargetList(v []types.Target) error { if v == nil { return nil @@ -1600,11 +1579,6 @@ func validateOpCreateTargetGroupInput(v *CreateTargetGroupInput) error { if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) } - if v.Config != nil { - if err := validateTargetGroupConfig(v.Config); err != nil { - invalidParams.AddNested("Config", err.(smithy.InvalidParamsError)) - } - } if invalidParams.Len() > 0 { return invalidParams } else {