1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package accessanalyzer 4 5import ( 6 "fmt" 7 "time" 8 9 "github.com/aws/aws-sdk-go/aws" 10 "github.com/aws/aws-sdk-go/aws/awsutil" 11 "github.com/aws/aws-sdk-go/aws/request" 12 "github.com/aws/aws-sdk-go/private/protocol" 13 "github.com/aws/aws-sdk-go/private/protocol/restjson" 14) 15 16const opCreateAnalyzer = "CreateAnalyzer" 17 18// CreateAnalyzerRequest generates a "aws/request.Request" representing the 19// client's request for the CreateAnalyzer operation. The "output" return 20// value will be populated with the request's response once the request completes 21// successfully. 22// 23// Use "Send" method on the returned Request to send the API call to the service. 24// the "output" return value is not valid until after Send returns without error. 25// 26// See CreateAnalyzer for more information on using the CreateAnalyzer 27// API call, and error handling. 28// 29// This method is useful when you want to inject custom logic or configuration 30// into the SDK's request lifecycle. Such as custom headers, or retry logic. 31// 32// 33// // Example sending a request using the CreateAnalyzerRequest method. 34// req, resp := client.CreateAnalyzerRequest(params) 35// 36// err := req.Send() 37// if err == nil { // resp is now filled 38// fmt.Println(resp) 39// } 40// 41// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/CreateAnalyzer 42func (c *AccessAnalyzer) CreateAnalyzerRequest(input *CreateAnalyzerInput) (req *request.Request, output *CreateAnalyzerOutput) { 43 op := &request.Operation{ 44 Name: opCreateAnalyzer, 45 HTTPMethod: "PUT", 46 HTTPPath: "/analyzer", 47 } 48 49 if input == nil { 50 input = &CreateAnalyzerInput{} 51 } 52 53 output = &CreateAnalyzerOutput{} 54 req = c.newRequest(op, input, output) 55 return 56} 57 58// CreateAnalyzer API operation for Access Analyzer. 59// 60// Creates an analyzer for your account. 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 Access Analyzer's 67// API operation CreateAnalyzer for usage and error information. 68// 69// Returned Error Types: 70// * ConflictException 71// A conflict exception error. 72// 73// * ValidationException 74// Validation exception error. 75// 76// * InternalServerException 77// Internal server error. 78// 79// * ServiceQuotaExceededException 80// Service quote met error. 81// 82// * ThrottlingException 83// Throttling limit exceeded error. 84// 85// * AccessDeniedException 86// You do not have sufficient access to perform this action. 87// 88// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/CreateAnalyzer 89func (c *AccessAnalyzer) CreateAnalyzer(input *CreateAnalyzerInput) (*CreateAnalyzerOutput, error) { 90 req, out := c.CreateAnalyzerRequest(input) 91 return out, req.Send() 92} 93 94// CreateAnalyzerWithContext is the same as CreateAnalyzer with the addition of 95// the ability to pass a context and additional request options. 96// 97// See CreateAnalyzer for details on how to use this API operation. 98// 99// The context must be non-nil and will be used for request cancellation. If 100// the context is nil a panic will occur. In the future the SDK may create 101// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 102// for more information on using Contexts. 103func (c *AccessAnalyzer) CreateAnalyzerWithContext(ctx aws.Context, input *CreateAnalyzerInput, opts ...request.Option) (*CreateAnalyzerOutput, error) { 104 req, out := c.CreateAnalyzerRequest(input) 105 req.SetContext(ctx) 106 req.ApplyOptions(opts...) 107 return out, req.Send() 108} 109 110const opCreateArchiveRule = "CreateArchiveRule" 111 112// CreateArchiveRuleRequest generates a "aws/request.Request" representing the 113// client's request for the CreateArchiveRule operation. The "output" return 114// value will be populated with the request's response once the request completes 115// successfully. 116// 117// Use "Send" method on the returned Request to send the API call to the service. 118// the "output" return value is not valid until after Send returns without error. 119// 120// See CreateArchiveRule for more information on using the CreateArchiveRule 121// API call, and error handling. 122// 123// This method is useful when you want to inject custom logic or configuration 124// into the SDK's request lifecycle. Such as custom headers, or retry logic. 125// 126// 127// // Example sending a request using the CreateArchiveRuleRequest method. 128// req, resp := client.CreateArchiveRuleRequest(params) 129// 130// err := req.Send() 131// if err == nil { // resp is now filled 132// fmt.Println(resp) 133// } 134// 135// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/CreateArchiveRule 136func (c *AccessAnalyzer) CreateArchiveRuleRequest(input *CreateArchiveRuleInput) (req *request.Request, output *CreateArchiveRuleOutput) { 137 op := &request.Operation{ 138 Name: opCreateArchiveRule, 139 HTTPMethod: "PUT", 140 HTTPPath: "/analyzer/{analyzerName}/archive-rule", 141 } 142 143 if input == nil { 144 input = &CreateArchiveRuleInput{} 145 } 146 147 output = &CreateArchiveRuleOutput{} 148 req = c.newRequest(op, input, output) 149 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 150 return 151} 152 153// CreateArchiveRule API operation for Access Analyzer. 154// 155// Creates an archive rule for the specified analyzer. Archive rules automatically 156// archive findings that meet the criteria you define when you create the rule. 157// 158// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 159// with awserr.Error's Code and Message methods to get detailed information about 160// the error. 161// 162// See the AWS API reference guide for Access Analyzer's 163// API operation CreateArchiveRule for usage and error information. 164// 165// Returned Error Types: 166// * ResourceNotFoundException 167// The specified resource could not be found. 168// 169// * ConflictException 170// A conflict exception error. 171// 172// * ValidationException 173// Validation exception error. 174// 175// * InternalServerException 176// Internal server error. 177// 178// * ServiceQuotaExceededException 179// Service quote met error. 180// 181// * ThrottlingException 182// Throttling limit exceeded error. 183// 184// * AccessDeniedException 185// You do not have sufficient access to perform this action. 186// 187// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/CreateArchiveRule 188func (c *AccessAnalyzer) CreateArchiveRule(input *CreateArchiveRuleInput) (*CreateArchiveRuleOutput, error) { 189 req, out := c.CreateArchiveRuleRequest(input) 190 return out, req.Send() 191} 192 193// CreateArchiveRuleWithContext is the same as CreateArchiveRule with the addition of 194// the ability to pass a context and additional request options. 195// 196// See CreateArchiveRule for details on how to use this API operation. 197// 198// The context must be non-nil and will be used for request cancellation. If 199// the context is nil a panic will occur. In the future the SDK may create 200// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 201// for more information on using Contexts. 202func (c *AccessAnalyzer) CreateArchiveRuleWithContext(ctx aws.Context, input *CreateArchiveRuleInput, opts ...request.Option) (*CreateArchiveRuleOutput, error) { 203 req, out := c.CreateArchiveRuleRequest(input) 204 req.SetContext(ctx) 205 req.ApplyOptions(opts...) 206 return out, req.Send() 207} 208 209const opDeleteAnalyzer = "DeleteAnalyzer" 210 211// DeleteAnalyzerRequest generates a "aws/request.Request" representing the 212// client's request for the DeleteAnalyzer operation. The "output" return 213// value will be populated with the request's response once the request completes 214// successfully. 215// 216// Use "Send" method on the returned Request to send the API call to the service. 217// the "output" return value is not valid until after Send returns without error. 218// 219// See DeleteAnalyzer for more information on using the DeleteAnalyzer 220// API call, and error handling. 221// 222// This method is useful when you want to inject custom logic or configuration 223// into the SDK's request lifecycle. Such as custom headers, or retry logic. 224// 225// 226// // Example sending a request using the DeleteAnalyzerRequest method. 227// req, resp := client.DeleteAnalyzerRequest(params) 228// 229// err := req.Send() 230// if err == nil { // resp is now filled 231// fmt.Println(resp) 232// } 233// 234// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/DeleteAnalyzer 235func (c *AccessAnalyzer) DeleteAnalyzerRequest(input *DeleteAnalyzerInput) (req *request.Request, output *DeleteAnalyzerOutput) { 236 op := &request.Operation{ 237 Name: opDeleteAnalyzer, 238 HTTPMethod: "DELETE", 239 HTTPPath: "/analyzer/{analyzerName}", 240 } 241 242 if input == nil { 243 input = &DeleteAnalyzerInput{} 244 } 245 246 output = &DeleteAnalyzerOutput{} 247 req = c.newRequest(op, input, output) 248 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 249 return 250} 251 252// DeleteAnalyzer API operation for Access Analyzer. 253// 254// Deletes the specified analyzer. When you delete an analyzer, Access Analyzer 255// is disabled for the account in the current or specific Region. All findings 256// that were generated by the analyzer are deleted. You cannot undo this action. 257// 258// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 259// with awserr.Error's Code and Message methods to get detailed information about 260// the error. 261// 262// See the AWS API reference guide for Access Analyzer's 263// API operation DeleteAnalyzer for usage and error information. 264// 265// Returned Error Types: 266// * ResourceNotFoundException 267// The specified resource could not be found. 268// 269// * ValidationException 270// Validation exception error. 271// 272// * InternalServerException 273// Internal server error. 274// 275// * ThrottlingException 276// Throttling limit exceeded error. 277// 278// * AccessDeniedException 279// You do not have sufficient access to perform this action. 280// 281// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/DeleteAnalyzer 282func (c *AccessAnalyzer) DeleteAnalyzer(input *DeleteAnalyzerInput) (*DeleteAnalyzerOutput, error) { 283 req, out := c.DeleteAnalyzerRequest(input) 284 return out, req.Send() 285} 286 287// DeleteAnalyzerWithContext is the same as DeleteAnalyzer with the addition of 288// the ability to pass a context and additional request options. 289// 290// See DeleteAnalyzer for details on how to use this API operation. 291// 292// The context must be non-nil and will be used for request cancellation. If 293// the context is nil a panic will occur. In the future the SDK may create 294// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 295// for more information on using Contexts. 296func (c *AccessAnalyzer) DeleteAnalyzerWithContext(ctx aws.Context, input *DeleteAnalyzerInput, opts ...request.Option) (*DeleteAnalyzerOutput, error) { 297 req, out := c.DeleteAnalyzerRequest(input) 298 req.SetContext(ctx) 299 req.ApplyOptions(opts...) 300 return out, req.Send() 301} 302 303const opDeleteArchiveRule = "DeleteArchiveRule" 304 305// DeleteArchiveRuleRequest generates a "aws/request.Request" representing the 306// client's request for the DeleteArchiveRule operation. The "output" return 307// value will be populated with the request's response once the request completes 308// successfully. 309// 310// Use "Send" method on the returned Request to send the API call to the service. 311// the "output" return value is not valid until after Send returns without error. 312// 313// See DeleteArchiveRule for more information on using the DeleteArchiveRule 314// API call, and error handling. 315// 316// This method is useful when you want to inject custom logic or configuration 317// into the SDK's request lifecycle. Such as custom headers, or retry logic. 318// 319// 320// // Example sending a request using the DeleteArchiveRuleRequest method. 321// req, resp := client.DeleteArchiveRuleRequest(params) 322// 323// err := req.Send() 324// if err == nil { // resp is now filled 325// fmt.Println(resp) 326// } 327// 328// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/DeleteArchiveRule 329func (c *AccessAnalyzer) DeleteArchiveRuleRequest(input *DeleteArchiveRuleInput) (req *request.Request, output *DeleteArchiveRuleOutput) { 330 op := &request.Operation{ 331 Name: opDeleteArchiveRule, 332 HTTPMethod: "DELETE", 333 HTTPPath: "/analyzer/{analyzerName}/archive-rule/{ruleName}", 334 } 335 336 if input == nil { 337 input = &DeleteArchiveRuleInput{} 338 } 339 340 output = &DeleteArchiveRuleOutput{} 341 req = c.newRequest(op, input, output) 342 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 343 return 344} 345 346// DeleteArchiveRule API operation for Access Analyzer. 347// 348// Deletes the specified archive rule. 349// 350// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 351// with awserr.Error's Code and Message methods to get detailed information about 352// the error. 353// 354// See the AWS API reference guide for Access Analyzer's 355// API operation DeleteArchiveRule for usage and error information. 356// 357// Returned Error Types: 358// * ResourceNotFoundException 359// The specified resource could not be found. 360// 361// * ValidationException 362// Validation exception error. 363// 364// * InternalServerException 365// Internal server error. 366// 367// * ThrottlingException 368// Throttling limit exceeded error. 369// 370// * AccessDeniedException 371// You do not have sufficient access to perform this action. 372// 373// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/DeleteArchiveRule 374func (c *AccessAnalyzer) DeleteArchiveRule(input *DeleteArchiveRuleInput) (*DeleteArchiveRuleOutput, error) { 375 req, out := c.DeleteArchiveRuleRequest(input) 376 return out, req.Send() 377} 378 379// DeleteArchiveRuleWithContext is the same as DeleteArchiveRule with the addition of 380// the ability to pass a context and additional request options. 381// 382// See DeleteArchiveRule for details on how to use this API operation. 383// 384// The context must be non-nil and will be used for request cancellation. If 385// the context is nil a panic will occur. In the future the SDK may create 386// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 387// for more information on using Contexts. 388func (c *AccessAnalyzer) DeleteArchiveRuleWithContext(ctx aws.Context, input *DeleteArchiveRuleInput, opts ...request.Option) (*DeleteArchiveRuleOutput, error) { 389 req, out := c.DeleteArchiveRuleRequest(input) 390 req.SetContext(ctx) 391 req.ApplyOptions(opts...) 392 return out, req.Send() 393} 394 395const opGetAnalyzedResource = "GetAnalyzedResource" 396 397// GetAnalyzedResourceRequest generates a "aws/request.Request" representing the 398// client's request for the GetAnalyzedResource operation. The "output" return 399// value will be populated with the request's response once the request completes 400// successfully. 401// 402// Use "Send" method on the returned Request to send the API call to the service. 403// the "output" return value is not valid until after Send returns without error. 404// 405// See GetAnalyzedResource for more information on using the GetAnalyzedResource 406// API call, and error handling. 407// 408// This method is useful when you want to inject custom logic or configuration 409// into the SDK's request lifecycle. Such as custom headers, or retry logic. 410// 411// 412// // Example sending a request using the GetAnalyzedResourceRequest method. 413// req, resp := client.GetAnalyzedResourceRequest(params) 414// 415// err := req.Send() 416// if err == nil { // resp is now filled 417// fmt.Println(resp) 418// } 419// 420// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetAnalyzedResource 421func (c *AccessAnalyzer) GetAnalyzedResourceRequest(input *GetAnalyzedResourceInput) (req *request.Request, output *GetAnalyzedResourceOutput) { 422 op := &request.Operation{ 423 Name: opGetAnalyzedResource, 424 HTTPMethod: "GET", 425 HTTPPath: "/analyzed-resource", 426 } 427 428 if input == nil { 429 input = &GetAnalyzedResourceInput{} 430 } 431 432 output = &GetAnalyzedResourceOutput{} 433 req = c.newRequest(op, input, output) 434 return 435} 436 437// GetAnalyzedResource API operation for Access Analyzer. 438// 439// Retrieves information about a resource that was analyzed. 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 Access Analyzer's 446// API operation GetAnalyzedResource for usage and error information. 447// 448// Returned Error Types: 449// * ResourceNotFoundException 450// The specified resource could not be found. 451// 452// * ValidationException 453// Validation exception error. 454// 455// * InternalServerException 456// Internal server error. 457// 458// * ThrottlingException 459// Throttling limit exceeded error. 460// 461// * AccessDeniedException 462// You do not have sufficient access to perform this action. 463// 464// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetAnalyzedResource 465func (c *AccessAnalyzer) GetAnalyzedResource(input *GetAnalyzedResourceInput) (*GetAnalyzedResourceOutput, error) { 466 req, out := c.GetAnalyzedResourceRequest(input) 467 return out, req.Send() 468} 469 470// GetAnalyzedResourceWithContext is the same as GetAnalyzedResource with the addition of 471// the ability to pass a context and additional request options. 472// 473// See GetAnalyzedResource for details on how to use this API operation. 474// 475// The context must be non-nil and will be used for request cancellation. If 476// the context is nil a panic will occur. In the future the SDK may create 477// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 478// for more information on using Contexts. 479func (c *AccessAnalyzer) GetAnalyzedResourceWithContext(ctx aws.Context, input *GetAnalyzedResourceInput, opts ...request.Option) (*GetAnalyzedResourceOutput, error) { 480 req, out := c.GetAnalyzedResourceRequest(input) 481 req.SetContext(ctx) 482 req.ApplyOptions(opts...) 483 return out, req.Send() 484} 485 486const opGetAnalyzer = "GetAnalyzer" 487 488// GetAnalyzerRequest generates a "aws/request.Request" representing the 489// client's request for the GetAnalyzer operation. The "output" return 490// value will be populated with the request's response once the request completes 491// successfully. 492// 493// Use "Send" method on the returned Request to send the API call to the service. 494// the "output" return value is not valid until after Send returns without error. 495// 496// See GetAnalyzer for more information on using the GetAnalyzer 497// API call, and error handling. 498// 499// This method is useful when you want to inject custom logic or configuration 500// into the SDK's request lifecycle. Such as custom headers, or retry logic. 501// 502// 503// // Example sending a request using the GetAnalyzerRequest method. 504// req, resp := client.GetAnalyzerRequest(params) 505// 506// err := req.Send() 507// if err == nil { // resp is now filled 508// fmt.Println(resp) 509// } 510// 511// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetAnalyzer 512func (c *AccessAnalyzer) GetAnalyzerRequest(input *GetAnalyzerInput) (req *request.Request, output *GetAnalyzerOutput) { 513 op := &request.Operation{ 514 Name: opGetAnalyzer, 515 HTTPMethod: "GET", 516 HTTPPath: "/analyzer/{analyzerName}", 517 } 518 519 if input == nil { 520 input = &GetAnalyzerInput{} 521 } 522 523 output = &GetAnalyzerOutput{} 524 req = c.newRequest(op, input, output) 525 return 526} 527 528// GetAnalyzer API operation for Access Analyzer. 529// 530// Retrieves information about the specified analyzer. 531// 532// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 533// with awserr.Error's Code and Message methods to get detailed information about 534// the error. 535// 536// See the AWS API reference guide for Access Analyzer's 537// API operation GetAnalyzer for usage and error information. 538// 539// Returned Error Types: 540// * ResourceNotFoundException 541// The specified resource could not be found. 542// 543// * ValidationException 544// Validation exception error. 545// 546// * InternalServerException 547// Internal server error. 548// 549// * ThrottlingException 550// Throttling limit exceeded error. 551// 552// * AccessDeniedException 553// You do not have sufficient access to perform this action. 554// 555// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetAnalyzer 556func (c *AccessAnalyzer) GetAnalyzer(input *GetAnalyzerInput) (*GetAnalyzerOutput, error) { 557 req, out := c.GetAnalyzerRequest(input) 558 return out, req.Send() 559} 560 561// GetAnalyzerWithContext is the same as GetAnalyzer with the addition of 562// the ability to pass a context and additional request options. 563// 564// See GetAnalyzer for details on how to use this API operation. 565// 566// The context must be non-nil and will be used for request cancellation. If 567// the context is nil a panic will occur. In the future the SDK may create 568// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 569// for more information on using Contexts. 570func (c *AccessAnalyzer) GetAnalyzerWithContext(ctx aws.Context, input *GetAnalyzerInput, opts ...request.Option) (*GetAnalyzerOutput, error) { 571 req, out := c.GetAnalyzerRequest(input) 572 req.SetContext(ctx) 573 req.ApplyOptions(opts...) 574 return out, req.Send() 575} 576 577const opGetArchiveRule = "GetArchiveRule" 578 579// GetArchiveRuleRequest generates a "aws/request.Request" representing the 580// client's request for the GetArchiveRule operation. The "output" return 581// value will be populated with the request's response once the request completes 582// successfully. 583// 584// Use "Send" method on the returned Request to send the API call to the service. 585// the "output" return value is not valid until after Send returns without error. 586// 587// See GetArchiveRule for more information on using the GetArchiveRule 588// API call, and error handling. 589// 590// This method is useful when you want to inject custom logic or configuration 591// into the SDK's request lifecycle. Such as custom headers, or retry logic. 592// 593// 594// // Example sending a request using the GetArchiveRuleRequest method. 595// req, resp := client.GetArchiveRuleRequest(params) 596// 597// err := req.Send() 598// if err == nil { // resp is now filled 599// fmt.Println(resp) 600// } 601// 602// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetArchiveRule 603func (c *AccessAnalyzer) GetArchiveRuleRequest(input *GetArchiveRuleInput) (req *request.Request, output *GetArchiveRuleOutput) { 604 op := &request.Operation{ 605 Name: opGetArchiveRule, 606 HTTPMethod: "GET", 607 HTTPPath: "/analyzer/{analyzerName}/archive-rule/{ruleName}", 608 } 609 610 if input == nil { 611 input = &GetArchiveRuleInput{} 612 } 613 614 output = &GetArchiveRuleOutput{} 615 req = c.newRequest(op, input, output) 616 return 617} 618 619// GetArchiveRule API operation for Access Analyzer. 620// 621// Retrieves information about an archive rule. 622// 623// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 624// with awserr.Error's Code and Message methods to get detailed information about 625// the error. 626// 627// See the AWS API reference guide for Access Analyzer's 628// API operation GetArchiveRule for usage and error information. 629// 630// Returned Error Types: 631// * ResourceNotFoundException 632// The specified resource could not be found. 633// 634// * ValidationException 635// Validation exception error. 636// 637// * InternalServerException 638// Internal server error. 639// 640// * ThrottlingException 641// Throttling limit exceeded error. 642// 643// * AccessDeniedException 644// You do not have sufficient access to perform this action. 645// 646// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetArchiveRule 647func (c *AccessAnalyzer) GetArchiveRule(input *GetArchiveRuleInput) (*GetArchiveRuleOutput, error) { 648 req, out := c.GetArchiveRuleRequest(input) 649 return out, req.Send() 650} 651 652// GetArchiveRuleWithContext is the same as GetArchiveRule with the addition of 653// the ability to pass a context and additional request options. 654// 655// See GetArchiveRule for details on how to use this API operation. 656// 657// The context must be non-nil and will be used for request cancellation. If 658// the context is nil a panic will occur. In the future the SDK may create 659// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 660// for more information on using Contexts. 661func (c *AccessAnalyzer) GetArchiveRuleWithContext(ctx aws.Context, input *GetArchiveRuleInput, opts ...request.Option) (*GetArchiveRuleOutput, error) { 662 req, out := c.GetArchiveRuleRequest(input) 663 req.SetContext(ctx) 664 req.ApplyOptions(opts...) 665 return out, req.Send() 666} 667 668const opGetFinding = "GetFinding" 669 670// GetFindingRequest generates a "aws/request.Request" representing the 671// client's request for the GetFinding operation. The "output" return 672// value will be populated with the request's response once the request completes 673// successfully. 674// 675// Use "Send" method on the returned Request to send the API call to the service. 676// the "output" return value is not valid until after Send returns without error. 677// 678// See GetFinding for more information on using the GetFinding 679// API call, and error handling. 680// 681// This method is useful when you want to inject custom logic or configuration 682// into the SDK's request lifecycle. Such as custom headers, or retry logic. 683// 684// 685// // Example sending a request using the GetFindingRequest method. 686// req, resp := client.GetFindingRequest(params) 687// 688// err := req.Send() 689// if err == nil { // resp is now filled 690// fmt.Println(resp) 691// } 692// 693// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetFinding 694func (c *AccessAnalyzer) GetFindingRequest(input *GetFindingInput) (req *request.Request, output *GetFindingOutput) { 695 op := &request.Operation{ 696 Name: opGetFinding, 697 HTTPMethod: "GET", 698 HTTPPath: "/finding/{id}", 699 } 700 701 if input == nil { 702 input = &GetFindingInput{} 703 } 704 705 output = &GetFindingOutput{} 706 req = c.newRequest(op, input, output) 707 return 708} 709 710// GetFinding API operation for Access Analyzer. 711// 712// Retrieves information about the specified finding. 713// 714// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 715// with awserr.Error's Code and Message methods to get detailed information about 716// the error. 717// 718// See the AWS API reference guide for Access Analyzer's 719// API operation GetFinding for usage and error information. 720// 721// Returned Error Types: 722// * ResourceNotFoundException 723// The specified resource could not be found. 724// 725// * ValidationException 726// Validation exception error. 727// 728// * InternalServerException 729// Internal server error. 730// 731// * ThrottlingException 732// Throttling limit exceeded error. 733// 734// * AccessDeniedException 735// You do not have sufficient access to perform this action. 736// 737// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetFinding 738func (c *AccessAnalyzer) GetFinding(input *GetFindingInput) (*GetFindingOutput, error) { 739 req, out := c.GetFindingRequest(input) 740 return out, req.Send() 741} 742 743// GetFindingWithContext is the same as GetFinding with the addition of 744// the ability to pass a context and additional request options. 745// 746// See GetFinding for details on how to use this API operation. 747// 748// The context must be non-nil and will be used for request cancellation. If 749// the context is nil a panic will occur. In the future the SDK may create 750// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 751// for more information on using Contexts. 752func (c *AccessAnalyzer) GetFindingWithContext(ctx aws.Context, input *GetFindingInput, opts ...request.Option) (*GetFindingOutput, error) { 753 req, out := c.GetFindingRequest(input) 754 req.SetContext(ctx) 755 req.ApplyOptions(opts...) 756 return out, req.Send() 757} 758 759const opListAnalyzedResources = "ListAnalyzedResources" 760 761// ListAnalyzedResourcesRequest generates a "aws/request.Request" representing the 762// client's request for the ListAnalyzedResources operation. The "output" return 763// value will be populated with the request's response once the request completes 764// successfully. 765// 766// Use "Send" method on the returned Request to send the API call to the service. 767// the "output" return value is not valid until after Send returns without error. 768// 769// See ListAnalyzedResources for more information on using the ListAnalyzedResources 770// API call, and error handling. 771// 772// This method is useful when you want to inject custom logic or configuration 773// into the SDK's request lifecycle. Such as custom headers, or retry logic. 774// 775// 776// // Example sending a request using the ListAnalyzedResourcesRequest method. 777// req, resp := client.ListAnalyzedResourcesRequest(params) 778// 779// err := req.Send() 780// if err == nil { // resp is now filled 781// fmt.Println(resp) 782// } 783// 784// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListAnalyzedResources 785func (c *AccessAnalyzer) ListAnalyzedResourcesRequest(input *ListAnalyzedResourcesInput) (req *request.Request, output *ListAnalyzedResourcesOutput) { 786 op := &request.Operation{ 787 Name: opListAnalyzedResources, 788 HTTPMethod: "POST", 789 HTTPPath: "/analyzed-resource", 790 Paginator: &request.Paginator{ 791 InputTokens: []string{"nextToken"}, 792 OutputTokens: []string{"nextToken"}, 793 LimitToken: "maxResults", 794 TruncationToken: "", 795 }, 796 } 797 798 if input == nil { 799 input = &ListAnalyzedResourcesInput{} 800 } 801 802 output = &ListAnalyzedResourcesOutput{} 803 req = c.newRequest(op, input, output) 804 return 805} 806 807// ListAnalyzedResources API operation for Access Analyzer. 808// 809// Retrieves a list of resources of the specified type that have been analyzed 810// by the specified analyzer.. 811// 812// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 813// with awserr.Error's Code and Message methods to get detailed information about 814// the error. 815// 816// See the AWS API reference guide for Access Analyzer's 817// API operation ListAnalyzedResources for usage and error information. 818// 819// Returned Error Types: 820// * ResourceNotFoundException 821// The specified resource could not be found. 822// 823// * ValidationException 824// Validation exception error. 825// 826// * InternalServerException 827// Internal server error. 828// 829// * ThrottlingException 830// Throttling limit exceeded error. 831// 832// * AccessDeniedException 833// You do not have sufficient access to perform this action. 834// 835// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListAnalyzedResources 836func (c *AccessAnalyzer) ListAnalyzedResources(input *ListAnalyzedResourcesInput) (*ListAnalyzedResourcesOutput, error) { 837 req, out := c.ListAnalyzedResourcesRequest(input) 838 return out, req.Send() 839} 840 841// ListAnalyzedResourcesWithContext is the same as ListAnalyzedResources with the addition of 842// the ability to pass a context and additional request options. 843// 844// See ListAnalyzedResources for details on how to use this API operation. 845// 846// The context must be non-nil and will be used for request cancellation. If 847// the context is nil a panic will occur. In the future the SDK may create 848// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 849// for more information on using Contexts. 850func (c *AccessAnalyzer) ListAnalyzedResourcesWithContext(ctx aws.Context, input *ListAnalyzedResourcesInput, opts ...request.Option) (*ListAnalyzedResourcesOutput, error) { 851 req, out := c.ListAnalyzedResourcesRequest(input) 852 req.SetContext(ctx) 853 req.ApplyOptions(opts...) 854 return out, req.Send() 855} 856 857// ListAnalyzedResourcesPages iterates over the pages of a ListAnalyzedResources operation, 858// calling the "fn" function with the response data for each page. To stop 859// iterating, return false from the fn function. 860// 861// See ListAnalyzedResources method for more information on how to use this operation. 862// 863// Note: This operation can generate multiple requests to a service. 864// 865// // Example iterating over at most 3 pages of a ListAnalyzedResources operation. 866// pageNum := 0 867// err := client.ListAnalyzedResourcesPages(params, 868// func(page *accessanalyzer.ListAnalyzedResourcesOutput, lastPage bool) bool { 869// pageNum++ 870// fmt.Println(page) 871// return pageNum <= 3 872// }) 873// 874func (c *AccessAnalyzer) ListAnalyzedResourcesPages(input *ListAnalyzedResourcesInput, fn func(*ListAnalyzedResourcesOutput, bool) bool) error { 875 return c.ListAnalyzedResourcesPagesWithContext(aws.BackgroundContext(), input, fn) 876} 877 878// ListAnalyzedResourcesPagesWithContext same as ListAnalyzedResourcesPages except 879// it takes a Context and allows setting request options on the pages. 880// 881// The context must be non-nil and will be used for request cancellation. If 882// the context is nil a panic will occur. In the future the SDK may create 883// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 884// for more information on using Contexts. 885func (c *AccessAnalyzer) ListAnalyzedResourcesPagesWithContext(ctx aws.Context, input *ListAnalyzedResourcesInput, fn func(*ListAnalyzedResourcesOutput, bool) bool, opts ...request.Option) error { 886 p := request.Pagination{ 887 NewRequest: func() (*request.Request, error) { 888 var inCpy *ListAnalyzedResourcesInput 889 if input != nil { 890 tmp := *input 891 inCpy = &tmp 892 } 893 req, _ := c.ListAnalyzedResourcesRequest(inCpy) 894 req.SetContext(ctx) 895 req.ApplyOptions(opts...) 896 return req, nil 897 }, 898 } 899 900 for p.Next() { 901 if !fn(p.Page().(*ListAnalyzedResourcesOutput), !p.HasNextPage()) { 902 break 903 } 904 } 905 906 return p.Err() 907} 908 909const opListAnalyzers = "ListAnalyzers" 910 911// ListAnalyzersRequest generates a "aws/request.Request" representing the 912// client's request for the ListAnalyzers operation. The "output" return 913// value will be populated with the request's response once the request completes 914// successfully. 915// 916// Use "Send" method on the returned Request to send the API call to the service. 917// the "output" return value is not valid until after Send returns without error. 918// 919// See ListAnalyzers for more information on using the ListAnalyzers 920// API call, and error handling. 921// 922// This method is useful when you want to inject custom logic or configuration 923// into the SDK's request lifecycle. Such as custom headers, or retry logic. 924// 925// 926// // Example sending a request using the ListAnalyzersRequest method. 927// req, resp := client.ListAnalyzersRequest(params) 928// 929// err := req.Send() 930// if err == nil { // resp is now filled 931// fmt.Println(resp) 932// } 933// 934// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListAnalyzers 935func (c *AccessAnalyzer) ListAnalyzersRequest(input *ListAnalyzersInput) (req *request.Request, output *ListAnalyzersOutput) { 936 op := &request.Operation{ 937 Name: opListAnalyzers, 938 HTTPMethod: "GET", 939 HTTPPath: "/analyzer", 940 Paginator: &request.Paginator{ 941 InputTokens: []string{"nextToken"}, 942 OutputTokens: []string{"nextToken"}, 943 LimitToken: "maxResults", 944 TruncationToken: "", 945 }, 946 } 947 948 if input == nil { 949 input = &ListAnalyzersInput{} 950 } 951 952 output = &ListAnalyzersOutput{} 953 req = c.newRequest(op, input, output) 954 return 955} 956 957// ListAnalyzers API operation for Access Analyzer. 958// 959// Retrieves a list of analyzers. 960// 961// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 962// with awserr.Error's Code and Message methods to get detailed information about 963// the error. 964// 965// See the AWS API reference guide for Access Analyzer's 966// API operation ListAnalyzers for usage and error information. 967// 968// Returned Error Types: 969// * ValidationException 970// Validation exception error. 971// 972// * InternalServerException 973// Internal server error. 974// 975// * ThrottlingException 976// Throttling limit exceeded error. 977// 978// * AccessDeniedException 979// You do not have sufficient access to perform this action. 980// 981// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListAnalyzers 982func (c *AccessAnalyzer) ListAnalyzers(input *ListAnalyzersInput) (*ListAnalyzersOutput, error) { 983 req, out := c.ListAnalyzersRequest(input) 984 return out, req.Send() 985} 986 987// ListAnalyzersWithContext is the same as ListAnalyzers with the addition of 988// the ability to pass a context and additional request options. 989// 990// See ListAnalyzers for details on how to use this API operation. 991// 992// The context must be non-nil and will be used for request cancellation. If 993// the context is nil a panic will occur. In the future the SDK may create 994// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 995// for more information on using Contexts. 996func (c *AccessAnalyzer) ListAnalyzersWithContext(ctx aws.Context, input *ListAnalyzersInput, opts ...request.Option) (*ListAnalyzersOutput, error) { 997 req, out := c.ListAnalyzersRequest(input) 998 req.SetContext(ctx) 999 req.ApplyOptions(opts...) 1000 return out, req.Send() 1001} 1002 1003// ListAnalyzersPages iterates over the pages of a ListAnalyzers operation, 1004// calling the "fn" function with the response data for each page. To stop 1005// iterating, return false from the fn function. 1006// 1007// See ListAnalyzers method for more information on how to use this operation. 1008// 1009// Note: This operation can generate multiple requests to a service. 1010// 1011// // Example iterating over at most 3 pages of a ListAnalyzers operation. 1012// pageNum := 0 1013// err := client.ListAnalyzersPages(params, 1014// func(page *accessanalyzer.ListAnalyzersOutput, lastPage bool) bool { 1015// pageNum++ 1016// fmt.Println(page) 1017// return pageNum <= 3 1018// }) 1019// 1020func (c *AccessAnalyzer) ListAnalyzersPages(input *ListAnalyzersInput, fn func(*ListAnalyzersOutput, bool) bool) error { 1021 return c.ListAnalyzersPagesWithContext(aws.BackgroundContext(), input, fn) 1022} 1023 1024// ListAnalyzersPagesWithContext same as ListAnalyzersPages except 1025// it takes a Context and allows setting request options on the pages. 1026// 1027// The context must be non-nil and will be used for request cancellation. If 1028// the context is nil a panic will occur. In the future the SDK may create 1029// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1030// for more information on using Contexts. 1031func (c *AccessAnalyzer) ListAnalyzersPagesWithContext(ctx aws.Context, input *ListAnalyzersInput, fn func(*ListAnalyzersOutput, bool) bool, opts ...request.Option) error { 1032 p := request.Pagination{ 1033 NewRequest: func() (*request.Request, error) { 1034 var inCpy *ListAnalyzersInput 1035 if input != nil { 1036 tmp := *input 1037 inCpy = &tmp 1038 } 1039 req, _ := c.ListAnalyzersRequest(inCpy) 1040 req.SetContext(ctx) 1041 req.ApplyOptions(opts...) 1042 return req, nil 1043 }, 1044 } 1045 1046 for p.Next() { 1047 if !fn(p.Page().(*ListAnalyzersOutput), !p.HasNextPage()) { 1048 break 1049 } 1050 } 1051 1052 return p.Err() 1053} 1054 1055const opListArchiveRules = "ListArchiveRules" 1056 1057// ListArchiveRulesRequest generates a "aws/request.Request" representing the 1058// client's request for the ListArchiveRules operation. The "output" return 1059// value will be populated with the request's response once the request completes 1060// successfully. 1061// 1062// Use "Send" method on the returned Request to send the API call to the service. 1063// the "output" return value is not valid until after Send returns without error. 1064// 1065// See ListArchiveRules for more information on using the ListArchiveRules 1066// API call, and error handling. 1067// 1068// This method is useful when you want to inject custom logic or configuration 1069// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1070// 1071// 1072// // Example sending a request using the ListArchiveRulesRequest method. 1073// req, resp := client.ListArchiveRulesRequest(params) 1074// 1075// err := req.Send() 1076// if err == nil { // resp is now filled 1077// fmt.Println(resp) 1078// } 1079// 1080// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListArchiveRules 1081func (c *AccessAnalyzer) ListArchiveRulesRequest(input *ListArchiveRulesInput) (req *request.Request, output *ListArchiveRulesOutput) { 1082 op := &request.Operation{ 1083 Name: opListArchiveRules, 1084 HTTPMethod: "GET", 1085 HTTPPath: "/analyzer/{analyzerName}/archive-rule", 1086 Paginator: &request.Paginator{ 1087 InputTokens: []string{"nextToken"}, 1088 OutputTokens: []string{"nextToken"}, 1089 LimitToken: "maxResults", 1090 TruncationToken: "", 1091 }, 1092 } 1093 1094 if input == nil { 1095 input = &ListArchiveRulesInput{} 1096 } 1097 1098 output = &ListArchiveRulesOutput{} 1099 req = c.newRequest(op, input, output) 1100 return 1101} 1102 1103// ListArchiveRules API operation for Access Analyzer. 1104// 1105// Retrieves a list of archive rules created for the specified analyzer. 1106// 1107// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1108// with awserr.Error's Code and Message methods to get detailed information about 1109// the error. 1110// 1111// See the AWS API reference guide for Access Analyzer's 1112// API operation ListArchiveRules for usage and error information. 1113// 1114// Returned Error Types: 1115// * ValidationException 1116// Validation exception error. 1117// 1118// * InternalServerException 1119// Internal server error. 1120// 1121// * ThrottlingException 1122// Throttling limit exceeded error. 1123// 1124// * AccessDeniedException 1125// You do not have sufficient access to perform this action. 1126// 1127// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListArchiveRules 1128func (c *AccessAnalyzer) ListArchiveRules(input *ListArchiveRulesInput) (*ListArchiveRulesOutput, error) { 1129 req, out := c.ListArchiveRulesRequest(input) 1130 return out, req.Send() 1131} 1132 1133// ListArchiveRulesWithContext is the same as ListArchiveRules with the addition of 1134// the ability to pass a context and additional request options. 1135// 1136// See ListArchiveRules for details on how to use this API operation. 1137// 1138// The context must be non-nil and will be used for request cancellation. If 1139// the context is nil a panic will occur. In the future the SDK may create 1140// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1141// for more information on using Contexts. 1142func (c *AccessAnalyzer) ListArchiveRulesWithContext(ctx aws.Context, input *ListArchiveRulesInput, opts ...request.Option) (*ListArchiveRulesOutput, error) { 1143 req, out := c.ListArchiveRulesRequest(input) 1144 req.SetContext(ctx) 1145 req.ApplyOptions(opts...) 1146 return out, req.Send() 1147} 1148 1149// ListArchiveRulesPages iterates over the pages of a ListArchiveRules operation, 1150// calling the "fn" function with the response data for each page. To stop 1151// iterating, return false from the fn function. 1152// 1153// See ListArchiveRules method for more information on how to use this operation. 1154// 1155// Note: This operation can generate multiple requests to a service. 1156// 1157// // Example iterating over at most 3 pages of a ListArchiveRules operation. 1158// pageNum := 0 1159// err := client.ListArchiveRulesPages(params, 1160// func(page *accessanalyzer.ListArchiveRulesOutput, lastPage bool) bool { 1161// pageNum++ 1162// fmt.Println(page) 1163// return pageNum <= 3 1164// }) 1165// 1166func (c *AccessAnalyzer) ListArchiveRulesPages(input *ListArchiveRulesInput, fn func(*ListArchiveRulesOutput, bool) bool) error { 1167 return c.ListArchiveRulesPagesWithContext(aws.BackgroundContext(), input, fn) 1168} 1169 1170// ListArchiveRulesPagesWithContext same as ListArchiveRulesPages except 1171// it takes a Context and allows setting request options on the pages. 1172// 1173// The context must be non-nil and will be used for request cancellation. If 1174// the context is nil a panic will occur. In the future the SDK may create 1175// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1176// for more information on using Contexts. 1177func (c *AccessAnalyzer) ListArchiveRulesPagesWithContext(ctx aws.Context, input *ListArchiveRulesInput, fn func(*ListArchiveRulesOutput, bool) bool, opts ...request.Option) error { 1178 p := request.Pagination{ 1179 NewRequest: func() (*request.Request, error) { 1180 var inCpy *ListArchiveRulesInput 1181 if input != nil { 1182 tmp := *input 1183 inCpy = &tmp 1184 } 1185 req, _ := c.ListArchiveRulesRequest(inCpy) 1186 req.SetContext(ctx) 1187 req.ApplyOptions(opts...) 1188 return req, nil 1189 }, 1190 } 1191 1192 for p.Next() { 1193 if !fn(p.Page().(*ListArchiveRulesOutput), !p.HasNextPage()) { 1194 break 1195 } 1196 } 1197 1198 return p.Err() 1199} 1200 1201const opListFindings = "ListFindings" 1202 1203// ListFindingsRequest generates a "aws/request.Request" representing the 1204// client's request for the ListFindings operation. The "output" return 1205// value will be populated with the request's response once the request completes 1206// successfully. 1207// 1208// Use "Send" method on the returned Request to send the API call to the service. 1209// the "output" return value is not valid until after Send returns without error. 1210// 1211// See ListFindings for more information on using the ListFindings 1212// API call, and error handling. 1213// 1214// This method is useful when you want to inject custom logic or configuration 1215// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1216// 1217// 1218// // Example sending a request using the ListFindingsRequest method. 1219// req, resp := client.ListFindingsRequest(params) 1220// 1221// err := req.Send() 1222// if err == nil { // resp is now filled 1223// fmt.Println(resp) 1224// } 1225// 1226// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListFindings 1227func (c *AccessAnalyzer) ListFindingsRequest(input *ListFindingsInput) (req *request.Request, output *ListFindingsOutput) { 1228 op := &request.Operation{ 1229 Name: opListFindings, 1230 HTTPMethod: "POST", 1231 HTTPPath: "/finding", 1232 Paginator: &request.Paginator{ 1233 InputTokens: []string{"nextToken"}, 1234 OutputTokens: []string{"nextToken"}, 1235 LimitToken: "maxResults", 1236 TruncationToken: "", 1237 }, 1238 } 1239 1240 if input == nil { 1241 input = &ListFindingsInput{} 1242 } 1243 1244 output = &ListFindingsOutput{} 1245 req = c.newRequest(op, input, output) 1246 return 1247} 1248 1249// ListFindings API operation for Access Analyzer. 1250// 1251// Retrieves a list of findings generated by the specified analyzer. 1252// 1253// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1254// with awserr.Error's Code and Message methods to get detailed information about 1255// the error. 1256// 1257// See the AWS API reference guide for Access Analyzer's 1258// API operation ListFindings for usage and error information. 1259// 1260// Returned Error Types: 1261// * ResourceNotFoundException 1262// The specified resource could not be found. 1263// 1264// * ValidationException 1265// Validation exception error. 1266// 1267// * InternalServerException 1268// Internal server error. 1269// 1270// * ThrottlingException 1271// Throttling limit exceeded error. 1272// 1273// * AccessDeniedException 1274// You do not have sufficient access to perform this action. 1275// 1276// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListFindings 1277func (c *AccessAnalyzer) ListFindings(input *ListFindingsInput) (*ListFindingsOutput, error) { 1278 req, out := c.ListFindingsRequest(input) 1279 return out, req.Send() 1280} 1281 1282// ListFindingsWithContext is the same as ListFindings with the addition of 1283// the ability to pass a context and additional request options. 1284// 1285// See ListFindings for details on how to use this API operation. 1286// 1287// The context must be non-nil and will be used for request cancellation. If 1288// the context is nil a panic will occur. In the future the SDK may create 1289// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1290// for more information on using Contexts. 1291func (c *AccessAnalyzer) ListFindingsWithContext(ctx aws.Context, input *ListFindingsInput, opts ...request.Option) (*ListFindingsOutput, error) { 1292 req, out := c.ListFindingsRequest(input) 1293 req.SetContext(ctx) 1294 req.ApplyOptions(opts...) 1295 return out, req.Send() 1296} 1297 1298// ListFindingsPages iterates over the pages of a ListFindings operation, 1299// calling the "fn" function with the response data for each page. To stop 1300// iterating, return false from the fn function. 1301// 1302// See ListFindings method for more information on how to use this operation. 1303// 1304// Note: This operation can generate multiple requests to a service. 1305// 1306// // Example iterating over at most 3 pages of a ListFindings operation. 1307// pageNum := 0 1308// err := client.ListFindingsPages(params, 1309// func(page *accessanalyzer.ListFindingsOutput, lastPage bool) bool { 1310// pageNum++ 1311// fmt.Println(page) 1312// return pageNum <= 3 1313// }) 1314// 1315func (c *AccessAnalyzer) ListFindingsPages(input *ListFindingsInput, fn func(*ListFindingsOutput, bool) bool) error { 1316 return c.ListFindingsPagesWithContext(aws.BackgroundContext(), input, fn) 1317} 1318 1319// ListFindingsPagesWithContext same as ListFindingsPages except 1320// it takes a Context and allows setting request options on the pages. 1321// 1322// The context must be non-nil and will be used for request cancellation. If 1323// the context is nil a panic will occur. In the future the SDK may create 1324// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1325// for more information on using Contexts. 1326func (c *AccessAnalyzer) ListFindingsPagesWithContext(ctx aws.Context, input *ListFindingsInput, fn func(*ListFindingsOutput, bool) bool, opts ...request.Option) error { 1327 p := request.Pagination{ 1328 NewRequest: func() (*request.Request, error) { 1329 var inCpy *ListFindingsInput 1330 if input != nil { 1331 tmp := *input 1332 inCpy = &tmp 1333 } 1334 req, _ := c.ListFindingsRequest(inCpy) 1335 req.SetContext(ctx) 1336 req.ApplyOptions(opts...) 1337 return req, nil 1338 }, 1339 } 1340 1341 for p.Next() { 1342 if !fn(p.Page().(*ListFindingsOutput), !p.HasNextPage()) { 1343 break 1344 } 1345 } 1346 1347 return p.Err() 1348} 1349 1350const opListTagsForResource = "ListTagsForResource" 1351 1352// ListTagsForResourceRequest generates a "aws/request.Request" representing the 1353// client's request for the ListTagsForResource operation. The "output" return 1354// value will be populated with the request's response once the request completes 1355// successfully. 1356// 1357// Use "Send" method on the returned Request to send the API call to the service. 1358// the "output" return value is not valid until after Send returns without error. 1359// 1360// See ListTagsForResource for more information on using the ListTagsForResource 1361// API call, and error handling. 1362// 1363// This method is useful when you want to inject custom logic or configuration 1364// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1365// 1366// 1367// // Example sending a request using the ListTagsForResourceRequest method. 1368// req, resp := client.ListTagsForResourceRequest(params) 1369// 1370// err := req.Send() 1371// if err == nil { // resp is now filled 1372// fmt.Println(resp) 1373// } 1374// 1375// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListTagsForResource 1376func (c *AccessAnalyzer) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 1377 op := &request.Operation{ 1378 Name: opListTagsForResource, 1379 HTTPMethod: "GET", 1380 HTTPPath: "/tags/{resourceArn}", 1381 } 1382 1383 if input == nil { 1384 input = &ListTagsForResourceInput{} 1385 } 1386 1387 output = &ListTagsForResourceOutput{} 1388 req = c.newRequest(op, input, output) 1389 return 1390} 1391 1392// ListTagsForResource API operation for Access Analyzer. 1393// 1394// Retrieves a list of tags applied to the specified resource. 1395// 1396// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1397// with awserr.Error's Code and Message methods to get detailed information about 1398// the error. 1399// 1400// See the AWS API reference guide for Access Analyzer's 1401// API operation ListTagsForResource for usage and error information. 1402// 1403// Returned Error Types: 1404// * ResourceNotFoundException 1405// The specified resource could not be found. 1406// 1407// * ValidationException 1408// Validation exception error. 1409// 1410// * InternalServerException 1411// Internal server error. 1412// 1413// * ThrottlingException 1414// Throttling limit exceeded error. 1415// 1416// * AccessDeniedException 1417// You do not have sufficient access to perform this action. 1418// 1419// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListTagsForResource 1420func (c *AccessAnalyzer) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 1421 req, out := c.ListTagsForResourceRequest(input) 1422 return out, req.Send() 1423} 1424 1425// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 1426// the ability to pass a context and additional request options. 1427// 1428// See ListTagsForResource for details on how to use this API operation. 1429// 1430// The context must be non-nil and will be used for request cancellation. If 1431// the context is nil a panic will occur. In the future the SDK may create 1432// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1433// for more information on using Contexts. 1434func (c *AccessAnalyzer) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 1435 req, out := c.ListTagsForResourceRequest(input) 1436 req.SetContext(ctx) 1437 req.ApplyOptions(opts...) 1438 return out, req.Send() 1439} 1440 1441const opStartResourceScan = "StartResourceScan" 1442 1443// StartResourceScanRequest generates a "aws/request.Request" representing the 1444// client's request for the StartResourceScan operation. The "output" return 1445// value will be populated with the request's response once the request completes 1446// successfully. 1447// 1448// Use "Send" method on the returned Request to send the API call to the service. 1449// the "output" return value is not valid until after Send returns without error. 1450// 1451// See StartResourceScan for more information on using the StartResourceScan 1452// API call, and error handling. 1453// 1454// This method is useful when you want to inject custom logic or configuration 1455// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1456// 1457// 1458// // Example sending a request using the StartResourceScanRequest method. 1459// req, resp := client.StartResourceScanRequest(params) 1460// 1461// err := req.Send() 1462// if err == nil { // resp is now filled 1463// fmt.Println(resp) 1464// } 1465// 1466// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/StartResourceScan 1467func (c *AccessAnalyzer) StartResourceScanRequest(input *StartResourceScanInput) (req *request.Request, output *StartResourceScanOutput) { 1468 op := &request.Operation{ 1469 Name: opStartResourceScan, 1470 HTTPMethod: "POST", 1471 HTTPPath: "/resource/scan", 1472 } 1473 1474 if input == nil { 1475 input = &StartResourceScanInput{} 1476 } 1477 1478 output = &StartResourceScanOutput{} 1479 req = c.newRequest(op, input, output) 1480 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1481 return 1482} 1483 1484// StartResourceScan API operation for Access Analyzer. 1485// 1486// Immediately starts a scan of the policies applied to the specified resource. 1487// 1488// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1489// with awserr.Error's Code and Message methods to get detailed information about 1490// the error. 1491// 1492// See the AWS API reference guide for Access Analyzer's 1493// API operation StartResourceScan for usage and error information. 1494// 1495// Returned Error Types: 1496// * ResourceNotFoundException 1497// The specified resource could not be found. 1498// 1499// * ValidationException 1500// Validation exception error. 1501// 1502// * InternalServerException 1503// Internal server error. 1504// 1505// * ThrottlingException 1506// Throttling limit exceeded error. 1507// 1508// * AccessDeniedException 1509// You do not have sufficient access to perform this action. 1510// 1511// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/StartResourceScan 1512func (c *AccessAnalyzer) StartResourceScan(input *StartResourceScanInput) (*StartResourceScanOutput, error) { 1513 req, out := c.StartResourceScanRequest(input) 1514 return out, req.Send() 1515} 1516 1517// StartResourceScanWithContext is the same as StartResourceScan with the addition of 1518// the ability to pass a context and additional request options. 1519// 1520// See StartResourceScan for details on how to use this API operation. 1521// 1522// The context must be non-nil and will be used for request cancellation. If 1523// the context is nil a panic will occur. In the future the SDK may create 1524// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1525// for more information on using Contexts. 1526func (c *AccessAnalyzer) StartResourceScanWithContext(ctx aws.Context, input *StartResourceScanInput, opts ...request.Option) (*StartResourceScanOutput, error) { 1527 req, out := c.StartResourceScanRequest(input) 1528 req.SetContext(ctx) 1529 req.ApplyOptions(opts...) 1530 return out, req.Send() 1531} 1532 1533const opTagResource = "TagResource" 1534 1535// TagResourceRequest generates a "aws/request.Request" representing the 1536// client's request for the TagResource operation. The "output" return 1537// value will be populated with the request's response once the request completes 1538// successfully. 1539// 1540// Use "Send" method on the returned Request to send the API call to the service. 1541// the "output" return value is not valid until after Send returns without error. 1542// 1543// See TagResource for more information on using the TagResource 1544// API call, and error handling. 1545// 1546// This method is useful when you want to inject custom logic or configuration 1547// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1548// 1549// 1550// // Example sending a request using the TagResourceRequest method. 1551// req, resp := client.TagResourceRequest(params) 1552// 1553// err := req.Send() 1554// if err == nil { // resp is now filled 1555// fmt.Println(resp) 1556// } 1557// 1558// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/TagResource 1559func (c *AccessAnalyzer) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 1560 op := &request.Operation{ 1561 Name: opTagResource, 1562 HTTPMethod: "POST", 1563 HTTPPath: "/tags/{resourceArn}", 1564 } 1565 1566 if input == nil { 1567 input = &TagResourceInput{} 1568 } 1569 1570 output = &TagResourceOutput{} 1571 req = c.newRequest(op, input, output) 1572 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1573 return 1574} 1575 1576// TagResource API operation for Access Analyzer. 1577// 1578// Adds a tag to the specified resource. 1579// 1580// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1581// with awserr.Error's Code and Message methods to get detailed information about 1582// the error. 1583// 1584// See the AWS API reference guide for Access Analyzer's 1585// API operation TagResource for usage and error information. 1586// 1587// Returned Error Types: 1588// * ResourceNotFoundException 1589// The specified resource could not be found. 1590// 1591// * ValidationException 1592// Validation exception error. 1593// 1594// * InternalServerException 1595// Internal server error. 1596// 1597// * ThrottlingException 1598// Throttling limit exceeded error. 1599// 1600// * AccessDeniedException 1601// You do not have sufficient access to perform this action. 1602// 1603// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/TagResource 1604func (c *AccessAnalyzer) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 1605 req, out := c.TagResourceRequest(input) 1606 return out, req.Send() 1607} 1608 1609// TagResourceWithContext is the same as TagResource with the addition of 1610// the ability to pass a context and additional request options. 1611// 1612// See TagResource for details on how to use this API operation. 1613// 1614// The context must be non-nil and will be used for request cancellation. If 1615// the context is nil a panic will occur. In the future the SDK may create 1616// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1617// for more information on using Contexts. 1618func (c *AccessAnalyzer) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 1619 req, out := c.TagResourceRequest(input) 1620 req.SetContext(ctx) 1621 req.ApplyOptions(opts...) 1622 return out, req.Send() 1623} 1624 1625const opUntagResource = "UntagResource" 1626 1627// UntagResourceRequest generates a "aws/request.Request" representing the 1628// client's request for the UntagResource operation. The "output" return 1629// value will be populated with the request's response once the request completes 1630// successfully. 1631// 1632// Use "Send" method on the returned Request to send the API call to the service. 1633// the "output" return value is not valid until after Send returns without error. 1634// 1635// See UntagResource for more information on using the UntagResource 1636// API call, and error handling. 1637// 1638// This method is useful when you want to inject custom logic or configuration 1639// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1640// 1641// 1642// // Example sending a request using the UntagResourceRequest method. 1643// req, resp := client.UntagResourceRequest(params) 1644// 1645// err := req.Send() 1646// if err == nil { // resp is now filled 1647// fmt.Println(resp) 1648// } 1649// 1650// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/UntagResource 1651func (c *AccessAnalyzer) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 1652 op := &request.Operation{ 1653 Name: opUntagResource, 1654 HTTPMethod: "DELETE", 1655 HTTPPath: "/tags/{resourceArn}", 1656 } 1657 1658 if input == nil { 1659 input = &UntagResourceInput{} 1660 } 1661 1662 output = &UntagResourceOutput{} 1663 req = c.newRequest(op, input, output) 1664 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1665 return 1666} 1667 1668// UntagResource API operation for Access Analyzer. 1669// 1670// Removes a tag from the specified resource. 1671// 1672// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1673// with awserr.Error's Code and Message methods to get detailed information about 1674// the error. 1675// 1676// See the AWS API reference guide for Access Analyzer's 1677// API operation UntagResource for usage and error information. 1678// 1679// Returned Error Types: 1680// * ResourceNotFoundException 1681// The specified resource could not be found. 1682// 1683// * ValidationException 1684// Validation exception error. 1685// 1686// * InternalServerException 1687// Internal server error. 1688// 1689// * ThrottlingException 1690// Throttling limit exceeded error. 1691// 1692// * AccessDeniedException 1693// You do not have sufficient access to perform this action. 1694// 1695// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/UntagResource 1696func (c *AccessAnalyzer) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 1697 req, out := c.UntagResourceRequest(input) 1698 return out, req.Send() 1699} 1700 1701// UntagResourceWithContext is the same as UntagResource with the addition of 1702// the ability to pass a context and additional request options. 1703// 1704// See UntagResource for details on how to use this API operation. 1705// 1706// The context must be non-nil and will be used for request cancellation. If 1707// the context is nil a panic will occur. In the future the SDK may create 1708// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1709// for more information on using Contexts. 1710func (c *AccessAnalyzer) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 1711 req, out := c.UntagResourceRequest(input) 1712 req.SetContext(ctx) 1713 req.ApplyOptions(opts...) 1714 return out, req.Send() 1715} 1716 1717const opUpdateArchiveRule = "UpdateArchiveRule" 1718 1719// UpdateArchiveRuleRequest generates a "aws/request.Request" representing the 1720// client's request for the UpdateArchiveRule operation. The "output" return 1721// value will be populated with the request's response once the request completes 1722// successfully. 1723// 1724// Use "Send" method on the returned Request to send the API call to the service. 1725// the "output" return value is not valid until after Send returns without error. 1726// 1727// See UpdateArchiveRule for more information on using the UpdateArchiveRule 1728// API call, and error handling. 1729// 1730// This method is useful when you want to inject custom logic or configuration 1731// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1732// 1733// 1734// // Example sending a request using the UpdateArchiveRuleRequest method. 1735// req, resp := client.UpdateArchiveRuleRequest(params) 1736// 1737// err := req.Send() 1738// if err == nil { // resp is now filled 1739// fmt.Println(resp) 1740// } 1741// 1742// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/UpdateArchiveRule 1743func (c *AccessAnalyzer) UpdateArchiveRuleRequest(input *UpdateArchiveRuleInput) (req *request.Request, output *UpdateArchiveRuleOutput) { 1744 op := &request.Operation{ 1745 Name: opUpdateArchiveRule, 1746 HTTPMethod: "PUT", 1747 HTTPPath: "/analyzer/{analyzerName}/archive-rule/{ruleName}", 1748 } 1749 1750 if input == nil { 1751 input = &UpdateArchiveRuleInput{} 1752 } 1753 1754 output = &UpdateArchiveRuleOutput{} 1755 req = c.newRequest(op, input, output) 1756 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1757 return 1758} 1759 1760// UpdateArchiveRule API operation for Access Analyzer. 1761// 1762// Updates the criteria and values for the specified archive rule. 1763// 1764// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1765// with awserr.Error's Code and Message methods to get detailed information about 1766// the error. 1767// 1768// See the AWS API reference guide for Access Analyzer's 1769// API operation UpdateArchiveRule for usage and error information. 1770// 1771// Returned Error Types: 1772// * ResourceNotFoundException 1773// The specified resource could not be found. 1774// 1775// * ValidationException 1776// Validation exception error. 1777// 1778// * InternalServerException 1779// Internal server error. 1780// 1781// * ThrottlingException 1782// Throttling limit exceeded error. 1783// 1784// * AccessDeniedException 1785// You do not have sufficient access to perform this action. 1786// 1787// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/UpdateArchiveRule 1788func (c *AccessAnalyzer) UpdateArchiveRule(input *UpdateArchiveRuleInput) (*UpdateArchiveRuleOutput, error) { 1789 req, out := c.UpdateArchiveRuleRequest(input) 1790 return out, req.Send() 1791} 1792 1793// UpdateArchiveRuleWithContext is the same as UpdateArchiveRule with the addition of 1794// the ability to pass a context and additional request options. 1795// 1796// See UpdateArchiveRule for details on how to use this API operation. 1797// 1798// The context must be non-nil and will be used for request cancellation. If 1799// the context is nil a panic will occur. In the future the SDK may create 1800// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1801// for more information on using Contexts. 1802func (c *AccessAnalyzer) UpdateArchiveRuleWithContext(ctx aws.Context, input *UpdateArchiveRuleInput, opts ...request.Option) (*UpdateArchiveRuleOutput, error) { 1803 req, out := c.UpdateArchiveRuleRequest(input) 1804 req.SetContext(ctx) 1805 req.ApplyOptions(opts...) 1806 return out, req.Send() 1807} 1808 1809const opUpdateFindings = "UpdateFindings" 1810 1811// UpdateFindingsRequest generates a "aws/request.Request" representing the 1812// client's request for the UpdateFindings operation. The "output" return 1813// value will be populated with the request's response once the request completes 1814// successfully. 1815// 1816// Use "Send" method on the returned Request to send the API call to the service. 1817// the "output" return value is not valid until after Send returns without error. 1818// 1819// See UpdateFindings for more information on using the UpdateFindings 1820// API call, and error handling. 1821// 1822// This method is useful when you want to inject custom logic or configuration 1823// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1824// 1825// 1826// // Example sending a request using the UpdateFindingsRequest method. 1827// req, resp := client.UpdateFindingsRequest(params) 1828// 1829// err := req.Send() 1830// if err == nil { // resp is now filled 1831// fmt.Println(resp) 1832// } 1833// 1834// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/UpdateFindings 1835func (c *AccessAnalyzer) UpdateFindingsRequest(input *UpdateFindingsInput) (req *request.Request, output *UpdateFindingsOutput) { 1836 op := &request.Operation{ 1837 Name: opUpdateFindings, 1838 HTTPMethod: "PUT", 1839 HTTPPath: "/finding", 1840 } 1841 1842 if input == nil { 1843 input = &UpdateFindingsInput{} 1844 } 1845 1846 output = &UpdateFindingsOutput{} 1847 req = c.newRequest(op, input, output) 1848 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1849 return 1850} 1851 1852// UpdateFindings API operation for Access Analyzer. 1853// 1854// Updates the status for the specified findings. 1855// 1856// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1857// with awserr.Error's Code and Message methods to get detailed information about 1858// the error. 1859// 1860// See the AWS API reference guide for Access Analyzer's 1861// API operation UpdateFindings for usage and error information. 1862// 1863// Returned Error Types: 1864// * ResourceNotFoundException 1865// The specified resource could not be found. 1866// 1867// * ValidationException 1868// Validation exception error. 1869// 1870// * InternalServerException 1871// Internal server error. 1872// 1873// * ThrottlingException 1874// Throttling limit exceeded error. 1875// 1876// * AccessDeniedException 1877// You do not have sufficient access to perform this action. 1878// 1879// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/UpdateFindings 1880func (c *AccessAnalyzer) UpdateFindings(input *UpdateFindingsInput) (*UpdateFindingsOutput, error) { 1881 req, out := c.UpdateFindingsRequest(input) 1882 return out, req.Send() 1883} 1884 1885// UpdateFindingsWithContext is the same as UpdateFindings with the addition of 1886// the ability to pass a context and additional request options. 1887// 1888// See UpdateFindings for details on how to use this API operation. 1889// 1890// The context must be non-nil and will be used for request cancellation. If 1891// the context is nil a panic will occur. In the future the SDK may create 1892// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1893// for more information on using Contexts. 1894func (c *AccessAnalyzer) UpdateFindingsWithContext(ctx aws.Context, input *UpdateFindingsInput, opts ...request.Option) (*UpdateFindingsOutput, error) { 1895 req, out := c.UpdateFindingsRequest(input) 1896 req.SetContext(ctx) 1897 req.ApplyOptions(opts...) 1898 return out, req.Send() 1899} 1900 1901// You do not have sufficient access to perform this action. 1902type AccessDeniedException struct { 1903 _ struct{} `type:"structure"` 1904 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1905 1906 Message_ *string `locationName:"message" type:"string"` 1907} 1908 1909// String returns the string representation 1910func (s AccessDeniedException) String() string { 1911 return awsutil.Prettify(s) 1912} 1913 1914// GoString returns the string representation 1915func (s AccessDeniedException) GoString() string { 1916 return s.String() 1917} 1918 1919func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { 1920 return &AccessDeniedException{ 1921 RespMetadata: v, 1922 } 1923} 1924 1925// Code returns the exception type name. 1926func (s *AccessDeniedException) Code() string { 1927 return "AccessDeniedException" 1928} 1929 1930// Message returns the exception's message. 1931func (s *AccessDeniedException) Message() string { 1932 if s.Message_ != nil { 1933 return *s.Message_ 1934 } 1935 return "" 1936} 1937 1938// OrigErr always returns nil, satisfies awserr.Error interface. 1939func (s *AccessDeniedException) OrigErr() error { 1940 return nil 1941} 1942 1943func (s *AccessDeniedException) Error() string { 1944 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1945} 1946 1947// Status code returns the HTTP status code for the request's response error. 1948func (s *AccessDeniedException) StatusCode() int { 1949 return s.RespMetadata.StatusCode 1950} 1951 1952// RequestID returns the service's response RequestID for request. 1953func (s *AccessDeniedException) RequestID() string { 1954 return s.RespMetadata.RequestID 1955} 1956 1957// Contains details about the analyzed resource. 1958type AnalyzedResource struct { 1959 _ struct{} `type:"structure"` 1960 1961 // The actions that an external principal is granted permission to use by the 1962 // policy that generated the finding. 1963 Actions []*string `locationName:"actions" type:"list"` 1964 1965 // The time at which the resource was analyzed. 1966 // 1967 // AnalyzedAt is a required field 1968 AnalyzedAt *time.Time `locationName:"analyzedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 1969 1970 // The time at which the finding was created. 1971 // 1972 // CreatedAt is a required field 1973 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 1974 1975 // An error message. 1976 Error *string `locationName:"error" type:"string"` 1977 1978 // Indicates whether the policy that generated the finding grants public access 1979 // to the resource. 1980 // 1981 // IsPublic is a required field 1982 IsPublic *bool `locationName:"isPublic" type:"boolean" required:"true"` 1983 1984 // The ARN of the resource that was analyzed. 1985 // 1986 // ResourceArn is a required field 1987 ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` 1988 1989 // The AWS account ID that owns the resource. 1990 // 1991 // ResourceOwnerAccount is a required field 1992 ResourceOwnerAccount *string `locationName:"resourceOwnerAccount" type:"string" required:"true"` 1993 1994 // The type of the resource that was analyzed. 1995 // 1996 // ResourceType is a required field 1997 ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` 1998 1999 // Indicates how the access that generated the finding is granted. This is populated 2000 // for Amazon S3 bucket findings. 2001 SharedVia []*string `locationName:"sharedVia" type:"list"` 2002 2003 // The current status of the finding generated from the analyzed resource. 2004 Status *string `locationName:"status" type:"string" enum:"FindingStatus"` 2005 2006 // The time at which the finding was updated. 2007 // 2008 // UpdatedAt is a required field 2009 UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 2010} 2011 2012// String returns the string representation 2013func (s AnalyzedResource) String() string { 2014 return awsutil.Prettify(s) 2015} 2016 2017// GoString returns the string representation 2018func (s AnalyzedResource) GoString() string { 2019 return s.String() 2020} 2021 2022// SetActions sets the Actions field's value. 2023func (s *AnalyzedResource) SetActions(v []*string) *AnalyzedResource { 2024 s.Actions = v 2025 return s 2026} 2027 2028// SetAnalyzedAt sets the AnalyzedAt field's value. 2029func (s *AnalyzedResource) SetAnalyzedAt(v time.Time) *AnalyzedResource { 2030 s.AnalyzedAt = &v 2031 return s 2032} 2033 2034// SetCreatedAt sets the CreatedAt field's value. 2035func (s *AnalyzedResource) SetCreatedAt(v time.Time) *AnalyzedResource { 2036 s.CreatedAt = &v 2037 return s 2038} 2039 2040// SetError sets the Error field's value. 2041func (s *AnalyzedResource) SetError(v string) *AnalyzedResource { 2042 s.Error = &v 2043 return s 2044} 2045 2046// SetIsPublic sets the IsPublic field's value. 2047func (s *AnalyzedResource) SetIsPublic(v bool) *AnalyzedResource { 2048 s.IsPublic = &v 2049 return s 2050} 2051 2052// SetResourceArn sets the ResourceArn field's value. 2053func (s *AnalyzedResource) SetResourceArn(v string) *AnalyzedResource { 2054 s.ResourceArn = &v 2055 return s 2056} 2057 2058// SetResourceOwnerAccount sets the ResourceOwnerAccount field's value. 2059func (s *AnalyzedResource) SetResourceOwnerAccount(v string) *AnalyzedResource { 2060 s.ResourceOwnerAccount = &v 2061 return s 2062} 2063 2064// SetResourceType sets the ResourceType field's value. 2065func (s *AnalyzedResource) SetResourceType(v string) *AnalyzedResource { 2066 s.ResourceType = &v 2067 return s 2068} 2069 2070// SetSharedVia sets the SharedVia field's value. 2071func (s *AnalyzedResource) SetSharedVia(v []*string) *AnalyzedResource { 2072 s.SharedVia = v 2073 return s 2074} 2075 2076// SetStatus sets the Status field's value. 2077func (s *AnalyzedResource) SetStatus(v string) *AnalyzedResource { 2078 s.Status = &v 2079 return s 2080} 2081 2082// SetUpdatedAt sets the UpdatedAt field's value. 2083func (s *AnalyzedResource) SetUpdatedAt(v time.Time) *AnalyzedResource { 2084 s.UpdatedAt = &v 2085 return s 2086} 2087 2088// Contains the ARN of the analyzed resource. 2089type AnalyzedResourceSummary struct { 2090 _ struct{} `type:"structure"` 2091 2092 // The ARN of the analyzed resource. 2093 // 2094 // ResourceArn is a required field 2095 ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` 2096 2097 // The AWS account ID that owns the resource. 2098 // 2099 // ResourceOwnerAccount is a required field 2100 ResourceOwnerAccount *string `locationName:"resourceOwnerAccount" type:"string" required:"true"` 2101 2102 // The type of resource that was analyzed. 2103 // 2104 // ResourceType is a required field 2105 ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` 2106} 2107 2108// String returns the string representation 2109func (s AnalyzedResourceSummary) String() string { 2110 return awsutil.Prettify(s) 2111} 2112 2113// GoString returns the string representation 2114func (s AnalyzedResourceSummary) GoString() string { 2115 return s.String() 2116} 2117 2118// SetResourceArn sets the ResourceArn field's value. 2119func (s *AnalyzedResourceSummary) SetResourceArn(v string) *AnalyzedResourceSummary { 2120 s.ResourceArn = &v 2121 return s 2122} 2123 2124// SetResourceOwnerAccount sets the ResourceOwnerAccount field's value. 2125func (s *AnalyzedResourceSummary) SetResourceOwnerAccount(v string) *AnalyzedResourceSummary { 2126 s.ResourceOwnerAccount = &v 2127 return s 2128} 2129 2130// SetResourceType sets the ResourceType field's value. 2131func (s *AnalyzedResourceSummary) SetResourceType(v string) *AnalyzedResourceSummary { 2132 s.ResourceType = &v 2133 return s 2134} 2135 2136// Contains information about the analyzer. 2137type AnalyzerSummary struct { 2138 _ struct{} `type:"structure"` 2139 2140 // The ARN of the analyzer. 2141 // 2142 // Arn is a required field 2143 Arn *string `locationName:"arn" type:"string" required:"true"` 2144 2145 // A timestamp for the time at which the analyzer was created. 2146 // 2147 // CreatedAt is a required field 2148 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 2149 2150 // The resource that was most recently analyzed by the analyzer. 2151 LastResourceAnalyzed *string `locationName:"lastResourceAnalyzed" type:"string"` 2152 2153 // The time at which the most recently analyzed resource was analyzed. 2154 LastResourceAnalyzedAt *time.Time `locationName:"lastResourceAnalyzedAt" type:"timestamp" timestampFormat:"iso8601"` 2155 2156 // The name of the analyzer. 2157 // 2158 // Name is a required field 2159 Name *string `locationName:"name" min:"1" type:"string" required:"true"` 2160 2161 // The status of the analyzer. An Active analyzer successfully monitors supported 2162 // resources and generates new findings. The analyzer is Disabled when a user 2163 // action, such as removing trusted access for IAM Access Analyzer from AWS 2164 // Organizations, causes the analyzer to stop generating new findings. The status 2165 // is Creating when the analyzer creation is in progress and Failed when the 2166 // analyzer creation has failed. 2167 // 2168 // Status is a required field 2169 Status *string `locationName:"status" type:"string" required:"true" enum:"AnalyzerStatus"` 2170 2171 // The statusReason provides more details about the current status of the analyzer. 2172 // For example, if the creation for the analyzer fails, a Failed status is displayed. 2173 // For an analyzer with organization as the type, this failure can be due to 2174 // an issue with creating the service-linked roles required in the member accounts 2175 // of the AWS organization. 2176 StatusReason *StatusReason `locationName:"statusReason" type:"structure"` 2177 2178 // The tags added to the analyzer. 2179 Tags map[string]*string `locationName:"tags" type:"map"` 2180 2181 // The type of analyzer, which corresponds to the zone of trust chosen for the 2182 // analyzer. 2183 // 2184 // Type is a required field 2185 Type *string `locationName:"type" type:"string" required:"true" enum:"Type"` 2186} 2187 2188// String returns the string representation 2189func (s AnalyzerSummary) String() string { 2190 return awsutil.Prettify(s) 2191} 2192 2193// GoString returns the string representation 2194func (s AnalyzerSummary) GoString() string { 2195 return s.String() 2196} 2197 2198// SetArn sets the Arn field's value. 2199func (s *AnalyzerSummary) SetArn(v string) *AnalyzerSummary { 2200 s.Arn = &v 2201 return s 2202} 2203 2204// SetCreatedAt sets the CreatedAt field's value. 2205func (s *AnalyzerSummary) SetCreatedAt(v time.Time) *AnalyzerSummary { 2206 s.CreatedAt = &v 2207 return s 2208} 2209 2210// SetLastResourceAnalyzed sets the LastResourceAnalyzed field's value. 2211func (s *AnalyzerSummary) SetLastResourceAnalyzed(v string) *AnalyzerSummary { 2212 s.LastResourceAnalyzed = &v 2213 return s 2214} 2215 2216// SetLastResourceAnalyzedAt sets the LastResourceAnalyzedAt field's value. 2217func (s *AnalyzerSummary) SetLastResourceAnalyzedAt(v time.Time) *AnalyzerSummary { 2218 s.LastResourceAnalyzedAt = &v 2219 return s 2220} 2221 2222// SetName sets the Name field's value. 2223func (s *AnalyzerSummary) SetName(v string) *AnalyzerSummary { 2224 s.Name = &v 2225 return s 2226} 2227 2228// SetStatus sets the Status field's value. 2229func (s *AnalyzerSummary) SetStatus(v string) *AnalyzerSummary { 2230 s.Status = &v 2231 return s 2232} 2233 2234// SetStatusReason sets the StatusReason field's value. 2235func (s *AnalyzerSummary) SetStatusReason(v *StatusReason) *AnalyzerSummary { 2236 s.StatusReason = v 2237 return s 2238} 2239 2240// SetTags sets the Tags field's value. 2241func (s *AnalyzerSummary) SetTags(v map[string]*string) *AnalyzerSummary { 2242 s.Tags = v 2243 return s 2244} 2245 2246// SetType sets the Type field's value. 2247func (s *AnalyzerSummary) SetType(v string) *AnalyzerSummary { 2248 s.Type = &v 2249 return s 2250} 2251 2252// Contains information about an archive rule. 2253type ArchiveRuleSummary struct { 2254 _ struct{} `type:"structure"` 2255 2256 // The time at which the archive rule was created. 2257 // 2258 // CreatedAt is a required field 2259 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 2260 2261 // A filter used to define the archive rule. 2262 // 2263 // Filter is a required field 2264 Filter map[string]*Criterion `locationName:"filter" type:"map" required:"true"` 2265 2266 // The name of the archive rule. 2267 // 2268 // RuleName is a required field 2269 RuleName *string `locationName:"ruleName" min:"1" type:"string" required:"true"` 2270 2271 // The time at which the archive rule was last updated. 2272 // 2273 // UpdatedAt is a required field 2274 UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 2275} 2276 2277// String returns the string representation 2278func (s ArchiveRuleSummary) String() string { 2279 return awsutil.Prettify(s) 2280} 2281 2282// GoString returns the string representation 2283func (s ArchiveRuleSummary) GoString() string { 2284 return s.String() 2285} 2286 2287// SetCreatedAt sets the CreatedAt field's value. 2288func (s *ArchiveRuleSummary) SetCreatedAt(v time.Time) *ArchiveRuleSummary { 2289 s.CreatedAt = &v 2290 return s 2291} 2292 2293// SetFilter sets the Filter field's value. 2294func (s *ArchiveRuleSummary) SetFilter(v map[string]*Criterion) *ArchiveRuleSummary { 2295 s.Filter = v 2296 return s 2297} 2298 2299// SetRuleName sets the RuleName field's value. 2300func (s *ArchiveRuleSummary) SetRuleName(v string) *ArchiveRuleSummary { 2301 s.RuleName = &v 2302 return s 2303} 2304 2305// SetUpdatedAt sets the UpdatedAt field's value. 2306func (s *ArchiveRuleSummary) SetUpdatedAt(v time.Time) *ArchiveRuleSummary { 2307 s.UpdatedAt = &v 2308 return s 2309} 2310 2311// A conflict exception error. 2312type ConflictException struct { 2313 _ struct{} `type:"structure"` 2314 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2315 2316 Message_ *string `locationName:"message" type:"string"` 2317 2318 // The ID of the resource. 2319 // 2320 // ResourceId is a required field 2321 ResourceId *string `locationName:"resourceId" type:"string" required:"true"` 2322 2323 // The resource type. 2324 // 2325 // ResourceType is a required field 2326 ResourceType *string `locationName:"resourceType" type:"string" required:"true"` 2327} 2328 2329// String returns the string representation 2330func (s ConflictException) String() string { 2331 return awsutil.Prettify(s) 2332} 2333 2334// GoString returns the string representation 2335func (s ConflictException) GoString() string { 2336 return s.String() 2337} 2338 2339func newErrorConflictException(v protocol.ResponseMetadata) error { 2340 return &ConflictException{ 2341 RespMetadata: v, 2342 } 2343} 2344 2345// Code returns the exception type name. 2346func (s *ConflictException) Code() string { 2347 return "ConflictException" 2348} 2349 2350// Message returns the exception's message. 2351func (s *ConflictException) Message() string { 2352 if s.Message_ != nil { 2353 return *s.Message_ 2354 } 2355 return "" 2356} 2357 2358// OrigErr always returns nil, satisfies awserr.Error interface. 2359func (s *ConflictException) OrigErr() error { 2360 return nil 2361} 2362 2363func (s *ConflictException) Error() string { 2364 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 2365} 2366 2367// Status code returns the HTTP status code for the request's response error. 2368func (s *ConflictException) StatusCode() int { 2369 return s.RespMetadata.StatusCode 2370} 2371 2372// RequestID returns the service's response RequestID for request. 2373func (s *ConflictException) RequestID() string { 2374 return s.RespMetadata.RequestID 2375} 2376 2377// Creates an analyzer. 2378type CreateAnalyzerInput struct { 2379 _ struct{} `type:"structure"` 2380 2381 // The name of the analyzer to create. 2382 // 2383 // AnalyzerName is a required field 2384 AnalyzerName *string `locationName:"analyzerName" min:"1" type:"string" required:"true"` 2385 2386 // Specifies the archive rules to add for the analyzer. Archive rules automatically 2387 // archive findings that meet the criteria you define for the rule. 2388 ArchiveRules []*InlineArchiveRule `locationName:"archiveRules" type:"list"` 2389 2390 // A client token. 2391 ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` 2392 2393 // The tags to apply to the analyzer. 2394 Tags map[string]*string `locationName:"tags" type:"map"` 2395 2396 // The type of analyzer to create. Only ACCOUNT analyzers are supported. You 2397 // can create only one analyzer per account per Region. 2398 // 2399 // Type is a required field 2400 Type *string `locationName:"type" type:"string" required:"true" enum:"Type"` 2401} 2402 2403// String returns the string representation 2404func (s CreateAnalyzerInput) String() string { 2405 return awsutil.Prettify(s) 2406} 2407 2408// GoString returns the string representation 2409func (s CreateAnalyzerInput) GoString() string { 2410 return s.String() 2411} 2412 2413// Validate inspects the fields of the type to determine if they are valid. 2414func (s *CreateAnalyzerInput) Validate() error { 2415 invalidParams := request.ErrInvalidParams{Context: "CreateAnalyzerInput"} 2416 if s.AnalyzerName == nil { 2417 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 2418 } 2419 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 2420 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 2421 } 2422 if s.Type == nil { 2423 invalidParams.Add(request.NewErrParamRequired("Type")) 2424 } 2425 if s.ArchiveRules != nil { 2426 for i, v := range s.ArchiveRules { 2427 if v == nil { 2428 continue 2429 } 2430 if err := v.Validate(); err != nil { 2431 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ArchiveRules", i), err.(request.ErrInvalidParams)) 2432 } 2433 } 2434 } 2435 2436 if invalidParams.Len() > 0 { 2437 return invalidParams 2438 } 2439 return nil 2440} 2441 2442// SetAnalyzerName sets the AnalyzerName field's value. 2443func (s *CreateAnalyzerInput) SetAnalyzerName(v string) *CreateAnalyzerInput { 2444 s.AnalyzerName = &v 2445 return s 2446} 2447 2448// SetArchiveRules sets the ArchiveRules field's value. 2449func (s *CreateAnalyzerInput) SetArchiveRules(v []*InlineArchiveRule) *CreateAnalyzerInput { 2450 s.ArchiveRules = v 2451 return s 2452} 2453 2454// SetClientToken sets the ClientToken field's value. 2455func (s *CreateAnalyzerInput) SetClientToken(v string) *CreateAnalyzerInput { 2456 s.ClientToken = &v 2457 return s 2458} 2459 2460// SetTags sets the Tags field's value. 2461func (s *CreateAnalyzerInput) SetTags(v map[string]*string) *CreateAnalyzerInput { 2462 s.Tags = v 2463 return s 2464} 2465 2466// SetType sets the Type field's value. 2467func (s *CreateAnalyzerInput) SetType(v string) *CreateAnalyzerInput { 2468 s.Type = &v 2469 return s 2470} 2471 2472// The response to the request to create an analyzer. 2473type CreateAnalyzerOutput struct { 2474 _ struct{} `type:"structure"` 2475 2476 // The ARN of the analyzer that was created by the request. 2477 Arn *string `locationName:"arn" type:"string"` 2478} 2479 2480// String returns the string representation 2481func (s CreateAnalyzerOutput) String() string { 2482 return awsutil.Prettify(s) 2483} 2484 2485// GoString returns the string representation 2486func (s CreateAnalyzerOutput) GoString() string { 2487 return s.String() 2488} 2489 2490// SetArn sets the Arn field's value. 2491func (s *CreateAnalyzerOutput) SetArn(v string) *CreateAnalyzerOutput { 2492 s.Arn = &v 2493 return s 2494} 2495 2496// Creates an archive rule. 2497type CreateArchiveRuleInput struct { 2498 _ struct{} `type:"structure"` 2499 2500 // The name of the created analyzer. 2501 // 2502 // AnalyzerName is a required field 2503 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 2504 2505 // A client token. 2506 ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` 2507 2508 // The criteria for the rule. 2509 // 2510 // Filter is a required field 2511 Filter map[string]*Criterion `locationName:"filter" type:"map" required:"true"` 2512 2513 // The name of the rule to create. 2514 // 2515 // RuleName is a required field 2516 RuleName *string `locationName:"ruleName" min:"1" type:"string" required:"true"` 2517} 2518 2519// String returns the string representation 2520func (s CreateArchiveRuleInput) String() string { 2521 return awsutil.Prettify(s) 2522} 2523 2524// GoString returns the string representation 2525func (s CreateArchiveRuleInput) GoString() string { 2526 return s.String() 2527} 2528 2529// Validate inspects the fields of the type to determine if they are valid. 2530func (s *CreateArchiveRuleInput) Validate() error { 2531 invalidParams := request.ErrInvalidParams{Context: "CreateArchiveRuleInput"} 2532 if s.AnalyzerName == nil { 2533 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 2534 } 2535 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 2536 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 2537 } 2538 if s.Filter == nil { 2539 invalidParams.Add(request.NewErrParamRequired("Filter")) 2540 } 2541 if s.RuleName == nil { 2542 invalidParams.Add(request.NewErrParamRequired("RuleName")) 2543 } 2544 if s.RuleName != nil && len(*s.RuleName) < 1 { 2545 invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) 2546 } 2547 if s.Filter != nil { 2548 for i, v := range s.Filter { 2549 if v == nil { 2550 continue 2551 } 2552 if err := v.Validate(); err != nil { 2553 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filter", i), err.(request.ErrInvalidParams)) 2554 } 2555 } 2556 } 2557 2558 if invalidParams.Len() > 0 { 2559 return invalidParams 2560 } 2561 return nil 2562} 2563 2564// SetAnalyzerName sets the AnalyzerName field's value. 2565func (s *CreateArchiveRuleInput) SetAnalyzerName(v string) *CreateArchiveRuleInput { 2566 s.AnalyzerName = &v 2567 return s 2568} 2569 2570// SetClientToken sets the ClientToken field's value. 2571func (s *CreateArchiveRuleInput) SetClientToken(v string) *CreateArchiveRuleInput { 2572 s.ClientToken = &v 2573 return s 2574} 2575 2576// SetFilter sets the Filter field's value. 2577func (s *CreateArchiveRuleInput) SetFilter(v map[string]*Criterion) *CreateArchiveRuleInput { 2578 s.Filter = v 2579 return s 2580} 2581 2582// SetRuleName sets the RuleName field's value. 2583func (s *CreateArchiveRuleInput) SetRuleName(v string) *CreateArchiveRuleInput { 2584 s.RuleName = &v 2585 return s 2586} 2587 2588type CreateArchiveRuleOutput struct { 2589 _ struct{} `type:"structure"` 2590} 2591 2592// String returns the string representation 2593func (s CreateArchiveRuleOutput) String() string { 2594 return awsutil.Prettify(s) 2595} 2596 2597// GoString returns the string representation 2598func (s CreateArchiveRuleOutput) GoString() string { 2599 return s.String() 2600} 2601 2602// The criteria to use in the filter that defines the archive rule. 2603type Criterion struct { 2604 _ struct{} `type:"structure"` 2605 2606 // A "contains" operator to match for the filter used to create the rule. 2607 Contains []*string `locationName:"contains" min:"1" type:"list"` 2608 2609 // An "equals" operator to match for the filter used to create the rule. 2610 Eq []*string `locationName:"eq" min:"1" type:"list"` 2611 2612 // An "exists" operator to match for the filter used to create the rule. 2613 Exists *bool `locationName:"exists" type:"boolean"` 2614 2615 // A "not equals" operator to match for the filter used to create the rule. 2616 Neq []*string `locationName:"neq" min:"1" type:"list"` 2617} 2618 2619// String returns the string representation 2620func (s Criterion) String() string { 2621 return awsutil.Prettify(s) 2622} 2623 2624// GoString returns the string representation 2625func (s Criterion) GoString() string { 2626 return s.String() 2627} 2628 2629// Validate inspects the fields of the type to determine if they are valid. 2630func (s *Criterion) Validate() error { 2631 invalidParams := request.ErrInvalidParams{Context: "Criterion"} 2632 if s.Contains != nil && len(s.Contains) < 1 { 2633 invalidParams.Add(request.NewErrParamMinLen("Contains", 1)) 2634 } 2635 if s.Eq != nil && len(s.Eq) < 1 { 2636 invalidParams.Add(request.NewErrParamMinLen("Eq", 1)) 2637 } 2638 if s.Neq != nil && len(s.Neq) < 1 { 2639 invalidParams.Add(request.NewErrParamMinLen("Neq", 1)) 2640 } 2641 2642 if invalidParams.Len() > 0 { 2643 return invalidParams 2644 } 2645 return nil 2646} 2647 2648// SetContains sets the Contains field's value. 2649func (s *Criterion) SetContains(v []*string) *Criterion { 2650 s.Contains = v 2651 return s 2652} 2653 2654// SetEq sets the Eq field's value. 2655func (s *Criterion) SetEq(v []*string) *Criterion { 2656 s.Eq = v 2657 return s 2658} 2659 2660// SetExists sets the Exists field's value. 2661func (s *Criterion) SetExists(v bool) *Criterion { 2662 s.Exists = &v 2663 return s 2664} 2665 2666// SetNeq sets the Neq field's value. 2667func (s *Criterion) SetNeq(v []*string) *Criterion { 2668 s.Neq = v 2669 return s 2670} 2671 2672// Deletes an analyzer. 2673type DeleteAnalyzerInput struct { 2674 _ struct{} `type:"structure"` 2675 2676 // The name of the analyzer to delete. 2677 // 2678 // AnalyzerName is a required field 2679 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 2680 2681 // A client token. 2682 ClientToken *string `location:"querystring" locationName:"clientToken" type:"string" idempotencyToken:"true"` 2683} 2684 2685// String returns the string representation 2686func (s DeleteAnalyzerInput) String() string { 2687 return awsutil.Prettify(s) 2688} 2689 2690// GoString returns the string representation 2691func (s DeleteAnalyzerInput) GoString() string { 2692 return s.String() 2693} 2694 2695// Validate inspects the fields of the type to determine if they are valid. 2696func (s *DeleteAnalyzerInput) Validate() error { 2697 invalidParams := request.ErrInvalidParams{Context: "DeleteAnalyzerInput"} 2698 if s.AnalyzerName == nil { 2699 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 2700 } 2701 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 2702 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 2703 } 2704 2705 if invalidParams.Len() > 0 { 2706 return invalidParams 2707 } 2708 return nil 2709} 2710 2711// SetAnalyzerName sets the AnalyzerName field's value. 2712func (s *DeleteAnalyzerInput) SetAnalyzerName(v string) *DeleteAnalyzerInput { 2713 s.AnalyzerName = &v 2714 return s 2715} 2716 2717// SetClientToken sets the ClientToken field's value. 2718func (s *DeleteAnalyzerInput) SetClientToken(v string) *DeleteAnalyzerInput { 2719 s.ClientToken = &v 2720 return s 2721} 2722 2723type DeleteAnalyzerOutput struct { 2724 _ struct{} `type:"structure"` 2725} 2726 2727// String returns the string representation 2728func (s DeleteAnalyzerOutput) String() string { 2729 return awsutil.Prettify(s) 2730} 2731 2732// GoString returns the string representation 2733func (s DeleteAnalyzerOutput) GoString() string { 2734 return s.String() 2735} 2736 2737// Deletes an archive rule. 2738type DeleteArchiveRuleInput struct { 2739 _ struct{} `type:"structure"` 2740 2741 // The name of the analyzer that associated with the archive rule to delete. 2742 // 2743 // AnalyzerName is a required field 2744 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 2745 2746 // A client token. 2747 ClientToken *string `location:"querystring" locationName:"clientToken" type:"string" idempotencyToken:"true"` 2748 2749 // The name of the rule to delete. 2750 // 2751 // RuleName is a required field 2752 RuleName *string `location:"uri" locationName:"ruleName" min:"1" type:"string" required:"true"` 2753} 2754 2755// String returns the string representation 2756func (s DeleteArchiveRuleInput) String() string { 2757 return awsutil.Prettify(s) 2758} 2759 2760// GoString returns the string representation 2761func (s DeleteArchiveRuleInput) GoString() string { 2762 return s.String() 2763} 2764 2765// Validate inspects the fields of the type to determine if they are valid. 2766func (s *DeleteArchiveRuleInput) Validate() error { 2767 invalidParams := request.ErrInvalidParams{Context: "DeleteArchiveRuleInput"} 2768 if s.AnalyzerName == nil { 2769 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 2770 } 2771 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 2772 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 2773 } 2774 if s.RuleName == nil { 2775 invalidParams.Add(request.NewErrParamRequired("RuleName")) 2776 } 2777 if s.RuleName != nil && len(*s.RuleName) < 1 { 2778 invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) 2779 } 2780 2781 if invalidParams.Len() > 0 { 2782 return invalidParams 2783 } 2784 return nil 2785} 2786 2787// SetAnalyzerName sets the AnalyzerName field's value. 2788func (s *DeleteArchiveRuleInput) SetAnalyzerName(v string) *DeleteArchiveRuleInput { 2789 s.AnalyzerName = &v 2790 return s 2791} 2792 2793// SetClientToken sets the ClientToken field's value. 2794func (s *DeleteArchiveRuleInput) SetClientToken(v string) *DeleteArchiveRuleInput { 2795 s.ClientToken = &v 2796 return s 2797} 2798 2799// SetRuleName sets the RuleName field's value. 2800func (s *DeleteArchiveRuleInput) SetRuleName(v string) *DeleteArchiveRuleInput { 2801 s.RuleName = &v 2802 return s 2803} 2804 2805type DeleteArchiveRuleOutput struct { 2806 _ struct{} `type:"structure"` 2807} 2808 2809// String returns the string representation 2810func (s DeleteArchiveRuleOutput) String() string { 2811 return awsutil.Prettify(s) 2812} 2813 2814// GoString returns the string representation 2815func (s DeleteArchiveRuleOutput) GoString() string { 2816 return s.String() 2817} 2818 2819// Contains information about a finding. 2820type Finding struct { 2821 _ struct{} `type:"structure"` 2822 2823 // The action in the analyzed policy statement that an external principal has 2824 // permission to use. 2825 Action []*string `locationName:"action" type:"list"` 2826 2827 // The time at which the resource was analyzed. 2828 // 2829 // AnalyzedAt is a required field 2830 AnalyzedAt *time.Time `locationName:"analyzedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 2831 2832 // The condition in the analyzed policy statement that resulted in a finding. 2833 // 2834 // Condition is a required field 2835 Condition map[string]*string `locationName:"condition" type:"map" required:"true"` 2836 2837 // The time at which the finding was generated. 2838 // 2839 // CreatedAt is a required field 2840 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 2841 2842 // An error. 2843 Error *string `locationName:"error" type:"string"` 2844 2845 // The ID of the finding. 2846 // 2847 // Id is a required field 2848 Id *string `locationName:"id" type:"string" required:"true"` 2849 2850 // Indicates whether the policy that generated the finding allows public access 2851 // to the resource. 2852 IsPublic *bool `locationName:"isPublic" type:"boolean"` 2853 2854 // The external principal that access to a resource within the zone of trust. 2855 Principal map[string]*string `locationName:"principal" type:"map"` 2856 2857 // The resource that an external principal has access to. 2858 Resource *string `locationName:"resource" type:"string"` 2859 2860 // The AWS account ID that owns the resource. 2861 // 2862 // ResourceOwnerAccount is a required field 2863 ResourceOwnerAccount *string `locationName:"resourceOwnerAccount" type:"string" required:"true"` 2864 2865 // The type of the resource reported in the finding. 2866 // 2867 // ResourceType is a required field 2868 ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` 2869 2870 // The sources of the finding. This indicates how the access that generated 2871 // the finding is granted. It is populated for Amazon S3 bucket findings. 2872 Sources []*FindingSource `locationName:"sources" type:"list"` 2873 2874 // The current status of the finding. 2875 // 2876 // Status is a required field 2877 Status *string `locationName:"status" type:"string" required:"true" enum:"FindingStatus"` 2878 2879 // The time at which the finding was updated. 2880 // 2881 // UpdatedAt is a required field 2882 UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 2883} 2884 2885// String returns the string representation 2886func (s Finding) String() string { 2887 return awsutil.Prettify(s) 2888} 2889 2890// GoString returns the string representation 2891func (s Finding) GoString() string { 2892 return s.String() 2893} 2894 2895// SetAction sets the Action field's value. 2896func (s *Finding) SetAction(v []*string) *Finding { 2897 s.Action = v 2898 return s 2899} 2900 2901// SetAnalyzedAt sets the AnalyzedAt field's value. 2902func (s *Finding) SetAnalyzedAt(v time.Time) *Finding { 2903 s.AnalyzedAt = &v 2904 return s 2905} 2906 2907// SetCondition sets the Condition field's value. 2908func (s *Finding) SetCondition(v map[string]*string) *Finding { 2909 s.Condition = v 2910 return s 2911} 2912 2913// SetCreatedAt sets the CreatedAt field's value. 2914func (s *Finding) SetCreatedAt(v time.Time) *Finding { 2915 s.CreatedAt = &v 2916 return s 2917} 2918 2919// SetError sets the Error field's value. 2920func (s *Finding) SetError(v string) *Finding { 2921 s.Error = &v 2922 return s 2923} 2924 2925// SetId sets the Id field's value. 2926func (s *Finding) SetId(v string) *Finding { 2927 s.Id = &v 2928 return s 2929} 2930 2931// SetIsPublic sets the IsPublic field's value. 2932func (s *Finding) SetIsPublic(v bool) *Finding { 2933 s.IsPublic = &v 2934 return s 2935} 2936 2937// SetPrincipal sets the Principal field's value. 2938func (s *Finding) SetPrincipal(v map[string]*string) *Finding { 2939 s.Principal = v 2940 return s 2941} 2942 2943// SetResource sets the Resource field's value. 2944func (s *Finding) SetResource(v string) *Finding { 2945 s.Resource = &v 2946 return s 2947} 2948 2949// SetResourceOwnerAccount sets the ResourceOwnerAccount field's value. 2950func (s *Finding) SetResourceOwnerAccount(v string) *Finding { 2951 s.ResourceOwnerAccount = &v 2952 return s 2953} 2954 2955// SetResourceType sets the ResourceType field's value. 2956func (s *Finding) SetResourceType(v string) *Finding { 2957 s.ResourceType = &v 2958 return s 2959} 2960 2961// SetSources sets the Sources field's value. 2962func (s *Finding) SetSources(v []*FindingSource) *Finding { 2963 s.Sources = v 2964 return s 2965} 2966 2967// SetStatus sets the Status field's value. 2968func (s *Finding) SetStatus(v string) *Finding { 2969 s.Status = &v 2970 return s 2971} 2972 2973// SetUpdatedAt sets the UpdatedAt field's value. 2974func (s *Finding) SetUpdatedAt(v time.Time) *Finding { 2975 s.UpdatedAt = &v 2976 return s 2977} 2978 2979// The source of the finding. This indicates how the access that generated the 2980// finding is granted. It is populated for Amazon S3 bucket findings. 2981type FindingSource struct { 2982 _ struct{} `type:"structure"` 2983 2984 // Includes details about how the access that generated the finding is granted. 2985 // This is populated for Amazon S3 bucket findings. 2986 Detail *FindingSourceDetail `locationName:"detail" type:"structure"` 2987 2988 // Indicates the type of access that generated the finding. 2989 // 2990 // Type is a required field 2991 Type *string `locationName:"type" type:"string" required:"true" enum:"FindingSourceType"` 2992} 2993 2994// String returns the string representation 2995func (s FindingSource) String() string { 2996 return awsutil.Prettify(s) 2997} 2998 2999// GoString returns the string representation 3000func (s FindingSource) GoString() string { 3001 return s.String() 3002} 3003 3004// SetDetail sets the Detail field's value. 3005func (s *FindingSource) SetDetail(v *FindingSourceDetail) *FindingSource { 3006 s.Detail = v 3007 return s 3008} 3009 3010// SetType sets the Type field's value. 3011func (s *FindingSource) SetType(v string) *FindingSource { 3012 s.Type = &v 3013 return s 3014} 3015 3016// Includes details about how the access that generated the finding is granted. 3017// This is populated for Amazon S3 bucket findings. 3018type FindingSourceDetail struct { 3019 _ struct{} `type:"structure"` 3020 3021 // The ARN of the access point that generated the finding. 3022 AccessPointArn *string `locationName:"accessPointArn" type:"string"` 3023} 3024 3025// String returns the string representation 3026func (s FindingSourceDetail) String() string { 3027 return awsutil.Prettify(s) 3028} 3029 3030// GoString returns the string representation 3031func (s FindingSourceDetail) GoString() string { 3032 return s.String() 3033} 3034 3035// SetAccessPointArn sets the AccessPointArn field's value. 3036func (s *FindingSourceDetail) SetAccessPointArn(v string) *FindingSourceDetail { 3037 s.AccessPointArn = &v 3038 return s 3039} 3040 3041// Contains information about a finding. 3042type FindingSummary struct { 3043 _ struct{} `type:"structure"` 3044 3045 // The action in the analyzed policy statement that an external principal has 3046 // permission to use. 3047 Action []*string `locationName:"action" type:"list"` 3048 3049 // The time at which the resource-based policy that generated the finding was 3050 // analyzed. 3051 // 3052 // AnalyzedAt is a required field 3053 AnalyzedAt *time.Time `locationName:"analyzedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 3054 3055 // The condition in the analyzed policy statement that resulted in a finding. 3056 // 3057 // Condition is a required field 3058 Condition map[string]*string `locationName:"condition" type:"map" required:"true"` 3059 3060 // The time at which the finding was created. 3061 // 3062 // CreatedAt is a required field 3063 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 3064 3065 // The error that resulted in an Error finding. 3066 Error *string `locationName:"error" type:"string"` 3067 3068 // The ID of the finding. 3069 // 3070 // Id is a required field 3071 Id *string `locationName:"id" type:"string" required:"true"` 3072 3073 // Indicates whether the finding reports a resource that has a policy that allows 3074 // public access. 3075 IsPublic *bool `locationName:"isPublic" type:"boolean"` 3076 3077 // The external principal that has access to a resource within the zone of trust. 3078 Principal map[string]*string `locationName:"principal" type:"map"` 3079 3080 // The resource that the external principal has access to. 3081 Resource *string `locationName:"resource" type:"string"` 3082 3083 // The AWS account ID that owns the resource. 3084 // 3085 // ResourceOwnerAccount is a required field 3086 ResourceOwnerAccount *string `locationName:"resourceOwnerAccount" type:"string" required:"true"` 3087 3088 // The type of the resource that the external principal has access to. 3089 // 3090 // ResourceType is a required field 3091 ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` 3092 3093 // The sources of the finding. This indicates how the access that generated 3094 // the finding is granted. It is populated for Amazon S3 bucket findings. 3095 Sources []*FindingSource `locationName:"sources" type:"list"` 3096 3097 // The status of the finding. 3098 // 3099 // Status is a required field 3100 Status *string `locationName:"status" type:"string" required:"true" enum:"FindingStatus"` 3101 3102 // The time at which the finding was most recently updated. 3103 // 3104 // UpdatedAt is a required field 3105 UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 3106} 3107 3108// String returns the string representation 3109func (s FindingSummary) String() string { 3110 return awsutil.Prettify(s) 3111} 3112 3113// GoString returns the string representation 3114func (s FindingSummary) GoString() string { 3115 return s.String() 3116} 3117 3118// SetAction sets the Action field's value. 3119func (s *FindingSummary) SetAction(v []*string) *FindingSummary { 3120 s.Action = v 3121 return s 3122} 3123 3124// SetAnalyzedAt sets the AnalyzedAt field's value. 3125func (s *FindingSummary) SetAnalyzedAt(v time.Time) *FindingSummary { 3126 s.AnalyzedAt = &v 3127 return s 3128} 3129 3130// SetCondition sets the Condition field's value. 3131func (s *FindingSummary) SetCondition(v map[string]*string) *FindingSummary { 3132 s.Condition = v 3133 return s 3134} 3135 3136// SetCreatedAt sets the CreatedAt field's value. 3137func (s *FindingSummary) SetCreatedAt(v time.Time) *FindingSummary { 3138 s.CreatedAt = &v 3139 return s 3140} 3141 3142// SetError sets the Error field's value. 3143func (s *FindingSummary) SetError(v string) *FindingSummary { 3144 s.Error = &v 3145 return s 3146} 3147 3148// SetId sets the Id field's value. 3149func (s *FindingSummary) SetId(v string) *FindingSummary { 3150 s.Id = &v 3151 return s 3152} 3153 3154// SetIsPublic sets the IsPublic field's value. 3155func (s *FindingSummary) SetIsPublic(v bool) *FindingSummary { 3156 s.IsPublic = &v 3157 return s 3158} 3159 3160// SetPrincipal sets the Principal field's value. 3161func (s *FindingSummary) SetPrincipal(v map[string]*string) *FindingSummary { 3162 s.Principal = v 3163 return s 3164} 3165 3166// SetResource sets the Resource field's value. 3167func (s *FindingSummary) SetResource(v string) *FindingSummary { 3168 s.Resource = &v 3169 return s 3170} 3171 3172// SetResourceOwnerAccount sets the ResourceOwnerAccount field's value. 3173func (s *FindingSummary) SetResourceOwnerAccount(v string) *FindingSummary { 3174 s.ResourceOwnerAccount = &v 3175 return s 3176} 3177 3178// SetResourceType sets the ResourceType field's value. 3179func (s *FindingSummary) SetResourceType(v string) *FindingSummary { 3180 s.ResourceType = &v 3181 return s 3182} 3183 3184// SetSources sets the Sources field's value. 3185func (s *FindingSummary) SetSources(v []*FindingSource) *FindingSummary { 3186 s.Sources = v 3187 return s 3188} 3189 3190// SetStatus sets the Status field's value. 3191func (s *FindingSummary) SetStatus(v string) *FindingSummary { 3192 s.Status = &v 3193 return s 3194} 3195 3196// SetUpdatedAt sets the UpdatedAt field's value. 3197func (s *FindingSummary) SetUpdatedAt(v time.Time) *FindingSummary { 3198 s.UpdatedAt = &v 3199 return s 3200} 3201 3202// Retrieves an analyzed resource. 3203type GetAnalyzedResourceInput struct { 3204 _ struct{} `type:"structure"` 3205 3206 // The ARN of the analyzer to retrieve information from. 3207 // 3208 // AnalyzerArn is a required field 3209 AnalyzerArn *string `location:"querystring" locationName:"analyzerArn" type:"string" required:"true"` 3210 3211 // The ARN of the resource to retrieve information about. 3212 // 3213 // ResourceArn is a required field 3214 ResourceArn *string `location:"querystring" locationName:"resourceArn" type:"string" required:"true"` 3215} 3216 3217// String returns the string representation 3218func (s GetAnalyzedResourceInput) String() string { 3219 return awsutil.Prettify(s) 3220} 3221 3222// GoString returns the string representation 3223func (s GetAnalyzedResourceInput) GoString() string { 3224 return s.String() 3225} 3226 3227// Validate inspects the fields of the type to determine if they are valid. 3228func (s *GetAnalyzedResourceInput) Validate() error { 3229 invalidParams := request.ErrInvalidParams{Context: "GetAnalyzedResourceInput"} 3230 if s.AnalyzerArn == nil { 3231 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 3232 } 3233 if s.ResourceArn == nil { 3234 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 3235 } 3236 3237 if invalidParams.Len() > 0 { 3238 return invalidParams 3239 } 3240 return nil 3241} 3242 3243// SetAnalyzerArn sets the AnalyzerArn field's value. 3244func (s *GetAnalyzedResourceInput) SetAnalyzerArn(v string) *GetAnalyzedResourceInput { 3245 s.AnalyzerArn = &v 3246 return s 3247} 3248 3249// SetResourceArn sets the ResourceArn field's value. 3250func (s *GetAnalyzedResourceInput) SetResourceArn(v string) *GetAnalyzedResourceInput { 3251 s.ResourceArn = &v 3252 return s 3253} 3254 3255// The response to the request. 3256type GetAnalyzedResourceOutput struct { 3257 _ struct{} `type:"structure"` 3258 3259 // An AnalyedResource object that contains information that Access Analyzer 3260 // found when it analyzed the resource. 3261 Resource *AnalyzedResource `locationName:"resource" type:"structure"` 3262} 3263 3264// String returns the string representation 3265func (s GetAnalyzedResourceOutput) String() string { 3266 return awsutil.Prettify(s) 3267} 3268 3269// GoString returns the string representation 3270func (s GetAnalyzedResourceOutput) GoString() string { 3271 return s.String() 3272} 3273 3274// SetResource sets the Resource field's value. 3275func (s *GetAnalyzedResourceOutput) SetResource(v *AnalyzedResource) *GetAnalyzedResourceOutput { 3276 s.Resource = v 3277 return s 3278} 3279 3280// Retrieves an analyzer. 3281type GetAnalyzerInput struct { 3282 _ struct{} `type:"structure"` 3283 3284 // The name of the analyzer retrieved. 3285 // 3286 // AnalyzerName is a required field 3287 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 3288} 3289 3290// String returns the string representation 3291func (s GetAnalyzerInput) String() string { 3292 return awsutil.Prettify(s) 3293} 3294 3295// GoString returns the string representation 3296func (s GetAnalyzerInput) GoString() string { 3297 return s.String() 3298} 3299 3300// Validate inspects the fields of the type to determine if they are valid. 3301func (s *GetAnalyzerInput) Validate() error { 3302 invalidParams := request.ErrInvalidParams{Context: "GetAnalyzerInput"} 3303 if s.AnalyzerName == nil { 3304 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 3305 } 3306 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 3307 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 3308 } 3309 3310 if invalidParams.Len() > 0 { 3311 return invalidParams 3312 } 3313 return nil 3314} 3315 3316// SetAnalyzerName sets the AnalyzerName field's value. 3317func (s *GetAnalyzerInput) SetAnalyzerName(v string) *GetAnalyzerInput { 3318 s.AnalyzerName = &v 3319 return s 3320} 3321 3322// The response to the request. 3323type GetAnalyzerOutput struct { 3324 _ struct{} `type:"structure"` 3325 3326 // An AnalyzerSummary object that contains information about the analyzer. 3327 // 3328 // Analyzer is a required field 3329 Analyzer *AnalyzerSummary `locationName:"analyzer" type:"structure" required:"true"` 3330} 3331 3332// String returns the string representation 3333func (s GetAnalyzerOutput) String() string { 3334 return awsutil.Prettify(s) 3335} 3336 3337// GoString returns the string representation 3338func (s GetAnalyzerOutput) GoString() string { 3339 return s.String() 3340} 3341 3342// SetAnalyzer sets the Analyzer field's value. 3343func (s *GetAnalyzerOutput) SetAnalyzer(v *AnalyzerSummary) *GetAnalyzerOutput { 3344 s.Analyzer = v 3345 return s 3346} 3347 3348// Retrieves an archive rule. 3349type GetArchiveRuleInput struct { 3350 _ struct{} `type:"structure"` 3351 3352 // The name of the analyzer to retrieve rules from. 3353 // 3354 // AnalyzerName is a required field 3355 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 3356 3357 // The name of the rule to retrieve. 3358 // 3359 // RuleName is a required field 3360 RuleName *string `location:"uri" locationName:"ruleName" min:"1" type:"string" required:"true"` 3361} 3362 3363// String returns the string representation 3364func (s GetArchiveRuleInput) String() string { 3365 return awsutil.Prettify(s) 3366} 3367 3368// GoString returns the string representation 3369func (s GetArchiveRuleInput) GoString() string { 3370 return s.String() 3371} 3372 3373// Validate inspects the fields of the type to determine if they are valid. 3374func (s *GetArchiveRuleInput) Validate() error { 3375 invalidParams := request.ErrInvalidParams{Context: "GetArchiveRuleInput"} 3376 if s.AnalyzerName == nil { 3377 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 3378 } 3379 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 3380 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 3381 } 3382 if s.RuleName == nil { 3383 invalidParams.Add(request.NewErrParamRequired("RuleName")) 3384 } 3385 if s.RuleName != nil && len(*s.RuleName) < 1 { 3386 invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) 3387 } 3388 3389 if invalidParams.Len() > 0 { 3390 return invalidParams 3391 } 3392 return nil 3393} 3394 3395// SetAnalyzerName sets the AnalyzerName field's value. 3396func (s *GetArchiveRuleInput) SetAnalyzerName(v string) *GetArchiveRuleInput { 3397 s.AnalyzerName = &v 3398 return s 3399} 3400 3401// SetRuleName sets the RuleName field's value. 3402func (s *GetArchiveRuleInput) SetRuleName(v string) *GetArchiveRuleInput { 3403 s.RuleName = &v 3404 return s 3405} 3406 3407// The response to the request. 3408type GetArchiveRuleOutput struct { 3409 _ struct{} `type:"structure"` 3410 3411 // Contains information about an archive rule. 3412 // 3413 // ArchiveRule is a required field 3414 ArchiveRule *ArchiveRuleSummary `locationName:"archiveRule" type:"structure" required:"true"` 3415} 3416 3417// String returns the string representation 3418func (s GetArchiveRuleOutput) String() string { 3419 return awsutil.Prettify(s) 3420} 3421 3422// GoString returns the string representation 3423func (s GetArchiveRuleOutput) GoString() string { 3424 return s.String() 3425} 3426 3427// SetArchiveRule sets the ArchiveRule field's value. 3428func (s *GetArchiveRuleOutput) SetArchiveRule(v *ArchiveRuleSummary) *GetArchiveRuleOutput { 3429 s.ArchiveRule = v 3430 return s 3431} 3432 3433// Retrieves a finding. 3434type GetFindingInput struct { 3435 _ struct{} `type:"structure"` 3436 3437 // The ARN of the analyzer that generated the finding. 3438 // 3439 // AnalyzerArn is a required field 3440 AnalyzerArn *string `location:"querystring" locationName:"analyzerArn" type:"string" required:"true"` 3441 3442 // The ID of the finding to retrieve. 3443 // 3444 // Id is a required field 3445 Id *string `location:"uri" locationName:"id" type:"string" required:"true"` 3446} 3447 3448// String returns the string representation 3449func (s GetFindingInput) String() string { 3450 return awsutil.Prettify(s) 3451} 3452 3453// GoString returns the string representation 3454func (s GetFindingInput) GoString() string { 3455 return s.String() 3456} 3457 3458// Validate inspects the fields of the type to determine if they are valid. 3459func (s *GetFindingInput) Validate() error { 3460 invalidParams := request.ErrInvalidParams{Context: "GetFindingInput"} 3461 if s.AnalyzerArn == nil { 3462 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 3463 } 3464 if s.Id == nil { 3465 invalidParams.Add(request.NewErrParamRequired("Id")) 3466 } 3467 if s.Id != nil && len(*s.Id) < 1 { 3468 invalidParams.Add(request.NewErrParamMinLen("Id", 1)) 3469 } 3470 3471 if invalidParams.Len() > 0 { 3472 return invalidParams 3473 } 3474 return nil 3475} 3476 3477// SetAnalyzerArn sets the AnalyzerArn field's value. 3478func (s *GetFindingInput) SetAnalyzerArn(v string) *GetFindingInput { 3479 s.AnalyzerArn = &v 3480 return s 3481} 3482 3483// SetId sets the Id field's value. 3484func (s *GetFindingInput) SetId(v string) *GetFindingInput { 3485 s.Id = &v 3486 return s 3487} 3488 3489// The response to the request. 3490type GetFindingOutput struct { 3491 _ struct{} `type:"structure"` 3492 3493 // A finding object that contains finding details. 3494 Finding *Finding `locationName:"finding" type:"structure"` 3495} 3496 3497// String returns the string representation 3498func (s GetFindingOutput) String() string { 3499 return awsutil.Prettify(s) 3500} 3501 3502// GoString returns the string representation 3503func (s GetFindingOutput) GoString() string { 3504 return s.String() 3505} 3506 3507// SetFinding sets the Finding field's value. 3508func (s *GetFindingOutput) SetFinding(v *Finding) *GetFindingOutput { 3509 s.Finding = v 3510 return s 3511} 3512 3513// An criterion statement in an archive rule. Each archive rule may have multiple 3514// criteria. 3515type InlineArchiveRule struct { 3516 _ struct{} `type:"structure"` 3517 3518 // The condition and values for a criterion. 3519 // 3520 // Filter is a required field 3521 Filter map[string]*Criterion `locationName:"filter" type:"map" required:"true"` 3522 3523 // The name of the rule. 3524 // 3525 // RuleName is a required field 3526 RuleName *string `locationName:"ruleName" min:"1" type:"string" required:"true"` 3527} 3528 3529// String returns the string representation 3530func (s InlineArchiveRule) String() string { 3531 return awsutil.Prettify(s) 3532} 3533 3534// GoString returns the string representation 3535func (s InlineArchiveRule) GoString() string { 3536 return s.String() 3537} 3538 3539// Validate inspects the fields of the type to determine if they are valid. 3540func (s *InlineArchiveRule) Validate() error { 3541 invalidParams := request.ErrInvalidParams{Context: "InlineArchiveRule"} 3542 if s.Filter == nil { 3543 invalidParams.Add(request.NewErrParamRequired("Filter")) 3544 } 3545 if s.RuleName == nil { 3546 invalidParams.Add(request.NewErrParamRequired("RuleName")) 3547 } 3548 if s.RuleName != nil && len(*s.RuleName) < 1 { 3549 invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) 3550 } 3551 if s.Filter != nil { 3552 for i, v := range s.Filter { 3553 if v == nil { 3554 continue 3555 } 3556 if err := v.Validate(); err != nil { 3557 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filter", i), err.(request.ErrInvalidParams)) 3558 } 3559 } 3560 } 3561 3562 if invalidParams.Len() > 0 { 3563 return invalidParams 3564 } 3565 return nil 3566} 3567 3568// SetFilter sets the Filter field's value. 3569func (s *InlineArchiveRule) SetFilter(v map[string]*Criterion) *InlineArchiveRule { 3570 s.Filter = v 3571 return s 3572} 3573 3574// SetRuleName sets the RuleName field's value. 3575func (s *InlineArchiveRule) SetRuleName(v string) *InlineArchiveRule { 3576 s.RuleName = &v 3577 return s 3578} 3579 3580// Internal server error. 3581type InternalServerException struct { 3582 _ struct{} `type:"structure"` 3583 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3584 3585 Message_ *string `locationName:"message" type:"string"` 3586 3587 // The seconds to wait to retry. 3588 RetryAfterSeconds *int64 `location:"header" locationName:"Retry-After" type:"integer"` 3589} 3590 3591// String returns the string representation 3592func (s InternalServerException) String() string { 3593 return awsutil.Prettify(s) 3594} 3595 3596// GoString returns the string representation 3597func (s InternalServerException) GoString() string { 3598 return s.String() 3599} 3600 3601func newErrorInternalServerException(v protocol.ResponseMetadata) error { 3602 return &InternalServerException{ 3603 RespMetadata: v, 3604 } 3605} 3606 3607// Code returns the exception type name. 3608func (s *InternalServerException) Code() string { 3609 return "InternalServerException" 3610} 3611 3612// Message returns the exception's message. 3613func (s *InternalServerException) Message() string { 3614 if s.Message_ != nil { 3615 return *s.Message_ 3616 } 3617 return "" 3618} 3619 3620// OrigErr always returns nil, satisfies awserr.Error interface. 3621func (s *InternalServerException) OrigErr() error { 3622 return nil 3623} 3624 3625func (s *InternalServerException) Error() string { 3626 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 3627} 3628 3629// Status code returns the HTTP status code for the request's response error. 3630func (s *InternalServerException) StatusCode() int { 3631 return s.RespMetadata.StatusCode 3632} 3633 3634// RequestID returns the service's response RequestID for request. 3635func (s *InternalServerException) RequestID() string { 3636 return s.RespMetadata.RequestID 3637} 3638 3639// Retrieves a list of resources that have been analyzed. 3640type ListAnalyzedResourcesInput struct { 3641 _ struct{} `type:"structure"` 3642 3643 // The ARN of the analyzer to retrieve a list of analyzed resources from. 3644 // 3645 // AnalyzerArn is a required field 3646 AnalyzerArn *string `locationName:"analyzerArn" type:"string" required:"true"` 3647 3648 // The maximum number of results to return in the response. 3649 MaxResults *int64 `locationName:"maxResults" type:"integer"` 3650 3651 // A token used for pagination of results returned. 3652 NextToken *string `locationName:"nextToken" type:"string"` 3653 3654 // The type of resource. 3655 ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` 3656} 3657 3658// String returns the string representation 3659func (s ListAnalyzedResourcesInput) String() string { 3660 return awsutil.Prettify(s) 3661} 3662 3663// GoString returns the string representation 3664func (s ListAnalyzedResourcesInput) GoString() string { 3665 return s.String() 3666} 3667 3668// Validate inspects the fields of the type to determine if they are valid. 3669func (s *ListAnalyzedResourcesInput) Validate() error { 3670 invalidParams := request.ErrInvalidParams{Context: "ListAnalyzedResourcesInput"} 3671 if s.AnalyzerArn == nil { 3672 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 3673 } 3674 3675 if invalidParams.Len() > 0 { 3676 return invalidParams 3677 } 3678 return nil 3679} 3680 3681// SetAnalyzerArn sets the AnalyzerArn field's value. 3682func (s *ListAnalyzedResourcesInput) SetAnalyzerArn(v string) *ListAnalyzedResourcesInput { 3683 s.AnalyzerArn = &v 3684 return s 3685} 3686 3687// SetMaxResults sets the MaxResults field's value. 3688func (s *ListAnalyzedResourcesInput) SetMaxResults(v int64) *ListAnalyzedResourcesInput { 3689 s.MaxResults = &v 3690 return s 3691} 3692 3693// SetNextToken sets the NextToken field's value. 3694func (s *ListAnalyzedResourcesInput) SetNextToken(v string) *ListAnalyzedResourcesInput { 3695 s.NextToken = &v 3696 return s 3697} 3698 3699// SetResourceType sets the ResourceType field's value. 3700func (s *ListAnalyzedResourcesInput) SetResourceType(v string) *ListAnalyzedResourcesInput { 3701 s.ResourceType = &v 3702 return s 3703} 3704 3705// The response to the request. 3706type ListAnalyzedResourcesOutput struct { 3707 _ struct{} `type:"structure"` 3708 3709 // A list of resources that were analyzed. 3710 // 3711 // AnalyzedResources is a required field 3712 AnalyzedResources []*AnalyzedResourceSummary `locationName:"analyzedResources" type:"list" required:"true"` 3713 3714 // A token used for pagination of results returned. 3715 NextToken *string `locationName:"nextToken" type:"string"` 3716} 3717 3718// String returns the string representation 3719func (s ListAnalyzedResourcesOutput) String() string { 3720 return awsutil.Prettify(s) 3721} 3722 3723// GoString returns the string representation 3724func (s ListAnalyzedResourcesOutput) GoString() string { 3725 return s.String() 3726} 3727 3728// SetAnalyzedResources sets the AnalyzedResources field's value. 3729func (s *ListAnalyzedResourcesOutput) SetAnalyzedResources(v []*AnalyzedResourceSummary) *ListAnalyzedResourcesOutput { 3730 s.AnalyzedResources = v 3731 return s 3732} 3733 3734// SetNextToken sets the NextToken field's value. 3735func (s *ListAnalyzedResourcesOutput) SetNextToken(v string) *ListAnalyzedResourcesOutput { 3736 s.NextToken = &v 3737 return s 3738} 3739 3740// Retrieves a list of analyzers. 3741type ListAnalyzersInput struct { 3742 _ struct{} `type:"structure"` 3743 3744 // The maximum number of results to return in the response. 3745 MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` 3746 3747 // A token used for pagination of results returned. 3748 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 3749 3750 // The type of analyzer. 3751 Type *string `location:"querystring" locationName:"type" type:"string" enum:"Type"` 3752} 3753 3754// String returns the string representation 3755func (s ListAnalyzersInput) String() string { 3756 return awsutil.Prettify(s) 3757} 3758 3759// GoString returns the string representation 3760func (s ListAnalyzersInput) GoString() string { 3761 return s.String() 3762} 3763 3764// SetMaxResults sets the MaxResults field's value. 3765func (s *ListAnalyzersInput) SetMaxResults(v int64) *ListAnalyzersInput { 3766 s.MaxResults = &v 3767 return s 3768} 3769 3770// SetNextToken sets the NextToken field's value. 3771func (s *ListAnalyzersInput) SetNextToken(v string) *ListAnalyzersInput { 3772 s.NextToken = &v 3773 return s 3774} 3775 3776// SetType sets the Type field's value. 3777func (s *ListAnalyzersInput) SetType(v string) *ListAnalyzersInput { 3778 s.Type = &v 3779 return s 3780} 3781 3782// The response to the request. 3783type ListAnalyzersOutput struct { 3784 _ struct{} `type:"structure"` 3785 3786 // The analyzers retrieved. 3787 // 3788 // Analyzers is a required field 3789 Analyzers []*AnalyzerSummary `locationName:"analyzers" type:"list" required:"true"` 3790 3791 // A token used for pagination of results returned. 3792 NextToken *string `locationName:"nextToken" type:"string"` 3793} 3794 3795// String returns the string representation 3796func (s ListAnalyzersOutput) String() string { 3797 return awsutil.Prettify(s) 3798} 3799 3800// GoString returns the string representation 3801func (s ListAnalyzersOutput) GoString() string { 3802 return s.String() 3803} 3804 3805// SetAnalyzers sets the Analyzers field's value. 3806func (s *ListAnalyzersOutput) SetAnalyzers(v []*AnalyzerSummary) *ListAnalyzersOutput { 3807 s.Analyzers = v 3808 return s 3809} 3810 3811// SetNextToken sets the NextToken field's value. 3812func (s *ListAnalyzersOutput) SetNextToken(v string) *ListAnalyzersOutput { 3813 s.NextToken = &v 3814 return s 3815} 3816 3817// Retrieves a list of archive rules created for the specified analyzer. 3818type ListArchiveRulesInput struct { 3819 _ struct{} `type:"structure"` 3820 3821 // The name of the analyzer to retrieve rules from. 3822 // 3823 // AnalyzerName is a required field 3824 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 3825 3826 // The maximum number of results to return in the request. 3827 MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` 3828 3829 // A token used for pagination of results returned. 3830 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 3831} 3832 3833// String returns the string representation 3834func (s ListArchiveRulesInput) String() string { 3835 return awsutil.Prettify(s) 3836} 3837 3838// GoString returns the string representation 3839func (s ListArchiveRulesInput) GoString() string { 3840 return s.String() 3841} 3842 3843// Validate inspects the fields of the type to determine if they are valid. 3844func (s *ListArchiveRulesInput) Validate() error { 3845 invalidParams := request.ErrInvalidParams{Context: "ListArchiveRulesInput"} 3846 if s.AnalyzerName == nil { 3847 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 3848 } 3849 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 3850 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 3851 } 3852 3853 if invalidParams.Len() > 0 { 3854 return invalidParams 3855 } 3856 return nil 3857} 3858 3859// SetAnalyzerName sets the AnalyzerName field's value. 3860func (s *ListArchiveRulesInput) SetAnalyzerName(v string) *ListArchiveRulesInput { 3861 s.AnalyzerName = &v 3862 return s 3863} 3864 3865// SetMaxResults sets the MaxResults field's value. 3866func (s *ListArchiveRulesInput) SetMaxResults(v int64) *ListArchiveRulesInput { 3867 s.MaxResults = &v 3868 return s 3869} 3870 3871// SetNextToken sets the NextToken field's value. 3872func (s *ListArchiveRulesInput) SetNextToken(v string) *ListArchiveRulesInput { 3873 s.NextToken = &v 3874 return s 3875} 3876 3877// The response to the request. 3878type ListArchiveRulesOutput struct { 3879 _ struct{} `type:"structure"` 3880 3881 // A list of archive rules created for the specified analyzer. 3882 // 3883 // ArchiveRules is a required field 3884 ArchiveRules []*ArchiveRuleSummary `locationName:"archiveRules" type:"list" required:"true"` 3885 3886 // A token used for pagination of results returned. 3887 NextToken *string `locationName:"nextToken" type:"string"` 3888} 3889 3890// String returns the string representation 3891func (s ListArchiveRulesOutput) String() string { 3892 return awsutil.Prettify(s) 3893} 3894 3895// GoString returns the string representation 3896func (s ListArchiveRulesOutput) GoString() string { 3897 return s.String() 3898} 3899 3900// SetArchiveRules sets the ArchiveRules field's value. 3901func (s *ListArchiveRulesOutput) SetArchiveRules(v []*ArchiveRuleSummary) *ListArchiveRulesOutput { 3902 s.ArchiveRules = v 3903 return s 3904} 3905 3906// SetNextToken sets the NextToken field's value. 3907func (s *ListArchiveRulesOutput) SetNextToken(v string) *ListArchiveRulesOutput { 3908 s.NextToken = &v 3909 return s 3910} 3911 3912// Retrieves a list of findings generated by the specified analyzer. 3913type ListFindingsInput struct { 3914 _ struct{} `type:"structure"` 3915 3916 // The ARN of the analyzer to retrieve findings from. 3917 // 3918 // AnalyzerArn is a required field 3919 AnalyzerArn *string `locationName:"analyzerArn" type:"string" required:"true"` 3920 3921 // A filter to match for the findings to return. 3922 Filter map[string]*Criterion `locationName:"filter" type:"map"` 3923 3924 // The maximum number of results to return in the response. 3925 MaxResults *int64 `locationName:"maxResults" type:"integer"` 3926 3927 // A token used for pagination of results returned. 3928 NextToken *string `locationName:"nextToken" type:"string"` 3929 3930 // The sort order for the findings returned. 3931 Sort *SortCriteria `locationName:"sort" type:"structure"` 3932} 3933 3934// String returns the string representation 3935func (s ListFindingsInput) String() string { 3936 return awsutil.Prettify(s) 3937} 3938 3939// GoString returns the string representation 3940func (s ListFindingsInput) GoString() string { 3941 return s.String() 3942} 3943 3944// Validate inspects the fields of the type to determine if they are valid. 3945func (s *ListFindingsInput) Validate() error { 3946 invalidParams := request.ErrInvalidParams{Context: "ListFindingsInput"} 3947 if s.AnalyzerArn == nil { 3948 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 3949 } 3950 if s.Filter != nil { 3951 for i, v := range s.Filter { 3952 if v == nil { 3953 continue 3954 } 3955 if err := v.Validate(); err != nil { 3956 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filter", i), err.(request.ErrInvalidParams)) 3957 } 3958 } 3959 } 3960 3961 if invalidParams.Len() > 0 { 3962 return invalidParams 3963 } 3964 return nil 3965} 3966 3967// SetAnalyzerArn sets the AnalyzerArn field's value. 3968func (s *ListFindingsInput) SetAnalyzerArn(v string) *ListFindingsInput { 3969 s.AnalyzerArn = &v 3970 return s 3971} 3972 3973// SetFilter sets the Filter field's value. 3974func (s *ListFindingsInput) SetFilter(v map[string]*Criterion) *ListFindingsInput { 3975 s.Filter = v 3976 return s 3977} 3978 3979// SetMaxResults sets the MaxResults field's value. 3980func (s *ListFindingsInput) SetMaxResults(v int64) *ListFindingsInput { 3981 s.MaxResults = &v 3982 return s 3983} 3984 3985// SetNextToken sets the NextToken field's value. 3986func (s *ListFindingsInput) SetNextToken(v string) *ListFindingsInput { 3987 s.NextToken = &v 3988 return s 3989} 3990 3991// SetSort sets the Sort field's value. 3992func (s *ListFindingsInput) SetSort(v *SortCriteria) *ListFindingsInput { 3993 s.Sort = v 3994 return s 3995} 3996 3997// The response to the request. 3998type ListFindingsOutput struct { 3999 _ struct{} `type:"structure"` 4000 4001 // A list of findings retrieved from the analyzer that match the filter criteria 4002 // specified, if any. 4003 // 4004 // Findings is a required field 4005 Findings []*FindingSummary `locationName:"findings" type:"list" required:"true"` 4006 4007 // A token used for pagination of results returned. 4008 NextToken *string `locationName:"nextToken" type:"string"` 4009} 4010 4011// String returns the string representation 4012func (s ListFindingsOutput) String() string { 4013 return awsutil.Prettify(s) 4014} 4015 4016// GoString returns the string representation 4017func (s ListFindingsOutput) GoString() string { 4018 return s.String() 4019} 4020 4021// SetFindings sets the Findings field's value. 4022func (s *ListFindingsOutput) SetFindings(v []*FindingSummary) *ListFindingsOutput { 4023 s.Findings = v 4024 return s 4025} 4026 4027// SetNextToken sets the NextToken field's value. 4028func (s *ListFindingsOutput) SetNextToken(v string) *ListFindingsOutput { 4029 s.NextToken = &v 4030 return s 4031} 4032 4033// Retrieves a list of tags applied to the specified resource. 4034type ListTagsForResourceInput struct { 4035 _ struct{} `type:"structure"` 4036 4037 // The ARN of the resource to retrieve tags from. 4038 // 4039 // ResourceArn is a required field 4040 ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` 4041} 4042 4043// String returns the string representation 4044func (s ListTagsForResourceInput) String() string { 4045 return awsutil.Prettify(s) 4046} 4047 4048// GoString returns the string representation 4049func (s ListTagsForResourceInput) GoString() string { 4050 return s.String() 4051} 4052 4053// Validate inspects the fields of the type to determine if they are valid. 4054func (s *ListTagsForResourceInput) Validate() error { 4055 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 4056 if s.ResourceArn == nil { 4057 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 4058 } 4059 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 4060 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 4061 } 4062 4063 if invalidParams.Len() > 0 { 4064 return invalidParams 4065 } 4066 return nil 4067} 4068 4069// SetResourceArn sets the ResourceArn field's value. 4070func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { 4071 s.ResourceArn = &v 4072 return s 4073} 4074 4075// The response to the request. 4076type ListTagsForResourceOutput struct { 4077 _ struct{} `type:"structure"` 4078 4079 // The tags that are applied to the specified resource. 4080 Tags map[string]*string `locationName:"tags" type:"map"` 4081} 4082 4083// String returns the string representation 4084func (s ListTagsForResourceOutput) String() string { 4085 return awsutil.Prettify(s) 4086} 4087 4088// GoString returns the string representation 4089func (s ListTagsForResourceOutput) GoString() string { 4090 return s.String() 4091} 4092 4093// SetTags sets the Tags field's value. 4094func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForResourceOutput { 4095 s.Tags = v 4096 return s 4097} 4098 4099// The specified resource could not be found. 4100type ResourceNotFoundException struct { 4101 _ struct{} `type:"structure"` 4102 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4103 4104 Message_ *string `locationName:"message" type:"string"` 4105 4106 // The ID of the resource. 4107 // 4108 // ResourceId is a required field 4109 ResourceId *string `locationName:"resourceId" type:"string" required:"true"` 4110 4111 // The type of the resource. 4112 // 4113 // ResourceType is a required field 4114 ResourceType *string `locationName:"resourceType" type:"string" required:"true"` 4115} 4116 4117// String returns the string representation 4118func (s ResourceNotFoundException) String() string { 4119 return awsutil.Prettify(s) 4120} 4121 4122// GoString returns the string representation 4123func (s ResourceNotFoundException) GoString() string { 4124 return s.String() 4125} 4126 4127func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 4128 return &ResourceNotFoundException{ 4129 RespMetadata: v, 4130 } 4131} 4132 4133// Code returns the exception type name. 4134func (s *ResourceNotFoundException) Code() string { 4135 return "ResourceNotFoundException" 4136} 4137 4138// Message returns the exception's message. 4139func (s *ResourceNotFoundException) Message() string { 4140 if s.Message_ != nil { 4141 return *s.Message_ 4142 } 4143 return "" 4144} 4145 4146// OrigErr always returns nil, satisfies awserr.Error interface. 4147func (s *ResourceNotFoundException) OrigErr() error { 4148 return nil 4149} 4150 4151func (s *ResourceNotFoundException) Error() string { 4152 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 4153} 4154 4155// Status code returns the HTTP status code for the request's response error. 4156func (s *ResourceNotFoundException) StatusCode() int { 4157 return s.RespMetadata.StatusCode 4158} 4159 4160// RequestID returns the service's response RequestID for request. 4161func (s *ResourceNotFoundException) RequestID() string { 4162 return s.RespMetadata.RequestID 4163} 4164 4165// Service quote met error. 4166type ServiceQuotaExceededException struct { 4167 _ struct{} `type:"structure"` 4168 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4169 4170 Message_ *string `locationName:"message" type:"string"` 4171 4172 // The resource ID. 4173 // 4174 // ResourceId is a required field 4175 ResourceId *string `locationName:"resourceId" type:"string" required:"true"` 4176 4177 // The resource type. 4178 // 4179 // ResourceType is a required field 4180 ResourceType *string `locationName:"resourceType" type:"string" required:"true"` 4181} 4182 4183// String returns the string representation 4184func (s ServiceQuotaExceededException) String() string { 4185 return awsutil.Prettify(s) 4186} 4187 4188// GoString returns the string representation 4189func (s ServiceQuotaExceededException) GoString() string { 4190 return s.String() 4191} 4192 4193func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error { 4194 return &ServiceQuotaExceededException{ 4195 RespMetadata: v, 4196 } 4197} 4198 4199// Code returns the exception type name. 4200func (s *ServiceQuotaExceededException) Code() string { 4201 return "ServiceQuotaExceededException" 4202} 4203 4204// Message returns the exception's message. 4205func (s *ServiceQuotaExceededException) Message() string { 4206 if s.Message_ != nil { 4207 return *s.Message_ 4208 } 4209 return "" 4210} 4211 4212// OrigErr always returns nil, satisfies awserr.Error interface. 4213func (s *ServiceQuotaExceededException) OrigErr() error { 4214 return nil 4215} 4216 4217func (s *ServiceQuotaExceededException) Error() string { 4218 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 4219} 4220 4221// Status code returns the HTTP status code for the request's response error. 4222func (s *ServiceQuotaExceededException) StatusCode() int { 4223 return s.RespMetadata.StatusCode 4224} 4225 4226// RequestID returns the service's response RequestID for request. 4227func (s *ServiceQuotaExceededException) RequestID() string { 4228 return s.RespMetadata.RequestID 4229} 4230 4231// The criteria used to sort. 4232type SortCriteria struct { 4233 _ struct{} `type:"structure"` 4234 4235 // The name of the attribute to sort on. 4236 AttributeName *string `locationName:"attributeName" type:"string"` 4237 4238 // The sort order, ascending or descending. 4239 OrderBy *string `locationName:"orderBy" type:"string" enum:"OrderBy"` 4240} 4241 4242// String returns the string representation 4243func (s SortCriteria) String() string { 4244 return awsutil.Prettify(s) 4245} 4246 4247// GoString returns the string representation 4248func (s SortCriteria) GoString() string { 4249 return s.String() 4250} 4251 4252// SetAttributeName sets the AttributeName field's value. 4253func (s *SortCriteria) SetAttributeName(v string) *SortCriteria { 4254 s.AttributeName = &v 4255 return s 4256} 4257 4258// SetOrderBy sets the OrderBy field's value. 4259func (s *SortCriteria) SetOrderBy(v string) *SortCriteria { 4260 s.OrderBy = &v 4261 return s 4262} 4263 4264// Starts a scan of the policies applied to the specified resource. 4265type StartResourceScanInput struct { 4266 _ struct{} `type:"structure"` 4267 4268 // The ARN of the analyzer to use to scan the policies applied to the specified 4269 // resource. 4270 // 4271 // AnalyzerArn is a required field 4272 AnalyzerArn *string `locationName:"analyzerArn" type:"string" required:"true"` 4273 4274 // The ARN of the resource to scan. 4275 // 4276 // ResourceArn is a required field 4277 ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` 4278} 4279 4280// String returns the string representation 4281func (s StartResourceScanInput) String() string { 4282 return awsutil.Prettify(s) 4283} 4284 4285// GoString returns the string representation 4286func (s StartResourceScanInput) GoString() string { 4287 return s.String() 4288} 4289 4290// Validate inspects the fields of the type to determine if they are valid. 4291func (s *StartResourceScanInput) Validate() error { 4292 invalidParams := request.ErrInvalidParams{Context: "StartResourceScanInput"} 4293 if s.AnalyzerArn == nil { 4294 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 4295 } 4296 if s.ResourceArn == nil { 4297 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 4298 } 4299 4300 if invalidParams.Len() > 0 { 4301 return invalidParams 4302 } 4303 return nil 4304} 4305 4306// SetAnalyzerArn sets the AnalyzerArn field's value. 4307func (s *StartResourceScanInput) SetAnalyzerArn(v string) *StartResourceScanInput { 4308 s.AnalyzerArn = &v 4309 return s 4310} 4311 4312// SetResourceArn sets the ResourceArn field's value. 4313func (s *StartResourceScanInput) SetResourceArn(v string) *StartResourceScanInput { 4314 s.ResourceArn = &v 4315 return s 4316} 4317 4318type StartResourceScanOutput struct { 4319 _ struct{} `type:"structure"` 4320} 4321 4322// String returns the string representation 4323func (s StartResourceScanOutput) String() string { 4324 return awsutil.Prettify(s) 4325} 4326 4327// GoString returns the string representation 4328func (s StartResourceScanOutput) GoString() string { 4329 return s.String() 4330} 4331 4332// Provides more details about the current status of the analyzer. For example, 4333// if the creation for the analyzer fails, a Failed status is displayed. For 4334// an analyzer with organization as the type, this failure can be due to an 4335// issue with creating the service-linked roles required in the member accounts 4336// of the AWS organization. 4337type StatusReason struct { 4338 _ struct{} `type:"structure"` 4339 4340 // The reason code for the current status of the analyzer. 4341 // 4342 // Code is a required field 4343 Code *string `locationName:"code" type:"string" required:"true" enum:"ReasonCode"` 4344} 4345 4346// String returns the string representation 4347func (s StatusReason) String() string { 4348 return awsutil.Prettify(s) 4349} 4350 4351// GoString returns the string representation 4352func (s StatusReason) GoString() string { 4353 return s.String() 4354} 4355 4356// SetCode sets the Code field's value. 4357func (s *StatusReason) SetCode(v string) *StatusReason { 4358 s.Code = &v 4359 return s 4360} 4361 4362// Adds a tag to the specified resource. 4363type TagResourceInput struct { 4364 _ struct{} `type:"structure"` 4365 4366 // The ARN of the resource to add the tag to. 4367 // 4368 // ResourceArn is a required field 4369 ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` 4370 4371 // The tags to add to the resource. 4372 // 4373 // Tags is a required field 4374 Tags map[string]*string `locationName:"tags" type:"map" required:"true"` 4375} 4376 4377// String returns the string representation 4378func (s TagResourceInput) String() string { 4379 return awsutil.Prettify(s) 4380} 4381 4382// GoString returns the string representation 4383func (s TagResourceInput) GoString() string { 4384 return s.String() 4385} 4386 4387// Validate inspects the fields of the type to determine if they are valid. 4388func (s *TagResourceInput) Validate() error { 4389 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 4390 if s.ResourceArn == nil { 4391 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 4392 } 4393 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 4394 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 4395 } 4396 if s.Tags == nil { 4397 invalidParams.Add(request.NewErrParamRequired("Tags")) 4398 } 4399 4400 if invalidParams.Len() > 0 { 4401 return invalidParams 4402 } 4403 return nil 4404} 4405 4406// SetResourceArn sets the ResourceArn field's value. 4407func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { 4408 s.ResourceArn = &v 4409 return s 4410} 4411 4412// SetTags sets the Tags field's value. 4413func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput { 4414 s.Tags = v 4415 return s 4416} 4417 4418// The response to the request. 4419type TagResourceOutput struct { 4420 _ struct{} `type:"structure"` 4421} 4422 4423// String returns the string representation 4424func (s TagResourceOutput) String() string { 4425 return awsutil.Prettify(s) 4426} 4427 4428// GoString returns the string representation 4429func (s TagResourceOutput) GoString() string { 4430 return s.String() 4431} 4432 4433// Throttling limit exceeded error. 4434type ThrottlingException struct { 4435 _ struct{} `type:"structure"` 4436 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4437 4438 Message_ *string `locationName:"message" type:"string"` 4439 4440 // The seconds to wait to retry. 4441 RetryAfterSeconds *int64 `location:"header" locationName:"Retry-After" type:"integer"` 4442} 4443 4444// String returns the string representation 4445func (s ThrottlingException) String() string { 4446 return awsutil.Prettify(s) 4447} 4448 4449// GoString returns the string representation 4450func (s ThrottlingException) GoString() string { 4451 return s.String() 4452} 4453 4454func newErrorThrottlingException(v protocol.ResponseMetadata) error { 4455 return &ThrottlingException{ 4456 RespMetadata: v, 4457 } 4458} 4459 4460// Code returns the exception type name. 4461func (s *ThrottlingException) Code() string { 4462 return "ThrottlingException" 4463} 4464 4465// Message returns the exception's message. 4466func (s *ThrottlingException) Message() string { 4467 if s.Message_ != nil { 4468 return *s.Message_ 4469 } 4470 return "" 4471} 4472 4473// OrigErr always returns nil, satisfies awserr.Error interface. 4474func (s *ThrottlingException) OrigErr() error { 4475 return nil 4476} 4477 4478func (s *ThrottlingException) Error() string { 4479 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 4480} 4481 4482// Status code returns the HTTP status code for the request's response error. 4483func (s *ThrottlingException) StatusCode() int { 4484 return s.RespMetadata.StatusCode 4485} 4486 4487// RequestID returns the service's response RequestID for request. 4488func (s *ThrottlingException) RequestID() string { 4489 return s.RespMetadata.RequestID 4490} 4491 4492// Removes a tag from the specified resource. 4493type UntagResourceInput struct { 4494 _ struct{} `type:"structure"` 4495 4496 // The ARN of the resource to remove the tag from. 4497 // 4498 // ResourceArn is a required field 4499 ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` 4500 4501 // The key for the tag to add. 4502 // 4503 // TagKeys is a required field 4504 TagKeys []*string `location:"querystring" locationName:"tagKeys" type:"list" required:"true"` 4505} 4506 4507// String returns the string representation 4508func (s UntagResourceInput) String() string { 4509 return awsutil.Prettify(s) 4510} 4511 4512// GoString returns the string representation 4513func (s UntagResourceInput) GoString() string { 4514 return s.String() 4515} 4516 4517// Validate inspects the fields of the type to determine if they are valid. 4518func (s *UntagResourceInput) Validate() error { 4519 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 4520 if s.ResourceArn == nil { 4521 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 4522 } 4523 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 4524 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 4525 } 4526 if s.TagKeys == nil { 4527 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 4528 } 4529 4530 if invalidParams.Len() > 0 { 4531 return invalidParams 4532 } 4533 return nil 4534} 4535 4536// SetResourceArn sets the ResourceArn field's value. 4537func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { 4538 s.ResourceArn = &v 4539 return s 4540} 4541 4542// SetTagKeys sets the TagKeys field's value. 4543func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 4544 s.TagKeys = v 4545 return s 4546} 4547 4548// The response to the request. 4549type UntagResourceOutput struct { 4550 _ struct{} `type:"structure"` 4551} 4552 4553// String returns the string representation 4554func (s UntagResourceOutput) String() string { 4555 return awsutil.Prettify(s) 4556} 4557 4558// GoString returns the string representation 4559func (s UntagResourceOutput) GoString() string { 4560 return s.String() 4561} 4562 4563// Updates the specified archive rule. 4564type UpdateArchiveRuleInput struct { 4565 _ struct{} `type:"structure"` 4566 4567 // The name of the analyzer to update the archive rules for. 4568 // 4569 // AnalyzerName is a required field 4570 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 4571 4572 // A client token. 4573 ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` 4574 4575 // A filter to match for the rules to update. Only rules that match the filter 4576 // are updated. 4577 // 4578 // Filter is a required field 4579 Filter map[string]*Criterion `locationName:"filter" type:"map" required:"true"` 4580 4581 // The name of the rule to update. 4582 // 4583 // RuleName is a required field 4584 RuleName *string `location:"uri" locationName:"ruleName" min:"1" type:"string" required:"true"` 4585} 4586 4587// String returns the string representation 4588func (s UpdateArchiveRuleInput) String() string { 4589 return awsutil.Prettify(s) 4590} 4591 4592// GoString returns the string representation 4593func (s UpdateArchiveRuleInput) GoString() string { 4594 return s.String() 4595} 4596 4597// Validate inspects the fields of the type to determine if they are valid. 4598func (s *UpdateArchiveRuleInput) Validate() error { 4599 invalidParams := request.ErrInvalidParams{Context: "UpdateArchiveRuleInput"} 4600 if s.AnalyzerName == nil { 4601 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 4602 } 4603 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 4604 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 4605 } 4606 if s.Filter == nil { 4607 invalidParams.Add(request.NewErrParamRequired("Filter")) 4608 } 4609 if s.RuleName == nil { 4610 invalidParams.Add(request.NewErrParamRequired("RuleName")) 4611 } 4612 if s.RuleName != nil && len(*s.RuleName) < 1 { 4613 invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) 4614 } 4615 if s.Filter != nil { 4616 for i, v := range s.Filter { 4617 if v == nil { 4618 continue 4619 } 4620 if err := v.Validate(); err != nil { 4621 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filter", i), err.(request.ErrInvalidParams)) 4622 } 4623 } 4624 } 4625 4626 if invalidParams.Len() > 0 { 4627 return invalidParams 4628 } 4629 return nil 4630} 4631 4632// SetAnalyzerName sets the AnalyzerName field's value. 4633func (s *UpdateArchiveRuleInput) SetAnalyzerName(v string) *UpdateArchiveRuleInput { 4634 s.AnalyzerName = &v 4635 return s 4636} 4637 4638// SetClientToken sets the ClientToken field's value. 4639func (s *UpdateArchiveRuleInput) SetClientToken(v string) *UpdateArchiveRuleInput { 4640 s.ClientToken = &v 4641 return s 4642} 4643 4644// SetFilter sets the Filter field's value. 4645func (s *UpdateArchiveRuleInput) SetFilter(v map[string]*Criterion) *UpdateArchiveRuleInput { 4646 s.Filter = v 4647 return s 4648} 4649 4650// SetRuleName sets the RuleName field's value. 4651func (s *UpdateArchiveRuleInput) SetRuleName(v string) *UpdateArchiveRuleInput { 4652 s.RuleName = &v 4653 return s 4654} 4655 4656type UpdateArchiveRuleOutput struct { 4657 _ struct{} `type:"structure"` 4658} 4659 4660// String returns the string representation 4661func (s UpdateArchiveRuleOutput) String() string { 4662 return awsutil.Prettify(s) 4663} 4664 4665// GoString returns the string representation 4666func (s UpdateArchiveRuleOutput) GoString() string { 4667 return s.String() 4668} 4669 4670// Updates findings with the new values provided in the request. 4671type UpdateFindingsInput struct { 4672 _ struct{} `type:"structure"` 4673 4674 // The ARN of the analyzer that generated the findings to update. 4675 // 4676 // AnalyzerArn is a required field 4677 AnalyzerArn *string `locationName:"analyzerArn" type:"string" required:"true"` 4678 4679 // A client token. 4680 ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` 4681 4682 // The IDs of the findings to update. 4683 Ids []*string `locationName:"ids" type:"list"` 4684 4685 // The ARN of the resource identified in the finding. 4686 ResourceArn *string `locationName:"resourceArn" type:"string"` 4687 4688 // The state represents the action to take to update the finding Status. Use 4689 // ARCHIVE to change an Active finding to an Archived finding. Use ACTIVE to 4690 // change an Archived finding to an Active finding. 4691 // 4692 // Status is a required field 4693 Status *string `locationName:"status" type:"string" required:"true" enum:"FindingStatusUpdate"` 4694} 4695 4696// String returns the string representation 4697func (s UpdateFindingsInput) String() string { 4698 return awsutil.Prettify(s) 4699} 4700 4701// GoString returns the string representation 4702func (s UpdateFindingsInput) GoString() string { 4703 return s.String() 4704} 4705 4706// Validate inspects the fields of the type to determine if they are valid. 4707func (s *UpdateFindingsInput) Validate() error { 4708 invalidParams := request.ErrInvalidParams{Context: "UpdateFindingsInput"} 4709 if s.AnalyzerArn == nil { 4710 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 4711 } 4712 if s.Status == nil { 4713 invalidParams.Add(request.NewErrParamRequired("Status")) 4714 } 4715 4716 if invalidParams.Len() > 0 { 4717 return invalidParams 4718 } 4719 return nil 4720} 4721 4722// SetAnalyzerArn sets the AnalyzerArn field's value. 4723func (s *UpdateFindingsInput) SetAnalyzerArn(v string) *UpdateFindingsInput { 4724 s.AnalyzerArn = &v 4725 return s 4726} 4727 4728// SetClientToken sets the ClientToken field's value. 4729func (s *UpdateFindingsInput) SetClientToken(v string) *UpdateFindingsInput { 4730 s.ClientToken = &v 4731 return s 4732} 4733 4734// SetIds sets the Ids field's value. 4735func (s *UpdateFindingsInput) SetIds(v []*string) *UpdateFindingsInput { 4736 s.Ids = v 4737 return s 4738} 4739 4740// SetResourceArn sets the ResourceArn field's value. 4741func (s *UpdateFindingsInput) SetResourceArn(v string) *UpdateFindingsInput { 4742 s.ResourceArn = &v 4743 return s 4744} 4745 4746// SetStatus sets the Status field's value. 4747func (s *UpdateFindingsInput) SetStatus(v string) *UpdateFindingsInput { 4748 s.Status = &v 4749 return s 4750} 4751 4752type UpdateFindingsOutput struct { 4753 _ struct{} `type:"structure"` 4754} 4755 4756// String returns the string representation 4757func (s UpdateFindingsOutput) String() string { 4758 return awsutil.Prettify(s) 4759} 4760 4761// GoString returns the string representation 4762func (s UpdateFindingsOutput) GoString() string { 4763 return s.String() 4764} 4765 4766// Validation exception error. 4767type ValidationException struct { 4768 _ struct{} `type:"structure"` 4769 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4770 4771 // A list of fields that didn't validate. 4772 FieldList []*ValidationExceptionField `locationName:"fieldList" type:"list"` 4773 4774 Message_ *string `locationName:"message" type:"string"` 4775 4776 // The reason for the exception. 4777 // 4778 // Reason is a required field 4779 Reason *string `locationName:"reason" type:"string" required:"true" enum:"ValidationExceptionReason"` 4780} 4781 4782// String returns the string representation 4783func (s ValidationException) String() string { 4784 return awsutil.Prettify(s) 4785} 4786 4787// GoString returns the string representation 4788func (s ValidationException) GoString() string { 4789 return s.String() 4790} 4791 4792func newErrorValidationException(v protocol.ResponseMetadata) error { 4793 return &ValidationException{ 4794 RespMetadata: v, 4795 } 4796} 4797 4798// Code returns the exception type name. 4799func (s *ValidationException) Code() string { 4800 return "ValidationException" 4801} 4802 4803// Message returns the exception's message. 4804func (s *ValidationException) Message() string { 4805 if s.Message_ != nil { 4806 return *s.Message_ 4807 } 4808 return "" 4809} 4810 4811// OrigErr always returns nil, satisfies awserr.Error interface. 4812func (s *ValidationException) OrigErr() error { 4813 return nil 4814} 4815 4816func (s *ValidationException) Error() string { 4817 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 4818} 4819 4820// Status code returns the HTTP status code for the request's response error. 4821func (s *ValidationException) StatusCode() int { 4822 return s.RespMetadata.StatusCode 4823} 4824 4825// RequestID returns the service's response RequestID for request. 4826func (s *ValidationException) RequestID() string { 4827 return s.RespMetadata.RequestID 4828} 4829 4830// Contains information about a validation exception. 4831type ValidationExceptionField struct { 4832 _ struct{} `type:"structure"` 4833 4834 // A message about the validation exception. 4835 // 4836 // Message is a required field 4837 Message *string `locationName:"message" type:"string" required:"true"` 4838 4839 // The name of the validation exception. 4840 // 4841 // Name is a required field 4842 Name *string `locationName:"name" type:"string" required:"true"` 4843} 4844 4845// String returns the string representation 4846func (s ValidationExceptionField) String() string { 4847 return awsutil.Prettify(s) 4848} 4849 4850// GoString returns the string representation 4851func (s ValidationExceptionField) GoString() string { 4852 return s.String() 4853} 4854 4855// SetMessage sets the Message field's value. 4856func (s *ValidationExceptionField) SetMessage(v string) *ValidationExceptionField { 4857 s.Message = &v 4858 return s 4859} 4860 4861// SetName sets the Name field's value. 4862func (s *ValidationExceptionField) SetName(v string) *ValidationExceptionField { 4863 s.Name = &v 4864 return s 4865} 4866 4867const ( 4868 // AnalyzerStatusActive is a AnalyzerStatus enum value 4869 AnalyzerStatusActive = "ACTIVE" 4870 4871 // AnalyzerStatusCreating is a AnalyzerStatus enum value 4872 AnalyzerStatusCreating = "CREATING" 4873 4874 // AnalyzerStatusDisabled is a AnalyzerStatus enum value 4875 AnalyzerStatusDisabled = "DISABLED" 4876 4877 // AnalyzerStatusFailed is a AnalyzerStatus enum value 4878 AnalyzerStatusFailed = "FAILED" 4879) 4880 4881const ( 4882 // FindingSourceTypeBucketAcl is a FindingSourceType enum value 4883 FindingSourceTypeBucketAcl = "BUCKET_ACL" 4884 4885 // FindingSourceTypePolicy is a FindingSourceType enum value 4886 FindingSourceTypePolicy = "POLICY" 4887 4888 // FindingSourceTypeS3AccessPoint is a FindingSourceType enum value 4889 FindingSourceTypeS3AccessPoint = "S3_ACCESS_POINT" 4890) 4891 4892const ( 4893 // FindingStatusActive is a FindingStatus enum value 4894 FindingStatusActive = "ACTIVE" 4895 4896 // FindingStatusArchived is a FindingStatus enum value 4897 FindingStatusArchived = "ARCHIVED" 4898 4899 // FindingStatusResolved is a FindingStatus enum value 4900 FindingStatusResolved = "RESOLVED" 4901) 4902 4903const ( 4904 // FindingStatusUpdateActive is a FindingStatusUpdate enum value 4905 FindingStatusUpdateActive = "ACTIVE" 4906 4907 // FindingStatusUpdateArchived is a FindingStatusUpdate enum value 4908 FindingStatusUpdateArchived = "ARCHIVED" 4909) 4910 4911const ( 4912 // OrderByAsc is a OrderBy enum value 4913 OrderByAsc = "ASC" 4914 4915 // OrderByDesc is a OrderBy enum value 4916 OrderByDesc = "DESC" 4917) 4918 4919const ( 4920 // ReasonCodeAwsServiceAccessDisabled is a ReasonCode enum value 4921 ReasonCodeAwsServiceAccessDisabled = "AWS_SERVICE_ACCESS_DISABLED" 4922 4923 // ReasonCodeDelegatedAdministratorDeregistered is a ReasonCode enum value 4924 ReasonCodeDelegatedAdministratorDeregistered = "DELEGATED_ADMINISTRATOR_DEREGISTERED" 4925 4926 // ReasonCodeOrganizationDeleted is a ReasonCode enum value 4927 ReasonCodeOrganizationDeleted = "ORGANIZATION_DELETED" 4928 4929 // ReasonCodeServiceLinkedRoleCreationFailed is a ReasonCode enum value 4930 ReasonCodeServiceLinkedRoleCreationFailed = "SERVICE_LINKED_ROLE_CREATION_FAILED" 4931) 4932 4933const ( 4934 // ResourceTypeAwsIamRole is a ResourceType enum value 4935 ResourceTypeAwsIamRole = "AWS::IAM::Role" 4936 4937 // ResourceTypeAwsKmsKey is a ResourceType enum value 4938 ResourceTypeAwsKmsKey = "AWS::KMS::Key" 4939 4940 // ResourceTypeAwsLambdaFunction is a ResourceType enum value 4941 ResourceTypeAwsLambdaFunction = "AWS::Lambda::Function" 4942 4943 // ResourceTypeAwsLambdaLayerVersion is a ResourceType enum value 4944 ResourceTypeAwsLambdaLayerVersion = "AWS::Lambda::LayerVersion" 4945 4946 // ResourceTypeAwsS3Bucket is a ResourceType enum value 4947 ResourceTypeAwsS3Bucket = "AWS::S3::Bucket" 4948 4949 // ResourceTypeAwsSqsQueue is a ResourceType enum value 4950 ResourceTypeAwsSqsQueue = "AWS::SQS::Queue" 4951) 4952 4953const ( 4954 // TypeAccount is a Type enum value 4955 TypeAccount = "ACCOUNT" 4956 4957 // TypeOrganization is a Type enum value 4958 TypeOrganization = "ORGANIZATION" 4959) 4960 4961const ( 4962 // ValidationExceptionReasonCannotParse is a ValidationExceptionReason enum value 4963 ValidationExceptionReasonCannotParse = "cannotParse" 4964 4965 // ValidationExceptionReasonFieldValidationFailed is a ValidationExceptionReason enum value 4966 ValidationExceptionReasonFieldValidationFailed = "fieldValidationFailed" 4967 4968 // ValidationExceptionReasonOther is a ValidationExceptionReason enum value 4969 ValidationExceptionReasonOther = "other" 4970 4971 // ValidationExceptionReasonUnknownOperation is a ValidationExceptionReason enum value 4972 ValidationExceptionReasonUnknownOperation = "unknownOperation" 4973) 4974