1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package costexplorer 4 5import ( 6 "fmt" 7 8 "github.com/aws/aws-sdk-go/aws" 9 "github.com/aws/aws-sdk-go/aws/awsutil" 10 "github.com/aws/aws-sdk-go/aws/request" 11) 12 13const opCreateCostCategoryDefinition = "CreateCostCategoryDefinition" 14 15// CreateCostCategoryDefinitionRequest generates a "aws/request.Request" representing the 16// client's request for the CreateCostCategoryDefinition operation. The "output" return 17// value will be populated with the request's response once the request completes 18// successfully. 19// 20// Use "Send" method on the returned Request to send the API call to the service. 21// the "output" return value is not valid until after Send returns without error. 22// 23// See CreateCostCategoryDefinition for more information on using the CreateCostCategoryDefinition 24// API call, and error handling. 25// 26// This method is useful when you want to inject custom logic or configuration 27// into the SDK's request lifecycle. Such as custom headers, or retry logic. 28// 29// 30// // Example sending a request using the CreateCostCategoryDefinitionRequest method. 31// req, resp := client.CreateCostCategoryDefinitionRequest(params) 32// 33// err := req.Send() 34// if err == nil { // resp is now filled 35// fmt.Println(resp) 36// } 37// 38// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/CreateCostCategoryDefinition 39func (c *CostExplorer) CreateCostCategoryDefinitionRequest(input *CreateCostCategoryDefinitionInput) (req *request.Request, output *CreateCostCategoryDefinitionOutput) { 40 op := &request.Operation{ 41 Name: opCreateCostCategoryDefinition, 42 HTTPMethod: "POST", 43 HTTPPath: "/", 44 } 45 46 if input == nil { 47 input = &CreateCostCategoryDefinitionInput{} 48 } 49 50 output = &CreateCostCategoryDefinitionOutput{} 51 req = c.newRequest(op, input, output) 52 return 53} 54 55// CreateCostCategoryDefinition API operation for AWS Cost Explorer Service. 56// 57// 58// Cost Category is in preview release for AWS Billing and Cost Management 59// and is subject to change. Your use of Cost Categories is subject to the 60// Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) 61// (Section 1.10). 62// 63// Creates a new Cost Category with the requested name and rules. 64// 65// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 66// with awserr.Error's Code and Message methods to get detailed information about 67// the error. 68// 69// See the AWS API reference guide for AWS Cost Explorer Service's 70// API operation CreateCostCategoryDefinition for usage and error information. 71// 72// Returned Error Codes: 73// * ErrCodeServiceQuotaExceededException "ServiceQuotaExceededException" 74// You've reached the limit on the number of resources you can create, or exceeded 75// the size of an individual resources. 76// 77// * ErrCodeLimitExceededException "LimitExceededException" 78// You made too many calls in a short period of time. Try again later. 79// 80// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/CreateCostCategoryDefinition 81func (c *CostExplorer) CreateCostCategoryDefinition(input *CreateCostCategoryDefinitionInput) (*CreateCostCategoryDefinitionOutput, error) { 82 req, out := c.CreateCostCategoryDefinitionRequest(input) 83 return out, req.Send() 84} 85 86// CreateCostCategoryDefinitionWithContext is the same as CreateCostCategoryDefinition with the addition of 87// the ability to pass a context and additional request options. 88// 89// See CreateCostCategoryDefinition for details on how to use this API operation. 90// 91// The context must be non-nil and will be used for request cancellation. If 92// the context is nil a panic will occur. In the future the SDK may create 93// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 94// for more information on using Contexts. 95func (c *CostExplorer) CreateCostCategoryDefinitionWithContext(ctx aws.Context, input *CreateCostCategoryDefinitionInput, opts ...request.Option) (*CreateCostCategoryDefinitionOutput, error) { 96 req, out := c.CreateCostCategoryDefinitionRequest(input) 97 req.SetContext(ctx) 98 req.ApplyOptions(opts...) 99 return out, req.Send() 100} 101 102const opDeleteCostCategoryDefinition = "DeleteCostCategoryDefinition" 103 104// DeleteCostCategoryDefinitionRequest generates a "aws/request.Request" representing the 105// client's request for the DeleteCostCategoryDefinition operation. The "output" return 106// value will be populated with the request's response once the request completes 107// successfully. 108// 109// Use "Send" method on the returned Request to send the API call to the service. 110// the "output" return value is not valid until after Send returns without error. 111// 112// See DeleteCostCategoryDefinition for more information on using the DeleteCostCategoryDefinition 113// API call, and error handling. 114// 115// This method is useful when you want to inject custom logic or configuration 116// into the SDK's request lifecycle. Such as custom headers, or retry logic. 117// 118// 119// // Example sending a request using the DeleteCostCategoryDefinitionRequest method. 120// req, resp := client.DeleteCostCategoryDefinitionRequest(params) 121// 122// err := req.Send() 123// if err == nil { // resp is now filled 124// fmt.Println(resp) 125// } 126// 127// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/DeleteCostCategoryDefinition 128func (c *CostExplorer) DeleteCostCategoryDefinitionRequest(input *DeleteCostCategoryDefinitionInput) (req *request.Request, output *DeleteCostCategoryDefinitionOutput) { 129 op := &request.Operation{ 130 Name: opDeleteCostCategoryDefinition, 131 HTTPMethod: "POST", 132 HTTPPath: "/", 133 } 134 135 if input == nil { 136 input = &DeleteCostCategoryDefinitionInput{} 137 } 138 139 output = &DeleteCostCategoryDefinitionOutput{} 140 req = c.newRequest(op, input, output) 141 return 142} 143 144// DeleteCostCategoryDefinition API operation for AWS Cost Explorer Service. 145// 146// 147// Cost Category is in preview release for AWS Billing and Cost Management 148// and is subject to change. Your use of Cost Categories is subject to the 149// Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) 150// (Section 1.10). 151// 152// Deletes a Cost Category. Expenses from this month going forward will no longer 153// be categorized with this Cost Category. 154// 155// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 156// with awserr.Error's Code and Message methods to get detailed information about 157// the error. 158// 159// See the AWS API reference guide for AWS Cost Explorer Service's 160// API operation DeleteCostCategoryDefinition for usage and error information. 161// 162// Returned Error Codes: 163// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 164// The specified ARN in the request doesn't exist. 165// 166// * ErrCodeLimitExceededException "LimitExceededException" 167// You made too many calls in a short period of time. Try again later. 168// 169// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/DeleteCostCategoryDefinition 170func (c *CostExplorer) DeleteCostCategoryDefinition(input *DeleteCostCategoryDefinitionInput) (*DeleteCostCategoryDefinitionOutput, error) { 171 req, out := c.DeleteCostCategoryDefinitionRequest(input) 172 return out, req.Send() 173} 174 175// DeleteCostCategoryDefinitionWithContext is the same as DeleteCostCategoryDefinition with the addition of 176// the ability to pass a context and additional request options. 177// 178// See DeleteCostCategoryDefinition for details on how to use this API operation. 179// 180// The context must be non-nil and will be used for request cancellation. If 181// the context is nil a panic will occur. In the future the SDK may create 182// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 183// for more information on using Contexts. 184func (c *CostExplorer) DeleteCostCategoryDefinitionWithContext(ctx aws.Context, input *DeleteCostCategoryDefinitionInput, opts ...request.Option) (*DeleteCostCategoryDefinitionOutput, error) { 185 req, out := c.DeleteCostCategoryDefinitionRequest(input) 186 req.SetContext(ctx) 187 req.ApplyOptions(opts...) 188 return out, req.Send() 189} 190 191const opDescribeCostCategoryDefinition = "DescribeCostCategoryDefinition" 192 193// DescribeCostCategoryDefinitionRequest generates a "aws/request.Request" representing the 194// client's request for the DescribeCostCategoryDefinition operation. The "output" return 195// value will be populated with the request's response once the request completes 196// successfully. 197// 198// Use "Send" method on the returned Request to send the API call to the service. 199// the "output" return value is not valid until after Send returns without error. 200// 201// See DescribeCostCategoryDefinition for more information on using the DescribeCostCategoryDefinition 202// API call, and error handling. 203// 204// This method is useful when you want to inject custom logic or configuration 205// into the SDK's request lifecycle. Such as custom headers, or retry logic. 206// 207// 208// // Example sending a request using the DescribeCostCategoryDefinitionRequest method. 209// req, resp := client.DescribeCostCategoryDefinitionRequest(params) 210// 211// err := req.Send() 212// if err == nil { // resp is now filled 213// fmt.Println(resp) 214// } 215// 216// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/DescribeCostCategoryDefinition 217func (c *CostExplorer) DescribeCostCategoryDefinitionRequest(input *DescribeCostCategoryDefinitionInput) (req *request.Request, output *DescribeCostCategoryDefinitionOutput) { 218 op := &request.Operation{ 219 Name: opDescribeCostCategoryDefinition, 220 HTTPMethod: "POST", 221 HTTPPath: "/", 222 } 223 224 if input == nil { 225 input = &DescribeCostCategoryDefinitionInput{} 226 } 227 228 output = &DescribeCostCategoryDefinitionOutput{} 229 req = c.newRequest(op, input, output) 230 return 231} 232 233// DescribeCostCategoryDefinition API operation for AWS Cost Explorer Service. 234// 235// 236// Cost Category is in preview release for AWS Billing and Cost Management 237// and is subject to change. Your use of Cost Categories is subject to the 238// Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) 239// (Section 1.10). 240// 241// Returns the name, ARN, rules, definition, and effective dates of a Cost Category 242// that's defined in the account. 243// 244// You have the option to use EffectiveOn to return a Cost Category that is 245// active on a specific date. If there is no EffectiveOn specified, you’ll 246// see a Cost Category that is effective on the current date. If Cost Category 247// is still effective, EffectiveEnd is omitted in the response. 248// 249// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 250// with awserr.Error's Code and Message methods to get detailed information about 251// the error. 252// 253// See the AWS API reference guide for AWS Cost Explorer Service's 254// API operation DescribeCostCategoryDefinition for usage and error information. 255// 256// Returned Error Codes: 257// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 258// The specified ARN in the request doesn't exist. 259// 260// * ErrCodeLimitExceededException "LimitExceededException" 261// You made too many calls in a short period of time. Try again later. 262// 263// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/DescribeCostCategoryDefinition 264func (c *CostExplorer) DescribeCostCategoryDefinition(input *DescribeCostCategoryDefinitionInput) (*DescribeCostCategoryDefinitionOutput, error) { 265 req, out := c.DescribeCostCategoryDefinitionRequest(input) 266 return out, req.Send() 267} 268 269// DescribeCostCategoryDefinitionWithContext is the same as DescribeCostCategoryDefinition with the addition of 270// the ability to pass a context and additional request options. 271// 272// See DescribeCostCategoryDefinition for details on how to use this API operation. 273// 274// The context must be non-nil and will be used for request cancellation. If 275// the context is nil a panic will occur. In the future the SDK may create 276// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 277// for more information on using Contexts. 278func (c *CostExplorer) DescribeCostCategoryDefinitionWithContext(ctx aws.Context, input *DescribeCostCategoryDefinitionInput, opts ...request.Option) (*DescribeCostCategoryDefinitionOutput, error) { 279 req, out := c.DescribeCostCategoryDefinitionRequest(input) 280 req.SetContext(ctx) 281 req.ApplyOptions(opts...) 282 return out, req.Send() 283} 284 285const opGetCostAndUsage = "GetCostAndUsage" 286 287// GetCostAndUsageRequest generates a "aws/request.Request" representing the 288// client's request for the GetCostAndUsage operation. The "output" return 289// value will be populated with the request's response once the request completes 290// successfully. 291// 292// Use "Send" method on the returned Request to send the API call to the service. 293// the "output" return value is not valid until after Send returns without error. 294// 295// See GetCostAndUsage for more information on using the GetCostAndUsage 296// API call, and error handling. 297// 298// This method is useful when you want to inject custom logic or configuration 299// into the SDK's request lifecycle. Such as custom headers, or retry logic. 300// 301// 302// // Example sending a request using the GetCostAndUsageRequest method. 303// req, resp := client.GetCostAndUsageRequest(params) 304// 305// err := req.Send() 306// if err == nil { // resp is now filled 307// fmt.Println(resp) 308// } 309// 310// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetCostAndUsage 311func (c *CostExplorer) GetCostAndUsageRequest(input *GetCostAndUsageInput) (req *request.Request, output *GetCostAndUsageOutput) { 312 op := &request.Operation{ 313 Name: opGetCostAndUsage, 314 HTTPMethod: "POST", 315 HTTPPath: "/", 316 } 317 318 if input == nil { 319 input = &GetCostAndUsageInput{} 320 } 321 322 output = &GetCostAndUsageOutput{} 323 req = c.newRequest(op, input, output) 324 return 325} 326 327// GetCostAndUsage API operation for AWS Cost Explorer Service. 328// 329// Retrieves cost and usage metrics for your account. You can specify which 330// cost and usage-related metric, such as BlendedCosts or UsageQuantity, that 331// you want the request to return. You can also filter and group your data by 332// various dimensions, such as SERVICE or AZ, in a specific time range. For 333// a complete list of valid dimensions, see the GetDimensionValues (http://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_GetDimensionValues.html) 334// operation. Master accounts in an organization in AWS Organizations have access 335// to all member accounts. 336// 337// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 338// with awserr.Error's Code and Message methods to get detailed information about 339// the error. 340// 341// See the AWS API reference guide for AWS Cost Explorer Service's 342// API operation GetCostAndUsage for usage and error information. 343// 344// Returned Error Codes: 345// * ErrCodeLimitExceededException "LimitExceededException" 346// You made too many calls in a short period of time. Try again later. 347// 348// * ErrCodeBillExpirationException "BillExpirationException" 349// The requested report expired. Update the date interval and try again. 350// 351// * ErrCodeDataUnavailableException "DataUnavailableException" 352// The requested data is unavailable. 353// 354// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" 355// The pagination token is invalid. Try again without a pagination token. 356// 357// * ErrCodeRequestChangedException "RequestChangedException" 358// Your request parameters changed between pages. Try again with the old parameters 359// or without a pagination token. 360// 361// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetCostAndUsage 362func (c *CostExplorer) GetCostAndUsage(input *GetCostAndUsageInput) (*GetCostAndUsageOutput, error) { 363 req, out := c.GetCostAndUsageRequest(input) 364 return out, req.Send() 365} 366 367// GetCostAndUsageWithContext is the same as GetCostAndUsage with the addition of 368// the ability to pass a context and additional request options. 369// 370// See GetCostAndUsage for details on how to use this API operation. 371// 372// The context must be non-nil and will be used for request cancellation. If 373// the context is nil a panic will occur. In the future the SDK may create 374// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 375// for more information on using Contexts. 376func (c *CostExplorer) GetCostAndUsageWithContext(ctx aws.Context, input *GetCostAndUsageInput, opts ...request.Option) (*GetCostAndUsageOutput, error) { 377 req, out := c.GetCostAndUsageRequest(input) 378 req.SetContext(ctx) 379 req.ApplyOptions(opts...) 380 return out, req.Send() 381} 382 383const opGetCostAndUsageWithResources = "GetCostAndUsageWithResources" 384 385// GetCostAndUsageWithResourcesRequest generates a "aws/request.Request" representing the 386// client's request for the GetCostAndUsageWithResources operation. The "output" return 387// value will be populated with the request's response once the request completes 388// successfully. 389// 390// Use "Send" method on the returned Request to send the API call to the service. 391// the "output" return value is not valid until after Send returns without error. 392// 393// See GetCostAndUsageWithResources for more information on using the GetCostAndUsageWithResources 394// API call, and error handling. 395// 396// This method is useful when you want to inject custom logic or configuration 397// into the SDK's request lifecycle. Such as custom headers, or retry logic. 398// 399// 400// // Example sending a request using the GetCostAndUsageWithResourcesRequest method. 401// req, resp := client.GetCostAndUsageWithResourcesRequest(params) 402// 403// err := req.Send() 404// if err == nil { // resp is now filled 405// fmt.Println(resp) 406// } 407// 408// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetCostAndUsageWithResources 409func (c *CostExplorer) GetCostAndUsageWithResourcesRequest(input *GetCostAndUsageWithResourcesInput) (req *request.Request, output *GetCostAndUsageWithResourcesOutput) { 410 op := &request.Operation{ 411 Name: opGetCostAndUsageWithResources, 412 HTTPMethod: "POST", 413 HTTPPath: "/", 414 } 415 416 if input == nil { 417 input = &GetCostAndUsageWithResourcesInput{} 418 } 419 420 output = &GetCostAndUsageWithResourcesOutput{} 421 req = c.newRequest(op, input, output) 422 return 423} 424 425// GetCostAndUsageWithResources API operation for AWS Cost Explorer Service. 426// 427// Retrieves cost and usage metrics with resources for your account. You can 428// specify which cost and usage-related metric, such as BlendedCosts or UsageQuantity, 429// that you want the request to return. You can also filter and group your data 430// by various dimensions, such as SERVICE or AZ, in a specific time range. For 431// a complete list of valid dimensions, see the GetDimensionValues (http://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_GetDimensionValues.html) 432// operation. Master accounts in an organization in AWS Organizations have access 433// to all member accounts. This API is currently available for the Amazon Elastic 434// Compute Cloud – Compute service only. 435// 436// This is an opt-in only feature. You can enable this feature from the Cost 437// Explorer Settings page. For information on how to access the Settings page, 438// see Controlling Access for Cost Explorer (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/ce-access.html) 439// in the AWS Billing and Cost Management User Guide. 440// 441// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 442// with awserr.Error's Code and Message methods to get detailed information about 443// the error. 444// 445// See the AWS API reference guide for AWS Cost Explorer Service's 446// API operation GetCostAndUsageWithResources for usage and error information. 447// 448// Returned Error Codes: 449// * ErrCodeDataUnavailableException "DataUnavailableException" 450// The requested data is unavailable. 451// 452// * ErrCodeLimitExceededException "LimitExceededException" 453// You made too many calls in a short period of time. Try again later. 454// 455// * ErrCodeBillExpirationException "BillExpirationException" 456// The requested report expired. Update the date interval and try again. 457// 458// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" 459// The pagination token is invalid. Try again without a pagination token. 460// 461// * ErrCodeRequestChangedException "RequestChangedException" 462// Your request parameters changed between pages. Try again with the old parameters 463// or without a pagination token. 464// 465// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetCostAndUsageWithResources 466func (c *CostExplorer) GetCostAndUsageWithResources(input *GetCostAndUsageWithResourcesInput) (*GetCostAndUsageWithResourcesOutput, error) { 467 req, out := c.GetCostAndUsageWithResourcesRequest(input) 468 return out, req.Send() 469} 470 471// GetCostAndUsageWithResourcesWithContext is the same as GetCostAndUsageWithResources with the addition of 472// the ability to pass a context and additional request options. 473// 474// See GetCostAndUsageWithResources for details on how to use this API operation. 475// 476// The context must be non-nil and will be used for request cancellation. If 477// the context is nil a panic will occur. In the future the SDK may create 478// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 479// for more information on using Contexts. 480func (c *CostExplorer) GetCostAndUsageWithResourcesWithContext(ctx aws.Context, input *GetCostAndUsageWithResourcesInput, opts ...request.Option) (*GetCostAndUsageWithResourcesOutput, error) { 481 req, out := c.GetCostAndUsageWithResourcesRequest(input) 482 req.SetContext(ctx) 483 req.ApplyOptions(opts...) 484 return out, req.Send() 485} 486 487const opGetCostForecast = "GetCostForecast" 488 489// GetCostForecastRequest generates a "aws/request.Request" representing the 490// client's request for the GetCostForecast operation. The "output" return 491// value will be populated with the request's response once the request completes 492// successfully. 493// 494// Use "Send" method on the returned Request to send the API call to the service. 495// the "output" return value is not valid until after Send returns without error. 496// 497// See GetCostForecast for more information on using the GetCostForecast 498// API call, and error handling. 499// 500// This method is useful when you want to inject custom logic or configuration 501// into the SDK's request lifecycle. Such as custom headers, or retry logic. 502// 503// 504// // Example sending a request using the GetCostForecastRequest method. 505// req, resp := client.GetCostForecastRequest(params) 506// 507// err := req.Send() 508// if err == nil { // resp is now filled 509// fmt.Println(resp) 510// } 511// 512// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetCostForecast 513func (c *CostExplorer) GetCostForecastRequest(input *GetCostForecastInput) (req *request.Request, output *GetCostForecastOutput) { 514 op := &request.Operation{ 515 Name: opGetCostForecast, 516 HTTPMethod: "POST", 517 HTTPPath: "/", 518 } 519 520 if input == nil { 521 input = &GetCostForecastInput{} 522 } 523 524 output = &GetCostForecastOutput{} 525 req = c.newRequest(op, input, output) 526 return 527} 528 529// GetCostForecast API operation for AWS Cost Explorer Service. 530// 531// Retrieves a forecast for how much Amazon Web Services predicts that you will 532// spend over the forecast time period that you select, based on your past costs. 533// 534// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 535// with awserr.Error's Code and Message methods to get detailed information about 536// the error. 537// 538// See the AWS API reference guide for AWS Cost Explorer Service's 539// API operation GetCostForecast for usage and error information. 540// 541// Returned Error Codes: 542// * ErrCodeLimitExceededException "LimitExceededException" 543// You made too many calls in a short period of time. Try again later. 544// 545// * ErrCodeDataUnavailableException "DataUnavailableException" 546// The requested data is unavailable. 547// 548// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetCostForecast 549func (c *CostExplorer) GetCostForecast(input *GetCostForecastInput) (*GetCostForecastOutput, error) { 550 req, out := c.GetCostForecastRequest(input) 551 return out, req.Send() 552} 553 554// GetCostForecastWithContext is the same as GetCostForecast with the addition of 555// the ability to pass a context and additional request options. 556// 557// See GetCostForecast for details on how to use this API operation. 558// 559// The context must be non-nil and will be used for request cancellation. If 560// the context is nil a panic will occur. In the future the SDK may create 561// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 562// for more information on using Contexts. 563func (c *CostExplorer) GetCostForecastWithContext(ctx aws.Context, input *GetCostForecastInput, opts ...request.Option) (*GetCostForecastOutput, error) { 564 req, out := c.GetCostForecastRequest(input) 565 req.SetContext(ctx) 566 req.ApplyOptions(opts...) 567 return out, req.Send() 568} 569 570const opGetDimensionValues = "GetDimensionValues" 571 572// GetDimensionValuesRequest generates a "aws/request.Request" representing the 573// client's request for the GetDimensionValues operation. The "output" return 574// value will be populated with the request's response once the request completes 575// successfully. 576// 577// Use "Send" method on the returned Request to send the API call to the service. 578// the "output" return value is not valid until after Send returns without error. 579// 580// See GetDimensionValues for more information on using the GetDimensionValues 581// API call, and error handling. 582// 583// This method is useful when you want to inject custom logic or configuration 584// into the SDK's request lifecycle. Such as custom headers, or retry logic. 585// 586// 587// // Example sending a request using the GetDimensionValuesRequest method. 588// req, resp := client.GetDimensionValuesRequest(params) 589// 590// err := req.Send() 591// if err == nil { // resp is now filled 592// fmt.Println(resp) 593// } 594// 595// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetDimensionValues 596func (c *CostExplorer) GetDimensionValuesRequest(input *GetDimensionValuesInput) (req *request.Request, output *GetDimensionValuesOutput) { 597 op := &request.Operation{ 598 Name: opGetDimensionValues, 599 HTTPMethod: "POST", 600 HTTPPath: "/", 601 } 602 603 if input == nil { 604 input = &GetDimensionValuesInput{} 605 } 606 607 output = &GetDimensionValuesOutput{} 608 req = c.newRequest(op, input, output) 609 return 610} 611 612// GetDimensionValues API operation for AWS Cost Explorer Service. 613// 614// Retrieves all available filter values for a specified filter over a period 615// of time. You can search the dimension values for an arbitrary string. 616// 617// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 618// with awserr.Error's Code and Message methods to get detailed information about 619// the error. 620// 621// See the AWS API reference guide for AWS Cost Explorer Service's 622// API operation GetDimensionValues for usage and error information. 623// 624// Returned Error Codes: 625// * ErrCodeLimitExceededException "LimitExceededException" 626// You made too many calls in a short period of time. Try again later. 627// 628// * ErrCodeBillExpirationException "BillExpirationException" 629// The requested report expired. Update the date interval and try again. 630// 631// * ErrCodeDataUnavailableException "DataUnavailableException" 632// The requested data is unavailable. 633// 634// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" 635// The pagination token is invalid. Try again without a pagination token. 636// 637// * ErrCodeRequestChangedException "RequestChangedException" 638// Your request parameters changed between pages. Try again with the old parameters 639// or without a pagination token. 640// 641// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetDimensionValues 642func (c *CostExplorer) GetDimensionValues(input *GetDimensionValuesInput) (*GetDimensionValuesOutput, error) { 643 req, out := c.GetDimensionValuesRequest(input) 644 return out, req.Send() 645} 646 647// GetDimensionValuesWithContext is the same as GetDimensionValues with the addition of 648// the ability to pass a context and additional request options. 649// 650// See GetDimensionValues for details on how to use this API operation. 651// 652// The context must be non-nil and will be used for request cancellation. If 653// the context is nil a panic will occur. In the future the SDK may create 654// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 655// for more information on using Contexts. 656func (c *CostExplorer) GetDimensionValuesWithContext(ctx aws.Context, input *GetDimensionValuesInput, opts ...request.Option) (*GetDimensionValuesOutput, error) { 657 req, out := c.GetDimensionValuesRequest(input) 658 req.SetContext(ctx) 659 req.ApplyOptions(opts...) 660 return out, req.Send() 661} 662 663const opGetReservationCoverage = "GetReservationCoverage" 664 665// GetReservationCoverageRequest generates a "aws/request.Request" representing the 666// client's request for the GetReservationCoverage operation. The "output" return 667// value will be populated with the request's response once the request completes 668// successfully. 669// 670// Use "Send" method on the returned Request to send the API call to the service. 671// the "output" return value is not valid until after Send returns without error. 672// 673// See GetReservationCoverage for more information on using the GetReservationCoverage 674// API call, and error handling. 675// 676// This method is useful when you want to inject custom logic or configuration 677// into the SDK's request lifecycle. Such as custom headers, or retry logic. 678// 679// 680// // Example sending a request using the GetReservationCoverageRequest method. 681// req, resp := client.GetReservationCoverageRequest(params) 682// 683// err := req.Send() 684// if err == nil { // resp is now filled 685// fmt.Println(resp) 686// } 687// 688// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetReservationCoverage 689func (c *CostExplorer) GetReservationCoverageRequest(input *GetReservationCoverageInput) (req *request.Request, output *GetReservationCoverageOutput) { 690 op := &request.Operation{ 691 Name: opGetReservationCoverage, 692 HTTPMethod: "POST", 693 HTTPPath: "/", 694 } 695 696 if input == nil { 697 input = &GetReservationCoverageInput{} 698 } 699 700 output = &GetReservationCoverageOutput{} 701 req = c.newRequest(op, input, output) 702 return 703} 704 705// GetReservationCoverage API operation for AWS Cost Explorer Service. 706// 707// Retrieves the reservation coverage for your account. This enables you to 708// see how much of your Amazon Elastic Compute Cloud, Amazon ElastiCache, Amazon 709// Relational Database Service, or Amazon Redshift usage is covered by a reservation. 710// An organization's master account can see the coverage of the associated member 711// accounts. For any time period, you can filter data about reservation usage 712// by the following dimensions: 713// 714// * AZ 715// 716// * CACHE_ENGINE 717// 718// * DATABASE_ENGINE 719// 720// * DEPLOYMENT_OPTION 721// 722// * INSTANCE_TYPE 723// 724// * LINKED_ACCOUNT 725// 726// * OPERATING_SYSTEM 727// 728// * PLATFORM 729// 730// * REGION 731// 732// * SERVICE 733// 734// * TAG 735// 736// * TENANCY 737// 738// To determine valid values for a dimension, use the GetDimensionValues operation. 739// 740// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 741// with awserr.Error's Code and Message methods to get detailed information about 742// the error. 743// 744// See the AWS API reference guide for AWS Cost Explorer Service's 745// API operation GetReservationCoverage for usage and error information. 746// 747// Returned Error Codes: 748// * ErrCodeLimitExceededException "LimitExceededException" 749// You made too many calls in a short period of time. Try again later. 750// 751// * ErrCodeDataUnavailableException "DataUnavailableException" 752// The requested data is unavailable. 753// 754// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" 755// The pagination token is invalid. Try again without a pagination token. 756// 757// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetReservationCoverage 758func (c *CostExplorer) GetReservationCoverage(input *GetReservationCoverageInput) (*GetReservationCoverageOutput, error) { 759 req, out := c.GetReservationCoverageRequest(input) 760 return out, req.Send() 761} 762 763// GetReservationCoverageWithContext is the same as GetReservationCoverage with the addition of 764// the ability to pass a context and additional request options. 765// 766// See GetReservationCoverage for details on how to use this API operation. 767// 768// The context must be non-nil and will be used for request cancellation. If 769// the context is nil a panic will occur. In the future the SDK may create 770// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 771// for more information on using Contexts. 772func (c *CostExplorer) GetReservationCoverageWithContext(ctx aws.Context, input *GetReservationCoverageInput, opts ...request.Option) (*GetReservationCoverageOutput, error) { 773 req, out := c.GetReservationCoverageRequest(input) 774 req.SetContext(ctx) 775 req.ApplyOptions(opts...) 776 return out, req.Send() 777} 778 779const opGetReservationPurchaseRecommendation = "GetReservationPurchaseRecommendation" 780 781// GetReservationPurchaseRecommendationRequest generates a "aws/request.Request" representing the 782// client's request for the GetReservationPurchaseRecommendation operation. The "output" return 783// value will be populated with the request's response once the request completes 784// successfully. 785// 786// Use "Send" method on the returned Request to send the API call to the service. 787// the "output" return value is not valid until after Send returns without error. 788// 789// See GetReservationPurchaseRecommendation for more information on using the GetReservationPurchaseRecommendation 790// API call, and error handling. 791// 792// This method is useful when you want to inject custom logic or configuration 793// into the SDK's request lifecycle. Such as custom headers, or retry logic. 794// 795// 796// // Example sending a request using the GetReservationPurchaseRecommendationRequest method. 797// req, resp := client.GetReservationPurchaseRecommendationRequest(params) 798// 799// err := req.Send() 800// if err == nil { // resp is now filled 801// fmt.Println(resp) 802// } 803// 804// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetReservationPurchaseRecommendation 805func (c *CostExplorer) GetReservationPurchaseRecommendationRequest(input *GetReservationPurchaseRecommendationInput) (req *request.Request, output *GetReservationPurchaseRecommendationOutput) { 806 op := &request.Operation{ 807 Name: opGetReservationPurchaseRecommendation, 808 HTTPMethod: "POST", 809 HTTPPath: "/", 810 } 811 812 if input == nil { 813 input = &GetReservationPurchaseRecommendationInput{} 814 } 815 816 output = &GetReservationPurchaseRecommendationOutput{} 817 req = c.newRequest(op, input, output) 818 return 819} 820 821// GetReservationPurchaseRecommendation API operation for AWS Cost Explorer Service. 822// 823// Gets recommendations for which reservations to purchase. These recommendations 824// could help you reduce your costs. Reservations provide a discounted hourly 825// rate (up to 75%) compared to On-Demand pricing. 826// 827// AWS generates your recommendations by identifying your On-Demand usage during 828// a specific time period and collecting your usage into categories that are 829// eligible for a reservation. After AWS has these categories, it simulates 830// every combination of reservations in each category of usage to identify the 831// best number of each type of RI to purchase to maximize your estimated savings. 832// 833// For example, AWS automatically aggregates your Amazon EC2 Linux, shared tenancy, 834// and c4 family usage in the US West (Oregon) Region and recommends that you 835// buy size-flexible regional reservations to apply to the c4 family usage. 836// AWS recommends the smallest size instance in an instance family. This makes 837// it easier to purchase a size-flexible RI. AWS also shows the equal number 838// of normalized units so that you can purchase any instance size that you want. 839// For this example, your RI recommendation would be for c4.large because that 840// is the smallest size instance in the c4 instance family. 841// 842// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 843// with awserr.Error's Code and Message methods to get detailed information about 844// the error. 845// 846// See the AWS API reference guide for AWS Cost Explorer Service's 847// API operation GetReservationPurchaseRecommendation for usage and error information. 848// 849// Returned Error Codes: 850// * ErrCodeLimitExceededException "LimitExceededException" 851// You made too many calls in a short period of time. Try again later. 852// 853// * ErrCodeDataUnavailableException "DataUnavailableException" 854// The requested data is unavailable. 855// 856// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" 857// The pagination token is invalid. Try again without a pagination token. 858// 859// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetReservationPurchaseRecommendation 860func (c *CostExplorer) GetReservationPurchaseRecommendation(input *GetReservationPurchaseRecommendationInput) (*GetReservationPurchaseRecommendationOutput, error) { 861 req, out := c.GetReservationPurchaseRecommendationRequest(input) 862 return out, req.Send() 863} 864 865// GetReservationPurchaseRecommendationWithContext is the same as GetReservationPurchaseRecommendation with the addition of 866// the ability to pass a context and additional request options. 867// 868// See GetReservationPurchaseRecommendation for details on how to use this API operation. 869// 870// The context must be non-nil and will be used for request cancellation. If 871// the context is nil a panic will occur. In the future the SDK may create 872// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 873// for more information on using Contexts. 874func (c *CostExplorer) GetReservationPurchaseRecommendationWithContext(ctx aws.Context, input *GetReservationPurchaseRecommendationInput, opts ...request.Option) (*GetReservationPurchaseRecommendationOutput, error) { 875 req, out := c.GetReservationPurchaseRecommendationRequest(input) 876 req.SetContext(ctx) 877 req.ApplyOptions(opts...) 878 return out, req.Send() 879} 880 881const opGetReservationUtilization = "GetReservationUtilization" 882 883// GetReservationUtilizationRequest generates a "aws/request.Request" representing the 884// client's request for the GetReservationUtilization operation. The "output" return 885// value will be populated with the request's response once the request completes 886// successfully. 887// 888// Use "Send" method on the returned Request to send the API call to the service. 889// the "output" return value is not valid until after Send returns without error. 890// 891// See GetReservationUtilization for more information on using the GetReservationUtilization 892// API call, and error handling. 893// 894// This method is useful when you want to inject custom logic or configuration 895// into the SDK's request lifecycle. Such as custom headers, or retry logic. 896// 897// 898// // Example sending a request using the GetReservationUtilizationRequest method. 899// req, resp := client.GetReservationUtilizationRequest(params) 900// 901// err := req.Send() 902// if err == nil { // resp is now filled 903// fmt.Println(resp) 904// } 905// 906// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetReservationUtilization 907func (c *CostExplorer) GetReservationUtilizationRequest(input *GetReservationUtilizationInput) (req *request.Request, output *GetReservationUtilizationOutput) { 908 op := &request.Operation{ 909 Name: opGetReservationUtilization, 910 HTTPMethod: "POST", 911 HTTPPath: "/", 912 } 913 914 if input == nil { 915 input = &GetReservationUtilizationInput{} 916 } 917 918 output = &GetReservationUtilizationOutput{} 919 req = c.newRequest(op, input, output) 920 return 921} 922 923// GetReservationUtilization API operation for AWS Cost Explorer Service. 924// 925// Retrieves the reservation utilization for your account. Master accounts in 926// an organization have access to member accounts. You can filter data by dimensions 927// in a time period. You can use GetDimensionValues to determine the possible 928// dimension values. Currently, you can group only by SUBSCRIPTION_ID. 929// 930// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 931// with awserr.Error's Code and Message methods to get detailed information about 932// the error. 933// 934// See the AWS API reference guide for AWS Cost Explorer Service's 935// API operation GetReservationUtilization for usage and error information. 936// 937// Returned Error Codes: 938// * ErrCodeLimitExceededException "LimitExceededException" 939// You made too many calls in a short period of time. Try again later. 940// 941// * ErrCodeDataUnavailableException "DataUnavailableException" 942// The requested data is unavailable. 943// 944// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" 945// The pagination token is invalid. Try again without a pagination token. 946// 947// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetReservationUtilization 948func (c *CostExplorer) GetReservationUtilization(input *GetReservationUtilizationInput) (*GetReservationUtilizationOutput, error) { 949 req, out := c.GetReservationUtilizationRequest(input) 950 return out, req.Send() 951} 952 953// GetReservationUtilizationWithContext is the same as GetReservationUtilization with the addition of 954// the ability to pass a context and additional request options. 955// 956// See GetReservationUtilization for details on how to use this API operation. 957// 958// The context must be non-nil and will be used for request cancellation. If 959// the context is nil a panic will occur. In the future the SDK may create 960// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 961// for more information on using Contexts. 962func (c *CostExplorer) GetReservationUtilizationWithContext(ctx aws.Context, input *GetReservationUtilizationInput, opts ...request.Option) (*GetReservationUtilizationOutput, error) { 963 req, out := c.GetReservationUtilizationRequest(input) 964 req.SetContext(ctx) 965 req.ApplyOptions(opts...) 966 return out, req.Send() 967} 968 969const opGetRightsizingRecommendation = "GetRightsizingRecommendation" 970 971// GetRightsizingRecommendationRequest generates a "aws/request.Request" representing the 972// client's request for the GetRightsizingRecommendation operation. The "output" return 973// value will be populated with the request's response once the request completes 974// successfully. 975// 976// Use "Send" method on the returned Request to send the API call to the service. 977// the "output" return value is not valid until after Send returns without error. 978// 979// See GetRightsizingRecommendation for more information on using the GetRightsizingRecommendation 980// API call, and error handling. 981// 982// This method is useful when you want to inject custom logic or configuration 983// into the SDK's request lifecycle. Such as custom headers, or retry logic. 984// 985// 986// // Example sending a request using the GetRightsizingRecommendationRequest method. 987// req, resp := client.GetRightsizingRecommendationRequest(params) 988// 989// err := req.Send() 990// if err == nil { // resp is now filled 991// fmt.Println(resp) 992// } 993// 994// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetRightsizingRecommendation 995func (c *CostExplorer) GetRightsizingRecommendationRequest(input *GetRightsizingRecommendationInput) (req *request.Request, output *GetRightsizingRecommendationOutput) { 996 op := &request.Operation{ 997 Name: opGetRightsizingRecommendation, 998 HTTPMethod: "POST", 999 HTTPPath: "/", 1000 } 1001 1002 if input == nil { 1003 input = &GetRightsizingRecommendationInput{} 1004 } 1005 1006 output = &GetRightsizingRecommendationOutput{} 1007 req = c.newRequest(op, input, output) 1008 return 1009} 1010 1011// GetRightsizingRecommendation API operation for AWS Cost Explorer Service. 1012// 1013// Creates recommendations that helps you save cost by identifying idle and 1014// underutilized Amazon EC2 instances. 1015// 1016// Recommendations are generated to either downsize or terminate instances, 1017// along with providing savings detail and metrics. For details on calculation 1018// and function, see Optimizing Your Cost with Rightsizing Recommendations (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/ce-what-is.html). 1019// 1020// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1021// with awserr.Error's Code and Message methods to get detailed information about 1022// the error. 1023// 1024// See the AWS API reference guide for AWS Cost Explorer Service's 1025// API operation GetRightsizingRecommendation for usage and error information. 1026// 1027// Returned Error Codes: 1028// * ErrCodeLimitExceededException "LimitExceededException" 1029// You made too many calls in a short period of time. Try again later. 1030// 1031// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" 1032// The pagination token is invalid. Try again without a pagination token. 1033// 1034// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetRightsizingRecommendation 1035func (c *CostExplorer) GetRightsizingRecommendation(input *GetRightsizingRecommendationInput) (*GetRightsizingRecommendationOutput, error) { 1036 req, out := c.GetRightsizingRecommendationRequest(input) 1037 return out, req.Send() 1038} 1039 1040// GetRightsizingRecommendationWithContext is the same as GetRightsizingRecommendation with the addition of 1041// the ability to pass a context and additional request options. 1042// 1043// See GetRightsizingRecommendation for details on how to use this API operation. 1044// 1045// The context must be non-nil and will be used for request cancellation. If 1046// the context is nil a panic will occur. In the future the SDK may create 1047// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1048// for more information on using Contexts. 1049func (c *CostExplorer) GetRightsizingRecommendationWithContext(ctx aws.Context, input *GetRightsizingRecommendationInput, opts ...request.Option) (*GetRightsizingRecommendationOutput, error) { 1050 req, out := c.GetRightsizingRecommendationRequest(input) 1051 req.SetContext(ctx) 1052 req.ApplyOptions(opts...) 1053 return out, req.Send() 1054} 1055 1056const opGetSavingsPlansCoverage = "GetSavingsPlansCoverage" 1057 1058// GetSavingsPlansCoverageRequest generates a "aws/request.Request" representing the 1059// client's request for the GetSavingsPlansCoverage operation. The "output" return 1060// value will be populated with the request's response once the request completes 1061// successfully. 1062// 1063// Use "Send" method on the returned Request to send the API call to the service. 1064// the "output" return value is not valid until after Send returns without error. 1065// 1066// See GetSavingsPlansCoverage for more information on using the GetSavingsPlansCoverage 1067// API call, and error handling. 1068// 1069// This method is useful when you want to inject custom logic or configuration 1070// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1071// 1072// 1073// // Example sending a request using the GetSavingsPlansCoverageRequest method. 1074// req, resp := client.GetSavingsPlansCoverageRequest(params) 1075// 1076// err := req.Send() 1077// if err == nil { // resp is now filled 1078// fmt.Println(resp) 1079// } 1080// 1081// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetSavingsPlansCoverage 1082func (c *CostExplorer) GetSavingsPlansCoverageRequest(input *GetSavingsPlansCoverageInput) (req *request.Request, output *GetSavingsPlansCoverageOutput) { 1083 op := &request.Operation{ 1084 Name: opGetSavingsPlansCoverage, 1085 HTTPMethod: "POST", 1086 HTTPPath: "/", 1087 Paginator: &request.Paginator{ 1088 InputTokens: []string{"NextToken"}, 1089 OutputTokens: []string{"NextToken"}, 1090 LimitToken: "MaxResults", 1091 TruncationToken: "", 1092 }, 1093 } 1094 1095 if input == nil { 1096 input = &GetSavingsPlansCoverageInput{} 1097 } 1098 1099 output = &GetSavingsPlansCoverageOutput{} 1100 req = c.newRequest(op, input, output) 1101 return 1102} 1103 1104// GetSavingsPlansCoverage API operation for AWS Cost Explorer Service. 1105// 1106// Retrieves the Savings Plans covered for your account. This enables you to 1107// see how much of your cost is covered by a Savings Plan. An organization’s 1108// master account can see the coverage of the associated member accounts. For 1109// any time period, you can filter data for Savings Plans usage with the following 1110// dimensions: 1111// 1112// * LINKED_ACCOUNT 1113// 1114// * REGION 1115// 1116// * SERVICE 1117// 1118// * INSTANCE_FAMILY 1119// 1120// To determine valid values for a dimension, use the GetDimensionValues operation. 1121// 1122// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1123// with awserr.Error's Code and Message methods to get detailed information about 1124// the error. 1125// 1126// See the AWS API reference guide for AWS Cost Explorer Service's 1127// API operation GetSavingsPlansCoverage for usage and error information. 1128// 1129// Returned Error Codes: 1130// * ErrCodeLimitExceededException "LimitExceededException" 1131// You made too many calls in a short period of time. Try again later. 1132// 1133// * ErrCodeDataUnavailableException "DataUnavailableException" 1134// The requested data is unavailable. 1135// 1136// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" 1137// The pagination token is invalid. Try again without a pagination token. 1138// 1139// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetSavingsPlansCoverage 1140func (c *CostExplorer) GetSavingsPlansCoverage(input *GetSavingsPlansCoverageInput) (*GetSavingsPlansCoverageOutput, error) { 1141 req, out := c.GetSavingsPlansCoverageRequest(input) 1142 return out, req.Send() 1143} 1144 1145// GetSavingsPlansCoverageWithContext is the same as GetSavingsPlansCoverage with the addition of 1146// the ability to pass a context and additional request options. 1147// 1148// See GetSavingsPlansCoverage for details on how to use this API operation. 1149// 1150// The context must be non-nil and will be used for request cancellation. If 1151// the context is nil a panic will occur. In the future the SDK may create 1152// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1153// for more information on using Contexts. 1154func (c *CostExplorer) GetSavingsPlansCoverageWithContext(ctx aws.Context, input *GetSavingsPlansCoverageInput, opts ...request.Option) (*GetSavingsPlansCoverageOutput, error) { 1155 req, out := c.GetSavingsPlansCoverageRequest(input) 1156 req.SetContext(ctx) 1157 req.ApplyOptions(opts...) 1158 return out, req.Send() 1159} 1160 1161// GetSavingsPlansCoveragePages iterates over the pages of a GetSavingsPlansCoverage operation, 1162// calling the "fn" function with the response data for each page. To stop 1163// iterating, return false from the fn function. 1164// 1165// See GetSavingsPlansCoverage method for more information on how to use this operation. 1166// 1167// Note: This operation can generate multiple requests to a service. 1168// 1169// // Example iterating over at most 3 pages of a GetSavingsPlansCoverage operation. 1170// pageNum := 0 1171// err := client.GetSavingsPlansCoveragePages(params, 1172// func(page *costexplorer.GetSavingsPlansCoverageOutput, lastPage bool) bool { 1173// pageNum++ 1174// fmt.Println(page) 1175// return pageNum <= 3 1176// }) 1177// 1178func (c *CostExplorer) GetSavingsPlansCoveragePages(input *GetSavingsPlansCoverageInput, fn func(*GetSavingsPlansCoverageOutput, bool) bool) error { 1179 return c.GetSavingsPlansCoveragePagesWithContext(aws.BackgroundContext(), input, fn) 1180} 1181 1182// GetSavingsPlansCoveragePagesWithContext same as GetSavingsPlansCoveragePages except 1183// it takes a Context and allows setting request options on the pages. 1184// 1185// The context must be non-nil and will be used for request cancellation. If 1186// the context is nil a panic will occur. In the future the SDK may create 1187// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1188// for more information on using Contexts. 1189func (c *CostExplorer) GetSavingsPlansCoveragePagesWithContext(ctx aws.Context, input *GetSavingsPlansCoverageInput, fn func(*GetSavingsPlansCoverageOutput, bool) bool, opts ...request.Option) error { 1190 p := request.Pagination{ 1191 NewRequest: func() (*request.Request, error) { 1192 var inCpy *GetSavingsPlansCoverageInput 1193 if input != nil { 1194 tmp := *input 1195 inCpy = &tmp 1196 } 1197 req, _ := c.GetSavingsPlansCoverageRequest(inCpy) 1198 req.SetContext(ctx) 1199 req.ApplyOptions(opts...) 1200 return req, nil 1201 }, 1202 } 1203 1204 for p.Next() { 1205 if !fn(p.Page().(*GetSavingsPlansCoverageOutput), !p.HasNextPage()) { 1206 break 1207 } 1208 } 1209 1210 return p.Err() 1211} 1212 1213const opGetSavingsPlansPurchaseRecommendation = "GetSavingsPlansPurchaseRecommendation" 1214 1215// GetSavingsPlansPurchaseRecommendationRequest generates a "aws/request.Request" representing the 1216// client's request for the GetSavingsPlansPurchaseRecommendation operation. The "output" return 1217// value will be populated with the request's response once the request completes 1218// successfully. 1219// 1220// Use "Send" method on the returned Request to send the API call to the service. 1221// the "output" return value is not valid until after Send returns without error. 1222// 1223// See GetSavingsPlansPurchaseRecommendation for more information on using the GetSavingsPlansPurchaseRecommendation 1224// API call, and error handling. 1225// 1226// This method is useful when you want to inject custom logic or configuration 1227// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1228// 1229// 1230// // Example sending a request using the GetSavingsPlansPurchaseRecommendationRequest method. 1231// req, resp := client.GetSavingsPlansPurchaseRecommendationRequest(params) 1232// 1233// err := req.Send() 1234// if err == nil { // resp is now filled 1235// fmt.Println(resp) 1236// } 1237// 1238// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetSavingsPlansPurchaseRecommendation 1239func (c *CostExplorer) GetSavingsPlansPurchaseRecommendationRequest(input *GetSavingsPlansPurchaseRecommendationInput) (req *request.Request, output *GetSavingsPlansPurchaseRecommendationOutput) { 1240 op := &request.Operation{ 1241 Name: opGetSavingsPlansPurchaseRecommendation, 1242 HTTPMethod: "POST", 1243 HTTPPath: "/", 1244 } 1245 1246 if input == nil { 1247 input = &GetSavingsPlansPurchaseRecommendationInput{} 1248 } 1249 1250 output = &GetSavingsPlansPurchaseRecommendationOutput{} 1251 req = c.newRequest(op, input, output) 1252 return 1253} 1254 1255// GetSavingsPlansPurchaseRecommendation API operation for AWS Cost Explorer Service. 1256// 1257// Retrieves your request parameters, Savings Plan Recommendations Summary and 1258// Details. 1259// 1260// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1261// with awserr.Error's Code and Message methods to get detailed information about 1262// the error. 1263// 1264// See the AWS API reference guide for AWS Cost Explorer Service's 1265// API operation GetSavingsPlansPurchaseRecommendation for usage and error information. 1266// 1267// Returned Error Codes: 1268// * ErrCodeLimitExceededException "LimitExceededException" 1269// You made too many calls in a short period of time. Try again later. 1270// 1271// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" 1272// The pagination token is invalid. Try again without a pagination token. 1273// 1274// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetSavingsPlansPurchaseRecommendation 1275func (c *CostExplorer) GetSavingsPlansPurchaseRecommendation(input *GetSavingsPlansPurchaseRecommendationInput) (*GetSavingsPlansPurchaseRecommendationOutput, error) { 1276 req, out := c.GetSavingsPlansPurchaseRecommendationRequest(input) 1277 return out, req.Send() 1278} 1279 1280// GetSavingsPlansPurchaseRecommendationWithContext is the same as GetSavingsPlansPurchaseRecommendation with the addition of 1281// the ability to pass a context and additional request options. 1282// 1283// See GetSavingsPlansPurchaseRecommendation for details on how to use this API operation. 1284// 1285// The context must be non-nil and will be used for request cancellation. If 1286// the context is nil a panic will occur. In the future the SDK may create 1287// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1288// for more information on using Contexts. 1289func (c *CostExplorer) GetSavingsPlansPurchaseRecommendationWithContext(ctx aws.Context, input *GetSavingsPlansPurchaseRecommendationInput, opts ...request.Option) (*GetSavingsPlansPurchaseRecommendationOutput, error) { 1290 req, out := c.GetSavingsPlansPurchaseRecommendationRequest(input) 1291 req.SetContext(ctx) 1292 req.ApplyOptions(opts...) 1293 return out, req.Send() 1294} 1295 1296const opGetSavingsPlansUtilization = "GetSavingsPlansUtilization" 1297 1298// GetSavingsPlansUtilizationRequest generates a "aws/request.Request" representing the 1299// client's request for the GetSavingsPlansUtilization operation. The "output" return 1300// value will be populated with the request's response once the request completes 1301// successfully. 1302// 1303// Use "Send" method on the returned Request to send the API call to the service. 1304// the "output" return value is not valid until after Send returns without error. 1305// 1306// See GetSavingsPlansUtilization for more information on using the GetSavingsPlansUtilization 1307// API call, and error handling. 1308// 1309// This method is useful when you want to inject custom logic or configuration 1310// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1311// 1312// 1313// // Example sending a request using the GetSavingsPlansUtilizationRequest method. 1314// req, resp := client.GetSavingsPlansUtilizationRequest(params) 1315// 1316// err := req.Send() 1317// if err == nil { // resp is now filled 1318// fmt.Println(resp) 1319// } 1320// 1321// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetSavingsPlansUtilization 1322func (c *CostExplorer) GetSavingsPlansUtilizationRequest(input *GetSavingsPlansUtilizationInput) (req *request.Request, output *GetSavingsPlansUtilizationOutput) { 1323 op := &request.Operation{ 1324 Name: opGetSavingsPlansUtilization, 1325 HTTPMethod: "POST", 1326 HTTPPath: "/", 1327 } 1328 1329 if input == nil { 1330 input = &GetSavingsPlansUtilizationInput{} 1331 } 1332 1333 output = &GetSavingsPlansUtilizationOutput{} 1334 req = c.newRequest(op, input, output) 1335 return 1336} 1337 1338// GetSavingsPlansUtilization API operation for AWS Cost Explorer Service. 1339// 1340// Retrieves the Savings Plans utilization for your account across date ranges 1341// with daily or monthly granularity. Master accounts in an organization have 1342// access to member accounts. You can use GetDimensionValues in SAVINGS_PLANS 1343// to determine the possible dimension values. 1344// 1345// You cannot group by any dimension values for GetSavingsPlansUtilization. 1346// 1347// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1348// with awserr.Error's Code and Message methods to get detailed information about 1349// the error. 1350// 1351// See the AWS API reference guide for AWS Cost Explorer Service's 1352// API operation GetSavingsPlansUtilization for usage and error information. 1353// 1354// Returned Error Codes: 1355// * ErrCodeLimitExceededException "LimitExceededException" 1356// You made too many calls in a short period of time. Try again later. 1357// 1358// * ErrCodeDataUnavailableException "DataUnavailableException" 1359// The requested data is unavailable. 1360// 1361// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetSavingsPlansUtilization 1362func (c *CostExplorer) GetSavingsPlansUtilization(input *GetSavingsPlansUtilizationInput) (*GetSavingsPlansUtilizationOutput, error) { 1363 req, out := c.GetSavingsPlansUtilizationRequest(input) 1364 return out, req.Send() 1365} 1366 1367// GetSavingsPlansUtilizationWithContext is the same as GetSavingsPlansUtilization with the addition of 1368// the ability to pass a context and additional request options. 1369// 1370// See GetSavingsPlansUtilization for details on how to use this API operation. 1371// 1372// The context must be non-nil and will be used for request cancellation. If 1373// the context is nil a panic will occur. In the future the SDK may create 1374// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1375// for more information on using Contexts. 1376func (c *CostExplorer) GetSavingsPlansUtilizationWithContext(ctx aws.Context, input *GetSavingsPlansUtilizationInput, opts ...request.Option) (*GetSavingsPlansUtilizationOutput, error) { 1377 req, out := c.GetSavingsPlansUtilizationRequest(input) 1378 req.SetContext(ctx) 1379 req.ApplyOptions(opts...) 1380 return out, req.Send() 1381} 1382 1383const opGetSavingsPlansUtilizationDetails = "GetSavingsPlansUtilizationDetails" 1384 1385// GetSavingsPlansUtilizationDetailsRequest generates a "aws/request.Request" representing the 1386// client's request for the GetSavingsPlansUtilizationDetails operation. The "output" return 1387// value will be populated with the request's response once the request completes 1388// successfully. 1389// 1390// Use "Send" method on the returned Request to send the API call to the service. 1391// the "output" return value is not valid until after Send returns without error. 1392// 1393// See GetSavingsPlansUtilizationDetails for more information on using the GetSavingsPlansUtilizationDetails 1394// API call, and error handling. 1395// 1396// This method is useful when you want to inject custom logic or configuration 1397// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1398// 1399// 1400// // Example sending a request using the GetSavingsPlansUtilizationDetailsRequest method. 1401// req, resp := client.GetSavingsPlansUtilizationDetailsRequest(params) 1402// 1403// err := req.Send() 1404// if err == nil { // resp is now filled 1405// fmt.Println(resp) 1406// } 1407// 1408// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetSavingsPlansUtilizationDetails 1409func (c *CostExplorer) GetSavingsPlansUtilizationDetailsRequest(input *GetSavingsPlansUtilizationDetailsInput) (req *request.Request, output *GetSavingsPlansUtilizationDetailsOutput) { 1410 op := &request.Operation{ 1411 Name: opGetSavingsPlansUtilizationDetails, 1412 HTTPMethod: "POST", 1413 HTTPPath: "/", 1414 Paginator: &request.Paginator{ 1415 InputTokens: []string{"NextToken"}, 1416 OutputTokens: []string{"NextToken"}, 1417 LimitToken: "MaxResults", 1418 TruncationToken: "", 1419 }, 1420 } 1421 1422 if input == nil { 1423 input = &GetSavingsPlansUtilizationDetailsInput{} 1424 } 1425 1426 output = &GetSavingsPlansUtilizationDetailsOutput{} 1427 req = c.newRequest(op, input, output) 1428 return 1429} 1430 1431// GetSavingsPlansUtilizationDetails API operation for AWS Cost Explorer Service. 1432// 1433// Retrieves attribute data along with aggregate utilization and savings data 1434// for a given time period. This doesn't support granular or grouped data (daily/monthly) 1435// in response. You can't retrieve data by dates in a single response similar 1436// to GetSavingsPlanUtilization, but you have the option to make multiple calls 1437// to GetSavingsPlanUtilizationDetails by providing individual dates. You can 1438// use GetDimensionValues in SAVINGS_PLANS to determine the possible dimension 1439// values. 1440// 1441// GetSavingsPlanUtilizationDetails internally groups data by SavingsPlansArn. 1442// 1443// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1444// with awserr.Error's Code and Message methods to get detailed information about 1445// the error. 1446// 1447// See the AWS API reference guide for AWS Cost Explorer Service's 1448// API operation GetSavingsPlansUtilizationDetails for usage and error information. 1449// 1450// Returned Error Codes: 1451// * ErrCodeLimitExceededException "LimitExceededException" 1452// You made too many calls in a short period of time. Try again later. 1453// 1454// * ErrCodeDataUnavailableException "DataUnavailableException" 1455// The requested data is unavailable. 1456// 1457// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" 1458// The pagination token is invalid. Try again without a pagination token. 1459// 1460// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetSavingsPlansUtilizationDetails 1461func (c *CostExplorer) GetSavingsPlansUtilizationDetails(input *GetSavingsPlansUtilizationDetailsInput) (*GetSavingsPlansUtilizationDetailsOutput, error) { 1462 req, out := c.GetSavingsPlansUtilizationDetailsRequest(input) 1463 return out, req.Send() 1464} 1465 1466// GetSavingsPlansUtilizationDetailsWithContext is the same as GetSavingsPlansUtilizationDetails with the addition of 1467// the ability to pass a context and additional request options. 1468// 1469// See GetSavingsPlansUtilizationDetails for details on how to use this API operation. 1470// 1471// The context must be non-nil and will be used for request cancellation. If 1472// the context is nil a panic will occur. In the future the SDK may create 1473// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1474// for more information on using Contexts. 1475func (c *CostExplorer) GetSavingsPlansUtilizationDetailsWithContext(ctx aws.Context, input *GetSavingsPlansUtilizationDetailsInput, opts ...request.Option) (*GetSavingsPlansUtilizationDetailsOutput, error) { 1476 req, out := c.GetSavingsPlansUtilizationDetailsRequest(input) 1477 req.SetContext(ctx) 1478 req.ApplyOptions(opts...) 1479 return out, req.Send() 1480} 1481 1482// GetSavingsPlansUtilizationDetailsPages iterates over the pages of a GetSavingsPlansUtilizationDetails operation, 1483// calling the "fn" function with the response data for each page. To stop 1484// iterating, return false from the fn function. 1485// 1486// See GetSavingsPlansUtilizationDetails method for more information on how to use this operation. 1487// 1488// Note: This operation can generate multiple requests to a service. 1489// 1490// // Example iterating over at most 3 pages of a GetSavingsPlansUtilizationDetails operation. 1491// pageNum := 0 1492// err := client.GetSavingsPlansUtilizationDetailsPages(params, 1493// func(page *costexplorer.GetSavingsPlansUtilizationDetailsOutput, lastPage bool) bool { 1494// pageNum++ 1495// fmt.Println(page) 1496// return pageNum <= 3 1497// }) 1498// 1499func (c *CostExplorer) GetSavingsPlansUtilizationDetailsPages(input *GetSavingsPlansUtilizationDetailsInput, fn func(*GetSavingsPlansUtilizationDetailsOutput, bool) bool) error { 1500 return c.GetSavingsPlansUtilizationDetailsPagesWithContext(aws.BackgroundContext(), input, fn) 1501} 1502 1503// GetSavingsPlansUtilizationDetailsPagesWithContext same as GetSavingsPlansUtilizationDetailsPages except 1504// it takes a Context and allows setting request options on the pages. 1505// 1506// The context must be non-nil and will be used for request cancellation. If 1507// the context is nil a panic will occur. In the future the SDK may create 1508// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1509// for more information on using Contexts. 1510func (c *CostExplorer) GetSavingsPlansUtilizationDetailsPagesWithContext(ctx aws.Context, input *GetSavingsPlansUtilizationDetailsInput, fn func(*GetSavingsPlansUtilizationDetailsOutput, bool) bool, opts ...request.Option) error { 1511 p := request.Pagination{ 1512 NewRequest: func() (*request.Request, error) { 1513 var inCpy *GetSavingsPlansUtilizationDetailsInput 1514 if input != nil { 1515 tmp := *input 1516 inCpy = &tmp 1517 } 1518 req, _ := c.GetSavingsPlansUtilizationDetailsRequest(inCpy) 1519 req.SetContext(ctx) 1520 req.ApplyOptions(opts...) 1521 return req, nil 1522 }, 1523 } 1524 1525 for p.Next() { 1526 if !fn(p.Page().(*GetSavingsPlansUtilizationDetailsOutput), !p.HasNextPage()) { 1527 break 1528 } 1529 } 1530 1531 return p.Err() 1532} 1533 1534const opGetTags = "GetTags" 1535 1536// GetTagsRequest generates a "aws/request.Request" representing the 1537// client's request for the GetTags operation. The "output" return 1538// value will be populated with the request's response once the request completes 1539// successfully. 1540// 1541// Use "Send" method on the returned Request to send the API call to the service. 1542// the "output" return value is not valid until after Send returns without error. 1543// 1544// See GetTags for more information on using the GetTags 1545// API call, and error handling. 1546// 1547// This method is useful when you want to inject custom logic or configuration 1548// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1549// 1550// 1551// // Example sending a request using the GetTagsRequest method. 1552// req, resp := client.GetTagsRequest(params) 1553// 1554// err := req.Send() 1555// if err == nil { // resp is now filled 1556// fmt.Println(resp) 1557// } 1558// 1559// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetTags 1560func (c *CostExplorer) GetTagsRequest(input *GetTagsInput) (req *request.Request, output *GetTagsOutput) { 1561 op := &request.Operation{ 1562 Name: opGetTags, 1563 HTTPMethod: "POST", 1564 HTTPPath: "/", 1565 } 1566 1567 if input == nil { 1568 input = &GetTagsInput{} 1569 } 1570 1571 output = &GetTagsOutput{} 1572 req = c.newRequest(op, input, output) 1573 return 1574} 1575 1576// GetTags API operation for AWS Cost Explorer Service. 1577// 1578// Queries for available tag keys and tag values for a specified period. You 1579// can search the tag values for an arbitrary string. 1580// 1581// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1582// with awserr.Error's Code and Message methods to get detailed information about 1583// the error. 1584// 1585// See the AWS API reference guide for AWS Cost Explorer Service's 1586// API operation GetTags for usage and error information. 1587// 1588// Returned Error Codes: 1589// * ErrCodeLimitExceededException "LimitExceededException" 1590// You made too many calls in a short period of time. Try again later. 1591// 1592// * ErrCodeBillExpirationException "BillExpirationException" 1593// The requested report expired. Update the date interval and try again. 1594// 1595// * ErrCodeDataUnavailableException "DataUnavailableException" 1596// The requested data is unavailable. 1597// 1598// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" 1599// The pagination token is invalid. Try again without a pagination token. 1600// 1601// * ErrCodeRequestChangedException "RequestChangedException" 1602// Your request parameters changed between pages. Try again with the old parameters 1603// or without a pagination token. 1604// 1605// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetTags 1606func (c *CostExplorer) GetTags(input *GetTagsInput) (*GetTagsOutput, error) { 1607 req, out := c.GetTagsRequest(input) 1608 return out, req.Send() 1609} 1610 1611// GetTagsWithContext is the same as GetTags with the addition of 1612// the ability to pass a context and additional request options. 1613// 1614// See GetTags for details on how to use this API operation. 1615// 1616// The context must be non-nil and will be used for request cancellation. If 1617// the context is nil a panic will occur. In the future the SDK may create 1618// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1619// for more information on using Contexts. 1620func (c *CostExplorer) GetTagsWithContext(ctx aws.Context, input *GetTagsInput, opts ...request.Option) (*GetTagsOutput, error) { 1621 req, out := c.GetTagsRequest(input) 1622 req.SetContext(ctx) 1623 req.ApplyOptions(opts...) 1624 return out, req.Send() 1625} 1626 1627const opGetUsageForecast = "GetUsageForecast" 1628 1629// GetUsageForecastRequest generates a "aws/request.Request" representing the 1630// client's request for the GetUsageForecast operation. The "output" return 1631// value will be populated with the request's response once the request completes 1632// successfully. 1633// 1634// Use "Send" method on the returned Request to send the API call to the service. 1635// the "output" return value is not valid until after Send returns without error. 1636// 1637// See GetUsageForecast for more information on using the GetUsageForecast 1638// API call, and error handling. 1639// 1640// This method is useful when you want to inject custom logic or configuration 1641// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1642// 1643// 1644// // Example sending a request using the GetUsageForecastRequest method. 1645// req, resp := client.GetUsageForecastRequest(params) 1646// 1647// err := req.Send() 1648// if err == nil { // resp is now filled 1649// fmt.Println(resp) 1650// } 1651// 1652// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetUsageForecast 1653func (c *CostExplorer) GetUsageForecastRequest(input *GetUsageForecastInput) (req *request.Request, output *GetUsageForecastOutput) { 1654 op := &request.Operation{ 1655 Name: opGetUsageForecast, 1656 HTTPMethod: "POST", 1657 HTTPPath: "/", 1658 } 1659 1660 if input == nil { 1661 input = &GetUsageForecastInput{} 1662 } 1663 1664 output = &GetUsageForecastOutput{} 1665 req = c.newRequest(op, input, output) 1666 return 1667} 1668 1669// GetUsageForecast API operation for AWS Cost Explorer Service. 1670// 1671// Retrieves a forecast for how much Amazon Web Services predicts that you will 1672// use over the forecast time period that you select, based on your past usage. 1673// 1674// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1675// with awserr.Error's Code and Message methods to get detailed information about 1676// the error. 1677// 1678// See the AWS API reference guide for AWS Cost Explorer Service's 1679// API operation GetUsageForecast for usage and error information. 1680// 1681// Returned Error Codes: 1682// * ErrCodeLimitExceededException "LimitExceededException" 1683// You made too many calls in a short period of time. Try again later. 1684// 1685// * ErrCodeDataUnavailableException "DataUnavailableException" 1686// The requested data is unavailable. 1687// 1688// * ErrCodeUnresolvableUsageUnitException "UnresolvableUsageUnitException" 1689// Cost Explorer was unable to identify the usage unit. Provide UsageType/UsageTypeGroup 1690// filter selections that contain matching units, for example: hours. 1691// 1692// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetUsageForecast 1693func (c *CostExplorer) GetUsageForecast(input *GetUsageForecastInput) (*GetUsageForecastOutput, error) { 1694 req, out := c.GetUsageForecastRequest(input) 1695 return out, req.Send() 1696} 1697 1698// GetUsageForecastWithContext is the same as GetUsageForecast with the addition of 1699// the ability to pass a context and additional request options. 1700// 1701// See GetUsageForecast for details on how to use this API operation. 1702// 1703// The context must be non-nil and will be used for request cancellation. If 1704// the context is nil a panic will occur. In the future the SDK may create 1705// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1706// for more information on using Contexts. 1707func (c *CostExplorer) GetUsageForecastWithContext(ctx aws.Context, input *GetUsageForecastInput, opts ...request.Option) (*GetUsageForecastOutput, error) { 1708 req, out := c.GetUsageForecastRequest(input) 1709 req.SetContext(ctx) 1710 req.ApplyOptions(opts...) 1711 return out, req.Send() 1712} 1713 1714const opListCostCategoryDefinitions = "ListCostCategoryDefinitions" 1715 1716// ListCostCategoryDefinitionsRequest generates a "aws/request.Request" representing the 1717// client's request for the ListCostCategoryDefinitions operation. The "output" return 1718// value will be populated with the request's response once the request completes 1719// successfully. 1720// 1721// Use "Send" method on the returned Request to send the API call to the service. 1722// the "output" return value is not valid until after Send returns without error. 1723// 1724// See ListCostCategoryDefinitions for more information on using the ListCostCategoryDefinitions 1725// API call, and error handling. 1726// 1727// This method is useful when you want to inject custom logic or configuration 1728// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1729// 1730// 1731// // Example sending a request using the ListCostCategoryDefinitionsRequest method. 1732// req, resp := client.ListCostCategoryDefinitionsRequest(params) 1733// 1734// err := req.Send() 1735// if err == nil { // resp is now filled 1736// fmt.Println(resp) 1737// } 1738// 1739// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/ListCostCategoryDefinitions 1740func (c *CostExplorer) ListCostCategoryDefinitionsRequest(input *ListCostCategoryDefinitionsInput) (req *request.Request, output *ListCostCategoryDefinitionsOutput) { 1741 op := &request.Operation{ 1742 Name: opListCostCategoryDefinitions, 1743 HTTPMethod: "POST", 1744 HTTPPath: "/", 1745 } 1746 1747 if input == nil { 1748 input = &ListCostCategoryDefinitionsInput{} 1749 } 1750 1751 output = &ListCostCategoryDefinitionsOutput{} 1752 req = c.newRequest(op, input, output) 1753 return 1754} 1755 1756// ListCostCategoryDefinitions API operation for AWS Cost Explorer Service. 1757// 1758// 1759// Cost Category is in preview release for AWS Billing and Cost Management 1760// and is subject to change. Your use of Cost Categories is subject to the 1761// Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) 1762// (Section 1.10). 1763// 1764// Returns the name, ARN and effective dates of all Cost Categories defined 1765// in the account. You have the option to use EffectiveOn to return a list of 1766// Cost Categories that were active on a specific date. If there is no EffectiveOn 1767// specified, you’ll see Cost Categories that are effective on the current 1768// date. If Cost Category is still effective, EffectiveEnd is omitted in the 1769// response. 1770// 1771// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1772// with awserr.Error's Code and Message methods to get detailed information about 1773// the error. 1774// 1775// See the AWS API reference guide for AWS Cost Explorer Service's 1776// API operation ListCostCategoryDefinitions for usage and error information. 1777// 1778// Returned Error Codes: 1779// * ErrCodeLimitExceededException "LimitExceededException" 1780// You made too many calls in a short period of time. Try again later. 1781// 1782// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/ListCostCategoryDefinitions 1783func (c *CostExplorer) ListCostCategoryDefinitions(input *ListCostCategoryDefinitionsInput) (*ListCostCategoryDefinitionsOutput, error) { 1784 req, out := c.ListCostCategoryDefinitionsRequest(input) 1785 return out, req.Send() 1786} 1787 1788// ListCostCategoryDefinitionsWithContext is the same as ListCostCategoryDefinitions with the addition of 1789// the ability to pass a context and additional request options. 1790// 1791// See ListCostCategoryDefinitions for details on how to use this API operation. 1792// 1793// The context must be non-nil and will be used for request cancellation. If 1794// the context is nil a panic will occur. In the future the SDK may create 1795// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1796// for more information on using Contexts. 1797func (c *CostExplorer) ListCostCategoryDefinitionsWithContext(ctx aws.Context, input *ListCostCategoryDefinitionsInput, opts ...request.Option) (*ListCostCategoryDefinitionsOutput, error) { 1798 req, out := c.ListCostCategoryDefinitionsRequest(input) 1799 req.SetContext(ctx) 1800 req.ApplyOptions(opts...) 1801 return out, req.Send() 1802} 1803 1804const opUpdateCostCategoryDefinition = "UpdateCostCategoryDefinition" 1805 1806// UpdateCostCategoryDefinitionRequest generates a "aws/request.Request" representing the 1807// client's request for the UpdateCostCategoryDefinition operation. The "output" return 1808// value will be populated with the request's response once the request completes 1809// successfully. 1810// 1811// Use "Send" method on the returned Request to send the API call to the service. 1812// the "output" return value is not valid until after Send returns without error. 1813// 1814// See UpdateCostCategoryDefinition for more information on using the UpdateCostCategoryDefinition 1815// API call, and error handling. 1816// 1817// This method is useful when you want to inject custom logic or configuration 1818// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1819// 1820// 1821// // Example sending a request using the UpdateCostCategoryDefinitionRequest method. 1822// req, resp := client.UpdateCostCategoryDefinitionRequest(params) 1823// 1824// err := req.Send() 1825// if err == nil { // resp is now filled 1826// fmt.Println(resp) 1827// } 1828// 1829// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/UpdateCostCategoryDefinition 1830func (c *CostExplorer) UpdateCostCategoryDefinitionRequest(input *UpdateCostCategoryDefinitionInput) (req *request.Request, output *UpdateCostCategoryDefinitionOutput) { 1831 op := &request.Operation{ 1832 Name: opUpdateCostCategoryDefinition, 1833 HTTPMethod: "POST", 1834 HTTPPath: "/", 1835 } 1836 1837 if input == nil { 1838 input = &UpdateCostCategoryDefinitionInput{} 1839 } 1840 1841 output = &UpdateCostCategoryDefinitionOutput{} 1842 req = c.newRequest(op, input, output) 1843 return 1844} 1845 1846// UpdateCostCategoryDefinition API operation for AWS Cost Explorer Service. 1847// 1848// 1849// Cost Category is in preview release for AWS Billing and Cost Management 1850// and is subject to change. Your use of Cost Categories is subject to the 1851// Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) 1852// (Section 1.10). 1853// 1854// Updates an existing Cost Category. Changes made to the Cost Category rules 1855// will be used to categorize the current month’s expenses and future expenses. 1856// This won’t change categorization for the previous months. 1857// 1858// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1859// with awserr.Error's Code and Message methods to get detailed information about 1860// the error. 1861// 1862// See the AWS API reference guide for AWS Cost Explorer Service's 1863// API operation UpdateCostCategoryDefinition for usage and error information. 1864// 1865// Returned Error Codes: 1866// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 1867// The specified ARN in the request doesn't exist. 1868// 1869// * ErrCodeServiceQuotaExceededException "ServiceQuotaExceededException" 1870// You've reached the limit on the number of resources you can create, or exceeded 1871// the size of an individual resources. 1872// 1873// * ErrCodeLimitExceededException "LimitExceededException" 1874// You made too many calls in a short period of time. Try again later. 1875// 1876// See also, https://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/UpdateCostCategoryDefinition 1877func (c *CostExplorer) UpdateCostCategoryDefinition(input *UpdateCostCategoryDefinitionInput) (*UpdateCostCategoryDefinitionOutput, error) { 1878 req, out := c.UpdateCostCategoryDefinitionRequest(input) 1879 return out, req.Send() 1880} 1881 1882// UpdateCostCategoryDefinitionWithContext is the same as UpdateCostCategoryDefinition with the addition of 1883// the ability to pass a context and additional request options. 1884// 1885// See UpdateCostCategoryDefinition for details on how to use this API operation. 1886// 1887// The context must be non-nil and will be used for request cancellation. If 1888// the context is nil a panic will occur. In the future the SDK may create 1889// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1890// for more information on using Contexts. 1891func (c *CostExplorer) UpdateCostCategoryDefinitionWithContext(ctx aws.Context, input *UpdateCostCategoryDefinitionInput, opts ...request.Option) (*UpdateCostCategoryDefinitionOutput, error) { 1892 req, out := c.UpdateCostCategoryDefinitionRequest(input) 1893 req.SetContext(ctx) 1894 req.ApplyOptions(opts...) 1895 return out, req.Send() 1896} 1897 1898// 1899// Cost Category is in preview release for AWS Billing and Cost Management 1900// and is subject to change. Your use of Cost Categories is subject to the 1901// Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) 1902// (Section 1.10). 1903// 1904// The structure of Cost Categories. This includes detailed metadata and the 1905// set of rules for the CostCategory object. 1906type CostCategory struct { 1907 _ struct{} `type:"structure"` 1908 1909 // The unique identifier for your Cost Category. 1910 // 1911 // CostCategoryArn is a required field 1912 CostCategoryArn *string `min:"20" type:"string" required:"true"` 1913 1914 // The Cost Category's effective end date. 1915 EffectiveEnd *string `min:"20" type:"string"` 1916 1917 // The Cost Category's effective start date. 1918 // 1919 // EffectiveStart is a required field 1920 EffectiveStart *string `min:"20" type:"string" required:"true"` 1921 1922 // The unique name of the Cost Category. 1923 // 1924 // Name is a required field 1925 Name *string `min:"1" type:"string" required:"true"` 1926 1927 // The rule schema version in this particular Cost Category. 1928 // 1929 // RuleVersion is a required field 1930 RuleVersion *string `type:"string" required:"true" enum:"CostCategoryRuleVersion"` 1931 1932 // Rules are processed in order. If there are multiple rules that match the 1933 // line item, then the first rule to match is used to determine that Cost Category 1934 // value. 1935 // 1936 // Rules is a required field 1937 Rules []*CostCategoryRule `min:"1" type:"list" required:"true"` 1938} 1939 1940// String returns the string representation 1941func (s CostCategory) String() string { 1942 return awsutil.Prettify(s) 1943} 1944 1945// GoString returns the string representation 1946func (s CostCategory) GoString() string { 1947 return s.String() 1948} 1949 1950// SetCostCategoryArn sets the CostCategoryArn field's value. 1951func (s *CostCategory) SetCostCategoryArn(v string) *CostCategory { 1952 s.CostCategoryArn = &v 1953 return s 1954} 1955 1956// SetEffectiveEnd sets the EffectiveEnd field's value. 1957func (s *CostCategory) SetEffectiveEnd(v string) *CostCategory { 1958 s.EffectiveEnd = &v 1959 return s 1960} 1961 1962// SetEffectiveStart sets the EffectiveStart field's value. 1963func (s *CostCategory) SetEffectiveStart(v string) *CostCategory { 1964 s.EffectiveStart = &v 1965 return s 1966} 1967 1968// SetName sets the Name field's value. 1969func (s *CostCategory) SetName(v string) *CostCategory { 1970 s.Name = &v 1971 return s 1972} 1973 1974// SetRuleVersion sets the RuleVersion field's value. 1975func (s *CostCategory) SetRuleVersion(v string) *CostCategory { 1976 s.RuleVersion = &v 1977 return s 1978} 1979 1980// SetRules sets the Rules field's value. 1981func (s *CostCategory) SetRules(v []*CostCategoryRule) *CostCategory { 1982 s.Rules = v 1983 return s 1984} 1985 1986// 1987// Cost Category is in preview release for AWS Billing and Cost Management 1988// and is subject to change. Your use of Cost Categories is subject to the 1989// Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) 1990// (Section 1.10). 1991// 1992// A reference to a Cost Category containing only enough information to identify 1993// the Cost Category. 1994// 1995// You can use this information to retrieve the full Cost Category information 1996// using DescribeCostCategory. 1997type CostCategoryReference struct { 1998 _ struct{} `type:"structure"` 1999 2000 // The unique identifier for your Cost Category Reference. 2001 CostCategoryArn *string `min:"20" type:"string"` 2002 2003 // The Cost Category's effective end date. 2004 EffectiveEnd *string `min:"20" type:"string"` 2005 2006 // The Cost Category's effective start date. 2007 EffectiveStart *string `min:"20" type:"string"` 2008 2009 // The unique name of the Cost Category. 2010 Name *string `min:"1" type:"string"` 2011} 2012 2013// String returns the string representation 2014func (s CostCategoryReference) String() string { 2015 return awsutil.Prettify(s) 2016} 2017 2018// GoString returns the string representation 2019func (s CostCategoryReference) GoString() string { 2020 return s.String() 2021} 2022 2023// SetCostCategoryArn sets the CostCategoryArn field's value. 2024func (s *CostCategoryReference) SetCostCategoryArn(v string) *CostCategoryReference { 2025 s.CostCategoryArn = &v 2026 return s 2027} 2028 2029// SetEffectiveEnd sets the EffectiveEnd field's value. 2030func (s *CostCategoryReference) SetEffectiveEnd(v string) *CostCategoryReference { 2031 s.EffectiveEnd = &v 2032 return s 2033} 2034 2035// SetEffectiveStart sets the EffectiveStart field's value. 2036func (s *CostCategoryReference) SetEffectiveStart(v string) *CostCategoryReference { 2037 s.EffectiveStart = &v 2038 return s 2039} 2040 2041// SetName sets the Name field's value. 2042func (s *CostCategoryReference) SetName(v string) *CostCategoryReference { 2043 s.Name = &v 2044 return s 2045} 2046 2047// 2048// Cost Category is in preview release for AWS Billing and Cost Management 2049// and is subject to change. Your use of Cost Categories is subject to the 2050// Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) 2051// (Section 1.10). 2052// 2053// Rules are processed in order. If there are multiple rules that match the 2054// line item, then the first rule to match is used to determine that Cost Category 2055// value. 2056type CostCategoryRule struct { 2057 _ struct{} `type:"structure"` 2058 2059 // An Expression (http://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html) 2060 // object used to categorize costs. This supports dimensions, Tags, and nested 2061 // expressions. Currently the only dimensions supported is LINKED_ACCOUNT. 2062 // 2063 // Root level OR is not supported. We recommend you create a separate rule instead. 2064 // 2065 // Rule is a required field 2066 Rule *Expression `type:"structure" required:"true"` 2067 2068 // The value a line item will be categorized as, if it matches the rule. 2069 // 2070 // Value is a required field 2071 Value *string `min:"1" type:"string" required:"true"` 2072} 2073 2074// String returns the string representation 2075func (s CostCategoryRule) String() string { 2076 return awsutil.Prettify(s) 2077} 2078 2079// GoString returns the string representation 2080func (s CostCategoryRule) GoString() string { 2081 return s.String() 2082} 2083 2084// Validate inspects the fields of the type to determine if they are valid. 2085func (s *CostCategoryRule) Validate() error { 2086 invalidParams := request.ErrInvalidParams{Context: "CostCategoryRule"} 2087 if s.Rule == nil { 2088 invalidParams.Add(request.NewErrParamRequired("Rule")) 2089 } 2090 if s.Value == nil { 2091 invalidParams.Add(request.NewErrParamRequired("Value")) 2092 } 2093 if s.Value != nil && len(*s.Value) < 1 { 2094 invalidParams.Add(request.NewErrParamMinLen("Value", 1)) 2095 } 2096 if s.Rule != nil { 2097 if err := s.Rule.Validate(); err != nil { 2098 invalidParams.AddNested("Rule", err.(request.ErrInvalidParams)) 2099 } 2100 } 2101 2102 if invalidParams.Len() > 0 { 2103 return invalidParams 2104 } 2105 return nil 2106} 2107 2108// SetRule sets the Rule field's value. 2109func (s *CostCategoryRule) SetRule(v *Expression) *CostCategoryRule { 2110 s.Rule = v 2111 return s 2112} 2113 2114// SetValue sets the Value field's value. 2115func (s *CostCategoryRule) SetValue(v string) *CostCategoryRule { 2116 s.Value = &v 2117 return s 2118} 2119 2120// 2121// Cost Category is in preview release for AWS Billing and Cost Management 2122// and is subject to change. Your use of Cost Categories is subject to the 2123// Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) 2124// (Section 1.10). 2125// 2126// The values that are available for Cost Categories. 2127type CostCategoryValues struct { 2128 _ struct{} `type:"structure"` 2129 2130 // The unique name of the Cost Category. 2131 Key *string `min:"1" type:"string"` 2132 2133 // The specific value of the Cost Category. 2134 Values []*string `type:"list"` 2135} 2136 2137// String returns the string representation 2138func (s CostCategoryValues) String() string { 2139 return awsutil.Prettify(s) 2140} 2141 2142// GoString returns the string representation 2143func (s CostCategoryValues) GoString() string { 2144 return s.String() 2145} 2146 2147// Validate inspects the fields of the type to determine if they are valid. 2148func (s *CostCategoryValues) Validate() error { 2149 invalidParams := request.ErrInvalidParams{Context: "CostCategoryValues"} 2150 if s.Key != nil && len(*s.Key) < 1 { 2151 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 2152 } 2153 2154 if invalidParams.Len() > 0 { 2155 return invalidParams 2156 } 2157 return nil 2158} 2159 2160// SetKey sets the Key field's value. 2161func (s *CostCategoryValues) SetKey(v string) *CostCategoryValues { 2162 s.Key = &v 2163 return s 2164} 2165 2166// SetValues sets the Values field's value. 2167func (s *CostCategoryValues) SetValues(v []*string) *CostCategoryValues { 2168 s.Values = v 2169 return s 2170} 2171 2172// The amount of instance usage that a reservation covered. 2173type Coverage struct { 2174 _ struct{} `type:"structure"` 2175 2176 // The amount of cost that the reservation covered. 2177 CoverageCost *CoverageCost `type:"structure"` 2178 2179 // The amount of instance usage that the reservation covered, in hours. 2180 CoverageHours *CoverageHours `type:"structure"` 2181 2182 // The amount of instance usage that the reservation covered, in normalized 2183 // units. 2184 CoverageNormalizedUnits *CoverageNormalizedUnits `type:"structure"` 2185} 2186 2187// String returns the string representation 2188func (s Coverage) String() string { 2189 return awsutil.Prettify(s) 2190} 2191 2192// GoString returns the string representation 2193func (s Coverage) GoString() string { 2194 return s.String() 2195} 2196 2197// SetCoverageCost sets the CoverageCost field's value. 2198func (s *Coverage) SetCoverageCost(v *CoverageCost) *Coverage { 2199 s.CoverageCost = v 2200 return s 2201} 2202 2203// SetCoverageHours sets the CoverageHours field's value. 2204func (s *Coverage) SetCoverageHours(v *CoverageHours) *Coverage { 2205 s.CoverageHours = v 2206 return s 2207} 2208 2209// SetCoverageNormalizedUnits sets the CoverageNormalizedUnits field's value. 2210func (s *Coverage) SetCoverageNormalizedUnits(v *CoverageNormalizedUnits) *Coverage { 2211 s.CoverageNormalizedUnits = v 2212 return s 2213} 2214 2215// Reservation coverage for a specified period, in hours. 2216type CoverageByTime struct { 2217 _ struct{} `type:"structure"` 2218 2219 // The groups of instances that the reservation covered. 2220 Groups []*ReservationCoverageGroup `type:"list"` 2221 2222 // The period that this coverage was used over. 2223 TimePeriod *DateInterval `type:"structure"` 2224 2225 // The total reservation coverage, in hours. 2226 Total *Coverage `type:"structure"` 2227} 2228 2229// String returns the string representation 2230func (s CoverageByTime) String() string { 2231 return awsutil.Prettify(s) 2232} 2233 2234// GoString returns the string representation 2235func (s CoverageByTime) GoString() string { 2236 return s.String() 2237} 2238 2239// SetGroups sets the Groups field's value. 2240func (s *CoverageByTime) SetGroups(v []*ReservationCoverageGroup) *CoverageByTime { 2241 s.Groups = v 2242 return s 2243} 2244 2245// SetTimePeriod sets the TimePeriod field's value. 2246func (s *CoverageByTime) SetTimePeriod(v *DateInterval) *CoverageByTime { 2247 s.TimePeriod = v 2248 return s 2249} 2250 2251// SetTotal sets the Total field's value. 2252func (s *CoverageByTime) SetTotal(v *Coverage) *CoverageByTime { 2253 s.Total = v 2254 return s 2255} 2256 2257// How much it cost to run an instance. 2258type CoverageCost struct { 2259 _ struct{} `type:"structure"` 2260 2261 // How much an On-Demand instance cost. 2262 OnDemandCost *string `type:"string"` 2263} 2264 2265// String returns the string representation 2266func (s CoverageCost) String() string { 2267 return awsutil.Prettify(s) 2268} 2269 2270// GoString returns the string representation 2271func (s CoverageCost) GoString() string { 2272 return s.String() 2273} 2274 2275// SetOnDemandCost sets the OnDemandCost field's value. 2276func (s *CoverageCost) SetOnDemandCost(v string) *CoverageCost { 2277 s.OnDemandCost = &v 2278 return s 2279} 2280 2281// How long a running instance either used a reservation or was On-Demand. 2282type CoverageHours struct { 2283 _ struct{} `type:"structure"` 2284 2285 // The percentage of instance hours that a reservation covered. 2286 CoverageHoursPercentage *string `type:"string"` 2287 2288 // The number of instance running hours that On-Demand Instances covered. 2289 OnDemandHours *string `type:"string"` 2290 2291 // The number of instance running hours that reservations covered. 2292 ReservedHours *string `type:"string"` 2293 2294 // The total instance usage, in hours. 2295 TotalRunningHours *string `type:"string"` 2296} 2297 2298// String returns the string representation 2299func (s CoverageHours) String() string { 2300 return awsutil.Prettify(s) 2301} 2302 2303// GoString returns the string representation 2304func (s CoverageHours) GoString() string { 2305 return s.String() 2306} 2307 2308// SetCoverageHoursPercentage sets the CoverageHoursPercentage field's value. 2309func (s *CoverageHours) SetCoverageHoursPercentage(v string) *CoverageHours { 2310 s.CoverageHoursPercentage = &v 2311 return s 2312} 2313 2314// SetOnDemandHours sets the OnDemandHours field's value. 2315func (s *CoverageHours) SetOnDemandHours(v string) *CoverageHours { 2316 s.OnDemandHours = &v 2317 return s 2318} 2319 2320// SetReservedHours sets the ReservedHours field's value. 2321func (s *CoverageHours) SetReservedHours(v string) *CoverageHours { 2322 s.ReservedHours = &v 2323 return s 2324} 2325 2326// SetTotalRunningHours sets the TotalRunningHours field's value. 2327func (s *CoverageHours) SetTotalRunningHours(v string) *CoverageHours { 2328 s.TotalRunningHours = &v 2329 return s 2330} 2331 2332// The amount of instance usage, in normalized units. Normalized units enable 2333// you to see your EC2 usage for multiple sizes of instances in a uniform way. 2334// For example, suppose you run an xlarge instance and a 2xlarge instance. If 2335// you run both instances for the same amount of time, the 2xlarge instance 2336// uses twice as much of your reservation as the xlarge instance, even though 2337// both instances show only one instance-hour. Using normalized units instead 2338// of instance-hours, the xlarge instance used 8 normalized units, and the 2xlarge 2339// instance used 16 normalized units. 2340// 2341// For more information, see Modifying Reserved Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html) 2342// in the Amazon Elastic Compute Cloud User Guide for Linux Instances. 2343type CoverageNormalizedUnits struct { 2344 _ struct{} `type:"structure"` 2345 2346 // The percentage of your used instance normalized units that a reservation 2347 // covers. 2348 CoverageNormalizedUnitsPercentage *string `type:"string"` 2349 2350 // The number of normalized units that are covered by On-Demand Instances instead 2351 // of a reservation. 2352 OnDemandNormalizedUnits *string `type:"string"` 2353 2354 // The number of normalized units that a reservation covers. 2355 ReservedNormalizedUnits *string `type:"string"` 2356 2357 // The total number of normalized units that you used. 2358 TotalRunningNormalizedUnits *string `type:"string"` 2359} 2360 2361// String returns the string representation 2362func (s CoverageNormalizedUnits) String() string { 2363 return awsutil.Prettify(s) 2364} 2365 2366// GoString returns the string representation 2367func (s CoverageNormalizedUnits) GoString() string { 2368 return s.String() 2369} 2370 2371// SetCoverageNormalizedUnitsPercentage sets the CoverageNormalizedUnitsPercentage field's value. 2372func (s *CoverageNormalizedUnits) SetCoverageNormalizedUnitsPercentage(v string) *CoverageNormalizedUnits { 2373 s.CoverageNormalizedUnitsPercentage = &v 2374 return s 2375} 2376 2377// SetOnDemandNormalizedUnits sets the OnDemandNormalizedUnits field's value. 2378func (s *CoverageNormalizedUnits) SetOnDemandNormalizedUnits(v string) *CoverageNormalizedUnits { 2379 s.OnDemandNormalizedUnits = &v 2380 return s 2381} 2382 2383// SetReservedNormalizedUnits sets the ReservedNormalizedUnits field's value. 2384func (s *CoverageNormalizedUnits) SetReservedNormalizedUnits(v string) *CoverageNormalizedUnits { 2385 s.ReservedNormalizedUnits = &v 2386 return s 2387} 2388 2389// SetTotalRunningNormalizedUnits sets the TotalRunningNormalizedUnits field's value. 2390func (s *CoverageNormalizedUnits) SetTotalRunningNormalizedUnits(v string) *CoverageNormalizedUnits { 2391 s.TotalRunningNormalizedUnits = &v 2392 return s 2393} 2394 2395type CreateCostCategoryDefinitionInput struct { 2396 _ struct{} `type:"structure"` 2397 2398 // The unique name of the Cost Category. 2399 // 2400 // Name is a required field 2401 Name *string `min:"1" type:"string" required:"true"` 2402 2403 // The rule schema version in this particular Cost Category. 2404 // 2405 // RuleVersion is a required field 2406 RuleVersion *string `type:"string" required:"true" enum:"CostCategoryRuleVersion"` 2407 2408 // Rules are processed in order. If there are multiple rules that match the 2409 // line item, then the first rule to match is used to determine that Cost Category 2410 // value. 2411 // 2412 // Rules is a required field 2413 Rules []*CostCategoryRule `min:"1" type:"list" required:"true"` 2414} 2415 2416// String returns the string representation 2417func (s CreateCostCategoryDefinitionInput) String() string { 2418 return awsutil.Prettify(s) 2419} 2420 2421// GoString returns the string representation 2422func (s CreateCostCategoryDefinitionInput) GoString() string { 2423 return s.String() 2424} 2425 2426// Validate inspects the fields of the type to determine if they are valid. 2427func (s *CreateCostCategoryDefinitionInput) Validate() error { 2428 invalidParams := request.ErrInvalidParams{Context: "CreateCostCategoryDefinitionInput"} 2429 if s.Name == nil { 2430 invalidParams.Add(request.NewErrParamRequired("Name")) 2431 } 2432 if s.Name != nil && len(*s.Name) < 1 { 2433 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 2434 } 2435 if s.RuleVersion == nil { 2436 invalidParams.Add(request.NewErrParamRequired("RuleVersion")) 2437 } 2438 if s.Rules == nil { 2439 invalidParams.Add(request.NewErrParamRequired("Rules")) 2440 } 2441 if s.Rules != nil && len(s.Rules) < 1 { 2442 invalidParams.Add(request.NewErrParamMinLen("Rules", 1)) 2443 } 2444 if s.Rules != nil { 2445 for i, v := range s.Rules { 2446 if v == nil { 2447 continue 2448 } 2449 if err := v.Validate(); err != nil { 2450 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) 2451 } 2452 } 2453 } 2454 2455 if invalidParams.Len() > 0 { 2456 return invalidParams 2457 } 2458 return nil 2459} 2460 2461// SetName sets the Name field's value. 2462func (s *CreateCostCategoryDefinitionInput) SetName(v string) *CreateCostCategoryDefinitionInput { 2463 s.Name = &v 2464 return s 2465} 2466 2467// SetRuleVersion sets the RuleVersion field's value. 2468func (s *CreateCostCategoryDefinitionInput) SetRuleVersion(v string) *CreateCostCategoryDefinitionInput { 2469 s.RuleVersion = &v 2470 return s 2471} 2472 2473// SetRules sets the Rules field's value. 2474func (s *CreateCostCategoryDefinitionInput) SetRules(v []*CostCategoryRule) *CreateCostCategoryDefinitionInput { 2475 s.Rules = v 2476 return s 2477} 2478 2479type CreateCostCategoryDefinitionOutput struct { 2480 _ struct{} `type:"structure"` 2481 2482 // The unique identifier for your newly created Cost Category. 2483 CostCategoryArn *string `min:"20" type:"string"` 2484 2485 // The Cost Category's effective start date. 2486 EffectiveStart *string `min:"20" type:"string"` 2487} 2488 2489// String returns the string representation 2490func (s CreateCostCategoryDefinitionOutput) String() string { 2491 return awsutil.Prettify(s) 2492} 2493 2494// GoString returns the string representation 2495func (s CreateCostCategoryDefinitionOutput) GoString() string { 2496 return s.String() 2497} 2498 2499// SetCostCategoryArn sets the CostCategoryArn field's value. 2500func (s *CreateCostCategoryDefinitionOutput) SetCostCategoryArn(v string) *CreateCostCategoryDefinitionOutput { 2501 s.CostCategoryArn = &v 2502 return s 2503} 2504 2505// SetEffectiveStart sets the EffectiveStart field's value. 2506func (s *CreateCostCategoryDefinitionOutput) SetEffectiveStart(v string) *CreateCostCategoryDefinitionOutput { 2507 s.EffectiveStart = &v 2508 return s 2509} 2510 2511// Context about the current instance. 2512type CurrentInstance struct { 2513 _ struct{} `type:"structure"` 2514 2515 // The currency code that Amazon Web Services used to calculate the costs for 2516 // this instance. 2517 CurrencyCode *string `type:"string"` 2518 2519 // Current On Demand cost of operating this instance on a monthly basis. 2520 MonthlyCost *string `type:"string"` 2521 2522 // Number of hours during the lookback period billed at On Demand rates. 2523 OnDemandHoursInLookbackPeriod *string `type:"string"` 2524 2525 // Number of hours during the lookback period covered by reservations. 2526 ReservationCoveredHoursInLookbackPeriod *string `type:"string"` 2527 2528 // Details about the resource and utilization. 2529 ResourceDetails *ResourceDetails `type:"structure"` 2530 2531 // Resource ID of the current instance. 2532 ResourceId *string `type:"string"` 2533 2534 // Utilization information of the current instance during the lookback period. 2535 ResourceUtilization *ResourceUtilization `type:"structure"` 2536 2537 // Number of hours during the lookback period covered by Savings Plans. 2538 SavingsPlansCoveredHoursInLookbackPeriod *string `type:"string"` 2539 2540 // Cost allocation resource tags applied to the instance. 2541 Tags []*TagValues `type:"list"` 2542 2543 // The total number of hours the instance ran during the lookback period. 2544 TotalRunningHoursInLookbackPeriod *string `type:"string"` 2545} 2546 2547// String returns the string representation 2548func (s CurrentInstance) String() string { 2549 return awsutil.Prettify(s) 2550} 2551 2552// GoString returns the string representation 2553func (s CurrentInstance) GoString() string { 2554 return s.String() 2555} 2556 2557// SetCurrencyCode sets the CurrencyCode field's value. 2558func (s *CurrentInstance) SetCurrencyCode(v string) *CurrentInstance { 2559 s.CurrencyCode = &v 2560 return s 2561} 2562 2563// SetMonthlyCost sets the MonthlyCost field's value. 2564func (s *CurrentInstance) SetMonthlyCost(v string) *CurrentInstance { 2565 s.MonthlyCost = &v 2566 return s 2567} 2568 2569// SetOnDemandHoursInLookbackPeriod sets the OnDemandHoursInLookbackPeriod field's value. 2570func (s *CurrentInstance) SetOnDemandHoursInLookbackPeriod(v string) *CurrentInstance { 2571 s.OnDemandHoursInLookbackPeriod = &v 2572 return s 2573} 2574 2575// SetReservationCoveredHoursInLookbackPeriod sets the ReservationCoveredHoursInLookbackPeriod field's value. 2576func (s *CurrentInstance) SetReservationCoveredHoursInLookbackPeriod(v string) *CurrentInstance { 2577 s.ReservationCoveredHoursInLookbackPeriod = &v 2578 return s 2579} 2580 2581// SetResourceDetails sets the ResourceDetails field's value. 2582func (s *CurrentInstance) SetResourceDetails(v *ResourceDetails) *CurrentInstance { 2583 s.ResourceDetails = v 2584 return s 2585} 2586 2587// SetResourceId sets the ResourceId field's value. 2588func (s *CurrentInstance) SetResourceId(v string) *CurrentInstance { 2589 s.ResourceId = &v 2590 return s 2591} 2592 2593// SetResourceUtilization sets the ResourceUtilization field's value. 2594func (s *CurrentInstance) SetResourceUtilization(v *ResourceUtilization) *CurrentInstance { 2595 s.ResourceUtilization = v 2596 return s 2597} 2598 2599// SetSavingsPlansCoveredHoursInLookbackPeriod sets the SavingsPlansCoveredHoursInLookbackPeriod field's value. 2600func (s *CurrentInstance) SetSavingsPlansCoveredHoursInLookbackPeriod(v string) *CurrentInstance { 2601 s.SavingsPlansCoveredHoursInLookbackPeriod = &v 2602 return s 2603} 2604 2605// SetTags sets the Tags field's value. 2606func (s *CurrentInstance) SetTags(v []*TagValues) *CurrentInstance { 2607 s.Tags = v 2608 return s 2609} 2610 2611// SetTotalRunningHoursInLookbackPeriod sets the TotalRunningHoursInLookbackPeriod field's value. 2612func (s *CurrentInstance) SetTotalRunningHoursInLookbackPeriod(v string) *CurrentInstance { 2613 s.TotalRunningHoursInLookbackPeriod = &v 2614 return s 2615} 2616 2617// The time period that you want the usage and costs for. 2618type DateInterval struct { 2619 _ struct{} `type:"structure"` 2620 2621 // The end of the time period that you want the usage and costs for. The end 2622 // date is exclusive. For example, if end is 2017-05-01, AWS retrieves cost 2623 // and usage data from the start date up to, but not including, 2017-05-01. 2624 // 2625 // End is a required field 2626 End *string `type:"string" required:"true"` 2627 2628 // The beginning of the time period that you want the usage and costs for. The 2629 // start date is inclusive. For example, if start is 2017-01-01, AWS retrieves 2630 // cost and usage data starting at 2017-01-01 up to the end date. 2631 // 2632 // Start is a required field 2633 Start *string `type:"string" required:"true"` 2634} 2635 2636// String returns the string representation 2637func (s DateInterval) String() string { 2638 return awsutil.Prettify(s) 2639} 2640 2641// GoString returns the string representation 2642func (s DateInterval) GoString() string { 2643 return s.String() 2644} 2645 2646// Validate inspects the fields of the type to determine if they are valid. 2647func (s *DateInterval) Validate() error { 2648 invalidParams := request.ErrInvalidParams{Context: "DateInterval"} 2649 if s.End == nil { 2650 invalidParams.Add(request.NewErrParamRequired("End")) 2651 } 2652 if s.Start == nil { 2653 invalidParams.Add(request.NewErrParamRequired("Start")) 2654 } 2655 2656 if invalidParams.Len() > 0 { 2657 return invalidParams 2658 } 2659 return nil 2660} 2661 2662// SetEnd sets the End field's value. 2663func (s *DateInterval) SetEnd(v string) *DateInterval { 2664 s.End = &v 2665 return s 2666} 2667 2668// SetStart sets the Start field's value. 2669func (s *DateInterval) SetStart(v string) *DateInterval { 2670 s.Start = &v 2671 return s 2672} 2673 2674type DeleteCostCategoryDefinitionInput struct { 2675 _ struct{} `type:"structure"` 2676 2677 // The unique identifier for your Cost Category. 2678 // 2679 // CostCategoryArn is a required field 2680 CostCategoryArn *string `min:"20" type:"string" required:"true"` 2681} 2682 2683// String returns the string representation 2684func (s DeleteCostCategoryDefinitionInput) String() string { 2685 return awsutil.Prettify(s) 2686} 2687 2688// GoString returns the string representation 2689func (s DeleteCostCategoryDefinitionInput) GoString() string { 2690 return s.String() 2691} 2692 2693// Validate inspects the fields of the type to determine if they are valid. 2694func (s *DeleteCostCategoryDefinitionInput) Validate() error { 2695 invalidParams := request.ErrInvalidParams{Context: "DeleteCostCategoryDefinitionInput"} 2696 if s.CostCategoryArn == nil { 2697 invalidParams.Add(request.NewErrParamRequired("CostCategoryArn")) 2698 } 2699 if s.CostCategoryArn != nil && len(*s.CostCategoryArn) < 20 { 2700 invalidParams.Add(request.NewErrParamMinLen("CostCategoryArn", 20)) 2701 } 2702 2703 if invalidParams.Len() > 0 { 2704 return invalidParams 2705 } 2706 return nil 2707} 2708 2709// SetCostCategoryArn sets the CostCategoryArn field's value. 2710func (s *DeleteCostCategoryDefinitionInput) SetCostCategoryArn(v string) *DeleteCostCategoryDefinitionInput { 2711 s.CostCategoryArn = &v 2712 return s 2713} 2714 2715type DeleteCostCategoryDefinitionOutput struct { 2716 _ struct{} `type:"structure"` 2717 2718 // The unique identifier for your Cost Category. 2719 CostCategoryArn *string `min:"20" type:"string"` 2720 2721 // The effective end date of the Cost Category as a result of deleting it. No 2722 // costs after this date will be categorized by the deleted Cost Category. 2723 EffectiveEnd *string `min:"20" type:"string"` 2724} 2725 2726// String returns the string representation 2727func (s DeleteCostCategoryDefinitionOutput) String() string { 2728 return awsutil.Prettify(s) 2729} 2730 2731// GoString returns the string representation 2732func (s DeleteCostCategoryDefinitionOutput) GoString() string { 2733 return s.String() 2734} 2735 2736// SetCostCategoryArn sets the CostCategoryArn field's value. 2737func (s *DeleteCostCategoryDefinitionOutput) SetCostCategoryArn(v string) *DeleteCostCategoryDefinitionOutput { 2738 s.CostCategoryArn = &v 2739 return s 2740} 2741 2742// SetEffectiveEnd sets the EffectiveEnd field's value. 2743func (s *DeleteCostCategoryDefinitionOutput) SetEffectiveEnd(v string) *DeleteCostCategoryDefinitionOutput { 2744 s.EffectiveEnd = &v 2745 return s 2746} 2747 2748type DescribeCostCategoryDefinitionInput struct { 2749 _ struct{} `type:"structure"` 2750 2751 // The unique identifier for your Cost Category. 2752 // 2753 // CostCategoryArn is a required field 2754 CostCategoryArn *string `min:"20" type:"string" required:"true"` 2755 2756 // The date when the Cost Category was effective. 2757 EffectiveOn *string `min:"20" type:"string"` 2758} 2759 2760// String returns the string representation 2761func (s DescribeCostCategoryDefinitionInput) String() string { 2762 return awsutil.Prettify(s) 2763} 2764 2765// GoString returns the string representation 2766func (s DescribeCostCategoryDefinitionInput) GoString() string { 2767 return s.String() 2768} 2769 2770// Validate inspects the fields of the type to determine if they are valid. 2771func (s *DescribeCostCategoryDefinitionInput) Validate() error { 2772 invalidParams := request.ErrInvalidParams{Context: "DescribeCostCategoryDefinitionInput"} 2773 if s.CostCategoryArn == nil { 2774 invalidParams.Add(request.NewErrParamRequired("CostCategoryArn")) 2775 } 2776 if s.CostCategoryArn != nil && len(*s.CostCategoryArn) < 20 { 2777 invalidParams.Add(request.NewErrParamMinLen("CostCategoryArn", 20)) 2778 } 2779 if s.EffectiveOn != nil && len(*s.EffectiveOn) < 20 { 2780 invalidParams.Add(request.NewErrParamMinLen("EffectiveOn", 20)) 2781 } 2782 2783 if invalidParams.Len() > 0 { 2784 return invalidParams 2785 } 2786 return nil 2787} 2788 2789// SetCostCategoryArn sets the CostCategoryArn field's value. 2790func (s *DescribeCostCategoryDefinitionInput) SetCostCategoryArn(v string) *DescribeCostCategoryDefinitionInput { 2791 s.CostCategoryArn = &v 2792 return s 2793} 2794 2795// SetEffectiveOn sets the EffectiveOn field's value. 2796func (s *DescribeCostCategoryDefinitionInput) SetEffectiveOn(v string) *DescribeCostCategoryDefinitionInput { 2797 s.EffectiveOn = &v 2798 return s 2799} 2800 2801type DescribeCostCategoryDefinitionOutput struct { 2802 _ struct{} `type:"structure"` 2803 2804 // 2805 // Cost Category is in preview release for AWS Billing and Cost Management 2806 // and is subject to change. Your use of Cost Categories is subject to the 2807 // Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) 2808 // (Section 1.10). 2809 // 2810 // The structure of Cost Categories. This includes detailed metadata and the 2811 // set of rules for the CostCategory object. 2812 CostCategory *CostCategory `type:"structure"` 2813} 2814 2815// String returns the string representation 2816func (s DescribeCostCategoryDefinitionOutput) String() string { 2817 return awsutil.Prettify(s) 2818} 2819 2820// GoString returns the string representation 2821func (s DescribeCostCategoryDefinitionOutput) GoString() string { 2822 return s.String() 2823} 2824 2825// SetCostCategory sets the CostCategory field's value. 2826func (s *DescribeCostCategoryDefinitionOutput) SetCostCategory(v *CostCategory) *DescribeCostCategoryDefinitionOutput { 2827 s.CostCategory = v 2828 return s 2829} 2830 2831// The metadata that you can use to filter and group your results. You can use 2832// GetDimensionValues to find specific values. 2833type DimensionValues struct { 2834 _ struct{} `type:"structure"` 2835 2836 // The names of the metadata types that you can use to filter and group your 2837 // results. For example, AZ returns a list of Availability Zones. 2838 Key *string `type:"string" enum:"Dimension"` 2839 2840 // The metadata values that you can use to filter and group your results. You 2841 // can use GetDimensionValues to find specific values. 2842 // 2843 // Valid values for the SERVICE dimension are Amazon Elastic Compute Cloud - 2844 // Compute, Amazon Elasticsearch Service, Amazon ElastiCache, Amazon Redshift, 2845 // and Amazon Relational Database Service. 2846 Values []*string `type:"list"` 2847} 2848 2849// String returns the string representation 2850func (s DimensionValues) String() string { 2851 return awsutil.Prettify(s) 2852} 2853 2854// GoString returns the string representation 2855func (s DimensionValues) GoString() string { 2856 return s.String() 2857} 2858 2859// SetKey sets the Key field's value. 2860func (s *DimensionValues) SetKey(v string) *DimensionValues { 2861 s.Key = &v 2862 return s 2863} 2864 2865// SetValues sets the Values field's value. 2866func (s *DimensionValues) SetValues(v []*string) *DimensionValues { 2867 s.Values = v 2868 return s 2869} 2870 2871// The metadata of a specific type that you can use to filter and group your 2872// results. You can use GetDimensionValues to find specific values. 2873type DimensionValuesWithAttributes struct { 2874 _ struct{} `type:"structure"` 2875 2876 // The attribute that applies to a specific Dimension. 2877 Attributes map[string]*string `type:"map"` 2878 2879 // The value of a dimension with a specific attribute. 2880 Value *string `type:"string"` 2881} 2882 2883// String returns the string representation 2884func (s DimensionValuesWithAttributes) String() string { 2885 return awsutil.Prettify(s) 2886} 2887 2888// GoString returns the string representation 2889func (s DimensionValuesWithAttributes) GoString() string { 2890 return s.String() 2891} 2892 2893// SetAttributes sets the Attributes field's value. 2894func (s *DimensionValuesWithAttributes) SetAttributes(v map[string]*string) *DimensionValuesWithAttributes { 2895 s.Attributes = v 2896 return s 2897} 2898 2899// SetValue sets the Value field's value. 2900func (s *DimensionValuesWithAttributes) SetValue(v string) *DimensionValuesWithAttributes { 2901 s.Value = &v 2902 return s 2903} 2904 2905// Details about the Amazon EC2 instances that AWS recommends that you purchase. 2906type EC2InstanceDetails struct { 2907 _ struct{} `type:"structure"` 2908 2909 // The Availability Zone of the recommended reservation. 2910 AvailabilityZone *string `type:"string"` 2911 2912 // Whether the recommendation is for a current-generation instance. 2913 CurrentGeneration *bool `type:"boolean"` 2914 2915 // The instance family of the recommended reservation. 2916 Family *string `type:"string"` 2917 2918 // The type of instance that AWS recommends. 2919 InstanceType *string `type:"string"` 2920 2921 // The platform of the recommended reservation. The platform is the specific 2922 // combination of operating system, license model, and software on an instance. 2923 Platform *string `type:"string"` 2924 2925 // The AWS Region of the recommended reservation. 2926 Region *string `type:"string"` 2927 2928 // Whether the recommended reservation is size flexible. 2929 SizeFlexEligible *bool `type:"boolean"` 2930 2931 // Whether the recommended reservation is dedicated or shared. 2932 Tenancy *string `type:"string"` 2933} 2934 2935// String returns the string representation 2936func (s EC2InstanceDetails) String() string { 2937 return awsutil.Prettify(s) 2938} 2939 2940// GoString returns the string representation 2941func (s EC2InstanceDetails) GoString() string { 2942 return s.String() 2943} 2944 2945// SetAvailabilityZone sets the AvailabilityZone field's value. 2946func (s *EC2InstanceDetails) SetAvailabilityZone(v string) *EC2InstanceDetails { 2947 s.AvailabilityZone = &v 2948 return s 2949} 2950 2951// SetCurrentGeneration sets the CurrentGeneration field's value. 2952func (s *EC2InstanceDetails) SetCurrentGeneration(v bool) *EC2InstanceDetails { 2953 s.CurrentGeneration = &v 2954 return s 2955} 2956 2957// SetFamily sets the Family field's value. 2958func (s *EC2InstanceDetails) SetFamily(v string) *EC2InstanceDetails { 2959 s.Family = &v 2960 return s 2961} 2962 2963// SetInstanceType sets the InstanceType field's value. 2964func (s *EC2InstanceDetails) SetInstanceType(v string) *EC2InstanceDetails { 2965 s.InstanceType = &v 2966 return s 2967} 2968 2969// SetPlatform sets the Platform field's value. 2970func (s *EC2InstanceDetails) SetPlatform(v string) *EC2InstanceDetails { 2971 s.Platform = &v 2972 return s 2973} 2974 2975// SetRegion sets the Region field's value. 2976func (s *EC2InstanceDetails) SetRegion(v string) *EC2InstanceDetails { 2977 s.Region = &v 2978 return s 2979} 2980 2981// SetSizeFlexEligible sets the SizeFlexEligible field's value. 2982func (s *EC2InstanceDetails) SetSizeFlexEligible(v bool) *EC2InstanceDetails { 2983 s.SizeFlexEligible = &v 2984 return s 2985} 2986 2987// SetTenancy sets the Tenancy field's value. 2988func (s *EC2InstanceDetails) SetTenancy(v string) *EC2InstanceDetails { 2989 s.Tenancy = &v 2990 return s 2991} 2992 2993// Details on the Amazon EC2 Resource. 2994type EC2ResourceDetails struct { 2995 _ struct{} `type:"structure"` 2996 2997 // Hourly public On Demand rate for the instance type. 2998 HourlyOnDemandRate *string `type:"string"` 2999 3000 // The type of Amazon Web Services instance. 3001 InstanceType *string `type:"string"` 3002 3003 // Memory capacity of Amazon Web Services instance. 3004 Memory *string `type:"string"` 3005 3006 // Network performance capacity of the Amazon Web Services instance. 3007 NetworkPerformance *string `type:"string"` 3008 3009 // The platform of the Amazon Web Services instance. The platform is the specific 3010 // combination of operating system, license model, and software on an instance. 3011 Platform *string `type:"string"` 3012 3013 // The Amazon Web Services Region of the instance. 3014 Region *string `type:"string"` 3015 3016 // The SKU of the product. 3017 Sku *string `type:"string"` 3018 3019 // The disk storage of the Amazon Web Services instance (Not EBS storage). 3020 Storage *string `type:"string"` 3021 3022 // Number of VCPU cores in the Amazon Web Services instance type. 3023 Vcpu *string `type:"string"` 3024} 3025 3026// String returns the string representation 3027func (s EC2ResourceDetails) String() string { 3028 return awsutil.Prettify(s) 3029} 3030 3031// GoString returns the string representation 3032func (s EC2ResourceDetails) GoString() string { 3033 return s.String() 3034} 3035 3036// SetHourlyOnDemandRate sets the HourlyOnDemandRate field's value. 3037func (s *EC2ResourceDetails) SetHourlyOnDemandRate(v string) *EC2ResourceDetails { 3038 s.HourlyOnDemandRate = &v 3039 return s 3040} 3041 3042// SetInstanceType sets the InstanceType field's value. 3043func (s *EC2ResourceDetails) SetInstanceType(v string) *EC2ResourceDetails { 3044 s.InstanceType = &v 3045 return s 3046} 3047 3048// SetMemory sets the Memory field's value. 3049func (s *EC2ResourceDetails) SetMemory(v string) *EC2ResourceDetails { 3050 s.Memory = &v 3051 return s 3052} 3053 3054// SetNetworkPerformance sets the NetworkPerformance field's value. 3055func (s *EC2ResourceDetails) SetNetworkPerformance(v string) *EC2ResourceDetails { 3056 s.NetworkPerformance = &v 3057 return s 3058} 3059 3060// SetPlatform sets the Platform field's value. 3061func (s *EC2ResourceDetails) SetPlatform(v string) *EC2ResourceDetails { 3062 s.Platform = &v 3063 return s 3064} 3065 3066// SetRegion sets the Region field's value. 3067func (s *EC2ResourceDetails) SetRegion(v string) *EC2ResourceDetails { 3068 s.Region = &v 3069 return s 3070} 3071 3072// SetSku sets the Sku field's value. 3073func (s *EC2ResourceDetails) SetSku(v string) *EC2ResourceDetails { 3074 s.Sku = &v 3075 return s 3076} 3077 3078// SetStorage sets the Storage field's value. 3079func (s *EC2ResourceDetails) SetStorage(v string) *EC2ResourceDetails { 3080 s.Storage = &v 3081 return s 3082} 3083 3084// SetVcpu sets the Vcpu field's value. 3085func (s *EC2ResourceDetails) SetVcpu(v string) *EC2ResourceDetails { 3086 s.Vcpu = &v 3087 return s 3088} 3089 3090// Utilization metrics of the instance. 3091type EC2ResourceUtilization struct { 3092 _ struct{} `type:"structure"` 3093 3094 // Maximum observed or expected CPU utilization of the instance. 3095 MaxCpuUtilizationPercentage *string `type:"string"` 3096 3097 // Maximum observed or expected memory utilization of the instance. 3098 MaxMemoryUtilizationPercentage *string `type:"string"` 3099 3100 // Maximum observed or expected storage utilization of the instance (does not 3101 // measure EBS storage). 3102 MaxStorageUtilizationPercentage *string `type:"string"` 3103} 3104 3105// String returns the string representation 3106func (s EC2ResourceUtilization) String() string { 3107 return awsutil.Prettify(s) 3108} 3109 3110// GoString returns the string representation 3111func (s EC2ResourceUtilization) GoString() string { 3112 return s.String() 3113} 3114 3115// SetMaxCpuUtilizationPercentage sets the MaxCpuUtilizationPercentage field's value. 3116func (s *EC2ResourceUtilization) SetMaxCpuUtilizationPercentage(v string) *EC2ResourceUtilization { 3117 s.MaxCpuUtilizationPercentage = &v 3118 return s 3119} 3120 3121// SetMaxMemoryUtilizationPercentage sets the MaxMemoryUtilizationPercentage field's value. 3122func (s *EC2ResourceUtilization) SetMaxMemoryUtilizationPercentage(v string) *EC2ResourceUtilization { 3123 s.MaxMemoryUtilizationPercentage = &v 3124 return s 3125} 3126 3127// SetMaxStorageUtilizationPercentage sets the MaxStorageUtilizationPercentage field's value. 3128func (s *EC2ResourceUtilization) SetMaxStorageUtilizationPercentage(v string) *EC2ResourceUtilization { 3129 s.MaxStorageUtilizationPercentage = &v 3130 return s 3131} 3132 3133// The Amazon EC2 hardware specifications that you want AWS to provide recommendations 3134// for. 3135type EC2Specification struct { 3136 _ struct{} `type:"structure"` 3137 3138 // Whether you want a recommendation for standard or convertible reservations. 3139 OfferingClass *string `type:"string" enum:"OfferingClass"` 3140} 3141 3142// String returns the string representation 3143func (s EC2Specification) String() string { 3144 return awsutil.Prettify(s) 3145} 3146 3147// GoString returns the string representation 3148func (s EC2Specification) GoString() string { 3149 return s.String() 3150} 3151 3152// SetOfferingClass sets the OfferingClass field's value. 3153func (s *EC2Specification) SetOfferingClass(v string) *EC2Specification { 3154 s.OfferingClass = &v 3155 return s 3156} 3157 3158// Details about the Amazon ES instances that AWS recommends that you purchase. 3159type ESInstanceDetails struct { 3160 _ struct{} `type:"structure"` 3161 3162 // Whether the recommendation is for a current-generation instance. 3163 CurrentGeneration *bool `type:"boolean"` 3164 3165 // The class of instance that AWS recommends. 3166 InstanceClass *string `type:"string"` 3167 3168 // The size of instance that AWS recommends. 3169 InstanceSize *string `type:"string"` 3170 3171 // The AWS Region of the recommended reservation. 3172 Region *string `type:"string"` 3173 3174 // Whether the recommended reservation is size flexible. 3175 SizeFlexEligible *bool `type:"boolean"` 3176} 3177 3178// String returns the string representation 3179func (s ESInstanceDetails) String() string { 3180 return awsutil.Prettify(s) 3181} 3182 3183// GoString returns the string representation 3184func (s ESInstanceDetails) GoString() string { 3185 return s.String() 3186} 3187 3188// SetCurrentGeneration sets the CurrentGeneration field's value. 3189func (s *ESInstanceDetails) SetCurrentGeneration(v bool) *ESInstanceDetails { 3190 s.CurrentGeneration = &v 3191 return s 3192} 3193 3194// SetInstanceClass sets the InstanceClass field's value. 3195func (s *ESInstanceDetails) SetInstanceClass(v string) *ESInstanceDetails { 3196 s.InstanceClass = &v 3197 return s 3198} 3199 3200// SetInstanceSize sets the InstanceSize field's value. 3201func (s *ESInstanceDetails) SetInstanceSize(v string) *ESInstanceDetails { 3202 s.InstanceSize = &v 3203 return s 3204} 3205 3206// SetRegion sets the Region field's value. 3207func (s *ESInstanceDetails) SetRegion(v string) *ESInstanceDetails { 3208 s.Region = &v 3209 return s 3210} 3211 3212// SetSizeFlexEligible sets the SizeFlexEligible field's value. 3213func (s *ESInstanceDetails) SetSizeFlexEligible(v bool) *ESInstanceDetails { 3214 s.SizeFlexEligible = &v 3215 return s 3216} 3217 3218// Details about the Amazon ElastiCache instances that AWS recommends that you 3219// purchase. 3220type ElastiCacheInstanceDetails struct { 3221 _ struct{} `type:"structure"` 3222 3223 // Whether the recommendation is for a current generation instance. 3224 CurrentGeneration *bool `type:"boolean"` 3225 3226 // The instance family of the recommended reservation. 3227 Family *string `type:"string"` 3228 3229 // The type of node that AWS recommends. 3230 NodeType *string `type:"string"` 3231 3232 // The description of the recommended reservation. 3233 ProductDescription *string `type:"string"` 3234 3235 // The AWS Region of the recommended reservation. 3236 Region *string `type:"string"` 3237 3238 // Whether the recommended reservation is size flexible. 3239 SizeFlexEligible *bool `type:"boolean"` 3240} 3241 3242// String returns the string representation 3243func (s ElastiCacheInstanceDetails) String() string { 3244 return awsutil.Prettify(s) 3245} 3246 3247// GoString returns the string representation 3248func (s ElastiCacheInstanceDetails) GoString() string { 3249 return s.String() 3250} 3251 3252// SetCurrentGeneration sets the CurrentGeneration field's value. 3253func (s *ElastiCacheInstanceDetails) SetCurrentGeneration(v bool) *ElastiCacheInstanceDetails { 3254 s.CurrentGeneration = &v 3255 return s 3256} 3257 3258// SetFamily sets the Family field's value. 3259func (s *ElastiCacheInstanceDetails) SetFamily(v string) *ElastiCacheInstanceDetails { 3260 s.Family = &v 3261 return s 3262} 3263 3264// SetNodeType sets the NodeType field's value. 3265func (s *ElastiCacheInstanceDetails) SetNodeType(v string) *ElastiCacheInstanceDetails { 3266 s.NodeType = &v 3267 return s 3268} 3269 3270// SetProductDescription sets the ProductDescription field's value. 3271func (s *ElastiCacheInstanceDetails) SetProductDescription(v string) *ElastiCacheInstanceDetails { 3272 s.ProductDescription = &v 3273 return s 3274} 3275 3276// SetRegion sets the Region field's value. 3277func (s *ElastiCacheInstanceDetails) SetRegion(v string) *ElastiCacheInstanceDetails { 3278 s.Region = &v 3279 return s 3280} 3281 3282// SetSizeFlexEligible sets the SizeFlexEligible field's value. 3283func (s *ElastiCacheInstanceDetails) SetSizeFlexEligible(v bool) *ElastiCacheInstanceDetails { 3284 s.SizeFlexEligible = &v 3285 return s 3286} 3287 3288// Use Expression to filter by cost or by usage. There are two patterns: 3289// 3290// * Simple dimension values - You can set the dimension name and values 3291// for the filters that you plan to use. For example, you can filter for 3292// REGION==us-east-1 OR REGION==us-west-1. The Expression for that looks 3293// like this: { "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", 3294// “us-west-1” ] } } The list of dimension values are OR'd together to 3295// retrieve cost or usage data. You can create Expression and DimensionValues 3296// objects using either with* methods or set* methods in multiple lines. 3297// 3298// * Compound dimension values with logical operations - You can use multiple 3299// Expression types and the logical operators AND/OR/NOT to create a list 3300// of one or more Expression objects. This allows you to filter on more advanced 3301// options. For example, you can filter on ((REGION == us-east-1 OR REGION 3302// == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer). 3303// The Expression for that looks like this: { "And": [ {"Or": [ {"Dimensions": 3304// { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": 3305// { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": 3306// { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] } Because each 3307// Expression can have only one operator, the service returns an error if 3308// more than one is specified. The following example shows an Expression 3309// object that creates an error. { "And": [ ... ], "DimensionValues": { "Dimension": 3310// "USAGE_TYPE", "Values": [ "DataTransfer" ] } } 3311// 3312// For GetRightsizingRecommendation action, a combination of OR and NOT is not 3313// supported. OR is not supported between different dimensions, or dimensions 3314// and tags. NOT operators aren't supported. Dimensions are also limited to 3315// LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. 3316type Expression struct { 3317 _ struct{} `type:"structure"` 3318 3319 // Return results that match both Dimension objects. 3320 And []*Expression `type:"list"` 3321 3322 // Cost Category is in preview release for AWS Billing and Cost Management 3323 // and is subject to change. Your use of Cost Categories is subject to the 3324 // Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) 3325 // (Section 1.10). 3326 // 3327 // The specific CostCategory used for Expression. 3328 CostCategories *CostCategoryValues `type:"structure"` 3329 3330 // The specific Dimension to use for Expression. 3331 Dimensions *DimensionValues `type:"structure"` 3332 3333 // Return results that don't match a Dimension object. 3334 Not *Expression `type:"structure"` 3335 3336 // Return results that match either Dimension object. 3337 Or []*Expression `type:"list"` 3338 3339 // The specific Tag to use for Expression. 3340 Tags *TagValues `type:"structure"` 3341} 3342 3343// String returns the string representation 3344func (s Expression) String() string { 3345 return awsutil.Prettify(s) 3346} 3347 3348// GoString returns the string representation 3349func (s Expression) GoString() string { 3350 return s.String() 3351} 3352 3353// Validate inspects the fields of the type to determine if they are valid. 3354func (s *Expression) Validate() error { 3355 invalidParams := request.ErrInvalidParams{Context: "Expression"} 3356 if s.CostCategories != nil { 3357 if err := s.CostCategories.Validate(); err != nil { 3358 invalidParams.AddNested("CostCategories", err.(request.ErrInvalidParams)) 3359 } 3360 } 3361 if s.Not != nil { 3362 if err := s.Not.Validate(); err != nil { 3363 invalidParams.AddNested("Not", err.(request.ErrInvalidParams)) 3364 } 3365 } 3366 if s.Or != nil { 3367 for i, v := range s.Or { 3368 if v == nil { 3369 continue 3370 } 3371 if err := v.Validate(); err != nil { 3372 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Or", i), err.(request.ErrInvalidParams)) 3373 } 3374 } 3375 } 3376 3377 if invalidParams.Len() > 0 { 3378 return invalidParams 3379 } 3380 return nil 3381} 3382 3383// SetAnd sets the And field's value. 3384func (s *Expression) SetAnd(v []*Expression) *Expression { 3385 s.And = v 3386 return s 3387} 3388 3389// SetCostCategories sets the CostCategories field's value. 3390func (s *Expression) SetCostCategories(v *CostCategoryValues) *Expression { 3391 s.CostCategories = v 3392 return s 3393} 3394 3395// SetDimensions sets the Dimensions field's value. 3396func (s *Expression) SetDimensions(v *DimensionValues) *Expression { 3397 s.Dimensions = v 3398 return s 3399} 3400 3401// SetNot sets the Not field's value. 3402func (s *Expression) SetNot(v *Expression) *Expression { 3403 s.Not = v 3404 return s 3405} 3406 3407// SetOr sets the Or field's value. 3408func (s *Expression) SetOr(v []*Expression) *Expression { 3409 s.Or = v 3410 return s 3411} 3412 3413// SetTags sets the Tags field's value. 3414func (s *Expression) SetTags(v *TagValues) *Expression { 3415 s.Tags = v 3416 return s 3417} 3418 3419// The forecast created for your query. 3420type ForecastResult struct { 3421 _ struct{} `type:"structure"` 3422 3423 // The mean value of the forecast. 3424 MeanValue *string `type:"string"` 3425 3426 // The lower limit for the prediction interval. 3427 PredictionIntervalLowerBound *string `type:"string"` 3428 3429 // The upper limit for the prediction interval. 3430 PredictionIntervalUpperBound *string `type:"string"` 3431 3432 // The period of time that the forecast covers. 3433 TimePeriod *DateInterval `type:"structure"` 3434} 3435 3436// String returns the string representation 3437func (s ForecastResult) String() string { 3438 return awsutil.Prettify(s) 3439} 3440 3441// GoString returns the string representation 3442func (s ForecastResult) GoString() string { 3443 return s.String() 3444} 3445 3446// SetMeanValue sets the MeanValue field's value. 3447func (s *ForecastResult) SetMeanValue(v string) *ForecastResult { 3448 s.MeanValue = &v 3449 return s 3450} 3451 3452// SetPredictionIntervalLowerBound sets the PredictionIntervalLowerBound field's value. 3453func (s *ForecastResult) SetPredictionIntervalLowerBound(v string) *ForecastResult { 3454 s.PredictionIntervalLowerBound = &v 3455 return s 3456} 3457 3458// SetPredictionIntervalUpperBound sets the PredictionIntervalUpperBound field's value. 3459func (s *ForecastResult) SetPredictionIntervalUpperBound(v string) *ForecastResult { 3460 s.PredictionIntervalUpperBound = &v 3461 return s 3462} 3463 3464// SetTimePeriod sets the TimePeriod field's value. 3465func (s *ForecastResult) SetTimePeriod(v *DateInterval) *ForecastResult { 3466 s.TimePeriod = v 3467 return s 3468} 3469 3470type GetCostAndUsageInput struct { 3471 _ struct{} `type:"structure"` 3472 3473 // Filters AWS costs by different dimensions. For example, you can specify SERVICE 3474 // and LINKED_ACCOUNT and get the costs that are associated with that account's 3475 // usage of that service. You can nest Expression objects to define any combination 3476 // of dimension filters. For more information, see Expression (http://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html). 3477 Filter *Expression `type:"structure"` 3478 3479 // Sets the AWS cost granularity to MONTHLY or DAILY, or HOURLY. If Granularity 3480 // isn't set, the response object doesn't include the Granularity, either MONTHLY 3481 // or DAILY, or HOURLY. 3482 Granularity *string `type:"string" enum:"Granularity"` 3483 3484 // You can group AWS costs using up to two different groups, either dimensions, 3485 // tag keys, or both. 3486 // 3487 // When you group by tag key, you get all tag values, including empty strings. 3488 // 3489 // Valid values are AZ, INSTANCE_TYPE, LEGAL_ENTITY_NAME, LINKED_ACCOUNT, OPERATION, 3490 // PLATFORM, PURCHASE_TYPE, SERVICE, TAGS, TENANCY, RECORD_TYPE, and USAGE_TYPE. 3491 GroupBy []*GroupDefinition `type:"list"` 3492 3493 // Which metrics are returned in the query. For more information about blended 3494 // and unblended rates, see Why does the "blended" annotation appear on some 3495 // line items in my bill? (https://aws.amazon.com/premiumsupport/knowledge-center/blended-rates-intro/). 3496 // 3497 // Valid values are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, 3498 // NormalizedUsageAmount, UnblendedCost, and UsageQuantity. 3499 // 3500 // If you return the UsageQuantity metric, the service aggregates all usage 3501 // numbers without taking into account the units. For example, if you aggregate 3502 // usageQuantity across all of Amazon EC2, the results aren't meaningful because 3503 // Amazon EC2 compute hours and data transfer are measured in different units 3504 // (for example, hours vs. GB). To get more meaningful UsageQuantity metrics, 3505 // filter by UsageType or UsageTypeGroups. 3506 // 3507 // Metrics is required for GetCostAndUsage requests. 3508 Metrics []*string `type:"list"` 3509 3510 // The token to retrieve the next set of results. AWS provides the token when 3511 // the response from a previous call has more results than the maximum page 3512 // size. 3513 NextPageToken *string `type:"string"` 3514 3515 // Sets the start and end dates for retrieving AWS costs. The start date is 3516 // inclusive, but the end date is exclusive. For example, if start is 2017-01-01 3517 // and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 3518 // up to and including 2017-04-30 but not including 2017-05-01. 3519 // 3520 // TimePeriod is a required field 3521 TimePeriod *DateInterval `type:"structure" required:"true"` 3522} 3523 3524// String returns the string representation 3525func (s GetCostAndUsageInput) String() string { 3526 return awsutil.Prettify(s) 3527} 3528 3529// GoString returns the string representation 3530func (s GetCostAndUsageInput) GoString() string { 3531 return s.String() 3532} 3533 3534// Validate inspects the fields of the type to determine if they are valid. 3535func (s *GetCostAndUsageInput) Validate() error { 3536 invalidParams := request.ErrInvalidParams{Context: "GetCostAndUsageInput"} 3537 if s.TimePeriod == nil { 3538 invalidParams.Add(request.NewErrParamRequired("TimePeriod")) 3539 } 3540 if s.Filter != nil { 3541 if err := s.Filter.Validate(); err != nil { 3542 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 3543 } 3544 } 3545 if s.TimePeriod != nil { 3546 if err := s.TimePeriod.Validate(); err != nil { 3547 invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams)) 3548 } 3549 } 3550 3551 if invalidParams.Len() > 0 { 3552 return invalidParams 3553 } 3554 return nil 3555} 3556 3557// SetFilter sets the Filter field's value. 3558func (s *GetCostAndUsageInput) SetFilter(v *Expression) *GetCostAndUsageInput { 3559 s.Filter = v 3560 return s 3561} 3562 3563// SetGranularity sets the Granularity field's value. 3564func (s *GetCostAndUsageInput) SetGranularity(v string) *GetCostAndUsageInput { 3565 s.Granularity = &v 3566 return s 3567} 3568 3569// SetGroupBy sets the GroupBy field's value. 3570func (s *GetCostAndUsageInput) SetGroupBy(v []*GroupDefinition) *GetCostAndUsageInput { 3571 s.GroupBy = v 3572 return s 3573} 3574 3575// SetMetrics sets the Metrics field's value. 3576func (s *GetCostAndUsageInput) SetMetrics(v []*string) *GetCostAndUsageInput { 3577 s.Metrics = v 3578 return s 3579} 3580 3581// SetNextPageToken sets the NextPageToken field's value. 3582func (s *GetCostAndUsageInput) SetNextPageToken(v string) *GetCostAndUsageInput { 3583 s.NextPageToken = &v 3584 return s 3585} 3586 3587// SetTimePeriod sets the TimePeriod field's value. 3588func (s *GetCostAndUsageInput) SetTimePeriod(v *DateInterval) *GetCostAndUsageInput { 3589 s.TimePeriod = v 3590 return s 3591} 3592 3593type GetCostAndUsageOutput struct { 3594 _ struct{} `type:"structure"` 3595 3596 // The groups that are specified by the Filter or GroupBy parameters in the 3597 // request. 3598 GroupDefinitions []*GroupDefinition `type:"list"` 3599 3600 // The token for the next set of retrievable results. AWS provides the token 3601 // when the response from a previous call has more results than the maximum 3602 // page size. 3603 NextPageToken *string `type:"string"` 3604 3605 // The time period that is covered by the results in the response. 3606 ResultsByTime []*ResultByTime `type:"list"` 3607} 3608 3609// String returns the string representation 3610func (s GetCostAndUsageOutput) String() string { 3611 return awsutil.Prettify(s) 3612} 3613 3614// GoString returns the string representation 3615func (s GetCostAndUsageOutput) GoString() string { 3616 return s.String() 3617} 3618 3619// SetGroupDefinitions sets the GroupDefinitions field's value. 3620func (s *GetCostAndUsageOutput) SetGroupDefinitions(v []*GroupDefinition) *GetCostAndUsageOutput { 3621 s.GroupDefinitions = v 3622 return s 3623} 3624 3625// SetNextPageToken sets the NextPageToken field's value. 3626func (s *GetCostAndUsageOutput) SetNextPageToken(v string) *GetCostAndUsageOutput { 3627 s.NextPageToken = &v 3628 return s 3629} 3630 3631// SetResultsByTime sets the ResultsByTime field's value. 3632func (s *GetCostAndUsageOutput) SetResultsByTime(v []*ResultByTime) *GetCostAndUsageOutput { 3633 s.ResultsByTime = v 3634 return s 3635} 3636 3637type GetCostAndUsageWithResourcesInput struct { 3638 _ struct{} `type:"structure"` 3639 3640 // Filters Amazon Web Services costs by different dimensions. For example, you 3641 // can specify SERVICE and LINKED_ACCOUNT and get the costs that are associated 3642 // with that account's usage of that service. You can nest Expression objects 3643 // to define any combination of dimension filters. For more information, see 3644 // Expression (http://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html). 3645 // 3646 // The GetCostAndUsageWithResources operation requires that you either group 3647 // by or filter by a ResourceId. 3648 Filter *Expression `type:"structure"` 3649 3650 // Sets the AWS cost granularity to MONTHLY, DAILY, or HOURLY. If Granularity 3651 // isn't set, the response object doesn't include the Granularity, MONTHLY, 3652 // DAILY, or HOURLY. 3653 Granularity *string `type:"string" enum:"Granularity"` 3654 3655 // You can group Amazon Web Services costs using up to two different groups: 3656 // either dimensions, tag keys, or both. 3657 GroupBy []*GroupDefinition `type:"list"` 3658 3659 // Which metrics are returned in the query. For more information about blended 3660 // and unblended rates, see Why does the "blended" annotation appear on some 3661 // line items in my bill? (https://aws.amazon.com/premiumsupport/knowledge-center/blended-rates-intro/). 3662 // 3663 // Valid values are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, 3664 // NormalizedUsageAmount, UnblendedCost, and UsageQuantity. 3665 // 3666 // If you return the UsageQuantity metric, the service aggregates all usage 3667 // numbers without taking the units into account. For example, if you aggregate 3668 // usageQuantity across all of Amazon EC2, the results aren't meaningful because 3669 // Amazon EC2 compute hours and data transfer are measured in different units 3670 // (for example, hours vs. GB). To get more meaningful UsageQuantity metrics, 3671 // filter by UsageType or UsageTypeGroups. 3672 // 3673 // Metrics is required for GetCostAndUsageWithResources requests. 3674 Metrics []*string `type:"list"` 3675 3676 // The token to retrieve the next set of results. AWS provides the token when 3677 // the response from a previous call has more results than the maximum page 3678 // size. 3679 NextPageToken *string `type:"string"` 3680 3681 // Sets the start and end dates for retrieving Amazon Web Services costs. The 3682 // range must be within the last 14 days (the start date cannot be earlier than 3683 // 14 days ago). The start date is inclusive, but the end date is exclusive. 3684 // For example, if start is 2017-01-01 and end is 2017-05-01, then the cost 3685 // and usage data is retrieved from 2017-01-01 up to and including 2017-04-30 3686 // but not including 2017-05-01. 3687 // 3688 // TimePeriod is a required field 3689 TimePeriod *DateInterval `type:"structure" required:"true"` 3690} 3691 3692// String returns the string representation 3693func (s GetCostAndUsageWithResourcesInput) String() string { 3694 return awsutil.Prettify(s) 3695} 3696 3697// GoString returns the string representation 3698func (s GetCostAndUsageWithResourcesInput) GoString() string { 3699 return s.String() 3700} 3701 3702// Validate inspects the fields of the type to determine if they are valid. 3703func (s *GetCostAndUsageWithResourcesInput) Validate() error { 3704 invalidParams := request.ErrInvalidParams{Context: "GetCostAndUsageWithResourcesInput"} 3705 if s.TimePeriod == nil { 3706 invalidParams.Add(request.NewErrParamRequired("TimePeriod")) 3707 } 3708 if s.Filter != nil { 3709 if err := s.Filter.Validate(); err != nil { 3710 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 3711 } 3712 } 3713 if s.TimePeriod != nil { 3714 if err := s.TimePeriod.Validate(); err != nil { 3715 invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams)) 3716 } 3717 } 3718 3719 if invalidParams.Len() > 0 { 3720 return invalidParams 3721 } 3722 return nil 3723} 3724 3725// SetFilter sets the Filter field's value. 3726func (s *GetCostAndUsageWithResourcesInput) SetFilter(v *Expression) *GetCostAndUsageWithResourcesInput { 3727 s.Filter = v 3728 return s 3729} 3730 3731// SetGranularity sets the Granularity field's value. 3732func (s *GetCostAndUsageWithResourcesInput) SetGranularity(v string) *GetCostAndUsageWithResourcesInput { 3733 s.Granularity = &v 3734 return s 3735} 3736 3737// SetGroupBy sets the GroupBy field's value. 3738func (s *GetCostAndUsageWithResourcesInput) SetGroupBy(v []*GroupDefinition) *GetCostAndUsageWithResourcesInput { 3739 s.GroupBy = v 3740 return s 3741} 3742 3743// SetMetrics sets the Metrics field's value. 3744func (s *GetCostAndUsageWithResourcesInput) SetMetrics(v []*string) *GetCostAndUsageWithResourcesInput { 3745 s.Metrics = v 3746 return s 3747} 3748 3749// SetNextPageToken sets the NextPageToken field's value. 3750func (s *GetCostAndUsageWithResourcesInput) SetNextPageToken(v string) *GetCostAndUsageWithResourcesInput { 3751 s.NextPageToken = &v 3752 return s 3753} 3754 3755// SetTimePeriod sets the TimePeriod field's value. 3756func (s *GetCostAndUsageWithResourcesInput) SetTimePeriod(v *DateInterval) *GetCostAndUsageWithResourcesInput { 3757 s.TimePeriod = v 3758 return s 3759} 3760 3761type GetCostAndUsageWithResourcesOutput struct { 3762 _ struct{} `type:"structure"` 3763 3764 // The groups that are specified by the Filter or GroupBy parameters in the 3765 // request. 3766 GroupDefinitions []*GroupDefinition `type:"list"` 3767 3768 // The token for the next set of retrievable results. AWS provides the token 3769 // when the response from a previous call has more results than the maximum 3770 // page size. 3771 NextPageToken *string `type:"string"` 3772 3773 // The time period that is covered by the results in the response. 3774 ResultsByTime []*ResultByTime `type:"list"` 3775} 3776 3777// String returns the string representation 3778func (s GetCostAndUsageWithResourcesOutput) String() string { 3779 return awsutil.Prettify(s) 3780} 3781 3782// GoString returns the string representation 3783func (s GetCostAndUsageWithResourcesOutput) GoString() string { 3784 return s.String() 3785} 3786 3787// SetGroupDefinitions sets the GroupDefinitions field's value. 3788func (s *GetCostAndUsageWithResourcesOutput) SetGroupDefinitions(v []*GroupDefinition) *GetCostAndUsageWithResourcesOutput { 3789 s.GroupDefinitions = v 3790 return s 3791} 3792 3793// SetNextPageToken sets the NextPageToken field's value. 3794func (s *GetCostAndUsageWithResourcesOutput) SetNextPageToken(v string) *GetCostAndUsageWithResourcesOutput { 3795 s.NextPageToken = &v 3796 return s 3797} 3798 3799// SetResultsByTime sets the ResultsByTime field's value. 3800func (s *GetCostAndUsageWithResourcesOutput) SetResultsByTime(v []*ResultByTime) *GetCostAndUsageWithResourcesOutput { 3801 s.ResultsByTime = v 3802 return s 3803} 3804 3805type GetCostForecastInput struct { 3806 _ struct{} `type:"structure"` 3807 3808 // The filters that you want to use to filter your forecast. Cost Explorer API 3809 // supports all of the Cost Explorer filters. 3810 Filter *Expression `type:"structure"` 3811 3812 // How granular you want the forecast to be. You can get 3 months of DAILY forecasts 3813 // or 12 months of MONTHLY forecasts. 3814 // 3815 // The GetCostForecast operation supports only DAILY and MONTHLY granularities. 3816 // 3817 // Granularity is a required field 3818 Granularity *string `type:"string" required:"true" enum:"Granularity"` 3819 3820 // Which metric Cost Explorer uses to create your forecast. For more information 3821 // about blended and unblended rates, see Why does the "blended" annotation 3822 // appear on some line items in my bill? (https://aws.amazon.com/premiumsupport/knowledge-center/blended-rates-intro/). 3823 // 3824 // Valid values for a GetCostForecast call are the following: 3825 // 3826 // * AMORTIZED_COST 3827 // 3828 // * BLENDED_COST 3829 // 3830 // * NET_AMORTIZED_COST 3831 // 3832 // * NET_UNBLENDED_COST 3833 // 3834 // * UNBLENDED_COST 3835 // 3836 // Metric is a required field 3837 Metric *string `type:"string" required:"true" enum:"Metric"` 3838 3839 // Cost Explorer always returns the mean forecast as a single point. You can 3840 // request a prediction interval around the mean by specifying a confidence 3841 // level. The higher the confidence level, the more confident Cost Explorer 3842 // is about the actual value falling in the prediction interval. Higher confidence 3843 // levels result in wider prediction intervals. 3844 PredictionIntervalLevel *int64 `min:"51" type:"integer"` 3845 3846 // The period of time that you want the forecast to cover. 3847 // 3848 // TimePeriod is a required field 3849 TimePeriod *DateInterval `type:"structure" required:"true"` 3850} 3851 3852// String returns the string representation 3853func (s GetCostForecastInput) String() string { 3854 return awsutil.Prettify(s) 3855} 3856 3857// GoString returns the string representation 3858func (s GetCostForecastInput) GoString() string { 3859 return s.String() 3860} 3861 3862// Validate inspects the fields of the type to determine if they are valid. 3863func (s *GetCostForecastInput) Validate() error { 3864 invalidParams := request.ErrInvalidParams{Context: "GetCostForecastInput"} 3865 if s.Granularity == nil { 3866 invalidParams.Add(request.NewErrParamRequired("Granularity")) 3867 } 3868 if s.Metric == nil { 3869 invalidParams.Add(request.NewErrParamRequired("Metric")) 3870 } 3871 if s.PredictionIntervalLevel != nil && *s.PredictionIntervalLevel < 51 { 3872 invalidParams.Add(request.NewErrParamMinValue("PredictionIntervalLevel", 51)) 3873 } 3874 if s.TimePeriod == nil { 3875 invalidParams.Add(request.NewErrParamRequired("TimePeriod")) 3876 } 3877 if s.Filter != nil { 3878 if err := s.Filter.Validate(); err != nil { 3879 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 3880 } 3881 } 3882 if s.TimePeriod != nil { 3883 if err := s.TimePeriod.Validate(); err != nil { 3884 invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams)) 3885 } 3886 } 3887 3888 if invalidParams.Len() > 0 { 3889 return invalidParams 3890 } 3891 return nil 3892} 3893 3894// SetFilter sets the Filter field's value. 3895func (s *GetCostForecastInput) SetFilter(v *Expression) *GetCostForecastInput { 3896 s.Filter = v 3897 return s 3898} 3899 3900// SetGranularity sets the Granularity field's value. 3901func (s *GetCostForecastInput) SetGranularity(v string) *GetCostForecastInput { 3902 s.Granularity = &v 3903 return s 3904} 3905 3906// SetMetric sets the Metric field's value. 3907func (s *GetCostForecastInput) SetMetric(v string) *GetCostForecastInput { 3908 s.Metric = &v 3909 return s 3910} 3911 3912// SetPredictionIntervalLevel sets the PredictionIntervalLevel field's value. 3913func (s *GetCostForecastInput) SetPredictionIntervalLevel(v int64) *GetCostForecastInput { 3914 s.PredictionIntervalLevel = &v 3915 return s 3916} 3917 3918// SetTimePeriod sets the TimePeriod field's value. 3919func (s *GetCostForecastInput) SetTimePeriod(v *DateInterval) *GetCostForecastInput { 3920 s.TimePeriod = v 3921 return s 3922} 3923 3924type GetCostForecastOutput struct { 3925 _ struct{} `type:"structure"` 3926 3927 // The forecasts for your query, in order. For DAILY forecasts, this is a list 3928 // of days. For MONTHLY forecasts, this is a list of months. 3929 ForecastResultsByTime []*ForecastResult `type:"list"` 3930 3931 // How much you are forecasted to spend over the forecast period, in USD. 3932 Total *MetricValue `type:"structure"` 3933} 3934 3935// String returns the string representation 3936func (s GetCostForecastOutput) String() string { 3937 return awsutil.Prettify(s) 3938} 3939 3940// GoString returns the string representation 3941func (s GetCostForecastOutput) GoString() string { 3942 return s.String() 3943} 3944 3945// SetForecastResultsByTime sets the ForecastResultsByTime field's value. 3946func (s *GetCostForecastOutput) SetForecastResultsByTime(v []*ForecastResult) *GetCostForecastOutput { 3947 s.ForecastResultsByTime = v 3948 return s 3949} 3950 3951// SetTotal sets the Total field's value. 3952func (s *GetCostForecastOutput) SetTotal(v *MetricValue) *GetCostForecastOutput { 3953 s.Total = v 3954 return s 3955} 3956 3957type GetDimensionValuesInput struct { 3958 _ struct{} `type:"structure"` 3959 3960 // The context for the call to GetDimensionValues. This can be RESERVATIONS 3961 // or COST_AND_USAGE. The default value is COST_AND_USAGE. If the context is 3962 // set to RESERVATIONS, the resulting dimension values can be used in the GetReservationUtilization 3963 // operation. If the context is set to COST_AND_USAGE, the resulting dimension 3964 // values can be used in the GetCostAndUsage operation. 3965 // 3966 // If you set the context to COST_AND_USAGE, you can use the following dimensions 3967 // for searching: 3968 // 3969 // * AZ - The Availability Zone. An example is us-east-1a. 3970 // 3971 // * DATABASE_ENGINE - The Amazon Relational Database Service database. Examples 3972 // are Aurora or MySQL. 3973 // 3974 // * INSTANCE_TYPE - The type of Amazon EC2 instance. An example is m4.xlarge. 3975 // 3976 // * LEGAL_ENTITY_NAME - The name of the organization that sells you AWS 3977 // services, such as Amazon Web Services. 3978 // 3979 // * LINKED_ACCOUNT - The description in the attribute map that includes 3980 // the full name of the member account. The value field contains the AWS 3981 // ID of the member account. 3982 // 3983 // * OPERATING_SYSTEM - The operating system. Examples are Windows or Linux. 3984 // 3985 // * OPERATION - The action performed. Examples include RunInstance and CreateBucket. 3986 // 3987 // * PLATFORM - The Amazon EC2 operating system. Examples are Windows or 3988 // Linux. 3989 // 3990 // * PURCHASE_TYPE - The reservation type of the purchase to which this usage 3991 // is related. Examples include On-Demand Instances and Standard Reserved 3992 // Instances. 3993 // 3994 // * SERVICE - The AWS service such as Amazon DynamoDB. 3995 // 3996 // * USAGE_TYPE - The type of usage. An example is DataTransfer-In-Bytes. 3997 // The response for the GetDimensionValues operation includes a unit attribute. 3998 // Examples include GB and Hrs. 3999 // 4000 // * USAGE_TYPE_GROUP - The grouping of common usage types. An example is 4001 // Amazon EC2: CloudWatch – Alarms. The response for this operation includes 4002 // a unit attribute. 4003 // 4004 // * RECORD_TYPE - The different types of charges such as RI fees, usage 4005 // costs, tax refunds, and credits. 4006 // 4007 // * RESOURCE_ID - The unique identifier of the resource. ResourceId is an 4008 // opt-in feature only available for last 14 days for EC2-Compute Service. 4009 // 4010 // If you set the context to RESERVATIONS, you can use the following dimensions 4011 // for searching: 4012 // 4013 // * AZ - The Availability Zone. An example is us-east-1a. 4014 // 4015 // * CACHE_ENGINE - The Amazon ElastiCache operating system. Examples are 4016 // Windows or Linux. 4017 // 4018 // * DEPLOYMENT_OPTION - The scope of Amazon Relational Database Service 4019 // deployments. Valid values are SingleAZ and MultiAZ. 4020 // 4021 // * INSTANCE_TYPE - The type of Amazon EC2 instance. An example is m4.xlarge. 4022 // 4023 // * LINKED_ACCOUNT - The description in the attribute map that includes 4024 // the full name of the member account. The value field contains the AWS 4025 // ID of the member account. 4026 // 4027 // * PLATFORM - The Amazon EC2 operating system. Examples are Windows or 4028 // Linux. 4029 // 4030 // * REGION - The AWS Region. 4031 // 4032 // * SCOPE (Utilization only) - The scope of a Reserved Instance (RI). Values 4033 // are regional or a single Availability Zone. 4034 // 4035 // * TAG (Coverage only) - The tags that are associated with a Reserved Instance 4036 // (RI). 4037 // 4038 // * TENANCY - The tenancy of a resource. Examples are shared or dedicated. 4039 // 4040 // If you set the context to SAVINGS_PLANS, you can use the following dimensions 4041 // for searching: 4042 // 4043 // * SAVINGS_PLANS_TYPE - Type of Savings Plans (EC2 Instance or Compute) 4044 // 4045 // * PAYMENT_OPTION - Payment option for the given Savings Plans (for example, 4046 // All Upfront) 4047 // 4048 // * REGION - The AWS Region. 4049 // 4050 // * INSTANCE_TYPE_FAMILY - The family of instances (For example, m5) 4051 // 4052 // * LINKED_ACCOUNT - The description in the attribute map that includes 4053 // the full name of the member account. The value field contains the AWS 4054 // ID of the member account. 4055 // 4056 // * SAVINGS_PLAN_ARN - The unique identifier for your Savings Plan 4057 Context *string `type:"string" enum:"Context"` 4058 4059 // The name of the dimension. Each Dimension is available for a different Context. 4060 // For more information, see Context. 4061 // 4062 // Dimension is a required field 4063 Dimension *string `type:"string" required:"true" enum:"Dimension"` 4064 4065 // The token to retrieve the next set of results. AWS provides the token when 4066 // the response from a previous call has more results than the maximum page 4067 // size. 4068 NextPageToken *string `type:"string"` 4069 4070 // The value that you want to search the filter values for. 4071 SearchString *string `type:"string"` 4072 4073 // The start and end dates for retrieving the dimension values. The start date 4074 // is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 4075 // and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 4076 // up to and including 2017-04-30 but not including 2017-05-01. 4077 // 4078 // TimePeriod is a required field 4079 TimePeriod *DateInterval `type:"structure" required:"true"` 4080} 4081 4082// String returns the string representation 4083func (s GetDimensionValuesInput) String() string { 4084 return awsutil.Prettify(s) 4085} 4086 4087// GoString returns the string representation 4088func (s GetDimensionValuesInput) GoString() string { 4089 return s.String() 4090} 4091 4092// Validate inspects the fields of the type to determine if they are valid. 4093func (s *GetDimensionValuesInput) Validate() error { 4094 invalidParams := request.ErrInvalidParams{Context: "GetDimensionValuesInput"} 4095 if s.Dimension == nil { 4096 invalidParams.Add(request.NewErrParamRequired("Dimension")) 4097 } 4098 if s.TimePeriod == nil { 4099 invalidParams.Add(request.NewErrParamRequired("TimePeriod")) 4100 } 4101 if s.TimePeriod != nil { 4102 if err := s.TimePeriod.Validate(); err != nil { 4103 invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams)) 4104 } 4105 } 4106 4107 if invalidParams.Len() > 0 { 4108 return invalidParams 4109 } 4110 return nil 4111} 4112 4113// SetContext sets the Context field's value. 4114func (s *GetDimensionValuesInput) SetContext(v string) *GetDimensionValuesInput { 4115 s.Context = &v 4116 return s 4117} 4118 4119// SetDimension sets the Dimension field's value. 4120func (s *GetDimensionValuesInput) SetDimension(v string) *GetDimensionValuesInput { 4121 s.Dimension = &v 4122 return s 4123} 4124 4125// SetNextPageToken sets the NextPageToken field's value. 4126func (s *GetDimensionValuesInput) SetNextPageToken(v string) *GetDimensionValuesInput { 4127 s.NextPageToken = &v 4128 return s 4129} 4130 4131// SetSearchString sets the SearchString field's value. 4132func (s *GetDimensionValuesInput) SetSearchString(v string) *GetDimensionValuesInput { 4133 s.SearchString = &v 4134 return s 4135} 4136 4137// SetTimePeriod sets the TimePeriod field's value. 4138func (s *GetDimensionValuesInput) SetTimePeriod(v *DateInterval) *GetDimensionValuesInput { 4139 s.TimePeriod = v 4140 return s 4141} 4142 4143type GetDimensionValuesOutput struct { 4144 _ struct{} `type:"structure"` 4145 4146 // The filters that you used to filter your request. Some dimensions are available 4147 // only for a specific context. 4148 // 4149 // If you set the context to COST_AND_USAGE, you can use the following dimensions 4150 // for searching: 4151 // 4152 // * AZ - The Availability Zone. An example is us-east-1a. 4153 // 4154 // * DATABASE_ENGINE - The Amazon Relational Database Service database. Examples 4155 // are Aurora or MySQL. 4156 // 4157 // * INSTANCE_TYPE - The type of Amazon EC2 instance. An example is m4.xlarge. 4158 // 4159 // * LEGAL_ENTITY_NAME - The name of the organization that sells you AWS 4160 // services, such as Amazon Web Services. 4161 // 4162 // * LINKED_ACCOUNT - The description in the attribute map that includes 4163 // the full name of the member account. The value field contains the AWS 4164 // ID of the member account. 4165 // 4166 // * OPERATING_SYSTEM - The operating system. Examples are Windows or Linux. 4167 // 4168 // * OPERATION - The action performed. Examples include RunInstance and CreateBucket. 4169 // 4170 // * PLATFORM - The Amazon EC2 operating system. Examples are Windows or 4171 // Linux. 4172 // 4173 // * PURCHASE_TYPE - The reservation type of the purchase to which this usage 4174 // is related. Examples include On-Demand Instances and Standard Reserved 4175 // Instances. 4176 // 4177 // * SERVICE - The AWS service such as Amazon DynamoDB. 4178 // 4179 // * USAGE_TYPE - The type of usage. An example is DataTransfer-In-Bytes. 4180 // The response for the GetDimensionValues operation includes a unit attribute. 4181 // Examples include GB and Hrs. 4182 // 4183 // * USAGE_TYPE_GROUP - The grouping of common usage types. An example is 4184 // Amazon EC2: CloudWatch – Alarms. The response for this operation includes 4185 // a unit attribute. 4186 // 4187 // * RECORD_TYPE - The different types of charges such as RI fees, usage 4188 // costs, tax refunds, and credits. 4189 // 4190 // * RESOURCE_ID - The unique identifier of the resource. ResourceId is an 4191 // opt-in feature only available for last 14 days for EC2-Compute Service. 4192 // 4193 // If you set the context to RESERVATIONS, you can use the following dimensions 4194 // for searching: 4195 // 4196 // * AZ - The Availability Zone. An example is us-east-1a. 4197 // 4198 // * CACHE_ENGINE - The Amazon ElastiCache operating system. Examples are 4199 // Windows or Linux. 4200 // 4201 // * DEPLOYMENT_OPTION - The scope of Amazon Relational Database Service 4202 // deployments. Valid values are SingleAZ and MultiAZ. 4203 // 4204 // * INSTANCE_TYPE - The type of Amazon EC2 instance. An example is m4.xlarge. 4205 // 4206 // * LINKED_ACCOUNT - The description in the attribute map that includes 4207 // the full name of the member account. The value field contains the AWS 4208 // ID of the member account. 4209 // 4210 // * PLATFORM - The Amazon EC2 operating system. Examples are Windows or 4211 // Linux. 4212 // 4213 // * REGION - The AWS Region. 4214 // 4215 // * SCOPE (Utilization only) - The scope of a Reserved Instance (RI). Values 4216 // are regional or a single Availability Zone. 4217 // 4218 // * TAG (Coverage only) - The tags that are associated with a Reserved Instance 4219 // (RI). 4220 // 4221 // * TENANCY - The tenancy of a resource. Examples are shared or dedicated. 4222 // 4223 // If you set the context to SAVINGS_PLANS, you can use the following dimensions 4224 // for searching: 4225 // 4226 // * SAVINGS_PLANS_TYPE - Type of Savings Plans (EC2 Instance or Compute) 4227 // 4228 // * PAYMENT_OPTION - Payment option for the given Savings Plans (for example, 4229 // All Upfront) 4230 // 4231 // * REGION - The AWS Region. 4232 // 4233 // * INSTANCE_TYPE_FAMILY - The family of instances (For example, m5) 4234 // 4235 // * LINKED_ACCOUNT - The description in the attribute map that includes 4236 // the full name of the member account. The value field contains the AWS 4237 // ID of the member account. 4238 // 4239 // * SAVINGS_PLAN_ARN - The unique identifier for your Savings Plan 4240 // 4241 // DimensionValues is a required field 4242 DimensionValues []*DimensionValuesWithAttributes `type:"list" required:"true"` 4243 4244 // The token for the next set of retrievable results. AWS provides the token 4245 // when the response from a previous call has more results than the maximum 4246 // page size. 4247 NextPageToken *string `type:"string"` 4248 4249 // The number of results that AWS returned at one time. 4250 // 4251 // ReturnSize is a required field 4252 ReturnSize *int64 `type:"integer" required:"true"` 4253 4254 // The total number of search results. 4255 // 4256 // TotalSize is a required field 4257 TotalSize *int64 `type:"integer" required:"true"` 4258} 4259 4260// String returns the string representation 4261func (s GetDimensionValuesOutput) String() string { 4262 return awsutil.Prettify(s) 4263} 4264 4265// GoString returns the string representation 4266func (s GetDimensionValuesOutput) GoString() string { 4267 return s.String() 4268} 4269 4270// SetDimensionValues sets the DimensionValues field's value. 4271func (s *GetDimensionValuesOutput) SetDimensionValues(v []*DimensionValuesWithAttributes) *GetDimensionValuesOutput { 4272 s.DimensionValues = v 4273 return s 4274} 4275 4276// SetNextPageToken sets the NextPageToken field's value. 4277func (s *GetDimensionValuesOutput) SetNextPageToken(v string) *GetDimensionValuesOutput { 4278 s.NextPageToken = &v 4279 return s 4280} 4281 4282// SetReturnSize sets the ReturnSize field's value. 4283func (s *GetDimensionValuesOutput) SetReturnSize(v int64) *GetDimensionValuesOutput { 4284 s.ReturnSize = &v 4285 return s 4286} 4287 4288// SetTotalSize sets the TotalSize field's value. 4289func (s *GetDimensionValuesOutput) SetTotalSize(v int64) *GetDimensionValuesOutput { 4290 s.TotalSize = &v 4291 return s 4292} 4293 4294// You can use the following request parameters to query for how much of your 4295// instance usage a reservation covered. 4296type GetReservationCoverageInput struct { 4297 _ struct{} `type:"structure"` 4298 4299 // Filters utilization data by dimensions. You can filter by the following dimensions: 4300 // 4301 // * AZ 4302 // 4303 // * CACHE_ENGINE 4304 // 4305 // * DATABASE_ENGINE 4306 // 4307 // * DEPLOYMENT_OPTION 4308 // 4309 // * INSTANCE_TYPE 4310 // 4311 // * LINKED_ACCOUNT 4312 // 4313 // * OPERATING_SYSTEM 4314 // 4315 // * PLATFORM 4316 // 4317 // * REGION 4318 // 4319 // * SERVICE 4320 // 4321 // * TAG 4322 // 4323 // * TENANCY 4324 // 4325 // GetReservationCoverage uses the same Expression (http://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html) 4326 // object as the other operations, but only AND is supported among each dimension. 4327 // You can nest only one level deep. If there are multiple values for a dimension, 4328 // they are OR'd together. 4329 // 4330 // If you don't provide a SERVICE filter, Cost Explorer defaults to EC2. 4331 Filter *Expression `type:"structure"` 4332 4333 // The granularity of the AWS cost data for the reservation. Valid values are 4334 // MONTHLY and DAILY. 4335 // 4336 // If GroupBy is set, Granularity can't be set. If Granularity isn't set, the 4337 // response object doesn't include Granularity, either MONTHLY or DAILY. 4338 // 4339 // The GetReservationCoverage operation supports only DAILY and MONTHLY granularities. 4340 Granularity *string `type:"string" enum:"Granularity"` 4341 4342 // You can group the data by the following attributes: 4343 // 4344 // * AZ 4345 // 4346 // * CACHE_ENGINE 4347 // 4348 // * DATABASE_ENGINE 4349 // 4350 // * DEPLOYMENT_OPTION 4351 // 4352 // * INSTANCE_TYPE 4353 // 4354 // * LINKED_ACCOUNT 4355 // 4356 // * OPERATING_SYSTEM 4357 // 4358 // * PLATFORM 4359 // 4360 // * REGION 4361 // 4362 // * TENANCY 4363 GroupBy []*GroupDefinition `type:"list"` 4364 4365 // The measurement that you want your reservation coverage reported in. 4366 // 4367 // Valid values are Hour, Unit, and Cost. You can use multiple values in a request. 4368 Metrics []*string `type:"list"` 4369 4370 // The token to retrieve the next set of results. AWS provides the token when 4371 // the response from a previous call has more results than the maximum page 4372 // size. 4373 NextPageToken *string `type:"string"` 4374 4375 // The start and end dates of the period that you want to retrieve data about 4376 // reservation coverage for. You can retrieve data for a maximum of 13 months: 4377 // the last 12 months and the current month. The start date is inclusive, but 4378 // the end date is exclusive. For example, if start is 2017-01-01 and end is 4379 // 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up 4380 // to and including 2017-04-30 but not including 2017-05-01. 4381 // 4382 // TimePeriod is a required field 4383 TimePeriod *DateInterval `type:"structure" required:"true"` 4384} 4385 4386// String returns the string representation 4387func (s GetReservationCoverageInput) String() string { 4388 return awsutil.Prettify(s) 4389} 4390 4391// GoString returns the string representation 4392func (s GetReservationCoverageInput) GoString() string { 4393 return s.String() 4394} 4395 4396// Validate inspects the fields of the type to determine if they are valid. 4397func (s *GetReservationCoverageInput) Validate() error { 4398 invalidParams := request.ErrInvalidParams{Context: "GetReservationCoverageInput"} 4399 if s.TimePeriod == nil { 4400 invalidParams.Add(request.NewErrParamRequired("TimePeriod")) 4401 } 4402 if s.Filter != nil { 4403 if err := s.Filter.Validate(); err != nil { 4404 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 4405 } 4406 } 4407 if s.TimePeriod != nil { 4408 if err := s.TimePeriod.Validate(); err != nil { 4409 invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams)) 4410 } 4411 } 4412 4413 if invalidParams.Len() > 0 { 4414 return invalidParams 4415 } 4416 return nil 4417} 4418 4419// SetFilter sets the Filter field's value. 4420func (s *GetReservationCoverageInput) SetFilter(v *Expression) *GetReservationCoverageInput { 4421 s.Filter = v 4422 return s 4423} 4424 4425// SetGranularity sets the Granularity field's value. 4426func (s *GetReservationCoverageInput) SetGranularity(v string) *GetReservationCoverageInput { 4427 s.Granularity = &v 4428 return s 4429} 4430 4431// SetGroupBy sets the GroupBy field's value. 4432func (s *GetReservationCoverageInput) SetGroupBy(v []*GroupDefinition) *GetReservationCoverageInput { 4433 s.GroupBy = v 4434 return s 4435} 4436 4437// SetMetrics sets the Metrics field's value. 4438func (s *GetReservationCoverageInput) SetMetrics(v []*string) *GetReservationCoverageInput { 4439 s.Metrics = v 4440 return s 4441} 4442 4443// SetNextPageToken sets the NextPageToken field's value. 4444func (s *GetReservationCoverageInput) SetNextPageToken(v string) *GetReservationCoverageInput { 4445 s.NextPageToken = &v 4446 return s 4447} 4448 4449// SetTimePeriod sets the TimePeriod field's value. 4450func (s *GetReservationCoverageInput) SetTimePeriod(v *DateInterval) *GetReservationCoverageInput { 4451 s.TimePeriod = v 4452 return s 4453} 4454 4455type GetReservationCoverageOutput struct { 4456 _ struct{} `type:"structure"` 4457 4458 // The amount of time that your reservations covered. 4459 // 4460 // CoveragesByTime is a required field 4461 CoveragesByTime []*CoverageByTime `type:"list" required:"true"` 4462 4463 // The token for the next set of retrievable results. AWS provides the token 4464 // when the response from a previous call has more results than the maximum 4465 // page size. 4466 NextPageToken *string `type:"string"` 4467 4468 // The total amount of instance usage that a reservation covered. 4469 Total *Coverage `type:"structure"` 4470} 4471 4472// String returns the string representation 4473func (s GetReservationCoverageOutput) String() string { 4474 return awsutil.Prettify(s) 4475} 4476 4477// GoString returns the string representation 4478func (s GetReservationCoverageOutput) GoString() string { 4479 return s.String() 4480} 4481 4482// SetCoveragesByTime sets the CoveragesByTime field's value. 4483func (s *GetReservationCoverageOutput) SetCoveragesByTime(v []*CoverageByTime) *GetReservationCoverageOutput { 4484 s.CoveragesByTime = v 4485 return s 4486} 4487 4488// SetNextPageToken sets the NextPageToken field's value. 4489func (s *GetReservationCoverageOutput) SetNextPageToken(v string) *GetReservationCoverageOutput { 4490 s.NextPageToken = &v 4491 return s 4492} 4493 4494// SetTotal sets the Total field's value. 4495func (s *GetReservationCoverageOutput) SetTotal(v *Coverage) *GetReservationCoverageOutput { 4496 s.Total = v 4497 return s 4498} 4499 4500type GetReservationPurchaseRecommendationInput struct { 4501 _ struct{} `type:"structure"` 4502 4503 // The account ID that is associated with the recommendation. 4504 AccountId *string `type:"string"` 4505 4506 // The account scope that you want recommendations for. PAYER means that AWS 4507 // includes the master account and any member accounts when it calculates its 4508 // recommendations. LINKED means that AWS includes only member accounts when 4509 // it calculates its recommendations. 4510 // 4511 // Valid values are PAYER and LINKED. 4512 AccountScope *string `type:"string" enum:"AccountScope"` 4513 4514 // The number of previous days that you want AWS to consider when it calculates 4515 // your recommendations. 4516 LookbackPeriodInDays *string `type:"string" enum:"LookbackPeriodInDays"` 4517 4518 // The pagination token that indicates the next set of results that you want 4519 // to retrieve. 4520 NextPageToken *string `type:"string"` 4521 4522 // The number of recommendations that you want returned in a single response 4523 // object. 4524 PageSize *int64 `type:"integer"` 4525 4526 // The reservation purchase option that you want recommendations for. 4527 PaymentOption *string `type:"string" enum:"PaymentOption"` 4528 4529 // The specific service that you want recommendations for. 4530 // 4531 // Service is a required field 4532 Service *string `type:"string" required:"true"` 4533 4534 // The hardware specifications for the service instances that you want recommendations 4535 // for, such as standard or convertible Amazon EC2 instances. 4536 ServiceSpecification *ServiceSpecification `type:"structure"` 4537 4538 // The reservation term that you want recommendations for. 4539 TermInYears *string `type:"string" enum:"TermInYears"` 4540} 4541 4542// String returns the string representation 4543func (s GetReservationPurchaseRecommendationInput) String() string { 4544 return awsutil.Prettify(s) 4545} 4546 4547// GoString returns the string representation 4548func (s GetReservationPurchaseRecommendationInput) GoString() string { 4549 return s.String() 4550} 4551 4552// Validate inspects the fields of the type to determine if they are valid. 4553func (s *GetReservationPurchaseRecommendationInput) Validate() error { 4554 invalidParams := request.ErrInvalidParams{Context: "GetReservationPurchaseRecommendationInput"} 4555 if s.Service == nil { 4556 invalidParams.Add(request.NewErrParamRequired("Service")) 4557 } 4558 4559 if invalidParams.Len() > 0 { 4560 return invalidParams 4561 } 4562 return nil 4563} 4564 4565// SetAccountId sets the AccountId field's value. 4566func (s *GetReservationPurchaseRecommendationInput) SetAccountId(v string) *GetReservationPurchaseRecommendationInput { 4567 s.AccountId = &v 4568 return s 4569} 4570 4571// SetAccountScope sets the AccountScope field's value. 4572func (s *GetReservationPurchaseRecommendationInput) SetAccountScope(v string) *GetReservationPurchaseRecommendationInput { 4573 s.AccountScope = &v 4574 return s 4575} 4576 4577// SetLookbackPeriodInDays sets the LookbackPeriodInDays field's value. 4578func (s *GetReservationPurchaseRecommendationInput) SetLookbackPeriodInDays(v string) *GetReservationPurchaseRecommendationInput { 4579 s.LookbackPeriodInDays = &v 4580 return s 4581} 4582 4583// SetNextPageToken sets the NextPageToken field's value. 4584func (s *GetReservationPurchaseRecommendationInput) SetNextPageToken(v string) *GetReservationPurchaseRecommendationInput { 4585 s.NextPageToken = &v 4586 return s 4587} 4588 4589// SetPageSize sets the PageSize field's value. 4590func (s *GetReservationPurchaseRecommendationInput) SetPageSize(v int64) *GetReservationPurchaseRecommendationInput { 4591 s.PageSize = &v 4592 return s 4593} 4594 4595// SetPaymentOption sets the PaymentOption field's value. 4596func (s *GetReservationPurchaseRecommendationInput) SetPaymentOption(v string) *GetReservationPurchaseRecommendationInput { 4597 s.PaymentOption = &v 4598 return s 4599} 4600 4601// SetService sets the Service field's value. 4602func (s *GetReservationPurchaseRecommendationInput) SetService(v string) *GetReservationPurchaseRecommendationInput { 4603 s.Service = &v 4604 return s 4605} 4606 4607// SetServiceSpecification sets the ServiceSpecification field's value. 4608func (s *GetReservationPurchaseRecommendationInput) SetServiceSpecification(v *ServiceSpecification) *GetReservationPurchaseRecommendationInput { 4609 s.ServiceSpecification = v 4610 return s 4611} 4612 4613// SetTermInYears sets the TermInYears field's value. 4614func (s *GetReservationPurchaseRecommendationInput) SetTermInYears(v string) *GetReservationPurchaseRecommendationInput { 4615 s.TermInYears = &v 4616 return s 4617} 4618 4619type GetReservationPurchaseRecommendationOutput struct { 4620 _ struct{} `type:"structure"` 4621 4622 // Information about this specific recommendation call, such as the time stamp 4623 // for when Cost Explorer generated this recommendation. 4624 Metadata *ReservationPurchaseRecommendationMetadata `type:"structure"` 4625 4626 // The pagination token for the next set of retrievable results. 4627 NextPageToken *string `type:"string"` 4628 4629 // Recommendations for reservations to purchase. 4630 Recommendations []*ReservationPurchaseRecommendation `type:"list"` 4631} 4632 4633// String returns the string representation 4634func (s GetReservationPurchaseRecommendationOutput) String() string { 4635 return awsutil.Prettify(s) 4636} 4637 4638// GoString returns the string representation 4639func (s GetReservationPurchaseRecommendationOutput) GoString() string { 4640 return s.String() 4641} 4642 4643// SetMetadata sets the Metadata field's value. 4644func (s *GetReservationPurchaseRecommendationOutput) SetMetadata(v *ReservationPurchaseRecommendationMetadata) *GetReservationPurchaseRecommendationOutput { 4645 s.Metadata = v 4646 return s 4647} 4648 4649// SetNextPageToken sets the NextPageToken field's value. 4650func (s *GetReservationPurchaseRecommendationOutput) SetNextPageToken(v string) *GetReservationPurchaseRecommendationOutput { 4651 s.NextPageToken = &v 4652 return s 4653} 4654 4655// SetRecommendations sets the Recommendations field's value. 4656func (s *GetReservationPurchaseRecommendationOutput) SetRecommendations(v []*ReservationPurchaseRecommendation) *GetReservationPurchaseRecommendationOutput { 4657 s.Recommendations = v 4658 return s 4659} 4660 4661type GetReservationUtilizationInput struct { 4662 _ struct{} `type:"structure"` 4663 4664 // Filters utilization data by dimensions. You can filter by the following dimensions: 4665 // 4666 // * AZ 4667 // 4668 // * CACHE_ENGINE 4669 // 4670 // * DATABASE_ENGINE 4671 // 4672 // * DEPLOYMENT_OPTION 4673 // 4674 // * INSTANCE_TYPE 4675 // 4676 // * LINKED_ACCOUNT 4677 // 4678 // * OPERATING_SYSTEM 4679 // 4680 // * PLATFORM 4681 // 4682 // * REGION 4683 // 4684 // * SERVICE 4685 // 4686 // * SCOPE 4687 // 4688 // * TENANCY 4689 // 4690 // GetReservationUtilization uses the same Expression (http://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html) 4691 // object as the other operations, but only AND is supported among each dimension, 4692 // and nesting is supported up to only one level deep. If there are multiple 4693 // values for a dimension, they are OR'd together. 4694 Filter *Expression `type:"structure"` 4695 4696 // If GroupBy is set, Granularity can't be set. If Granularity isn't set, the 4697 // response object doesn't include Granularity, either MONTHLY or DAILY. If 4698 // both GroupBy and Granularity aren't set, GetReservationUtilization defaults 4699 // to DAILY. 4700 // 4701 // The GetReservationUtilization operation supports only DAILY and MONTHLY granularities. 4702 Granularity *string `type:"string" enum:"Granularity"` 4703 4704 // Groups only by SUBSCRIPTION_ID. Metadata is included. 4705 GroupBy []*GroupDefinition `type:"list"` 4706 4707 // The token to retrieve the next set of results. AWS provides the token when 4708 // the response from a previous call has more results than the maximum page 4709 // size. 4710 NextPageToken *string `type:"string"` 4711 4712 // Sets the start and end dates for retrieving RI utilization. The start date 4713 // is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 4714 // and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 4715 // up to and including 2017-04-30 but not including 2017-05-01. 4716 // 4717 // TimePeriod is a required field 4718 TimePeriod *DateInterval `type:"structure" required:"true"` 4719} 4720 4721// String returns the string representation 4722func (s GetReservationUtilizationInput) String() string { 4723 return awsutil.Prettify(s) 4724} 4725 4726// GoString returns the string representation 4727func (s GetReservationUtilizationInput) GoString() string { 4728 return s.String() 4729} 4730 4731// Validate inspects the fields of the type to determine if they are valid. 4732func (s *GetReservationUtilizationInput) Validate() error { 4733 invalidParams := request.ErrInvalidParams{Context: "GetReservationUtilizationInput"} 4734 if s.TimePeriod == nil { 4735 invalidParams.Add(request.NewErrParamRequired("TimePeriod")) 4736 } 4737 if s.Filter != nil { 4738 if err := s.Filter.Validate(); err != nil { 4739 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 4740 } 4741 } 4742 if s.TimePeriod != nil { 4743 if err := s.TimePeriod.Validate(); err != nil { 4744 invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams)) 4745 } 4746 } 4747 4748 if invalidParams.Len() > 0 { 4749 return invalidParams 4750 } 4751 return nil 4752} 4753 4754// SetFilter sets the Filter field's value. 4755func (s *GetReservationUtilizationInput) SetFilter(v *Expression) *GetReservationUtilizationInput { 4756 s.Filter = v 4757 return s 4758} 4759 4760// SetGranularity sets the Granularity field's value. 4761func (s *GetReservationUtilizationInput) SetGranularity(v string) *GetReservationUtilizationInput { 4762 s.Granularity = &v 4763 return s 4764} 4765 4766// SetGroupBy sets the GroupBy field's value. 4767func (s *GetReservationUtilizationInput) SetGroupBy(v []*GroupDefinition) *GetReservationUtilizationInput { 4768 s.GroupBy = v 4769 return s 4770} 4771 4772// SetNextPageToken sets the NextPageToken field's value. 4773func (s *GetReservationUtilizationInput) SetNextPageToken(v string) *GetReservationUtilizationInput { 4774 s.NextPageToken = &v 4775 return s 4776} 4777 4778// SetTimePeriod sets the TimePeriod field's value. 4779func (s *GetReservationUtilizationInput) SetTimePeriod(v *DateInterval) *GetReservationUtilizationInput { 4780 s.TimePeriod = v 4781 return s 4782} 4783 4784type GetReservationUtilizationOutput struct { 4785 _ struct{} `type:"structure"` 4786 4787 // The token for the next set of retrievable results. AWS provides the token 4788 // when the response from a previous call has more results than the maximum 4789 // page size. 4790 NextPageToken *string `type:"string"` 4791 4792 // The total amount of time that you used your RIs. 4793 Total *ReservationAggregates `type:"structure"` 4794 4795 // The amount of time that you used your RIs. 4796 // 4797 // UtilizationsByTime is a required field 4798 UtilizationsByTime []*UtilizationByTime `type:"list" required:"true"` 4799} 4800 4801// String returns the string representation 4802func (s GetReservationUtilizationOutput) String() string { 4803 return awsutil.Prettify(s) 4804} 4805 4806// GoString returns the string representation 4807func (s GetReservationUtilizationOutput) GoString() string { 4808 return s.String() 4809} 4810 4811// SetNextPageToken sets the NextPageToken field's value. 4812func (s *GetReservationUtilizationOutput) SetNextPageToken(v string) *GetReservationUtilizationOutput { 4813 s.NextPageToken = &v 4814 return s 4815} 4816 4817// SetTotal sets the Total field's value. 4818func (s *GetReservationUtilizationOutput) SetTotal(v *ReservationAggregates) *GetReservationUtilizationOutput { 4819 s.Total = v 4820 return s 4821} 4822 4823// SetUtilizationsByTime sets the UtilizationsByTime field's value. 4824func (s *GetReservationUtilizationOutput) SetUtilizationsByTime(v []*UtilizationByTime) *GetReservationUtilizationOutput { 4825 s.UtilizationsByTime = v 4826 return s 4827} 4828 4829type GetRightsizingRecommendationInput struct { 4830 _ struct{} `type:"structure"` 4831 4832 // Use Expression to filter by cost or by usage. There are two patterns: 4833 // 4834 // * Simple dimension values - You can set the dimension name and values 4835 // for the filters that you plan to use. For example, you can filter for 4836 // REGION==us-east-1 OR REGION==us-west-1. The Expression for that looks 4837 // like this: { "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", 4838 // “us-west-1” ] } } The list of dimension values are OR'd together to 4839 // retrieve cost or usage data. You can create Expression and DimensionValues 4840 // objects using either with* methods or set* methods in multiple lines. 4841 // 4842 // * Compound dimension values with logical operations - You can use multiple 4843 // Expression types and the logical operators AND/OR/NOT to create a list 4844 // of one or more Expression objects. This allows you to filter on more advanced 4845 // options. For example, you can filter on ((REGION == us-east-1 OR REGION 4846 // == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer). 4847 // The Expression for that looks like this: { "And": [ {"Or": [ {"Dimensions": 4848 // { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": 4849 // { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": 4850 // { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] } Because each 4851 // Expression can have only one operator, the service returns an error if 4852 // more than one is specified. The following example shows an Expression 4853 // object that creates an error. { "And": [ ... ], "DimensionValues": { "Dimension": 4854 // "USAGE_TYPE", "Values": [ "DataTransfer" ] } } 4855 // 4856 // For GetRightsizingRecommendation action, a combination of OR and NOT is not 4857 // supported. OR is not supported between different dimensions, or dimensions 4858 // and tags. NOT operators aren't supported. Dimensions are also limited to 4859 // LINKED_ACCOUNT, REGION, or RIGHTSIZING_TYPE. 4860 Filter *Expression `type:"structure"` 4861 4862 // The pagination token that indicates the next set of results that you want 4863 // to retrieve. 4864 NextPageToken *string `type:"string"` 4865 4866 // The number of recommendations that you want returned in a single response 4867 // object. 4868 PageSize *int64 `type:"integer"` 4869 4870 // The specific service that you want recommendations for. The only valid value 4871 // for GetRightsizingRecommendation is "AmazonEC2". 4872 // 4873 // Service is a required field 4874 Service *string `type:"string" required:"true"` 4875} 4876 4877// String returns the string representation 4878func (s GetRightsizingRecommendationInput) String() string { 4879 return awsutil.Prettify(s) 4880} 4881 4882// GoString returns the string representation 4883func (s GetRightsizingRecommendationInput) GoString() string { 4884 return s.String() 4885} 4886 4887// Validate inspects the fields of the type to determine if they are valid. 4888func (s *GetRightsizingRecommendationInput) Validate() error { 4889 invalidParams := request.ErrInvalidParams{Context: "GetRightsizingRecommendationInput"} 4890 if s.Service == nil { 4891 invalidParams.Add(request.NewErrParamRequired("Service")) 4892 } 4893 if s.Filter != nil { 4894 if err := s.Filter.Validate(); err != nil { 4895 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 4896 } 4897 } 4898 4899 if invalidParams.Len() > 0 { 4900 return invalidParams 4901 } 4902 return nil 4903} 4904 4905// SetFilter sets the Filter field's value. 4906func (s *GetRightsizingRecommendationInput) SetFilter(v *Expression) *GetRightsizingRecommendationInput { 4907 s.Filter = v 4908 return s 4909} 4910 4911// SetNextPageToken sets the NextPageToken field's value. 4912func (s *GetRightsizingRecommendationInput) SetNextPageToken(v string) *GetRightsizingRecommendationInput { 4913 s.NextPageToken = &v 4914 return s 4915} 4916 4917// SetPageSize sets the PageSize field's value. 4918func (s *GetRightsizingRecommendationInput) SetPageSize(v int64) *GetRightsizingRecommendationInput { 4919 s.PageSize = &v 4920 return s 4921} 4922 4923// SetService sets the Service field's value. 4924func (s *GetRightsizingRecommendationInput) SetService(v string) *GetRightsizingRecommendationInput { 4925 s.Service = &v 4926 return s 4927} 4928 4929type GetRightsizingRecommendationOutput struct { 4930 _ struct{} `type:"structure"` 4931 4932 // Information regarding this specific recommendation set. 4933 Metadata *RightsizingRecommendationMetadata `type:"structure"` 4934 4935 // The token to retrieve the next set of results. 4936 NextPageToken *string `type:"string"` 4937 4938 // Recommendations to rightsize resources. 4939 RightsizingRecommendations []*RightsizingRecommendation `type:"list"` 4940 4941 // Summary of this recommendation set. 4942 Summary *RightsizingRecommendationSummary `type:"structure"` 4943} 4944 4945// String returns the string representation 4946func (s GetRightsizingRecommendationOutput) String() string { 4947 return awsutil.Prettify(s) 4948} 4949 4950// GoString returns the string representation 4951func (s GetRightsizingRecommendationOutput) GoString() string { 4952 return s.String() 4953} 4954 4955// SetMetadata sets the Metadata field's value. 4956func (s *GetRightsizingRecommendationOutput) SetMetadata(v *RightsizingRecommendationMetadata) *GetRightsizingRecommendationOutput { 4957 s.Metadata = v 4958 return s 4959} 4960 4961// SetNextPageToken sets the NextPageToken field's value. 4962func (s *GetRightsizingRecommendationOutput) SetNextPageToken(v string) *GetRightsizingRecommendationOutput { 4963 s.NextPageToken = &v 4964 return s 4965} 4966 4967// SetRightsizingRecommendations sets the RightsizingRecommendations field's value. 4968func (s *GetRightsizingRecommendationOutput) SetRightsizingRecommendations(v []*RightsizingRecommendation) *GetRightsizingRecommendationOutput { 4969 s.RightsizingRecommendations = v 4970 return s 4971} 4972 4973// SetSummary sets the Summary field's value. 4974func (s *GetRightsizingRecommendationOutput) SetSummary(v *RightsizingRecommendationSummary) *GetRightsizingRecommendationOutput { 4975 s.Summary = v 4976 return s 4977} 4978 4979type GetSavingsPlansCoverageInput struct { 4980 _ struct{} `type:"structure"` 4981 4982 // Filters Savings Plans coverage data by dimensions. You can filter data for 4983 // Savings Plans usage with the following dimensions: 4984 // 4985 // * LINKED_ACCOUNT 4986 // 4987 // * REGION 4988 // 4989 // * SERVICE 4990 // 4991 // * INSTANCE_FAMILY 4992 // 4993 // GetSavingsPlansCoverage uses the same Expression (http://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html) 4994 // object as the other operations, but only AND is supported among each dimension. 4995 // If there are multiple values for a dimension, they are OR'd together. 4996 Filter *Expression `type:"structure"` 4997 4998 // The granularity of the Amazon Web Services cost data for your Savings Plans. 4999 // Granularity can't be set if GroupBy is set. 5000 // 5001 // The GetSavingsPlansCoverage operation supports only DAILY and MONTHLY granularities. 5002 Granularity *string `type:"string" enum:"Granularity"` 5003 5004 // You can group the data using the attributes INSTANCE_FAMILY, REGION, or SERVICE. 5005 GroupBy []*GroupDefinition `type:"list"` 5006 5007 // The number of items to be returned in a response. The default is 20, with 5008 // a minimum value of 1. 5009 MaxResults *int64 `min:"1" type:"integer"` 5010 5011 // The measurement that you want your Savings Plans coverage reported in. The 5012 // only valid value is SpendCoveredBySavingsPlans. 5013 Metrics []*string `type:"list"` 5014 5015 // The token to retrieve the next set of results. Amazon Web Services provides 5016 // the token when the response from a previous call has more results than the 5017 // maximum page size. 5018 NextToken *string `type:"string"` 5019 5020 // The time period that you want the usage and costs for. The Start date must 5021 // be within 13 months. The End date must be after the Start date, and before 5022 // the current date. Future dates can't be used as an End date. 5023 // 5024 // TimePeriod is a required field 5025 TimePeriod *DateInterval `type:"structure" required:"true"` 5026} 5027 5028// String returns the string representation 5029func (s GetSavingsPlansCoverageInput) String() string { 5030 return awsutil.Prettify(s) 5031} 5032 5033// GoString returns the string representation 5034func (s GetSavingsPlansCoverageInput) GoString() string { 5035 return s.String() 5036} 5037 5038// Validate inspects the fields of the type to determine if they are valid. 5039func (s *GetSavingsPlansCoverageInput) Validate() error { 5040 invalidParams := request.ErrInvalidParams{Context: "GetSavingsPlansCoverageInput"} 5041 if s.MaxResults != nil && *s.MaxResults < 1 { 5042 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 5043 } 5044 if s.TimePeriod == nil { 5045 invalidParams.Add(request.NewErrParamRequired("TimePeriod")) 5046 } 5047 if s.Filter != nil { 5048 if err := s.Filter.Validate(); err != nil { 5049 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 5050 } 5051 } 5052 if s.TimePeriod != nil { 5053 if err := s.TimePeriod.Validate(); err != nil { 5054 invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams)) 5055 } 5056 } 5057 5058 if invalidParams.Len() > 0 { 5059 return invalidParams 5060 } 5061 return nil 5062} 5063 5064// SetFilter sets the Filter field's value. 5065func (s *GetSavingsPlansCoverageInput) SetFilter(v *Expression) *GetSavingsPlansCoverageInput { 5066 s.Filter = v 5067 return s 5068} 5069 5070// SetGranularity sets the Granularity field's value. 5071func (s *GetSavingsPlansCoverageInput) SetGranularity(v string) *GetSavingsPlansCoverageInput { 5072 s.Granularity = &v 5073 return s 5074} 5075 5076// SetGroupBy sets the GroupBy field's value. 5077func (s *GetSavingsPlansCoverageInput) SetGroupBy(v []*GroupDefinition) *GetSavingsPlansCoverageInput { 5078 s.GroupBy = v 5079 return s 5080} 5081 5082// SetMaxResults sets the MaxResults field's value. 5083func (s *GetSavingsPlansCoverageInput) SetMaxResults(v int64) *GetSavingsPlansCoverageInput { 5084 s.MaxResults = &v 5085 return s 5086} 5087 5088// SetMetrics sets the Metrics field's value. 5089func (s *GetSavingsPlansCoverageInput) SetMetrics(v []*string) *GetSavingsPlansCoverageInput { 5090 s.Metrics = v 5091 return s 5092} 5093 5094// SetNextToken sets the NextToken field's value. 5095func (s *GetSavingsPlansCoverageInput) SetNextToken(v string) *GetSavingsPlansCoverageInput { 5096 s.NextToken = &v 5097 return s 5098} 5099 5100// SetTimePeriod sets the TimePeriod field's value. 5101func (s *GetSavingsPlansCoverageInput) SetTimePeriod(v *DateInterval) *GetSavingsPlansCoverageInput { 5102 s.TimePeriod = v 5103 return s 5104} 5105 5106type GetSavingsPlansCoverageOutput struct { 5107 _ struct{} `type:"structure"` 5108 5109 // The token to retrieve the next set of results. Amazon Web Services provides 5110 // the token when the response from a previous call has more results than the 5111 // maximum page size. 5112 NextToken *string `type:"string"` 5113 5114 // The amount of spend that your Savings Plans covered. 5115 // 5116 // SavingsPlansCoverages is a required field 5117 SavingsPlansCoverages []*SavingsPlansCoverage `type:"list" required:"true"` 5118} 5119 5120// String returns the string representation 5121func (s GetSavingsPlansCoverageOutput) String() string { 5122 return awsutil.Prettify(s) 5123} 5124 5125// GoString returns the string representation 5126func (s GetSavingsPlansCoverageOutput) GoString() string { 5127 return s.String() 5128} 5129 5130// SetNextToken sets the NextToken field's value. 5131func (s *GetSavingsPlansCoverageOutput) SetNextToken(v string) *GetSavingsPlansCoverageOutput { 5132 s.NextToken = &v 5133 return s 5134} 5135 5136// SetSavingsPlansCoverages sets the SavingsPlansCoverages field's value. 5137func (s *GetSavingsPlansCoverageOutput) SetSavingsPlansCoverages(v []*SavingsPlansCoverage) *GetSavingsPlansCoverageOutput { 5138 s.SavingsPlansCoverages = v 5139 return s 5140} 5141 5142type GetSavingsPlansPurchaseRecommendationInput struct { 5143 _ struct{} `type:"structure"` 5144 5145 // The lookback period used to generate the recommendation. 5146 // 5147 // LookbackPeriodInDays is a required field 5148 LookbackPeriodInDays *string `type:"string" required:"true" enum:"LookbackPeriodInDays"` 5149 5150 // The token to retrieve the next set of results. Amazon Web Services provides 5151 // the token when the response from a previous call has more results than the 5152 // maximum page size. 5153 NextPageToken *string `type:"string"` 5154 5155 // The number of recommendations that you want returned in a single response 5156 // object. 5157 PageSize *int64 `type:"integer"` 5158 5159 // The payment option used to generate these recommendations. 5160 // 5161 // PaymentOption is a required field 5162 PaymentOption *string `type:"string" required:"true" enum:"PaymentOption"` 5163 5164 // The Savings Plans recommendation type requested. 5165 // 5166 // SavingsPlansType is a required field 5167 SavingsPlansType *string `type:"string" required:"true" enum:"SupportedSavingsPlansType"` 5168 5169 // The savings plan recommendation term used to generated these recommendations. 5170 // 5171 // TermInYears is a required field 5172 TermInYears *string `type:"string" required:"true" enum:"TermInYears"` 5173} 5174 5175// String returns the string representation 5176func (s GetSavingsPlansPurchaseRecommendationInput) String() string { 5177 return awsutil.Prettify(s) 5178} 5179 5180// GoString returns the string representation 5181func (s GetSavingsPlansPurchaseRecommendationInput) GoString() string { 5182 return s.String() 5183} 5184 5185// Validate inspects the fields of the type to determine if they are valid. 5186func (s *GetSavingsPlansPurchaseRecommendationInput) Validate() error { 5187 invalidParams := request.ErrInvalidParams{Context: "GetSavingsPlansPurchaseRecommendationInput"} 5188 if s.LookbackPeriodInDays == nil { 5189 invalidParams.Add(request.NewErrParamRequired("LookbackPeriodInDays")) 5190 } 5191 if s.PaymentOption == nil { 5192 invalidParams.Add(request.NewErrParamRequired("PaymentOption")) 5193 } 5194 if s.SavingsPlansType == nil { 5195 invalidParams.Add(request.NewErrParamRequired("SavingsPlansType")) 5196 } 5197 if s.TermInYears == nil { 5198 invalidParams.Add(request.NewErrParamRequired("TermInYears")) 5199 } 5200 5201 if invalidParams.Len() > 0 { 5202 return invalidParams 5203 } 5204 return nil 5205} 5206 5207// SetLookbackPeriodInDays sets the LookbackPeriodInDays field's value. 5208func (s *GetSavingsPlansPurchaseRecommendationInput) SetLookbackPeriodInDays(v string) *GetSavingsPlansPurchaseRecommendationInput { 5209 s.LookbackPeriodInDays = &v 5210 return s 5211} 5212 5213// SetNextPageToken sets the NextPageToken field's value. 5214func (s *GetSavingsPlansPurchaseRecommendationInput) SetNextPageToken(v string) *GetSavingsPlansPurchaseRecommendationInput { 5215 s.NextPageToken = &v 5216 return s 5217} 5218 5219// SetPageSize sets the PageSize field's value. 5220func (s *GetSavingsPlansPurchaseRecommendationInput) SetPageSize(v int64) *GetSavingsPlansPurchaseRecommendationInput { 5221 s.PageSize = &v 5222 return s 5223} 5224 5225// SetPaymentOption sets the PaymentOption field's value. 5226func (s *GetSavingsPlansPurchaseRecommendationInput) SetPaymentOption(v string) *GetSavingsPlansPurchaseRecommendationInput { 5227 s.PaymentOption = &v 5228 return s 5229} 5230 5231// SetSavingsPlansType sets the SavingsPlansType field's value. 5232func (s *GetSavingsPlansPurchaseRecommendationInput) SetSavingsPlansType(v string) *GetSavingsPlansPurchaseRecommendationInput { 5233 s.SavingsPlansType = &v 5234 return s 5235} 5236 5237// SetTermInYears sets the TermInYears field's value. 5238func (s *GetSavingsPlansPurchaseRecommendationInput) SetTermInYears(v string) *GetSavingsPlansPurchaseRecommendationInput { 5239 s.TermInYears = &v 5240 return s 5241} 5242 5243type GetSavingsPlansPurchaseRecommendationOutput struct { 5244 _ struct{} `type:"structure"` 5245 5246 // Information regarding this specific recommendation set. 5247 Metadata *SavingsPlansPurchaseRecommendationMetadata `type:"structure"` 5248 5249 // The token for the next set of retrievable results. AWS provides the token 5250 // when the response from a previous call has more results than the maximum 5251 // page size. 5252 NextPageToken *string `type:"string"` 5253 5254 // Contains your request parameters, Savings Plan Recommendations Summary, and 5255 // Details. 5256 SavingsPlansPurchaseRecommendation *SavingsPlansPurchaseRecommendation `type:"structure"` 5257} 5258 5259// String returns the string representation 5260func (s GetSavingsPlansPurchaseRecommendationOutput) String() string { 5261 return awsutil.Prettify(s) 5262} 5263 5264// GoString returns the string representation 5265func (s GetSavingsPlansPurchaseRecommendationOutput) GoString() string { 5266 return s.String() 5267} 5268 5269// SetMetadata sets the Metadata field's value. 5270func (s *GetSavingsPlansPurchaseRecommendationOutput) SetMetadata(v *SavingsPlansPurchaseRecommendationMetadata) *GetSavingsPlansPurchaseRecommendationOutput { 5271 s.Metadata = v 5272 return s 5273} 5274 5275// SetNextPageToken sets the NextPageToken field's value. 5276func (s *GetSavingsPlansPurchaseRecommendationOutput) SetNextPageToken(v string) *GetSavingsPlansPurchaseRecommendationOutput { 5277 s.NextPageToken = &v 5278 return s 5279} 5280 5281// SetSavingsPlansPurchaseRecommendation sets the SavingsPlansPurchaseRecommendation field's value. 5282func (s *GetSavingsPlansPurchaseRecommendationOutput) SetSavingsPlansPurchaseRecommendation(v *SavingsPlansPurchaseRecommendation) *GetSavingsPlansPurchaseRecommendationOutput { 5283 s.SavingsPlansPurchaseRecommendation = v 5284 return s 5285} 5286 5287type GetSavingsPlansUtilizationDetailsInput struct { 5288 _ struct{} `type:"structure"` 5289 5290 // Filters Savings Plans utilization coverage data for active Savings Plans 5291 // dimensions. You can filter data with the following dimensions: 5292 // 5293 // * LINKED_ACCOUNT 5294 // 5295 // * SAVINGS_PLAN_ARN 5296 // 5297 // * REGION 5298 // 5299 // * PAYMENT_OPTION 5300 // 5301 // * INSTANCE_TYPE_FAMILY 5302 // 5303 // GetSavingsPlansUtilizationDetails uses the same Expression (http://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html) 5304 // object as the other operations, but only AND is supported among each dimension. 5305 Filter *Expression `type:"structure"` 5306 5307 // The number of items to be returned in a response. The default is 20, with 5308 // a minimum value of 1. 5309 MaxResults *int64 `min:"1" type:"integer"` 5310 5311 // The token to retrieve the next set of results. Amazon Web Services provides 5312 // the token when the response from a previous call has more results than the 5313 // maximum page size. 5314 NextToken *string `type:"string"` 5315 5316 // The time period that you want the usage and costs for. The Start date must 5317 // be within 13 months. The End date must be after the Start date, and before 5318 // the current date. Future dates can't be used as an End date. 5319 // 5320 // TimePeriod is a required field 5321 TimePeriod *DateInterval `type:"structure" required:"true"` 5322} 5323 5324// String returns the string representation 5325func (s GetSavingsPlansUtilizationDetailsInput) String() string { 5326 return awsutil.Prettify(s) 5327} 5328 5329// GoString returns the string representation 5330func (s GetSavingsPlansUtilizationDetailsInput) GoString() string { 5331 return s.String() 5332} 5333 5334// Validate inspects the fields of the type to determine if they are valid. 5335func (s *GetSavingsPlansUtilizationDetailsInput) Validate() error { 5336 invalidParams := request.ErrInvalidParams{Context: "GetSavingsPlansUtilizationDetailsInput"} 5337 if s.MaxResults != nil && *s.MaxResults < 1 { 5338 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 5339 } 5340 if s.TimePeriod == nil { 5341 invalidParams.Add(request.NewErrParamRequired("TimePeriod")) 5342 } 5343 if s.Filter != nil { 5344 if err := s.Filter.Validate(); err != nil { 5345 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 5346 } 5347 } 5348 if s.TimePeriod != nil { 5349 if err := s.TimePeriod.Validate(); err != nil { 5350 invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams)) 5351 } 5352 } 5353 5354 if invalidParams.Len() > 0 { 5355 return invalidParams 5356 } 5357 return nil 5358} 5359 5360// SetFilter sets the Filter field's value. 5361func (s *GetSavingsPlansUtilizationDetailsInput) SetFilter(v *Expression) *GetSavingsPlansUtilizationDetailsInput { 5362 s.Filter = v 5363 return s 5364} 5365 5366// SetMaxResults sets the MaxResults field's value. 5367func (s *GetSavingsPlansUtilizationDetailsInput) SetMaxResults(v int64) *GetSavingsPlansUtilizationDetailsInput { 5368 s.MaxResults = &v 5369 return s 5370} 5371 5372// SetNextToken sets the NextToken field's value. 5373func (s *GetSavingsPlansUtilizationDetailsInput) SetNextToken(v string) *GetSavingsPlansUtilizationDetailsInput { 5374 s.NextToken = &v 5375 return s 5376} 5377 5378// SetTimePeriod sets the TimePeriod field's value. 5379func (s *GetSavingsPlansUtilizationDetailsInput) SetTimePeriod(v *DateInterval) *GetSavingsPlansUtilizationDetailsInput { 5380 s.TimePeriod = v 5381 return s 5382} 5383 5384type GetSavingsPlansUtilizationDetailsOutput struct { 5385 _ struct{} `type:"structure"` 5386 5387 // The token to retrieve the next set of results. Amazon Web Services provides 5388 // the token when the response from a previous call has more results than the 5389 // maximum page size. 5390 NextToken *string `type:"string"` 5391 5392 // Retrieves a single daily or monthly Savings Plans utilization rate and details 5393 // for your account. 5394 // 5395 // SavingsPlansUtilizationDetails is a required field 5396 SavingsPlansUtilizationDetails []*SavingsPlansUtilizationDetail `type:"list" required:"true"` 5397 5398 // The time period that you want the usage and costs for. 5399 // 5400 // TimePeriod is a required field 5401 TimePeriod *DateInterval `type:"structure" required:"true"` 5402 5403 // The total Savings Plans utilization, regardless of time period. 5404 Total *SavingsPlansUtilizationAggregates `type:"structure"` 5405} 5406 5407// String returns the string representation 5408func (s GetSavingsPlansUtilizationDetailsOutput) String() string { 5409 return awsutil.Prettify(s) 5410} 5411 5412// GoString returns the string representation 5413func (s GetSavingsPlansUtilizationDetailsOutput) GoString() string { 5414 return s.String() 5415} 5416 5417// SetNextToken sets the NextToken field's value. 5418func (s *GetSavingsPlansUtilizationDetailsOutput) SetNextToken(v string) *GetSavingsPlansUtilizationDetailsOutput { 5419 s.NextToken = &v 5420 return s 5421} 5422 5423// SetSavingsPlansUtilizationDetails sets the SavingsPlansUtilizationDetails field's value. 5424func (s *GetSavingsPlansUtilizationDetailsOutput) SetSavingsPlansUtilizationDetails(v []*SavingsPlansUtilizationDetail) *GetSavingsPlansUtilizationDetailsOutput { 5425 s.SavingsPlansUtilizationDetails = v 5426 return s 5427} 5428 5429// SetTimePeriod sets the TimePeriod field's value. 5430func (s *GetSavingsPlansUtilizationDetailsOutput) SetTimePeriod(v *DateInterval) *GetSavingsPlansUtilizationDetailsOutput { 5431 s.TimePeriod = v 5432 return s 5433} 5434 5435// SetTotal sets the Total field's value. 5436func (s *GetSavingsPlansUtilizationDetailsOutput) SetTotal(v *SavingsPlansUtilizationAggregates) *GetSavingsPlansUtilizationDetailsOutput { 5437 s.Total = v 5438 return s 5439} 5440 5441type GetSavingsPlansUtilizationInput struct { 5442 _ struct{} `type:"structure"` 5443 5444 // Filters Savings Plans utilization coverage data for active Savings Plans 5445 // dimensions. You can filter data with the following dimensions: 5446 // 5447 // * LINKED_ACCOUNT 5448 // 5449 // * SAVINGS_PLAN_ARN 5450 // 5451 // * SAVINGS_PLANS_TYPE 5452 // 5453 // * REGION 5454 // 5455 // * PAYMENT_OPTION 5456 // 5457 // * INSTANCE_TYPE_FAMILY 5458 // 5459 // GetSavingsPlansUtilization uses the same Expression (http://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html) 5460 // object as the other operations, but only AND is supported among each dimension. 5461 Filter *Expression `type:"structure"` 5462 5463 // The granularity of the Amazon Web Services utillization data for your Savings 5464 // Plans. 5465 // 5466 // The GetSavingsPlansUtilization operation supports only DAILY and MONTHLY 5467 // granularities. 5468 Granularity *string `type:"string" enum:"Granularity"` 5469 5470 // The time period that you want the usage and costs for. The Start date must 5471 // be within 13 months. The End date must be after the Start date, and before 5472 // the current date. Future dates can't be used as an End date. 5473 // 5474 // TimePeriod is a required field 5475 TimePeriod *DateInterval `type:"structure" required:"true"` 5476} 5477 5478// String returns the string representation 5479func (s GetSavingsPlansUtilizationInput) String() string { 5480 return awsutil.Prettify(s) 5481} 5482 5483// GoString returns the string representation 5484func (s GetSavingsPlansUtilizationInput) GoString() string { 5485 return s.String() 5486} 5487 5488// Validate inspects the fields of the type to determine if they are valid. 5489func (s *GetSavingsPlansUtilizationInput) Validate() error { 5490 invalidParams := request.ErrInvalidParams{Context: "GetSavingsPlansUtilizationInput"} 5491 if s.TimePeriod == nil { 5492 invalidParams.Add(request.NewErrParamRequired("TimePeriod")) 5493 } 5494 if s.Filter != nil { 5495 if err := s.Filter.Validate(); err != nil { 5496 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 5497 } 5498 } 5499 if s.TimePeriod != nil { 5500 if err := s.TimePeriod.Validate(); err != nil { 5501 invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams)) 5502 } 5503 } 5504 5505 if invalidParams.Len() > 0 { 5506 return invalidParams 5507 } 5508 return nil 5509} 5510 5511// SetFilter sets the Filter field's value. 5512func (s *GetSavingsPlansUtilizationInput) SetFilter(v *Expression) *GetSavingsPlansUtilizationInput { 5513 s.Filter = v 5514 return s 5515} 5516 5517// SetGranularity sets the Granularity field's value. 5518func (s *GetSavingsPlansUtilizationInput) SetGranularity(v string) *GetSavingsPlansUtilizationInput { 5519 s.Granularity = &v 5520 return s 5521} 5522 5523// SetTimePeriod sets the TimePeriod field's value. 5524func (s *GetSavingsPlansUtilizationInput) SetTimePeriod(v *DateInterval) *GetSavingsPlansUtilizationInput { 5525 s.TimePeriod = v 5526 return s 5527} 5528 5529type GetSavingsPlansUtilizationOutput struct { 5530 _ struct{} `type:"structure"` 5531 5532 // The amount of cost/commitment you used your Savings Plans. This allows you 5533 // to specify date ranges. 5534 SavingsPlansUtilizationsByTime []*SavingsPlansUtilizationByTime `type:"list"` 5535 5536 // The total amount of cost/commitment that you used your Savings Plans, regardless 5537 // of date ranges. 5538 // 5539 // Total is a required field 5540 Total *SavingsPlansUtilizationAggregates `type:"structure" required:"true"` 5541} 5542 5543// String returns the string representation 5544func (s GetSavingsPlansUtilizationOutput) String() string { 5545 return awsutil.Prettify(s) 5546} 5547 5548// GoString returns the string representation 5549func (s GetSavingsPlansUtilizationOutput) GoString() string { 5550 return s.String() 5551} 5552 5553// SetSavingsPlansUtilizationsByTime sets the SavingsPlansUtilizationsByTime field's value. 5554func (s *GetSavingsPlansUtilizationOutput) SetSavingsPlansUtilizationsByTime(v []*SavingsPlansUtilizationByTime) *GetSavingsPlansUtilizationOutput { 5555 s.SavingsPlansUtilizationsByTime = v 5556 return s 5557} 5558 5559// SetTotal sets the Total field's value. 5560func (s *GetSavingsPlansUtilizationOutput) SetTotal(v *SavingsPlansUtilizationAggregates) *GetSavingsPlansUtilizationOutput { 5561 s.Total = v 5562 return s 5563} 5564 5565type GetTagsInput struct { 5566 _ struct{} `type:"structure"` 5567 5568 // The token to retrieve the next set of results. AWS provides the token when 5569 // the response from a previous call has more results than the maximum page 5570 // size. 5571 NextPageToken *string `type:"string"` 5572 5573 // The value that you want to search for. 5574 SearchString *string `type:"string"` 5575 5576 // The key of the tag that you want to return values for. 5577 TagKey *string `type:"string"` 5578 5579 // The start and end dates for retrieving the dimension values. The start date 5580 // is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 5581 // and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 5582 // up to and including 2017-04-30 but not including 2017-05-01. 5583 // 5584 // TimePeriod is a required field 5585 TimePeriod *DateInterval `type:"structure" required:"true"` 5586} 5587 5588// String returns the string representation 5589func (s GetTagsInput) String() string { 5590 return awsutil.Prettify(s) 5591} 5592 5593// GoString returns the string representation 5594func (s GetTagsInput) GoString() string { 5595 return s.String() 5596} 5597 5598// Validate inspects the fields of the type to determine if they are valid. 5599func (s *GetTagsInput) Validate() error { 5600 invalidParams := request.ErrInvalidParams{Context: "GetTagsInput"} 5601 if s.TimePeriod == nil { 5602 invalidParams.Add(request.NewErrParamRequired("TimePeriod")) 5603 } 5604 if s.TimePeriod != nil { 5605 if err := s.TimePeriod.Validate(); err != nil { 5606 invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams)) 5607 } 5608 } 5609 5610 if invalidParams.Len() > 0 { 5611 return invalidParams 5612 } 5613 return nil 5614} 5615 5616// SetNextPageToken sets the NextPageToken field's value. 5617func (s *GetTagsInput) SetNextPageToken(v string) *GetTagsInput { 5618 s.NextPageToken = &v 5619 return s 5620} 5621 5622// SetSearchString sets the SearchString field's value. 5623func (s *GetTagsInput) SetSearchString(v string) *GetTagsInput { 5624 s.SearchString = &v 5625 return s 5626} 5627 5628// SetTagKey sets the TagKey field's value. 5629func (s *GetTagsInput) SetTagKey(v string) *GetTagsInput { 5630 s.TagKey = &v 5631 return s 5632} 5633 5634// SetTimePeriod sets the TimePeriod field's value. 5635func (s *GetTagsInput) SetTimePeriod(v *DateInterval) *GetTagsInput { 5636 s.TimePeriod = v 5637 return s 5638} 5639 5640type GetTagsOutput struct { 5641 _ struct{} `type:"structure"` 5642 5643 // The token for the next set of retrievable results. AWS provides the token 5644 // when the response from a previous call has more results than the maximum 5645 // page size. 5646 NextPageToken *string `type:"string"` 5647 5648 // The number of query results that AWS returns at a time. 5649 // 5650 // ReturnSize is a required field 5651 ReturnSize *int64 `type:"integer" required:"true"` 5652 5653 // The tags that match your request. 5654 // 5655 // Tags is a required field 5656 Tags []*string `type:"list" required:"true"` 5657 5658 // The total number of query results. 5659 // 5660 // TotalSize is a required field 5661 TotalSize *int64 `type:"integer" required:"true"` 5662} 5663 5664// String returns the string representation 5665func (s GetTagsOutput) String() string { 5666 return awsutil.Prettify(s) 5667} 5668 5669// GoString returns the string representation 5670func (s GetTagsOutput) GoString() string { 5671 return s.String() 5672} 5673 5674// SetNextPageToken sets the NextPageToken field's value. 5675func (s *GetTagsOutput) SetNextPageToken(v string) *GetTagsOutput { 5676 s.NextPageToken = &v 5677 return s 5678} 5679 5680// SetReturnSize sets the ReturnSize field's value. 5681func (s *GetTagsOutput) SetReturnSize(v int64) *GetTagsOutput { 5682 s.ReturnSize = &v 5683 return s 5684} 5685 5686// SetTags sets the Tags field's value. 5687func (s *GetTagsOutput) SetTags(v []*string) *GetTagsOutput { 5688 s.Tags = v 5689 return s 5690} 5691 5692// SetTotalSize sets the TotalSize field's value. 5693func (s *GetTagsOutput) SetTotalSize(v int64) *GetTagsOutput { 5694 s.TotalSize = &v 5695 return s 5696} 5697 5698type GetUsageForecastInput struct { 5699 _ struct{} `type:"structure"` 5700 5701 // The filters that you want to use to filter your forecast. Cost Explorer API 5702 // supports all of the Cost Explorer filters. 5703 Filter *Expression `type:"structure"` 5704 5705 // How granular you want the forecast to be. You can get 3 months of DAILY forecasts 5706 // or 12 months of MONTHLY forecasts. 5707 // 5708 // The GetUsageForecast operation supports only DAILY and MONTHLY granularities. 5709 // 5710 // Granularity is a required field 5711 Granularity *string `type:"string" required:"true" enum:"Granularity"` 5712 5713 // Which metric Cost Explorer uses to create your forecast. 5714 // 5715 // Valid values for a GetUsageForecast call are the following: 5716 // 5717 // * USAGE_QUANTITY 5718 // 5719 // * NORMALIZED_USAGE_AMOUNT 5720 // 5721 // Metric is a required field 5722 Metric *string `type:"string" required:"true" enum:"Metric"` 5723 5724 // Cost Explorer always returns the mean forecast as a single point. You can 5725 // request a prediction interval around the mean by specifying a confidence 5726 // level. The higher the confidence level, the more confident Cost Explorer 5727 // is about the actual value falling in the prediction interval. Higher confidence 5728 // levels result in wider prediction intervals. 5729 PredictionIntervalLevel *int64 `min:"51" type:"integer"` 5730 5731 // The start and end dates of the period that you want to retrieve usage forecast 5732 // for. The start date is inclusive, but the end date is exclusive. For example, 5733 // if start is 2017-01-01 and end is 2017-05-01, then the cost and usage data 5734 // is retrieved from 2017-01-01 up to and including 2017-04-30 but not including 5735 // 2017-05-01. 5736 // 5737 // TimePeriod is a required field 5738 TimePeriod *DateInterval `type:"structure" required:"true"` 5739} 5740 5741// String returns the string representation 5742func (s GetUsageForecastInput) String() string { 5743 return awsutil.Prettify(s) 5744} 5745 5746// GoString returns the string representation 5747func (s GetUsageForecastInput) GoString() string { 5748 return s.String() 5749} 5750 5751// Validate inspects the fields of the type to determine if they are valid. 5752func (s *GetUsageForecastInput) Validate() error { 5753 invalidParams := request.ErrInvalidParams{Context: "GetUsageForecastInput"} 5754 if s.Granularity == nil { 5755 invalidParams.Add(request.NewErrParamRequired("Granularity")) 5756 } 5757 if s.Metric == nil { 5758 invalidParams.Add(request.NewErrParamRequired("Metric")) 5759 } 5760 if s.PredictionIntervalLevel != nil && *s.PredictionIntervalLevel < 51 { 5761 invalidParams.Add(request.NewErrParamMinValue("PredictionIntervalLevel", 51)) 5762 } 5763 if s.TimePeriod == nil { 5764 invalidParams.Add(request.NewErrParamRequired("TimePeriod")) 5765 } 5766 if s.Filter != nil { 5767 if err := s.Filter.Validate(); err != nil { 5768 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 5769 } 5770 } 5771 if s.TimePeriod != nil { 5772 if err := s.TimePeriod.Validate(); err != nil { 5773 invalidParams.AddNested("TimePeriod", err.(request.ErrInvalidParams)) 5774 } 5775 } 5776 5777 if invalidParams.Len() > 0 { 5778 return invalidParams 5779 } 5780 return nil 5781} 5782 5783// SetFilter sets the Filter field's value. 5784func (s *GetUsageForecastInput) SetFilter(v *Expression) *GetUsageForecastInput { 5785 s.Filter = v 5786 return s 5787} 5788 5789// SetGranularity sets the Granularity field's value. 5790func (s *GetUsageForecastInput) SetGranularity(v string) *GetUsageForecastInput { 5791 s.Granularity = &v 5792 return s 5793} 5794 5795// SetMetric sets the Metric field's value. 5796func (s *GetUsageForecastInput) SetMetric(v string) *GetUsageForecastInput { 5797 s.Metric = &v 5798 return s 5799} 5800 5801// SetPredictionIntervalLevel sets the PredictionIntervalLevel field's value. 5802func (s *GetUsageForecastInput) SetPredictionIntervalLevel(v int64) *GetUsageForecastInput { 5803 s.PredictionIntervalLevel = &v 5804 return s 5805} 5806 5807// SetTimePeriod sets the TimePeriod field's value. 5808func (s *GetUsageForecastInput) SetTimePeriod(v *DateInterval) *GetUsageForecastInput { 5809 s.TimePeriod = v 5810 return s 5811} 5812 5813type GetUsageForecastOutput struct { 5814 _ struct{} `type:"structure"` 5815 5816 // The forecasts for your query, in order. For DAILY forecasts, this is a list 5817 // of days. For MONTHLY forecasts, this is a list of months. 5818 ForecastResultsByTime []*ForecastResult `type:"list"` 5819 5820 // How much you're forecasted to use over the forecast period. 5821 Total *MetricValue `type:"structure"` 5822} 5823 5824// String returns the string representation 5825func (s GetUsageForecastOutput) String() string { 5826 return awsutil.Prettify(s) 5827} 5828 5829// GoString returns the string representation 5830func (s GetUsageForecastOutput) GoString() string { 5831 return s.String() 5832} 5833 5834// SetForecastResultsByTime sets the ForecastResultsByTime field's value. 5835func (s *GetUsageForecastOutput) SetForecastResultsByTime(v []*ForecastResult) *GetUsageForecastOutput { 5836 s.ForecastResultsByTime = v 5837 return s 5838} 5839 5840// SetTotal sets the Total field's value. 5841func (s *GetUsageForecastOutput) SetTotal(v *MetricValue) *GetUsageForecastOutput { 5842 s.Total = v 5843 return s 5844} 5845 5846// One level of grouped data in the results. 5847type Group struct { 5848 _ struct{} `type:"structure"` 5849 5850 // The keys that are included in this group. 5851 Keys []*string `type:"list"` 5852 5853 // The metrics that are included in this group. 5854 Metrics map[string]*MetricValue `type:"map"` 5855} 5856 5857// String returns the string representation 5858func (s Group) String() string { 5859 return awsutil.Prettify(s) 5860} 5861 5862// GoString returns the string representation 5863func (s Group) GoString() string { 5864 return s.String() 5865} 5866 5867// SetKeys sets the Keys field's value. 5868func (s *Group) SetKeys(v []*string) *Group { 5869 s.Keys = v 5870 return s 5871} 5872 5873// SetMetrics sets the Metrics field's value. 5874func (s *Group) SetMetrics(v map[string]*MetricValue) *Group { 5875 s.Metrics = v 5876 return s 5877} 5878 5879// Represents a group when you specify a group by criteria or in the response 5880// to a query with a specific grouping. 5881type GroupDefinition struct { 5882 _ struct{} `type:"structure"` 5883 5884 // The string that represents a key for a specified group. 5885 Key *string `type:"string"` 5886 5887 // The string that represents the type of group. 5888 Type *string `type:"string" enum:"GroupDefinitionType"` 5889} 5890 5891// String returns the string representation 5892func (s GroupDefinition) String() string { 5893 return awsutil.Prettify(s) 5894} 5895 5896// GoString returns the string representation 5897func (s GroupDefinition) GoString() string { 5898 return s.String() 5899} 5900 5901// SetKey sets the Key field's value. 5902func (s *GroupDefinition) SetKey(v string) *GroupDefinition { 5903 s.Key = &v 5904 return s 5905} 5906 5907// SetType sets the Type field's value. 5908func (s *GroupDefinition) SetType(v string) *GroupDefinition { 5909 s.Type = &v 5910 return s 5911} 5912 5913// Details about the instances that AWS recommends that you purchase. 5914type InstanceDetails struct { 5915 _ struct{} `type:"structure"` 5916 5917 // The Amazon EC2 instances that AWS recommends that you purchase. 5918 EC2InstanceDetails *EC2InstanceDetails `type:"structure"` 5919 5920 // The Amazon ES instances that AWS recommends that you purchase. 5921 ESInstanceDetails *ESInstanceDetails `type:"structure"` 5922 5923 // The ElastiCache instances that AWS recommends that you purchase. 5924 ElastiCacheInstanceDetails *ElastiCacheInstanceDetails `type:"structure"` 5925 5926 // The Amazon RDS instances that AWS recommends that you purchase. 5927 RDSInstanceDetails *RDSInstanceDetails `type:"structure"` 5928 5929 // The Amazon Redshift instances that AWS recommends that you purchase. 5930 RedshiftInstanceDetails *RedshiftInstanceDetails `type:"structure"` 5931} 5932 5933// String returns the string representation 5934func (s InstanceDetails) String() string { 5935 return awsutil.Prettify(s) 5936} 5937 5938// GoString returns the string representation 5939func (s InstanceDetails) GoString() string { 5940 return s.String() 5941} 5942 5943// SetEC2InstanceDetails sets the EC2InstanceDetails field's value. 5944func (s *InstanceDetails) SetEC2InstanceDetails(v *EC2InstanceDetails) *InstanceDetails { 5945 s.EC2InstanceDetails = v 5946 return s 5947} 5948 5949// SetESInstanceDetails sets the ESInstanceDetails field's value. 5950func (s *InstanceDetails) SetESInstanceDetails(v *ESInstanceDetails) *InstanceDetails { 5951 s.ESInstanceDetails = v 5952 return s 5953} 5954 5955// SetElastiCacheInstanceDetails sets the ElastiCacheInstanceDetails field's value. 5956func (s *InstanceDetails) SetElastiCacheInstanceDetails(v *ElastiCacheInstanceDetails) *InstanceDetails { 5957 s.ElastiCacheInstanceDetails = v 5958 return s 5959} 5960 5961// SetRDSInstanceDetails sets the RDSInstanceDetails field's value. 5962func (s *InstanceDetails) SetRDSInstanceDetails(v *RDSInstanceDetails) *InstanceDetails { 5963 s.RDSInstanceDetails = v 5964 return s 5965} 5966 5967// SetRedshiftInstanceDetails sets the RedshiftInstanceDetails field's value. 5968func (s *InstanceDetails) SetRedshiftInstanceDetails(v *RedshiftInstanceDetails) *InstanceDetails { 5969 s.RedshiftInstanceDetails = v 5970 return s 5971} 5972 5973type ListCostCategoryDefinitionsInput struct { 5974 _ struct{} `type:"structure"` 5975 5976 // The date when the Cost Category was effective. 5977 EffectiveOn *string `min:"20" type:"string"` 5978 5979 // The token to retrieve the next set of results. Amazon Web Services provides 5980 // the token when the response from a previous call has more results than the 5981 // maximum page size. 5982 // 5983 // You can use this information to retrieve the full Cost Category information 5984 // using DescribeCostCategory. 5985 NextToken *string `type:"string"` 5986} 5987 5988// String returns the string representation 5989func (s ListCostCategoryDefinitionsInput) String() string { 5990 return awsutil.Prettify(s) 5991} 5992 5993// GoString returns the string representation 5994func (s ListCostCategoryDefinitionsInput) GoString() string { 5995 return s.String() 5996} 5997 5998// Validate inspects the fields of the type to determine if they are valid. 5999func (s *ListCostCategoryDefinitionsInput) Validate() error { 6000 invalidParams := request.ErrInvalidParams{Context: "ListCostCategoryDefinitionsInput"} 6001 if s.EffectiveOn != nil && len(*s.EffectiveOn) < 20 { 6002 invalidParams.Add(request.NewErrParamMinLen("EffectiveOn", 20)) 6003 } 6004 6005 if invalidParams.Len() > 0 { 6006 return invalidParams 6007 } 6008 return nil 6009} 6010 6011// SetEffectiveOn sets the EffectiveOn field's value. 6012func (s *ListCostCategoryDefinitionsInput) SetEffectiveOn(v string) *ListCostCategoryDefinitionsInput { 6013 s.EffectiveOn = &v 6014 return s 6015} 6016 6017// SetNextToken sets the NextToken field's value. 6018func (s *ListCostCategoryDefinitionsInput) SetNextToken(v string) *ListCostCategoryDefinitionsInput { 6019 s.NextToken = &v 6020 return s 6021} 6022 6023type ListCostCategoryDefinitionsOutput struct { 6024 _ struct{} `type:"structure"` 6025 6026 // A reference to a Cost Category containing enough information to identify 6027 // the Cost Category. 6028 CostCategoryReferences []*CostCategoryReference `type:"list"` 6029 6030 // The token to retrieve the next set of results. Amazon Web Services provides 6031 // the token when the response from a previous call has more results than the 6032 // maximum page size. 6033 NextToken *string `type:"string"` 6034} 6035 6036// String returns the string representation 6037func (s ListCostCategoryDefinitionsOutput) String() string { 6038 return awsutil.Prettify(s) 6039} 6040 6041// GoString returns the string representation 6042func (s ListCostCategoryDefinitionsOutput) GoString() string { 6043 return s.String() 6044} 6045 6046// SetCostCategoryReferences sets the CostCategoryReferences field's value. 6047func (s *ListCostCategoryDefinitionsOutput) SetCostCategoryReferences(v []*CostCategoryReference) *ListCostCategoryDefinitionsOutput { 6048 s.CostCategoryReferences = v 6049 return s 6050} 6051 6052// SetNextToken sets the NextToken field's value. 6053func (s *ListCostCategoryDefinitionsOutput) SetNextToken(v string) *ListCostCategoryDefinitionsOutput { 6054 s.NextToken = &v 6055 return s 6056} 6057 6058// The aggregated value for a metric. 6059type MetricValue struct { 6060 _ struct{} `type:"structure"` 6061 6062 // The actual number that represents the metric. 6063 Amount *string `type:"string"` 6064 6065 // The unit that the metric is given in. 6066 Unit *string `type:"string"` 6067} 6068 6069// String returns the string representation 6070func (s MetricValue) String() string { 6071 return awsutil.Prettify(s) 6072} 6073 6074// GoString returns the string representation 6075func (s MetricValue) GoString() string { 6076 return s.String() 6077} 6078 6079// SetAmount sets the Amount field's value. 6080func (s *MetricValue) SetAmount(v string) *MetricValue { 6081 s.Amount = &v 6082 return s 6083} 6084 6085// SetUnit sets the Unit field's value. 6086func (s *MetricValue) SetUnit(v string) *MetricValue { 6087 s.Unit = &v 6088 return s 6089} 6090 6091// Details on the modification recommendation. 6092type ModifyRecommendationDetail struct { 6093 _ struct{} `type:"structure"` 6094 6095 // Identifies whether this instance type is the Amazon Web Services default 6096 // recommendation. 6097 TargetInstances []*TargetInstance `type:"list"` 6098} 6099 6100// String returns the string representation 6101func (s ModifyRecommendationDetail) String() string { 6102 return awsutil.Prettify(s) 6103} 6104 6105// GoString returns the string representation 6106func (s ModifyRecommendationDetail) GoString() string { 6107 return s.String() 6108} 6109 6110// SetTargetInstances sets the TargetInstances field's value. 6111func (s *ModifyRecommendationDetail) SetTargetInstances(v []*TargetInstance) *ModifyRecommendationDetail { 6112 s.TargetInstances = v 6113 return s 6114} 6115 6116// Details about the Amazon RDS instances that AWS recommends that you purchase. 6117type RDSInstanceDetails struct { 6118 _ struct{} `type:"structure"` 6119 6120 // Whether the recommendation is for a current-generation instance. 6121 CurrentGeneration *bool `type:"boolean"` 6122 6123 // The database edition that the recommended reservation supports. 6124 DatabaseEdition *string `type:"string"` 6125 6126 // The database engine that the recommended reservation supports. 6127 DatabaseEngine *string `type:"string"` 6128 6129 // Whether the recommendation is for a reservation in a single Availability 6130 // Zone or a reservation with a backup in a second Availability Zone. 6131 DeploymentOption *string `type:"string"` 6132 6133 // The instance family of the recommended reservation. 6134 Family *string `type:"string"` 6135 6136 // The type of instance that AWS recommends. 6137 InstanceType *string `type:"string"` 6138 6139 // The license model that the recommended reservation supports. 6140 LicenseModel *string `type:"string"` 6141 6142 // The AWS Region of the recommended reservation. 6143 Region *string `type:"string"` 6144 6145 // Whether the recommended reservation is size flexible. 6146 SizeFlexEligible *bool `type:"boolean"` 6147} 6148 6149// String returns the string representation 6150func (s RDSInstanceDetails) String() string { 6151 return awsutil.Prettify(s) 6152} 6153 6154// GoString returns the string representation 6155func (s RDSInstanceDetails) GoString() string { 6156 return s.String() 6157} 6158 6159// SetCurrentGeneration sets the CurrentGeneration field's value. 6160func (s *RDSInstanceDetails) SetCurrentGeneration(v bool) *RDSInstanceDetails { 6161 s.CurrentGeneration = &v 6162 return s 6163} 6164 6165// SetDatabaseEdition sets the DatabaseEdition field's value. 6166func (s *RDSInstanceDetails) SetDatabaseEdition(v string) *RDSInstanceDetails { 6167 s.DatabaseEdition = &v 6168 return s 6169} 6170 6171// SetDatabaseEngine sets the DatabaseEngine field's value. 6172func (s *RDSInstanceDetails) SetDatabaseEngine(v string) *RDSInstanceDetails { 6173 s.DatabaseEngine = &v 6174 return s 6175} 6176 6177// SetDeploymentOption sets the DeploymentOption field's value. 6178func (s *RDSInstanceDetails) SetDeploymentOption(v string) *RDSInstanceDetails { 6179 s.DeploymentOption = &v 6180 return s 6181} 6182 6183// SetFamily sets the Family field's value. 6184func (s *RDSInstanceDetails) SetFamily(v string) *RDSInstanceDetails { 6185 s.Family = &v 6186 return s 6187} 6188 6189// SetInstanceType sets the InstanceType field's value. 6190func (s *RDSInstanceDetails) SetInstanceType(v string) *RDSInstanceDetails { 6191 s.InstanceType = &v 6192 return s 6193} 6194 6195// SetLicenseModel sets the LicenseModel field's value. 6196func (s *RDSInstanceDetails) SetLicenseModel(v string) *RDSInstanceDetails { 6197 s.LicenseModel = &v 6198 return s 6199} 6200 6201// SetRegion sets the Region field's value. 6202func (s *RDSInstanceDetails) SetRegion(v string) *RDSInstanceDetails { 6203 s.Region = &v 6204 return s 6205} 6206 6207// SetSizeFlexEligible sets the SizeFlexEligible field's value. 6208func (s *RDSInstanceDetails) SetSizeFlexEligible(v bool) *RDSInstanceDetails { 6209 s.SizeFlexEligible = &v 6210 return s 6211} 6212 6213// Details about the Amazon Redshift instances that AWS recommends that you 6214// purchase. 6215type RedshiftInstanceDetails struct { 6216 _ struct{} `type:"structure"` 6217 6218 // Whether the recommendation is for a current-generation instance. 6219 CurrentGeneration *bool `type:"boolean"` 6220 6221 // The instance family of the recommended reservation. 6222 Family *string `type:"string"` 6223 6224 // The type of node that AWS recommends. 6225 NodeType *string `type:"string"` 6226 6227 // The AWS Region of the recommended reservation. 6228 Region *string `type:"string"` 6229 6230 // Whether the recommended reservation is size flexible. 6231 SizeFlexEligible *bool `type:"boolean"` 6232} 6233 6234// String returns the string representation 6235func (s RedshiftInstanceDetails) String() string { 6236 return awsutil.Prettify(s) 6237} 6238 6239// GoString returns the string representation 6240func (s RedshiftInstanceDetails) GoString() string { 6241 return s.String() 6242} 6243 6244// SetCurrentGeneration sets the CurrentGeneration field's value. 6245func (s *RedshiftInstanceDetails) SetCurrentGeneration(v bool) *RedshiftInstanceDetails { 6246 s.CurrentGeneration = &v 6247 return s 6248} 6249 6250// SetFamily sets the Family field's value. 6251func (s *RedshiftInstanceDetails) SetFamily(v string) *RedshiftInstanceDetails { 6252 s.Family = &v 6253 return s 6254} 6255 6256// SetNodeType sets the NodeType field's value. 6257func (s *RedshiftInstanceDetails) SetNodeType(v string) *RedshiftInstanceDetails { 6258 s.NodeType = &v 6259 return s 6260} 6261 6262// SetRegion sets the Region field's value. 6263func (s *RedshiftInstanceDetails) SetRegion(v string) *RedshiftInstanceDetails { 6264 s.Region = &v 6265 return s 6266} 6267 6268// SetSizeFlexEligible sets the SizeFlexEligible field's value. 6269func (s *RedshiftInstanceDetails) SetSizeFlexEligible(v bool) *RedshiftInstanceDetails { 6270 s.SizeFlexEligible = &v 6271 return s 6272} 6273 6274// The aggregated numbers for your reservation usage. 6275type ReservationAggregates struct { 6276 _ struct{} `type:"structure"` 6277 6278 // The monthly cost of your reservation, amortized over the reservation period. 6279 AmortizedRecurringFee *string `type:"string"` 6280 6281 // The upfront cost of your reservation, amortized over the reservation period. 6282 AmortizedUpfrontFee *string `type:"string"` 6283 6284 // How much you saved due to purchasing and utilizing reservation. AWS calculates 6285 // this by subtracting TotalAmortizedFee from OnDemandCostOfRIHoursUsed. 6286 NetRISavings *string `type:"string"` 6287 6288 // How much your reservation would cost if charged On-Demand rates. 6289 OnDemandCostOfRIHoursUsed *string `type:"string"` 6290 6291 // How many reservation hours that you purchased. 6292 PurchasedHours *string `type:"string"` 6293 6294 // How many Amazon EC2 reservation hours that you purchased, converted to normalized 6295 // units. Normalized units are available only for Amazon EC2 usage after November 6296 // 11, 2017. 6297 PurchasedUnits *string `type:"string"` 6298 6299 // The total number of reservation hours that you used. 6300 TotalActualHours *string `type:"string"` 6301 6302 // The total number of Amazon EC2 reservation hours that you used, converted 6303 // to normalized units. Normalized units are available only for Amazon EC2 usage 6304 // after November 11, 2017. 6305 TotalActualUnits *string `type:"string"` 6306 6307 // The total cost of your reservation, amortized over the reservation period. 6308 TotalAmortizedFee *string `type:"string"` 6309 6310 // How much you could save if you use your entire reservation. 6311 TotalPotentialRISavings *string `type:"string"` 6312 6313 // The number of reservation hours that you didn't use. 6314 UnusedHours *string `type:"string"` 6315 6316 // The number of Amazon EC2 reservation hours that you didn't use, converted 6317 // to normalized units. Normalized units are available only for Amazon EC2 usage 6318 // after November 11, 2017. 6319 UnusedUnits *string `type:"string"` 6320 6321 // The percentage of reservation time that you used. 6322 UtilizationPercentage *string `type:"string"` 6323 6324 // The percentage of Amazon EC2 reservation time that you used, converted to 6325 // normalized units. Normalized units are available only for Amazon EC2 usage 6326 // after November 11, 2017. 6327 UtilizationPercentageInUnits *string `type:"string"` 6328} 6329 6330// String returns the string representation 6331func (s ReservationAggregates) String() string { 6332 return awsutil.Prettify(s) 6333} 6334 6335// GoString returns the string representation 6336func (s ReservationAggregates) GoString() string { 6337 return s.String() 6338} 6339 6340// SetAmortizedRecurringFee sets the AmortizedRecurringFee field's value. 6341func (s *ReservationAggregates) SetAmortizedRecurringFee(v string) *ReservationAggregates { 6342 s.AmortizedRecurringFee = &v 6343 return s 6344} 6345 6346// SetAmortizedUpfrontFee sets the AmortizedUpfrontFee field's value. 6347func (s *ReservationAggregates) SetAmortizedUpfrontFee(v string) *ReservationAggregates { 6348 s.AmortizedUpfrontFee = &v 6349 return s 6350} 6351 6352// SetNetRISavings sets the NetRISavings field's value. 6353func (s *ReservationAggregates) SetNetRISavings(v string) *ReservationAggregates { 6354 s.NetRISavings = &v 6355 return s 6356} 6357 6358// SetOnDemandCostOfRIHoursUsed sets the OnDemandCostOfRIHoursUsed field's value. 6359func (s *ReservationAggregates) SetOnDemandCostOfRIHoursUsed(v string) *ReservationAggregates { 6360 s.OnDemandCostOfRIHoursUsed = &v 6361 return s 6362} 6363 6364// SetPurchasedHours sets the PurchasedHours field's value. 6365func (s *ReservationAggregates) SetPurchasedHours(v string) *ReservationAggregates { 6366 s.PurchasedHours = &v 6367 return s 6368} 6369 6370// SetPurchasedUnits sets the PurchasedUnits field's value. 6371func (s *ReservationAggregates) SetPurchasedUnits(v string) *ReservationAggregates { 6372 s.PurchasedUnits = &v 6373 return s 6374} 6375 6376// SetTotalActualHours sets the TotalActualHours field's value. 6377func (s *ReservationAggregates) SetTotalActualHours(v string) *ReservationAggregates { 6378 s.TotalActualHours = &v 6379 return s 6380} 6381 6382// SetTotalActualUnits sets the TotalActualUnits field's value. 6383func (s *ReservationAggregates) SetTotalActualUnits(v string) *ReservationAggregates { 6384 s.TotalActualUnits = &v 6385 return s 6386} 6387 6388// SetTotalAmortizedFee sets the TotalAmortizedFee field's value. 6389func (s *ReservationAggregates) SetTotalAmortizedFee(v string) *ReservationAggregates { 6390 s.TotalAmortizedFee = &v 6391 return s 6392} 6393 6394// SetTotalPotentialRISavings sets the TotalPotentialRISavings field's value. 6395func (s *ReservationAggregates) SetTotalPotentialRISavings(v string) *ReservationAggregates { 6396 s.TotalPotentialRISavings = &v 6397 return s 6398} 6399 6400// SetUnusedHours sets the UnusedHours field's value. 6401func (s *ReservationAggregates) SetUnusedHours(v string) *ReservationAggregates { 6402 s.UnusedHours = &v 6403 return s 6404} 6405 6406// SetUnusedUnits sets the UnusedUnits field's value. 6407func (s *ReservationAggregates) SetUnusedUnits(v string) *ReservationAggregates { 6408 s.UnusedUnits = &v 6409 return s 6410} 6411 6412// SetUtilizationPercentage sets the UtilizationPercentage field's value. 6413func (s *ReservationAggregates) SetUtilizationPercentage(v string) *ReservationAggregates { 6414 s.UtilizationPercentage = &v 6415 return s 6416} 6417 6418// SetUtilizationPercentageInUnits sets the UtilizationPercentageInUnits field's value. 6419func (s *ReservationAggregates) SetUtilizationPercentageInUnits(v string) *ReservationAggregates { 6420 s.UtilizationPercentageInUnits = &v 6421 return s 6422} 6423 6424// A group of reservations that share a set of attributes. 6425type ReservationCoverageGroup struct { 6426 _ struct{} `type:"structure"` 6427 6428 // The attributes for this group of reservations. 6429 Attributes map[string]*string `type:"map"` 6430 6431 // How much instance usage this group of reservations covered. 6432 Coverage *Coverage `type:"structure"` 6433} 6434 6435// String returns the string representation 6436func (s ReservationCoverageGroup) String() string { 6437 return awsutil.Prettify(s) 6438} 6439 6440// GoString returns the string representation 6441func (s ReservationCoverageGroup) GoString() string { 6442 return s.String() 6443} 6444 6445// SetAttributes sets the Attributes field's value. 6446func (s *ReservationCoverageGroup) SetAttributes(v map[string]*string) *ReservationCoverageGroup { 6447 s.Attributes = v 6448 return s 6449} 6450 6451// SetCoverage sets the Coverage field's value. 6452func (s *ReservationCoverageGroup) SetCoverage(v *Coverage) *ReservationCoverageGroup { 6453 s.Coverage = v 6454 return s 6455} 6456 6457// A specific reservation that AWS recommends for purchase. 6458type ReservationPurchaseRecommendation struct { 6459 _ struct{} `type:"structure"` 6460 6461 // The account scope that AWS recommends that you purchase this instance for. 6462 // For example, you can purchase this reservation for an entire organization 6463 // in AWS Organizations. 6464 AccountScope *string `type:"string" enum:"AccountScope"` 6465 6466 // How many days of previous usage that AWS considers when making this recommendation. 6467 LookbackPeriodInDays *string `type:"string" enum:"LookbackPeriodInDays"` 6468 6469 // The payment option for the reservation. For example, AllUpfront or NoUpfront. 6470 PaymentOption *string `type:"string" enum:"PaymentOption"` 6471 6472 // Details about the recommended purchases. 6473 RecommendationDetails []*ReservationPurchaseRecommendationDetail `type:"list"` 6474 6475 // A summary about the recommended purchase. 6476 RecommendationSummary *ReservationPurchaseRecommendationSummary `type:"structure"` 6477 6478 // Hardware specifications for the service that you want recommendations for. 6479 ServiceSpecification *ServiceSpecification `type:"structure"` 6480 6481 // The term of the reservation that you want recommendations for, in years. 6482 TermInYears *string `type:"string" enum:"TermInYears"` 6483} 6484 6485// String returns the string representation 6486func (s ReservationPurchaseRecommendation) String() string { 6487 return awsutil.Prettify(s) 6488} 6489 6490// GoString returns the string representation 6491func (s ReservationPurchaseRecommendation) GoString() string { 6492 return s.String() 6493} 6494 6495// SetAccountScope sets the AccountScope field's value. 6496func (s *ReservationPurchaseRecommendation) SetAccountScope(v string) *ReservationPurchaseRecommendation { 6497 s.AccountScope = &v 6498 return s 6499} 6500 6501// SetLookbackPeriodInDays sets the LookbackPeriodInDays field's value. 6502func (s *ReservationPurchaseRecommendation) SetLookbackPeriodInDays(v string) *ReservationPurchaseRecommendation { 6503 s.LookbackPeriodInDays = &v 6504 return s 6505} 6506 6507// SetPaymentOption sets the PaymentOption field's value. 6508func (s *ReservationPurchaseRecommendation) SetPaymentOption(v string) *ReservationPurchaseRecommendation { 6509 s.PaymentOption = &v 6510 return s 6511} 6512 6513// SetRecommendationDetails sets the RecommendationDetails field's value. 6514func (s *ReservationPurchaseRecommendation) SetRecommendationDetails(v []*ReservationPurchaseRecommendationDetail) *ReservationPurchaseRecommendation { 6515 s.RecommendationDetails = v 6516 return s 6517} 6518 6519// SetRecommendationSummary sets the RecommendationSummary field's value. 6520func (s *ReservationPurchaseRecommendation) SetRecommendationSummary(v *ReservationPurchaseRecommendationSummary) *ReservationPurchaseRecommendation { 6521 s.RecommendationSummary = v 6522 return s 6523} 6524 6525// SetServiceSpecification sets the ServiceSpecification field's value. 6526func (s *ReservationPurchaseRecommendation) SetServiceSpecification(v *ServiceSpecification) *ReservationPurchaseRecommendation { 6527 s.ServiceSpecification = v 6528 return s 6529} 6530 6531// SetTermInYears sets the TermInYears field's value. 6532func (s *ReservationPurchaseRecommendation) SetTermInYears(v string) *ReservationPurchaseRecommendation { 6533 s.TermInYears = &v 6534 return s 6535} 6536 6537// Details about your recommended reservation purchase. 6538type ReservationPurchaseRecommendationDetail struct { 6539 _ struct{} `type:"structure"` 6540 6541 // The account that this RI recommendation is for. 6542 AccountId *string `type:"string"` 6543 6544 // The average number of normalized units that you used in an hour during the 6545 // historical period. AWS uses this to calculate your recommended reservation 6546 // purchases. 6547 AverageNormalizedUnitsUsedPerHour *string `type:"string"` 6548 6549 // The average number of instances that you used in an hour during the historical 6550 // period. AWS uses this to calculate your recommended reservation purchases. 6551 AverageNumberOfInstancesUsedPerHour *string `type:"string"` 6552 6553 // The average utilization of your instances. AWS uses this to calculate your 6554 // recommended reservation purchases. 6555 AverageUtilization *string `type:"string"` 6556 6557 // The currency code that AWS used to calculate the costs for this instance. 6558 CurrencyCode *string `type:"string"` 6559 6560 // How long AWS estimates that it takes for this instance to start saving you 6561 // money, in months. 6562 EstimatedBreakEvenInMonths *string `type:"string"` 6563 6564 // How much AWS estimates that you spend on On-Demand Instances in a month. 6565 EstimatedMonthlyOnDemandCost *string `type:"string"` 6566 6567 // How much AWS estimates that this specific recommendation could save you in 6568 // a month. 6569 EstimatedMonthlySavingsAmount *string `type:"string"` 6570 6571 // How much AWS estimates that this specific recommendation could save you in 6572 // a month, as a percentage of your overall costs. 6573 EstimatedMonthlySavingsPercentage *string `type:"string"` 6574 6575 // How much AWS estimates that you would have spent for all usage during the 6576 // specified historical period if you had a reservation. 6577 EstimatedReservationCostForLookbackPeriod *string `type:"string"` 6578 6579 // Details about the instances that AWS recommends that you purchase. 6580 InstanceDetails *InstanceDetails `type:"structure"` 6581 6582 // The maximum number of normalized units that you used in an hour during the 6583 // historical period. AWS uses this to calculate your recommended reservation 6584 // purchases. 6585 MaximumNormalizedUnitsUsedPerHour *string `type:"string"` 6586 6587 // The maximum number of instances that you used in an hour during the historical 6588 // period. AWS uses this to calculate your recommended reservation purchases. 6589 MaximumNumberOfInstancesUsedPerHour *string `type:"string"` 6590 6591 // The minimum number of normalized units that you used in an hour during the 6592 // historical period. AWS uses this to calculate your recommended reservation 6593 // purchases. 6594 MinimumNormalizedUnitsUsedPerHour *string `type:"string"` 6595 6596 // The minimum number of instances that you used in an hour during the historical 6597 // period. AWS uses this to calculate your recommended reservation purchases. 6598 MinimumNumberOfInstancesUsedPerHour *string `type:"string"` 6599 6600 // The number of normalized units that AWS recommends that you purchase. 6601 RecommendedNormalizedUnitsToPurchase *string `type:"string"` 6602 6603 // The number of instances that AWS recommends that you purchase. 6604 RecommendedNumberOfInstancesToPurchase *string `type:"string"` 6605 6606 // How much purchasing this instance costs you on a monthly basis. 6607 RecurringStandardMonthlyCost *string `type:"string"` 6608 6609 // How much purchasing this instance costs you upfront. 6610 UpfrontCost *string `type:"string"` 6611} 6612 6613// String returns the string representation 6614func (s ReservationPurchaseRecommendationDetail) String() string { 6615 return awsutil.Prettify(s) 6616} 6617 6618// GoString returns the string representation 6619func (s ReservationPurchaseRecommendationDetail) GoString() string { 6620 return s.String() 6621} 6622 6623// SetAccountId sets the AccountId field's value. 6624func (s *ReservationPurchaseRecommendationDetail) SetAccountId(v string) *ReservationPurchaseRecommendationDetail { 6625 s.AccountId = &v 6626 return s 6627} 6628 6629// SetAverageNormalizedUnitsUsedPerHour sets the AverageNormalizedUnitsUsedPerHour field's value. 6630func (s *ReservationPurchaseRecommendationDetail) SetAverageNormalizedUnitsUsedPerHour(v string) *ReservationPurchaseRecommendationDetail { 6631 s.AverageNormalizedUnitsUsedPerHour = &v 6632 return s 6633} 6634 6635// SetAverageNumberOfInstancesUsedPerHour sets the AverageNumberOfInstancesUsedPerHour field's value. 6636func (s *ReservationPurchaseRecommendationDetail) SetAverageNumberOfInstancesUsedPerHour(v string) *ReservationPurchaseRecommendationDetail { 6637 s.AverageNumberOfInstancesUsedPerHour = &v 6638 return s 6639} 6640 6641// SetAverageUtilization sets the AverageUtilization field's value. 6642func (s *ReservationPurchaseRecommendationDetail) SetAverageUtilization(v string) *ReservationPurchaseRecommendationDetail { 6643 s.AverageUtilization = &v 6644 return s 6645} 6646 6647// SetCurrencyCode sets the CurrencyCode field's value. 6648func (s *ReservationPurchaseRecommendationDetail) SetCurrencyCode(v string) *ReservationPurchaseRecommendationDetail { 6649 s.CurrencyCode = &v 6650 return s 6651} 6652 6653// SetEstimatedBreakEvenInMonths sets the EstimatedBreakEvenInMonths field's value. 6654func (s *ReservationPurchaseRecommendationDetail) SetEstimatedBreakEvenInMonths(v string) *ReservationPurchaseRecommendationDetail { 6655 s.EstimatedBreakEvenInMonths = &v 6656 return s 6657} 6658 6659// SetEstimatedMonthlyOnDemandCost sets the EstimatedMonthlyOnDemandCost field's value. 6660func (s *ReservationPurchaseRecommendationDetail) SetEstimatedMonthlyOnDemandCost(v string) *ReservationPurchaseRecommendationDetail { 6661 s.EstimatedMonthlyOnDemandCost = &v 6662 return s 6663} 6664 6665// SetEstimatedMonthlySavingsAmount sets the EstimatedMonthlySavingsAmount field's value. 6666func (s *ReservationPurchaseRecommendationDetail) SetEstimatedMonthlySavingsAmount(v string) *ReservationPurchaseRecommendationDetail { 6667 s.EstimatedMonthlySavingsAmount = &v 6668 return s 6669} 6670 6671// SetEstimatedMonthlySavingsPercentage sets the EstimatedMonthlySavingsPercentage field's value. 6672func (s *ReservationPurchaseRecommendationDetail) SetEstimatedMonthlySavingsPercentage(v string) *ReservationPurchaseRecommendationDetail { 6673 s.EstimatedMonthlySavingsPercentage = &v 6674 return s 6675} 6676 6677// SetEstimatedReservationCostForLookbackPeriod sets the EstimatedReservationCostForLookbackPeriod field's value. 6678func (s *ReservationPurchaseRecommendationDetail) SetEstimatedReservationCostForLookbackPeriod(v string) *ReservationPurchaseRecommendationDetail { 6679 s.EstimatedReservationCostForLookbackPeriod = &v 6680 return s 6681} 6682 6683// SetInstanceDetails sets the InstanceDetails field's value. 6684func (s *ReservationPurchaseRecommendationDetail) SetInstanceDetails(v *InstanceDetails) *ReservationPurchaseRecommendationDetail { 6685 s.InstanceDetails = v 6686 return s 6687} 6688 6689// SetMaximumNormalizedUnitsUsedPerHour sets the MaximumNormalizedUnitsUsedPerHour field's value. 6690func (s *ReservationPurchaseRecommendationDetail) SetMaximumNormalizedUnitsUsedPerHour(v string) *ReservationPurchaseRecommendationDetail { 6691 s.MaximumNormalizedUnitsUsedPerHour = &v 6692 return s 6693} 6694 6695// SetMaximumNumberOfInstancesUsedPerHour sets the MaximumNumberOfInstancesUsedPerHour field's value. 6696func (s *ReservationPurchaseRecommendationDetail) SetMaximumNumberOfInstancesUsedPerHour(v string) *ReservationPurchaseRecommendationDetail { 6697 s.MaximumNumberOfInstancesUsedPerHour = &v 6698 return s 6699} 6700 6701// SetMinimumNormalizedUnitsUsedPerHour sets the MinimumNormalizedUnitsUsedPerHour field's value. 6702func (s *ReservationPurchaseRecommendationDetail) SetMinimumNormalizedUnitsUsedPerHour(v string) *ReservationPurchaseRecommendationDetail { 6703 s.MinimumNormalizedUnitsUsedPerHour = &v 6704 return s 6705} 6706 6707// SetMinimumNumberOfInstancesUsedPerHour sets the MinimumNumberOfInstancesUsedPerHour field's value. 6708func (s *ReservationPurchaseRecommendationDetail) SetMinimumNumberOfInstancesUsedPerHour(v string) *ReservationPurchaseRecommendationDetail { 6709 s.MinimumNumberOfInstancesUsedPerHour = &v 6710 return s 6711} 6712 6713// SetRecommendedNormalizedUnitsToPurchase sets the RecommendedNormalizedUnitsToPurchase field's value. 6714func (s *ReservationPurchaseRecommendationDetail) SetRecommendedNormalizedUnitsToPurchase(v string) *ReservationPurchaseRecommendationDetail { 6715 s.RecommendedNormalizedUnitsToPurchase = &v 6716 return s 6717} 6718 6719// SetRecommendedNumberOfInstancesToPurchase sets the RecommendedNumberOfInstancesToPurchase field's value. 6720func (s *ReservationPurchaseRecommendationDetail) SetRecommendedNumberOfInstancesToPurchase(v string) *ReservationPurchaseRecommendationDetail { 6721 s.RecommendedNumberOfInstancesToPurchase = &v 6722 return s 6723} 6724 6725// SetRecurringStandardMonthlyCost sets the RecurringStandardMonthlyCost field's value. 6726func (s *ReservationPurchaseRecommendationDetail) SetRecurringStandardMonthlyCost(v string) *ReservationPurchaseRecommendationDetail { 6727 s.RecurringStandardMonthlyCost = &v 6728 return s 6729} 6730 6731// SetUpfrontCost sets the UpfrontCost field's value. 6732func (s *ReservationPurchaseRecommendationDetail) SetUpfrontCost(v string) *ReservationPurchaseRecommendationDetail { 6733 s.UpfrontCost = &v 6734 return s 6735} 6736 6737// Information about this specific recommendation, such as the time stamp for 6738// when AWS made a specific recommendation. 6739type ReservationPurchaseRecommendationMetadata struct { 6740 _ struct{} `type:"structure"` 6741 6742 // The time stamp for when AWS made this recommendation. 6743 GenerationTimestamp *string `type:"string"` 6744 6745 // The ID for this specific recommendation. 6746 RecommendationId *string `type:"string"` 6747} 6748 6749// String returns the string representation 6750func (s ReservationPurchaseRecommendationMetadata) String() string { 6751 return awsutil.Prettify(s) 6752} 6753 6754// GoString returns the string representation 6755func (s ReservationPurchaseRecommendationMetadata) GoString() string { 6756 return s.String() 6757} 6758 6759// SetGenerationTimestamp sets the GenerationTimestamp field's value. 6760func (s *ReservationPurchaseRecommendationMetadata) SetGenerationTimestamp(v string) *ReservationPurchaseRecommendationMetadata { 6761 s.GenerationTimestamp = &v 6762 return s 6763} 6764 6765// SetRecommendationId sets the RecommendationId field's value. 6766func (s *ReservationPurchaseRecommendationMetadata) SetRecommendationId(v string) *ReservationPurchaseRecommendationMetadata { 6767 s.RecommendationId = &v 6768 return s 6769} 6770 6771// A summary about this recommendation, such as the currency code, the amount 6772// that AWS estimates that you could save, and the total amount of reservation 6773// to purchase. 6774type ReservationPurchaseRecommendationSummary struct { 6775 _ struct{} `type:"structure"` 6776 6777 // The currency code used for this recommendation. 6778 CurrencyCode *string `type:"string"` 6779 6780 // The total amount that AWS estimates that this recommendation could save you 6781 // in a month. 6782 TotalEstimatedMonthlySavingsAmount *string `type:"string"` 6783 6784 // The total amount that AWS estimates that this recommendation could save you 6785 // in a month, as a percentage of your costs. 6786 TotalEstimatedMonthlySavingsPercentage *string `type:"string"` 6787} 6788 6789// String returns the string representation 6790func (s ReservationPurchaseRecommendationSummary) String() string { 6791 return awsutil.Prettify(s) 6792} 6793 6794// GoString returns the string representation 6795func (s ReservationPurchaseRecommendationSummary) GoString() string { 6796 return s.String() 6797} 6798 6799// SetCurrencyCode sets the CurrencyCode field's value. 6800func (s *ReservationPurchaseRecommendationSummary) SetCurrencyCode(v string) *ReservationPurchaseRecommendationSummary { 6801 s.CurrencyCode = &v 6802 return s 6803} 6804 6805// SetTotalEstimatedMonthlySavingsAmount sets the TotalEstimatedMonthlySavingsAmount field's value. 6806func (s *ReservationPurchaseRecommendationSummary) SetTotalEstimatedMonthlySavingsAmount(v string) *ReservationPurchaseRecommendationSummary { 6807 s.TotalEstimatedMonthlySavingsAmount = &v 6808 return s 6809} 6810 6811// SetTotalEstimatedMonthlySavingsPercentage sets the TotalEstimatedMonthlySavingsPercentage field's value. 6812func (s *ReservationPurchaseRecommendationSummary) SetTotalEstimatedMonthlySavingsPercentage(v string) *ReservationPurchaseRecommendationSummary { 6813 s.TotalEstimatedMonthlySavingsPercentage = &v 6814 return s 6815} 6816 6817// A group of reservations that share a set of attributes. 6818type ReservationUtilizationGroup struct { 6819 _ struct{} `type:"structure"` 6820 6821 // The attributes for this group of reservations. 6822 Attributes map[string]*string `type:"map"` 6823 6824 // The key for a specific reservation attribute. 6825 Key *string `type:"string"` 6826 6827 // How much you used this group of reservations. 6828 Utilization *ReservationAggregates `type:"structure"` 6829 6830 // The value of a specific reservation attribute. 6831 Value *string `type:"string"` 6832} 6833 6834// String returns the string representation 6835func (s ReservationUtilizationGroup) String() string { 6836 return awsutil.Prettify(s) 6837} 6838 6839// GoString returns the string representation 6840func (s ReservationUtilizationGroup) GoString() string { 6841 return s.String() 6842} 6843 6844// SetAttributes sets the Attributes field's value. 6845func (s *ReservationUtilizationGroup) SetAttributes(v map[string]*string) *ReservationUtilizationGroup { 6846 s.Attributes = v 6847 return s 6848} 6849 6850// SetKey sets the Key field's value. 6851func (s *ReservationUtilizationGroup) SetKey(v string) *ReservationUtilizationGroup { 6852 s.Key = &v 6853 return s 6854} 6855 6856// SetUtilization sets the Utilization field's value. 6857func (s *ReservationUtilizationGroup) SetUtilization(v *ReservationAggregates) *ReservationUtilizationGroup { 6858 s.Utilization = v 6859 return s 6860} 6861 6862// SetValue sets the Value field's value. 6863func (s *ReservationUtilizationGroup) SetValue(v string) *ReservationUtilizationGroup { 6864 s.Value = &v 6865 return s 6866} 6867 6868// Details on the resource. 6869type ResourceDetails struct { 6870 _ struct{} `type:"structure"` 6871 6872 // Details on the Amazon EC2 resource. 6873 EC2ResourceDetails *EC2ResourceDetails `type:"structure"` 6874} 6875 6876// String returns the string representation 6877func (s ResourceDetails) String() string { 6878 return awsutil.Prettify(s) 6879} 6880 6881// GoString returns the string representation 6882func (s ResourceDetails) GoString() string { 6883 return s.String() 6884} 6885 6886// SetEC2ResourceDetails sets the EC2ResourceDetails field's value. 6887func (s *ResourceDetails) SetEC2ResourceDetails(v *EC2ResourceDetails) *ResourceDetails { 6888 s.EC2ResourceDetails = v 6889 return s 6890} 6891 6892// Resource utilization of current resource. 6893type ResourceUtilization struct { 6894 _ struct{} `type:"structure"` 6895 6896 // Utilization of current Amazon EC2 Instance 6897 EC2ResourceUtilization *EC2ResourceUtilization `type:"structure"` 6898} 6899 6900// String returns the string representation 6901func (s ResourceUtilization) String() string { 6902 return awsutil.Prettify(s) 6903} 6904 6905// GoString returns the string representation 6906func (s ResourceUtilization) GoString() string { 6907 return s.String() 6908} 6909 6910// SetEC2ResourceUtilization sets the EC2ResourceUtilization field's value. 6911func (s *ResourceUtilization) SetEC2ResourceUtilization(v *EC2ResourceUtilization) *ResourceUtilization { 6912 s.EC2ResourceUtilization = v 6913 return s 6914} 6915 6916// The result that is associated with a time period. 6917type ResultByTime struct { 6918 _ struct{} `type:"structure"` 6919 6920 // Whether the result is estimated. 6921 Estimated *bool `type:"boolean"` 6922 6923 // The groups that this time period includes. 6924 Groups []*Group `type:"list"` 6925 6926 // The time period that the result covers. 6927 TimePeriod *DateInterval `type:"structure"` 6928 6929 // The total amount of cost or usage accrued during the time period. 6930 Total map[string]*MetricValue `type:"map"` 6931} 6932 6933// String returns the string representation 6934func (s ResultByTime) String() string { 6935 return awsutil.Prettify(s) 6936} 6937 6938// GoString returns the string representation 6939func (s ResultByTime) GoString() string { 6940 return s.String() 6941} 6942 6943// SetEstimated sets the Estimated field's value. 6944func (s *ResultByTime) SetEstimated(v bool) *ResultByTime { 6945 s.Estimated = &v 6946 return s 6947} 6948 6949// SetGroups sets the Groups field's value. 6950func (s *ResultByTime) SetGroups(v []*Group) *ResultByTime { 6951 s.Groups = v 6952 return s 6953} 6954 6955// SetTimePeriod sets the TimePeriod field's value. 6956func (s *ResultByTime) SetTimePeriod(v *DateInterval) *ResultByTime { 6957 s.TimePeriod = v 6958 return s 6959} 6960 6961// SetTotal sets the Total field's value. 6962func (s *ResultByTime) SetTotal(v map[string]*MetricValue) *ResultByTime { 6963 s.Total = v 6964 return s 6965} 6966 6967// Recommendations to rightsize resources. 6968type RightsizingRecommendation struct { 6969 _ struct{} `type:"structure"` 6970 6971 // The account that this recommendation is for. 6972 AccountId *string `type:"string"` 6973 6974 // Context regarding the current instance. 6975 CurrentInstance *CurrentInstance `type:"structure"` 6976 6977 // Details for modification recommendations. 6978 ModifyRecommendationDetail *ModifyRecommendationDetail `type:"structure"` 6979 6980 // Recommendation to either terminate or modify the resource. 6981 RightsizingType *string `type:"string" enum:"RightsizingType"` 6982 6983 // Details for termination recommendations. 6984 TerminateRecommendationDetail *TerminateRecommendationDetail `type:"structure"` 6985} 6986 6987// String returns the string representation 6988func (s RightsizingRecommendation) String() string { 6989 return awsutil.Prettify(s) 6990} 6991 6992// GoString returns the string representation 6993func (s RightsizingRecommendation) GoString() string { 6994 return s.String() 6995} 6996 6997// SetAccountId sets the AccountId field's value. 6998func (s *RightsizingRecommendation) SetAccountId(v string) *RightsizingRecommendation { 6999 s.AccountId = &v 7000 return s 7001} 7002 7003// SetCurrentInstance sets the CurrentInstance field's value. 7004func (s *RightsizingRecommendation) SetCurrentInstance(v *CurrentInstance) *RightsizingRecommendation { 7005 s.CurrentInstance = v 7006 return s 7007} 7008 7009// SetModifyRecommendationDetail sets the ModifyRecommendationDetail field's value. 7010func (s *RightsizingRecommendation) SetModifyRecommendationDetail(v *ModifyRecommendationDetail) *RightsizingRecommendation { 7011 s.ModifyRecommendationDetail = v 7012 return s 7013} 7014 7015// SetRightsizingType sets the RightsizingType field's value. 7016func (s *RightsizingRecommendation) SetRightsizingType(v string) *RightsizingRecommendation { 7017 s.RightsizingType = &v 7018 return s 7019} 7020 7021// SetTerminateRecommendationDetail sets the TerminateRecommendationDetail field's value. 7022func (s *RightsizingRecommendation) SetTerminateRecommendationDetail(v *TerminateRecommendationDetail) *RightsizingRecommendation { 7023 s.TerminateRecommendationDetail = v 7024 return s 7025} 7026 7027// Metadata for this recommendation set. 7028type RightsizingRecommendationMetadata struct { 7029 _ struct{} `type:"structure"` 7030 7031 // The time stamp for when Amazon Web Services made this recommendation. 7032 GenerationTimestamp *string `type:"string"` 7033 7034 // How many days of previous usage that Amazon Web Services considers when making 7035 // this recommendation. 7036 LookbackPeriodInDays *string `type:"string" enum:"LookbackPeriodInDays"` 7037 7038 // The ID for this specific recommendation. 7039 RecommendationId *string `type:"string"` 7040} 7041 7042// String returns the string representation 7043func (s RightsizingRecommendationMetadata) String() string { 7044 return awsutil.Prettify(s) 7045} 7046 7047// GoString returns the string representation 7048func (s RightsizingRecommendationMetadata) GoString() string { 7049 return s.String() 7050} 7051 7052// SetGenerationTimestamp sets the GenerationTimestamp field's value. 7053func (s *RightsizingRecommendationMetadata) SetGenerationTimestamp(v string) *RightsizingRecommendationMetadata { 7054 s.GenerationTimestamp = &v 7055 return s 7056} 7057 7058// SetLookbackPeriodInDays sets the LookbackPeriodInDays field's value. 7059func (s *RightsizingRecommendationMetadata) SetLookbackPeriodInDays(v string) *RightsizingRecommendationMetadata { 7060 s.LookbackPeriodInDays = &v 7061 return s 7062} 7063 7064// SetRecommendationId sets the RecommendationId field's value. 7065func (s *RightsizingRecommendationMetadata) SetRecommendationId(v string) *RightsizingRecommendationMetadata { 7066 s.RecommendationId = &v 7067 return s 7068} 7069 7070// Summary of rightsizing recommendations 7071type RightsizingRecommendationSummary struct { 7072 _ struct{} `type:"structure"` 7073 7074 // Estimated total savings resulting from modifications, on a monthly basis. 7075 EstimatedTotalMonthlySavingsAmount *string `type:"string"` 7076 7077 // The currency code that Amazon Web Services used to calculate the savings. 7078 SavingsCurrencyCode *string `type:"string"` 7079 7080 // Savings percentage based on the recommended modifications, relative to the 7081 // total On Demand costs associated with these instances. 7082 SavingsPercentage *string `type:"string"` 7083 7084 // Total number of instance recommendations. 7085 TotalRecommendationCount *string `type:"string"` 7086} 7087 7088// String returns the string representation 7089func (s RightsizingRecommendationSummary) String() string { 7090 return awsutil.Prettify(s) 7091} 7092 7093// GoString returns the string representation 7094func (s RightsizingRecommendationSummary) GoString() string { 7095 return s.String() 7096} 7097 7098// SetEstimatedTotalMonthlySavingsAmount sets the EstimatedTotalMonthlySavingsAmount field's value. 7099func (s *RightsizingRecommendationSummary) SetEstimatedTotalMonthlySavingsAmount(v string) *RightsizingRecommendationSummary { 7100 s.EstimatedTotalMonthlySavingsAmount = &v 7101 return s 7102} 7103 7104// SetSavingsCurrencyCode sets the SavingsCurrencyCode field's value. 7105func (s *RightsizingRecommendationSummary) SetSavingsCurrencyCode(v string) *RightsizingRecommendationSummary { 7106 s.SavingsCurrencyCode = &v 7107 return s 7108} 7109 7110// SetSavingsPercentage sets the SavingsPercentage field's value. 7111func (s *RightsizingRecommendationSummary) SetSavingsPercentage(v string) *RightsizingRecommendationSummary { 7112 s.SavingsPercentage = &v 7113 return s 7114} 7115 7116// SetTotalRecommendationCount sets the TotalRecommendationCount field's value. 7117func (s *RightsizingRecommendationSummary) SetTotalRecommendationCount(v string) *RightsizingRecommendationSummary { 7118 s.TotalRecommendationCount = &v 7119 return s 7120} 7121 7122// The amortized amount of Savings Plans purchased in a specific account during 7123// a specific time interval. 7124type SavingsPlansAmortizedCommitment struct { 7125 _ struct{} `type:"structure"` 7126 7127 // The amortized amount of your Savings Plans commitment that was purchased 7128 // with either a Partial or a NoUpfront. 7129 AmortizedRecurringCommitment *string `type:"string"` 7130 7131 // The amortized amount of your Savings Plans commitment that was purchased 7132 // with an Upfront or PartialUpfront Savings Plans. 7133 AmortizedUpfrontCommitment *string `type:"string"` 7134 7135 // The total amortized amount of your Savings Plans commitment, regardless of 7136 // your Savings Plans purchase method. 7137 TotalAmortizedCommitment *string `type:"string"` 7138} 7139 7140// String returns the string representation 7141func (s SavingsPlansAmortizedCommitment) String() string { 7142 return awsutil.Prettify(s) 7143} 7144 7145// GoString returns the string representation 7146func (s SavingsPlansAmortizedCommitment) GoString() string { 7147 return s.String() 7148} 7149 7150// SetAmortizedRecurringCommitment sets the AmortizedRecurringCommitment field's value. 7151func (s *SavingsPlansAmortizedCommitment) SetAmortizedRecurringCommitment(v string) *SavingsPlansAmortizedCommitment { 7152 s.AmortizedRecurringCommitment = &v 7153 return s 7154} 7155 7156// SetAmortizedUpfrontCommitment sets the AmortizedUpfrontCommitment field's value. 7157func (s *SavingsPlansAmortizedCommitment) SetAmortizedUpfrontCommitment(v string) *SavingsPlansAmortizedCommitment { 7158 s.AmortizedUpfrontCommitment = &v 7159 return s 7160} 7161 7162// SetTotalAmortizedCommitment sets the TotalAmortizedCommitment field's value. 7163func (s *SavingsPlansAmortizedCommitment) SetTotalAmortizedCommitment(v string) *SavingsPlansAmortizedCommitment { 7164 s.TotalAmortizedCommitment = &v 7165 return s 7166} 7167 7168// The amount of Savings Plans eligible usage that is covered by Savings Plans. 7169// All calculations consider the On-Demand equivalent of your Savings Plans 7170// usage. 7171type SavingsPlansCoverage struct { 7172 _ struct{} `type:"structure"` 7173 7174 // The attribute that applies to a specific Dimension. 7175 Attributes map[string]*string `type:"map"` 7176 7177 // The amount of Savings Plans eligible usage that the Savings Plans covered. 7178 Coverage *SavingsPlansCoverageData `type:"structure"` 7179 7180 // The time period that you want the usage and costs for. 7181 TimePeriod *DateInterval `type:"structure"` 7182} 7183 7184// String returns the string representation 7185func (s SavingsPlansCoverage) String() string { 7186 return awsutil.Prettify(s) 7187} 7188 7189// GoString returns the string representation 7190func (s SavingsPlansCoverage) GoString() string { 7191 return s.String() 7192} 7193 7194// SetAttributes sets the Attributes field's value. 7195func (s *SavingsPlansCoverage) SetAttributes(v map[string]*string) *SavingsPlansCoverage { 7196 s.Attributes = v 7197 return s 7198} 7199 7200// SetCoverage sets the Coverage field's value. 7201func (s *SavingsPlansCoverage) SetCoverage(v *SavingsPlansCoverageData) *SavingsPlansCoverage { 7202 s.Coverage = v 7203 return s 7204} 7205 7206// SetTimePeriod sets the TimePeriod field's value. 7207func (s *SavingsPlansCoverage) SetTimePeriod(v *DateInterval) *SavingsPlansCoverage { 7208 s.TimePeriod = v 7209 return s 7210} 7211 7212// Specific coverage percentage, On-Demand costs, and spend covered by Savings 7213// Plans, and total Savings Plans costs for an account. 7214type SavingsPlansCoverageData struct { 7215 _ struct{} `type:"structure"` 7216 7217 // The percentage of your existing Savings Planscovered usage, divided by all 7218 // of your eligible Savings Plans usage in an account(or set of accounts). 7219 CoveragePercentage *string `type:"string"` 7220 7221 // The cost of your Amazon Web Services usage at the public On-Demand rate. 7222 OnDemandCost *string `type:"string"` 7223 7224 // The amount of your Amazon Web Services usage that is covered by a Savings 7225 // Plans. 7226 SpendCoveredBySavingsPlans *string `type:"string"` 7227 7228 // The total cost of your Amazon Web Services usage, regardless of your purchase 7229 // option. 7230 TotalCost *string `type:"string"` 7231} 7232 7233// String returns the string representation 7234func (s SavingsPlansCoverageData) String() string { 7235 return awsutil.Prettify(s) 7236} 7237 7238// GoString returns the string representation 7239func (s SavingsPlansCoverageData) GoString() string { 7240 return s.String() 7241} 7242 7243// SetCoveragePercentage sets the CoveragePercentage field's value. 7244func (s *SavingsPlansCoverageData) SetCoveragePercentage(v string) *SavingsPlansCoverageData { 7245 s.CoveragePercentage = &v 7246 return s 7247} 7248 7249// SetOnDemandCost sets the OnDemandCost field's value. 7250func (s *SavingsPlansCoverageData) SetOnDemandCost(v string) *SavingsPlansCoverageData { 7251 s.OnDemandCost = &v 7252 return s 7253} 7254 7255// SetSpendCoveredBySavingsPlans sets the SpendCoveredBySavingsPlans field's value. 7256func (s *SavingsPlansCoverageData) SetSpendCoveredBySavingsPlans(v string) *SavingsPlansCoverageData { 7257 s.SpendCoveredBySavingsPlans = &v 7258 return s 7259} 7260 7261// SetTotalCost sets the TotalCost field's value. 7262func (s *SavingsPlansCoverageData) SetTotalCost(v string) *SavingsPlansCoverageData { 7263 s.TotalCost = &v 7264 return s 7265} 7266 7267// Attribute details on a specific Savings Plan. 7268type SavingsPlansDetails struct { 7269 _ struct{} `type:"structure"` 7270 7271 // A group of instance types that Savings Plans applies to. 7272 InstanceFamily *string `type:"string"` 7273 7274 // The unique ID used to distinguish Savings Plans from one another. 7275 OfferingId *string `type:"string"` 7276 7277 // A collection of AWS resources in a geographic area. Each AWS Region is isolated 7278 // and independent of the other Regions. 7279 Region *string `type:"string"` 7280} 7281 7282// String returns the string representation 7283func (s SavingsPlansDetails) String() string { 7284 return awsutil.Prettify(s) 7285} 7286 7287// GoString returns the string representation 7288func (s SavingsPlansDetails) GoString() string { 7289 return s.String() 7290} 7291 7292// SetInstanceFamily sets the InstanceFamily field's value. 7293func (s *SavingsPlansDetails) SetInstanceFamily(v string) *SavingsPlansDetails { 7294 s.InstanceFamily = &v 7295 return s 7296} 7297 7298// SetOfferingId sets the OfferingId field's value. 7299func (s *SavingsPlansDetails) SetOfferingId(v string) *SavingsPlansDetails { 7300 s.OfferingId = &v 7301 return s 7302} 7303 7304// SetRegion sets the Region field's value. 7305func (s *SavingsPlansDetails) SetRegion(v string) *SavingsPlansDetails { 7306 s.Region = &v 7307 return s 7308} 7309 7310// Contains your request parameters, Savings Plan Recommendations Summary, and 7311// Details. 7312type SavingsPlansPurchaseRecommendation struct { 7313 _ struct{} `type:"structure"` 7314 7315 // The lookback period in days, used to generate the recommendation. 7316 LookbackPeriodInDays *string `type:"string" enum:"LookbackPeriodInDays"` 7317 7318 // The payment option used to generate the recommendation. 7319 PaymentOption *string `type:"string" enum:"PaymentOption"` 7320 7321 // Details for the Savings Plans we recommend you to purchase to cover existing, 7322 // Savings Plans eligible workloads. 7323 SavingsPlansPurchaseRecommendationDetails []*SavingsPlansPurchaseRecommendationDetail `type:"list"` 7324 7325 // Summary metrics for your Savings Plans Recommendations. 7326 SavingsPlansPurchaseRecommendationSummary *SavingsPlansPurchaseRecommendationSummary `type:"structure"` 7327 7328 // The requested Savings Plans recommendation type. 7329 SavingsPlansType *string `type:"string" enum:"SupportedSavingsPlansType"` 7330 7331 // The Savings Plans recommendation term in years, used to generate the recommendation. 7332 TermInYears *string `type:"string" enum:"TermInYears"` 7333} 7334 7335// String returns the string representation 7336func (s SavingsPlansPurchaseRecommendation) String() string { 7337 return awsutil.Prettify(s) 7338} 7339 7340// GoString returns the string representation 7341func (s SavingsPlansPurchaseRecommendation) GoString() string { 7342 return s.String() 7343} 7344 7345// SetLookbackPeriodInDays sets the LookbackPeriodInDays field's value. 7346func (s *SavingsPlansPurchaseRecommendation) SetLookbackPeriodInDays(v string) *SavingsPlansPurchaseRecommendation { 7347 s.LookbackPeriodInDays = &v 7348 return s 7349} 7350 7351// SetPaymentOption sets the PaymentOption field's value. 7352func (s *SavingsPlansPurchaseRecommendation) SetPaymentOption(v string) *SavingsPlansPurchaseRecommendation { 7353 s.PaymentOption = &v 7354 return s 7355} 7356 7357// SetSavingsPlansPurchaseRecommendationDetails sets the SavingsPlansPurchaseRecommendationDetails field's value. 7358func (s *SavingsPlansPurchaseRecommendation) SetSavingsPlansPurchaseRecommendationDetails(v []*SavingsPlansPurchaseRecommendationDetail) *SavingsPlansPurchaseRecommendation { 7359 s.SavingsPlansPurchaseRecommendationDetails = v 7360 return s 7361} 7362 7363// SetSavingsPlansPurchaseRecommendationSummary sets the SavingsPlansPurchaseRecommendationSummary field's value. 7364func (s *SavingsPlansPurchaseRecommendation) SetSavingsPlansPurchaseRecommendationSummary(v *SavingsPlansPurchaseRecommendationSummary) *SavingsPlansPurchaseRecommendation { 7365 s.SavingsPlansPurchaseRecommendationSummary = v 7366 return s 7367} 7368 7369// SetSavingsPlansType sets the SavingsPlansType field's value. 7370func (s *SavingsPlansPurchaseRecommendation) SetSavingsPlansType(v string) *SavingsPlansPurchaseRecommendation { 7371 s.SavingsPlansType = &v 7372 return s 7373} 7374 7375// SetTermInYears sets the TermInYears field's value. 7376func (s *SavingsPlansPurchaseRecommendation) SetTermInYears(v string) *SavingsPlansPurchaseRecommendation { 7377 s.TermInYears = &v 7378 return s 7379} 7380 7381// Details for your recommended Savings Plans. 7382type SavingsPlansPurchaseRecommendationDetail struct { 7383 _ struct{} `type:"structure"` 7384 7385 // The AccountID the recommendation is generated for. 7386 AccountId *string `type:"string"` 7387 7388 // The currency code Amazon Web Services used to generate the recommendations 7389 // and present potential savings. 7390 CurrencyCode *string `type:"string"` 7391 7392 // The average value of hourly On-Demand spend over the lookback period of the 7393 // applicable usage type. 7394 CurrentAverageHourlyOnDemandSpend *string `type:"string"` 7395 7396 // The highest value of hourly On-Demand spend over the lookback period of the 7397 // applicable usage type. 7398 CurrentMaximumHourlyOnDemandSpend *string `type:"string"` 7399 7400 // The lowest value of hourly On-Demand spend over the lookback period of the 7401 // applicable usage type. 7402 CurrentMinimumHourlyOnDemandSpend *string `type:"string"` 7403 7404 // The estimated utilization of the recommended Savings Plans. 7405 EstimatedAverageUtilization *string `type:"string"` 7406 7407 // The estimated monthly savings amount, based on the recommended Savings Plans. 7408 EstimatedMonthlySavingsAmount *string `type:"string"` 7409 7410 // The remaining On-Demand cost estimated to not be covered by the recommended 7411 // Savings Plans, over the length of the lookback period. 7412 EstimatedOnDemandCost *string `type:"string"` 7413 7414 // The estimated On-Demand costs you would expect with no additional commitment, 7415 // based on your usage of the selected time period and the Savings Plans you 7416 // own. 7417 EstimatedOnDemandCostWithCurrentCommitment *string `type:"string"` 7418 7419 // The estimated return on investment based on the recommended Savings Plans 7420 // purchased. This is calculated as estimatedSavingsAmount/ estimatedSPCost*100. 7421 EstimatedROI *string `type:"string"` 7422 7423 // The cost of the recommended Savings Plans over the length of the lookback 7424 // period. 7425 EstimatedSPCost *string `type:"string"` 7426 7427 // The estimated savings amount based on the recommended Savings Plans over 7428 // the length of the lookback period. 7429 EstimatedSavingsAmount *string `type:"string"` 7430 7431 // The estimated savings percentage relative to the total cost of applicable 7432 // On-Demand usage over the lookback period. 7433 EstimatedSavingsPercentage *string `type:"string"` 7434 7435 // The recommended hourly commitment level for the Savings Plans type, and configuration 7436 // based on the usage during the lookback period. 7437 HourlyCommitmentToPurchase *string `type:"string"` 7438 7439 // Details for your recommended Savings Plans. 7440 SavingsPlansDetails *SavingsPlansDetails `type:"structure"` 7441 7442 // The upfront cost of the recommended Savings Plans, based on the selected 7443 // payment option. 7444 UpfrontCost *string `type:"string"` 7445} 7446 7447// String returns the string representation 7448func (s SavingsPlansPurchaseRecommendationDetail) String() string { 7449 return awsutil.Prettify(s) 7450} 7451 7452// GoString returns the string representation 7453func (s SavingsPlansPurchaseRecommendationDetail) GoString() string { 7454 return s.String() 7455} 7456 7457// SetAccountId sets the AccountId field's value. 7458func (s *SavingsPlansPurchaseRecommendationDetail) SetAccountId(v string) *SavingsPlansPurchaseRecommendationDetail { 7459 s.AccountId = &v 7460 return s 7461} 7462 7463// SetCurrencyCode sets the CurrencyCode field's value. 7464func (s *SavingsPlansPurchaseRecommendationDetail) SetCurrencyCode(v string) *SavingsPlansPurchaseRecommendationDetail { 7465 s.CurrencyCode = &v 7466 return s 7467} 7468 7469// SetCurrentAverageHourlyOnDemandSpend sets the CurrentAverageHourlyOnDemandSpend field's value. 7470func (s *SavingsPlansPurchaseRecommendationDetail) SetCurrentAverageHourlyOnDemandSpend(v string) *SavingsPlansPurchaseRecommendationDetail { 7471 s.CurrentAverageHourlyOnDemandSpend = &v 7472 return s 7473} 7474 7475// SetCurrentMaximumHourlyOnDemandSpend sets the CurrentMaximumHourlyOnDemandSpend field's value. 7476func (s *SavingsPlansPurchaseRecommendationDetail) SetCurrentMaximumHourlyOnDemandSpend(v string) *SavingsPlansPurchaseRecommendationDetail { 7477 s.CurrentMaximumHourlyOnDemandSpend = &v 7478 return s 7479} 7480 7481// SetCurrentMinimumHourlyOnDemandSpend sets the CurrentMinimumHourlyOnDemandSpend field's value. 7482func (s *SavingsPlansPurchaseRecommendationDetail) SetCurrentMinimumHourlyOnDemandSpend(v string) *SavingsPlansPurchaseRecommendationDetail { 7483 s.CurrentMinimumHourlyOnDemandSpend = &v 7484 return s 7485} 7486 7487// SetEstimatedAverageUtilization sets the EstimatedAverageUtilization field's value. 7488func (s *SavingsPlansPurchaseRecommendationDetail) SetEstimatedAverageUtilization(v string) *SavingsPlansPurchaseRecommendationDetail { 7489 s.EstimatedAverageUtilization = &v 7490 return s 7491} 7492 7493// SetEstimatedMonthlySavingsAmount sets the EstimatedMonthlySavingsAmount field's value. 7494func (s *SavingsPlansPurchaseRecommendationDetail) SetEstimatedMonthlySavingsAmount(v string) *SavingsPlansPurchaseRecommendationDetail { 7495 s.EstimatedMonthlySavingsAmount = &v 7496 return s 7497} 7498 7499// SetEstimatedOnDemandCost sets the EstimatedOnDemandCost field's value. 7500func (s *SavingsPlansPurchaseRecommendationDetail) SetEstimatedOnDemandCost(v string) *SavingsPlansPurchaseRecommendationDetail { 7501 s.EstimatedOnDemandCost = &v 7502 return s 7503} 7504 7505// SetEstimatedOnDemandCostWithCurrentCommitment sets the EstimatedOnDemandCostWithCurrentCommitment field's value. 7506func (s *SavingsPlansPurchaseRecommendationDetail) SetEstimatedOnDemandCostWithCurrentCommitment(v string) *SavingsPlansPurchaseRecommendationDetail { 7507 s.EstimatedOnDemandCostWithCurrentCommitment = &v 7508 return s 7509} 7510 7511// SetEstimatedROI sets the EstimatedROI field's value. 7512func (s *SavingsPlansPurchaseRecommendationDetail) SetEstimatedROI(v string) *SavingsPlansPurchaseRecommendationDetail { 7513 s.EstimatedROI = &v 7514 return s 7515} 7516 7517// SetEstimatedSPCost sets the EstimatedSPCost field's value. 7518func (s *SavingsPlansPurchaseRecommendationDetail) SetEstimatedSPCost(v string) *SavingsPlansPurchaseRecommendationDetail { 7519 s.EstimatedSPCost = &v 7520 return s 7521} 7522 7523// SetEstimatedSavingsAmount sets the EstimatedSavingsAmount field's value. 7524func (s *SavingsPlansPurchaseRecommendationDetail) SetEstimatedSavingsAmount(v string) *SavingsPlansPurchaseRecommendationDetail { 7525 s.EstimatedSavingsAmount = &v 7526 return s 7527} 7528 7529// SetEstimatedSavingsPercentage sets the EstimatedSavingsPercentage field's value. 7530func (s *SavingsPlansPurchaseRecommendationDetail) SetEstimatedSavingsPercentage(v string) *SavingsPlansPurchaseRecommendationDetail { 7531 s.EstimatedSavingsPercentage = &v 7532 return s 7533} 7534 7535// SetHourlyCommitmentToPurchase sets the HourlyCommitmentToPurchase field's value. 7536func (s *SavingsPlansPurchaseRecommendationDetail) SetHourlyCommitmentToPurchase(v string) *SavingsPlansPurchaseRecommendationDetail { 7537 s.HourlyCommitmentToPurchase = &v 7538 return s 7539} 7540 7541// SetSavingsPlansDetails sets the SavingsPlansDetails field's value. 7542func (s *SavingsPlansPurchaseRecommendationDetail) SetSavingsPlansDetails(v *SavingsPlansDetails) *SavingsPlansPurchaseRecommendationDetail { 7543 s.SavingsPlansDetails = v 7544 return s 7545} 7546 7547// SetUpfrontCost sets the UpfrontCost field's value. 7548func (s *SavingsPlansPurchaseRecommendationDetail) SetUpfrontCost(v string) *SavingsPlansPurchaseRecommendationDetail { 7549 s.UpfrontCost = &v 7550 return s 7551} 7552 7553// Metadata about your Savings Plans Purchase Recommendations. 7554type SavingsPlansPurchaseRecommendationMetadata struct { 7555 _ struct{} `type:"structure"` 7556 7557 // The timestamp showing when the recommendations were generated. 7558 GenerationTimestamp *string `type:"string"` 7559 7560 // The unique identifier for the recommendation set. 7561 RecommendationId *string `type:"string"` 7562} 7563 7564// String returns the string representation 7565func (s SavingsPlansPurchaseRecommendationMetadata) String() string { 7566 return awsutil.Prettify(s) 7567} 7568 7569// GoString returns the string representation 7570func (s SavingsPlansPurchaseRecommendationMetadata) GoString() string { 7571 return s.String() 7572} 7573 7574// SetGenerationTimestamp sets the GenerationTimestamp field's value. 7575func (s *SavingsPlansPurchaseRecommendationMetadata) SetGenerationTimestamp(v string) *SavingsPlansPurchaseRecommendationMetadata { 7576 s.GenerationTimestamp = &v 7577 return s 7578} 7579 7580// SetRecommendationId sets the RecommendationId field's value. 7581func (s *SavingsPlansPurchaseRecommendationMetadata) SetRecommendationId(v string) *SavingsPlansPurchaseRecommendationMetadata { 7582 s.RecommendationId = &v 7583 return s 7584} 7585 7586// Summary metrics for your Savings Plans Purchase Recommendations. 7587type SavingsPlansPurchaseRecommendationSummary struct { 7588 _ struct{} `type:"structure"` 7589 7590 // The currency code Amazon Web Services used to generate the recommendations 7591 // and present potential savings. 7592 CurrencyCode *string `type:"string"` 7593 7594 // The current total on demand spend of the applicable usage types over the 7595 // lookback period. 7596 CurrentOnDemandSpend *string `type:"string"` 7597 7598 // The recommended Savings Plans cost on a daily (24 hourly) basis. 7599 DailyCommitmentToPurchase *string `type:"string"` 7600 7601 // The estimated monthly savings amount, based on the recommended Savings Plans 7602 // purchase. 7603 EstimatedMonthlySavingsAmount *string `type:"string"` 7604 7605 // The estimated On-Demand costs you would expect with no additional commitment, 7606 // based on your usage of the selected time period and the Savings Plans you 7607 // own. 7608 EstimatedOnDemandCostWithCurrentCommitment *string `type:"string"` 7609 7610 // The estimated return on investment based on the recommended Savings Plans 7611 // and estimated savings. 7612 EstimatedROI *string `type:"string"` 7613 7614 // The estimated total savings over the lookback period, based on the purchase 7615 // of the recommended Savings Plans. 7616 EstimatedSavingsAmount *string `type:"string"` 7617 7618 // The estimated savings relative to the total cost of On-Demand usage, over 7619 // the lookback period. This is calculated as estimatedSavingsAmount/ CurrentOnDemandSpend*100. 7620 EstimatedSavingsPercentage *string `type:"string"` 7621 7622 // The estimated total cost of the usage after purchasing the recommended Savings 7623 // Plans. This is a sum of the cost of Savings Plans during this term, and the 7624 // remaining On-Demand usage. 7625 EstimatedTotalCost *string `type:"string"` 7626 7627 // The recommended hourly commitment based on the recommendation parameters. 7628 HourlyCommitmentToPurchase *string `type:"string"` 7629 7630 // The aggregate number of Savings Plans recommendations that exist for your 7631 // account. 7632 TotalRecommendationCount *string `type:"string"` 7633} 7634 7635// String returns the string representation 7636func (s SavingsPlansPurchaseRecommendationSummary) String() string { 7637 return awsutil.Prettify(s) 7638} 7639 7640// GoString returns the string representation 7641func (s SavingsPlansPurchaseRecommendationSummary) GoString() string { 7642 return s.String() 7643} 7644 7645// SetCurrencyCode sets the CurrencyCode field's value. 7646func (s *SavingsPlansPurchaseRecommendationSummary) SetCurrencyCode(v string) *SavingsPlansPurchaseRecommendationSummary { 7647 s.CurrencyCode = &v 7648 return s 7649} 7650 7651// SetCurrentOnDemandSpend sets the CurrentOnDemandSpend field's value. 7652func (s *SavingsPlansPurchaseRecommendationSummary) SetCurrentOnDemandSpend(v string) *SavingsPlansPurchaseRecommendationSummary { 7653 s.CurrentOnDemandSpend = &v 7654 return s 7655} 7656 7657// SetDailyCommitmentToPurchase sets the DailyCommitmentToPurchase field's value. 7658func (s *SavingsPlansPurchaseRecommendationSummary) SetDailyCommitmentToPurchase(v string) *SavingsPlansPurchaseRecommendationSummary { 7659 s.DailyCommitmentToPurchase = &v 7660 return s 7661} 7662 7663// SetEstimatedMonthlySavingsAmount sets the EstimatedMonthlySavingsAmount field's value. 7664func (s *SavingsPlansPurchaseRecommendationSummary) SetEstimatedMonthlySavingsAmount(v string) *SavingsPlansPurchaseRecommendationSummary { 7665 s.EstimatedMonthlySavingsAmount = &v 7666 return s 7667} 7668 7669// SetEstimatedOnDemandCostWithCurrentCommitment sets the EstimatedOnDemandCostWithCurrentCommitment field's value. 7670func (s *SavingsPlansPurchaseRecommendationSummary) SetEstimatedOnDemandCostWithCurrentCommitment(v string) *SavingsPlansPurchaseRecommendationSummary { 7671 s.EstimatedOnDemandCostWithCurrentCommitment = &v 7672 return s 7673} 7674 7675// SetEstimatedROI sets the EstimatedROI field's value. 7676func (s *SavingsPlansPurchaseRecommendationSummary) SetEstimatedROI(v string) *SavingsPlansPurchaseRecommendationSummary { 7677 s.EstimatedROI = &v 7678 return s 7679} 7680 7681// SetEstimatedSavingsAmount sets the EstimatedSavingsAmount field's value. 7682func (s *SavingsPlansPurchaseRecommendationSummary) SetEstimatedSavingsAmount(v string) *SavingsPlansPurchaseRecommendationSummary { 7683 s.EstimatedSavingsAmount = &v 7684 return s 7685} 7686 7687// SetEstimatedSavingsPercentage sets the EstimatedSavingsPercentage field's value. 7688func (s *SavingsPlansPurchaseRecommendationSummary) SetEstimatedSavingsPercentage(v string) *SavingsPlansPurchaseRecommendationSummary { 7689 s.EstimatedSavingsPercentage = &v 7690 return s 7691} 7692 7693// SetEstimatedTotalCost sets the EstimatedTotalCost field's value. 7694func (s *SavingsPlansPurchaseRecommendationSummary) SetEstimatedTotalCost(v string) *SavingsPlansPurchaseRecommendationSummary { 7695 s.EstimatedTotalCost = &v 7696 return s 7697} 7698 7699// SetHourlyCommitmentToPurchase sets the HourlyCommitmentToPurchase field's value. 7700func (s *SavingsPlansPurchaseRecommendationSummary) SetHourlyCommitmentToPurchase(v string) *SavingsPlansPurchaseRecommendationSummary { 7701 s.HourlyCommitmentToPurchase = &v 7702 return s 7703} 7704 7705// SetTotalRecommendationCount sets the TotalRecommendationCount field's value. 7706func (s *SavingsPlansPurchaseRecommendationSummary) SetTotalRecommendationCount(v string) *SavingsPlansPurchaseRecommendationSummary { 7707 s.TotalRecommendationCount = &v 7708 return s 7709} 7710 7711// The amount of savings you're accumulating, against the public On-Demand rate 7712// of the usage accrued in an account. 7713type SavingsPlansSavings struct { 7714 _ struct{} `type:"structure"` 7715 7716 // The savings amount that you are accumulating for the usage that is covered 7717 // by a Savings Plans, when compared to the On-Demand equivalent of the same 7718 // usage. 7719 NetSavings *string `type:"string"` 7720 7721 // How much the amount that the usage would have cost if it was accrued at the 7722 // On-Demand rate. 7723 OnDemandCostEquivalent *string `type:"string"` 7724} 7725 7726// String returns the string representation 7727func (s SavingsPlansSavings) String() string { 7728 return awsutil.Prettify(s) 7729} 7730 7731// GoString returns the string representation 7732func (s SavingsPlansSavings) GoString() string { 7733 return s.String() 7734} 7735 7736// SetNetSavings sets the NetSavings field's value. 7737func (s *SavingsPlansSavings) SetNetSavings(v string) *SavingsPlansSavings { 7738 s.NetSavings = &v 7739 return s 7740} 7741 7742// SetOnDemandCostEquivalent sets the OnDemandCostEquivalent field's value. 7743func (s *SavingsPlansSavings) SetOnDemandCostEquivalent(v string) *SavingsPlansSavings { 7744 s.OnDemandCostEquivalent = &v 7745 return s 7746} 7747 7748// The measurement of how well you are using your existing Savings Plans. 7749type SavingsPlansUtilization struct { 7750 _ struct{} `type:"structure"` 7751 7752 // The total amount of Savings Plans commitment that's been purchased in an 7753 // account (or set of accounts). 7754 TotalCommitment *string `type:"string"` 7755 7756 // The amount of your Savings Plans commitment that was not consumed from Savings 7757 // Plans eligible usage in a specific period. 7758 UnusedCommitment *string `type:"string"` 7759 7760 // The amount of your Savings Plans commitment that was consumed from Savings 7761 // Plans eligible usage in a specific period. 7762 UsedCommitment *string `type:"string"` 7763 7764 // The amount of UsedCommitment divided by the TotalCommitment for your Savings 7765 // Plans. 7766 UtilizationPercentage *string `type:"string"` 7767} 7768 7769// String returns the string representation 7770func (s SavingsPlansUtilization) String() string { 7771 return awsutil.Prettify(s) 7772} 7773 7774// GoString returns the string representation 7775func (s SavingsPlansUtilization) GoString() string { 7776 return s.String() 7777} 7778 7779// SetTotalCommitment sets the TotalCommitment field's value. 7780func (s *SavingsPlansUtilization) SetTotalCommitment(v string) *SavingsPlansUtilization { 7781 s.TotalCommitment = &v 7782 return s 7783} 7784 7785// SetUnusedCommitment sets the UnusedCommitment field's value. 7786func (s *SavingsPlansUtilization) SetUnusedCommitment(v string) *SavingsPlansUtilization { 7787 s.UnusedCommitment = &v 7788 return s 7789} 7790 7791// SetUsedCommitment sets the UsedCommitment field's value. 7792func (s *SavingsPlansUtilization) SetUsedCommitment(v string) *SavingsPlansUtilization { 7793 s.UsedCommitment = &v 7794 return s 7795} 7796 7797// SetUtilizationPercentage sets the UtilizationPercentage field's value. 7798func (s *SavingsPlansUtilization) SetUtilizationPercentage(v string) *SavingsPlansUtilization { 7799 s.UtilizationPercentage = &v 7800 return s 7801} 7802 7803// The aggregated utilization metrics for your Savings Plans usage. 7804type SavingsPlansUtilizationAggregates struct { 7805 _ struct{} `type:"structure"` 7806 7807 // The total amortized commitment for a Savings Plans. This includes the sum 7808 // of the upfront and recurring Savings Plans fees. 7809 AmortizedCommitment *SavingsPlansAmortizedCommitment `type:"structure"` 7810 7811 // The amount saved by using existing Savings Plans. Savings returns both net 7812 // savings from Savings Plans, as well as the onDemandCostEquivalent of the 7813 // Savings Plans when considering the utilization rate. 7814 Savings *SavingsPlansSavings `type:"structure"` 7815 7816 // A ratio of your effectiveness of using existing Savings Plans to apply to 7817 // workloads that are Savings Plans eligible. 7818 // 7819 // Utilization is a required field 7820 Utilization *SavingsPlansUtilization `type:"structure" required:"true"` 7821} 7822 7823// String returns the string representation 7824func (s SavingsPlansUtilizationAggregates) String() string { 7825 return awsutil.Prettify(s) 7826} 7827 7828// GoString returns the string representation 7829func (s SavingsPlansUtilizationAggregates) GoString() string { 7830 return s.String() 7831} 7832 7833// SetAmortizedCommitment sets the AmortizedCommitment field's value. 7834func (s *SavingsPlansUtilizationAggregates) SetAmortizedCommitment(v *SavingsPlansAmortizedCommitment) *SavingsPlansUtilizationAggregates { 7835 s.AmortizedCommitment = v 7836 return s 7837} 7838 7839// SetSavings sets the Savings field's value. 7840func (s *SavingsPlansUtilizationAggregates) SetSavings(v *SavingsPlansSavings) *SavingsPlansUtilizationAggregates { 7841 s.Savings = v 7842 return s 7843} 7844 7845// SetUtilization sets the Utilization field's value. 7846func (s *SavingsPlansUtilizationAggregates) SetUtilization(v *SavingsPlansUtilization) *SavingsPlansUtilizationAggregates { 7847 s.Utilization = v 7848 return s 7849} 7850 7851// The amount of Savings Plans utilization, in hours. 7852type SavingsPlansUtilizationByTime struct { 7853 _ struct{} `type:"structure"` 7854 7855 // The total amortized commitment for a Savings Plans. This includes the sum 7856 // of the upfront and recurring Savings Plans fees. 7857 AmortizedCommitment *SavingsPlansAmortizedCommitment `type:"structure"` 7858 7859 // The amount saved by using existing Savings Plans. Savings returns both net 7860 // savings from Savings Plans as well as the onDemandCostEquivalent of the Savings 7861 // Plans when considering the utilization rate. 7862 Savings *SavingsPlansSavings `type:"structure"` 7863 7864 // The time period that you want the usage and costs for. 7865 // 7866 // TimePeriod is a required field 7867 TimePeriod *DateInterval `type:"structure" required:"true"` 7868 7869 // A ratio of your effectiveness of using existing Savings Plans to apply to 7870 // workloads that are Savings Plans eligible. 7871 // 7872 // Utilization is a required field 7873 Utilization *SavingsPlansUtilization `type:"structure" required:"true"` 7874} 7875 7876// String returns the string representation 7877func (s SavingsPlansUtilizationByTime) String() string { 7878 return awsutil.Prettify(s) 7879} 7880 7881// GoString returns the string representation 7882func (s SavingsPlansUtilizationByTime) GoString() string { 7883 return s.String() 7884} 7885 7886// SetAmortizedCommitment sets the AmortizedCommitment field's value. 7887func (s *SavingsPlansUtilizationByTime) SetAmortizedCommitment(v *SavingsPlansAmortizedCommitment) *SavingsPlansUtilizationByTime { 7888 s.AmortizedCommitment = v 7889 return s 7890} 7891 7892// SetSavings sets the Savings field's value. 7893func (s *SavingsPlansUtilizationByTime) SetSavings(v *SavingsPlansSavings) *SavingsPlansUtilizationByTime { 7894 s.Savings = v 7895 return s 7896} 7897 7898// SetTimePeriod sets the TimePeriod field's value. 7899func (s *SavingsPlansUtilizationByTime) SetTimePeriod(v *DateInterval) *SavingsPlansUtilizationByTime { 7900 s.TimePeriod = v 7901 return s 7902} 7903 7904// SetUtilization sets the Utilization field's value. 7905func (s *SavingsPlansUtilizationByTime) SetUtilization(v *SavingsPlansUtilization) *SavingsPlansUtilizationByTime { 7906 s.Utilization = v 7907 return s 7908} 7909 7910// A single daily or monthly Savings Plans utilization rate, and details for 7911// your account. Master accounts in an organization have access to member accounts. 7912// You can use GetDimensionValues to determine the possible dimension values. 7913type SavingsPlansUtilizationDetail struct { 7914 _ struct{} `type:"structure"` 7915 7916 // The total amortized commitment for a Savings Plans. Includes the sum of the 7917 // upfront and recurring Savings Plans fees. 7918 AmortizedCommitment *SavingsPlansAmortizedCommitment `type:"structure"` 7919 7920 // The attribute that applies to a specific Dimension. 7921 Attributes map[string]*string `type:"map"` 7922 7923 // The amount saved by using existing Savings Plans. Savings returns both net 7924 // savings from savings plans as well as the onDemandCostEquivalent of the Savings 7925 // Plans when considering the utilization rate. 7926 Savings *SavingsPlansSavings `type:"structure"` 7927 7928 // The unique Amazon Resource Name (ARN) for a particular Savings Plan. 7929 SavingsPlanArn *string `type:"string"` 7930 7931 // A ratio of your effectiveness of using existing Savings Plans to apply to 7932 // workloads that are Savings Plans eligible. 7933 Utilization *SavingsPlansUtilization `type:"structure"` 7934} 7935 7936// String returns the string representation 7937func (s SavingsPlansUtilizationDetail) String() string { 7938 return awsutil.Prettify(s) 7939} 7940 7941// GoString returns the string representation 7942func (s SavingsPlansUtilizationDetail) GoString() string { 7943 return s.String() 7944} 7945 7946// SetAmortizedCommitment sets the AmortizedCommitment field's value. 7947func (s *SavingsPlansUtilizationDetail) SetAmortizedCommitment(v *SavingsPlansAmortizedCommitment) *SavingsPlansUtilizationDetail { 7948 s.AmortizedCommitment = v 7949 return s 7950} 7951 7952// SetAttributes sets the Attributes field's value. 7953func (s *SavingsPlansUtilizationDetail) SetAttributes(v map[string]*string) *SavingsPlansUtilizationDetail { 7954 s.Attributes = v 7955 return s 7956} 7957 7958// SetSavings sets the Savings field's value. 7959func (s *SavingsPlansUtilizationDetail) SetSavings(v *SavingsPlansSavings) *SavingsPlansUtilizationDetail { 7960 s.Savings = v 7961 return s 7962} 7963 7964// SetSavingsPlanArn sets the SavingsPlanArn field's value. 7965func (s *SavingsPlansUtilizationDetail) SetSavingsPlanArn(v string) *SavingsPlansUtilizationDetail { 7966 s.SavingsPlanArn = &v 7967 return s 7968} 7969 7970// SetUtilization sets the Utilization field's value. 7971func (s *SavingsPlansUtilizationDetail) SetUtilization(v *SavingsPlansUtilization) *SavingsPlansUtilizationDetail { 7972 s.Utilization = v 7973 return s 7974} 7975 7976// Hardware specifications for the service that you want recommendations for. 7977type ServiceSpecification struct { 7978 _ struct{} `type:"structure"` 7979 7980 // The Amazon EC2 hardware specifications that you want AWS to provide recommendations 7981 // for. 7982 EC2Specification *EC2Specification `type:"structure"` 7983} 7984 7985// String returns the string representation 7986func (s ServiceSpecification) String() string { 7987 return awsutil.Prettify(s) 7988} 7989 7990// GoString returns the string representation 7991func (s ServiceSpecification) GoString() string { 7992 return s.String() 7993} 7994 7995// SetEC2Specification sets the EC2Specification field's value. 7996func (s *ServiceSpecification) SetEC2Specification(v *EC2Specification) *ServiceSpecification { 7997 s.EC2Specification = v 7998 return s 7999} 8000 8001// The values that are available for a tag. 8002type TagValues struct { 8003 _ struct{} `type:"structure"` 8004 8005 // The key for the tag. 8006 Key *string `type:"string"` 8007 8008 // The specific value of the tag. 8009 Values []*string `type:"list"` 8010} 8011 8012// String returns the string representation 8013func (s TagValues) String() string { 8014 return awsutil.Prettify(s) 8015} 8016 8017// GoString returns the string representation 8018func (s TagValues) GoString() string { 8019 return s.String() 8020} 8021 8022// SetKey sets the Key field's value. 8023func (s *TagValues) SetKey(v string) *TagValues { 8024 s.Key = &v 8025 return s 8026} 8027 8028// SetValues sets the Values field's value. 8029func (s *TagValues) SetValues(v []*string) *TagValues { 8030 s.Values = v 8031 return s 8032} 8033 8034// Details on recommended instance. 8035type TargetInstance struct { 8036 _ struct{} `type:"structure"` 8037 8038 // The currency code that Amazon Web Services used to calculate the costs for 8039 // this instance. 8040 CurrencyCode *string `type:"string"` 8041 8042 // Indicates whether or not this recommendation is the defaulted Amazon Web 8043 // Services recommendation. 8044 DefaultTargetInstance *bool `type:"boolean"` 8045 8046 // Expected cost to operate this instance type on a monthly basis. 8047 EstimatedMonthlyCost *string `type:"string"` 8048 8049 // Estimated savings resulting from modification, on a monthly basis. 8050 EstimatedMonthlySavings *string `type:"string"` 8051 8052 // Expected utilization metrics for target instance type. 8053 ExpectedResourceUtilization *ResourceUtilization `type:"structure"` 8054 8055 // Details on the target instance type. 8056 ResourceDetails *ResourceDetails `type:"structure"` 8057} 8058 8059// String returns the string representation 8060func (s TargetInstance) String() string { 8061 return awsutil.Prettify(s) 8062} 8063 8064// GoString returns the string representation 8065func (s TargetInstance) GoString() string { 8066 return s.String() 8067} 8068 8069// SetCurrencyCode sets the CurrencyCode field's value. 8070func (s *TargetInstance) SetCurrencyCode(v string) *TargetInstance { 8071 s.CurrencyCode = &v 8072 return s 8073} 8074 8075// SetDefaultTargetInstance sets the DefaultTargetInstance field's value. 8076func (s *TargetInstance) SetDefaultTargetInstance(v bool) *TargetInstance { 8077 s.DefaultTargetInstance = &v 8078 return s 8079} 8080 8081// SetEstimatedMonthlyCost sets the EstimatedMonthlyCost field's value. 8082func (s *TargetInstance) SetEstimatedMonthlyCost(v string) *TargetInstance { 8083 s.EstimatedMonthlyCost = &v 8084 return s 8085} 8086 8087// SetEstimatedMonthlySavings sets the EstimatedMonthlySavings field's value. 8088func (s *TargetInstance) SetEstimatedMonthlySavings(v string) *TargetInstance { 8089 s.EstimatedMonthlySavings = &v 8090 return s 8091} 8092 8093// SetExpectedResourceUtilization sets the ExpectedResourceUtilization field's value. 8094func (s *TargetInstance) SetExpectedResourceUtilization(v *ResourceUtilization) *TargetInstance { 8095 s.ExpectedResourceUtilization = v 8096 return s 8097} 8098 8099// SetResourceDetails sets the ResourceDetails field's value. 8100func (s *TargetInstance) SetResourceDetails(v *ResourceDetails) *TargetInstance { 8101 s.ResourceDetails = v 8102 return s 8103} 8104 8105// Details on termination recommendation. 8106type TerminateRecommendationDetail struct { 8107 _ struct{} `type:"structure"` 8108 8109 // The currency code that Amazon Web Services used to calculate the costs for 8110 // this instance. 8111 CurrencyCode *string `type:"string"` 8112 8113 // Estimated savings resulting from modification, on a monthly basis. 8114 EstimatedMonthlySavings *string `type:"string"` 8115} 8116 8117// String returns the string representation 8118func (s TerminateRecommendationDetail) String() string { 8119 return awsutil.Prettify(s) 8120} 8121 8122// GoString returns the string representation 8123func (s TerminateRecommendationDetail) GoString() string { 8124 return s.String() 8125} 8126 8127// SetCurrencyCode sets the CurrencyCode field's value. 8128func (s *TerminateRecommendationDetail) SetCurrencyCode(v string) *TerminateRecommendationDetail { 8129 s.CurrencyCode = &v 8130 return s 8131} 8132 8133// SetEstimatedMonthlySavings sets the EstimatedMonthlySavings field's value. 8134func (s *TerminateRecommendationDetail) SetEstimatedMonthlySavings(v string) *TerminateRecommendationDetail { 8135 s.EstimatedMonthlySavings = &v 8136 return s 8137} 8138 8139type UpdateCostCategoryDefinitionInput struct { 8140 _ struct{} `type:"structure"` 8141 8142 // The unique identifier for your Cost Category. 8143 // 8144 // CostCategoryArn is a required field 8145 CostCategoryArn *string `min:"20" type:"string" required:"true"` 8146 8147 // The rule schema version in this particular Cost Category. 8148 // 8149 // RuleVersion is a required field 8150 RuleVersion *string `type:"string" required:"true" enum:"CostCategoryRuleVersion"` 8151 8152 // Rules are processed in order. If there are multiple rules that match the 8153 // line item, then the first rule to match is used to determine that Cost Category 8154 // value. 8155 // 8156 // Rules is a required field 8157 Rules []*CostCategoryRule `min:"1" type:"list" required:"true"` 8158} 8159 8160// String returns the string representation 8161func (s UpdateCostCategoryDefinitionInput) String() string { 8162 return awsutil.Prettify(s) 8163} 8164 8165// GoString returns the string representation 8166func (s UpdateCostCategoryDefinitionInput) GoString() string { 8167 return s.String() 8168} 8169 8170// Validate inspects the fields of the type to determine if they are valid. 8171func (s *UpdateCostCategoryDefinitionInput) Validate() error { 8172 invalidParams := request.ErrInvalidParams{Context: "UpdateCostCategoryDefinitionInput"} 8173 if s.CostCategoryArn == nil { 8174 invalidParams.Add(request.NewErrParamRequired("CostCategoryArn")) 8175 } 8176 if s.CostCategoryArn != nil && len(*s.CostCategoryArn) < 20 { 8177 invalidParams.Add(request.NewErrParamMinLen("CostCategoryArn", 20)) 8178 } 8179 if s.RuleVersion == nil { 8180 invalidParams.Add(request.NewErrParamRequired("RuleVersion")) 8181 } 8182 if s.Rules == nil { 8183 invalidParams.Add(request.NewErrParamRequired("Rules")) 8184 } 8185 if s.Rules != nil && len(s.Rules) < 1 { 8186 invalidParams.Add(request.NewErrParamMinLen("Rules", 1)) 8187 } 8188 if s.Rules != nil { 8189 for i, v := range s.Rules { 8190 if v == nil { 8191 continue 8192 } 8193 if err := v.Validate(); err != nil { 8194 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) 8195 } 8196 } 8197 } 8198 8199 if invalidParams.Len() > 0 { 8200 return invalidParams 8201 } 8202 return nil 8203} 8204 8205// SetCostCategoryArn sets the CostCategoryArn field's value. 8206func (s *UpdateCostCategoryDefinitionInput) SetCostCategoryArn(v string) *UpdateCostCategoryDefinitionInput { 8207 s.CostCategoryArn = &v 8208 return s 8209} 8210 8211// SetRuleVersion sets the RuleVersion field's value. 8212func (s *UpdateCostCategoryDefinitionInput) SetRuleVersion(v string) *UpdateCostCategoryDefinitionInput { 8213 s.RuleVersion = &v 8214 return s 8215} 8216 8217// SetRules sets the Rules field's value. 8218func (s *UpdateCostCategoryDefinitionInput) SetRules(v []*CostCategoryRule) *UpdateCostCategoryDefinitionInput { 8219 s.Rules = v 8220 return s 8221} 8222 8223type UpdateCostCategoryDefinitionOutput struct { 8224 _ struct{} `type:"structure"` 8225 8226 // The unique identifier for your Cost Category. 8227 CostCategoryArn *string `min:"20" type:"string"` 8228 8229 // The Cost Category's effective start date. 8230 EffectiveStart *string `min:"20" type:"string"` 8231} 8232 8233// String returns the string representation 8234func (s UpdateCostCategoryDefinitionOutput) String() string { 8235 return awsutil.Prettify(s) 8236} 8237 8238// GoString returns the string representation 8239func (s UpdateCostCategoryDefinitionOutput) GoString() string { 8240 return s.String() 8241} 8242 8243// SetCostCategoryArn sets the CostCategoryArn field's value. 8244func (s *UpdateCostCategoryDefinitionOutput) SetCostCategoryArn(v string) *UpdateCostCategoryDefinitionOutput { 8245 s.CostCategoryArn = &v 8246 return s 8247} 8248 8249// SetEffectiveStart sets the EffectiveStart field's value. 8250func (s *UpdateCostCategoryDefinitionOutput) SetEffectiveStart(v string) *UpdateCostCategoryDefinitionOutput { 8251 s.EffectiveStart = &v 8252 return s 8253} 8254 8255// The amount of utilization, in hours. 8256type UtilizationByTime struct { 8257 _ struct{} `type:"structure"` 8258 8259 // The groups that this utilization result uses. 8260 Groups []*ReservationUtilizationGroup `type:"list"` 8261 8262 // The period of time that this utilization was used for. 8263 TimePeriod *DateInterval `type:"structure"` 8264 8265 // The total number of reservation hours that were used. 8266 Total *ReservationAggregates `type:"structure"` 8267} 8268 8269// String returns the string representation 8270func (s UtilizationByTime) String() string { 8271 return awsutil.Prettify(s) 8272} 8273 8274// GoString returns the string representation 8275func (s UtilizationByTime) GoString() string { 8276 return s.String() 8277} 8278 8279// SetGroups sets the Groups field's value. 8280func (s *UtilizationByTime) SetGroups(v []*ReservationUtilizationGroup) *UtilizationByTime { 8281 s.Groups = v 8282 return s 8283} 8284 8285// SetTimePeriod sets the TimePeriod field's value. 8286func (s *UtilizationByTime) SetTimePeriod(v *DateInterval) *UtilizationByTime { 8287 s.TimePeriod = v 8288 return s 8289} 8290 8291// SetTotal sets the Total field's value. 8292func (s *UtilizationByTime) SetTotal(v *ReservationAggregates) *UtilizationByTime { 8293 s.Total = v 8294 return s 8295} 8296 8297const ( 8298 // AccountScopePayer is a AccountScope enum value 8299 AccountScopePayer = "PAYER" 8300 8301 // AccountScopeLinked is a AccountScope enum value 8302 AccountScopeLinked = "LINKED" 8303) 8304 8305const ( 8306 // ContextCostAndUsage is a Context enum value 8307 ContextCostAndUsage = "COST_AND_USAGE" 8308 8309 // ContextReservations is a Context enum value 8310 ContextReservations = "RESERVATIONS" 8311 8312 // ContextSavingsPlans is a Context enum value 8313 ContextSavingsPlans = "SAVINGS_PLANS" 8314) 8315 8316// The rule schema version in this particular Cost Category. 8317const ( 8318 // CostCategoryRuleVersionCostCategoryExpressionV1 is a CostCategoryRuleVersion enum value 8319 CostCategoryRuleVersionCostCategoryExpressionV1 = "CostCategoryExpression.v1" 8320) 8321 8322const ( 8323 // DimensionAz is a Dimension enum value 8324 DimensionAz = "AZ" 8325 8326 // DimensionInstanceType is a Dimension enum value 8327 DimensionInstanceType = "INSTANCE_TYPE" 8328 8329 // DimensionLinkedAccount is a Dimension enum value 8330 DimensionLinkedAccount = "LINKED_ACCOUNT" 8331 8332 // DimensionOperation is a Dimension enum value 8333 DimensionOperation = "OPERATION" 8334 8335 // DimensionPurchaseType is a Dimension enum value 8336 DimensionPurchaseType = "PURCHASE_TYPE" 8337 8338 // DimensionRegion is a Dimension enum value 8339 DimensionRegion = "REGION" 8340 8341 // DimensionService is a Dimension enum value 8342 DimensionService = "SERVICE" 8343 8344 // DimensionUsageType is a Dimension enum value 8345 DimensionUsageType = "USAGE_TYPE" 8346 8347 // DimensionUsageTypeGroup is a Dimension enum value 8348 DimensionUsageTypeGroup = "USAGE_TYPE_GROUP" 8349 8350 // DimensionRecordType is a Dimension enum value 8351 DimensionRecordType = "RECORD_TYPE" 8352 8353 // DimensionOperatingSystem is a Dimension enum value 8354 DimensionOperatingSystem = "OPERATING_SYSTEM" 8355 8356 // DimensionTenancy is a Dimension enum value 8357 DimensionTenancy = "TENANCY" 8358 8359 // DimensionScope is a Dimension enum value 8360 DimensionScope = "SCOPE" 8361 8362 // DimensionPlatform is a Dimension enum value 8363 DimensionPlatform = "PLATFORM" 8364 8365 // DimensionSubscriptionId is a Dimension enum value 8366 DimensionSubscriptionId = "SUBSCRIPTION_ID" 8367 8368 // DimensionLegalEntityName is a Dimension enum value 8369 DimensionLegalEntityName = "LEGAL_ENTITY_NAME" 8370 8371 // DimensionDeploymentOption is a Dimension enum value 8372 DimensionDeploymentOption = "DEPLOYMENT_OPTION" 8373 8374 // DimensionDatabaseEngine is a Dimension enum value 8375 DimensionDatabaseEngine = "DATABASE_ENGINE" 8376 8377 // DimensionCacheEngine is a Dimension enum value 8378 DimensionCacheEngine = "CACHE_ENGINE" 8379 8380 // DimensionInstanceTypeFamily is a Dimension enum value 8381 DimensionInstanceTypeFamily = "INSTANCE_TYPE_FAMILY" 8382 8383 // DimensionBillingEntity is a Dimension enum value 8384 DimensionBillingEntity = "BILLING_ENTITY" 8385 8386 // DimensionReservationId is a Dimension enum value 8387 DimensionReservationId = "RESERVATION_ID" 8388 8389 // DimensionResourceId is a Dimension enum value 8390 DimensionResourceId = "RESOURCE_ID" 8391 8392 // DimensionRightsizingType is a Dimension enum value 8393 DimensionRightsizingType = "RIGHTSIZING_TYPE" 8394 8395 // DimensionSavingsPlansType is a Dimension enum value 8396 DimensionSavingsPlansType = "SAVINGS_PLANS_TYPE" 8397 8398 // DimensionSavingsPlanArn is a Dimension enum value 8399 DimensionSavingsPlanArn = "SAVINGS_PLAN_ARN" 8400 8401 // DimensionPaymentOption is a Dimension enum value 8402 DimensionPaymentOption = "PAYMENT_OPTION" 8403) 8404 8405const ( 8406 // GranularityDaily is a Granularity enum value 8407 GranularityDaily = "DAILY" 8408 8409 // GranularityMonthly is a Granularity enum value 8410 GranularityMonthly = "MONTHLY" 8411 8412 // GranularityHourly is a Granularity enum value 8413 GranularityHourly = "HOURLY" 8414) 8415 8416const ( 8417 // GroupDefinitionTypeDimension is a GroupDefinitionType enum value 8418 GroupDefinitionTypeDimension = "DIMENSION" 8419 8420 // GroupDefinitionTypeTag is a GroupDefinitionType enum value 8421 GroupDefinitionTypeTag = "TAG" 8422 8423 // GroupDefinitionTypeCostCategory is a GroupDefinitionType enum value 8424 GroupDefinitionTypeCostCategory = "COST_CATEGORY" 8425) 8426 8427const ( 8428 // LookbackPeriodInDaysSevenDays is a LookbackPeriodInDays enum value 8429 LookbackPeriodInDaysSevenDays = "SEVEN_DAYS" 8430 8431 // LookbackPeriodInDaysThirtyDays is a LookbackPeriodInDays enum value 8432 LookbackPeriodInDaysThirtyDays = "THIRTY_DAYS" 8433 8434 // LookbackPeriodInDaysSixtyDays is a LookbackPeriodInDays enum value 8435 LookbackPeriodInDaysSixtyDays = "SIXTY_DAYS" 8436) 8437 8438const ( 8439 // MetricBlendedCost is a Metric enum value 8440 MetricBlendedCost = "BLENDED_COST" 8441 8442 // MetricUnblendedCost is a Metric enum value 8443 MetricUnblendedCost = "UNBLENDED_COST" 8444 8445 // MetricAmortizedCost is a Metric enum value 8446 MetricAmortizedCost = "AMORTIZED_COST" 8447 8448 // MetricNetUnblendedCost is a Metric enum value 8449 MetricNetUnblendedCost = "NET_UNBLENDED_COST" 8450 8451 // MetricNetAmortizedCost is a Metric enum value 8452 MetricNetAmortizedCost = "NET_AMORTIZED_COST" 8453 8454 // MetricUsageQuantity is a Metric enum value 8455 MetricUsageQuantity = "USAGE_QUANTITY" 8456 8457 // MetricNormalizedUsageAmount is a Metric enum value 8458 MetricNormalizedUsageAmount = "NORMALIZED_USAGE_AMOUNT" 8459) 8460 8461const ( 8462 // OfferingClassStandard is a OfferingClass enum value 8463 OfferingClassStandard = "STANDARD" 8464 8465 // OfferingClassConvertible is a OfferingClass enum value 8466 OfferingClassConvertible = "CONVERTIBLE" 8467) 8468 8469const ( 8470 // PaymentOptionNoUpfront is a PaymentOption enum value 8471 PaymentOptionNoUpfront = "NO_UPFRONT" 8472 8473 // PaymentOptionPartialUpfront is a PaymentOption enum value 8474 PaymentOptionPartialUpfront = "PARTIAL_UPFRONT" 8475 8476 // PaymentOptionAllUpfront is a PaymentOption enum value 8477 PaymentOptionAllUpfront = "ALL_UPFRONT" 8478 8479 // PaymentOptionLightUtilization is a PaymentOption enum value 8480 PaymentOptionLightUtilization = "LIGHT_UTILIZATION" 8481 8482 // PaymentOptionMediumUtilization is a PaymentOption enum value 8483 PaymentOptionMediumUtilization = "MEDIUM_UTILIZATION" 8484 8485 // PaymentOptionHeavyUtilization is a PaymentOption enum value 8486 PaymentOptionHeavyUtilization = "HEAVY_UTILIZATION" 8487) 8488 8489const ( 8490 // RightsizingTypeTerminate is a RightsizingType enum value 8491 RightsizingTypeTerminate = "TERMINATE" 8492 8493 // RightsizingTypeModify is a RightsizingType enum value 8494 RightsizingTypeModify = "MODIFY" 8495) 8496 8497const ( 8498 // SupportedSavingsPlansTypeComputeSp is a SupportedSavingsPlansType enum value 8499 SupportedSavingsPlansTypeComputeSp = "COMPUTE_SP" 8500 8501 // SupportedSavingsPlansTypeEc2InstanceSp is a SupportedSavingsPlansType enum value 8502 SupportedSavingsPlansTypeEc2InstanceSp = "EC2_INSTANCE_SP" 8503) 8504 8505const ( 8506 // TermInYearsOneYear is a TermInYears enum value 8507 TermInYearsOneYear = "ONE_YEAR" 8508 8509 // TermInYearsThreeYears is a TermInYears enum value 8510 TermInYearsThreeYears = "THREE_YEARS" 8511) 8512