From 0903335751bf0a1c5f6140116f0f8a9a634f0066 Mon Sep 17 00:00:00 2001 From: yorinasub17 <430092+yorinasub17@users.noreply.github.com> Date: Fri, 12 Nov 2021 13:25:09 -0600 Subject: [PATCH 1/2] EKS is now supported in all regions --- aws/aws.go | 16 +++++++--------- aws/eks.go | 24 ------------------------ aws/eks_test.go | 14 -------------- 3 files changed, 7 insertions(+), 47 deletions(-) diff --git a/aws/aws.go b/aws/aws.go index 71313221..74795b47 100644 --- a/aws/aws.go +++ b/aws/aws.go @@ -469,15 +469,13 @@ func GetAllResources(targetRegions []string, excludeAfter time.Time, resourceTyp // EKS resources eksClusters := EKSClusters{} if IsNukeable(eksClusters.ResourceName(), resourceTypes) { - if eksSupportedRegion(region) { - eksClusterNames, err := getAllEksClusters(session, excludeAfter) - if err != nil { - return nil, errors.WithStackTrace(err) - } - if len(eksClusterNames) > 0 { - eksClusters.Clusters = awsgo.StringValueSlice(eksClusterNames) - resourcesInRegion.Resources = append(resourcesInRegion.Resources, eksClusters) - } + eksClusterNames, err := getAllEksClusters(session, excludeAfter) + if err != nil { + return nil, errors.WithStackTrace(err) + } + if len(eksClusterNames) > 0 { + eksClusters.Clusters = awsgo.StringValueSlice(eksClusterNames) + resourcesInRegion.Resources = append(resourcesInRegion.Resources, eksClusters) } } // End EKS resources diff --git a/aws/eks.go b/aws/eks.go index 9f254d7a..d5cca3a8 100644 --- a/aws/eks.go +++ b/aws/eks.go @@ -6,33 +6,9 @@ import ( "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/eks" "github.com/gruntwork-io/cloud-nuke/logging" - "github.com/gruntwork-io/go-commons/collections" "github.com/gruntwork-io/go-commons/errors" ) -// The regions that support EKS. Refer to -// https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/ -var eksRegions = []string{ - "us-east-1", - "us-east-2", - "us-west-2", - "eu-central-1", - "eu-west-1", - "eu-west-2", - "eu-west-3", - "eu-north-1", - "ap-southeast-1", - "ap-southeast-2", - "ap-northeast-1", - "ap-northeast-2", - "ap-south-1", -} - -// eksSupportedRegion returns true if the provided region supports EKS -func eksSupportedRegion(region string) bool { - return collections.ListContainsElement(eksRegions, region) -} - // getAllEksClusters returns a list of strings of EKS Cluster Names that uniquely identify each cluster. func getAllEksClusters(awsSession *session.Session, excludeAfter time.Time) ([]*string, error) { svc := eks.New(awsSession) diff --git a/aws/eks_test.go b/aws/eks_test.go index 225841e6..cb8cc28c 100644 --- a/aws/eks_test.go +++ b/aws/eks_test.go @@ -67,17 +67,3 @@ func TestNukeEksClusters(t *testing.T) { require.NoError(t, err) assert.NotContains(t, awsgo.StringValueSlice(eksClusterNames), *cluster.Name) } - -// Test that eksSupportedRegions allows the EKS regions but not the regions that don't -func TestEksSupportedRegions(t *testing.T) { - unsupportedRegions := []string{ - "us-west-1", - "ca-central-1", - } - for _, region := range unsupportedRegions { - assert.False(t, eksSupportedRegion(region)) - } - for _, region := range eksRegions { - assert.True(t, eksSupportedRegion(region)) - } -} From 0f41c873268e611648b0ef9468a6db9fe1a2c4e0 Mon Sep 17 00:00:00 2001 From: yorinasub17 <430092+yorinasub17@users.noreply.github.com> Date: Fri, 12 Nov 2021 17:40:30 -0600 Subject: [PATCH 2/2] Add ability to nuke EKS compute resources --- aws/eks.go | 183 +++++- aws/eks_test.go | 70 ++- aws/eks_types.go | 5 +- aws/eks_utils_for_test.go | 230 ++++++- aws/mocks/EC2API.go | 1189 ++++++++++++++++++++++++++++++++++++- go.mod | 2 +- go.sum | 11 +- 7 files changed, 1648 insertions(+), 42 deletions(-) diff --git a/aws/eks.go b/aws/eks.go index d5cca3a8..976428a8 100644 --- a/aws/eks.go +++ b/aws/eks.go @@ -1,12 +1,15 @@ package aws import ( + "sync" "time" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/eks" "github.com/gruntwork-io/cloud-nuke/logging" "github.com/gruntwork-io/go-commons/errors" + "github.com/hashicorp/go-multierror" ) // getAllEksClusters returns a list of strings of EKS Cluster Names that uniquely identify each cluster. @@ -42,19 +45,137 @@ func filterOutRecentEksClusters(svc *eks.EKS, clusterNames []*string, excludeAft return filteredEksClusterNames, nil } -// deleteEksClusters deletes all clusters requested. Returns a list of cluster names that have been accepted by AWS -// for deletion. -func deleteEksClusters(svc *eks.EKS, eksClusterNames []*string) []*string { - var requestedDeletes []*string - for _, eksClusterName := range eksClusterNames { - _, err := svc.DeleteCluster(&eks.DeleteClusterInput{Name: eksClusterName}) +// deleteEKSClusterAsync deletes the provided EKS Cluster asynchronously in a goroutine, using wait groups for +// concurrency control and a return channel for errors. Note that this routine attempts to delete all managed compute +// resources associated with the EKS cluster (Managed Node Groups and Fargate Profiles). +func deleteEKSClusterAsync(wg *sync.WaitGroup, errChan chan error, svc *eks.EKS, eksClusterName string) { + defer wg.Done() + + // Aggregate errors for each subresource being deleted + var allSubResourceErrs error + + // Since deleting node groups can take some time, we first schedule the deletion of them, and then move on to + // deleting the Fargate profiles so that they can be done in parallel, before waiting for the node groups to be + // deleted. + deletedNodeGroups, err := scheduleDeleteEKSClusterManagedNodeGroup(svc, eksClusterName) + if err != nil { + allSubResourceErrs = multierror.Append(allSubResourceErrs, err) + } + + if err := deleteEKSClusterFargateProfiles(svc, eksClusterName); err != nil { + allSubResourceErrs = multierror.Append(allSubResourceErrs, err) + } + + // Make sure the node groups are actually deleted before returning. + for _, nodeGroup := range deletedNodeGroups { + err := svc.WaitUntilNodegroupDeleted(&eks.DescribeNodegroupInput{ + ClusterName: aws.String(eksClusterName), + NodegroupName: nodeGroup, + }) + if err != nil { + logging.Logger.Errorf("[Failed] Failed waiting for Node Group %s associated with cluster %s to be deleted: %s", aws.StringValue(nodeGroup), eksClusterName, err) + allSubResourceErrs = multierror.Append(allSubResourceErrs, err) + } else { + logging.Logger.Infof("Deleted Node Group %s associated with cluster %s", aws.StringValue(nodeGroup), eksClusterName) + } + } + if allSubResourceErrs != nil { + errChan <- allSubResourceErrs + return + } + + // At this point, all the sub resources of the EKS cluster has been confirmed to be deleted, so we can go ahead to + // request to delete the EKS cluster. + _, deleteErr := svc.DeleteCluster(&eks.DeleteClusterInput{Name: aws.String(eksClusterName)}) + if deleteErr != nil { + logging.Logger.Errorf("[Failed] Failed deleting EKS cluster %s: %s", eksClusterName, deleteErr) + } + errChan <- deleteErr +} + +// scheduleDeleteEKSClusterManagedNodeGroup looks up all the associated Managed Node Group resources on the EKS cluster +// and requests each one to be deleted. Note that this function will not wait for the Node Groups to be deleted. This +// will return the list of Node Groups that were successfully scheduled for deletion. +func scheduleDeleteEKSClusterManagedNodeGroup(svc *eks.EKS, eksClusterName string) ([]*string, error) { + allNodeGroups := []*string{} + err := svc.ListNodegroupsPages( + &eks.ListNodegroupsInput{ClusterName: aws.String(eksClusterName)}, + func(page *eks.ListNodegroupsOutput, lastPage bool) bool { + allNodeGroups = append(allNodeGroups, page.Nodegroups...) + return !lastPage + }, + ) + if err != nil { + return nil, err + } + + // Since there isn't a bulk node group delete, we make the requests to delete node groups in a tight loop. This + // doesn't implement pagination or throttling because the assumption is that the EKS Clusters being deleted by + // cloud-nuke should be fairly small due to its use case. We can improve this if anyone runs into scalability + // issues with this implementation. + var allDeleteErrs error + deletedNodeGroups := []*string{} + for _, nodeGroup := range allNodeGroups { + _, err := svc.DeleteNodegroup(&eks.DeleteNodegroupInput{ + ClusterName: aws.String(eksClusterName), + NodegroupName: nodeGroup, + }) if err != nil { - logging.Logger.Errorf("[Failed] Failed deleting EKS cluster %s: %s", *eksClusterName, err) + logging.Logger.Errorf("[Failed] Failed deleting Node Group %s associated with cluster %s: %s", aws.StringValue(nodeGroup), eksClusterName, err) + allDeleteErrs = multierror.Append(allDeleteErrs, err) } else { - requestedDeletes = append(requestedDeletes, eksClusterName) + deletedNodeGroups = append(deletedNodeGroups, nodeGroup) } } - return requestedDeletes + return deletedNodeGroups, allDeleteErrs +} + +// deleteEKSClusterFargateProfiles looks up all the associated Fargate Profile resources on the EKS cluster and requests +// each one to be deleted. Since only one Fargate Profile can be deleted at a time, this function will wait until the +// Fargate Profile is actually deleted for each one before moving on to the next one. +func deleteEKSClusterFargateProfiles(svc *eks.EKS, eksClusterName string) error { + allFargateProfiles := []*string{} + err := svc.ListFargateProfilesPages( + &eks.ListFargateProfilesInput{ClusterName: aws.String(eksClusterName)}, + func(page *eks.ListFargateProfilesOutput, lastPage bool) bool { + allFargateProfiles = append(allFargateProfiles, page.FargateProfileNames...) + return !lastPage + }, + ) + if err != nil { + return err + } + + // We can't delete Fargate profiles in parallel, so we delete them sequentially, waiting until the profile has been + // deleted before moving on to the next one. This will make the delete routine very slow, but unfortunately, there + // is no other alternative. + // See https://docs.aws.amazon.com/eks/latest/APIReference/API_DeleteFargateProfile.html for more info on the serial + // requirement. + // Note that we aggregate deletion errors so that we at least attempt to delete all of them once. + var allDeleteErrs error + for _, fargateProfile := range allFargateProfiles { + _, err := svc.DeleteFargateProfile(&eks.DeleteFargateProfileInput{ + ClusterName: aws.String(eksClusterName), + FargateProfileName: fargateProfile, + }) + if err != nil { + logging.Logger.Errorf("[Failed] Failed deleting Fargate Profile %s associated with cluster %s: %s", aws.StringValue(fargateProfile), eksClusterName, err) + allDeleteErrs = multierror.Append(allDeleteErrs, err) + continue + } + + waitErr := svc.WaitUntilFargateProfileDeleted(&eks.DescribeFargateProfileInput{ + ClusterName: aws.String(eksClusterName), + FargateProfileName: fargateProfile, + }) + if waitErr != nil { + logging.Logger.Errorf("[Failed] Failed waiting for Fargate Profile %s associated with cluster %s to be deleted: %s", aws.StringValue(fargateProfile), eksClusterName, waitErr) + allDeleteErrs = multierror.Append(allDeleteErrs, waitErr) + } else { + logging.Logger.Infof("Deleted Fargate Profile %s associated with cluster %s", aws.StringValue(fargateProfile), eksClusterName) + } + } + return allDeleteErrs } // waitUntilEksClustersDeleted waits until the EKS cluster has been actually deleted from AWS. Returns a list of EKS @@ -66,7 +187,7 @@ func waitUntilEksClustersDeleted(svc *eks.EKS, eksClusterNames []*string) []*str if err != nil { logging.Logger.Errorf("[Failed] Failed waiting for EKS cluster to be deleted %s: %s", *eksClusterName, err) } else { - logging.Logger.Infof("Deleted EKS cluster: %s", *eksClusterName) + logging.Logger.Infof("Deleted EKS cluster: %s", aws.StringValue(eksClusterName)) successfullyDeleted = append(successfullyDeleted, eksClusterName) } } @@ -83,13 +204,51 @@ func nukeAllEksClusters(awsSession *session.Session, eksClusterNames []*string) return nil } + // NOTE: we don't need to do pagination here, because the pagination is handled by the caller to this function, + // based on EKSCluster.MaxBatchSize, however we add a guard here to warn users when the batching fails and has a + // chance of throttling AWS. Since we concurrently make one call for each identifier, we pick 100 for the limit here + // because many APIs in AWS have a limit of 100 requests per second. + if numNuking > 100 { + logging.Logger.Errorf("Nuking too many EKS Clusters at once (100): halting to avoid hitting AWS API rate limiting") + return TooManyEKSClustersErr{} + } + + // We need to delete subresources associated with the EKS Cluster before being able to delete the cluster, so we + // spawn goroutines to drive the deletion of each EKS cluster. logging.Logger.Infof("Deleting %d EKS clusters in region %s", numNuking, *awsSession.Config.Region) + wg := new(sync.WaitGroup) + wg.Add(numNuking) + errChans := make([]chan error, numNuking) + for i, eksClusterName := range eksClusterNames { + errChans[i] = make(chan error, 1) + go deleteEKSClusterAsync(wg, errChans[i], svc, aws.StringValue(eksClusterName)) + } + wg.Wait() - requestedDeletes := deleteEksClusters(svc, eksClusterNames) - successfullyDeleted := waitUntilEksClustersDeleted(svc, requestedDeletes) + // Collect all the errors from the async delete calls into a single error struct. + var allErrs *multierror.Error + for _, errChan := range errChans { + if err := <-errChan; err != nil { + allErrs = multierror.Append(allErrs, err) + logging.Logger.Errorf("[Failed] %s", err) + } + } + finalErr := allErrs.ErrorOrNil() + if finalErr != nil { + return errors.WithStackTrace(finalErr) + } + // Now wait until the EKS Clusters are deleted + successfullyDeleted := waitUntilEksClustersDeleted(svc, eksClusterNames) numNuked := len(successfullyDeleted) logging.Logger.Infof("[OK] %d of %d EKS cluster(s) deleted in %s", numNuked, numNuking, *awsSession.Config.Region) return nil +} + +// Custom errors + +type TooManyEKSClustersErr struct{} +func (err TooManyEKSClustersErr) Error() string { + return "Too many EKS Clusters requested at once." } diff --git a/aws/eks_test.go b/aws/eks_test.go index cb8cc28c..f2ef5399 100644 --- a/aws/eks_test.go +++ b/aws/eks_test.go @@ -1,12 +1,14 @@ package aws import ( + "sync" "testing" "time" awsgo "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/gruntwork-io/cloud-nuke/util" + "github.com/gruntwork-io/terratest/modules/logger" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -16,7 +18,9 @@ import ( func TestListEksClusters(t *testing.T) { t.Parallel() - region := getRandomEksSupportedRegion(t) + region, err := getRandomRegion() + require.NoError(t, err) + awsSession, err := session.NewSession(&awsgo.Config{ Region: awsgo.String(region), }) @@ -24,10 +28,10 @@ func TestListEksClusters(t *testing.T) { uniqueID := util.UniqueID() - role := createEksClusterRole(t, awsSession, uniqueID) + role := createEKSClusterRole(t, awsSession, uniqueID) defer deleteRole(awsSession, role) - cluster := createEksCluster(t, awsSession, uniqueID, *role.Arn) + cluster := createEKSCluster(t, awsSession, uniqueID, *role.Arn) defer nukeAllEksClusters(awsSession, []*string{cluster.Name}) eksClusterNames, err := getAllEksClusters(awsSession, time.Now().Add(1*time.Hour*-1)) @@ -48,7 +52,9 @@ func TestListEksClusters(t *testing.T) { func TestNukeEksClusters(t *testing.T) { t.Parallel() - region := getRandomEksSupportedRegion(t) + region, err := getRandomRegion() + require.NoError(t, err) + awsSession, err := session.NewSession(&awsgo.Config{ Region: awsgo.String(region), }) @@ -56,10 +62,62 @@ func TestNukeEksClusters(t *testing.T) { uniqueID := util.UniqueID() - role := createEksClusterRole(t, awsSession, uniqueID) + role := createEKSClusterRole(t, awsSession, uniqueID) defer deleteRole(awsSession, role) - cluster := createEksCluster(t, awsSession, uniqueID, *role.Arn) + cluster := createEKSCluster(t, awsSession, uniqueID, *role.Arn) + err = nukeAllEksClusters(awsSession, []*string{cluster.Name}) + require.NoError(t, err) + + eksClusterNames, err := getAllEksClusters(awsSession, time.Now().Add(1*time.Hour)) + require.NoError(t, err) + assert.NotContains(t, awsgo.StringValueSlice(eksClusterNames), *cluster.Name) +} + +// Test that we can successfully nuke EKS clusters with Node Groups and Fargate Profiles. +func TestNukeEksClustersWithCompute(t *testing.T) { + t.Parallel() + + region, err := getRandomRegion() + require.NoError(t, err) + + awsSession, err := session.NewSession(&awsgo.Config{ + Region: awsgo.String(region), + }) + require.NoError(t, err) + + uniqueID := util.UniqueID() + + privateSubnet, err := createPrivateSubnetE(t, awsSession) + defer deletePrivateSubnet(t, awsSession, privateSubnet) + require.NoError(t, err) + logger.Logf(t, "Created subnet %s in default VPC", awsgo.StringValue(privateSubnet.subnetID)) + + role := createEKSClusterRole(t, awsSession, uniqueID) + defer deleteRole(awsSession, role) + podRole := createEKSClusterPodExecutionRole(t, awsSession, uniqueID) + defer deleteRole(awsSession, podRole) + nodegroupRole := createEKSNodeGroupRole(t, awsSession, uniqueID) + defer deleteRole(awsSession, nodegroupRole) + + logger.Logf(t, "Creating test EKS cluster (this may take a while)") + cluster := createEKSCluster(t, awsSession, uniqueID, awsgo.StringValue(role.Arn)) + + // Concurrently provision fargate profile and node group as both take time to provision + wg := new(sync.WaitGroup) + wg.Add(2) + go func() { + defer wg.Done() + logger.Logf(t, "Creating test Fargate Profile (this may take a while)") + createEKSFargateProfile(t, awsSession, cluster.Name, uniqueID, podRole.Arn, privateSubnet) + }() + go func() { + defer wg.Done() + logger.Logf(t, "Creating test Node Group (this may take a while)") + createEKSNodeGroup(t, awsSession, cluster.Name, uniqueID, nodegroupRole.Arn) + }() + wg.Wait() + err = nukeAllEksClusters(awsSession, []*string{cluster.Name}) require.NoError(t, err) diff --git a/aws/eks_types.go b/aws/eks_types.go index 87cf3464..3871b934 100644 --- a/aws/eks_types.go +++ b/aws/eks_types.go @@ -22,7 +22,10 @@ func (clusters EKSClusters) ResourceIdentifiers() []string { } func (clusters EKSClusters) MaxBatchSize() int { - return 200 + // Tentative batch size to ensure AWS doesn't throttle. Note that deleting EKS clusters involves deleting many + // associated sub resources in tight loops, and they happen in parallel in go routines. We conservatively pick 10 + // here, both to limit overloading the runtime and to avoid AWS throttling with many API calls. + return 10 } // Nuke - nuke all EKS Cluster resources diff --git a/aws/eks_utils_for_test.go b/aws/eks_utils_for_test.go index 5800fa5e..389876c8 100644 --- a/aws/eks_utils_for_test.go +++ b/aws/eks_utils_for_test.go @@ -7,27 +7,28 @@ import ( awsgo "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/eks" "github.com/aws/aws-sdk-go/service/iam" gruntworkerrors "github.com/gruntwork-io/go-commons/errors" - terraAws "github.com/gruntwork-io/terratest/modules/aws" + terraws "github.com/gruntwork-io/terratest/modules/aws" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) -// getRandomEksSupportedRegion - Returns a random AWS region that supports EKS. -// Refer to https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/ -func getRandomEksSupportedRegion(t *testing.T) string { - return terraAws.GetRandomRegion(t, eksRegions, []string{}) +type privateSubnet struct { + routeTableID *string + subnetID *string + routeTableAssociationID *string } -func createEksCluster( +func createEKSCluster( t *testing.T, awsSession *session.Session, - randomId string, + randomID string, roleArn string, ) eks.Cluster { - clusterName := fmt.Sprintf("cloud-nuke-%s-%s", t.Name(), randomId) + clusterName := fmt.Sprintf("cloud-nuke-%s-%s", t.Name(), randomID) subnet1, subnet2 := getSubnetsInDifferentAZs(t, awsSession) svc := eks.New(awsSession) @@ -48,15 +49,71 @@ func createEksCluster( return *result.Cluster } -func createEksClusterRole( +func createEKSFargateProfile( t *testing.T, awsSession *session.Session, - randomId string, -) iam.Role { - roleName := fmt.Sprintf("cloud-nuke-%s-%s", t.Name(), randomId) + clusterName *string, + randomID string, + podExecutionRoleArn *string, + subnet privateSubnet, +) { + name := awsgo.String("cloud-nuke") + svc := eks.New(awsSession) + input := &eks.CreateFargateProfileInput{ + ClientRequestToken: awsgo.String(randomID), + ClusterName: clusterName, + FargateProfileName: name, + PodExecutionRoleArn: podExecutionRoleArn, + Selectors: []*eks.FargateProfileSelector{ + &eks.FargateProfileSelector{Namespace: awsgo.String("default")}, + }, + Subnets: []*string{subnet.subnetID}, + } + _, err := svc.CreateFargateProfile(input) + require.NoError(t, err) + require.NoError( + t, + svc.WaitUntilFargateProfileActive(&eks.DescribeFargateProfileInput{ + ClusterName: clusterName, + FargateProfileName: name, + }), + ) +} + +func createEKSNodeGroup( + t *testing.T, + awsSession *session.Session, + clusterName *string, + randomID string, + nodeGroupRole *string, +) { + subnet1, subnet2 := getSubnetsInDifferentAZs(t, awsSession) + + name := awsgo.String("cloud-nuke") + svc := eks.New(awsSession) + input := &eks.CreateNodegroupInput{ + ClusterName: clusterName, + AmiType: awsgo.String("AL2_x86_64"), + NodegroupName: name, + NodeRole: nodeGroupRole, + Subnets: []*string{subnet1.SubnetId, subnet2.SubnetId}, + } + _, err := svc.CreateNodegroup(input) + require.NoError(t, err) + require.NoError( + t, + svc.WaitUntilNodegroupActive(&eks.DescribeNodegroupInput{ + ClusterName: clusterName, + NodegroupName: name, + }), + ) +} + +func createEKSClusterRole(t *testing.T, awsSession *session.Session, randomID string) iam.Role { + roleName := fmt.Sprintf("cloud-nuke-%s-%s", t.Name(), randomID) svc := iam.New(awsSession) createRoleParams := &iam.CreateRoleInput{ - AssumeRolePolicyDocument: awsgo.String(EKS_ASSUME_ROLE_POLICY), + AssumeRolePolicyDocument: awsgo.String(eksAssumeRolePolicy), RoleName: awsgo.String(roleName), } result, err := svc.CreateRole(createRoleParams) @@ -73,6 +130,46 @@ func createEksClusterRole( return *result.Role } +func createEKSNodeGroupRole(t *testing.T, awsSession *session.Session, randomID string) iam.Role { + roleName := fmt.Sprintf("cloud-nuke-%s-ng-%s", t.Name(), randomID) + svc := iam.New(awsSession) + createRoleParams := &iam.CreateRoleInput{ + AssumeRolePolicyDocument: awsgo.String(eksNodeGroupAssumeRolePolicy), + RoleName: awsgo.String(roleName), + } + result, err := svc.CreateRole(createRoleParams) + if err != nil { + assert.Fail(t, gruntworkerrors.WithStackTrace(err).Error()) + } + attachRolePolicy(t, svc, roleName, "arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy") + attachRolePolicy(t, svc, roleName, "arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy") + attachRolePolicy(t, svc, roleName, "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly") + + // IAM resources are slow to propagate, so give it some + // time + time.Sleep(15 * time.Second) + + return *result.Role +} + +func createEKSClusterPodExecutionRole(t *testing.T, awsSession *session.Session, randomID string) iam.Role { + roleName := fmt.Sprintf("cloud-nuke-%s-fargate-%s", t.Name(), randomID) + svc := iam.New(awsSession) + createRoleParams := &iam.CreateRoleInput{ + AssumeRolePolicyDocument: awsgo.String(eksFargateAssumeRolePolicy), + RoleName: awsgo.String(roleName), + } + result, err := svc.CreateRole(createRoleParams) + if err != nil { + assert.Fail(t, gruntworkerrors.WithStackTrace(err).Error()) + } + // IAM resources are slow to propagate, so give it some + // time + time.Sleep(15 * time.Second) + + return *result.Role +} + func attachRolePolicy(t *testing.T, svc *iam.IAM, roleName string, policyArn string) { attachRolePolicyParams := &iam.AttachRolePolicyInput{ RoleName: awsgo.String(roleName), @@ -84,7 +181,86 @@ func attachRolePolicy(t *testing.T, svc *iam.IAM, roleName string, policyArn str } } -const EKS_ASSUME_ROLE_POLICY = `{ +// createPrivateSubnetE will create a private subnet into the default VPC. To create a private subnet, we need to first +// create a route table that has no internet gateway associated with it. This function will return the RouteTable and +// Subnet that it creates so that it can be deleted later. This returns the error so that we can cleanup any partial +// resources that are created if downstream resources error. +func createPrivateSubnetE(t *testing.T, session *session.Session) (privateSubnet, error) { + subnet := privateSubnet{} + svc := ec2.New(session) + defaultVPC := terraws.GetDefaultVpc(t, awsgo.StringValue(session.Config.Region)) + + subnetName := fmt.Sprintf("cloud-nuke-%s", t.Name()) + nameTags := []*ec2.Tag{ + { + Key: awsgo.String("Name"), + Value: awsgo.String(subnetName), + }, + } + + createRouteTableOutput, err := svc.CreateRouteTable(&ec2.CreateRouteTableInput{ + VpcId: awsgo.String(defaultVPC.Id), + TagSpecifications: []*ec2.TagSpecification{ + { + ResourceType: awsgo.String("route-table"), + Tags: nameTags, + }, + }, + }) + if err != nil { + return subnet, err + } + subnet.routeTableID = createRouteTableOutput.RouteTable.RouteTableId + + createSubnetOutput, err := svc.CreateSubnet(&ec2.CreateSubnetInput{ + CidrBlock: awsgo.String("172.31.172.0/24"), + VpcId: awsgo.String(defaultVPC.Id), + TagSpecifications: []*ec2.TagSpecification{ + { + ResourceType: awsgo.String("subnet"), + Tags: nameTags, + }, + }, + }) + if err != nil { + return subnet, err + } + subnet.subnetID = createSubnetOutput.Subnet.SubnetId + + associateRouteTableOutput, err := svc.AssociateRouteTable(&ec2.AssociateRouteTableInput{ + RouteTableId: subnet.routeTableID, + SubnetId: subnet.subnetID, + }) + if err == nil { + subnet.routeTableAssociationID = associateRouteTableOutput.AssociationId + } + return subnet, err +} + +// deletePrivateSubnet deletes the subnet and associated private route table for the VPC. +func deletePrivateSubnet(t *testing.T, session *session.Session, subnet privateSubnet) { + svc := ec2.New(session) + if subnet.routeTableAssociationID != nil { + _, err := svc.DisassociateRouteTable(&ec2.DisassociateRouteTableInput{ + AssociationId: subnet.routeTableAssociationID, + }) + require.NoError(t, err) + } + if subnet.subnetID != nil { + _, err := svc.DeleteSubnet(&ec2.DeleteSubnetInput{ + SubnetId: subnet.subnetID, + }) + require.NoError(t, err) + } + if subnet.routeTableID != nil { + _, err := svc.DeleteRouteTable(&ec2.DeleteRouteTableInput{ + RouteTableId: subnet.routeTableID, + }) + require.NoError(t, err) + } +} + +const eksAssumeRolePolicy = `{ "Version": "2012-10-17", "Statement": [ { @@ -96,3 +272,29 @@ const EKS_ASSUME_ROLE_POLICY = `{ } ] }` + +const eksFargateAssumeRolePolicy = `{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "eks-fargate-pods.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] +}` + +const eksNodeGroupAssumeRolePolicy = `{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "ec2.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] +}` diff --git a/aws/mocks/EC2API.go b/aws/mocks/EC2API.go index f8e3f0e6..0a6b0a41 100644 --- a/aws/mocks/EC2API.go +++ b/aws/mocks/EC2API.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: /Users/yoriy/go/pkg/mod/github.com/aws/aws-sdk-go@v1.38.68/service/ec2/ec2iface/interface.go +// Source: vendor/github.com/aws/aws-sdk-go/service/ec2/ec2iface/interface.go // Package mock_ec2iface is a generated GoMock package. package mock_ec2iface @@ -886,6 +886,56 @@ func (mr *MockEC2APIMockRecorder) AssociateIamInstanceProfileWithContext(arg0, a return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssociateIamInstanceProfileWithContext", reflect.TypeOf((*MockEC2API)(nil).AssociateIamInstanceProfileWithContext), varargs...) } +// AssociateInstanceEventWindow mocks base method. +func (m *MockEC2API) AssociateInstanceEventWindow(arg0 *ec2.AssociateInstanceEventWindowInput) (*ec2.AssociateInstanceEventWindowOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AssociateInstanceEventWindow", arg0) + ret0, _ := ret[0].(*ec2.AssociateInstanceEventWindowOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AssociateInstanceEventWindow indicates an expected call of AssociateInstanceEventWindow. +func (mr *MockEC2APIMockRecorder) AssociateInstanceEventWindow(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssociateInstanceEventWindow", reflect.TypeOf((*MockEC2API)(nil).AssociateInstanceEventWindow), arg0) +} + +// AssociateInstanceEventWindowRequest mocks base method. +func (m *MockEC2API) AssociateInstanceEventWindowRequest(arg0 *ec2.AssociateInstanceEventWindowInput) (*request.Request, *ec2.AssociateInstanceEventWindowOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AssociateInstanceEventWindowRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*ec2.AssociateInstanceEventWindowOutput) + return ret0, ret1 +} + +// AssociateInstanceEventWindowRequest indicates an expected call of AssociateInstanceEventWindowRequest. +func (mr *MockEC2APIMockRecorder) AssociateInstanceEventWindowRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssociateInstanceEventWindowRequest", reflect.TypeOf((*MockEC2API)(nil).AssociateInstanceEventWindowRequest), arg0) +} + +// AssociateInstanceEventWindowWithContext mocks base method. +func (m *MockEC2API) AssociateInstanceEventWindowWithContext(arg0 aws.Context, arg1 *ec2.AssociateInstanceEventWindowInput, arg2 ...request.Option) (*ec2.AssociateInstanceEventWindowOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AssociateInstanceEventWindowWithContext", varargs...) + ret0, _ := ret[0].(*ec2.AssociateInstanceEventWindowOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AssociateInstanceEventWindowWithContext indicates an expected call of AssociateInstanceEventWindowWithContext. +func (mr *MockEC2APIMockRecorder) AssociateInstanceEventWindowWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssociateInstanceEventWindowWithContext", reflect.TypeOf((*MockEC2API)(nil).AssociateInstanceEventWindowWithContext), varargs...) +} + // AssociateRouteTable mocks base method. func (m *MockEC2API) AssociateRouteTable(arg0 *ec2.AssociateRouteTableInput) (*ec2.AssociateRouteTableOutput, error) { m.ctrl.T.Helper() @@ -1701,6 +1751,56 @@ func (mr *MockEC2APIMockRecorder) CancelCapacityReservation(arg0 interface{}) *g return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelCapacityReservation", reflect.TypeOf((*MockEC2API)(nil).CancelCapacityReservation), arg0) } +// CancelCapacityReservationFleets mocks base method. +func (m *MockEC2API) CancelCapacityReservationFleets(arg0 *ec2.CancelCapacityReservationFleetsInput) (*ec2.CancelCapacityReservationFleetsOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CancelCapacityReservationFleets", arg0) + ret0, _ := ret[0].(*ec2.CancelCapacityReservationFleetsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CancelCapacityReservationFleets indicates an expected call of CancelCapacityReservationFleets. +func (mr *MockEC2APIMockRecorder) CancelCapacityReservationFleets(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelCapacityReservationFleets", reflect.TypeOf((*MockEC2API)(nil).CancelCapacityReservationFleets), arg0) +} + +// CancelCapacityReservationFleetsRequest mocks base method. +func (m *MockEC2API) CancelCapacityReservationFleetsRequest(arg0 *ec2.CancelCapacityReservationFleetsInput) (*request.Request, *ec2.CancelCapacityReservationFleetsOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CancelCapacityReservationFleetsRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*ec2.CancelCapacityReservationFleetsOutput) + return ret0, ret1 +} + +// CancelCapacityReservationFleetsRequest indicates an expected call of CancelCapacityReservationFleetsRequest. +func (mr *MockEC2APIMockRecorder) CancelCapacityReservationFleetsRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelCapacityReservationFleetsRequest", reflect.TypeOf((*MockEC2API)(nil).CancelCapacityReservationFleetsRequest), arg0) +} + +// CancelCapacityReservationFleetsWithContext mocks base method. +func (m *MockEC2API) CancelCapacityReservationFleetsWithContext(arg0 aws.Context, arg1 *ec2.CancelCapacityReservationFleetsInput, arg2 ...request.Option) (*ec2.CancelCapacityReservationFleetsOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CancelCapacityReservationFleetsWithContext", varargs...) + ret0, _ := ret[0].(*ec2.CancelCapacityReservationFleetsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CancelCapacityReservationFleetsWithContext indicates an expected call of CancelCapacityReservationFleetsWithContext. +func (mr *MockEC2APIMockRecorder) CancelCapacityReservationFleetsWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelCapacityReservationFleetsWithContext", reflect.TypeOf((*MockEC2API)(nil).CancelCapacityReservationFleetsWithContext), varargs...) +} + // CancelCapacityReservationRequest mocks base method. func (m *MockEC2API) CancelCapacityReservationRequest(arg0 *ec2.CancelCapacityReservationInput) (*request.Request, *ec2.CancelCapacityReservationOutput) { m.ctrl.T.Helper() @@ -2251,6 +2351,56 @@ func (mr *MockEC2APIMockRecorder) CreateCapacityReservation(arg0 interface{}) *g return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCapacityReservation", reflect.TypeOf((*MockEC2API)(nil).CreateCapacityReservation), arg0) } +// CreateCapacityReservationFleet mocks base method. +func (m *MockEC2API) CreateCapacityReservationFleet(arg0 *ec2.CreateCapacityReservationFleetInput) (*ec2.CreateCapacityReservationFleetOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateCapacityReservationFleet", arg0) + ret0, _ := ret[0].(*ec2.CreateCapacityReservationFleetOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateCapacityReservationFleet indicates an expected call of CreateCapacityReservationFleet. +func (mr *MockEC2APIMockRecorder) CreateCapacityReservationFleet(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCapacityReservationFleet", reflect.TypeOf((*MockEC2API)(nil).CreateCapacityReservationFleet), arg0) +} + +// CreateCapacityReservationFleetRequest mocks base method. +func (m *MockEC2API) CreateCapacityReservationFleetRequest(arg0 *ec2.CreateCapacityReservationFleetInput) (*request.Request, *ec2.CreateCapacityReservationFleetOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateCapacityReservationFleetRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*ec2.CreateCapacityReservationFleetOutput) + return ret0, ret1 +} + +// CreateCapacityReservationFleetRequest indicates an expected call of CreateCapacityReservationFleetRequest. +func (mr *MockEC2APIMockRecorder) CreateCapacityReservationFleetRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCapacityReservationFleetRequest", reflect.TypeOf((*MockEC2API)(nil).CreateCapacityReservationFleetRequest), arg0) +} + +// CreateCapacityReservationFleetWithContext mocks base method. +func (m *MockEC2API) CreateCapacityReservationFleetWithContext(arg0 aws.Context, arg1 *ec2.CreateCapacityReservationFleetInput, arg2 ...request.Option) (*ec2.CreateCapacityReservationFleetOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateCapacityReservationFleetWithContext", varargs...) + ret0, _ := ret[0].(*ec2.CreateCapacityReservationFleetOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateCapacityReservationFleetWithContext indicates an expected call of CreateCapacityReservationFleetWithContext. +func (mr *MockEC2APIMockRecorder) CreateCapacityReservationFleetWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCapacityReservationFleetWithContext", reflect.TypeOf((*MockEC2API)(nil).CreateCapacityReservationFleetWithContext), varargs...) +} + // CreateCapacityReservationRequest mocks base method. func (m *MockEC2API) CreateCapacityReservationRequest(arg0 *ec2.CreateCapacityReservationInput) (*request.Request, *ec2.CreateCapacityReservationOutput) { m.ctrl.T.Helper() @@ -2886,6 +3036,56 @@ func (mr *MockEC2APIMockRecorder) CreateImageWithContext(arg0, arg1 interface{}, return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateImageWithContext", reflect.TypeOf((*MockEC2API)(nil).CreateImageWithContext), varargs...) } +// CreateInstanceEventWindow mocks base method. +func (m *MockEC2API) CreateInstanceEventWindow(arg0 *ec2.CreateInstanceEventWindowInput) (*ec2.CreateInstanceEventWindowOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateInstanceEventWindow", arg0) + ret0, _ := ret[0].(*ec2.CreateInstanceEventWindowOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateInstanceEventWindow indicates an expected call of CreateInstanceEventWindow. +func (mr *MockEC2APIMockRecorder) CreateInstanceEventWindow(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInstanceEventWindow", reflect.TypeOf((*MockEC2API)(nil).CreateInstanceEventWindow), arg0) +} + +// CreateInstanceEventWindowRequest mocks base method. +func (m *MockEC2API) CreateInstanceEventWindowRequest(arg0 *ec2.CreateInstanceEventWindowInput) (*request.Request, *ec2.CreateInstanceEventWindowOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateInstanceEventWindowRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*ec2.CreateInstanceEventWindowOutput) + return ret0, ret1 +} + +// CreateInstanceEventWindowRequest indicates an expected call of CreateInstanceEventWindowRequest. +func (mr *MockEC2APIMockRecorder) CreateInstanceEventWindowRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInstanceEventWindowRequest", reflect.TypeOf((*MockEC2API)(nil).CreateInstanceEventWindowRequest), arg0) +} + +// CreateInstanceEventWindowWithContext mocks base method. +func (m *MockEC2API) CreateInstanceEventWindowWithContext(arg0 aws.Context, arg1 *ec2.CreateInstanceEventWindowInput, arg2 ...request.Option) (*ec2.CreateInstanceEventWindowOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateInstanceEventWindowWithContext", varargs...) + ret0, _ := ret[0].(*ec2.CreateInstanceEventWindowOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateInstanceEventWindowWithContext indicates an expected call of CreateInstanceEventWindowWithContext. +func (mr *MockEC2APIMockRecorder) CreateInstanceEventWindowWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInstanceEventWindowWithContext", reflect.TypeOf((*MockEC2API)(nil).CreateInstanceEventWindowWithContext), varargs...) +} + // CreateInstanceExportTask mocks base method. func (m *MockEC2API) CreateInstanceExportTask(arg0 *ec2.CreateInstanceExportTaskInput) (*ec2.CreateInstanceExportTaskOutput, error) { m.ctrl.T.Helper() @@ -4151,6 +4351,56 @@ func (mr *MockEC2APIMockRecorder) CreateSubnet(arg0 interface{}) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSubnet", reflect.TypeOf((*MockEC2API)(nil).CreateSubnet), arg0) } +// CreateSubnetCidrReservation mocks base method. +func (m *MockEC2API) CreateSubnetCidrReservation(arg0 *ec2.CreateSubnetCidrReservationInput) (*ec2.CreateSubnetCidrReservationOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateSubnetCidrReservation", arg0) + ret0, _ := ret[0].(*ec2.CreateSubnetCidrReservationOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateSubnetCidrReservation indicates an expected call of CreateSubnetCidrReservation. +func (mr *MockEC2APIMockRecorder) CreateSubnetCidrReservation(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSubnetCidrReservation", reflect.TypeOf((*MockEC2API)(nil).CreateSubnetCidrReservation), arg0) +} + +// CreateSubnetCidrReservationRequest mocks base method. +func (m *MockEC2API) CreateSubnetCidrReservationRequest(arg0 *ec2.CreateSubnetCidrReservationInput) (*request.Request, *ec2.CreateSubnetCidrReservationOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateSubnetCidrReservationRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*ec2.CreateSubnetCidrReservationOutput) + return ret0, ret1 +} + +// CreateSubnetCidrReservationRequest indicates an expected call of CreateSubnetCidrReservationRequest. +func (mr *MockEC2APIMockRecorder) CreateSubnetCidrReservationRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSubnetCidrReservationRequest", reflect.TypeOf((*MockEC2API)(nil).CreateSubnetCidrReservationRequest), arg0) +} + +// CreateSubnetCidrReservationWithContext mocks base method. +func (m *MockEC2API) CreateSubnetCidrReservationWithContext(arg0 aws.Context, arg1 *ec2.CreateSubnetCidrReservationInput, arg2 ...request.Option) (*ec2.CreateSubnetCidrReservationOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateSubnetCidrReservationWithContext", varargs...) + ret0, _ := ret[0].(*ec2.CreateSubnetCidrReservationOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateSubnetCidrReservationWithContext indicates an expected call of CreateSubnetCidrReservationWithContext. +func (mr *MockEC2APIMockRecorder) CreateSubnetCidrReservationWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSubnetCidrReservationWithContext", reflect.TypeOf((*MockEC2API)(nil).CreateSubnetCidrReservationWithContext), varargs...) +} + // CreateSubnetRequest mocks base method. func (m *MockEC2API) CreateSubnetRequest(arg0 *ec2.CreateSubnetInput) (*request.Request, *ec2.CreateSubnetOutput) { m.ctrl.T.Helper() @@ -5786,6 +6036,56 @@ func (mr *MockEC2APIMockRecorder) DeleteFpgaImageWithContext(arg0, arg1 interfac return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteFpgaImageWithContext", reflect.TypeOf((*MockEC2API)(nil).DeleteFpgaImageWithContext), varargs...) } +// DeleteInstanceEventWindow mocks base method. +func (m *MockEC2API) DeleteInstanceEventWindow(arg0 *ec2.DeleteInstanceEventWindowInput) (*ec2.DeleteInstanceEventWindowOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteInstanceEventWindow", arg0) + ret0, _ := ret[0].(*ec2.DeleteInstanceEventWindowOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteInstanceEventWindow indicates an expected call of DeleteInstanceEventWindow. +func (mr *MockEC2APIMockRecorder) DeleteInstanceEventWindow(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstanceEventWindow", reflect.TypeOf((*MockEC2API)(nil).DeleteInstanceEventWindow), arg0) +} + +// DeleteInstanceEventWindowRequest mocks base method. +func (m *MockEC2API) DeleteInstanceEventWindowRequest(arg0 *ec2.DeleteInstanceEventWindowInput) (*request.Request, *ec2.DeleteInstanceEventWindowOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteInstanceEventWindowRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*ec2.DeleteInstanceEventWindowOutput) + return ret0, ret1 +} + +// DeleteInstanceEventWindowRequest indicates an expected call of DeleteInstanceEventWindowRequest. +func (mr *MockEC2APIMockRecorder) DeleteInstanceEventWindowRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstanceEventWindowRequest", reflect.TypeOf((*MockEC2API)(nil).DeleteInstanceEventWindowRequest), arg0) +} + +// DeleteInstanceEventWindowWithContext mocks base method. +func (m *MockEC2API) DeleteInstanceEventWindowWithContext(arg0 aws.Context, arg1 *ec2.DeleteInstanceEventWindowInput, arg2 ...request.Option) (*ec2.DeleteInstanceEventWindowOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteInstanceEventWindowWithContext", varargs...) + ret0, _ := ret[0].(*ec2.DeleteInstanceEventWindowOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteInstanceEventWindowWithContext indicates an expected call of DeleteInstanceEventWindowWithContext. +func (mr *MockEC2APIMockRecorder) DeleteInstanceEventWindowWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstanceEventWindowWithContext", reflect.TypeOf((*MockEC2API)(nil).DeleteInstanceEventWindowWithContext), varargs...) +} + // DeleteInternetGateway mocks base method. func (m *MockEC2API) DeleteInternetGateway(arg0 *ec2.DeleteInternetGatewayInput) (*ec2.DeleteInternetGatewayOutput, error) { m.ctrl.T.Helper() @@ -6851,6 +7151,56 @@ func (mr *MockEC2APIMockRecorder) DeleteSubnet(arg0 interface{}) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSubnet", reflect.TypeOf((*MockEC2API)(nil).DeleteSubnet), arg0) } +// DeleteSubnetCidrReservation mocks base method. +func (m *MockEC2API) DeleteSubnetCidrReservation(arg0 *ec2.DeleteSubnetCidrReservationInput) (*ec2.DeleteSubnetCidrReservationOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteSubnetCidrReservation", arg0) + ret0, _ := ret[0].(*ec2.DeleteSubnetCidrReservationOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteSubnetCidrReservation indicates an expected call of DeleteSubnetCidrReservation. +func (mr *MockEC2APIMockRecorder) DeleteSubnetCidrReservation(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSubnetCidrReservation", reflect.TypeOf((*MockEC2API)(nil).DeleteSubnetCidrReservation), arg0) +} + +// DeleteSubnetCidrReservationRequest mocks base method. +func (m *MockEC2API) DeleteSubnetCidrReservationRequest(arg0 *ec2.DeleteSubnetCidrReservationInput) (*request.Request, *ec2.DeleteSubnetCidrReservationOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteSubnetCidrReservationRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*ec2.DeleteSubnetCidrReservationOutput) + return ret0, ret1 +} + +// DeleteSubnetCidrReservationRequest indicates an expected call of DeleteSubnetCidrReservationRequest. +func (mr *MockEC2APIMockRecorder) DeleteSubnetCidrReservationRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSubnetCidrReservationRequest", reflect.TypeOf((*MockEC2API)(nil).DeleteSubnetCidrReservationRequest), arg0) +} + +// DeleteSubnetCidrReservationWithContext mocks base method. +func (m *MockEC2API) DeleteSubnetCidrReservationWithContext(arg0 aws.Context, arg1 *ec2.DeleteSubnetCidrReservationInput, arg2 ...request.Option) (*ec2.DeleteSubnetCidrReservationOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteSubnetCidrReservationWithContext", varargs...) + ret0, _ := ret[0].(*ec2.DeleteSubnetCidrReservationOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteSubnetCidrReservationWithContext indicates an expected call of DeleteSubnetCidrReservationWithContext. +func (mr *MockEC2APIMockRecorder) DeleteSubnetCidrReservationWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSubnetCidrReservationWithContext", reflect.TypeOf((*MockEC2API)(nil).DeleteSubnetCidrReservationWithContext), varargs...) +} + // DeleteSubnetRequest mocks base method. func (m *MockEC2API) DeleteSubnetRequest(arg0 *ec2.DeleteSubnetInput) (*request.Request, *ec2.DeleteSubnetOutput) { m.ctrl.T.Helper() @@ -8702,6 +9052,89 @@ func (mr *MockEC2APIMockRecorder) DescribeByoipCidrsWithContext(arg0, arg1 inter return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeByoipCidrsWithContext", reflect.TypeOf((*MockEC2API)(nil).DescribeByoipCidrsWithContext), varargs...) } +// DescribeCapacityReservationFleets mocks base method. +func (m *MockEC2API) DescribeCapacityReservationFleets(arg0 *ec2.DescribeCapacityReservationFleetsInput) (*ec2.DescribeCapacityReservationFleetsOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeCapacityReservationFleets", arg0) + ret0, _ := ret[0].(*ec2.DescribeCapacityReservationFleetsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeCapacityReservationFleets indicates an expected call of DescribeCapacityReservationFleets. +func (mr *MockEC2APIMockRecorder) DescribeCapacityReservationFleets(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeCapacityReservationFleets", reflect.TypeOf((*MockEC2API)(nil).DescribeCapacityReservationFleets), arg0) +} + +// DescribeCapacityReservationFleetsPages mocks base method. +func (m *MockEC2API) DescribeCapacityReservationFleetsPages(arg0 *ec2.DescribeCapacityReservationFleetsInput, arg1 func(*ec2.DescribeCapacityReservationFleetsOutput, bool) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeCapacityReservationFleetsPages", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// DescribeCapacityReservationFleetsPages indicates an expected call of DescribeCapacityReservationFleetsPages. +func (mr *MockEC2APIMockRecorder) DescribeCapacityReservationFleetsPages(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeCapacityReservationFleetsPages", reflect.TypeOf((*MockEC2API)(nil).DescribeCapacityReservationFleetsPages), arg0, arg1) +} + +// DescribeCapacityReservationFleetsPagesWithContext mocks base method. +func (m *MockEC2API) DescribeCapacityReservationFleetsPagesWithContext(arg0 aws.Context, arg1 *ec2.DescribeCapacityReservationFleetsInput, arg2 func(*ec2.DescribeCapacityReservationFleetsOutput, bool) bool, arg3 ...request.Option) error { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeCapacityReservationFleetsPagesWithContext", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// DescribeCapacityReservationFleetsPagesWithContext indicates an expected call of DescribeCapacityReservationFleetsPagesWithContext. +func (mr *MockEC2APIMockRecorder) DescribeCapacityReservationFleetsPagesWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeCapacityReservationFleetsPagesWithContext", reflect.TypeOf((*MockEC2API)(nil).DescribeCapacityReservationFleetsPagesWithContext), varargs...) +} + +// DescribeCapacityReservationFleetsRequest mocks base method. +func (m *MockEC2API) DescribeCapacityReservationFleetsRequest(arg0 *ec2.DescribeCapacityReservationFleetsInput) (*request.Request, *ec2.DescribeCapacityReservationFleetsOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeCapacityReservationFleetsRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*ec2.DescribeCapacityReservationFleetsOutput) + return ret0, ret1 +} + +// DescribeCapacityReservationFleetsRequest indicates an expected call of DescribeCapacityReservationFleetsRequest. +func (mr *MockEC2APIMockRecorder) DescribeCapacityReservationFleetsRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeCapacityReservationFleetsRequest", reflect.TypeOf((*MockEC2API)(nil).DescribeCapacityReservationFleetsRequest), arg0) +} + +// DescribeCapacityReservationFleetsWithContext mocks base method. +func (m *MockEC2API) DescribeCapacityReservationFleetsWithContext(arg0 aws.Context, arg1 *ec2.DescribeCapacityReservationFleetsInput, arg2 ...request.Option) (*ec2.DescribeCapacityReservationFleetsOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeCapacityReservationFleetsWithContext", varargs...) + ret0, _ := ret[0].(*ec2.DescribeCapacityReservationFleetsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeCapacityReservationFleetsWithContext indicates an expected call of DescribeCapacityReservationFleetsWithContext. +func (mr *MockEC2APIMockRecorder) DescribeCapacityReservationFleetsWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeCapacityReservationFleetsWithContext", reflect.TypeOf((*MockEC2API)(nil).DescribeCapacityReservationFleetsWithContext), varargs...) +} + // DescribeCapacityReservations mocks base method. func (m *MockEC2API) DescribeCapacityReservations(arg0 *ec2.DescribeCapacityReservationsInput) (*ec2.DescribeCapacityReservationsOutput, error) { m.ctrl.T.Helper() @@ -11261,10 +11694,93 @@ func (mr *MockEC2APIMockRecorder) DescribeInstanceEventNotificationAttributesWit return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeInstanceEventNotificationAttributesWithContext", reflect.TypeOf((*MockEC2API)(nil).DescribeInstanceEventNotificationAttributesWithContext), varargs...) } -// DescribeInstanceStatus mocks base method. -func (m *MockEC2API) DescribeInstanceStatus(arg0 *ec2.DescribeInstanceStatusInput) (*ec2.DescribeInstanceStatusOutput, error) { +// DescribeInstanceEventWindows mocks base method. +func (m *MockEC2API) DescribeInstanceEventWindows(arg0 *ec2.DescribeInstanceEventWindowsInput) (*ec2.DescribeInstanceEventWindowsOutput, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DescribeInstanceStatus", arg0) + ret := m.ctrl.Call(m, "DescribeInstanceEventWindows", arg0) + ret0, _ := ret[0].(*ec2.DescribeInstanceEventWindowsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeInstanceEventWindows indicates an expected call of DescribeInstanceEventWindows. +func (mr *MockEC2APIMockRecorder) DescribeInstanceEventWindows(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeInstanceEventWindows", reflect.TypeOf((*MockEC2API)(nil).DescribeInstanceEventWindows), arg0) +} + +// DescribeInstanceEventWindowsPages mocks base method. +func (m *MockEC2API) DescribeInstanceEventWindowsPages(arg0 *ec2.DescribeInstanceEventWindowsInput, arg1 func(*ec2.DescribeInstanceEventWindowsOutput, bool) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeInstanceEventWindowsPages", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// DescribeInstanceEventWindowsPages indicates an expected call of DescribeInstanceEventWindowsPages. +func (mr *MockEC2APIMockRecorder) DescribeInstanceEventWindowsPages(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeInstanceEventWindowsPages", reflect.TypeOf((*MockEC2API)(nil).DescribeInstanceEventWindowsPages), arg0, arg1) +} + +// DescribeInstanceEventWindowsPagesWithContext mocks base method. +func (m *MockEC2API) DescribeInstanceEventWindowsPagesWithContext(arg0 aws.Context, arg1 *ec2.DescribeInstanceEventWindowsInput, arg2 func(*ec2.DescribeInstanceEventWindowsOutput, bool) bool, arg3 ...request.Option) error { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeInstanceEventWindowsPagesWithContext", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// DescribeInstanceEventWindowsPagesWithContext indicates an expected call of DescribeInstanceEventWindowsPagesWithContext. +func (mr *MockEC2APIMockRecorder) DescribeInstanceEventWindowsPagesWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeInstanceEventWindowsPagesWithContext", reflect.TypeOf((*MockEC2API)(nil).DescribeInstanceEventWindowsPagesWithContext), varargs...) +} + +// DescribeInstanceEventWindowsRequest mocks base method. +func (m *MockEC2API) DescribeInstanceEventWindowsRequest(arg0 *ec2.DescribeInstanceEventWindowsInput) (*request.Request, *ec2.DescribeInstanceEventWindowsOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeInstanceEventWindowsRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*ec2.DescribeInstanceEventWindowsOutput) + return ret0, ret1 +} + +// DescribeInstanceEventWindowsRequest indicates an expected call of DescribeInstanceEventWindowsRequest. +func (mr *MockEC2APIMockRecorder) DescribeInstanceEventWindowsRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeInstanceEventWindowsRequest", reflect.TypeOf((*MockEC2API)(nil).DescribeInstanceEventWindowsRequest), arg0) +} + +// DescribeInstanceEventWindowsWithContext mocks base method. +func (m *MockEC2API) DescribeInstanceEventWindowsWithContext(arg0 aws.Context, arg1 *ec2.DescribeInstanceEventWindowsInput, arg2 ...request.Option) (*ec2.DescribeInstanceEventWindowsOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeInstanceEventWindowsWithContext", varargs...) + ret0, _ := ret[0].(*ec2.DescribeInstanceEventWindowsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeInstanceEventWindowsWithContext indicates an expected call of DescribeInstanceEventWindowsWithContext. +func (mr *MockEC2APIMockRecorder) DescribeInstanceEventWindowsWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeInstanceEventWindowsWithContext", reflect.TypeOf((*MockEC2API)(nil).DescribeInstanceEventWindowsWithContext), varargs...) +} + +// DescribeInstanceStatus mocks base method. +func (m *MockEC2API) DescribeInstanceStatus(arg0 *ec2.DescribeInstanceStatusInput) (*ec2.DescribeInstanceStatusOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeInstanceStatus", arg0) ret0, _ := ret[0].(*ec2.DescribeInstanceStatusOutput) ret1, _ := ret[1].(error) return ret0, ret1 @@ -14184,6 +14700,89 @@ func (mr *MockEC2APIMockRecorder) DescribeSecurityGroupReferencesWithContext(arg return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSecurityGroupReferencesWithContext", reflect.TypeOf((*MockEC2API)(nil).DescribeSecurityGroupReferencesWithContext), varargs...) } +// DescribeSecurityGroupRules mocks base method. +func (m *MockEC2API) DescribeSecurityGroupRules(arg0 *ec2.DescribeSecurityGroupRulesInput) (*ec2.DescribeSecurityGroupRulesOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeSecurityGroupRules", arg0) + ret0, _ := ret[0].(*ec2.DescribeSecurityGroupRulesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeSecurityGroupRules indicates an expected call of DescribeSecurityGroupRules. +func (mr *MockEC2APIMockRecorder) DescribeSecurityGroupRules(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSecurityGroupRules", reflect.TypeOf((*MockEC2API)(nil).DescribeSecurityGroupRules), arg0) +} + +// DescribeSecurityGroupRulesPages mocks base method. +func (m *MockEC2API) DescribeSecurityGroupRulesPages(arg0 *ec2.DescribeSecurityGroupRulesInput, arg1 func(*ec2.DescribeSecurityGroupRulesOutput, bool) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeSecurityGroupRulesPages", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// DescribeSecurityGroupRulesPages indicates an expected call of DescribeSecurityGroupRulesPages. +func (mr *MockEC2APIMockRecorder) DescribeSecurityGroupRulesPages(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSecurityGroupRulesPages", reflect.TypeOf((*MockEC2API)(nil).DescribeSecurityGroupRulesPages), arg0, arg1) +} + +// DescribeSecurityGroupRulesPagesWithContext mocks base method. +func (m *MockEC2API) DescribeSecurityGroupRulesPagesWithContext(arg0 aws.Context, arg1 *ec2.DescribeSecurityGroupRulesInput, arg2 func(*ec2.DescribeSecurityGroupRulesOutput, bool) bool, arg3 ...request.Option) error { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeSecurityGroupRulesPagesWithContext", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// DescribeSecurityGroupRulesPagesWithContext indicates an expected call of DescribeSecurityGroupRulesPagesWithContext. +func (mr *MockEC2APIMockRecorder) DescribeSecurityGroupRulesPagesWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSecurityGroupRulesPagesWithContext", reflect.TypeOf((*MockEC2API)(nil).DescribeSecurityGroupRulesPagesWithContext), varargs...) +} + +// DescribeSecurityGroupRulesRequest mocks base method. +func (m *MockEC2API) DescribeSecurityGroupRulesRequest(arg0 *ec2.DescribeSecurityGroupRulesInput) (*request.Request, *ec2.DescribeSecurityGroupRulesOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeSecurityGroupRulesRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*ec2.DescribeSecurityGroupRulesOutput) + return ret0, ret1 +} + +// DescribeSecurityGroupRulesRequest indicates an expected call of DescribeSecurityGroupRulesRequest. +func (mr *MockEC2APIMockRecorder) DescribeSecurityGroupRulesRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSecurityGroupRulesRequest", reflect.TypeOf((*MockEC2API)(nil).DescribeSecurityGroupRulesRequest), arg0) +} + +// DescribeSecurityGroupRulesWithContext mocks base method. +func (m *MockEC2API) DescribeSecurityGroupRulesWithContext(arg0 aws.Context, arg1 *ec2.DescribeSecurityGroupRulesInput, arg2 ...request.Option) (*ec2.DescribeSecurityGroupRulesOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeSecurityGroupRulesWithContext", varargs...) + ret0, _ := ret[0].(*ec2.DescribeSecurityGroupRulesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeSecurityGroupRulesWithContext indicates an expected call of DescribeSecurityGroupRulesWithContext. +func (mr *MockEC2APIMockRecorder) DescribeSecurityGroupRulesWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSecurityGroupRulesWithContext", reflect.TypeOf((*MockEC2API)(nil).DescribeSecurityGroupRulesWithContext), varargs...) +} + // DescribeSecurityGroups mocks base method. func (m *MockEC2API) DescribeSecurityGroups(arg0 *ec2.DescribeSecurityGroupsInput) (*ec2.DescribeSecurityGroupsOutput, error) { m.ctrl.T.Helper() @@ -16059,6 +16658,39 @@ func (mr *MockEC2APIMockRecorder) DescribeTrunkInterfaceAssociations(arg0 interf return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeTrunkInterfaceAssociations", reflect.TypeOf((*MockEC2API)(nil).DescribeTrunkInterfaceAssociations), arg0) } +// DescribeTrunkInterfaceAssociationsPages mocks base method. +func (m *MockEC2API) DescribeTrunkInterfaceAssociationsPages(arg0 *ec2.DescribeTrunkInterfaceAssociationsInput, arg1 func(*ec2.DescribeTrunkInterfaceAssociationsOutput, bool) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeTrunkInterfaceAssociationsPages", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// DescribeTrunkInterfaceAssociationsPages indicates an expected call of DescribeTrunkInterfaceAssociationsPages. +func (mr *MockEC2APIMockRecorder) DescribeTrunkInterfaceAssociationsPages(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeTrunkInterfaceAssociationsPages", reflect.TypeOf((*MockEC2API)(nil).DescribeTrunkInterfaceAssociationsPages), arg0, arg1) +} + +// DescribeTrunkInterfaceAssociationsPagesWithContext mocks base method. +func (m *MockEC2API) DescribeTrunkInterfaceAssociationsPagesWithContext(arg0 aws.Context, arg1 *ec2.DescribeTrunkInterfaceAssociationsInput, arg2 func(*ec2.DescribeTrunkInterfaceAssociationsOutput, bool) bool, arg3 ...request.Option) error { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeTrunkInterfaceAssociationsPagesWithContext", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// DescribeTrunkInterfaceAssociationsPagesWithContext indicates an expected call of DescribeTrunkInterfaceAssociationsPagesWithContext. +func (mr *MockEC2APIMockRecorder) DescribeTrunkInterfaceAssociationsPagesWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeTrunkInterfaceAssociationsPagesWithContext", reflect.TypeOf((*MockEC2API)(nil).DescribeTrunkInterfaceAssociationsPagesWithContext), varargs...) +} + // DescribeTrunkInterfaceAssociationsRequest mocks base method. func (m *MockEC2API) DescribeTrunkInterfaceAssociationsRequest(arg0 *ec2.DescribeTrunkInterfaceAssociationsInput) (*request.Request, *ec2.DescribeTrunkInterfaceAssociationsOutput) { m.ctrl.T.Helper() @@ -18157,6 +18789,56 @@ func (mr *MockEC2APIMockRecorder) DisassociateIamInstanceProfileWithContext(arg0 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisassociateIamInstanceProfileWithContext", reflect.TypeOf((*MockEC2API)(nil).DisassociateIamInstanceProfileWithContext), varargs...) } +// DisassociateInstanceEventWindow mocks base method. +func (m *MockEC2API) DisassociateInstanceEventWindow(arg0 *ec2.DisassociateInstanceEventWindowInput) (*ec2.DisassociateInstanceEventWindowOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DisassociateInstanceEventWindow", arg0) + ret0, _ := ret[0].(*ec2.DisassociateInstanceEventWindowOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DisassociateInstanceEventWindow indicates an expected call of DisassociateInstanceEventWindow. +func (mr *MockEC2APIMockRecorder) DisassociateInstanceEventWindow(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisassociateInstanceEventWindow", reflect.TypeOf((*MockEC2API)(nil).DisassociateInstanceEventWindow), arg0) +} + +// DisassociateInstanceEventWindowRequest mocks base method. +func (m *MockEC2API) DisassociateInstanceEventWindowRequest(arg0 *ec2.DisassociateInstanceEventWindowInput) (*request.Request, *ec2.DisassociateInstanceEventWindowOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DisassociateInstanceEventWindowRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*ec2.DisassociateInstanceEventWindowOutput) + return ret0, ret1 +} + +// DisassociateInstanceEventWindowRequest indicates an expected call of DisassociateInstanceEventWindowRequest. +func (mr *MockEC2APIMockRecorder) DisassociateInstanceEventWindowRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisassociateInstanceEventWindowRequest", reflect.TypeOf((*MockEC2API)(nil).DisassociateInstanceEventWindowRequest), arg0) +} + +// DisassociateInstanceEventWindowWithContext mocks base method. +func (m *MockEC2API) DisassociateInstanceEventWindowWithContext(arg0 aws.Context, arg1 *ec2.DisassociateInstanceEventWindowInput, arg2 ...request.Option) (*ec2.DisassociateInstanceEventWindowOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DisassociateInstanceEventWindowWithContext", varargs...) + ret0, _ := ret[0].(*ec2.DisassociateInstanceEventWindowOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DisassociateInstanceEventWindowWithContext indicates an expected call of DisassociateInstanceEventWindowWithContext. +func (mr *MockEC2APIMockRecorder) DisassociateInstanceEventWindowWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisassociateInstanceEventWindowWithContext", reflect.TypeOf((*MockEC2API)(nil).DisassociateInstanceEventWindowWithContext), varargs...) +} + // DisassociateRouteTable mocks base method. func (m *MockEC2API) DisassociateRouteTable(arg0 *ec2.DisassociateRouteTableInput) (*ec2.DisassociateRouteTableOutput, error) { m.ctrl.T.Helper() @@ -19773,6 +20455,89 @@ func (mr *MockEC2APIMockRecorder) GetHostReservationPurchasePreviewWithContext(a return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHostReservationPurchasePreviewWithContext", reflect.TypeOf((*MockEC2API)(nil).GetHostReservationPurchasePreviewWithContext), varargs...) } +// GetInstanceTypesFromInstanceRequirements mocks base method. +func (m *MockEC2API) GetInstanceTypesFromInstanceRequirements(arg0 *ec2.GetInstanceTypesFromInstanceRequirementsInput) (*ec2.GetInstanceTypesFromInstanceRequirementsOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetInstanceTypesFromInstanceRequirements", arg0) + ret0, _ := ret[0].(*ec2.GetInstanceTypesFromInstanceRequirementsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetInstanceTypesFromInstanceRequirements indicates an expected call of GetInstanceTypesFromInstanceRequirements. +func (mr *MockEC2APIMockRecorder) GetInstanceTypesFromInstanceRequirements(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceTypesFromInstanceRequirements", reflect.TypeOf((*MockEC2API)(nil).GetInstanceTypesFromInstanceRequirements), arg0) +} + +// GetInstanceTypesFromInstanceRequirementsPages mocks base method. +func (m *MockEC2API) GetInstanceTypesFromInstanceRequirementsPages(arg0 *ec2.GetInstanceTypesFromInstanceRequirementsInput, arg1 func(*ec2.GetInstanceTypesFromInstanceRequirementsOutput, bool) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetInstanceTypesFromInstanceRequirementsPages", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// GetInstanceTypesFromInstanceRequirementsPages indicates an expected call of GetInstanceTypesFromInstanceRequirementsPages. +func (mr *MockEC2APIMockRecorder) GetInstanceTypesFromInstanceRequirementsPages(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceTypesFromInstanceRequirementsPages", reflect.TypeOf((*MockEC2API)(nil).GetInstanceTypesFromInstanceRequirementsPages), arg0, arg1) +} + +// GetInstanceTypesFromInstanceRequirementsPagesWithContext mocks base method. +func (m *MockEC2API) GetInstanceTypesFromInstanceRequirementsPagesWithContext(arg0 aws.Context, arg1 *ec2.GetInstanceTypesFromInstanceRequirementsInput, arg2 func(*ec2.GetInstanceTypesFromInstanceRequirementsOutput, bool) bool, arg3 ...request.Option) error { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetInstanceTypesFromInstanceRequirementsPagesWithContext", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// GetInstanceTypesFromInstanceRequirementsPagesWithContext indicates an expected call of GetInstanceTypesFromInstanceRequirementsPagesWithContext. +func (mr *MockEC2APIMockRecorder) GetInstanceTypesFromInstanceRequirementsPagesWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceTypesFromInstanceRequirementsPagesWithContext", reflect.TypeOf((*MockEC2API)(nil).GetInstanceTypesFromInstanceRequirementsPagesWithContext), varargs...) +} + +// GetInstanceTypesFromInstanceRequirementsRequest mocks base method. +func (m *MockEC2API) GetInstanceTypesFromInstanceRequirementsRequest(arg0 *ec2.GetInstanceTypesFromInstanceRequirementsInput) (*request.Request, *ec2.GetInstanceTypesFromInstanceRequirementsOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetInstanceTypesFromInstanceRequirementsRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*ec2.GetInstanceTypesFromInstanceRequirementsOutput) + return ret0, ret1 +} + +// GetInstanceTypesFromInstanceRequirementsRequest indicates an expected call of GetInstanceTypesFromInstanceRequirementsRequest. +func (mr *MockEC2APIMockRecorder) GetInstanceTypesFromInstanceRequirementsRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceTypesFromInstanceRequirementsRequest", reflect.TypeOf((*MockEC2API)(nil).GetInstanceTypesFromInstanceRequirementsRequest), arg0) +} + +// GetInstanceTypesFromInstanceRequirementsWithContext mocks base method. +func (m *MockEC2API) GetInstanceTypesFromInstanceRequirementsWithContext(arg0 aws.Context, arg1 *ec2.GetInstanceTypesFromInstanceRequirementsInput, arg2 ...request.Option) (*ec2.GetInstanceTypesFromInstanceRequirementsOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetInstanceTypesFromInstanceRequirementsWithContext", varargs...) + ret0, _ := ret[0].(*ec2.GetInstanceTypesFromInstanceRequirementsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetInstanceTypesFromInstanceRequirementsWithContext indicates an expected call of GetInstanceTypesFromInstanceRequirementsWithContext. +func (mr *MockEC2APIMockRecorder) GetInstanceTypesFromInstanceRequirementsWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceTypesFromInstanceRequirementsWithContext", reflect.TypeOf((*MockEC2API)(nil).GetInstanceTypesFromInstanceRequirementsWithContext), varargs...) +} + // GetLaunchTemplateData mocks base method. func (m *MockEC2API) GetLaunchTemplateData(arg0 *ec2.GetLaunchTemplateDataInput) (*ec2.GetLaunchTemplateDataOutput, error) { m.ctrl.T.Helper() @@ -20139,6 +20904,139 @@ func (mr *MockEC2APIMockRecorder) GetSerialConsoleAccessStatusWithContext(arg0, return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSerialConsoleAccessStatusWithContext", reflect.TypeOf((*MockEC2API)(nil).GetSerialConsoleAccessStatusWithContext), varargs...) } +// GetSpotPlacementScores mocks base method. +func (m *MockEC2API) GetSpotPlacementScores(arg0 *ec2.GetSpotPlacementScoresInput) (*ec2.GetSpotPlacementScoresOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetSpotPlacementScores", arg0) + ret0, _ := ret[0].(*ec2.GetSpotPlacementScoresOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetSpotPlacementScores indicates an expected call of GetSpotPlacementScores. +func (mr *MockEC2APIMockRecorder) GetSpotPlacementScores(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSpotPlacementScores", reflect.TypeOf((*MockEC2API)(nil).GetSpotPlacementScores), arg0) +} + +// GetSpotPlacementScoresPages mocks base method. +func (m *MockEC2API) GetSpotPlacementScoresPages(arg0 *ec2.GetSpotPlacementScoresInput, arg1 func(*ec2.GetSpotPlacementScoresOutput, bool) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetSpotPlacementScoresPages", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// GetSpotPlacementScoresPages indicates an expected call of GetSpotPlacementScoresPages. +func (mr *MockEC2APIMockRecorder) GetSpotPlacementScoresPages(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSpotPlacementScoresPages", reflect.TypeOf((*MockEC2API)(nil).GetSpotPlacementScoresPages), arg0, arg1) +} + +// GetSpotPlacementScoresPagesWithContext mocks base method. +func (m *MockEC2API) GetSpotPlacementScoresPagesWithContext(arg0 aws.Context, arg1 *ec2.GetSpotPlacementScoresInput, arg2 func(*ec2.GetSpotPlacementScoresOutput, bool) bool, arg3 ...request.Option) error { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetSpotPlacementScoresPagesWithContext", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// GetSpotPlacementScoresPagesWithContext indicates an expected call of GetSpotPlacementScoresPagesWithContext. +func (mr *MockEC2APIMockRecorder) GetSpotPlacementScoresPagesWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSpotPlacementScoresPagesWithContext", reflect.TypeOf((*MockEC2API)(nil).GetSpotPlacementScoresPagesWithContext), varargs...) +} + +// GetSpotPlacementScoresRequest mocks base method. +func (m *MockEC2API) GetSpotPlacementScoresRequest(arg0 *ec2.GetSpotPlacementScoresInput) (*request.Request, *ec2.GetSpotPlacementScoresOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetSpotPlacementScoresRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*ec2.GetSpotPlacementScoresOutput) + return ret0, ret1 +} + +// GetSpotPlacementScoresRequest indicates an expected call of GetSpotPlacementScoresRequest. +func (mr *MockEC2APIMockRecorder) GetSpotPlacementScoresRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSpotPlacementScoresRequest", reflect.TypeOf((*MockEC2API)(nil).GetSpotPlacementScoresRequest), arg0) +} + +// GetSpotPlacementScoresWithContext mocks base method. +func (m *MockEC2API) GetSpotPlacementScoresWithContext(arg0 aws.Context, arg1 *ec2.GetSpotPlacementScoresInput, arg2 ...request.Option) (*ec2.GetSpotPlacementScoresOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetSpotPlacementScoresWithContext", varargs...) + ret0, _ := ret[0].(*ec2.GetSpotPlacementScoresOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetSpotPlacementScoresWithContext indicates an expected call of GetSpotPlacementScoresWithContext. +func (mr *MockEC2APIMockRecorder) GetSpotPlacementScoresWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSpotPlacementScoresWithContext", reflect.TypeOf((*MockEC2API)(nil).GetSpotPlacementScoresWithContext), varargs...) +} + +// GetSubnetCidrReservations mocks base method. +func (m *MockEC2API) GetSubnetCidrReservations(arg0 *ec2.GetSubnetCidrReservationsInput) (*ec2.GetSubnetCidrReservationsOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetSubnetCidrReservations", arg0) + ret0, _ := ret[0].(*ec2.GetSubnetCidrReservationsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetSubnetCidrReservations indicates an expected call of GetSubnetCidrReservations. +func (mr *MockEC2APIMockRecorder) GetSubnetCidrReservations(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubnetCidrReservations", reflect.TypeOf((*MockEC2API)(nil).GetSubnetCidrReservations), arg0) +} + +// GetSubnetCidrReservationsRequest mocks base method. +func (m *MockEC2API) GetSubnetCidrReservationsRequest(arg0 *ec2.GetSubnetCidrReservationsInput) (*request.Request, *ec2.GetSubnetCidrReservationsOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetSubnetCidrReservationsRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*ec2.GetSubnetCidrReservationsOutput) + return ret0, ret1 +} + +// GetSubnetCidrReservationsRequest indicates an expected call of GetSubnetCidrReservationsRequest. +func (mr *MockEC2APIMockRecorder) GetSubnetCidrReservationsRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubnetCidrReservationsRequest", reflect.TypeOf((*MockEC2API)(nil).GetSubnetCidrReservationsRequest), arg0) +} + +// GetSubnetCidrReservationsWithContext mocks base method. +func (m *MockEC2API) GetSubnetCidrReservationsWithContext(arg0 aws.Context, arg1 *ec2.GetSubnetCidrReservationsInput, arg2 ...request.Option) (*ec2.GetSubnetCidrReservationsOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetSubnetCidrReservationsWithContext", varargs...) + ret0, _ := ret[0].(*ec2.GetSubnetCidrReservationsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetSubnetCidrReservationsWithContext indicates an expected call of GetSubnetCidrReservationsWithContext. +func (mr *MockEC2APIMockRecorder) GetSubnetCidrReservationsWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubnetCidrReservationsWithContext", reflect.TypeOf((*MockEC2API)(nil).GetSubnetCidrReservationsWithContext), varargs...) +} + // GetTransitGatewayAttachmentPropagations mocks base method. func (m *MockEC2API) GetTransitGatewayAttachmentPropagations(arg0 *ec2.GetTransitGatewayAttachmentPropagationsInput) (*ec2.GetTransitGatewayAttachmentPropagationsOutput, error) { m.ctrl.T.Helper() @@ -20554,6 +21452,139 @@ func (mr *MockEC2APIMockRecorder) GetTransitGatewayRouteTablePropagationsWithCon return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransitGatewayRouteTablePropagationsWithContext", reflect.TypeOf((*MockEC2API)(nil).GetTransitGatewayRouteTablePropagationsWithContext), varargs...) } +// GetVpnConnectionDeviceSampleConfiguration mocks base method. +func (m *MockEC2API) GetVpnConnectionDeviceSampleConfiguration(arg0 *ec2.GetVpnConnectionDeviceSampleConfigurationInput) (*ec2.GetVpnConnectionDeviceSampleConfigurationOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetVpnConnectionDeviceSampleConfiguration", arg0) + ret0, _ := ret[0].(*ec2.GetVpnConnectionDeviceSampleConfigurationOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetVpnConnectionDeviceSampleConfiguration indicates an expected call of GetVpnConnectionDeviceSampleConfiguration. +func (mr *MockEC2APIMockRecorder) GetVpnConnectionDeviceSampleConfiguration(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVpnConnectionDeviceSampleConfiguration", reflect.TypeOf((*MockEC2API)(nil).GetVpnConnectionDeviceSampleConfiguration), arg0) +} + +// GetVpnConnectionDeviceSampleConfigurationRequest mocks base method. +func (m *MockEC2API) GetVpnConnectionDeviceSampleConfigurationRequest(arg0 *ec2.GetVpnConnectionDeviceSampleConfigurationInput) (*request.Request, *ec2.GetVpnConnectionDeviceSampleConfigurationOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetVpnConnectionDeviceSampleConfigurationRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*ec2.GetVpnConnectionDeviceSampleConfigurationOutput) + return ret0, ret1 +} + +// GetVpnConnectionDeviceSampleConfigurationRequest indicates an expected call of GetVpnConnectionDeviceSampleConfigurationRequest. +func (mr *MockEC2APIMockRecorder) GetVpnConnectionDeviceSampleConfigurationRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVpnConnectionDeviceSampleConfigurationRequest", reflect.TypeOf((*MockEC2API)(nil).GetVpnConnectionDeviceSampleConfigurationRequest), arg0) +} + +// GetVpnConnectionDeviceSampleConfigurationWithContext mocks base method. +func (m *MockEC2API) GetVpnConnectionDeviceSampleConfigurationWithContext(arg0 aws.Context, arg1 *ec2.GetVpnConnectionDeviceSampleConfigurationInput, arg2 ...request.Option) (*ec2.GetVpnConnectionDeviceSampleConfigurationOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetVpnConnectionDeviceSampleConfigurationWithContext", varargs...) + ret0, _ := ret[0].(*ec2.GetVpnConnectionDeviceSampleConfigurationOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetVpnConnectionDeviceSampleConfigurationWithContext indicates an expected call of GetVpnConnectionDeviceSampleConfigurationWithContext. +func (mr *MockEC2APIMockRecorder) GetVpnConnectionDeviceSampleConfigurationWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVpnConnectionDeviceSampleConfigurationWithContext", reflect.TypeOf((*MockEC2API)(nil).GetVpnConnectionDeviceSampleConfigurationWithContext), varargs...) +} + +// GetVpnConnectionDeviceTypes mocks base method. +func (m *MockEC2API) GetVpnConnectionDeviceTypes(arg0 *ec2.GetVpnConnectionDeviceTypesInput) (*ec2.GetVpnConnectionDeviceTypesOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetVpnConnectionDeviceTypes", arg0) + ret0, _ := ret[0].(*ec2.GetVpnConnectionDeviceTypesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetVpnConnectionDeviceTypes indicates an expected call of GetVpnConnectionDeviceTypes. +func (mr *MockEC2APIMockRecorder) GetVpnConnectionDeviceTypes(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVpnConnectionDeviceTypes", reflect.TypeOf((*MockEC2API)(nil).GetVpnConnectionDeviceTypes), arg0) +} + +// GetVpnConnectionDeviceTypesPages mocks base method. +func (m *MockEC2API) GetVpnConnectionDeviceTypesPages(arg0 *ec2.GetVpnConnectionDeviceTypesInput, arg1 func(*ec2.GetVpnConnectionDeviceTypesOutput, bool) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetVpnConnectionDeviceTypesPages", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// GetVpnConnectionDeviceTypesPages indicates an expected call of GetVpnConnectionDeviceTypesPages. +func (mr *MockEC2APIMockRecorder) GetVpnConnectionDeviceTypesPages(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVpnConnectionDeviceTypesPages", reflect.TypeOf((*MockEC2API)(nil).GetVpnConnectionDeviceTypesPages), arg0, arg1) +} + +// GetVpnConnectionDeviceTypesPagesWithContext mocks base method. +func (m *MockEC2API) GetVpnConnectionDeviceTypesPagesWithContext(arg0 aws.Context, arg1 *ec2.GetVpnConnectionDeviceTypesInput, arg2 func(*ec2.GetVpnConnectionDeviceTypesOutput, bool) bool, arg3 ...request.Option) error { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetVpnConnectionDeviceTypesPagesWithContext", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// GetVpnConnectionDeviceTypesPagesWithContext indicates an expected call of GetVpnConnectionDeviceTypesPagesWithContext. +func (mr *MockEC2APIMockRecorder) GetVpnConnectionDeviceTypesPagesWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVpnConnectionDeviceTypesPagesWithContext", reflect.TypeOf((*MockEC2API)(nil).GetVpnConnectionDeviceTypesPagesWithContext), varargs...) +} + +// GetVpnConnectionDeviceTypesRequest mocks base method. +func (m *MockEC2API) GetVpnConnectionDeviceTypesRequest(arg0 *ec2.GetVpnConnectionDeviceTypesInput) (*request.Request, *ec2.GetVpnConnectionDeviceTypesOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetVpnConnectionDeviceTypesRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*ec2.GetVpnConnectionDeviceTypesOutput) + return ret0, ret1 +} + +// GetVpnConnectionDeviceTypesRequest indicates an expected call of GetVpnConnectionDeviceTypesRequest. +func (mr *MockEC2APIMockRecorder) GetVpnConnectionDeviceTypesRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVpnConnectionDeviceTypesRequest", reflect.TypeOf((*MockEC2API)(nil).GetVpnConnectionDeviceTypesRequest), arg0) +} + +// GetVpnConnectionDeviceTypesWithContext mocks base method. +func (m *MockEC2API) GetVpnConnectionDeviceTypesWithContext(arg0 aws.Context, arg1 *ec2.GetVpnConnectionDeviceTypesInput, arg2 ...request.Option) (*ec2.GetVpnConnectionDeviceTypesOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetVpnConnectionDeviceTypesWithContext", varargs...) + ret0, _ := ret[0].(*ec2.GetVpnConnectionDeviceTypesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetVpnConnectionDeviceTypesWithContext indicates an expected call of GetVpnConnectionDeviceTypesWithContext. +func (mr *MockEC2APIMockRecorder) GetVpnConnectionDeviceTypesWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVpnConnectionDeviceTypesWithContext", reflect.TypeOf((*MockEC2API)(nil).GetVpnConnectionDeviceTypesWithContext), varargs...) +} + // ImportClientVpnClientCertificateRevocationList mocks base method. func (m *MockEC2API) ImportClientVpnClientCertificateRevocationList(arg0 *ec2.ImportClientVpnClientCertificateRevocationListInput) (*ec2.ImportClientVpnClientCertificateRevocationListOutput, error) { m.ctrl.T.Helper() @@ -20969,6 +22000,56 @@ func (mr *MockEC2APIMockRecorder) ModifyCapacityReservation(arg0 interface{}) *g return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyCapacityReservation", reflect.TypeOf((*MockEC2API)(nil).ModifyCapacityReservation), arg0) } +// ModifyCapacityReservationFleet mocks base method. +func (m *MockEC2API) ModifyCapacityReservationFleet(arg0 *ec2.ModifyCapacityReservationFleetInput) (*ec2.ModifyCapacityReservationFleetOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ModifyCapacityReservationFleet", arg0) + ret0, _ := ret[0].(*ec2.ModifyCapacityReservationFleetOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ModifyCapacityReservationFleet indicates an expected call of ModifyCapacityReservationFleet. +func (mr *MockEC2APIMockRecorder) ModifyCapacityReservationFleet(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyCapacityReservationFleet", reflect.TypeOf((*MockEC2API)(nil).ModifyCapacityReservationFleet), arg0) +} + +// ModifyCapacityReservationFleetRequest mocks base method. +func (m *MockEC2API) ModifyCapacityReservationFleetRequest(arg0 *ec2.ModifyCapacityReservationFleetInput) (*request.Request, *ec2.ModifyCapacityReservationFleetOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ModifyCapacityReservationFleetRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*ec2.ModifyCapacityReservationFleetOutput) + return ret0, ret1 +} + +// ModifyCapacityReservationFleetRequest indicates an expected call of ModifyCapacityReservationFleetRequest. +func (mr *MockEC2APIMockRecorder) ModifyCapacityReservationFleetRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyCapacityReservationFleetRequest", reflect.TypeOf((*MockEC2API)(nil).ModifyCapacityReservationFleetRequest), arg0) +} + +// ModifyCapacityReservationFleetWithContext mocks base method. +func (m *MockEC2API) ModifyCapacityReservationFleetWithContext(arg0 aws.Context, arg1 *ec2.ModifyCapacityReservationFleetInput, arg2 ...request.Option) (*ec2.ModifyCapacityReservationFleetOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ModifyCapacityReservationFleetWithContext", varargs...) + ret0, _ := ret[0].(*ec2.ModifyCapacityReservationFleetOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ModifyCapacityReservationFleetWithContext indicates an expected call of ModifyCapacityReservationFleetWithContext. +func (mr *MockEC2APIMockRecorder) ModifyCapacityReservationFleetWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyCapacityReservationFleetWithContext", reflect.TypeOf((*MockEC2API)(nil).ModifyCapacityReservationFleetWithContext), varargs...) +} + // ModifyCapacityReservationRequest mocks base method. func (m *MockEC2API) ModifyCapacityReservationRequest(arg0 *ec2.ModifyCapacityReservationInput) (*request.Request, *ec2.ModifyCapacityReservationOutput) { m.ctrl.T.Helper() @@ -21654,6 +22735,56 @@ func (mr *MockEC2APIMockRecorder) ModifyInstanceEventStartTimeWithContext(arg0, return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyInstanceEventStartTimeWithContext", reflect.TypeOf((*MockEC2API)(nil).ModifyInstanceEventStartTimeWithContext), varargs...) } +// ModifyInstanceEventWindow mocks base method. +func (m *MockEC2API) ModifyInstanceEventWindow(arg0 *ec2.ModifyInstanceEventWindowInput) (*ec2.ModifyInstanceEventWindowOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ModifyInstanceEventWindow", arg0) + ret0, _ := ret[0].(*ec2.ModifyInstanceEventWindowOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ModifyInstanceEventWindow indicates an expected call of ModifyInstanceEventWindow. +func (mr *MockEC2APIMockRecorder) ModifyInstanceEventWindow(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyInstanceEventWindow", reflect.TypeOf((*MockEC2API)(nil).ModifyInstanceEventWindow), arg0) +} + +// ModifyInstanceEventWindowRequest mocks base method. +func (m *MockEC2API) ModifyInstanceEventWindowRequest(arg0 *ec2.ModifyInstanceEventWindowInput) (*request.Request, *ec2.ModifyInstanceEventWindowOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ModifyInstanceEventWindowRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*ec2.ModifyInstanceEventWindowOutput) + return ret0, ret1 +} + +// ModifyInstanceEventWindowRequest indicates an expected call of ModifyInstanceEventWindowRequest. +func (mr *MockEC2APIMockRecorder) ModifyInstanceEventWindowRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyInstanceEventWindowRequest", reflect.TypeOf((*MockEC2API)(nil).ModifyInstanceEventWindowRequest), arg0) +} + +// ModifyInstanceEventWindowWithContext mocks base method. +func (m *MockEC2API) ModifyInstanceEventWindowWithContext(arg0 aws.Context, arg1 *ec2.ModifyInstanceEventWindowInput, arg2 ...request.Option) (*ec2.ModifyInstanceEventWindowOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ModifyInstanceEventWindowWithContext", varargs...) + ret0, _ := ret[0].(*ec2.ModifyInstanceEventWindowOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ModifyInstanceEventWindowWithContext indicates an expected call of ModifyInstanceEventWindowWithContext. +func (mr *MockEC2APIMockRecorder) ModifyInstanceEventWindowWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyInstanceEventWindowWithContext", reflect.TypeOf((*MockEC2API)(nil).ModifyInstanceEventWindowWithContext), varargs...) +} + // ModifyInstanceMetadataOptions mocks base method. func (m *MockEC2API) ModifyInstanceMetadataOptions(arg0 *ec2.ModifyInstanceMetadataOptionsInput) (*ec2.ModifyInstanceMetadataOptionsOutput, error) { m.ctrl.T.Helper() @@ -21954,6 +23085,56 @@ func (mr *MockEC2APIMockRecorder) ModifyReservedInstancesWithContext(arg0, arg1 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyReservedInstancesWithContext", reflect.TypeOf((*MockEC2API)(nil).ModifyReservedInstancesWithContext), varargs...) } +// ModifySecurityGroupRules mocks base method. +func (m *MockEC2API) ModifySecurityGroupRules(arg0 *ec2.ModifySecurityGroupRulesInput) (*ec2.ModifySecurityGroupRulesOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ModifySecurityGroupRules", arg0) + ret0, _ := ret[0].(*ec2.ModifySecurityGroupRulesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ModifySecurityGroupRules indicates an expected call of ModifySecurityGroupRules. +func (mr *MockEC2APIMockRecorder) ModifySecurityGroupRules(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifySecurityGroupRules", reflect.TypeOf((*MockEC2API)(nil).ModifySecurityGroupRules), arg0) +} + +// ModifySecurityGroupRulesRequest mocks base method. +func (m *MockEC2API) ModifySecurityGroupRulesRequest(arg0 *ec2.ModifySecurityGroupRulesInput) (*request.Request, *ec2.ModifySecurityGroupRulesOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ModifySecurityGroupRulesRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*ec2.ModifySecurityGroupRulesOutput) + return ret0, ret1 +} + +// ModifySecurityGroupRulesRequest indicates an expected call of ModifySecurityGroupRulesRequest. +func (mr *MockEC2APIMockRecorder) ModifySecurityGroupRulesRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifySecurityGroupRulesRequest", reflect.TypeOf((*MockEC2API)(nil).ModifySecurityGroupRulesRequest), arg0) +} + +// ModifySecurityGroupRulesWithContext mocks base method. +func (m *MockEC2API) ModifySecurityGroupRulesWithContext(arg0 aws.Context, arg1 *ec2.ModifySecurityGroupRulesInput, arg2 ...request.Option) (*ec2.ModifySecurityGroupRulesOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ModifySecurityGroupRulesWithContext", varargs...) + ret0, _ := ret[0].(*ec2.ModifySecurityGroupRulesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ModifySecurityGroupRulesWithContext indicates an expected call of ModifySecurityGroupRulesWithContext. +func (mr *MockEC2APIMockRecorder) ModifySecurityGroupRulesWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifySecurityGroupRulesWithContext", reflect.TypeOf((*MockEC2API)(nil).ModifySecurityGroupRulesWithContext), varargs...) +} + // ModifySnapshotAttribute mocks base method. func (m *MockEC2API) ModifySnapshotAttribute(arg0 *ec2.ModifySnapshotAttributeInput) (*ec2.ModifySnapshotAttributeOutput, error) { m.ctrl.T.Helper() diff --git a/go.mod b/go.mod index e13a96ce..240968b2 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/gruntwork-io/cloud-nuke go 1.13 require ( - github.com/aws/aws-sdk-go v1.38.68 + github.com/aws/aws-sdk-go v1.42.4 github.com/fatih/color v1.9.0 github.com/golang/mock v1.6.0 github.com/gruntwork-io/go-commons v0.8.2 diff --git a/go.sum b/go.sum index 7bb52cfe..d9112fbc 100644 --- a/go.sum +++ b/go.sum @@ -68,8 +68,8 @@ github.com/aws/aws-sdk-go v1.27.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/aws/aws-sdk-go v1.30.0/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.34.27/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.38.28/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.38.68 h1:aOG8geU4SohNp659eKBHRBgbqSrZ6jNZlfimIuJAwL8= -github.com/aws/aws-sdk-go v1.38.68/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.42.4 h1:L3gadqlmmdWCDE7aD52l3A5TKVG9jPBHZG1/65x9GVw= +github.com/aws/aws-sdk-go v1.42.4/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -507,8 +507,9 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e h1:XpT3nA5TvE525Ne3hInMh6+GETgn27Zfm9dxsThnX2Q= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -559,6 +560,7 @@ golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -568,8 +570,9 @@ golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fq golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=