github.com/aavshr/aws-sdk-go@v1.41.3/service/applicationcostprofiler/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package applicationcostprofiler 4 5 import ( 6 "fmt" 7 "time" 8 9 "github.com/aavshr/aws-sdk-go/aws" 10 "github.com/aavshr/aws-sdk-go/aws/awsutil" 11 "github.com/aavshr/aws-sdk-go/aws/request" 12 "github.com/aavshr/aws-sdk-go/private/protocol" 13 ) 14 15 const opDeleteReportDefinition = "DeleteReportDefinition" 16 17 // DeleteReportDefinitionRequest generates a "aws/request.Request" representing the 18 // client's request for the DeleteReportDefinition operation. The "output" return 19 // value will be populated with the request's response once the request completes 20 // successfully. 21 // 22 // Use "Send" method on the returned Request to send the API call to the service. 23 // the "output" return value is not valid until after Send returns without error. 24 // 25 // See DeleteReportDefinition for more information on using the DeleteReportDefinition 26 // API call, and error handling. 27 // 28 // This method is useful when you want to inject custom logic or configuration 29 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 30 // 31 // 32 // // Example sending a request using the DeleteReportDefinitionRequest method. 33 // req, resp := client.DeleteReportDefinitionRequest(params) 34 // 35 // err := req.Send() 36 // if err == nil { // resp is now filled 37 // fmt.Println(resp) 38 // } 39 // 40 // See also, https://docs.aws.amazon.com/goto/WebAPI/AWSApplicationCostProfiler-2020-09-10/DeleteReportDefinition 41 func (c *ApplicationCostProfiler) DeleteReportDefinitionRequest(input *DeleteReportDefinitionInput) (req *request.Request, output *DeleteReportDefinitionOutput) { 42 op := &request.Operation{ 43 Name: opDeleteReportDefinition, 44 HTTPMethod: "DELETE", 45 HTTPPath: "/reportDefinition/{reportId}", 46 } 47 48 if input == nil { 49 input = &DeleteReportDefinitionInput{} 50 } 51 52 output = &DeleteReportDefinitionOutput{} 53 req = c.newRequest(op, input, output) 54 return 55 } 56 57 // DeleteReportDefinition API operation for AWS Application Cost Profiler. 58 // 59 // Deletes the specified report definition in AWS Application Cost Profiler. 60 // This stops the report from being generated. 61 // 62 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 63 // with awserr.Error's Code and Message methods to get detailed information about 64 // the error. 65 // 66 // See the AWS API reference guide for AWS Application Cost Profiler's 67 // API operation DeleteReportDefinition for usage and error information. 68 // 69 // Returned Error Types: 70 // * InternalServerException 71 // An internal server error occurred. Retry your request. 72 // 73 // * ThrottlingException 74 // The calls to AWS Application Cost Profiler API are throttled. The request 75 // was denied. 76 // 77 // * ValidationException 78 // The input fails to satisfy the constraints for the API. 79 // 80 // * AccessDeniedException 81 // You do not have permission to perform this action. 82 // 83 // See also, https://docs.aws.amazon.com/goto/WebAPI/AWSApplicationCostProfiler-2020-09-10/DeleteReportDefinition 84 func (c *ApplicationCostProfiler) DeleteReportDefinition(input *DeleteReportDefinitionInput) (*DeleteReportDefinitionOutput, error) { 85 req, out := c.DeleteReportDefinitionRequest(input) 86 return out, req.Send() 87 } 88 89 // DeleteReportDefinitionWithContext is the same as DeleteReportDefinition with the addition of 90 // the ability to pass a context and additional request options. 91 // 92 // See DeleteReportDefinition for details on how to use this API operation. 93 // 94 // The context must be non-nil and will be used for request cancellation. If 95 // the context is nil a panic will occur. In the future the SDK may create 96 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 97 // for more information on using Contexts. 98 func (c *ApplicationCostProfiler) DeleteReportDefinitionWithContext(ctx aws.Context, input *DeleteReportDefinitionInput, opts ...request.Option) (*DeleteReportDefinitionOutput, error) { 99 req, out := c.DeleteReportDefinitionRequest(input) 100 req.SetContext(ctx) 101 req.ApplyOptions(opts...) 102 return out, req.Send() 103 } 104 105 const opGetReportDefinition = "GetReportDefinition" 106 107 // GetReportDefinitionRequest generates a "aws/request.Request" representing the 108 // client's request for the GetReportDefinition operation. The "output" return 109 // value will be populated with the request's response once the request completes 110 // successfully. 111 // 112 // Use "Send" method on the returned Request to send the API call to the service. 113 // the "output" return value is not valid until after Send returns without error. 114 // 115 // See GetReportDefinition for more information on using the GetReportDefinition 116 // API call, and error handling. 117 // 118 // This method is useful when you want to inject custom logic or configuration 119 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 120 // 121 // 122 // // Example sending a request using the GetReportDefinitionRequest method. 123 // req, resp := client.GetReportDefinitionRequest(params) 124 // 125 // err := req.Send() 126 // if err == nil { // resp is now filled 127 // fmt.Println(resp) 128 // } 129 // 130 // See also, https://docs.aws.amazon.com/goto/WebAPI/AWSApplicationCostProfiler-2020-09-10/GetReportDefinition 131 func (c *ApplicationCostProfiler) GetReportDefinitionRequest(input *GetReportDefinitionInput) (req *request.Request, output *GetReportDefinitionOutput) { 132 op := &request.Operation{ 133 Name: opGetReportDefinition, 134 HTTPMethod: "GET", 135 HTTPPath: "/reportDefinition/{reportId}", 136 } 137 138 if input == nil { 139 input = &GetReportDefinitionInput{} 140 } 141 142 output = &GetReportDefinitionOutput{} 143 req = c.newRequest(op, input, output) 144 return 145 } 146 147 // GetReportDefinition API operation for AWS Application Cost Profiler. 148 // 149 // Retrieves the definition of a report already configured in AWS Application 150 // Cost Profiler. 151 // 152 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 153 // with awserr.Error's Code and Message methods to get detailed information about 154 // the error. 155 // 156 // See the AWS API reference guide for AWS Application Cost Profiler's 157 // API operation GetReportDefinition for usage and error information. 158 // 159 // Returned Error Types: 160 // * InternalServerException 161 // An internal server error occurred. Retry your request. 162 // 163 // * ThrottlingException 164 // The calls to AWS Application Cost Profiler API are throttled. The request 165 // was denied. 166 // 167 // * ValidationException 168 // The input fails to satisfy the constraints for the API. 169 // 170 // * AccessDeniedException 171 // You do not have permission to perform this action. 172 // 173 // See also, https://docs.aws.amazon.com/goto/WebAPI/AWSApplicationCostProfiler-2020-09-10/GetReportDefinition 174 func (c *ApplicationCostProfiler) GetReportDefinition(input *GetReportDefinitionInput) (*GetReportDefinitionOutput, error) { 175 req, out := c.GetReportDefinitionRequest(input) 176 return out, req.Send() 177 } 178 179 // GetReportDefinitionWithContext is the same as GetReportDefinition with the addition of 180 // the ability to pass a context and additional request options. 181 // 182 // See GetReportDefinition for details on how to use this API operation. 183 // 184 // The context must be non-nil and will be used for request cancellation. If 185 // the context is nil a panic will occur. In the future the SDK may create 186 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 187 // for more information on using Contexts. 188 func (c *ApplicationCostProfiler) GetReportDefinitionWithContext(ctx aws.Context, input *GetReportDefinitionInput, opts ...request.Option) (*GetReportDefinitionOutput, error) { 189 req, out := c.GetReportDefinitionRequest(input) 190 req.SetContext(ctx) 191 req.ApplyOptions(opts...) 192 return out, req.Send() 193 } 194 195 const opImportApplicationUsage = "ImportApplicationUsage" 196 197 // ImportApplicationUsageRequest generates a "aws/request.Request" representing the 198 // client's request for the ImportApplicationUsage operation. The "output" return 199 // value will be populated with the request's response once the request completes 200 // successfully. 201 // 202 // Use "Send" method on the returned Request to send the API call to the service. 203 // the "output" return value is not valid until after Send returns without error. 204 // 205 // See ImportApplicationUsage for more information on using the ImportApplicationUsage 206 // API call, and error handling. 207 // 208 // This method is useful when you want to inject custom logic or configuration 209 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 210 // 211 // 212 // // Example sending a request using the ImportApplicationUsageRequest method. 213 // req, resp := client.ImportApplicationUsageRequest(params) 214 // 215 // err := req.Send() 216 // if err == nil { // resp is now filled 217 // fmt.Println(resp) 218 // } 219 // 220 // See also, https://docs.aws.amazon.com/goto/WebAPI/AWSApplicationCostProfiler-2020-09-10/ImportApplicationUsage 221 func (c *ApplicationCostProfiler) ImportApplicationUsageRequest(input *ImportApplicationUsageInput) (req *request.Request, output *ImportApplicationUsageOutput) { 222 op := &request.Operation{ 223 Name: opImportApplicationUsage, 224 HTTPMethod: "POST", 225 HTTPPath: "/importApplicationUsage", 226 } 227 228 if input == nil { 229 input = &ImportApplicationUsageInput{} 230 } 231 232 output = &ImportApplicationUsageOutput{} 233 req = c.newRequest(op, input, output) 234 return 235 } 236 237 // ImportApplicationUsage API operation for AWS Application Cost Profiler. 238 // 239 // Ingests application usage data from Amazon Simple Storage Service (Amazon 240 // S3). 241 // 242 // The data must already exist in the S3 location. As part of the action, AWS 243 // Application Cost Profiler copies the object from your S3 bucket to an S3 244 // bucket owned by Amazon for processing asynchronously. 245 // 246 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 247 // with awserr.Error's Code and Message methods to get detailed information about 248 // the error. 249 // 250 // See the AWS API reference guide for AWS Application Cost Profiler's 251 // API operation ImportApplicationUsage for usage and error information. 252 // 253 // Returned Error Types: 254 // * InternalServerException 255 // An internal server error occurred. Retry your request. 256 // 257 // * ThrottlingException 258 // The calls to AWS Application Cost Profiler API are throttled. The request 259 // was denied. 260 // 261 // * ValidationException 262 // The input fails to satisfy the constraints for the API. 263 // 264 // * AccessDeniedException 265 // You do not have permission to perform this action. 266 // 267 // See also, https://docs.aws.amazon.com/goto/WebAPI/AWSApplicationCostProfiler-2020-09-10/ImportApplicationUsage 268 func (c *ApplicationCostProfiler) ImportApplicationUsage(input *ImportApplicationUsageInput) (*ImportApplicationUsageOutput, error) { 269 req, out := c.ImportApplicationUsageRequest(input) 270 return out, req.Send() 271 } 272 273 // ImportApplicationUsageWithContext is the same as ImportApplicationUsage with the addition of 274 // the ability to pass a context and additional request options. 275 // 276 // See ImportApplicationUsage for details on how to use this API operation. 277 // 278 // The context must be non-nil and will be used for request cancellation. If 279 // the context is nil a panic will occur. In the future the SDK may create 280 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 281 // for more information on using Contexts. 282 func (c *ApplicationCostProfiler) ImportApplicationUsageWithContext(ctx aws.Context, input *ImportApplicationUsageInput, opts ...request.Option) (*ImportApplicationUsageOutput, error) { 283 req, out := c.ImportApplicationUsageRequest(input) 284 req.SetContext(ctx) 285 req.ApplyOptions(opts...) 286 return out, req.Send() 287 } 288 289 const opListReportDefinitions = "ListReportDefinitions" 290 291 // ListReportDefinitionsRequest generates a "aws/request.Request" representing the 292 // client's request for the ListReportDefinitions operation. The "output" return 293 // value will be populated with the request's response once the request completes 294 // successfully. 295 // 296 // Use "Send" method on the returned Request to send the API call to the service. 297 // the "output" return value is not valid until after Send returns without error. 298 // 299 // See ListReportDefinitions for more information on using the ListReportDefinitions 300 // API call, and error handling. 301 // 302 // This method is useful when you want to inject custom logic or configuration 303 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 304 // 305 // 306 // // Example sending a request using the ListReportDefinitionsRequest method. 307 // req, resp := client.ListReportDefinitionsRequest(params) 308 // 309 // err := req.Send() 310 // if err == nil { // resp is now filled 311 // fmt.Println(resp) 312 // } 313 // 314 // See also, https://docs.aws.amazon.com/goto/WebAPI/AWSApplicationCostProfiler-2020-09-10/ListReportDefinitions 315 func (c *ApplicationCostProfiler) ListReportDefinitionsRequest(input *ListReportDefinitionsInput) (req *request.Request, output *ListReportDefinitionsOutput) { 316 op := &request.Operation{ 317 Name: opListReportDefinitions, 318 HTTPMethod: "GET", 319 HTTPPath: "/reportDefinition", 320 Paginator: &request.Paginator{ 321 InputTokens: []string{"nextToken"}, 322 OutputTokens: []string{"nextToken"}, 323 LimitToken: "maxResults", 324 TruncationToken: "", 325 }, 326 } 327 328 if input == nil { 329 input = &ListReportDefinitionsInput{} 330 } 331 332 output = &ListReportDefinitionsOutput{} 333 req = c.newRequest(op, input, output) 334 return 335 } 336 337 // ListReportDefinitions API operation for AWS Application Cost Profiler. 338 // 339 // Retrieves a list of all reports and their configurations for your AWS account. 340 // 341 // The maximum number of reports is one. 342 // 343 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 344 // with awserr.Error's Code and Message methods to get detailed information about 345 // the error. 346 // 347 // See the AWS API reference guide for AWS Application Cost Profiler's 348 // API operation ListReportDefinitions for usage and error information. 349 // 350 // Returned Error Types: 351 // * InternalServerException 352 // An internal server error occurred. Retry your request. 353 // 354 // * ThrottlingException 355 // The calls to AWS Application Cost Profiler API are throttled. The request 356 // was denied. 357 // 358 // * ValidationException 359 // The input fails to satisfy the constraints for the API. 360 // 361 // * AccessDeniedException 362 // You do not have permission to perform this action. 363 // 364 // See also, https://docs.aws.amazon.com/goto/WebAPI/AWSApplicationCostProfiler-2020-09-10/ListReportDefinitions 365 func (c *ApplicationCostProfiler) ListReportDefinitions(input *ListReportDefinitionsInput) (*ListReportDefinitionsOutput, error) { 366 req, out := c.ListReportDefinitionsRequest(input) 367 return out, req.Send() 368 } 369 370 // ListReportDefinitionsWithContext is the same as ListReportDefinitions with the addition of 371 // the ability to pass a context and additional request options. 372 // 373 // See ListReportDefinitions for details on how to use this API operation. 374 // 375 // The context must be non-nil and will be used for request cancellation. If 376 // the context is nil a panic will occur. In the future the SDK may create 377 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 378 // for more information on using Contexts. 379 func (c *ApplicationCostProfiler) ListReportDefinitionsWithContext(ctx aws.Context, input *ListReportDefinitionsInput, opts ...request.Option) (*ListReportDefinitionsOutput, error) { 380 req, out := c.ListReportDefinitionsRequest(input) 381 req.SetContext(ctx) 382 req.ApplyOptions(opts...) 383 return out, req.Send() 384 } 385 386 // ListReportDefinitionsPages iterates over the pages of a ListReportDefinitions operation, 387 // calling the "fn" function with the response data for each page. To stop 388 // iterating, return false from the fn function. 389 // 390 // See ListReportDefinitions method for more information on how to use this operation. 391 // 392 // Note: This operation can generate multiple requests to a service. 393 // 394 // // Example iterating over at most 3 pages of a ListReportDefinitions operation. 395 // pageNum := 0 396 // err := client.ListReportDefinitionsPages(params, 397 // func(page *applicationcostprofiler.ListReportDefinitionsOutput, lastPage bool) bool { 398 // pageNum++ 399 // fmt.Println(page) 400 // return pageNum <= 3 401 // }) 402 // 403 func (c *ApplicationCostProfiler) ListReportDefinitionsPages(input *ListReportDefinitionsInput, fn func(*ListReportDefinitionsOutput, bool) bool) error { 404 return c.ListReportDefinitionsPagesWithContext(aws.BackgroundContext(), input, fn) 405 } 406 407 // ListReportDefinitionsPagesWithContext same as ListReportDefinitionsPages except 408 // it takes a Context and allows setting request options on the pages. 409 // 410 // The context must be non-nil and will be used for request cancellation. If 411 // the context is nil a panic will occur. In the future the SDK may create 412 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 413 // for more information on using Contexts. 414 func (c *ApplicationCostProfiler) ListReportDefinitionsPagesWithContext(ctx aws.Context, input *ListReportDefinitionsInput, fn func(*ListReportDefinitionsOutput, bool) bool, opts ...request.Option) error { 415 p := request.Pagination{ 416 NewRequest: func() (*request.Request, error) { 417 var inCpy *ListReportDefinitionsInput 418 if input != nil { 419 tmp := *input 420 inCpy = &tmp 421 } 422 req, _ := c.ListReportDefinitionsRequest(inCpy) 423 req.SetContext(ctx) 424 req.ApplyOptions(opts...) 425 return req, nil 426 }, 427 } 428 429 for p.Next() { 430 if !fn(p.Page().(*ListReportDefinitionsOutput), !p.HasNextPage()) { 431 break 432 } 433 } 434 435 return p.Err() 436 } 437 438 const opPutReportDefinition = "PutReportDefinition" 439 440 // PutReportDefinitionRequest generates a "aws/request.Request" representing the 441 // client's request for the PutReportDefinition operation. The "output" return 442 // value will be populated with the request's response once the request completes 443 // successfully. 444 // 445 // Use "Send" method on the returned Request to send the API call to the service. 446 // the "output" return value is not valid until after Send returns without error. 447 // 448 // See PutReportDefinition for more information on using the PutReportDefinition 449 // API call, and error handling. 450 // 451 // This method is useful when you want to inject custom logic or configuration 452 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 453 // 454 // 455 // // Example sending a request using the PutReportDefinitionRequest method. 456 // req, resp := client.PutReportDefinitionRequest(params) 457 // 458 // err := req.Send() 459 // if err == nil { // resp is now filled 460 // fmt.Println(resp) 461 // } 462 // 463 // See also, https://docs.aws.amazon.com/goto/WebAPI/AWSApplicationCostProfiler-2020-09-10/PutReportDefinition 464 func (c *ApplicationCostProfiler) PutReportDefinitionRequest(input *PutReportDefinitionInput) (req *request.Request, output *PutReportDefinitionOutput) { 465 op := &request.Operation{ 466 Name: opPutReportDefinition, 467 HTTPMethod: "POST", 468 HTTPPath: "/reportDefinition", 469 } 470 471 if input == nil { 472 input = &PutReportDefinitionInput{} 473 } 474 475 output = &PutReportDefinitionOutput{} 476 req = c.newRequest(op, input, output) 477 return 478 } 479 480 // PutReportDefinition API operation for AWS Application Cost Profiler. 481 // 482 // Creates the report definition for a report in Application Cost Profiler. 483 // 484 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 485 // with awserr.Error's Code and Message methods to get detailed information about 486 // the error. 487 // 488 // See the AWS API reference guide for AWS Application Cost Profiler's 489 // API operation PutReportDefinition for usage and error information. 490 // 491 // Returned Error Types: 492 // * InternalServerException 493 // An internal server error occurred. Retry your request. 494 // 495 // * ThrottlingException 496 // The calls to AWS Application Cost Profiler API are throttled. The request 497 // was denied. 498 // 499 // * ValidationException 500 // The input fails to satisfy the constraints for the API. 501 // 502 // * AccessDeniedException 503 // You do not have permission to perform this action. 504 // 505 // * ServiceQuotaExceededException 506 // Your request exceeds one or more of the service quotas. 507 // 508 // See also, https://docs.aws.amazon.com/goto/WebAPI/AWSApplicationCostProfiler-2020-09-10/PutReportDefinition 509 func (c *ApplicationCostProfiler) PutReportDefinition(input *PutReportDefinitionInput) (*PutReportDefinitionOutput, error) { 510 req, out := c.PutReportDefinitionRequest(input) 511 return out, req.Send() 512 } 513 514 // PutReportDefinitionWithContext is the same as PutReportDefinition with the addition of 515 // the ability to pass a context and additional request options. 516 // 517 // See PutReportDefinition for details on how to use this API operation. 518 // 519 // The context must be non-nil and will be used for request cancellation. If 520 // the context is nil a panic will occur. In the future the SDK may create 521 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 522 // for more information on using Contexts. 523 func (c *ApplicationCostProfiler) PutReportDefinitionWithContext(ctx aws.Context, input *PutReportDefinitionInput, opts ...request.Option) (*PutReportDefinitionOutput, error) { 524 req, out := c.PutReportDefinitionRequest(input) 525 req.SetContext(ctx) 526 req.ApplyOptions(opts...) 527 return out, req.Send() 528 } 529 530 const opUpdateReportDefinition = "UpdateReportDefinition" 531 532 // UpdateReportDefinitionRequest generates a "aws/request.Request" representing the 533 // client's request for the UpdateReportDefinition operation. The "output" return 534 // value will be populated with the request's response once the request completes 535 // successfully. 536 // 537 // Use "Send" method on the returned Request to send the API call to the service. 538 // the "output" return value is not valid until after Send returns without error. 539 // 540 // See UpdateReportDefinition for more information on using the UpdateReportDefinition 541 // API call, and error handling. 542 // 543 // This method is useful when you want to inject custom logic or configuration 544 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 545 // 546 // 547 // // Example sending a request using the UpdateReportDefinitionRequest method. 548 // req, resp := client.UpdateReportDefinitionRequest(params) 549 // 550 // err := req.Send() 551 // if err == nil { // resp is now filled 552 // fmt.Println(resp) 553 // } 554 // 555 // See also, https://docs.aws.amazon.com/goto/WebAPI/AWSApplicationCostProfiler-2020-09-10/UpdateReportDefinition 556 func (c *ApplicationCostProfiler) UpdateReportDefinitionRequest(input *UpdateReportDefinitionInput) (req *request.Request, output *UpdateReportDefinitionOutput) { 557 op := &request.Operation{ 558 Name: opUpdateReportDefinition, 559 HTTPMethod: "PUT", 560 HTTPPath: "/reportDefinition/{reportId}", 561 } 562 563 if input == nil { 564 input = &UpdateReportDefinitionInput{} 565 } 566 567 output = &UpdateReportDefinitionOutput{} 568 req = c.newRequest(op, input, output) 569 return 570 } 571 572 // UpdateReportDefinition API operation for AWS Application Cost Profiler. 573 // 574 // Updates existing report in AWS Application Cost Profiler. 575 // 576 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 577 // with awserr.Error's Code and Message methods to get detailed information about 578 // the error. 579 // 580 // See the AWS API reference guide for AWS Application Cost Profiler's 581 // API operation UpdateReportDefinition for usage and error information. 582 // 583 // Returned Error Types: 584 // * InternalServerException 585 // An internal server error occurred. Retry your request. 586 // 587 // * ThrottlingException 588 // The calls to AWS Application Cost Profiler API are throttled. The request 589 // was denied. 590 // 591 // * ValidationException 592 // The input fails to satisfy the constraints for the API. 593 // 594 // * AccessDeniedException 595 // You do not have permission to perform this action. 596 // 597 // See also, https://docs.aws.amazon.com/goto/WebAPI/AWSApplicationCostProfiler-2020-09-10/UpdateReportDefinition 598 func (c *ApplicationCostProfiler) UpdateReportDefinition(input *UpdateReportDefinitionInput) (*UpdateReportDefinitionOutput, error) { 599 req, out := c.UpdateReportDefinitionRequest(input) 600 return out, req.Send() 601 } 602 603 // UpdateReportDefinitionWithContext is the same as UpdateReportDefinition with the addition of 604 // the ability to pass a context and additional request options. 605 // 606 // See UpdateReportDefinition for details on how to use this API operation. 607 // 608 // The context must be non-nil and will be used for request cancellation. If 609 // the context is nil a panic will occur. In the future the SDK may create 610 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 611 // for more information on using Contexts. 612 func (c *ApplicationCostProfiler) UpdateReportDefinitionWithContext(ctx aws.Context, input *UpdateReportDefinitionInput, opts ...request.Option) (*UpdateReportDefinitionOutput, error) { 613 req, out := c.UpdateReportDefinitionRequest(input) 614 req.SetContext(ctx) 615 req.ApplyOptions(opts...) 616 return out, req.Send() 617 } 618 619 // You do not have permission to perform this action. 620 type AccessDeniedException struct { 621 _ struct{} `type:"structure"` 622 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 623 624 Message_ *string `locationName:"message" type:"string"` 625 } 626 627 // String returns the string representation. 628 // 629 // API parameter values that are decorated as "sensitive" in the API will not 630 // be included in the string output. The member name will be present, but the 631 // value will be replaced with "sensitive". 632 func (s AccessDeniedException) String() string { 633 return awsutil.Prettify(s) 634 } 635 636 // GoString returns the string representation. 637 // 638 // API parameter values that are decorated as "sensitive" in the API will not 639 // be included in the string output. The member name will be present, but the 640 // value will be replaced with "sensitive". 641 func (s AccessDeniedException) GoString() string { 642 return s.String() 643 } 644 645 func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { 646 return &AccessDeniedException{ 647 RespMetadata: v, 648 } 649 } 650 651 // Code returns the exception type name. 652 func (s *AccessDeniedException) Code() string { 653 return "AccessDeniedException" 654 } 655 656 // Message returns the exception's message. 657 func (s *AccessDeniedException) Message() string { 658 if s.Message_ != nil { 659 return *s.Message_ 660 } 661 return "" 662 } 663 664 // OrigErr always returns nil, satisfies awserr.Error interface. 665 func (s *AccessDeniedException) OrigErr() error { 666 return nil 667 } 668 669 func (s *AccessDeniedException) Error() string { 670 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 671 } 672 673 // Status code returns the HTTP status code for the request's response error. 674 func (s *AccessDeniedException) StatusCode() int { 675 return s.RespMetadata.StatusCode 676 } 677 678 // RequestID returns the service's response RequestID for request. 679 func (s *AccessDeniedException) RequestID() string { 680 return s.RespMetadata.RequestID 681 } 682 683 type DeleteReportDefinitionInput struct { 684 _ struct{} `type:"structure" nopayload:"true"` 685 686 // Required. ID of the report to delete. 687 // 688 // ReportId is a required field 689 ReportId *string `location:"uri" locationName:"reportId" min:"1" type:"string" required:"true"` 690 } 691 692 // String returns the string representation. 693 // 694 // API parameter values that are decorated as "sensitive" in the API will not 695 // be included in the string output. The member name will be present, but the 696 // value will be replaced with "sensitive". 697 func (s DeleteReportDefinitionInput) String() string { 698 return awsutil.Prettify(s) 699 } 700 701 // GoString returns the string representation. 702 // 703 // API parameter values that are decorated as "sensitive" in the API will not 704 // be included in the string output. The member name will be present, but the 705 // value will be replaced with "sensitive". 706 func (s DeleteReportDefinitionInput) GoString() string { 707 return s.String() 708 } 709 710 // Validate inspects the fields of the type to determine if they are valid. 711 func (s *DeleteReportDefinitionInput) Validate() error { 712 invalidParams := request.ErrInvalidParams{Context: "DeleteReportDefinitionInput"} 713 if s.ReportId == nil { 714 invalidParams.Add(request.NewErrParamRequired("ReportId")) 715 } 716 if s.ReportId != nil && len(*s.ReportId) < 1 { 717 invalidParams.Add(request.NewErrParamMinLen("ReportId", 1)) 718 } 719 720 if invalidParams.Len() > 0 { 721 return invalidParams 722 } 723 return nil 724 } 725 726 // SetReportId sets the ReportId field's value. 727 func (s *DeleteReportDefinitionInput) SetReportId(v string) *DeleteReportDefinitionInput { 728 s.ReportId = &v 729 return s 730 } 731 732 type DeleteReportDefinitionOutput struct { 733 _ struct{} `type:"structure"` 734 735 // ID of the report that was deleted. 736 ReportId *string `locationName:"reportId" min:"1" type:"string"` 737 } 738 739 // String returns the string representation. 740 // 741 // API parameter values that are decorated as "sensitive" in the API will not 742 // be included in the string output. The member name will be present, but the 743 // value will be replaced with "sensitive". 744 func (s DeleteReportDefinitionOutput) String() string { 745 return awsutil.Prettify(s) 746 } 747 748 // GoString returns the string representation. 749 // 750 // API parameter values that are decorated as "sensitive" in the API will not 751 // be included in the string output. The member name will be present, but the 752 // value will be replaced with "sensitive". 753 func (s DeleteReportDefinitionOutput) GoString() string { 754 return s.String() 755 } 756 757 // SetReportId sets the ReportId field's value. 758 func (s *DeleteReportDefinitionOutput) SetReportId(v string) *DeleteReportDefinitionOutput { 759 s.ReportId = &v 760 return s 761 } 762 763 type GetReportDefinitionInput struct { 764 _ struct{} `type:"structure" nopayload:"true"` 765 766 // ID of the report to retrieve. 767 // 768 // ReportId is a required field 769 ReportId *string `location:"uri" locationName:"reportId" min:"1" type:"string" required:"true"` 770 } 771 772 // String returns the string representation. 773 // 774 // API parameter values that are decorated as "sensitive" in the API will not 775 // be included in the string output. The member name will be present, but the 776 // value will be replaced with "sensitive". 777 func (s GetReportDefinitionInput) String() string { 778 return awsutil.Prettify(s) 779 } 780 781 // GoString returns the string representation. 782 // 783 // API parameter values that are decorated as "sensitive" in the API will not 784 // be included in the string output. The member name will be present, but the 785 // value will be replaced with "sensitive". 786 func (s GetReportDefinitionInput) GoString() string { 787 return s.String() 788 } 789 790 // Validate inspects the fields of the type to determine if they are valid. 791 func (s *GetReportDefinitionInput) Validate() error { 792 invalidParams := request.ErrInvalidParams{Context: "GetReportDefinitionInput"} 793 if s.ReportId == nil { 794 invalidParams.Add(request.NewErrParamRequired("ReportId")) 795 } 796 if s.ReportId != nil && len(*s.ReportId) < 1 { 797 invalidParams.Add(request.NewErrParamMinLen("ReportId", 1)) 798 } 799 800 if invalidParams.Len() > 0 { 801 return invalidParams 802 } 803 return nil 804 } 805 806 // SetReportId sets the ReportId field's value. 807 func (s *GetReportDefinitionInput) SetReportId(v string) *GetReportDefinitionInput { 808 s.ReportId = &v 809 return s 810 } 811 812 type GetReportDefinitionOutput struct { 813 _ struct{} `type:"structure"` 814 815 // Timestamp (milliseconds) when this report definition was created. 816 // 817 // CreatedAt is a required field 818 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` 819 820 // Amazon Simple Storage Service (Amazon S3) location where the report is uploaded. 821 // 822 // DestinationS3Location is a required field 823 DestinationS3Location *S3Location `locationName:"destinationS3Location" type:"structure" required:"true"` 824 825 // Format of the generated report. 826 // 827 // Format is a required field 828 Format *string `locationName:"format" type:"string" required:"true" enum:"Format"` 829 830 // Timestamp (milliseconds) when this report definition was last updated. 831 // 832 // LastUpdated is a required field 833 LastUpdated *time.Time `locationName:"lastUpdated" type:"timestamp" required:"true"` 834 835 // Description of the report. 836 // 837 // ReportDescription is a required field 838 ReportDescription *string `locationName:"reportDescription" min:"1" type:"string" required:"true"` 839 840 // Cadence used to generate the report. 841 // 842 // ReportFrequency is a required field 843 ReportFrequency *string `locationName:"reportFrequency" type:"string" required:"true" enum:"ReportFrequency"` 844 845 // ID of the report retrieved. 846 // 847 // ReportId is a required field 848 ReportId *string `locationName:"reportId" min:"1" type:"string" required:"true"` 849 } 850 851 // String returns the string representation. 852 // 853 // API parameter values that are decorated as "sensitive" in the API will not 854 // be included in the string output. The member name will be present, but the 855 // value will be replaced with "sensitive". 856 func (s GetReportDefinitionOutput) String() string { 857 return awsutil.Prettify(s) 858 } 859 860 // GoString returns the string representation. 861 // 862 // API parameter values that are decorated as "sensitive" in the API will not 863 // be included in the string output. The member name will be present, but the 864 // value will be replaced with "sensitive". 865 func (s GetReportDefinitionOutput) GoString() string { 866 return s.String() 867 } 868 869 // SetCreatedAt sets the CreatedAt field's value. 870 func (s *GetReportDefinitionOutput) SetCreatedAt(v time.Time) *GetReportDefinitionOutput { 871 s.CreatedAt = &v 872 return s 873 } 874 875 // SetDestinationS3Location sets the DestinationS3Location field's value. 876 func (s *GetReportDefinitionOutput) SetDestinationS3Location(v *S3Location) *GetReportDefinitionOutput { 877 s.DestinationS3Location = v 878 return s 879 } 880 881 // SetFormat sets the Format field's value. 882 func (s *GetReportDefinitionOutput) SetFormat(v string) *GetReportDefinitionOutput { 883 s.Format = &v 884 return s 885 } 886 887 // SetLastUpdated sets the LastUpdated field's value. 888 func (s *GetReportDefinitionOutput) SetLastUpdated(v time.Time) *GetReportDefinitionOutput { 889 s.LastUpdated = &v 890 return s 891 } 892 893 // SetReportDescription sets the ReportDescription field's value. 894 func (s *GetReportDefinitionOutput) SetReportDescription(v string) *GetReportDefinitionOutput { 895 s.ReportDescription = &v 896 return s 897 } 898 899 // SetReportFrequency sets the ReportFrequency field's value. 900 func (s *GetReportDefinitionOutput) SetReportFrequency(v string) *GetReportDefinitionOutput { 901 s.ReportFrequency = &v 902 return s 903 } 904 905 // SetReportId sets the ReportId field's value. 906 func (s *GetReportDefinitionOutput) SetReportId(v string) *GetReportDefinitionOutput { 907 s.ReportId = &v 908 return s 909 } 910 911 type ImportApplicationUsageInput struct { 912 _ struct{} `type:"structure"` 913 914 // Amazon S3 location to import application usage data from. 915 // 916 // SourceS3Location is a required field 917 SourceS3Location *SourceS3Location `locationName:"sourceS3Location" type:"structure" required:"true"` 918 } 919 920 // String returns the string representation. 921 // 922 // API parameter values that are decorated as "sensitive" in the API will not 923 // be included in the string output. The member name will be present, but the 924 // value will be replaced with "sensitive". 925 func (s ImportApplicationUsageInput) String() string { 926 return awsutil.Prettify(s) 927 } 928 929 // GoString returns the string representation. 930 // 931 // API parameter values that are decorated as "sensitive" in the API will not 932 // be included in the string output. The member name will be present, but the 933 // value will be replaced with "sensitive". 934 func (s ImportApplicationUsageInput) GoString() string { 935 return s.String() 936 } 937 938 // Validate inspects the fields of the type to determine if they are valid. 939 func (s *ImportApplicationUsageInput) Validate() error { 940 invalidParams := request.ErrInvalidParams{Context: "ImportApplicationUsageInput"} 941 if s.SourceS3Location == nil { 942 invalidParams.Add(request.NewErrParamRequired("SourceS3Location")) 943 } 944 if s.SourceS3Location != nil { 945 if err := s.SourceS3Location.Validate(); err != nil { 946 invalidParams.AddNested("SourceS3Location", err.(request.ErrInvalidParams)) 947 } 948 } 949 950 if invalidParams.Len() > 0 { 951 return invalidParams 952 } 953 return nil 954 } 955 956 // SetSourceS3Location sets the SourceS3Location field's value. 957 func (s *ImportApplicationUsageInput) SetSourceS3Location(v *SourceS3Location) *ImportApplicationUsageInput { 958 s.SourceS3Location = v 959 return s 960 } 961 962 type ImportApplicationUsageOutput struct { 963 _ struct{} `type:"structure"` 964 965 // ID of the import request. 966 // 967 // ImportId is a required field 968 ImportId *string `locationName:"importId" min:"1" type:"string" required:"true"` 969 } 970 971 // String returns the string representation. 972 // 973 // API parameter values that are decorated as "sensitive" in the API will not 974 // be included in the string output. The member name will be present, but the 975 // value will be replaced with "sensitive". 976 func (s ImportApplicationUsageOutput) String() string { 977 return awsutil.Prettify(s) 978 } 979 980 // GoString returns the string representation. 981 // 982 // API parameter values that are decorated as "sensitive" in the API will not 983 // be included in the string output. The member name will be present, but the 984 // value will be replaced with "sensitive". 985 func (s ImportApplicationUsageOutput) GoString() string { 986 return s.String() 987 } 988 989 // SetImportId sets the ImportId field's value. 990 func (s *ImportApplicationUsageOutput) SetImportId(v string) *ImportApplicationUsageOutput { 991 s.ImportId = &v 992 return s 993 } 994 995 // An internal server error occurred. Retry your request. 996 type InternalServerException struct { 997 _ struct{} `type:"structure"` 998 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 999 1000 Message_ *string `locationName:"message" type:"string"` 1001 } 1002 1003 // String returns the string representation. 1004 // 1005 // API parameter values that are decorated as "sensitive" in the API will not 1006 // be included in the string output. The member name will be present, but the 1007 // value will be replaced with "sensitive". 1008 func (s InternalServerException) String() string { 1009 return awsutil.Prettify(s) 1010 } 1011 1012 // GoString returns the string representation. 1013 // 1014 // API parameter values that are decorated as "sensitive" in the API will not 1015 // be included in the string output. The member name will be present, but the 1016 // value will be replaced with "sensitive". 1017 func (s InternalServerException) GoString() string { 1018 return s.String() 1019 } 1020 1021 func newErrorInternalServerException(v protocol.ResponseMetadata) error { 1022 return &InternalServerException{ 1023 RespMetadata: v, 1024 } 1025 } 1026 1027 // Code returns the exception type name. 1028 func (s *InternalServerException) Code() string { 1029 return "InternalServerException" 1030 } 1031 1032 // Message returns the exception's message. 1033 func (s *InternalServerException) Message() string { 1034 if s.Message_ != nil { 1035 return *s.Message_ 1036 } 1037 return "" 1038 } 1039 1040 // OrigErr always returns nil, satisfies awserr.Error interface. 1041 func (s *InternalServerException) OrigErr() error { 1042 return nil 1043 } 1044 1045 func (s *InternalServerException) Error() string { 1046 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1047 } 1048 1049 // Status code returns the HTTP status code for the request's response error. 1050 func (s *InternalServerException) StatusCode() int { 1051 return s.RespMetadata.StatusCode 1052 } 1053 1054 // RequestID returns the service's response RequestID for request. 1055 func (s *InternalServerException) RequestID() string { 1056 return s.RespMetadata.RequestID 1057 } 1058 1059 type ListReportDefinitionsInput struct { 1060 _ struct{} `type:"structure" nopayload:"true"` 1061 1062 // The maximum number of results to return. 1063 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 1064 1065 // The token value from a previous call to access the next page of results. 1066 NextToken *string `location:"querystring" locationName:"nextToken" min:"1" type:"string"` 1067 } 1068 1069 // String returns the string representation. 1070 // 1071 // API parameter values that are decorated as "sensitive" in the API will not 1072 // be included in the string output. The member name will be present, but the 1073 // value will be replaced with "sensitive". 1074 func (s ListReportDefinitionsInput) String() string { 1075 return awsutil.Prettify(s) 1076 } 1077 1078 // GoString returns the string representation. 1079 // 1080 // API parameter values that are decorated as "sensitive" in the API will not 1081 // be included in the string output. The member name will be present, but the 1082 // value will be replaced with "sensitive". 1083 func (s ListReportDefinitionsInput) GoString() string { 1084 return s.String() 1085 } 1086 1087 // Validate inspects the fields of the type to determine if they are valid. 1088 func (s *ListReportDefinitionsInput) Validate() error { 1089 invalidParams := request.ErrInvalidParams{Context: "ListReportDefinitionsInput"} 1090 if s.MaxResults != nil && *s.MaxResults < 1 { 1091 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 1092 } 1093 if s.NextToken != nil && len(*s.NextToken) < 1 { 1094 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 1095 } 1096 1097 if invalidParams.Len() > 0 { 1098 return invalidParams 1099 } 1100 return nil 1101 } 1102 1103 // SetMaxResults sets the MaxResults field's value. 1104 func (s *ListReportDefinitionsInput) SetMaxResults(v int64) *ListReportDefinitionsInput { 1105 s.MaxResults = &v 1106 return s 1107 } 1108 1109 // SetNextToken sets the NextToken field's value. 1110 func (s *ListReportDefinitionsInput) SetNextToken(v string) *ListReportDefinitionsInput { 1111 s.NextToken = &v 1112 return s 1113 } 1114 1115 type ListReportDefinitionsOutput struct { 1116 _ struct{} `type:"structure"` 1117 1118 // The value of the next token, if it exists. Null if there are no more results. 1119 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 1120 1121 // The retrieved reports. 1122 ReportDefinitions []*ReportDefinition `locationName:"reportDefinitions" type:"list"` 1123 } 1124 1125 // String returns the string representation. 1126 // 1127 // API parameter values that are decorated as "sensitive" in the API will not 1128 // be included in the string output. The member name will be present, but the 1129 // value will be replaced with "sensitive". 1130 func (s ListReportDefinitionsOutput) String() string { 1131 return awsutil.Prettify(s) 1132 } 1133 1134 // GoString returns the string representation. 1135 // 1136 // API parameter values that are decorated as "sensitive" in the API will not 1137 // be included in the string output. The member name will be present, but the 1138 // value will be replaced with "sensitive". 1139 func (s ListReportDefinitionsOutput) GoString() string { 1140 return s.String() 1141 } 1142 1143 // SetNextToken sets the NextToken field's value. 1144 func (s *ListReportDefinitionsOutput) SetNextToken(v string) *ListReportDefinitionsOutput { 1145 s.NextToken = &v 1146 return s 1147 } 1148 1149 // SetReportDefinitions sets the ReportDefinitions field's value. 1150 func (s *ListReportDefinitionsOutput) SetReportDefinitions(v []*ReportDefinition) *ListReportDefinitionsOutput { 1151 s.ReportDefinitions = v 1152 return s 1153 } 1154 1155 type PutReportDefinitionInput struct { 1156 _ struct{} `type:"structure"` 1157 1158 // Required. Amazon Simple Storage Service (Amazon S3) location where Application 1159 // Cost Profiler uploads the report. 1160 // 1161 // DestinationS3Location is a required field 1162 DestinationS3Location *S3Location `locationName:"destinationS3Location" type:"structure" required:"true"` 1163 1164 // Required. The format to use for the generated report. 1165 // 1166 // Format is a required field 1167 Format *string `locationName:"format" type:"string" required:"true" enum:"Format"` 1168 1169 // Required. Description of the report. 1170 // 1171 // ReportDescription is a required field 1172 ReportDescription *string `locationName:"reportDescription" min:"1" type:"string" required:"true"` 1173 1174 // Required. The cadence to generate the report. 1175 // 1176 // ReportFrequency is a required field 1177 ReportFrequency *string `locationName:"reportFrequency" type:"string" required:"true" enum:"ReportFrequency"` 1178 1179 // Required. ID of the report. You can choose any valid string matching the 1180 // pattern for the ID. 1181 // 1182 // ReportId is a required field 1183 ReportId *string `locationName:"reportId" min:"1" type:"string" required:"true"` 1184 } 1185 1186 // String returns the string representation. 1187 // 1188 // API parameter values that are decorated as "sensitive" in the API will not 1189 // be included in the string output. The member name will be present, but the 1190 // value will be replaced with "sensitive". 1191 func (s PutReportDefinitionInput) String() string { 1192 return awsutil.Prettify(s) 1193 } 1194 1195 // GoString returns the string representation. 1196 // 1197 // API parameter values that are decorated as "sensitive" in the API will not 1198 // be included in the string output. The member name will be present, but the 1199 // value will be replaced with "sensitive". 1200 func (s PutReportDefinitionInput) GoString() string { 1201 return s.String() 1202 } 1203 1204 // Validate inspects the fields of the type to determine if they are valid. 1205 func (s *PutReportDefinitionInput) Validate() error { 1206 invalidParams := request.ErrInvalidParams{Context: "PutReportDefinitionInput"} 1207 if s.DestinationS3Location == nil { 1208 invalidParams.Add(request.NewErrParamRequired("DestinationS3Location")) 1209 } 1210 if s.Format == nil { 1211 invalidParams.Add(request.NewErrParamRequired("Format")) 1212 } 1213 if s.ReportDescription == nil { 1214 invalidParams.Add(request.NewErrParamRequired("ReportDescription")) 1215 } 1216 if s.ReportDescription != nil && len(*s.ReportDescription) < 1 { 1217 invalidParams.Add(request.NewErrParamMinLen("ReportDescription", 1)) 1218 } 1219 if s.ReportFrequency == nil { 1220 invalidParams.Add(request.NewErrParamRequired("ReportFrequency")) 1221 } 1222 if s.ReportId == nil { 1223 invalidParams.Add(request.NewErrParamRequired("ReportId")) 1224 } 1225 if s.ReportId != nil && len(*s.ReportId) < 1 { 1226 invalidParams.Add(request.NewErrParamMinLen("ReportId", 1)) 1227 } 1228 if s.DestinationS3Location != nil { 1229 if err := s.DestinationS3Location.Validate(); err != nil { 1230 invalidParams.AddNested("DestinationS3Location", err.(request.ErrInvalidParams)) 1231 } 1232 } 1233 1234 if invalidParams.Len() > 0 { 1235 return invalidParams 1236 } 1237 return nil 1238 } 1239 1240 // SetDestinationS3Location sets the DestinationS3Location field's value. 1241 func (s *PutReportDefinitionInput) SetDestinationS3Location(v *S3Location) *PutReportDefinitionInput { 1242 s.DestinationS3Location = v 1243 return s 1244 } 1245 1246 // SetFormat sets the Format field's value. 1247 func (s *PutReportDefinitionInput) SetFormat(v string) *PutReportDefinitionInput { 1248 s.Format = &v 1249 return s 1250 } 1251 1252 // SetReportDescription sets the ReportDescription field's value. 1253 func (s *PutReportDefinitionInput) SetReportDescription(v string) *PutReportDefinitionInput { 1254 s.ReportDescription = &v 1255 return s 1256 } 1257 1258 // SetReportFrequency sets the ReportFrequency field's value. 1259 func (s *PutReportDefinitionInput) SetReportFrequency(v string) *PutReportDefinitionInput { 1260 s.ReportFrequency = &v 1261 return s 1262 } 1263 1264 // SetReportId sets the ReportId field's value. 1265 func (s *PutReportDefinitionInput) SetReportId(v string) *PutReportDefinitionInput { 1266 s.ReportId = &v 1267 return s 1268 } 1269 1270 type PutReportDefinitionOutput struct { 1271 _ struct{} `type:"structure"` 1272 1273 // ID of the report. 1274 ReportId *string `locationName:"reportId" min:"1" type:"string"` 1275 } 1276 1277 // String returns the string representation. 1278 // 1279 // API parameter values that are decorated as "sensitive" in the API will not 1280 // be included in the string output. The member name will be present, but the 1281 // value will be replaced with "sensitive". 1282 func (s PutReportDefinitionOutput) String() string { 1283 return awsutil.Prettify(s) 1284 } 1285 1286 // GoString returns the string representation. 1287 // 1288 // API parameter values that are decorated as "sensitive" in the API will not 1289 // be included in the string output. The member name will be present, but the 1290 // value will be replaced with "sensitive". 1291 func (s PutReportDefinitionOutput) GoString() string { 1292 return s.String() 1293 } 1294 1295 // SetReportId sets the ReportId field's value. 1296 func (s *PutReportDefinitionOutput) SetReportId(v string) *PutReportDefinitionOutput { 1297 s.ReportId = &v 1298 return s 1299 } 1300 1301 // The configuration of a report in AWS Application Cost Profiler. 1302 type ReportDefinition struct { 1303 _ struct{} `type:"structure"` 1304 1305 // Timestamp (milliseconds) when this report definition was created. 1306 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` 1307 1308 // The location in Amazon Simple Storage Service (Amazon S3) the reports should 1309 // be saved to. 1310 DestinationS3Location *S3Location `locationName:"destinationS3Location" type:"structure"` 1311 1312 // The format used for the generated reports. 1313 Format *string `locationName:"format" type:"string" enum:"Format"` 1314 1315 // Timestamp (milliseconds) when this report definition was last updated. 1316 LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` 1317 1318 // Description of the report 1319 ReportDescription *string `locationName:"reportDescription" min:"1" type:"string"` 1320 1321 // The cadence at which the report is generated. 1322 ReportFrequency *string `locationName:"reportFrequency" type:"string" enum:"ReportFrequency"` 1323 1324 // The ID of the report. 1325 ReportId *string `locationName:"reportId" min:"1" type:"string"` 1326 } 1327 1328 // String returns the string representation. 1329 // 1330 // API parameter values that are decorated as "sensitive" in the API will not 1331 // be included in the string output. The member name will be present, but the 1332 // value will be replaced with "sensitive". 1333 func (s ReportDefinition) String() string { 1334 return awsutil.Prettify(s) 1335 } 1336 1337 // GoString returns the string representation. 1338 // 1339 // API parameter values that are decorated as "sensitive" in the API will not 1340 // be included in the string output. The member name will be present, but the 1341 // value will be replaced with "sensitive". 1342 func (s ReportDefinition) GoString() string { 1343 return s.String() 1344 } 1345 1346 // SetCreatedAt sets the CreatedAt field's value. 1347 func (s *ReportDefinition) SetCreatedAt(v time.Time) *ReportDefinition { 1348 s.CreatedAt = &v 1349 return s 1350 } 1351 1352 // SetDestinationS3Location sets the DestinationS3Location field's value. 1353 func (s *ReportDefinition) SetDestinationS3Location(v *S3Location) *ReportDefinition { 1354 s.DestinationS3Location = v 1355 return s 1356 } 1357 1358 // SetFormat sets the Format field's value. 1359 func (s *ReportDefinition) SetFormat(v string) *ReportDefinition { 1360 s.Format = &v 1361 return s 1362 } 1363 1364 // SetLastUpdatedAt sets the LastUpdatedAt field's value. 1365 func (s *ReportDefinition) SetLastUpdatedAt(v time.Time) *ReportDefinition { 1366 s.LastUpdatedAt = &v 1367 return s 1368 } 1369 1370 // SetReportDescription sets the ReportDescription field's value. 1371 func (s *ReportDefinition) SetReportDescription(v string) *ReportDefinition { 1372 s.ReportDescription = &v 1373 return s 1374 } 1375 1376 // SetReportFrequency sets the ReportFrequency field's value. 1377 func (s *ReportDefinition) SetReportFrequency(v string) *ReportDefinition { 1378 s.ReportFrequency = &v 1379 return s 1380 } 1381 1382 // SetReportId sets the ReportId field's value. 1383 func (s *ReportDefinition) SetReportId(v string) *ReportDefinition { 1384 s.ReportId = &v 1385 return s 1386 } 1387 1388 // Represents the Amazon Simple Storage Service (Amazon S3) location where AWS 1389 // Application Cost Profiler reports are generated and then written to. 1390 type S3Location struct { 1391 _ struct{} `type:"structure"` 1392 1393 // Name of the S3 bucket. 1394 // 1395 // Bucket is a required field 1396 Bucket *string `locationName:"bucket" min:"3" type:"string" required:"true"` 1397 1398 // Prefix for the location to write to. 1399 // 1400 // Prefix is a required field 1401 Prefix *string `locationName:"prefix" min:"1" type:"string" required:"true"` 1402 } 1403 1404 // String returns the string representation. 1405 // 1406 // API parameter values that are decorated as "sensitive" in the API will not 1407 // be included in the string output. The member name will be present, but the 1408 // value will be replaced with "sensitive". 1409 func (s S3Location) String() string { 1410 return awsutil.Prettify(s) 1411 } 1412 1413 // GoString returns the string representation. 1414 // 1415 // API parameter values that are decorated as "sensitive" in the API will not 1416 // be included in the string output. The member name will be present, but the 1417 // value will be replaced with "sensitive". 1418 func (s S3Location) GoString() string { 1419 return s.String() 1420 } 1421 1422 // Validate inspects the fields of the type to determine if they are valid. 1423 func (s *S3Location) Validate() error { 1424 invalidParams := request.ErrInvalidParams{Context: "S3Location"} 1425 if s.Bucket == nil { 1426 invalidParams.Add(request.NewErrParamRequired("Bucket")) 1427 } 1428 if s.Bucket != nil && len(*s.Bucket) < 3 { 1429 invalidParams.Add(request.NewErrParamMinLen("Bucket", 3)) 1430 } 1431 if s.Prefix == nil { 1432 invalidParams.Add(request.NewErrParamRequired("Prefix")) 1433 } 1434 if s.Prefix != nil && len(*s.Prefix) < 1 { 1435 invalidParams.Add(request.NewErrParamMinLen("Prefix", 1)) 1436 } 1437 1438 if invalidParams.Len() > 0 { 1439 return invalidParams 1440 } 1441 return nil 1442 } 1443 1444 // SetBucket sets the Bucket field's value. 1445 func (s *S3Location) SetBucket(v string) *S3Location { 1446 s.Bucket = &v 1447 return s 1448 } 1449 1450 // SetPrefix sets the Prefix field's value. 1451 func (s *S3Location) SetPrefix(v string) *S3Location { 1452 s.Prefix = &v 1453 return s 1454 } 1455 1456 // Your request exceeds one or more of the service quotas. 1457 type ServiceQuotaExceededException struct { 1458 _ struct{} `type:"structure"` 1459 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1460 1461 Message_ *string `locationName:"message" type:"string"` 1462 } 1463 1464 // String returns the string representation. 1465 // 1466 // API parameter values that are decorated as "sensitive" in the API will not 1467 // be included in the string output. The member name will be present, but the 1468 // value will be replaced with "sensitive". 1469 func (s ServiceQuotaExceededException) String() string { 1470 return awsutil.Prettify(s) 1471 } 1472 1473 // GoString returns the string representation. 1474 // 1475 // API parameter values that are decorated as "sensitive" in the API will not 1476 // be included in the string output. The member name will be present, but the 1477 // value will be replaced with "sensitive". 1478 func (s ServiceQuotaExceededException) GoString() string { 1479 return s.String() 1480 } 1481 1482 func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error { 1483 return &ServiceQuotaExceededException{ 1484 RespMetadata: v, 1485 } 1486 } 1487 1488 // Code returns the exception type name. 1489 func (s *ServiceQuotaExceededException) Code() string { 1490 return "ServiceQuotaExceededException" 1491 } 1492 1493 // Message returns the exception's message. 1494 func (s *ServiceQuotaExceededException) Message() string { 1495 if s.Message_ != nil { 1496 return *s.Message_ 1497 } 1498 return "" 1499 } 1500 1501 // OrigErr always returns nil, satisfies awserr.Error interface. 1502 func (s *ServiceQuotaExceededException) OrigErr() error { 1503 return nil 1504 } 1505 1506 func (s *ServiceQuotaExceededException) Error() string { 1507 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1508 } 1509 1510 // Status code returns the HTTP status code for the request's response error. 1511 func (s *ServiceQuotaExceededException) StatusCode() int { 1512 return s.RespMetadata.StatusCode 1513 } 1514 1515 // RequestID returns the service's response RequestID for request. 1516 func (s *ServiceQuotaExceededException) RequestID() string { 1517 return s.RespMetadata.RequestID 1518 } 1519 1520 // Represents the Amazon Simple Storage Service (Amazon S3) location where usage 1521 // data is read from. 1522 type SourceS3Location struct { 1523 _ struct{} `type:"structure"` 1524 1525 // Name of the bucket. 1526 // 1527 // Bucket is a required field 1528 Bucket *string `locationName:"bucket" min:"3" type:"string" required:"true"` 1529 1530 // Key of the object. 1531 // 1532 // Key is a required field 1533 Key *string `locationName:"key" min:"1" type:"string" required:"true"` 1534 1535 // Region of the bucket. Only required for Regions that are disabled by default. 1536 // For more infomration about Regions that are disabled by default, see Enabling 1537 // a Region (https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable) 1538 // in the AWS General Reference guide. 1539 Region *string `locationName:"region" type:"string" enum:"S3BucketRegion"` 1540 } 1541 1542 // String returns the string representation. 1543 // 1544 // API parameter values that are decorated as "sensitive" in the API will not 1545 // be included in the string output. The member name will be present, but the 1546 // value will be replaced with "sensitive". 1547 func (s SourceS3Location) String() string { 1548 return awsutil.Prettify(s) 1549 } 1550 1551 // GoString returns the string representation. 1552 // 1553 // API parameter values that are decorated as "sensitive" in the API will not 1554 // be included in the string output. The member name will be present, but the 1555 // value will be replaced with "sensitive". 1556 func (s SourceS3Location) GoString() string { 1557 return s.String() 1558 } 1559 1560 // Validate inspects the fields of the type to determine if they are valid. 1561 func (s *SourceS3Location) Validate() error { 1562 invalidParams := request.ErrInvalidParams{Context: "SourceS3Location"} 1563 if s.Bucket == nil { 1564 invalidParams.Add(request.NewErrParamRequired("Bucket")) 1565 } 1566 if s.Bucket != nil && len(*s.Bucket) < 3 { 1567 invalidParams.Add(request.NewErrParamMinLen("Bucket", 3)) 1568 } 1569 if s.Key == nil { 1570 invalidParams.Add(request.NewErrParamRequired("Key")) 1571 } 1572 if s.Key != nil && len(*s.Key) < 1 { 1573 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 1574 } 1575 1576 if invalidParams.Len() > 0 { 1577 return invalidParams 1578 } 1579 return nil 1580 } 1581 1582 // SetBucket sets the Bucket field's value. 1583 func (s *SourceS3Location) SetBucket(v string) *SourceS3Location { 1584 s.Bucket = &v 1585 return s 1586 } 1587 1588 // SetKey sets the Key field's value. 1589 func (s *SourceS3Location) SetKey(v string) *SourceS3Location { 1590 s.Key = &v 1591 return s 1592 } 1593 1594 // SetRegion sets the Region field's value. 1595 func (s *SourceS3Location) SetRegion(v string) *SourceS3Location { 1596 s.Region = &v 1597 return s 1598 } 1599 1600 // The calls to AWS Application Cost Profiler API are throttled. The request 1601 // was denied. 1602 type ThrottlingException struct { 1603 _ struct{} `type:"structure"` 1604 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1605 1606 Message_ *string `locationName:"message" type:"string"` 1607 } 1608 1609 // String returns the string representation. 1610 // 1611 // API parameter values that are decorated as "sensitive" in the API will not 1612 // be included in the string output. The member name will be present, but the 1613 // value will be replaced with "sensitive". 1614 func (s ThrottlingException) String() string { 1615 return awsutil.Prettify(s) 1616 } 1617 1618 // GoString returns the string representation. 1619 // 1620 // API parameter values that are decorated as "sensitive" in the API will not 1621 // be included in the string output. The member name will be present, but the 1622 // value will be replaced with "sensitive". 1623 func (s ThrottlingException) GoString() string { 1624 return s.String() 1625 } 1626 1627 func newErrorThrottlingException(v protocol.ResponseMetadata) error { 1628 return &ThrottlingException{ 1629 RespMetadata: v, 1630 } 1631 } 1632 1633 // Code returns the exception type name. 1634 func (s *ThrottlingException) Code() string { 1635 return "ThrottlingException" 1636 } 1637 1638 // Message returns the exception's message. 1639 func (s *ThrottlingException) Message() string { 1640 if s.Message_ != nil { 1641 return *s.Message_ 1642 } 1643 return "" 1644 } 1645 1646 // OrigErr always returns nil, satisfies awserr.Error interface. 1647 func (s *ThrottlingException) OrigErr() error { 1648 return nil 1649 } 1650 1651 func (s *ThrottlingException) Error() string { 1652 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1653 } 1654 1655 // Status code returns the HTTP status code for the request's response error. 1656 func (s *ThrottlingException) StatusCode() int { 1657 return s.RespMetadata.StatusCode 1658 } 1659 1660 // RequestID returns the service's response RequestID for request. 1661 func (s *ThrottlingException) RequestID() string { 1662 return s.RespMetadata.RequestID 1663 } 1664 1665 type UpdateReportDefinitionInput struct { 1666 _ struct{} `type:"structure"` 1667 1668 // Required. Amazon Simple Storage Service (Amazon S3) location where Application 1669 // Cost Profiler uploads the report. 1670 // 1671 // DestinationS3Location is a required field 1672 DestinationS3Location *S3Location `locationName:"destinationS3Location" type:"structure" required:"true"` 1673 1674 // Required. The format to use for the generated report. 1675 // 1676 // Format is a required field 1677 Format *string `locationName:"format" type:"string" required:"true" enum:"Format"` 1678 1679 // Required. Description of the report. 1680 // 1681 // ReportDescription is a required field 1682 ReportDescription *string `locationName:"reportDescription" min:"1" type:"string" required:"true"` 1683 1684 // Required. The cadence to generate the report. 1685 // 1686 // ReportFrequency is a required field 1687 ReportFrequency *string `locationName:"reportFrequency" type:"string" required:"true" enum:"ReportFrequency"` 1688 1689 // Required. ID of the report to update. 1690 // 1691 // ReportId is a required field 1692 ReportId *string `location:"uri" locationName:"reportId" min:"1" type:"string" required:"true"` 1693 } 1694 1695 // String returns the string representation. 1696 // 1697 // API parameter values that are decorated as "sensitive" in the API will not 1698 // be included in the string output. The member name will be present, but the 1699 // value will be replaced with "sensitive". 1700 func (s UpdateReportDefinitionInput) String() string { 1701 return awsutil.Prettify(s) 1702 } 1703 1704 // GoString returns the string representation. 1705 // 1706 // API parameter values that are decorated as "sensitive" in the API will not 1707 // be included in the string output. The member name will be present, but the 1708 // value will be replaced with "sensitive". 1709 func (s UpdateReportDefinitionInput) GoString() string { 1710 return s.String() 1711 } 1712 1713 // Validate inspects the fields of the type to determine if they are valid. 1714 func (s *UpdateReportDefinitionInput) Validate() error { 1715 invalidParams := request.ErrInvalidParams{Context: "UpdateReportDefinitionInput"} 1716 if s.DestinationS3Location == nil { 1717 invalidParams.Add(request.NewErrParamRequired("DestinationS3Location")) 1718 } 1719 if s.Format == nil { 1720 invalidParams.Add(request.NewErrParamRequired("Format")) 1721 } 1722 if s.ReportDescription == nil { 1723 invalidParams.Add(request.NewErrParamRequired("ReportDescription")) 1724 } 1725 if s.ReportDescription != nil && len(*s.ReportDescription) < 1 { 1726 invalidParams.Add(request.NewErrParamMinLen("ReportDescription", 1)) 1727 } 1728 if s.ReportFrequency == nil { 1729 invalidParams.Add(request.NewErrParamRequired("ReportFrequency")) 1730 } 1731 if s.ReportId == nil { 1732 invalidParams.Add(request.NewErrParamRequired("ReportId")) 1733 } 1734 if s.ReportId != nil && len(*s.ReportId) < 1 { 1735 invalidParams.Add(request.NewErrParamMinLen("ReportId", 1)) 1736 } 1737 if s.DestinationS3Location != nil { 1738 if err := s.DestinationS3Location.Validate(); err != nil { 1739 invalidParams.AddNested("DestinationS3Location", err.(request.ErrInvalidParams)) 1740 } 1741 } 1742 1743 if invalidParams.Len() > 0 { 1744 return invalidParams 1745 } 1746 return nil 1747 } 1748 1749 // SetDestinationS3Location sets the DestinationS3Location field's value. 1750 func (s *UpdateReportDefinitionInput) SetDestinationS3Location(v *S3Location) *UpdateReportDefinitionInput { 1751 s.DestinationS3Location = v 1752 return s 1753 } 1754 1755 // SetFormat sets the Format field's value. 1756 func (s *UpdateReportDefinitionInput) SetFormat(v string) *UpdateReportDefinitionInput { 1757 s.Format = &v 1758 return s 1759 } 1760 1761 // SetReportDescription sets the ReportDescription field's value. 1762 func (s *UpdateReportDefinitionInput) SetReportDescription(v string) *UpdateReportDefinitionInput { 1763 s.ReportDescription = &v 1764 return s 1765 } 1766 1767 // SetReportFrequency sets the ReportFrequency field's value. 1768 func (s *UpdateReportDefinitionInput) SetReportFrequency(v string) *UpdateReportDefinitionInput { 1769 s.ReportFrequency = &v 1770 return s 1771 } 1772 1773 // SetReportId sets the ReportId field's value. 1774 func (s *UpdateReportDefinitionInput) SetReportId(v string) *UpdateReportDefinitionInput { 1775 s.ReportId = &v 1776 return s 1777 } 1778 1779 type UpdateReportDefinitionOutput struct { 1780 _ struct{} `type:"structure"` 1781 1782 // ID of the report. 1783 ReportId *string `locationName:"reportId" min:"1" type:"string"` 1784 } 1785 1786 // String returns the string representation. 1787 // 1788 // API parameter values that are decorated as "sensitive" in the API will not 1789 // be included in the string output. The member name will be present, but the 1790 // value will be replaced with "sensitive". 1791 func (s UpdateReportDefinitionOutput) String() string { 1792 return awsutil.Prettify(s) 1793 } 1794 1795 // GoString returns the string representation. 1796 // 1797 // API parameter values that are decorated as "sensitive" in the API will not 1798 // be included in the string output. The member name will be present, but the 1799 // value will be replaced with "sensitive". 1800 func (s UpdateReportDefinitionOutput) GoString() string { 1801 return s.String() 1802 } 1803 1804 // SetReportId sets the ReportId field's value. 1805 func (s *UpdateReportDefinitionOutput) SetReportId(v string) *UpdateReportDefinitionOutput { 1806 s.ReportId = &v 1807 return s 1808 } 1809 1810 // The input fails to satisfy the constraints for the API. 1811 type ValidationException struct { 1812 _ struct{} `type:"structure"` 1813 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1814 1815 Message_ *string `locationName:"message" type:"string"` 1816 } 1817 1818 // String returns the string representation. 1819 // 1820 // API parameter values that are decorated as "sensitive" in the API will not 1821 // be included in the string output. The member name will be present, but the 1822 // value will be replaced with "sensitive". 1823 func (s ValidationException) String() string { 1824 return awsutil.Prettify(s) 1825 } 1826 1827 // GoString returns the string representation. 1828 // 1829 // API parameter values that are decorated as "sensitive" in the API will not 1830 // be included in the string output. The member name will be present, but the 1831 // value will be replaced with "sensitive". 1832 func (s ValidationException) GoString() string { 1833 return s.String() 1834 } 1835 1836 func newErrorValidationException(v protocol.ResponseMetadata) error { 1837 return &ValidationException{ 1838 RespMetadata: v, 1839 } 1840 } 1841 1842 // Code returns the exception type name. 1843 func (s *ValidationException) Code() string { 1844 return "ValidationException" 1845 } 1846 1847 // Message returns the exception's message. 1848 func (s *ValidationException) Message() string { 1849 if s.Message_ != nil { 1850 return *s.Message_ 1851 } 1852 return "" 1853 } 1854 1855 // OrigErr always returns nil, satisfies awserr.Error interface. 1856 func (s *ValidationException) OrigErr() error { 1857 return nil 1858 } 1859 1860 func (s *ValidationException) Error() string { 1861 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1862 } 1863 1864 // Status code returns the HTTP status code for the request's response error. 1865 func (s *ValidationException) StatusCode() int { 1866 return s.RespMetadata.StatusCode 1867 } 1868 1869 // RequestID returns the service's response RequestID for request. 1870 func (s *ValidationException) RequestID() string { 1871 return s.RespMetadata.RequestID 1872 } 1873 1874 const ( 1875 // FormatCsv is a Format enum value 1876 FormatCsv = "CSV" 1877 1878 // FormatParquet is a Format enum value 1879 FormatParquet = "PARQUET" 1880 ) 1881 1882 // Format_Values returns all elements of the Format enum 1883 func Format_Values() []string { 1884 return []string{ 1885 FormatCsv, 1886 FormatParquet, 1887 } 1888 } 1889 1890 const ( 1891 // ReportFrequencyMonthly is a ReportFrequency enum value 1892 ReportFrequencyMonthly = "MONTHLY" 1893 1894 // ReportFrequencyDaily is a ReportFrequency enum value 1895 ReportFrequencyDaily = "DAILY" 1896 1897 // ReportFrequencyAll is a ReportFrequency enum value 1898 ReportFrequencyAll = "ALL" 1899 ) 1900 1901 // ReportFrequency_Values returns all elements of the ReportFrequency enum 1902 func ReportFrequency_Values() []string { 1903 return []string{ 1904 ReportFrequencyMonthly, 1905 ReportFrequencyDaily, 1906 ReportFrequencyAll, 1907 } 1908 } 1909 1910 const ( 1911 // S3BucketRegionApEast1 is a S3BucketRegion enum value 1912 S3BucketRegionApEast1 = "ap-east-1" 1913 1914 // S3BucketRegionMeSouth1 is a S3BucketRegion enum value 1915 S3BucketRegionMeSouth1 = "me-south-1" 1916 1917 // S3BucketRegionEuSouth1 is a S3BucketRegion enum value 1918 S3BucketRegionEuSouth1 = "eu-south-1" 1919 1920 // S3BucketRegionAfSouth1 is a S3BucketRegion enum value 1921 S3BucketRegionAfSouth1 = "af-south-1" 1922 ) 1923 1924 // S3BucketRegion_Values returns all elements of the S3BucketRegion enum 1925 func S3BucketRegion_Values() []string { 1926 return []string{ 1927 S3BucketRegionApEast1, 1928 S3BucketRegionMeSouth1, 1929 S3BucketRegionEuSouth1, 1930 S3BucketRegionAfSouth1, 1931 } 1932 }