diff --git a/go.mod b/go.mod index 1fa2863..a3bda20 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.41.4 github.com/aws/aws-sdk-go-v2/config v1.32.12 github.com/aws/aws-sdk-go-v2/credentials v1.19.12 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.295.0 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.296.0 github.com/aws/smithy-go v1.24.2 github.com/cloudbase/garm-provider-common v0.1.8 github.com/invopop/jsonschema v0.13.0 diff --git a/go.sum b/go.sum index 1b9274a..e90def9 100644 --- a/go.sum +++ b/go.sum @@ -14,8 +14,8 @@ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.20 h1:tN6W/hg+pkM+tf9XDk github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.20/go.mod h1:YJ898MhD067hSHA6xYCx5ts/jEd8BSOLtQDL3iZsvbc= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.6 h1:qYQ4pzQ2Oz6WpQ8T3HvGHnZydA72MnLuFK9tJwmrbHw= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.6/go.mod h1:O3h0IK87yXci+kg6flUKzJnWeziQUKciKrLjcatSNcY= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.295.0 h1:Au2QWaU5GbS30WY9WaBpV63erA3hz6gVSUvcC5iKyog= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.295.0/go.mod h1:T6ndRfdhnXLIY5oKBHjYZDVj706los2zGdpThppquvA= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.296.0 h1:98Miqj16un1WLNyM1RjVDhXYumhqZrQfAeG8i4jPG6o= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.296.0/go.mod h1:T6ndRfdhnXLIY5oKBHjYZDVj706los2zGdpThppquvA= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.7 h1:5EniKhLZe4xzL7a+fU3C2tfUN4nWIqlLesfrjkuPFTY= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.7/go.mod h1:x0nZssQ3qZSnIcePWLvcoFisRXJzcTVvYpAAdYX8+GI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.20 h1:2HvVAIq+YqgGotK6EkMf+KIEqTISmTYh5zLpYyeTo1Y= 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 7501e8e..2f5fdef 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.296.0 (2026-03-19) + +* **Feature**: Amazon EC2 Fleet instant mode now supports launching instances into Interruptible Capacity Reservations, enabling customers to use spare capacity shared by Capacity Reservation owners within their AWS Organization. + # v1.295.0 (2026-03-18) * **Feature**: The DescribeInstanceTypes API now returns default connection tracking timeout values for TCP, UDP, and UDP stream via the new connectionTrackingConfiguration field on NetworkInfo. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFleet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFleet.go index a96e0f3..41e0200 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFleet.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFleet.go @@ -83,6 +83,12 @@ type CreateFleetInput struct { // [EC2 Fleet health checks]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#ec2-fleet-health-checks ReplaceUnhealthyInstances *bool + // Defines EC2 Fleet preferences for utilizing reserved capacity when + // DefaultTargetCapacityType is set to reserved-capacity . + // + // Supported only for fleets of type instant . + ReservedCapacityOptions *types.ReservedCapacityOptionsRequest + // Describes the configuration of Spot Instances in an EC2 Fleet. SpotOptions *types.SpotOptionsRequest 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 20e95cd..2deaf72 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 @@ -96520,6 +96520,12 @@ func awsEc2query_deserializeDocumentFleetData(v **types.FleetData, decoder smith sv.ReplaceUnhealthyInstances = ptr.Bool(xtv) } + case strings.EqualFold("reservedCapacityOptions", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentReservedCapacityOptions(&sv.ReservedCapacityOptions, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("spotOptions", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsEc2query_deserializeDocumentSpotOptions(&sv.SpotOptions, nodeDecoder); err != nil { @@ -140709,6 +140715,86 @@ func awsEc2query_deserializeDocumentReservationListUnwrapped(v *[]types.Reservat *v = sv return nil } +func awsEc2query_deserializeDocumentReservationTypeList(v *[]types.FleetReservationType, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.FleetReservationType + if *v == nil { + sv = make([]types.FleetReservationType, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("item", t.Name.Local): + var col types.FleetReservationType + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = types.FleetReservationType(xtv) + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentReservationTypeListUnwrapped(v *[]types.FleetReservationType, decoder smithyxml.NodeDecoder) error { + var sv []types.FleetReservationType + if *v == nil { + sv = make([]types.FleetReservationType, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.FleetReservationType + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = types.FleetReservationType(xtv) + } + sv = append(sv, mv) + } + *v = sv + return nil +} func awsEc2query_deserializeDocumentReservationValue(v **types.ReservationValue, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -140784,6 +140870,48 @@ func awsEc2query_deserializeDocumentReservationValue(v **types.ReservationValue, return nil } +func awsEc2query_deserializeDocumentReservedCapacityOptions(v **types.ReservedCapacityOptions, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ReservedCapacityOptions + if *v == nil { + sv = &types.ReservedCapacityOptions{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("reservationTypeSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentReservationTypeList(&sv.ReservationTypes, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeDocumentReservedInstanceReservationValue(v **types.ReservedInstanceReservationValue, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) 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 00d01a0..962a5f2 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.295.0" +const goModuleVersion = "1.296.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 be62d86..2009856 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 @@ -61523,6 +61523,33 @@ func awsEc2query_serializeDocumentReservationFleetInstanceSpecificationList(v [] return nil } +func awsEc2query_serializeDocumentReservationTypeListRequest(v []types.FleetReservationType, value query.Value) error { + if len(v) == 0 { + return nil + } + array := value.Array("ReservationType") + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsEc2query_serializeDocumentReservedCapacityOptionsRequest(v *types.ReservedCapacityOptionsRequest, value query.Value) error { + object := value.Object() + _ = object + + if v.ReservationTypes != nil { + objectKey := object.FlatKey("ReservationType") + if err := awsEc2query_serializeDocumentReservationTypeListRequest(v.ReservationTypes, objectKey); err != nil { + return err + } + } + + return nil +} + func awsEc2query_serializeDocumentReservedInstanceIdSet(v []string, value query.Value) error { if len(v) == 0 { return nil @@ -67340,6 +67367,13 @@ func awsEc2query_serializeOpDocumentCreateFleetInput(v *CreateFleetInput, value objectKey.Boolean(*v.ReplaceUnhealthyInstances) } + if v.ReservedCapacityOptions != nil { + objectKey := object.Key("ReservedCapacityOptions") + if err := awsEc2query_serializeDocumentReservedCapacityOptionsRequest(v.ReservedCapacityOptions, objectKey); err != nil { + return err + } + } + if v.SpotOptions != nil { objectKey := object.Key("SpotOptions") if err := awsEc2query_serializeDocumentSpotOptionsRequest(v.SpotOptions, objectKey); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/enums.go index 6d0ff72..36a76dd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/enums.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/enums.go @@ -1910,9 +1910,10 @@ type DefaultTargetCapacityType string // Enum values for DefaultTargetCapacityType const ( - DefaultTargetCapacityTypeSpot DefaultTargetCapacityType = "spot" - DefaultTargetCapacityTypeOnDemand DefaultTargetCapacityType = "on-demand" - DefaultTargetCapacityTypeCapacityBlock DefaultTargetCapacityType = "capacity-block" + DefaultTargetCapacityTypeSpot DefaultTargetCapacityType = "spot" + DefaultTargetCapacityTypeOnDemand DefaultTargetCapacityType = "on-demand" + DefaultTargetCapacityTypeCapacityBlock DefaultTargetCapacityType = "capacity-block" + DefaultTargetCapacityTypeReservedCapacity DefaultTargetCapacityType = "reserved-capacity" ) // Values returns all known values for DefaultTargetCapacityType. Note that this @@ -1924,6 +1925,7 @@ func (DefaultTargetCapacityType) Values() []DefaultTargetCapacityType { "spot", "on-demand", "capacity-block", + "reserved-capacity", } } @@ -2874,6 +2876,23 @@ func (FleetReplacementStrategy) Values() []FleetReplacementStrategy { } } +type FleetReservationType string + +// Enum values for FleetReservationType +const ( + FleetReservationTypeInterruptibleCapacityReservation FleetReservationType = "interruptible-capacity-reservation" +) + +// Values returns all known values for FleetReservationType. 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 (FleetReservationType) Values() []FleetReservationType { + return []FleetReservationType{ + "interruptible-capacity-reservation", + } +} + type FleetStateCode string // Enum values for FleetStateCode @@ -3731,8 +3750,9 @@ type InstanceLifecycle string // Enum values for InstanceLifecycle const ( - InstanceLifecycleSpot InstanceLifecycle = "spot" - InstanceLifecycleOnDemand InstanceLifecycle = "on-demand" + InstanceLifecycleSpot InstanceLifecycle = "spot" + InstanceLifecycleOnDemand InstanceLifecycle = "on-demand" + InstanceLifecycleInterruptibleCapacityReservation InstanceLifecycle = "interruptible-capacity-reservation" ) // Values returns all known values for InstanceLifecycle. Note that this can be @@ -3743,6 +3763,7 @@ func (InstanceLifecycle) Values() []InstanceLifecycle { return []InstanceLifecycle{ "spot", "on-demand", + "interruptible-capacity-reservation", } } 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 5612d4a..616723b 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 @@ -3356,8 +3356,8 @@ type CreateFleetError struct { // template. LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse - // Indicates if the instance that could not be launched was a Spot Instance or - // On-Demand Instance. + // Indicates if the instance that could not be launched was a Spot, On-Demand, + // Capacity Block, or Interruptible Capacity Reservation instance. Lifecycle InstanceLifecycle noSmithyDocumentSerde @@ -3377,8 +3377,8 @@ type CreateFleetInstance struct { // template. LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse - // Indicates if the instance that was launched is a Spot Instance or On-Demand - // Instance. + // Indicates if the instance that was launched is a Spot, On-Demand, Capacity + // Block, or Interruptible Capacity Reservation instance. Lifecycle InstanceLifecycle // The value is windows for Windows instances in an EC2 Fleet. Otherwise, the @@ -4123,8 +4123,8 @@ type DescribeFleetError struct { // template. LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse - // Indicates if the instance that could not be launched was a Spot Instance or - // On-Demand Instance. + // Indicates if the instance that could not be launched was a Spot, On-Demand, + // Capacity Block, or Interruptible Capacity Reservation instance. Lifecycle InstanceLifecycle noSmithyDocumentSerde @@ -4144,8 +4144,8 @@ type DescribeFleetsInstances struct { // template. LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse - // Indicates if the instance that was launched is a Spot Instance or On-Demand - // Instance. + // Indicates if the instance that was launched is a Spot, On-Demand, Capacity + // Block, or Interruptible Capacity Reservation instance. Lifecycle InstanceLifecycle // The value is windows for Windows instances in an EC2 Fleet. Otherwise, the @@ -6180,6 +6180,10 @@ type FleetData struct { // [EC2 Fleet health checks]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#ec2-fleet-health-checks ReplaceUnhealthyInstances *bool + // Defines EC2 Fleet preferences for utilizing reserved capacity when + // DefaultTargetCapacityType is set to reserved-capacity . + ReservedCapacityOptions *ReservedCapacityOptions + // The configuration of Spot Instances in an EC2 Fleet. SpotOptions *SpotOptions @@ -18304,6 +18308,37 @@ type ReservationValue struct { noSmithyDocumentSerde } +// Defines EC2 Fleet preferences for utilizing reserved capacity when +// DefaultTargetCapacityType is set to reserved-capacity . +type ReservedCapacityOptions struct { + + // The types of Capacity Reservations used for fulfilling the EC2 Fleet request. + ReservationTypes []FleetReservationType + + noSmithyDocumentSerde +} + +// Defines EC2 Fleet preferences for utilizing reserved capacity when +// DefaultTargetCapacityType is set to reserved-capacity . +// +// This configuration can only be used if the EC2 Fleet is of type instant . +// +// When you specify ReservedCapacityOptions , you must also set +// DefaultTargetCapacityType to reserved-capacity in the +// TargetCapacitySpecification . +// +// For more information about Interruptible Capacity Reservations, see [Launch instances into an Interruptible Capacity Reservation] in the +// Amazon EC2 User Guide. +// +// [Launch instances into an Interruptible Capacity Reservation]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-launch-instances-interruptible-cr-walkthrough.html +type ReservedCapacityOptionsRequest struct { + + // The types of Capacity Reservations to use for fulfilling the EC2 Fleet request. + ReservationTypes []FleetReservationType + + noSmithyDocumentSerde +} + // Describes the limit price of a Reserved Instance offering. type ReservedInstanceLimitPrice struct { diff --git a/vendor/modules.txt b/vendor/modules.txt index 079f278..54271d5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -55,7 +55,7 @@ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 # github.com/aws/aws-sdk-go-v2/internal/ini v1.8.6 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/internal/ini -# github.com/aws/aws-sdk-go-v2/service/ec2 v1.295.0 +# github.com/aws/aws-sdk-go-v2/service/ec2 v1.296.0 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/ec2 github.com/aws/aws-sdk-go-v2/service/ec2/internal/endpoints