diff --git a/go.mod b/go.mod index 9f0ff25c..44b8a77a 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/aws/aws-sdk-go v1.55.3 github.com/aws/aws-sdk-go-v2 v1.30.3 github.com/aws/aws-sdk-go-v2/config v1.27.27 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.171.0 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.173.0 github.com/aws/aws-sdk-go-v2/service/route53 v1.42.3 github.com/aws/aws-sdk-go-v2/service/ssm v1.52.3 github.com/mattn/go-isatty v0.0.20 diff --git a/go.sum b/go.sum index f7621598..d9255e75 100644 --- a/go.sum +++ b/go.sum @@ -14,8 +14,8 @@ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.15 h1:C6WHdGnTDIYETAm5iE github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.15/go.mod h1:ZQLZqhcu+JhSrA9/NXRm8SkDvsycE+JkV3WGY41e+IM= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.171.0 h1:r398oizT1O8AdQGpnxOMOIstEAAb3PPW5QZsL8w4Ujc= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.171.0/go.mod h1:9KdiRVKTZyPRTlbX3i41FxTV+5OatZ7xOJCN4lleX7g= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.173.0 h1:ta62lid9JkIpKZtZZXSj6rP2AqY5x1qYGq53ffxqD9Q= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.173.0/go.mod h1:o6QDjdVKpP5EF0dp/VlvqckzuSDATr1rLdHt3A5m0YY= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 h1:dT3MqvGhSoaIhRseqw2I0yH81l7wiR2vjs57O51EAm8= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3/go.mod h1:GlAeCkHwugxdHaueRr4nhPuY+WW+gR8UjlcqzPr1SPI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.17 h1:HGErhhrxZlQ044RiM+WdoZxp0p+EGM62y3L6pwA4olE= 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 f4dfc377..ed27abc7 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,11 @@ +# v1.173.0 (2024-07-25) + +* **Feature**: EC2 Fleet now supports using custom identifiers to reference Amazon Machine Images (AMI) in launch requests that are configured to choose from a diversified list of instance types. + +# v1.172.0 (2024-07-23) + +* **Feature**: Switch to new waiter matching implementation, which conveys a slight performance boost and removes the need for the go-jmespath runtime dependency. + # v1.171.0 (2024-07-18) * **Feature**: Amazon VPC IP Address Manager (IPAM) now supports Bring-Your-Own-IP (BYOIP) for IP addresses registered with any Internet Registry. This feature uses DNS TXT records to validate ownership of a public IP address range. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeBundleTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeBundleTasks.go index add19eb3..386f8e1b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeBundleTasks.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeBundleTasks.go @@ -11,7 +11,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "time" ) @@ -334,29 +333,18 @@ func (w *BundleTaskCompleteWaiter) WaitForOutput(ctx context.Context, params *De func bundleTaskCompleteStateRetryable(ctx context.Context, input *DescribeBundleTasksInput, output *DescribeBundleTasksOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("BundleTasks[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.BundleTasks + var v2 []types.BundleTaskState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "complete" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.BundleTaskState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.BundleTaskState value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } @@ -366,26 +354,23 @@ func bundleTaskCompleteStateRetryable(ctx context.Context, input *DescribeBundle } if err == nil { - pathValue, err := jmespath.Search("BundleTasks[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.BundleTasks + var v2 []types.BundleTaskState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "failed" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.BundleTaskState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.BundleTaskState value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeConversionTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeConversionTasks.go index 999edbf9..41a934c4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeConversionTasks.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeConversionTasks.go @@ -11,7 +11,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "time" ) @@ -306,29 +305,18 @@ func (w *ConversionTaskCancelledWaiter) WaitForOutput(ctx context.Context, param func conversionTaskCancelledStateRetryable(ctx context.Context, input *DescribeConversionTasksInput, output *DescribeConversionTasksOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("ConversionTasks[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.ConversionTasks + var v2 []types.ConversionTaskState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "cancelled" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.ConversionTaskState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.ConversionTaskState value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } @@ -502,29 +490,18 @@ func (w *ConversionTaskCompletedWaiter) WaitForOutput(ctx context.Context, param func conversionTaskCompletedStateRetryable(ctx context.Context, input *DescribeConversionTasksInput, output *DescribeConversionTasksOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("ConversionTasks[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.ConversionTasks + var v2 []types.ConversionTaskState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "completed" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.ConversionTaskState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.ConversionTaskState value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } @@ -534,50 +511,44 @@ func conversionTaskCompletedStateRetryable(ctx context.Context, input *DescribeC } if err == nil { - pathValue, err := jmespath.Search("ConversionTasks[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.ConversionTasks + var v2 []types.ConversionTaskState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "cancelled" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.ConversionTaskState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.ConversionTaskState value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } if err == nil { - pathValue, err := jmespath.Search("ConversionTasks[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.ConversionTasks + var v2 []types.ConversionTaskState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "cancelling" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.ConversionTaskState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.ConversionTaskState value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } @@ -746,29 +717,18 @@ func (w *ConversionTaskDeletedWaiter) WaitForOutput(ctx context.Context, params func conversionTaskDeletedStateRetryable(ctx context.Context, input *DescribeConversionTasksInput, output *DescribeConversionTasksOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("ConversionTasks[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.ConversionTasks + var v2 []types.ConversionTaskState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "deleted" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.ConversionTaskState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.ConversionTaskState value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCustomerGateways.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCustomerGateways.go index 01832f8b..3ddf0d26 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCustomerGateways.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCustomerGateways.go @@ -11,7 +11,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "time" ) @@ -334,29 +333,20 @@ func (w *CustomerGatewayAvailableWaiter) WaitForOutput(ctx context.Context, para func customerGatewayAvailableStateRetryable(ctx context.Context, input *DescribeCustomerGatewaysInput, output *DescribeCustomerGatewaysOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("CustomerGateways[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.CustomerGateways + var v2 []string + for _, v := range v1 { + v3 := v.State + if v3 != nil { + v2 = append(v2, *v3) + } } - expectedValue := "available" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) - } - - if string(*value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } @@ -366,50 +356,48 @@ func customerGatewayAvailableStateRetryable(ctx context.Context, input *Describe } if err == nil { - pathValue, err := jmespath.Search("CustomerGateways[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.CustomerGateways + var v2 []string + for _, v := range v1 { + v3 := v.State + if v3 != nil { + v2 = append(v2, *v3) + } } - expectedValue := "deleted" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(*value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } if err == nil { - pathValue, err := jmespath.Search("CustomerGateways[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.CustomerGateways + var v2 []string + for _, v := range v1 { + v3 := v.State + if v3 != nil { + v2 = append(v2, *v3) + } } - expectedValue := "deleting" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(*value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeExportTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeExportTasks.go index 877fd6d4..ec387d15 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeExportTasks.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeExportTasks.go @@ -11,7 +11,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "time" ) @@ -298,29 +297,18 @@ func (w *ExportTaskCancelledWaiter) WaitForOutput(ctx context.Context, params *D func exportTaskCancelledStateRetryable(ctx context.Context, input *DescribeExportTasksInput, output *DescribeExportTasksOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("ExportTasks[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.ExportTasks + var v2 []types.ExportTaskState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "cancelled" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.ExportTaskState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.ExportTaskState value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } @@ -494,29 +482,18 @@ func (w *ExportTaskCompletedWaiter) WaitForOutput(ctx context.Context, params *D func exportTaskCompletedStateRetryable(ctx context.Context, input *DescribeExportTasksInput, output *DescribeExportTasksOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("ExportTasks[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.ExportTasks + var v2 []types.ExportTaskState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "completed" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.ExportTaskState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.ExportTaskState value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImages.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImages.go index 8cf41e55..4124f644 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImages.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImages.go @@ -13,7 +13,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) @@ -464,29 +463,18 @@ func (w *ImageAvailableWaiter) WaitForOutput(ctx context.Context, params *Descri func imageAvailableStateRetryable(ctx context.Context, input *DescribeImagesInput, output *DescribeImagesOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("Images[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Images + var v2 []types.ImageState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "available" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.ImageState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.ImageState value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } @@ -496,26 +484,23 @@ func imageAvailableStateRetryable(ctx context.Context, input *DescribeImagesInpu } if err == nil { - pathValue, err := jmespath.Search("Images[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Images + var v2 []types.ImageState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "failed" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.ImageState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.ImageState value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } @@ -681,22 +666,16 @@ func (w *ImageExistsWaiter) WaitForOutput(ctx context.Context, params *DescribeI func imageExistsStateRetryable(ctx context.Context, input *DescribeImagesInput, output *DescribeImagesOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("length(Images[]) > `0`", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - + v1 := output.Images + v2 := len(v1) + v3 := 0 + v4 := int64(v2) > int64(v3) expectedValue := "true" bv, err := strconv.ParseBool(expectedValue) if err != nil { return false, fmt.Errorf("error parsing boolean from string %w", err) } - value, ok := pathValue.(bool) - if !ok { - return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue) - } - - if value == bv { + if v4 == bv { return false, nil } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImportSnapshotTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImportSnapshotTasks.go index 725d6e5b..d6bd3449 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImportSnapshotTasks.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImportSnapshotTasks.go @@ -11,7 +11,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "time" ) @@ -313,29 +312,21 @@ func (w *SnapshotImportedWaiter) WaitForOutput(ctx context.Context, params *Desc func snapshotImportedStateRetryable(ctx context.Context, input *DescribeImportSnapshotTasksInput, output *DescribeImportSnapshotTasksOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("ImportSnapshotTasks[].SnapshotTaskDetail.Status", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.ImportSnapshotTasks + var v2 []string + for _, v := range v1 { + v3 := v.SnapshotTaskDetail + v4 := v3.Status + if v4 != nil { + v2 = append(v2, *v4) + } } - expectedValue := "completed" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) - } - - if string(*value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } @@ -345,26 +336,26 @@ func snapshotImportedStateRetryable(ctx context.Context, input *DescribeImportSn } if err == nil { - pathValue, err := jmespath.Search("ImportSnapshotTasks[].SnapshotTaskDetail.Status", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.ImportSnapshotTasks + var v2 []string + for _, v := range v1 { + v3 := v.SnapshotTaskDetail + v4 := v3.Status + if v4 != nil { + v2 = append(v2, *v4) + } } - expectedValue := "error" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(*value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceStatus.go index 5a8b702e..51259254 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceStatus.go @@ -13,7 +13,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "time" ) @@ -396,29 +395,19 @@ func (w *InstanceStatusOkWaiter) WaitForOutput(ctx context.Context, params *Desc func instanceStatusOkStateRetryable(ctx context.Context, input *DescribeInstanceStatusInput, output *DescribeInstanceStatusOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("InstanceStatuses[].InstanceStatus.Status", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.InstanceStatuses + var v2 []types.SummaryStatus + for _, v := range v1 { + v3 := v.InstanceStatus + v4 := v3.Status + v2 = append(v2, v4) } - expectedValue := "ok" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.SummaryStatus) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.SummaryStatus value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } @@ -602,29 +591,19 @@ func (w *SystemStatusOkWaiter) WaitForOutput(ctx context.Context, params *Descri func systemStatusOkStateRetryable(ctx context.Context, input *DescribeInstanceStatusInput, output *DescribeInstanceStatusOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("InstanceStatuses[].SystemStatus.Status", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.InstanceStatuses + var v2 []types.SummaryStatus + for _, v := range v1 { + v3 := v.SystemStatus + v4 := v3.Status + v2 = append(v2, v4) } - expectedValue := "ok" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.SummaryStatus) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.SummaryStatus value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstances.go index 7558f676..684aed47 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstances.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstances.go @@ -13,7 +13,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) @@ -737,22 +736,16 @@ func (w *InstanceExistsWaiter) WaitForOutput(ctx context.Context, params *Descri func instanceExistsStateRetryable(ctx context.Context, input *DescribeInstancesInput, output *DescribeInstancesOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("length(Reservations[]) > `0`", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - + v1 := output.Reservations + v2 := len(v1) + v3 := 0 + v4 := int64(v2) > int64(v3) expectedValue := "true" bv, err := strconv.ParseBool(expectedValue) if err != nil { return false, fmt.Errorf("error parsing boolean from string %w", err) } - value, ok := pathValue.(bool) - if !ok { - return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue) - } - - if value == bv { + if v4 == bv { return false, nil } } @@ -932,29 +925,28 @@ func (w *InstanceRunningWaiter) WaitForOutput(ctx context.Context, params *Descr func instanceRunningStateRetryable(ctx context.Context, input *DescribeInstancesInput, output *DescribeInstancesOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Reservations + var v2 [][]types.Instance + for _, v := range v1 { + v3 := v.Instances + v2 = append(v2, v3) + } + var v4 []types.Instance + for _, v := range v2 { + v4 = append(v4, v...) + } + var v5 []types.InstanceStateName + for _, v := range v4 { + v6 := v.State + v7 := v6.Name + v5 = append(v5, v7) } - expectedValue := "running" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v5) > 0 + for _, v := range v5 { + if string(v) != expectedValue { match = false + break } } @@ -964,74 +956,95 @@ func instanceRunningStateRetryable(ctx context.Context, input *DescribeInstances } if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Reservations + var v2 [][]types.Instance + for _, v := range v1 { + v3 := v.Instances + v2 = append(v2, v3) + } + var v4 []types.Instance + for _, v := range v2 { + v4 = append(v4, v...) + } + var v5 []types.InstanceStateName + for _, v := range v4 { + v6 := v.State + v7 := v6.Name + v5 = append(v5, v7) } - expectedValue := "shutting-down" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) + var match bool + for _, v := range v5 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Reservations + var v2 [][]types.Instance + for _, v := range v1 { + v3 := v.Instances + v2 = append(v2, v3) + } + var v4 []types.Instance + for _, v := range v2 { + v4 = append(v4, v...) + } + var v5 []types.InstanceStateName + for _, v := range v4 { + v6 := v.State + v7 := v6.Name + v5 = append(v5, v7) } - expectedValue := "terminated" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) + var match bool + for _, v := range v5 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Reservations + var v2 [][]types.Instance + for _, v := range v1 { + v3 := v.Instances + v2 = append(v2, v3) + } + var v4 []types.Instance + for _, v := range v2 { + v4 = append(v4, v...) + } + var v5 []types.InstanceStateName + for _, v := range v4 { + v6 := v.State + v7 := v6.Name + v5 = append(v5, v7) } - expectedValue := "stopping" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) + var match bool + for _, v := range v5 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } @@ -1210,29 +1223,28 @@ func (w *InstanceStoppedWaiter) WaitForOutput(ctx context.Context, params *Descr func instanceStoppedStateRetryable(ctx context.Context, input *DescribeInstancesInput, output *DescribeInstancesOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Reservations + var v2 [][]types.Instance + for _, v := range v1 { + v3 := v.Instances + v2 = append(v2, v3) + } + var v4 []types.Instance + for _, v := range v2 { + v4 = append(v4, v...) + } + var v5 []types.InstanceStateName + for _, v := range v4 { + v6 := v.State + v7 := v6.Name + v5 = append(v5, v7) } - expectedValue := "stopped" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v5) > 0 + for _, v := range v5 { + if string(v) != expectedValue { match = false + break } } @@ -1242,50 +1254,64 @@ func instanceStoppedStateRetryable(ctx context.Context, input *DescribeInstances } if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Reservations + var v2 [][]types.Instance + for _, v := range v1 { + v3 := v.Instances + v2 = append(v2, v3) + } + var v4 []types.Instance + for _, v := range v2 { + v4 = append(v4, v...) + } + var v5 []types.InstanceStateName + for _, v := range v4 { + v6 := v.State + v7 := v6.Name + v5 = append(v5, v7) } - expectedValue := "pending" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) + var match bool + for _, v := range v5 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Reservations + var v2 [][]types.Instance + for _, v := range v1 { + v3 := v.Instances + v2 = append(v2, v3) + } + var v4 []types.Instance + for _, v := range v2 { + v4 = append(v4, v...) + } + var v5 []types.InstanceStateName + for _, v := range v4 { + v6 := v.State + v7 := v6.Name + v5 = append(v5, v7) } - expectedValue := "terminated" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) + var match bool + for _, v := range v5 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } @@ -1452,29 +1478,28 @@ func (w *InstanceTerminatedWaiter) WaitForOutput(ctx context.Context, params *De func instanceTerminatedStateRetryable(ctx context.Context, input *DescribeInstancesInput, output *DescribeInstancesOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Reservations + var v2 [][]types.Instance + for _, v := range v1 { + v3 := v.Instances + v2 = append(v2, v3) + } + var v4 []types.Instance + for _, v := range v2 { + v4 = append(v4, v...) + } + var v5 []types.InstanceStateName + for _, v := range v4 { + v6 := v.State + v7 := v6.Name + v5 = append(v5, v7) } - expectedValue := "terminated" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v5) > 0 + for _, v := range v5 { + if string(v) != expectedValue { match = false + break } } @@ -1484,50 +1509,64 @@ func instanceTerminatedStateRetryable(ctx context.Context, input *DescribeInstan } if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Reservations + var v2 [][]types.Instance + for _, v := range v1 { + v3 := v.Instances + v2 = append(v2, v3) + } + var v4 []types.Instance + for _, v := range v2 { + v4 = append(v4, v...) + } + var v5 []types.InstanceStateName + for _, v := range v4 { + v6 := v.State + v7 := v6.Name + v5 = append(v5, v7) } - expectedValue := "pending" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) + var match bool + for _, v := range v5 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Reservations + var v2 [][]types.Instance + for _, v := range v1 { + v3 := v.Instances + v2 = append(v2, v3) + } + var v4 []types.Instance + for _, v := range v2 { + v4 = append(v4, v...) + } + var v5 []types.InstanceStateName + for _, v := range v4 { + v6 := v.State + v7 := v6.Name + v5 = append(v5, v7) } - expectedValue := "stopping" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) + var match bool + for _, v := range v5 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInternetGateways.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInternetGateways.go index e18a82f2..c0bc59a1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInternetGateways.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInternetGateways.go @@ -13,7 +13,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) @@ -343,22 +342,23 @@ func (w *InternetGatewayExistsWaiter) WaitForOutput(ctx context.Context, params func internetGatewayExistsStateRetryable(ctx context.Context, input *DescribeInternetGatewaysInput, output *DescribeInternetGatewaysOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("length(InternetGateways[].InternetGatewayId) > `0`", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.InternetGateways + var v2 []string + for _, v := range v1 { + v3 := v.InternetGatewayId + if v3 != nil { + v2 = append(v2, *v3) + } } - + v4 := len(v2) + v5 := 0 + v6 := int64(v4) > int64(v5) expectedValue := "true" bv, err := strconv.ParseBool(expectedValue) if err != nil { return false, fmt.Errorf("error parsing boolean from string %w", err) } - value, ok := pathValue.(bool) - if !ok { - return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue) - } - - if value == bv { + if v6 == bv { return false, nil } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeKeyPairs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeKeyPairs.go index bc44cc7f..bde816f8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeKeyPairs.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeKeyPairs.go @@ -13,7 +13,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) @@ -333,22 +332,23 @@ func (w *KeyPairExistsWaiter) WaitForOutput(ctx context.Context, params *Describ func keyPairExistsStateRetryable(ctx context.Context, input *DescribeKeyPairsInput, output *DescribeKeyPairsOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("length(KeyPairs[].KeyName) > `0`", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.KeyPairs + var v2 []string + for _, v := range v1 { + v3 := v.KeyName + if v3 != nil { + v2 = append(v2, *v3) + } } - + v4 := len(v2) + v5 := 0 + v6 := int64(v4) > int64(v5) expectedValue := "true" bv, err := strconv.ParseBool(expectedValue) if err != nil { return false, fmt.Errorf("error parsing boolean from string %w", err) } - value, ok := pathValue.(bool) - if !ok { - return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue) - } - - if value == bv { + if v6 == bv { return false, nil } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNatGateways.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNatGateways.go index d641696f..f242b129 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNatGateways.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNatGateways.go @@ -13,7 +13,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "time" ) @@ -339,29 +338,18 @@ func (w *NatGatewayAvailableWaiter) WaitForOutput(ctx context.Context, params *D func natGatewayAvailableStateRetryable(ctx context.Context, input *DescribeNatGatewaysInput, output *DescribeNatGatewaysOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("NatGateways[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.NatGateways + var v2 []types.NatGatewayState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "available" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.NatGatewayState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.NatGatewayState value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } @@ -371,74 +359,65 @@ func natGatewayAvailableStateRetryable(ctx context.Context, input *DescribeNatGa } if err == nil { - pathValue, err := jmespath.Search("NatGateways[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.NatGateways + var v2 []types.NatGatewayState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "failed" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.NatGatewayState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.NatGatewayState value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } if err == nil { - pathValue, err := jmespath.Search("NatGateways[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.NatGateways + var v2 []types.NatGatewayState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "deleting" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.NatGatewayState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.NatGatewayState value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } if err == nil { - pathValue, err := jmespath.Search("NatGateways[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.NatGateways + var v2 []types.NatGatewayState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "deleted" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.NatGatewayState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.NatGatewayState value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } @@ -617,29 +596,18 @@ func (w *NatGatewayDeletedWaiter) WaitForOutput(ctx context.Context, params *Des func natGatewayDeletedStateRetryable(ctx context.Context, input *DescribeNatGatewaysInput, output *DescribeNatGatewaysOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("NatGateways[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.NatGateways + var v2 []types.NatGatewayState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "deleted" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.NatGatewayState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.NatGatewayState value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfaces.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfaces.go index e1fe76cf..c2f57e92 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfaces.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfaces.go @@ -13,7 +13,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "time" ) @@ -435,29 +434,18 @@ func (w *NetworkInterfaceAvailableWaiter) WaitForOutput(ctx context.Context, par func networkInterfaceAvailableStateRetryable(ctx context.Context, input *DescribeNetworkInterfacesInput, output *DescribeNetworkInterfacesOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("NetworkInterfaces[].Status", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.NetworkInterfaces + var v2 []types.NetworkInterfaceStatus + for _, v := range v1 { + v3 := v.Status + v2 = append(v2, v3) } - expectedValue := "available" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.NetworkInterfaceStatus) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.NetworkInterfaceStatus value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroups.go index 38e78e14..eb1d92a4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroups.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroups.go @@ -13,7 +13,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) @@ -405,22 +404,23 @@ func (w *SecurityGroupExistsWaiter) WaitForOutput(ctx context.Context, params *D func securityGroupExistsStateRetryable(ctx context.Context, input *DescribeSecurityGroupsInput, output *DescribeSecurityGroupsOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("length(SecurityGroups[].GroupId) > `0`", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.SecurityGroups + var v2 []string + for _, v := range v1 { + v3 := v.GroupId + if v3 != nil { + v2 = append(v2, *v3) + } } - + v4 := len(v2) + v5 := 0 + v6 := int64(v4) > int64(v5) expectedValue := "true" bv, err := strconv.ParseBool(expectedValue) if err != nil { return false, fmt.Errorf("error parsing boolean from string %w", err) } - value, ok := pathValue.(bool) - if !ok { - return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue) - } - - if value == bv { + if v6 == bv { return false, nil } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSnapshots.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSnapshots.go index 890ed6ce..afd7dd64 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSnapshots.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSnapshots.go @@ -11,7 +11,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "time" ) @@ -411,29 +410,18 @@ func (w *SnapshotCompletedWaiter) WaitForOutput(ctx context.Context, params *Des func snapshotCompletedStateRetryable(ctx context.Context, input *DescribeSnapshotsInput, output *DescribeSnapshotsOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("Snapshots[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Snapshots + var v2 []types.SnapshotState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "completed" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.SnapshotState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.SnapshotState value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } @@ -443,26 +431,23 @@ func snapshotCompletedStateRetryable(ctx context.Context, input *DescribeSnapsho } if err == nil { - pathValue, err := jmespath.Search("Snapshots[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Snapshots + var v2 []types.SnapshotState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "error" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.SnapshotState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.SnapshotState value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotInstanceRequests.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotInstanceRequests.go index 69b672ac..8d28e0e3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotInstanceRequests.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotInstanceRequests.go @@ -13,7 +13,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "time" ) @@ -445,29 +444,21 @@ func (w *SpotInstanceRequestFulfilledWaiter) WaitForOutput(ctx context.Context, func spotInstanceRequestFulfilledStateRetryable(ctx context.Context, input *DescribeSpotInstanceRequestsInput, output *DescribeSpotInstanceRequestsOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("SpotInstanceRequests[].Status.Code", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.SpotInstanceRequests + var v2 []string + for _, v := range v1 { + v3 := v.Status + v4 := v3.Code + if v4 != nil { + v2 = append(v2, *v4) + } } - expectedValue := "fulfilled" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) - } - - if string(*value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } @@ -477,29 +468,21 @@ func spotInstanceRequestFulfilledStateRetryable(ctx context.Context, input *Desc } if err == nil { - pathValue, err := jmespath.Search("SpotInstanceRequests[].Status.Code", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.SpotInstanceRequests + var v2 []string + for _, v := range v1 { + v3 := v.Status + v4 := v3.Code + if v4 != nil { + v2 = append(v2, *v4) + } } - expectedValue := "request-canceled-and-instance-running" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) - } - - if string(*value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } @@ -509,98 +492,98 @@ func spotInstanceRequestFulfilledStateRetryable(ctx context.Context, input *Desc } if err == nil { - pathValue, err := jmespath.Search("SpotInstanceRequests[].Status.Code", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.SpotInstanceRequests + var v2 []string + for _, v := range v1 { + v3 := v.Status + v4 := v3.Code + if v4 != nil { + v2 = append(v2, *v4) + } } - expectedValue := "schedule-expired" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(*value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } if err == nil { - pathValue, err := jmespath.Search("SpotInstanceRequests[].Status.Code", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.SpotInstanceRequests + var v2 []string + for _, v := range v1 { + v3 := v.Status + v4 := v3.Code + if v4 != nil { + v2 = append(v2, *v4) + } } - expectedValue := "canceled-before-fulfillment" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(*value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } if err == nil { - pathValue, err := jmespath.Search("SpotInstanceRequests[].Status.Code", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.SpotInstanceRequests + var v2 []string + for _, v := range v1 { + v3 := v.Status + v4 := v3.Code + if v4 != nil { + v2 = append(v2, *v4) + } } - expectedValue := "bad-parameters" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(*value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } if err == nil { - pathValue, err := jmespath.Search("SpotInstanceRequests[].Status.Code", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.SpotInstanceRequests + var v2 []string + for _, v := range v1 { + v3 := v.Status + v4 := v3.Code + if v4 != nil { + v2 = append(v2, *v4) + } } - expectedValue := "system-error" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(*value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStoreImageTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStoreImageTasks.go index e7c2547b..48ee9b80 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStoreImageTasks.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStoreImageTasks.go @@ -11,7 +11,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "time" ) @@ -347,29 +346,20 @@ func (w *StoreImageTaskCompleteWaiter) WaitForOutput(ctx context.Context, params func storeImageTaskCompleteStateRetryable(ctx context.Context, input *DescribeStoreImageTasksInput, output *DescribeStoreImageTasksOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("StoreImageTaskResults[].StoreTaskState", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.StoreImageTaskResults + var v2 []string + for _, v := range v1 { + v3 := v.StoreTaskState + if v3 != nil { + v2 = append(v2, *v3) + } } - expectedValue := "Completed" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) - } - - if string(*value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } @@ -379,50 +369,48 @@ func storeImageTaskCompleteStateRetryable(ctx context.Context, input *DescribeSt } if err == nil { - pathValue, err := jmespath.Search("StoreImageTaskResults[].StoreTaskState", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.StoreImageTaskResults + var v2 []string + for _, v := range v1 { + v3 := v.StoreTaskState + if v3 != nil { + v2 = append(v2, *v3) + } } - expectedValue := "Failed" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(*value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } if err == nil { - pathValue, err := jmespath.Search("StoreImageTaskResults[].StoreTaskState", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.StoreImageTaskResults + var v2 []string + for _, v := range v1 { + v3 := v.StoreTaskState + if v3 != nil { + v2 = append(v2, *v3) + } } - expectedValue := "InProgress" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(*value) == expectedValue { - return true, nil - } + if match { + return true, nil } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSubnets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSubnets.go index 978ecb97..c263e34a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSubnets.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSubnets.go @@ -11,7 +11,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "time" ) @@ -404,29 +403,18 @@ func (w *SubnetAvailableWaiter) WaitForOutput(ctx context.Context, params *Descr func subnetAvailableStateRetryable(ctx context.Context, input *DescribeSubnetsInput, output *DescribeSubnetsOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("Subnets[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Subnets + var v2 []types.SubnetState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "available" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.SubnetState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.SubnetState value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumes.go index 5d2a8de6..0105b915 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumes.go @@ -13,7 +13,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "time" ) @@ -378,29 +377,18 @@ func (w *VolumeAvailableWaiter) WaitForOutput(ctx context.Context, params *Descr func volumeAvailableStateRetryable(ctx context.Context, input *DescribeVolumesInput, output *DescribeVolumesOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("Volumes[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Volumes + var v2 []types.VolumeState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "available" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.VolumeState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VolumeState value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } @@ -410,26 +398,23 @@ func volumeAvailableStateRetryable(ctx context.Context, input *DescribeVolumesIn } if err == nil { - pathValue, err := jmespath.Search("Volumes[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Volumes + var v2 []types.VolumeState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "deleted" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.VolumeState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VolumeState value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } @@ -596,29 +581,18 @@ func (w *VolumeDeletedWaiter) WaitForOutput(ctx context.Context, params *Describ func volumeDeletedStateRetryable(ctx context.Context, input *DescribeVolumesInput, output *DescribeVolumesOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("Volumes[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Volumes + var v2 []types.VolumeState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "deleted" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.VolumeState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VolumeState value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } @@ -801,29 +775,18 @@ func (w *VolumeInUseWaiter) WaitForOutput(ctx context.Context, params *DescribeV func volumeInUseStateRetryable(ctx context.Context, input *DescribeVolumesInput, output *DescribeVolumesOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("Volumes[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Volumes + var v2 []types.VolumeState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "in-use" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.VolumeState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VolumeState value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } @@ -833,26 +796,23 @@ func volumeInUseStateRetryable(ctx context.Context, input *DescribeVolumesInput, } if err == nil { - pathValue, err := jmespath.Search("Volumes[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Volumes + var v2 []types.VolumeState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "deleted" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.VolumeState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VolumeState value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcPeeringConnections.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcPeeringConnections.go index 3f9ad7b0..84769d3f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcPeeringConnections.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcPeeringConnections.go @@ -13,7 +13,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "time" ) @@ -360,29 +359,19 @@ func (w *VpcPeeringConnectionDeletedWaiter) WaitForOutput(ctx context.Context, p func vpcPeeringConnectionDeletedStateRetryable(ctx context.Context, input *DescribeVpcPeeringConnectionsInput, output *DescribeVpcPeeringConnectionsOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("VpcPeeringConnections[].Status.Code", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.VpcPeeringConnections + var v2 []types.VpcPeeringConnectionStateReasonCode + for _, v := range v1 { + v3 := v.Status + v4 := v3.Code + v2 = append(v2, v4) } - expectedValue := "deleted" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.VpcPeeringConnectionStateReasonCode) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VpcPeeringConnectionStateReasonCode value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcs.go index e8145f4f..ea057393 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcs.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcs.go @@ -13,7 +13,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "time" ) @@ -362,29 +361,18 @@ func (w *VpcAvailableWaiter) WaitForOutput(ctx context.Context, params *Describe func vpcAvailableStateRetryable(ctx context.Context, input *DescribeVpcsInput, output *DescribeVpcsOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("Vpcs[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.Vpcs + var v2 []types.VpcState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "available" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.VpcState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VpcState value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpnConnections.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpnConnections.go index f6c4f0bd..c549d35a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpnConnections.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpnConnections.go @@ -11,7 +11,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "time" ) @@ -349,29 +348,18 @@ func (w *VpnConnectionAvailableWaiter) WaitForOutput(ctx context.Context, params func vpnConnectionAvailableStateRetryable(ctx context.Context, input *DescribeVpnConnectionsInput, output *DescribeVpnConnectionsOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("VpnConnections[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.VpnConnections + var v2 []types.VpnState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "available" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.VpnState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VpnState value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } @@ -381,50 +369,44 @@ func vpnConnectionAvailableStateRetryable(ctx context.Context, input *DescribeVp } if err == nil { - pathValue, err := jmespath.Search("VpnConnections[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.VpnConnections + var v2 []types.VpnState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "deleting" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.VpnState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VpnState value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } if err == nil { - pathValue, err := jmespath.Search("VpnConnections[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.VpnConnections + var v2 []types.VpnState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "deleted" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.VpnState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VpnState value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } @@ -593,29 +575,18 @@ func (w *VpnConnectionDeletedWaiter) WaitForOutput(ctx context.Context, params * func vpnConnectionDeletedStateRetryable(ctx context.Context, input *DescribeVpnConnectionsInput, output *DescribeVpnConnectionsOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("VpnConnections[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.VpnConnections + var v2 []types.VpnState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "deleted" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.VpnState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VpnState value, got %T", pathValue) - } - - if string(value) != expectedValue { + match := len(v2) > 0 + for _, v := range v2 { + if string(v) != expectedValue { match = false + break } } @@ -625,26 +596,23 @@ func vpnConnectionDeletedStateRetryable(ctx context.Context, input *DescribeVpnC } if err == nil { - pathValue, err := jmespath.Search("VpnConnections[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.VpnConnections + var v2 []types.VpnState + for _, v := range v1 { + v3 := v.State + v2 = append(v2, v3) } - expectedValue := "pending" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.VpnState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VpnState value, got %T", pathValue) + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break } + } - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } + if match { + return false, fmt.Errorf("waiter state transitioned to Failure") } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetPasswordData.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetPasswordData.go index 2a4f65ee..1fc6dc06 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetPasswordData.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetPasswordData.go @@ -10,7 +10,6 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) @@ -331,22 +330,20 @@ func (w *PasswordDataAvailableWaiter) WaitForOutput(ctx context.Context, params func passwordDataAvailableStateRetryable(ctx context.Context, input *GetPasswordDataInput, output *GetPasswordDataOutput, err error) (bool, error) { if err == nil { - pathValue, err := jmespath.Search("length(PasswordData) > `0`", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) + v1 := output.PasswordData + var _v1 string + if v1 != nil { + _v1 = *v1 } - + v2 := len(_v1) + v3 := 0 + v4 := int64(v2) > int64(v3) expectedValue := "true" bv, err := strconv.ParseBool(expectedValue) if err != nil { return false, fmt.Errorf("error parsing boolean from string %w", err) } - value, ok := pathValue.(bool) - if !ok { - return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue) - } - - if value == bv { + if v4 == bv { return false, nil } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/generated.json index 98b5eda1..3387f7ef 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/generated.json @@ -5,8 +5,7 @@ "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding": "v1.0.5", "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url": "v1.0.7", - "github.com/aws/smithy-go": "v1.4.0", - "github.com/jmespath/go-jmespath": "v0.4.0" + "github.com/aws/smithy-go": "v1.4.0" }, "files": [ "api_client.go", 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 646fdda8..a0f5f320 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.171.0" +const goModuleVersion = "1.173.0" 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 232fff4d..1033ea33 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 @@ -7043,7 +7043,6 @@ const ( ResourceTypeVerifiedAccessTrustProvider ResourceType = "verified-access-trust-provider" ResourceTypeVpnConnectionDeviceType ResourceType = "vpn-connection-device-type" ResourceTypeVpcBlockPublicAccessExclusion ResourceType = "vpc-block-public-access-exclusion" - ResourceTypeVpcEncryptionControl ResourceType = "vpc-encryption-control" ResourceTypeIpamResourceDiscovery ResourceType = "ipam-resource-discovery" ResourceTypeIpamResourceDiscoveryAssociation ResourceType = "ipam-resource-discovery-association" ResourceTypeInstanceConnectEndpoint ResourceType = "instance-connect-endpoint" @@ -7139,7 +7138,6 @@ func (ResourceType) Values() []ResourceType { "verified-access-trust-provider", "vpn-connection-device-type", "vpc-block-public-access-exclusion", - "vpc-encryption-control", "ipam-resource-discovery", "ipam-resource-discovery-association", "instance-connect-endpoint", 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 4f3bdc14..82862107 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 @@ -4701,9 +4701,38 @@ type FleetLaunchTemplateOverrides struct { // The Availability Zone in which to launch the instances. AvailabilityZone *string - // The ID of the AMI. An AMI is required to launch an instance. This parameter is - // only available for fleets of type instant . For fleets of type maintain and - // request , you must specify the AMI ID in the launch template. + // The ID of the AMI in the format ami-17characters00000 . + // + // Alternatively, you can specify a Systems Manager parameter, using one of the + // following formats. The Systems Manager parameter will resolve to an AMI ID on + // launch. + // + // To reference a public parameter: + // + // - resolve:ssm:public-parameter + // + // To reference a parameter stored in the same account: + // + // - resolve:ssm:parameter-name + // + // - resolve:ssm:parameter-name:version-number + // + // - resolve:ssm:parameter-name:label + // + // To reference a parameter shared from another Amazon Web Services account: + // + // - resolve:ssm:parameter-ARN + // + // - resolve:ssm:parameter-ARN:version-number + // + // - resolve:ssm:parameter-ARN:label + // + // For more information, see [Use a Systems Manager parameter instead of an AMI ID] in the Amazon EC2 User Guide. + // + // This parameter is only available for fleets of type instant . For fleets of type + // maintain and request , you must specify the AMI ID in the launch template. + // + // [Use a Systems Manager parameter instead of an AMI ID]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-launch-template.html#use-an-ssm-parameter-instead-of-an-ami-id ImageId *string // The attributes for the instance types. When you specify instance attributes, @@ -4774,9 +4803,38 @@ type FleetLaunchTemplateOverridesRequest struct { // The Availability Zone in which to launch the instances. AvailabilityZone *string - // The ID of the AMI. An AMI is required to launch an instance. This parameter is - // only available for fleets of type instant . For fleets of type maintain and - // request , you must specify the AMI ID in the launch template. + // The ID of the AMI in the format ami-17characters00000 . + // + // Alternatively, you can specify a Systems Manager parameter, using one of the + // following formats. The Systems Manager parameter will resolve to an AMI ID on + // launch. + // + // To reference a public parameter: + // + // - resolve:ssm:public-parameter + // + // To reference a parameter stored in the same account: + // + // - resolve:ssm:parameter-name + // + // - resolve:ssm:parameter-name:version-number + // + // - resolve:ssm:parameter-name:label + // + // To reference a parameter shared from another Amazon Web Services account: + // + // - resolve:ssm:parameter-ARN + // + // - resolve:ssm:parameter-ARN:version-number + // + // - resolve:ssm:parameter-ARN:label + // + // For more information, see [Use a Systems Manager parameter instead of an AMI ID] in the Amazon EC2 User Guide. + // + // This parameter is only available for fleets of type instant . For fleets of type + // maintain and request , you must specify the AMI ID in the launch template. + // + // [Use a Systems Manager parameter instead of an AMI ID]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-launch-template.html#use-an-ssm-parameter-instead-of-an-ami-id ImageId *string // The attributes for the instance types. When you specify instance attributes, @@ -13681,12 +13739,17 @@ type RequestLaunchTemplateData struct { // The name or Amazon Resource Name (ARN) of an IAM instance profile. IamInstanceProfile *LaunchTemplateIamInstanceProfileSpecificationRequest - // The ID of the AMI. Alternatively, you can specify a Systems Manager parameter, - // which will resolve to an AMI ID on launch. + // The ID of the AMI in the format ami-17characters00000 . // - // Valid formats: + // Alternatively, you can specify a Systems Manager parameter, using one of the + // following formats. The Systems Manager parameter will resolve to an AMI ID on + // launch. // - // - ami-17characters00000 + // To reference a public parameter: + // + // - resolve:ssm:public-parameter + // + // To reference a parameter stored in the same account: // // - resolve:ssm:parameter-name // @@ -13694,14 +13757,25 @@ type RequestLaunchTemplateData struct { // // - resolve:ssm:parameter-name:label // - // - resolve:ssm:public-parameter + // To reference a parameter shared from another Amazon Web Services account: // - // Currently, EC2 Fleet and Spot Fleet do not support specifying a Systems Manager - // parameter. If the launch template will be used by an EC2 Fleet or Spot Fleet, - // you must specify the AMI ID. + // - resolve:ssm:parameter-ARN + // + // - resolve:ssm:parameter-ARN:version-number + // + // - resolve:ssm:parameter-ARN:label // // For more information, see [Use a Systems Manager parameter instead of an AMI ID] in the Amazon EC2 User Guide. // + // If the launch template will be used for an EC2 Fleet or Spot Fleet, note the + // following: + // + // - Only EC2 Fleets of type instant support specifying a Systems Manager + // parameter. + // + // - For EC2 Fleets of type maintain or request , or for Spot Fleets, you must + // specify the AMI ID. + // // [Use a Systems Manager parameter instead of an AMI ID]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-launch-template.html#use-an-ssm-parameter-instead-of-an-ami-id ImageId *string diff --git a/vendor/modules.txt b/vendor/modules.txt index 8cbe8506..70621d5a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -62,7 +62,7 @@ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 # github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/internal/ini -# github.com/aws/aws-sdk-go-v2/service/ec2 v1.171.0 +# github.com/aws/aws-sdk-go-v2/service/ec2 v1.173.0 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/service/ec2 github.com/aws/aws-sdk-go-v2/service/ec2/internal/endpoints