github.com/aavshr/aws-sdk-go@v1.41.3/service/costexplorer/costexploreriface/interface.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 // Package costexploreriface provides an interface to enable mocking the AWS Cost Explorer Service service client 4 // for testing your code. 5 // 6 // It is important to note that this interface will have breaking changes 7 // when the service model is updated and adds new API operations, paginators, 8 // and waiters. 9 package costexploreriface 10 11 import ( 12 "github.com/aavshr/aws-sdk-go/aws" 13 "github.com/aavshr/aws-sdk-go/aws/request" 14 "github.com/aavshr/aws-sdk-go/service/costexplorer" 15 ) 16 17 // CostExplorerAPI provides an interface to enable mocking the 18 // costexplorer.CostExplorer service client's API operation, 19 // paginators, and waiters. This make unit testing your code that calls out 20 // to the SDK's service client's calls easier. 21 // 22 // The best way to use this interface is so the SDK's service client's calls 23 // can be stubbed out for unit testing your code with the SDK without needing 24 // to inject custom request handlers into the SDK's request pipeline. 25 // 26 // // myFunc uses an SDK service client to make a request to 27 // // AWS Cost Explorer Service. 28 // func myFunc(svc costexploreriface.CostExplorerAPI) bool { 29 // // Make svc.CreateAnomalyMonitor request 30 // } 31 // 32 // func main() { 33 // sess := session.New() 34 // svc := costexplorer.New(sess) 35 // 36 // myFunc(svc) 37 // } 38 // 39 // In your _test.go file: 40 // 41 // // Define a mock struct to be used in your unit tests of myFunc. 42 // type mockCostExplorerClient struct { 43 // costexploreriface.CostExplorerAPI 44 // } 45 // func (m *mockCostExplorerClient) CreateAnomalyMonitor(input *costexplorer.CreateAnomalyMonitorInput) (*costexplorer.CreateAnomalyMonitorOutput, error) { 46 // // mock response/functionality 47 // } 48 // 49 // func TestMyFunc(t *testing.T) { 50 // // Setup Test 51 // mockSvc := &mockCostExplorerClient{} 52 // 53 // myfunc(mockSvc) 54 // 55 // // Verify myFunc's functionality 56 // } 57 // 58 // It is important to note that this interface will have breaking changes 59 // when the service model is updated and adds new API operations, paginators, 60 // and waiters. Its suggested to use the pattern above for testing, or using 61 // tooling to generate mocks to satisfy the interfaces. 62 type CostExplorerAPI interface { 63 CreateAnomalyMonitor(*costexplorer.CreateAnomalyMonitorInput) (*costexplorer.CreateAnomalyMonitorOutput, error) 64 CreateAnomalyMonitorWithContext(aws.Context, *costexplorer.CreateAnomalyMonitorInput, ...request.Option) (*costexplorer.CreateAnomalyMonitorOutput, error) 65 CreateAnomalyMonitorRequest(*costexplorer.CreateAnomalyMonitorInput) (*request.Request, *costexplorer.CreateAnomalyMonitorOutput) 66 67 CreateAnomalySubscription(*costexplorer.CreateAnomalySubscriptionInput) (*costexplorer.CreateAnomalySubscriptionOutput, error) 68 CreateAnomalySubscriptionWithContext(aws.Context, *costexplorer.CreateAnomalySubscriptionInput, ...request.Option) (*costexplorer.CreateAnomalySubscriptionOutput, error) 69 CreateAnomalySubscriptionRequest(*costexplorer.CreateAnomalySubscriptionInput) (*request.Request, *costexplorer.CreateAnomalySubscriptionOutput) 70 71 CreateCostCategoryDefinition(*costexplorer.CreateCostCategoryDefinitionInput) (*costexplorer.CreateCostCategoryDefinitionOutput, error) 72 CreateCostCategoryDefinitionWithContext(aws.Context, *costexplorer.CreateCostCategoryDefinitionInput, ...request.Option) (*costexplorer.CreateCostCategoryDefinitionOutput, error) 73 CreateCostCategoryDefinitionRequest(*costexplorer.CreateCostCategoryDefinitionInput) (*request.Request, *costexplorer.CreateCostCategoryDefinitionOutput) 74 75 DeleteAnomalyMonitor(*costexplorer.DeleteAnomalyMonitorInput) (*costexplorer.DeleteAnomalyMonitorOutput, error) 76 DeleteAnomalyMonitorWithContext(aws.Context, *costexplorer.DeleteAnomalyMonitorInput, ...request.Option) (*costexplorer.DeleteAnomalyMonitorOutput, error) 77 DeleteAnomalyMonitorRequest(*costexplorer.DeleteAnomalyMonitorInput) (*request.Request, *costexplorer.DeleteAnomalyMonitorOutput) 78 79 DeleteAnomalySubscription(*costexplorer.DeleteAnomalySubscriptionInput) (*costexplorer.DeleteAnomalySubscriptionOutput, error) 80 DeleteAnomalySubscriptionWithContext(aws.Context, *costexplorer.DeleteAnomalySubscriptionInput, ...request.Option) (*costexplorer.DeleteAnomalySubscriptionOutput, error) 81 DeleteAnomalySubscriptionRequest(*costexplorer.DeleteAnomalySubscriptionInput) (*request.Request, *costexplorer.DeleteAnomalySubscriptionOutput) 82 83 DeleteCostCategoryDefinition(*costexplorer.DeleteCostCategoryDefinitionInput) (*costexplorer.DeleteCostCategoryDefinitionOutput, error) 84 DeleteCostCategoryDefinitionWithContext(aws.Context, *costexplorer.DeleteCostCategoryDefinitionInput, ...request.Option) (*costexplorer.DeleteCostCategoryDefinitionOutput, error) 85 DeleteCostCategoryDefinitionRequest(*costexplorer.DeleteCostCategoryDefinitionInput) (*request.Request, *costexplorer.DeleteCostCategoryDefinitionOutput) 86 87 DescribeCostCategoryDefinition(*costexplorer.DescribeCostCategoryDefinitionInput) (*costexplorer.DescribeCostCategoryDefinitionOutput, error) 88 DescribeCostCategoryDefinitionWithContext(aws.Context, *costexplorer.DescribeCostCategoryDefinitionInput, ...request.Option) (*costexplorer.DescribeCostCategoryDefinitionOutput, error) 89 DescribeCostCategoryDefinitionRequest(*costexplorer.DescribeCostCategoryDefinitionInput) (*request.Request, *costexplorer.DescribeCostCategoryDefinitionOutput) 90 91 GetAnomalies(*costexplorer.GetAnomaliesInput) (*costexplorer.GetAnomaliesOutput, error) 92 GetAnomaliesWithContext(aws.Context, *costexplorer.GetAnomaliesInput, ...request.Option) (*costexplorer.GetAnomaliesOutput, error) 93 GetAnomaliesRequest(*costexplorer.GetAnomaliesInput) (*request.Request, *costexplorer.GetAnomaliesOutput) 94 95 GetAnomalyMonitors(*costexplorer.GetAnomalyMonitorsInput) (*costexplorer.GetAnomalyMonitorsOutput, error) 96 GetAnomalyMonitorsWithContext(aws.Context, *costexplorer.GetAnomalyMonitorsInput, ...request.Option) (*costexplorer.GetAnomalyMonitorsOutput, error) 97 GetAnomalyMonitorsRequest(*costexplorer.GetAnomalyMonitorsInput) (*request.Request, *costexplorer.GetAnomalyMonitorsOutput) 98 99 GetAnomalySubscriptions(*costexplorer.GetAnomalySubscriptionsInput) (*costexplorer.GetAnomalySubscriptionsOutput, error) 100 GetAnomalySubscriptionsWithContext(aws.Context, *costexplorer.GetAnomalySubscriptionsInput, ...request.Option) (*costexplorer.GetAnomalySubscriptionsOutput, error) 101 GetAnomalySubscriptionsRequest(*costexplorer.GetAnomalySubscriptionsInput) (*request.Request, *costexplorer.GetAnomalySubscriptionsOutput) 102 103 GetCostAndUsage(*costexplorer.GetCostAndUsageInput) (*costexplorer.GetCostAndUsageOutput, error) 104 GetCostAndUsageWithContext(aws.Context, *costexplorer.GetCostAndUsageInput, ...request.Option) (*costexplorer.GetCostAndUsageOutput, error) 105 GetCostAndUsageRequest(*costexplorer.GetCostAndUsageInput) (*request.Request, *costexplorer.GetCostAndUsageOutput) 106 107 GetCostAndUsageWithResources(*costexplorer.GetCostAndUsageWithResourcesInput) (*costexplorer.GetCostAndUsageWithResourcesOutput, error) 108 GetCostAndUsageWithResourcesWithContext(aws.Context, *costexplorer.GetCostAndUsageWithResourcesInput, ...request.Option) (*costexplorer.GetCostAndUsageWithResourcesOutput, error) 109 GetCostAndUsageWithResourcesRequest(*costexplorer.GetCostAndUsageWithResourcesInput) (*request.Request, *costexplorer.GetCostAndUsageWithResourcesOutput) 110 111 GetCostCategories(*costexplorer.GetCostCategoriesInput) (*costexplorer.GetCostCategoriesOutput, error) 112 GetCostCategoriesWithContext(aws.Context, *costexplorer.GetCostCategoriesInput, ...request.Option) (*costexplorer.GetCostCategoriesOutput, error) 113 GetCostCategoriesRequest(*costexplorer.GetCostCategoriesInput) (*request.Request, *costexplorer.GetCostCategoriesOutput) 114 115 GetCostForecast(*costexplorer.GetCostForecastInput) (*costexplorer.GetCostForecastOutput, error) 116 GetCostForecastWithContext(aws.Context, *costexplorer.GetCostForecastInput, ...request.Option) (*costexplorer.GetCostForecastOutput, error) 117 GetCostForecastRequest(*costexplorer.GetCostForecastInput) (*request.Request, *costexplorer.GetCostForecastOutput) 118 119 GetDimensionValues(*costexplorer.GetDimensionValuesInput) (*costexplorer.GetDimensionValuesOutput, error) 120 GetDimensionValuesWithContext(aws.Context, *costexplorer.GetDimensionValuesInput, ...request.Option) (*costexplorer.GetDimensionValuesOutput, error) 121 GetDimensionValuesRequest(*costexplorer.GetDimensionValuesInput) (*request.Request, *costexplorer.GetDimensionValuesOutput) 122 123 GetReservationCoverage(*costexplorer.GetReservationCoverageInput) (*costexplorer.GetReservationCoverageOutput, error) 124 GetReservationCoverageWithContext(aws.Context, *costexplorer.GetReservationCoverageInput, ...request.Option) (*costexplorer.GetReservationCoverageOutput, error) 125 GetReservationCoverageRequest(*costexplorer.GetReservationCoverageInput) (*request.Request, *costexplorer.GetReservationCoverageOutput) 126 127 GetReservationPurchaseRecommendation(*costexplorer.GetReservationPurchaseRecommendationInput) (*costexplorer.GetReservationPurchaseRecommendationOutput, error) 128 GetReservationPurchaseRecommendationWithContext(aws.Context, *costexplorer.GetReservationPurchaseRecommendationInput, ...request.Option) (*costexplorer.GetReservationPurchaseRecommendationOutput, error) 129 GetReservationPurchaseRecommendationRequest(*costexplorer.GetReservationPurchaseRecommendationInput) (*request.Request, *costexplorer.GetReservationPurchaseRecommendationOutput) 130 131 GetReservationUtilization(*costexplorer.GetReservationUtilizationInput) (*costexplorer.GetReservationUtilizationOutput, error) 132 GetReservationUtilizationWithContext(aws.Context, *costexplorer.GetReservationUtilizationInput, ...request.Option) (*costexplorer.GetReservationUtilizationOutput, error) 133 GetReservationUtilizationRequest(*costexplorer.GetReservationUtilizationInput) (*request.Request, *costexplorer.GetReservationUtilizationOutput) 134 135 GetRightsizingRecommendation(*costexplorer.GetRightsizingRecommendationInput) (*costexplorer.GetRightsizingRecommendationOutput, error) 136 GetRightsizingRecommendationWithContext(aws.Context, *costexplorer.GetRightsizingRecommendationInput, ...request.Option) (*costexplorer.GetRightsizingRecommendationOutput, error) 137 GetRightsizingRecommendationRequest(*costexplorer.GetRightsizingRecommendationInput) (*request.Request, *costexplorer.GetRightsizingRecommendationOutput) 138 139 GetSavingsPlansCoverage(*costexplorer.GetSavingsPlansCoverageInput) (*costexplorer.GetSavingsPlansCoverageOutput, error) 140 GetSavingsPlansCoverageWithContext(aws.Context, *costexplorer.GetSavingsPlansCoverageInput, ...request.Option) (*costexplorer.GetSavingsPlansCoverageOutput, error) 141 GetSavingsPlansCoverageRequest(*costexplorer.GetSavingsPlansCoverageInput) (*request.Request, *costexplorer.GetSavingsPlansCoverageOutput) 142 143 GetSavingsPlansCoveragePages(*costexplorer.GetSavingsPlansCoverageInput, func(*costexplorer.GetSavingsPlansCoverageOutput, bool) bool) error 144 GetSavingsPlansCoveragePagesWithContext(aws.Context, *costexplorer.GetSavingsPlansCoverageInput, func(*costexplorer.GetSavingsPlansCoverageOutput, bool) bool, ...request.Option) error 145 146 GetSavingsPlansPurchaseRecommendation(*costexplorer.GetSavingsPlansPurchaseRecommendationInput) (*costexplorer.GetSavingsPlansPurchaseRecommendationOutput, error) 147 GetSavingsPlansPurchaseRecommendationWithContext(aws.Context, *costexplorer.GetSavingsPlansPurchaseRecommendationInput, ...request.Option) (*costexplorer.GetSavingsPlansPurchaseRecommendationOutput, error) 148 GetSavingsPlansPurchaseRecommendationRequest(*costexplorer.GetSavingsPlansPurchaseRecommendationInput) (*request.Request, *costexplorer.GetSavingsPlansPurchaseRecommendationOutput) 149 150 GetSavingsPlansUtilization(*costexplorer.GetSavingsPlansUtilizationInput) (*costexplorer.GetSavingsPlansUtilizationOutput, error) 151 GetSavingsPlansUtilizationWithContext(aws.Context, *costexplorer.GetSavingsPlansUtilizationInput, ...request.Option) (*costexplorer.GetSavingsPlansUtilizationOutput, error) 152 GetSavingsPlansUtilizationRequest(*costexplorer.GetSavingsPlansUtilizationInput) (*request.Request, *costexplorer.GetSavingsPlansUtilizationOutput) 153 154 GetSavingsPlansUtilizationDetails(*costexplorer.GetSavingsPlansUtilizationDetailsInput) (*costexplorer.GetSavingsPlansUtilizationDetailsOutput, error) 155 GetSavingsPlansUtilizationDetailsWithContext(aws.Context, *costexplorer.GetSavingsPlansUtilizationDetailsInput, ...request.Option) (*costexplorer.GetSavingsPlansUtilizationDetailsOutput, error) 156 GetSavingsPlansUtilizationDetailsRequest(*costexplorer.GetSavingsPlansUtilizationDetailsInput) (*request.Request, *costexplorer.GetSavingsPlansUtilizationDetailsOutput) 157 158 GetSavingsPlansUtilizationDetailsPages(*costexplorer.GetSavingsPlansUtilizationDetailsInput, func(*costexplorer.GetSavingsPlansUtilizationDetailsOutput, bool) bool) error 159 GetSavingsPlansUtilizationDetailsPagesWithContext(aws.Context, *costexplorer.GetSavingsPlansUtilizationDetailsInput, func(*costexplorer.GetSavingsPlansUtilizationDetailsOutput, bool) bool, ...request.Option) error 160 161 GetTags(*costexplorer.GetTagsInput) (*costexplorer.GetTagsOutput, error) 162 GetTagsWithContext(aws.Context, *costexplorer.GetTagsInput, ...request.Option) (*costexplorer.GetTagsOutput, error) 163 GetTagsRequest(*costexplorer.GetTagsInput) (*request.Request, *costexplorer.GetTagsOutput) 164 165 GetUsageForecast(*costexplorer.GetUsageForecastInput) (*costexplorer.GetUsageForecastOutput, error) 166 GetUsageForecastWithContext(aws.Context, *costexplorer.GetUsageForecastInput, ...request.Option) (*costexplorer.GetUsageForecastOutput, error) 167 GetUsageForecastRequest(*costexplorer.GetUsageForecastInput) (*request.Request, *costexplorer.GetUsageForecastOutput) 168 169 ListCostCategoryDefinitions(*costexplorer.ListCostCategoryDefinitionsInput) (*costexplorer.ListCostCategoryDefinitionsOutput, error) 170 ListCostCategoryDefinitionsWithContext(aws.Context, *costexplorer.ListCostCategoryDefinitionsInput, ...request.Option) (*costexplorer.ListCostCategoryDefinitionsOutput, error) 171 ListCostCategoryDefinitionsRequest(*costexplorer.ListCostCategoryDefinitionsInput) (*request.Request, *costexplorer.ListCostCategoryDefinitionsOutput) 172 173 ListCostCategoryDefinitionsPages(*costexplorer.ListCostCategoryDefinitionsInput, func(*costexplorer.ListCostCategoryDefinitionsOutput, bool) bool) error 174 ListCostCategoryDefinitionsPagesWithContext(aws.Context, *costexplorer.ListCostCategoryDefinitionsInput, func(*costexplorer.ListCostCategoryDefinitionsOutput, bool) bool, ...request.Option) error 175 176 ProvideAnomalyFeedback(*costexplorer.ProvideAnomalyFeedbackInput) (*costexplorer.ProvideAnomalyFeedbackOutput, error) 177 ProvideAnomalyFeedbackWithContext(aws.Context, *costexplorer.ProvideAnomalyFeedbackInput, ...request.Option) (*costexplorer.ProvideAnomalyFeedbackOutput, error) 178 ProvideAnomalyFeedbackRequest(*costexplorer.ProvideAnomalyFeedbackInput) (*request.Request, *costexplorer.ProvideAnomalyFeedbackOutput) 179 180 UpdateAnomalyMonitor(*costexplorer.UpdateAnomalyMonitorInput) (*costexplorer.UpdateAnomalyMonitorOutput, error) 181 UpdateAnomalyMonitorWithContext(aws.Context, *costexplorer.UpdateAnomalyMonitorInput, ...request.Option) (*costexplorer.UpdateAnomalyMonitorOutput, error) 182 UpdateAnomalyMonitorRequest(*costexplorer.UpdateAnomalyMonitorInput) (*request.Request, *costexplorer.UpdateAnomalyMonitorOutput) 183 184 UpdateAnomalySubscription(*costexplorer.UpdateAnomalySubscriptionInput) (*costexplorer.UpdateAnomalySubscriptionOutput, error) 185 UpdateAnomalySubscriptionWithContext(aws.Context, *costexplorer.UpdateAnomalySubscriptionInput, ...request.Option) (*costexplorer.UpdateAnomalySubscriptionOutput, error) 186 UpdateAnomalySubscriptionRequest(*costexplorer.UpdateAnomalySubscriptionInput) (*request.Request, *costexplorer.UpdateAnomalySubscriptionOutput) 187 188 UpdateCostCategoryDefinition(*costexplorer.UpdateCostCategoryDefinitionInput) (*costexplorer.UpdateCostCategoryDefinitionOutput, error) 189 UpdateCostCategoryDefinitionWithContext(aws.Context, *costexplorer.UpdateCostCategoryDefinitionInput, ...request.Option) (*costexplorer.UpdateCostCategoryDefinitionOutput, error) 190 UpdateCostCategoryDefinitionRequest(*costexplorer.UpdateCostCategoryDefinitionInput) (*request.Request, *costexplorer.UpdateCostCategoryDefinitionOutput) 191 } 192 193 var _ CostExplorerAPI = (*costexplorer.CostExplorer)(nil)