diff --git a/go.mod b/go.mod index 84fb17b7..4af9f6ad 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/IBM/vpc-go-sdk v0.48.0 github.com/aws/aws-sdk-go-v2 v1.24.1 github.com/aws/aws-sdk-go-v2/config v1.26.6 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.145.0 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.146.0 github.com/go-logr/logr v1.4.1 github.com/google/uuid v1.6.0 github.com/onsi/gomega v1.27.10 diff --git a/go.sum b/go.sum index fc0aa7da..a3f875de 100644 --- a/go.sum +++ b/go.sum @@ -89,8 +89,8 @@ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 h1:nYPe006ktcqUji8S2m github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10/go.mod h1:6UV4SZkVvmODfXKql4LCbaZUpF7HO2BX38FgBf9ZOLw= github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3 h1:n3GDfwqF2tzEkXlv5cuy4iy7LpKDtqDMcNLfZDu9rls= github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.145.0 h1:SkSW6wtJmXqJJlBxSc+0mykDdv5nhl9xifMB7JuzNVo= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.145.0/go.mod h1:hIsHE0PaWAQakLCshKS7VKWMGXaqrAFp4m95s2W9E6c= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.146.0 h1:d6pYx/CKADORpxqBINY7DuD4V1fjcj3IoeTPQilCw4Q= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.146.0/go.mod h1:hIsHE0PaWAQakLCshKS7VKWMGXaqrAFp4m95s2W9E6c= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 h1:/b31bi3YVNlkzkBrm9LfpaKoaYZUxIAj4sHfOTmLfqw= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4/go.mod h1:2aGXHFmbInwgP9ZfpmdIfOELL79zhdNYNmReK8qDfdQ= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10 h1:DBYTXwIGQSGs9w4jKm60F5dmCQ3EEruxdc0MFh+3EY4= diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md index 7a04f0b3..18038b0f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.146.0 (2024-01-29) + +* **Feature**: EC2 Fleet customers who use attribute based instance-type selection can now intuitively define their Spot instances price protection limit as a percentage of the lowest priced On-Demand instance type. + # v1.145.0 (2024-01-24) * **Feature**: Introduced a new clientToken request parameter on CreateNetworkAcl and CreateRouteTable APIs. The clientToken parameter allows idempotent operations on the APIs. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/deserializers.go index 509accbb..af45acc3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/deserializers.go @@ -85471,6 +85471,23 @@ func awsEc2query_deserializeDocumentInstanceRequirements(v **types.InstanceRequi return err } + case strings.EqualFold("maxSpotPriceAsPercentageOfOptimalOnDemandPrice", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxSpotPriceAsPercentageOfOptimalOnDemandPrice = ptr.Int32(int32(i64)) + } + case strings.EqualFold("memoryGiBPerVCpu", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsEc2query_deserializeDocumentMemoryGiBPerVCpu(&sv.MemoryGiBPerVCpu, nodeDecoder); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go index b3a9a10d..68738f18 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go @@ -3,4 +3,4 @@ package ec2 // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.145.0" +const goModuleVersion = "1.146.0" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/serializers.go index 892ed1d9..928f2842 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/serializers.go @@ -42331,6 +42331,11 @@ func awsEc2query_serializeDocumentInstanceRequirements(v *types.InstanceRequirem } } + if v.MaxSpotPriceAsPercentageOfOptimalOnDemandPrice != nil { + objectKey := object.Key("MaxSpotPriceAsPercentageOfOptimalOnDemandPrice") + objectKey.Integer(*v.MaxSpotPriceAsPercentageOfOptimalOnDemandPrice) + } + if v.MemoryGiBPerVCpu != nil { objectKey := object.Key("MemoryGiBPerVCpu") if err := awsEc2query_serializeDocumentMemoryGiBPerVCpu(v.MemoryGiBPerVCpu, objectKey); err != nil { @@ -42487,6 +42492,11 @@ func awsEc2query_serializeDocumentInstanceRequirementsRequest(v *types.InstanceR } } + if v.MaxSpotPriceAsPercentageOfOptimalOnDemandPrice != nil { + objectKey := object.Key("MaxSpotPriceAsPercentageOfOptimalOnDemandPrice") + objectKey.Integer(*v.MaxSpotPriceAsPercentageOfOptimalOnDemandPrice) + } + if v.MemoryGiBPerVCpu != nil { objectKey := object.Key("MemoryGiBPerVCpu") if err := awsEc2query_serializeDocumentMemoryGiBPerVCpuRequest(v.MemoryGiBPerVCpu, objectKey); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/types.go index 37933670..86bab298 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/types.go @@ -6765,6 +6765,25 @@ type InstanceRequirements struct { // Default: hdd and ssd LocalStorageTypes []LocalStorageType + // [Price protection] The price protection threshold for Spot Instances, as a + // percentage of an identified On-Demand price. The identified On-Demand price is + // the price of the lowest priced current generation C, M, or R instance type with + // your specified attributes. If no current generation C, M, or R instance type + // matches your attributes, then the identified price is from the lowest priced + // current generation instance types, and failing that, from the lowest priced + // previous generation instance types that match your attributes. When Amazon EC2 + // selects instance types with your attributes, it will exclude instance types + // whose price exceeds your specified threshold. The parameter accepts an integer, + // which Amazon EC2 interprets as a percentage. To indicate no price protection + // threshold, specify a high value, such as 999999 . If you set DesiredCapacityType + // to vcpu or memory-mib , the price protection threshold is based on the per vCPU + // or per memory price instead of the per instance price. Only one of + // SpotMaxPricePercentageOverLowestPrice or + // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice can be specified. If you don't + // specify either, then SpotMaxPricePercentageOverLowestPrice is used and the + // value for that parameter defaults to 100 . + MaxSpotPriceAsPercentageOfOptimalOnDemandPrice *int32 + // The minimum and maximum amount of memory per vCPU, in GiB. Default: No minimum // or maximum limits MemoryGiBPerVCpu *MemoryGiBPerVCpu @@ -6780,14 +6799,14 @@ type InstanceRequirements struct { // maximum limits NetworkInterfaceCount *NetworkInterfaceCount - // The price protection threshold for On-Demand Instances. This is the maximum - // you’ll pay for an On-Demand Instance, expressed as a percentage above the least - // expensive current generation M, C, or R instance type with your specified - // attributes. When Amazon EC2 selects instance types with your attributes, it - // excludes instance types priced above your threshold. The parameter accepts an - // integer, which Amazon EC2 interprets as a percentage. To turn off price - // protection, specify a high value, such as 999999 . This parameter is not - // supported for GetSpotPlacementScores (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html) + // [Price protection] The price protection threshold for On-Demand Instances, as a + // percentage higher than an identified On-Demand price. The identified On-Demand + // price is the price of the lowest priced current generation C, M, or R instance + // type with your specified attributes. When Amazon EC2 selects instance types with + // your attributes, it will exclude instance types whose price exceeds your + // specified threshold. The parameter accepts an integer, which Amazon EC2 + // interprets as a percentage. To turn off price protection, specify a high value, + // such as 999999 . This parameter is not supported for GetSpotPlacementScores (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html) // and GetInstanceTypesFromInstanceRequirements (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html) // . If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection // threshold is applied based on the per-vCPU or per-memory price instead of the @@ -6799,18 +6818,25 @@ type InstanceRequirements struct { // . Default: false RequireHibernateSupport *bool - // The price protection threshold for Spot Instances. This is the maximum you’ll - // pay for a Spot Instance, expressed as a percentage above the least expensive - // current generation M, C, or R instance type with your specified attributes. When - // Amazon EC2 selects instance types with your attributes, it excludes instance - // types priced above your threshold. The parameter accepts an integer, which - // Amazon EC2 interprets as a percentage. To turn off price protection, specify a - // high value, such as 999999 . This parameter is not supported for - // GetSpotPlacementScores (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html) + // [Price protection] The price protection threshold for Spot Instances, as a + // percentage higher than an identified Spot price. The identified Spot price is + // the Spot price of the lowest priced current generation C, M, or R instance type + // with your specified attributes. If no current generation C, M, or R instance + // type matches your attributes, then the identified Spot price is from the lowest + // priced current generation instance types, and failing that, from the lowest + // priced previous generation instance types that match your attributes. When + // Amazon EC2 selects instance types with your attributes, it will exclude instance + // types whose Spot price exceeds your specified threshold. The parameter accepts + // an integer, which Amazon EC2 interprets as a percentage. To indicate no price + // protection threshold, specify a high value, such as 999999 . If you set + // TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is + // applied based on the per-vCPU or per-memory price instead of the per-instance + // price. This parameter is not supported for GetSpotPlacementScores (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html) // and GetInstanceTypesFromInstanceRequirements (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html) - // . If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection - // threshold is applied based on the per-vCPU or per-memory price instead of the - // per-instance price. Default: 100 + // . Only one of SpotMaxPricePercentageOverLowestPrice or + // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice can be specified. If you don't + // specify either, then SpotMaxPricePercentageOverLowestPrice is used and the + // value for that parameter defaults to 100 . Default: 100 SpotMaxPricePercentageOverLowestPrice *int32 // The minimum and maximum amount of total local storage, in GB. Default: No @@ -6984,6 +7010,25 @@ type InstanceRequirementsRequest struct { // Default: hdd and ssd LocalStorageTypes []LocalStorageType + // [Price protection] The price protection threshold for Spot Instances, as a + // percentage of an identified On-Demand price. The identified On-Demand price is + // the price of the lowest priced current generation C, M, or R instance type with + // your specified attributes. If no current generation C, M, or R instance type + // matches your attributes, then the identified price is from the lowest priced + // current generation instance types, and failing that, from the lowest priced + // previous generation instance types that match your attributes. When Amazon EC2 + // selects instance types with your attributes, it will exclude instance types + // whose price exceeds your specified threshold. The parameter accepts an integer, + // which Amazon EC2 interprets as a percentage. To indicate no price protection + // threshold, specify a high value, such as 999999 . If you set DesiredCapacityType + // to vcpu or memory-mib , the price protection threshold is based on the per vCPU + // or per memory price instead of the per instance price. Only one of + // SpotMaxPricePercentageOverLowestPrice or + // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice can be specified. If you don't + // specify either, then SpotMaxPricePercentageOverLowestPrice is used and the + // value for that parameter defaults to 100 . + MaxSpotPriceAsPercentageOfOptimalOnDemandPrice *int32 + // The minimum and maximum amount of memory per vCPU, in GiB. Default: No minimum // or maximum limits MemoryGiBPerVCpu *MemoryGiBPerVCpuRequest @@ -6997,14 +7042,15 @@ type InstanceRequirementsRequest struct { // maximum limits NetworkInterfaceCount *NetworkInterfaceCountRequest - // The price protection threshold for On-Demand Instances. This is the maximum - // you’ll pay for an On-Demand Instance, expressed as a percentage above the least - // expensive current generation M, C, or R instance type with your specified - // attributes. When Amazon EC2 selects instance types with your attributes, it - // excludes instance types priced above your threshold. The parameter accepts an - // integer, which Amazon EC2 interprets as a percentage. To turn off price - // protection, specify a high value, such as 999999 . This parameter is not - // supported for GetSpotPlacementScores (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html) + // [Price protection] The price protection threshold for On-Demand Instances, as a + // percentage higher than an identified On-Demand price. The identified On-Demand + // price is the price of the lowest priced current generation C, M, or R instance + // type with your specified attributes. When Amazon EC2 selects instance types with + // your attributes, it will exclude instance types whose price exceeds your + // specified threshold. The parameter accepts an integer, which Amazon EC2 + // interprets as a percentage. To indicate no price protection threshold, specify a + // high value, such as 999999 . This parameter is not supported for + // GetSpotPlacementScores (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html) // and GetInstanceTypesFromInstanceRequirements (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html) // . If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection // threshold is applied based on the per-vCPU or per-memory price instead of the @@ -7016,18 +7062,25 @@ type InstanceRequirementsRequest struct { // . Default: false RequireHibernateSupport *bool - // The price protection threshold for Spot Instance. This is the maximum you’ll - // pay for an Spot Instance, expressed as a percentage above the least expensive - // current generation M, C, or R instance type with your specified attributes. When - // Amazon EC2 selects instance types with your attributes, it excludes instance - // types priced above your threshold. The parameter accepts an integer, which - // Amazon EC2 interprets as a percentage. To turn off price protection, specify a - // high value, such as 999999 . This parameter is not supported for - // GetSpotPlacementScores (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html) + // [Price protection] The price protection threshold for Spot Instances, as a + // percentage higher than an identified Spot price. The identified Spot price is + // the Spot price of the lowest priced current generation C, M, or R instance type + // with your specified attributes. If no current generation C, M, or R instance + // type matches your attributes, then the identified Spot price is from the lowest + // priced current generation instance types, and failing that, from the lowest + // priced previous generation instance types that match your attributes. When + // Amazon EC2 selects instance types with your attributes, it will exclude instance + // types whose Spot price exceeds your specified threshold. The parameter accepts + // an integer, which Amazon EC2 interprets as a percentage. To indicate no price + // protection threshold, specify a high value, such as 999999 . If you set + // TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is + // applied based on the per-vCPU or per-memory price instead of the per-instance + // price. This parameter is not supported for GetSpotPlacementScores (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html) // and GetInstanceTypesFromInstanceRequirements (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html) - // . If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection - // threshold is applied based on the per-vCPU or per-memory price instead of the - // per-instance price. Default: 100 + // . Only one of SpotMaxPricePercentageOverLowestPrice or + // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice can be specified. If you don't + // specify either, then SpotMaxPricePercentageOverLowestPrice is used and the + // value for that parameter defaults to 100 . Default: 100 SpotMaxPricePercentageOverLowestPrice *int32 // The minimum and maximum amount of total local storage, in GB. Default: No diff --git a/vendor/modules.txt b/vendor/modules.txt index 9c6ac4e4..401c94fd 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -68,7 +68,7 @@ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 # github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3 ## explicit; go 1.19 github.com/aws/aws-sdk-go-v2/internal/ini -# github.com/aws/aws-sdk-go-v2/service/ec2 v1.145.0 +# github.com/aws/aws-sdk-go-v2/service/ec2 v1.146.0 ## explicit; go 1.19 github.com/aws/aws-sdk-go-v2/service/ec2 github.com/aws/aws-sdk-go-v2/service/ec2/internal/endpoints