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 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 type of the resource that was analyzed. 1990 // 1991 // ResourceType is a required field 1992 ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` 1993 1994 // Indicates how the access that generated the finding is granted. 1995 SharedVia []*string `locationName:"sharedVia" type:"list"` 1996 1997 // The current status of the finding generated from the analyzed resource. 1998 Status *string `locationName:"status" type:"string" enum:"FindingStatus"` 1999 2000 // The time at which the finding was updated. 2001 // 2002 // UpdatedAt is a required field 2003 UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 2004} 2005 2006// String returns the string representation 2007func (s AnalyzedResource) String() string { 2008 return awsutil.Prettify(s) 2009} 2010 2011// GoString returns the string representation 2012func (s AnalyzedResource) GoString() string { 2013 return s.String() 2014} 2015 2016// SetActions sets the Actions field's value. 2017func (s *AnalyzedResource) SetActions(v []*string) *AnalyzedResource { 2018 s.Actions = v 2019 return s 2020} 2021 2022// SetAnalyzedAt sets the AnalyzedAt field's value. 2023func (s *AnalyzedResource) SetAnalyzedAt(v time.Time) *AnalyzedResource { 2024 s.AnalyzedAt = &v 2025 return s 2026} 2027 2028// SetCreatedAt sets the CreatedAt field's value. 2029func (s *AnalyzedResource) SetCreatedAt(v time.Time) *AnalyzedResource { 2030 s.CreatedAt = &v 2031 return s 2032} 2033 2034// SetError sets the Error field's value. 2035func (s *AnalyzedResource) SetError(v string) *AnalyzedResource { 2036 s.Error = &v 2037 return s 2038} 2039 2040// SetIsPublic sets the IsPublic field's value. 2041func (s *AnalyzedResource) SetIsPublic(v bool) *AnalyzedResource { 2042 s.IsPublic = &v 2043 return s 2044} 2045 2046// SetResourceArn sets the ResourceArn field's value. 2047func (s *AnalyzedResource) SetResourceArn(v string) *AnalyzedResource { 2048 s.ResourceArn = &v 2049 return s 2050} 2051 2052// SetResourceType sets the ResourceType field's value. 2053func (s *AnalyzedResource) SetResourceType(v string) *AnalyzedResource { 2054 s.ResourceType = &v 2055 return s 2056} 2057 2058// SetSharedVia sets the SharedVia field's value. 2059func (s *AnalyzedResource) SetSharedVia(v []*string) *AnalyzedResource { 2060 s.SharedVia = v 2061 return s 2062} 2063 2064// SetStatus sets the Status field's value. 2065func (s *AnalyzedResource) SetStatus(v string) *AnalyzedResource { 2066 s.Status = &v 2067 return s 2068} 2069 2070// SetUpdatedAt sets the UpdatedAt field's value. 2071func (s *AnalyzedResource) SetUpdatedAt(v time.Time) *AnalyzedResource { 2072 s.UpdatedAt = &v 2073 return s 2074} 2075 2076// Contains the ARN of the analyzed resource. 2077type AnalyzedResourceSummary struct { 2078 _ struct{} `type:"structure"` 2079 2080 // The ARN of the analyzed resource. 2081 // 2082 // ResourceArn is a required field 2083 ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` 2084 2085 // The type of resource that was analyzed. 2086 // 2087 // ResourceType is a required field 2088 ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` 2089} 2090 2091// String returns the string representation 2092func (s AnalyzedResourceSummary) String() string { 2093 return awsutil.Prettify(s) 2094} 2095 2096// GoString returns the string representation 2097func (s AnalyzedResourceSummary) GoString() string { 2098 return s.String() 2099} 2100 2101// SetResourceArn sets the ResourceArn field's value. 2102func (s *AnalyzedResourceSummary) SetResourceArn(v string) *AnalyzedResourceSummary { 2103 s.ResourceArn = &v 2104 return s 2105} 2106 2107// SetResourceType sets the ResourceType field's value. 2108func (s *AnalyzedResourceSummary) SetResourceType(v string) *AnalyzedResourceSummary { 2109 s.ResourceType = &v 2110 return s 2111} 2112 2113// Contains information about the analyzer. 2114type AnalyzerSummary struct { 2115 _ struct{} `type:"structure"` 2116 2117 // The ARN of the analyzer. 2118 // 2119 // Arn is a required field 2120 Arn *string `locationName:"arn" type:"string" required:"true"` 2121 2122 // A timestamp for the time at which the analyzer was created. 2123 // 2124 // CreatedAt is a required field 2125 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 2126 2127 // The resource that was most recently analyzed by the analyzer. 2128 LastResourceAnalyzed *string `locationName:"lastResourceAnalyzed" type:"string"` 2129 2130 // The time at which the most recently analyzed resource was analyzed. 2131 LastResourceAnalyzedAt *time.Time `locationName:"lastResourceAnalyzedAt" type:"timestamp" timestampFormat:"iso8601"` 2132 2133 // The name of the analyzer. 2134 // 2135 // Name is a required field 2136 Name *string `locationName:"name" min:"1" type:"string" required:"true"` 2137 2138 // The tags added to the analyzer. 2139 Tags map[string]*string `locationName:"tags" type:"map"` 2140 2141 // The type of analyzer, which corresponds to the zone of trust chosen for the 2142 // analyzer. 2143 // 2144 // Type is a required field 2145 Type *string `locationName:"type" type:"string" required:"true" enum:"Type"` 2146} 2147 2148// String returns the string representation 2149func (s AnalyzerSummary) String() string { 2150 return awsutil.Prettify(s) 2151} 2152 2153// GoString returns the string representation 2154func (s AnalyzerSummary) GoString() string { 2155 return s.String() 2156} 2157 2158// SetArn sets the Arn field's value. 2159func (s *AnalyzerSummary) SetArn(v string) *AnalyzerSummary { 2160 s.Arn = &v 2161 return s 2162} 2163 2164// SetCreatedAt sets the CreatedAt field's value. 2165func (s *AnalyzerSummary) SetCreatedAt(v time.Time) *AnalyzerSummary { 2166 s.CreatedAt = &v 2167 return s 2168} 2169 2170// SetLastResourceAnalyzed sets the LastResourceAnalyzed field's value. 2171func (s *AnalyzerSummary) SetLastResourceAnalyzed(v string) *AnalyzerSummary { 2172 s.LastResourceAnalyzed = &v 2173 return s 2174} 2175 2176// SetLastResourceAnalyzedAt sets the LastResourceAnalyzedAt field's value. 2177func (s *AnalyzerSummary) SetLastResourceAnalyzedAt(v time.Time) *AnalyzerSummary { 2178 s.LastResourceAnalyzedAt = &v 2179 return s 2180} 2181 2182// SetName sets the Name field's value. 2183func (s *AnalyzerSummary) SetName(v string) *AnalyzerSummary { 2184 s.Name = &v 2185 return s 2186} 2187 2188// SetTags sets the Tags field's value. 2189func (s *AnalyzerSummary) SetTags(v map[string]*string) *AnalyzerSummary { 2190 s.Tags = v 2191 return s 2192} 2193 2194// SetType sets the Type field's value. 2195func (s *AnalyzerSummary) SetType(v string) *AnalyzerSummary { 2196 s.Type = &v 2197 return s 2198} 2199 2200// Contains information about an archive rule. 2201type ArchiveRuleSummary struct { 2202 _ struct{} `type:"structure"` 2203 2204 // The time at which the archive rule was created. 2205 // 2206 // CreatedAt is a required field 2207 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 2208 2209 // A filter used to define the archive rule. 2210 // 2211 // Filter is a required field 2212 Filter map[string]*Criterion `locationName:"filter" type:"map" required:"true"` 2213 2214 // The name of the archive rule. 2215 // 2216 // RuleName is a required field 2217 RuleName *string `locationName:"ruleName" min:"1" type:"string" required:"true"` 2218 2219 // The time at which the archive rule was last updated. 2220 // 2221 // UpdatedAt is a required field 2222 UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 2223} 2224 2225// String returns the string representation 2226func (s ArchiveRuleSummary) String() string { 2227 return awsutil.Prettify(s) 2228} 2229 2230// GoString returns the string representation 2231func (s ArchiveRuleSummary) GoString() string { 2232 return s.String() 2233} 2234 2235// SetCreatedAt sets the CreatedAt field's value. 2236func (s *ArchiveRuleSummary) SetCreatedAt(v time.Time) *ArchiveRuleSummary { 2237 s.CreatedAt = &v 2238 return s 2239} 2240 2241// SetFilter sets the Filter field's value. 2242func (s *ArchiveRuleSummary) SetFilter(v map[string]*Criterion) *ArchiveRuleSummary { 2243 s.Filter = v 2244 return s 2245} 2246 2247// SetRuleName sets the RuleName field's value. 2248func (s *ArchiveRuleSummary) SetRuleName(v string) *ArchiveRuleSummary { 2249 s.RuleName = &v 2250 return s 2251} 2252 2253// SetUpdatedAt sets the UpdatedAt field's value. 2254func (s *ArchiveRuleSummary) SetUpdatedAt(v time.Time) *ArchiveRuleSummary { 2255 s.UpdatedAt = &v 2256 return s 2257} 2258 2259// A conflict exception error. 2260type ConflictException struct { 2261 _ struct{} `type:"structure"` 2262 respMetadata protocol.ResponseMetadata 2263 2264 Message_ *string `locationName:"message" type:"string"` 2265 2266 // The ID of the resource. 2267 // 2268 // ResourceId is a required field 2269 ResourceId *string `locationName:"resourceId" type:"string" required:"true"` 2270 2271 // The resource type. 2272 // 2273 // ResourceType is a required field 2274 ResourceType *string `locationName:"resourceType" type:"string" required:"true"` 2275} 2276 2277// String returns the string representation 2278func (s ConflictException) String() string { 2279 return awsutil.Prettify(s) 2280} 2281 2282// GoString returns the string representation 2283func (s ConflictException) GoString() string { 2284 return s.String() 2285} 2286 2287func newErrorConflictException(v protocol.ResponseMetadata) error { 2288 return &ConflictException{ 2289 respMetadata: v, 2290 } 2291} 2292 2293// Code returns the exception type name. 2294func (s ConflictException) Code() string { 2295 return "ConflictException" 2296} 2297 2298// Message returns the exception's message. 2299func (s ConflictException) Message() string { 2300 if s.Message_ != nil { 2301 return *s.Message_ 2302 } 2303 return "" 2304} 2305 2306// OrigErr always returns nil, satisfies awserr.Error interface. 2307func (s ConflictException) OrigErr() error { 2308 return nil 2309} 2310 2311func (s ConflictException) Error() string { 2312 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 2313} 2314 2315// Status code returns the HTTP status code for the request's response error. 2316func (s ConflictException) StatusCode() int { 2317 return s.respMetadata.StatusCode 2318} 2319 2320// RequestID returns the service's response RequestID for request. 2321func (s ConflictException) RequestID() string { 2322 return s.respMetadata.RequestID 2323} 2324 2325// Creates an analyzer. 2326type CreateAnalyzerInput struct { 2327 _ struct{} `type:"structure"` 2328 2329 // The name of the analyzer to create. 2330 // 2331 // AnalyzerName is a required field 2332 AnalyzerName *string `locationName:"analyzerName" min:"1" type:"string" required:"true"` 2333 2334 // Specifies the archive rules to add for the analyzer. Archive rules automatically 2335 // archive findings that meet the criteria you define for the rule. 2336 ArchiveRules []*InlineArchiveRule `locationName:"archiveRules" type:"list"` 2337 2338 // A client token. 2339 ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` 2340 2341 // The tags to apply to the analyzer. 2342 Tags map[string]*string `locationName:"tags" type:"map"` 2343 2344 // The type of analyzer to create. Only ACCOUNT analyzers are supported. You 2345 // can create only one analyzer per account per Region. 2346 // 2347 // Type is a required field 2348 Type *string `locationName:"type" type:"string" required:"true" enum:"Type"` 2349} 2350 2351// String returns the string representation 2352func (s CreateAnalyzerInput) String() string { 2353 return awsutil.Prettify(s) 2354} 2355 2356// GoString returns the string representation 2357func (s CreateAnalyzerInput) GoString() string { 2358 return s.String() 2359} 2360 2361// Validate inspects the fields of the type to determine if they are valid. 2362func (s *CreateAnalyzerInput) Validate() error { 2363 invalidParams := request.ErrInvalidParams{Context: "CreateAnalyzerInput"} 2364 if s.AnalyzerName == nil { 2365 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 2366 } 2367 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 2368 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 2369 } 2370 if s.Type == nil { 2371 invalidParams.Add(request.NewErrParamRequired("Type")) 2372 } 2373 if s.ArchiveRules != nil { 2374 for i, v := range s.ArchiveRules { 2375 if v == nil { 2376 continue 2377 } 2378 if err := v.Validate(); err != nil { 2379 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ArchiveRules", i), err.(request.ErrInvalidParams)) 2380 } 2381 } 2382 } 2383 2384 if invalidParams.Len() > 0 { 2385 return invalidParams 2386 } 2387 return nil 2388} 2389 2390// SetAnalyzerName sets the AnalyzerName field's value. 2391func (s *CreateAnalyzerInput) SetAnalyzerName(v string) *CreateAnalyzerInput { 2392 s.AnalyzerName = &v 2393 return s 2394} 2395 2396// SetArchiveRules sets the ArchiveRules field's value. 2397func (s *CreateAnalyzerInput) SetArchiveRules(v []*InlineArchiveRule) *CreateAnalyzerInput { 2398 s.ArchiveRules = v 2399 return s 2400} 2401 2402// SetClientToken sets the ClientToken field's value. 2403func (s *CreateAnalyzerInput) SetClientToken(v string) *CreateAnalyzerInput { 2404 s.ClientToken = &v 2405 return s 2406} 2407 2408// SetTags sets the Tags field's value. 2409func (s *CreateAnalyzerInput) SetTags(v map[string]*string) *CreateAnalyzerInput { 2410 s.Tags = v 2411 return s 2412} 2413 2414// SetType sets the Type field's value. 2415func (s *CreateAnalyzerInput) SetType(v string) *CreateAnalyzerInput { 2416 s.Type = &v 2417 return s 2418} 2419 2420// The response to the request to create an analyzer. 2421type CreateAnalyzerOutput struct { 2422 _ struct{} `type:"structure"` 2423 2424 // The ARN of the analyzer that was created by the request. 2425 Arn *string `locationName:"arn" type:"string"` 2426} 2427 2428// String returns the string representation 2429func (s CreateAnalyzerOutput) String() string { 2430 return awsutil.Prettify(s) 2431} 2432 2433// GoString returns the string representation 2434func (s CreateAnalyzerOutput) GoString() string { 2435 return s.String() 2436} 2437 2438// SetArn sets the Arn field's value. 2439func (s *CreateAnalyzerOutput) SetArn(v string) *CreateAnalyzerOutput { 2440 s.Arn = &v 2441 return s 2442} 2443 2444// Creates an archive rule. 2445type CreateArchiveRuleInput struct { 2446 _ struct{} `type:"structure"` 2447 2448 // The name of the created analyzer. 2449 // 2450 // AnalyzerName is a required field 2451 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 2452 2453 // A client token. 2454 ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` 2455 2456 // The criteria for the rule. 2457 // 2458 // Filter is a required field 2459 Filter map[string]*Criterion `locationName:"filter" type:"map" required:"true"` 2460 2461 // The name of the rule to create. 2462 // 2463 // RuleName is a required field 2464 RuleName *string `locationName:"ruleName" min:"1" type:"string" required:"true"` 2465} 2466 2467// String returns the string representation 2468func (s CreateArchiveRuleInput) String() string { 2469 return awsutil.Prettify(s) 2470} 2471 2472// GoString returns the string representation 2473func (s CreateArchiveRuleInput) GoString() string { 2474 return s.String() 2475} 2476 2477// Validate inspects the fields of the type to determine if they are valid. 2478func (s *CreateArchiveRuleInput) Validate() error { 2479 invalidParams := request.ErrInvalidParams{Context: "CreateArchiveRuleInput"} 2480 if s.AnalyzerName == nil { 2481 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 2482 } 2483 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 2484 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 2485 } 2486 if s.Filter == nil { 2487 invalidParams.Add(request.NewErrParamRequired("Filter")) 2488 } 2489 if s.RuleName == nil { 2490 invalidParams.Add(request.NewErrParamRequired("RuleName")) 2491 } 2492 if s.RuleName != nil && len(*s.RuleName) < 1 { 2493 invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) 2494 } 2495 if s.Filter != nil { 2496 for i, v := range s.Filter { 2497 if v == nil { 2498 continue 2499 } 2500 if err := v.Validate(); err != nil { 2501 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filter", i), err.(request.ErrInvalidParams)) 2502 } 2503 } 2504 } 2505 2506 if invalidParams.Len() > 0 { 2507 return invalidParams 2508 } 2509 return nil 2510} 2511 2512// SetAnalyzerName sets the AnalyzerName field's value. 2513func (s *CreateArchiveRuleInput) SetAnalyzerName(v string) *CreateArchiveRuleInput { 2514 s.AnalyzerName = &v 2515 return s 2516} 2517 2518// SetClientToken sets the ClientToken field's value. 2519func (s *CreateArchiveRuleInput) SetClientToken(v string) *CreateArchiveRuleInput { 2520 s.ClientToken = &v 2521 return s 2522} 2523 2524// SetFilter sets the Filter field's value. 2525func (s *CreateArchiveRuleInput) SetFilter(v map[string]*Criterion) *CreateArchiveRuleInput { 2526 s.Filter = v 2527 return s 2528} 2529 2530// SetRuleName sets the RuleName field's value. 2531func (s *CreateArchiveRuleInput) SetRuleName(v string) *CreateArchiveRuleInput { 2532 s.RuleName = &v 2533 return s 2534} 2535 2536type CreateArchiveRuleOutput struct { 2537 _ struct{} `type:"structure"` 2538} 2539 2540// String returns the string representation 2541func (s CreateArchiveRuleOutput) String() string { 2542 return awsutil.Prettify(s) 2543} 2544 2545// GoString returns the string representation 2546func (s CreateArchiveRuleOutput) GoString() string { 2547 return s.String() 2548} 2549 2550// The criteria to use in the filter that defines the archive rule. 2551type Criterion struct { 2552 _ struct{} `type:"structure"` 2553 2554 // A "contains" operator to match for the filter used to create the rule. 2555 Contains []*string `locationName:"contains" min:"1" type:"list"` 2556 2557 // An "equals" operator to match for the filter used to create the rule. 2558 Eq []*string `locationName:"eq" min:"1" type:"list"` 2559 2560 // An "exists" operator to match for the filter used to create the rule. 2561 Exists *bool `locationName:"exists" type:"boolean"` 2562 2563 // A "not equals" operator to match for the filter used to create the rule. 2564 Neq []*string `locationName:"neq" min:"1" type:"list"` 2565} 2566 2567// String returns the string representation 2568func (s Criterion) String() string { 2569 return awsutil.Prettify(s) 2570} 2571 2572// GoString returns the string representation 2573func (s Criterion) GoString() string { 2574 return s.String() 2575} 2576 2577// Validate inspects the fields of the type to determine if they are valid. 2578func (s *Criterion) Validate() error { 2579 invalidParams := request.ErrInvalidParams{Context: "Criterion"} 2580 if s.Contains != nil && len(s.Contains) < 1 { 2581 invalidParams.Add(request.NewErrParamMinLen("Contains", 1)) 2582 } 2583 if s.Eq != nil && len(s.Eq) < 1 { 2584 invalidParams.Add(request.NewErrParamMinLen("Eq", 1)) 2585 } 2586 if s.Neq != nil && len(s.Neq) < 1 { 2587 invalidParams.Add(request.NewErrParamMinLen("Neq", 1)) 2588 } 2589 2590 if invalidParams.Len() > 0 { 2591 return invalidParams 2592 } 2593 return nil 2594} 2595 2596// SetContains sets the Contains field's value. 2597func (s *Criterion) SetContains(v []*string) *Criterion { 2598 s.Contains = v 2599 return s 2600} 2601 2602// SetEq sets the Eq field's value. 2603func (s *Criterion) SetEq(v []*string) *Criterion { 2604 s.Eq = v 2605 return s 2606} 2607 2608// SetExists sets the Exists field's value. 2609func (s *Criterion) SetExists(v bool) *Criterion { 2610 s.Exists = &v 2611 return s 2612} 2613 2614// SetNeq sets the Neq field's value. 2615func (s *Criterion) SetNeq(v []*string) *Criterion { 2616 s.Neq = v 2617 return s 2618} 2619 2620// Deletes an analyzer. 2621type DeleteAnalyzerInput struct { 2622 _ struct{} `type:"structure"` 2623 2624 // The name of the analyzer to delete. 2625 // 2626 // AnalyzerName is a required field 2627 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 2628 2629 // A client token. 2630 ClientToken *string `location:"querystring" locationName:"clientToken" type:"string" idempotencyToken:"true"` 2631} 2632 2633// String returns the string representation 2634func (s DeleteAnalyzerInput) String() string { 2635 return awsutil.Prettify(s) 2636} 2637 2638// GoString returns the string representation 2639func (s DeleteAnalyzerInput) GoString() string { 2640 return s.String() 2641} 2642 2643// Validate inspects the fields of the type to determine if they are valid. 2644func (s *DeleteAnalyzerInput) Validate() error { 2645 invalidParams := request.ErrInvalidParams{Context: "DeleteAnalyzerInput"} 2646 if s.AnalyzerName == nil { 2647 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 2648 } 2649 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 2650 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 2651 } 2652 2653 if invalidParams.Len() > 0 { 2654 return invalidParams 2655 } 2656 return nil 2657} 2658 2659// SetAnalyzerName sets the AnalyzerName field's value. 2660func (s *DeleteAnalyzerInput) SetAnalyzerName(v string) *DeleteAnalyzerInput { 2661 s.AnalyzerName = &v 2662 return s 2663} 2664 2665// SetClientToken sets the ClientToken field's value. 2666func (s *DeleteAnalyzerInput) SetClientToken(v string) *DeleteAnalyzerInput { 2667 s.ClientToken = &v 2668 return s 2669} 2670 2671type DeleteAnalyzerOutput struct { 2672 _ struct{} `type:"structure"` 2673} 2674 2675// String returns the string representation 2676func (s DeleteAnalyzerOutput) String() string { 2677 return awsutil.Prettify(s) 2678} 2679 2680// GoString returns the string representation 2681func (s DeleteAnalyzerOutput) GoString() string { 2682 return s.String() 2683} 2684 2685// Deletes an archive rule. 2686type DeleteArchiveRuleInput struct { 2687 _ struct{} `type:"structure"` 2688 2689 // The name of the analyzer that associated with the archive rule to delete. 2690 // 2691 // AnalyzerName is a required field 2692 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 2693 2694 // A client token. 2695 ClientToken *string `location:"querystring" locationName:"clientToken" type:"string" idempotencyToken:"true"` 2696 2697 // The name of the rule to delete. 2698 // 2699 // RuleName is a required field 2700 RuleName *string `location:"uri" locationName:"ruleName" min:"1" type:"string" required:"true"` 2701} 2702 2703// String returns the string representation 2704func (s DeleteArchiveRuleInput) String() string { 2705 return awsutil.Prettify(s) 2706} 2707 2708// GoString returns the string representation 2709func (s DeleteArchiveRuleInput) GoString() string { 2710 return s.String() 2711} 2712 2713// Validate inspects the fields of the type to determine if they are valid. 2714func (s *DeleteArchiveRuleInput) Validate() error { 2715 invalidParams := request.ErrInvalidParams{Context: "DeleteArchiveRuleInput"} 2716 if s.AnalyzerName == nil { 2717 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 2718 } 2719 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 2720 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 2721 } 2722 if s.RuleName == nil { 2723 invalidParams.Add(request.NewErrParamRequired("RuleName")) 2724 } 2725 if s.RuleName != nil && len(*s.RuleName) < 1 { 2726 invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) 2727 } 2728 2729 if invalidParams.Len() > 0 { 2730 return invalidParams 2731 } 2732 return nil 2733} 2734 2735// SetAnalyzerName sets the AnalyzerName field's value. 2736func (s *DeleteArchiveRuleInput) SetAnalyzerName(v string) *DeleteArchiveRuleInput { 2737 s.AnalyzerName = &v 2738 return s 2739} 2740 2741// SetClientToken sets the ClientToken field's value. 2742func (s *DeleteArchiveRuleInput) SetClientToken(v string) *DeleteArchiveRuleInput { 2743 s.ClientToken = &v 2744 return s 2745} 2746 2747// SetRuleName sets the RuleName field's value. 2748func (s *DeleteArchiveRuleInput) SetRuleName(v string) *DeleteArchiveRuleInput { 2749 s.RuleName = &v 2750 return s 2751} 2752 2753type DeleteArchiveRuleOutput struct { 2754 _ struct{} `type:"structure"` 2755} 2756 2757// String returns the string representation 2758func (s DeleteArchiveRuleOutput) String() string { 2759 return awsutil.Prettify(s) 2760} 2761 2762// GoString returns the string representation 2763func (s DeleteArchiveRuleOutput) GoString() string { 2764 return s.String() 2765} 2766 2767// Contains information about a finding. 2768type Finding struct { 2769 _ struct{} `type:"structure"` 2770 2771 // The action in the analyzed policy statement that an external principal has 2772 // permission to use. 2773 Action []*string `locationName:"action" type:"list"` 2774 2775 // The time at which the resource was analyzed. 2776 // 2777 // AnalyzedAt is a required field 2778 AnalyzedAt *time.Time `locationName:"analyzedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 2779 2780 // The condition in the analyzed policy statement that resulted in a finding. 2781 // 2782 // Condition is a required field 2783 Condition map[string]*string `locationName:"condition" type:"map" required:"true"` 2784 2785 // The time at which the finding was generated. 2786 // 2787 // CreatedAt is a required field 2788 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 2789 2790 // An error. 2791 Error *string `locationName:"error" type:"string"` 2792 2793 // The ID of the finding. 2794 // 2795 // Id is a required field 2796 Id *string `locationName:"id" type:"string" required:"true"` 2797 2798 // Indicates whether the policy that generated the finding allows public access 2799 // to the resource. 2800 IsPublic *bool `locationName:"isPublic" type:"boolean"` 2801 2802 // The external principal that access to a resource within the zone of trust. 2803 Principal map[string]*string `locationName:"principal" type:"map"` 2804 2805 // The resource that an external principal has access to. 2806 Resource *string `locationName:"resource" type:"string"` 2807 2808 // The type of the resource reported in the finding. 2809 // 2810 // ResourceType is a required field 2811 ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` 2812 2813 // The current status of the finding. 2814 // 2815 // Status is a required field 2816 Status *string `locationName:"status" type:"string" required:"true" enum:"FindingStatus"` 2817 2818 // The time at which the finding was updated. 2819 // 2820 // UpdatedAt is a required field 2821 UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 2822} 2823 2824// String returns the string representation 2825func (s Finding) String() string { 2826 return awsutil.Prettify(s) 2827} 2828 2829// GoString returns the string representation 2830func (s Finding) GoString() string { 2831 return s.String() 2832} 2833 2834// SetAction sets the Action field's value. 2835func (s *Finding) SetAction(v []*string) *Finding { 2836 s.Action = v 2837 return s 2838} 2839 2840// SetAnalyzedAt sets the AnalyzedAt field's value. 2841func (s *Finding) SetAnalyzedAt(v time.Time) *Finding { 2842 s.AnalyzedAt = &v 2843 return s 2844} 2845 2846// SetCondition sets the Condition field's value. 2847func (s *Finding) SetCondition(v map[string]*string) *Finding { 2848 s.Condition = v 2849 return s 2850} 2851 2852// SetCreatedAt sets the CreatedAt field's value. 2853func (s *Finding) SetCreatedAt(v time.Time) *Finding { 2854 s.CreatedAt = &v 2855 return s 2856} 2857 2858// SetError sets the Error field's value. 2859func (s *Finding) SetError(v string) *Finding { 2860 s.Error = &v 2861 return s 2862} 2863 2864// SetId sets the Id field's value. 2865func (s *Finding) SetId(v string) *Finding { 2866 s.Id = &v 2867 return s 2868} 2869 2870// SetIsPublic sets the IsPublic field's value. 2871func (s *Finding) SetIsPublic(v bool) *Finding { 2872 s.IsPublic = &v 2873 return s 2874} 2875 2876// SetPrincipal sets the Principal field's value. 2877func (s *Finding) SetPrincipal(v map[string]*string) *Finding { 2878 s.Principal = v 2879 return s 2880} 2881 2882// SetResource sets the Resource field's value. 2883func (s *Finding) SetResource(v string) *Finding { 2884 s.Resource = &v 2885 return s 2886} 2887 2888// SetResourceType sets the ResourceType field's value. 2889func (s *Finding) SetResourceType(v string) *Finding { 2890 s.ResourceType = &v 2891 return s 2892} 2893 2894// SetStatus sets the Status field's value. 2895func (s *Finding) SetStatus(v string) *Finding { 2896 s.Status = &v 2897 return s 2898} 2899 2900// SetUpdatedAt sets the UpdatedAt field's value. 2901func (s *Finding) SetUpdatedAt(v time.Time) *Finding { 2902 s.UpdatedAt = &v 2903 return s 2904} 2905 2906// Contains information about a finding. 2907type FindingSummary struct { 2908 _ struct{} `type:"structure"` 2909 2910 // The action in the analyzed policy statement that an external principal has 2911 // permission to use. 2912 Action []*string `locationName:"action" type:"list"` 2913 2914 // The time at which the resource-based policy that generated the finding was 2915 // analyzed. 2916 // 2917 // AnalyzedAt is a required field 2918 AnalyzedAt *time.Time `locationName:"analyzedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 2919 2920 // The condition in the analyzed policy statement that resulted in a finding. 2921 // 2922 // Condition is a required field 2923 Condition map[string]*string `locationName:"condition" type:"map" required:"true"` 2924 2925 // The time at which the finding was created. 2926 // 2927 // CreatedAt is a required field 2928 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 2929 2930 // The error that resulted in an Error finding. 2931 Error *string `locationName:"error" type:"string"` 2932 2933 // The ID of the finding. 2934 // 2935 // Id is a required field 2936 Id *string `locationName:"id" type:"string" required:"true"` 2937 2938 // Indicates whether the finding reports a resource that has a policy that allows 2939 // public access. 2940 IsPublic *bool `locationName:"isPublic" type:"boolean"` 2941 2942 // The external principal that has access to a resource within the zone of trust. 2943 Principal map[string]*string `locationName:"principal" type:"map"` 2944 2945 // The resource that the external principal has access to. 2946 Resource *string `locationName:"resource" type:"string"` 2947 2948 // The type of the resource that the external principal has access to. 2949 // 2950 // ResourceType is a required field 2951 ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` 2952 2953 // The status of the finding. 2954 // 2955 // Status is a required field 2956 Status *string `locationName:"status" type:"string" required:"true" enum:"FindingStatus"` 2957 2958 // The time at which the finding was most recently updated. 2959 // 2960 // UpdatedAt is a required field 2961 UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 2962} 2963 2964// String returns the string representation 2965func (s FindingSummary) String() string { 2966 return awsutil.Prettify(s) 2967} 2968 2969// GoString returns the string representation 2970func (s FindingSummary) GoString() string { 2971 return s.String() 2972} 2973 2974// SetAction sets the Action field's value. 2975func (s *FindingSummary) SetAction(v []*string) *FindingSummary { 2976 s.Action = v 2977 return s 2978} 2979 2980// SetAnalyzedAt sets the AnalyzedAt field's value. 2981func (s *FindingSummary) SetAnalyzedAt(v time.Time) *FindingSummary { 2982 s.AnalyzedAt = &v 2983 return s 2984} 2985 2986// SetCondition sets the Condition field's value. 2987func (s *FindingSummary) SetCondition(v map[string]*string) *FindingSummary { 2988 s.Condition = v 2989 return s 2990} 2991 2992// SetCreatedAt sets the CreatedAt field's value. 2993func (s *FindingSummary) SetCreatedAt(v time.Time) *FindingSummary { 2994 s.CreatedAt = &v 2995 return s 2996} 2997 2998// SetError sets the Error field's value. 2999func (s *FindingSummary) SetError(v string) *FindingSummary { 3000 s.Error = &v 3001 return s 3002} 3003 3004// SetId sets the Id field's value. 3005func (s *FindingSummary) SetId(v string) *FindingSummary { 3006 s.Id = &v 3007 return s 3008} 3009 3010// SetIsPublic sets the IsPublic field's value. 3011func (s *FindingSummary) SetIsPublic(v bool) *FindingSummary { 3012 s.IsPublic = &v 3013 return s 3014} 3015 3016// SetPrincipal sets the Principal field's value. 3017func (s *FindingSummary) SetPrincipal(v map[string]*string) *FindingSummary { 3018 s.Principal = v 3019 return s 3020} 3021 3022// SetResource sets the Resource field's value. 3023func (s *FindingSummary) SetResource(v string) *FindingSummary { 3024 s.Resource = &v 3025 return s 3026} 3027 3028// SetResourceType sets the ResourceType field's value. 3029func (s *FindingSummary) SetResourceType(v string) *FindingSummary { 3030 s.ResourceType = &v 3031 return s 3032} 3033 3034// SetStatus sets the Status field's value. 3035func (s *FindingSummary) SetStatus(v string) *FindingSummary { 3036 s.Status = &v 3037 return s 3038} 3039 3040// SetUpdatedAt sets the UpdatedAt field's value. 3041func (s *FindingSummary) SetUpdatedAt(v time.Time) *FindingSummary { 3042 s.UpdatedAt = &v 3043 return s 3044} 3045 3046// Retrieves an analyzed resource. 3047type GetAnalyzedResourceInput struct { 3048 _ struct{} `type:"structure"` 3049 3050 // The ARN of the analyzer to retrieve information from. 3051 // 3052 // AnalyzerArn is a required field 3053 AnalyzerArn *string `location:"querystring" locationName:"analyzerArn" type:"string" required:"true"` 3054 3055 // The ARN of the resource to retrieve information about. 3056 // 3057 // ResourceArn is a required field 3058 ResourceArn *string `location:"querystring" locationName:"resourceArn" type:"string" required:"true"` 3059} 3060 3061// String returns the string representation 3062func (s GetAnalyzedResourceInput) String() string { 3063 return awsutil.Prettify(s) 3064} 3065 3066// GoString returns the string representation 3067func (s GetAnalyzedResourceInput) GoString() string { 3068 return s.String() 3069} 3070 3071// Validate inspects the fields of the type to determine if they are valid. 3072func (s *GetAnalyzedResourceInput) Validate() error { 3073 invalidParams := request.ErrInvalidParams{Context: "GetAnalyzedResourceInput"} 3074 if s.AnalyzerArn == nil { 3075 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 3076 } 3077 if s.ResourceArn == nil { 3078 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 3079 } 3080 3081 if invalidParams.Len() > 0 { 3082 return invalidParams 3083 } 3084 return nil 3085} 3086 3087// SetAnalyzerArn sets the AnalyzerArn field's value. 3088func (s *GetAnalyzedResourceInput) SetAnalyzerArn(v string) *GetAnalyzedResourceInput { 3089 s.AnalyzerArn = &v 3090 return s 3091} 3092 3093// SetResourceArn sets the ResourceArn field's value. 3094func (s *GetAnalyzedResourceInput) SetResourceArn(v string) *GetAnalyzedResourceInput { 3095 s.ResourceArn = &v 3096 return s 3097} 3098 3099// The response to the request. 3100type GetAnalyzedResourceOutput struct { 3101 _ struct{} `type:"structure"` 3102 3103 // An AnalyedResource object that contains information that Access Analyzer 3104 // found when it analyzed the resource. 3105 Resource *AnalyzedResource `locationName:"resource" type:"structure"` 3106} 3107 3108// String returns the string representation 3109func (s GetAnalyzedResourceOutput) String() string { 3110 return awsutil.Prettify(s) 3111} 3112 3113// GoString returns the string representation 3114func (s GetAnalyzedResourceOutput) GoString() string { 3115 return s.String() 3116} 3117 3118// SetResource sets the Resource field's value. 3119func (s *GetAnalyzedResourceOutput) SetResource(v *AnalyzedResource) *GetAnalyzedResourceOutput { 3120 s.Resource = v 3121 return s 3122} 3123 3124// Retrieves an analyzer. 3125type GetAnalyzerInput struct { 3126 _ struct{} `type:"structure"` 3127 3128 // The name of the analyzer retrieved. 3129 // 3130 // AnalyzerName is a required field 3131 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 3132} 3133 3134// String returns the string representation 3135func (s GetAnalyzerInput) String() string { 3136 return awsutil.Prettify(s) 3137} 3138 3139// GoString returns the string representation 3140func (s GetAnalyzerInput) GoString() string { 3141 return s.String() 3142} 3143 3144// Validate inspects the fields of the type to determine if they are valid. 3145func (s *GetAnalyzerInput) Validate() error { 3146 invalidParams := request.ErrInvalidParams{Context: "GetAnalyzerInput"} 3147 if s.AnalyzerName == nil { 3148 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 3149 } 3150 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 3151 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 3152 } 3153 3154 if invalidParams.Len() > 0 { 3155 return invalidParams 3156 } 3157 return nil 3158} 3159 3160// SetAnalyzerName sets the AnalyzerName field's value. 3161func (s *GetAnalyzerInput) SetAnalyzerName(v string) *GetAnalyzerInput { 3162 s.AnalyzerName = &v 3163 return s 3164} 3165 3166// The response to the request. 3167type GetAnalyzerOutput struct { 3168 _ struct{} `type:"structure"` 3169 3170 // An AnalyzerSummary object that contains information about the analyzer. 3171 // 3172 // Analyzer is a required field 3173 Analyzer *AnalyzerSummary `locationName:"analyzer" type:"structure" required:"true"` 3174} 3175 3176// String returns the string representation 3177func (s GetAnalyzerOutput) String() string { 3178 return awsutil.Prettify(s) 3179} 3180 3181// GoString returns the string representation 3182func (s GetAnalyzerOutput) GoString() string { 3183 return s.String() 3184} 3185 3186// SetAnalyzer sets the Analyzer field's value. 3187func (s *GetAnalyzerOutput) SetAnalyzer(v *AnalyzerSummary) *GetAnalyzerOutput { 3188 s.Analyzer = v 3189 return s 3190} 3191 3192// Retrieves an archive rule. 3193type GetArchiveRuleInput struct { 3194 _ struct{} `type:"structure"` 3195 3196 // The name of the analyzer to retrieve rules from. 3197 // 3198 // AnalyzerName is a required field 3199 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 3200 3201 // The name of the rule to retrieve. 3202 // 3203 // RuleName is a required field 3204 RuleName *string `location:"uri" locationName:"ruleName" min:"1" type:"string" required:"true"` 3205} 3206 3207// String returns the string representation 3208func (s GetArchiveRuleInput) String() string { 3209 return awsutil.Prettify(s) 3210} 3211 3212// GoString returns the string representation 3213func (s GetArchiveRuleInput) GoString() string { 3214 return s.String() 3215} 3216 3217// Validate inspects the fields of the type to determine if they are valid. 3218func (s *GetArchiveRuleInput) Validate() error { 3219 invalidParams := request.ErrInvalidParams{Context: "GetArchiveRuleInput"} 3220 if s.AnalyzerName == nil { 3221 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 3222 } 3223 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 3224 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 3225 } 3226 if s.RuleName == nil { 3227 invalidParams.Add(request.NewErrParamRequired("RuleName")) 3228 } 3229 if s.RuleName != nil && len(*s.RuleName) < 1 { 3230 invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) 3231 } 3232 3233 if invalidParams.Len() > 0 { 3234 return invalidParams 3235 } 3236 return nil 3237} 3238 3239// SetAnalyzerName sets the AnalyzerName field's value. 3240func (s *GetArchiveRuleInput) SetAnalyzerName(v string) *GetArchiveRuleInput { 3241 s.AnalyzerName = &v 3242 return s 3243} 3244 3245// SetRuleName sets the RuleName field's value. 3246func (s *GetArchiveRuleInput) SetRuleName(v string) *GetArchiveRuleInput { 3247 s.RuleName = &v 3248 return s 3249} 3250 3251// The response to the request. 3252type GetArchiveRuleOutput struct { 3253 _ struct{} `type:"structure"` 3254 3255 // Contains information about an archive rule. 3256 // 3257 // ArchiveRule is a required field 3258 ArchiveRule *ArchiveRuleSummary `locationName:"archiveRule" type:"structure" required:"true"` 3259} 3260 3261// String returns the string representation 3262func (s GetArchiveRuleOutput) String() string { 3263 return awsutil.Prettify(s) 3264} 3265 3266// GoString returns the string representation 3267func (s GetArchiveRuleOutput) GoString() string { 3268 return s.String() 3269} 3270 3271// SetArchiveRule sets the ArchiveRule field's value. 3272func (s *GetArchiveRuleOutput) SetArchiveRule(v *ArchiveRuleSummary) *GetArchiveRuleOutput { 3273 s.ArchiveRule = v 3274 return s 3275} 3276 3277// Retrieves a finding. 3278type GetFindingInput struct { 3279 _ struct{} `type:"structure"` 3280 3281 // The ARN of the analyzer that generated the finding. 3282 // 3283 // AnalyzerArn is a required field 3284 AnalyzerArn *string `location:"querystring" locationName:"analyzerArn" type:"string" required:"true"` 3285 3286 // The ID of the finding to retrieve. 3287 // 3288 // Id is a required field 3289 Id *string `location:"uri" locationName:"id" type:"string" required:"true"` 3290} 3291 3292// String returns the string representation 3293func (s GetFindingInput) String() string { 3294 return awsutil.Prettify(s) 3295} 3296 3297// GoString returns the string representation 3298func (s GetFindingInput) GoString() string { 3299 return s.String() 3300} 3301 3302// Validate inspects the fields of the type to determine if they are valid. 3303func (s *GetFindingInput) Validate() error { 3304 invalidParams := request.ErrInvalidParams{Context: "GetFindingInput"} 3305 if s.AnalyzerArn == nil { 3306 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 3307 } 3308 if s.Id == nil { 3309 invalidParams.Add(request.NewErrParamRequired("Id")) 3310 } 3311 if s.Id != nil && len(*s.Id) < 1 { 3312 invalidParams.Add(request.NewErrParamMinLen("Id", 1)) 3313 } 3314 3315 if invalidParams.Len() > 0 { 3316 return invalidParams 3317 } 3318 return nil 3319} 3320 3321// SetAnalyzerArn sets the AnalyzerArn field's value. 3322func (s *GetFindingInput) SetAnalyzerArn(v string) *GetFindingInput { 3323 s.AnalyzerArn = &v 3324 return s 3325} 3326 3327// SetId sets the Id field's value. 3328func (s *GetFindingInput) SetId(v string) *GetFindingInput { 3329 s.Id = &v 3330 return s 3331} 3332 3333// The response to the request. 3334type GetFindingOutput struct { 3335 _ struct{} `type:"structure"` 3336 3337 // A finding object that contains finding details. 3338 Finding *Finding `locationName:"finding" type:"structure"` 3339} 3340 3341// String returns the string representation 3342func (s GetFindingOutput) String() string { 3343 return awsutil.Prettify(s) 3344} 3345 3346// GoString returns the string representation 3347func (s GetFindingOutput) GoString() string { 3348 return s.String() 3349} 3350 3351// SetFinding sets the Finding field's value. 3352func (s *GetFindingOutput) SetFinding(v *Finding) *GetFindingOutput { 3353 s.Finding = v 3354 return s 3355} 3356 3357// An criterion statement in an archive rule. Each archive rule may have multiple 3358// criteria. 3359type InlineArchiveRule struct { 3360 _ struct{} `type:"structure"` 3361 3362 // The condition and values for a criterion. 3363 // 3364 // Filter is a required field 3365 Filter map[string]*Criterion `locationName:"filter" type:"map" required:"true"` 3366 3367 // The name of the rule. 3368 // 3369 // RuleName is a required field 3370 RuleName *string `locationName:"ruleName" min:"1" type:"string" required:"true"` 3371} 3372 3373// String returns the string representation 3374func (s InlineArchiveRule) String() string { 3375 return awsutil.Prettify(s) 3376} 3377 3378// GoString returns the string representation 3379func (s InlineArchiveRule) GoString() string { 3380 return s.String() 3381} 3382 3383// Validate inspects the fields of the type to determine if they are valid. 3384func (s *InlineArchiveRule) Validate() error { 3385 invalidParams := request.ErrInvalidParams{Context: "InlineArchiveRule"} 3386 if s.Filter == nil { 3387 invalidParams.Add(request.NewErrParamRequired("Filter")) 3388 } 3389 if s.RuleName == nil { 3390 invalidParams.Add(request.NewErrParamRequired("RuleName")) 3391 } 3392 if s.RuleName != nil && len(*s.RuleName) < 1 { 3393 invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) 3394 } 3395 if s.Filter != nil { 3396 for i, v := range s.Filter { 3397 if v == nil { 3398 continue 3399 } 3400 if err := v.Validate(); err != nil { 3401 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filter", i), err.(request.ErrInvalidParams)) 3402 } 3403 } 3404 } 3405 3406 if invalidParams.Len() > 0 { 3407 return invalidParams 3408 } 3409 return nil 3410} 3411 3412// SetFilter sets the Filter field's value. 3413func (s *InlineArchiveRule) SetFilter(v map[string]*Criterion) *InlineArchiveRule { 3414 s.Filter = v 3415 return s 3416} 3417 3418// SetRuleName sets the RuleName field's value. 3419func (s *InlineArchiveRule) SetRuleName(v string) *InlineArchiveRule { 3420 s.RuleName = &v 3421 return s 3422} 3423 3424// Internal server error. 3425type InternalServerException struct { 3426 _ struct{} `type:"structure"` 3427 respMetadata protocol.ResponseMetadata 3428 3429 Message_ *string `locationName:"message" type:"string"` 3430 3431 // The seconds to wait to retry. 3432 RetryAfterSeconds *int64 `location:"header" locationName:"Retry-After" type:"integer"` 3433} 3434 3435// String returns the string representation 3436func (s InternalServerException) String() string { 3437 return awsutil.Prettify(s) 3438} 3439 3440// GoString returns the string representation 3441func (s InternalServerException) GoString() string { 3442 return s.String() 3443} 3444 3445func newErrorInternalServerException(v protocol.ResponseMetadata) error { 3446 return &InternalServerException{ 3447 respMetadata: v, 3448 } 3449} 3450 3451// Code returns the exception type name. 3452func (s InternalServerException) Code() string { 3453 return "InternalServerException" 3454} 3455 3456// Message returns the exception's message. 3457func (s InternalServerException) Message() string { 3458 if s.Message_ != nil { 3459 return *s.Message_ 3460 } 3461 return "" 3462} 3463 3464// OrigErr always returns nil, satisfies awserr.Error interface. 3465func (s InternalServerException) OrigErr() error { 3466 return nil 3467} 3468 3469func (s InternalServerException) Error() string { 3470 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 3471} 3472 3473// Status code returns the HTTP status code for the request's response error. 3474func (s InternalServerException) StatusCode() int { 3475 return s.respMetadata.StatusCode 3476} 3477 3478// RequestID returns the service's response RequestID for request. 3479func (s InternalServerException) RequestID() string { 3480 return s.respMetadata.RequestID 3481} 3482 3483// Retrieves a list of resources that have been analyzed. 3484type ListAnalyzedResourcesInput struct { 3485 _ struct{} `type:"structure"` 3486 3487 // The ARN of the analyzer to retrieve a list of analyzed resources from. 3488 // 3489 // AnalyzerArn is a required field 3490 AnalyzerArn *string `locationName:"analyzerArn" type:"string" required:"true"` 3491 3492 // The maximum number of results to return in the response. 3493 MaxResults *int64 `locationName:"maxResults" type:"integer"` 3494 3495 // A token used for pagination of results returned. 3496 NextToken *string `locationName:"nextToken" type:"string"` 3497 3498 // The type of resource. 3499 ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` 3500} 3501 3502// String returns the string representation 3503func (s ListAnalyzedResourcesInput) String() string { 3504 return awsutil.Prettify(s) 3505} 3506 3507// GoString returns the string representation 3508func (s ListAnalyzedResourcesInput) GoString() string { 3509 return s.String() 3510} 3511 3512// Validate inspects the fields of the type to determine if they are valid. 3513func (s *ListAnalyzedResourcesInput) Validate() error { 3514 invalidParams := request.ErrInvalidParams{Context: "ListAnalyzedResourcesInput"} 3515 if s.AnalyzerArn == nil { 3516 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 3517 } 3518 3519 if invalidParams.Len() > 0 { 3520 return invalidParams 3521 } 3522 return nil 3523} 3524 3525// SetAnalyzerArn sets the AnalyzerArn field's value. 3526func (s *ListAnalyzedResourcesInput) SetAnalyzerArn(v string) *ListAnalyzedResourcesInput { 3527 s.AnalyzerArn = &v 3528 return s 3529} 3530 3531// SetMaxResults sets the MaxResults field's value. 3532func (s *ListAnalyzedResourcesInput) SetMaxResults(v int64) *ListAnalyzedResourcesInput { 3533 s.MaxResults = &v 3534 return s 3535} 3536 3537// SetNextToken sets the NextToken field's value. 3538func (s *ListAnalyzedResourcesInput) SetNextToken(v string) *ListAnalyzedResourcesInput { 3539 s.NextToken = &v 3540 return s 3541} 3542 3543// SetResourceType sets the ResourceType field's value. 3544func (s *ListAnalyzedResourcesInput) SetResourceType(v string) *ListAnalyzedResourcesInput { 3545 s.ResourceType = &v 3546 return s 3547} 3548 3549// The response to the request. 3550type ListAnalyzedResourcesOutput struct { 3551 _ struct{} `type:"structure"` 3552 3553 // A list of resources that were analyzed. 3554 // 3555 // AnalyzedResources is a required field 3556 AnalyzedResources []*AnalyzedResourceSummary `locationName:"analyzedResources" type:"list" required:"true"` 3557 3558 // A token used for pagination of results returned. 3559 NextToken *string `locationName:"nextToken" type:"string"` 3560} 3561 3562// String returns the string representation 3563func (s ListAnalyzedResourcesOutput) String() string { 3564 return awsutil.Prettify(s) 3565} 3566 3567// GoString returns the string representation 3568func (s ListAnalyzedResourcesOutput) GoString() string { 3569 return s.String() 3570} 3571 3572// SetAnalyzedResources sets the AnalyzedResources field's value. 3573func (s *ListAnalyzedResourcesOutput) SetAnalyzedResources(v []*AnalyzedResourceSummary) *ListAnalyzedResourcesOutput { 3574 s.AnalyzedResources = v 3575 return s 3576} 3577 3578// SetNextToken sets the NextToken field's value. 3579func (s *ListAnalyzedResourcesOutput) SetNextToken(v string) *ListAnalyzedResourcesOutput { 3580 s.NextToken = &v 3581 return s 3582} 3583 3584// Retrieves a list of analyzers. 3585type ListAnalyzersInput struct { 3586 _ struct{} `type:"structure"` 3587 3588 // The maximum number of results to return in the response. 3589 MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` 3590 3591 // A token used for pagination of results returned. 3592 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 3593 3594 // The type of analyzer. 3595 Type *string `location:"querystring" locationName:"type" type:"string" enum:"Type"` 3596} 3597 3598// String returns the string representation 3599func (s ListAnalyzersInput) String() string { 3600 return awsutil.Prettify(s) 3601} 3602 3603// GoString returns the string representation 3604func (s ListAnalyzersInput) GoString() string { 3605 return s.String() 3606} 3607 3608// SetMaxResults sets the MaxResults field's value. 3609func (s *ListAnalyzersInput) SetMaxResults(v int64) *ListAnalyzersInput { 3610 s.MaxResults = &v 3611 return s 3612} 3613 3614// SetNextToken sets the NextToken field's value. 3615func (s *ListAnalyzersInput) SetNextToken(v string) *ListAnalyzersInput { 3616 s.NextToken = &v 3617 return s 3618} 3619 3620// SetType sets the Type field's value. 3621func (s *ListAnalyzersInput) SetType(v string) *ListAnalyzersInput { 3622 s.Type = &v 3623 return s 3624} 3625 3626// The response to the request. 3627type ListAnalyzersOutput struct { 3628 _ struct{} `type:"structure"` 3629 3630 // The analyzers retrieved. 3631 // 3632 // Analyzers is a required field 3633 Analyzers []*AnalyzerSummary `locationName:"analyzers" type:"list" required:"true"` 3634 3635 // A token used for pagination of results returned. 3636 NextToken *string `locationName:"nextToken" type:"string"` 3637} 3638 3639// String returns the string representation 3640func (s ListAnalyzersOutput) String() string { 3641 return awsutil.Prettify(s) 3642} 3643 3644// GoString returns the string representation 3645func (s ListAnalyzersOutput) GoString() string { 3646 return s.String() 3647} 3648 3649// SetAnalyzers sets the Analyzers field's value. 3650func (s *ListAnalyzersOutput) SetAnalyzers(v []*AnalyzerSummary) *ListAnalyzersOutput { 3651 s.Analyzers = v 3652 return s 3653} 3654 3655// SetNextToken sets the NextToken field's value. 3656func (s *ListAnalyzersOutput) SetNextToken(v string) *ListAnalyzersOutput { 3657 s.NextToken = &v 3658 return s 3659} 3660 3661// Retrieves a list of archive rules created for the specified analyzer. 3662type ListArchiveRulesInput struct { 3663 _ struct{} `type:"structure"` 3664 3665 // The name of the analyzer to retrieve rules from. 3666 // 3667 // AnalyzerName is a required field 3668 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 3669 3670 // The maximum number of results to return in the request. 3671 MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` 3672 3673 // A token used for pagination of results returned. 3674 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 3675} 3676 3677// String returns the string representation 3678func (s ListArchiveRulesInput) String() string { 3679 return awsutil.Prettify(s) 3680} 3681 3682// GoString returns the string representation 3683func (s ListArchiveRulesInput) GoString() string { 3684 return s.String() 3685} 3686 3687// Validate inspects the fields of the type to determine if they are valid. 3688func (s *ListArchiveRulesInput) Validate() error { 3689 invalidParams := request.ErrInvalidParams{Context: "ListArchiveRulesInput"} 3690 if s.AnalyzerName == nil { 3691 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 3692 } 3693 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 3694 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 3695 } 3696 3697 if invalidParams.Len() > 0 { 3698 return invalidParams 3699 } 3700 return nil 3701} 3702 3703// SetAnalyzerName sets the AnalyzerName field's value. 3704func (s *ListArchiveRulesInput) SetAnalyzerName(v string) *ListArchiveRulesInput { 3705 s.AnalyzerName = &v 3706 return s 3707} 3708 3709// SetMaxResults sets the MaxResults field's value. 3710func (s *ListArchiveRulesInput) SetMaxResults(v int64) *ListArchiveRulesInput { 3711 s.MaxResults = &v 3712 return s 3713} 3714 3715// SetNextToken sets the NextToken field's value. 3716func (s *ListArchiveRulesInput) SetNextToken(v string) *ListArchiveRulesInput { 3717 s.NextToken = &v 3718 return s 3719} 3720 3721// The response to the request. 3722type ListArchiveRulesOutput struct { 3723 _ struct{} `type:"structure"` 3724 3725 // A list of archive rules created for the specified analyzer. 3726 // 3727 // ArchiveRules is a required field 3728 ArchiveRules []*ArchiveRuleSummary `locationName:"archiveRules" type:"list" required:"true"` 3729 3730 // A token used for pagination of results returned. 3731 NextToken *string `locationName:"nextToken" type:"string"` 3732} 3733 3734// String returns the string representation 3735func (s ListArchiveRulesOutput) String() string { 3736 return awsutil.Prettify(s) 3737} 3738 3739// GoString returns the string representation 3740func (s ListArchiveRulesOutput) GoString() string { 3741 return s.String() 3742} 3743 3744// SetArchiveRules sets the ArchiveRules field's value. 3745func (s *ListArchiveRulesOutput) SetArchiveRules(v []*ArchiveRuleSummary) *ListArchiveRulesOutput { 3746 s.ArchiveRules = v 3747 return s 3748} 3749 3750// SetNextToken sets the NextToken field's value. 3751func (s *ListArchiveRulesOutput) SetNextToken(v string) *ListArchiveRulesOutput { 3752 s.NextToken = &v 3753 return s 3754} 3755 3756// Retrieves a list of findings generated by the specified analyzer. 3757type ListFindingsInput struct { 3758 _ struct{} `type:"structure"` 3759 3760 // The ARN of the analyzer to retrieve findings from. 3761 // 3762 // AnalyzerArn is a required field 3763 AnalyzerArn *string `locationName:"analyzerArn" type:"string" required:"true"` 3764 3765 // A filter to match for the findings to return. 3766 Filter map[string]*Criterion `locationName:"filter" type:"map"` 3767 3768 // The maximum number of results to return in the response. 3769 MaxResults *int64 `locationName:"maxResults" type:"integer"` 3770 3771 // A token used for pagination of results returned. 3772 NextToken *string `locationName:"nextToken" type:"string"` 3773 3774 // The sort order for the findings returned. 3775 Sort *SortCriteria `locationName:"sort" type:"structure"` 3776} 3777 3778// String returns the string representation 3779func (s ListFindingsInput) String() string { 3780 return awsutil.Prettify(s) 3781} 3782 3783// GoString returns the string representation 3784func (s ListFindingsInput) GoString() string { 3785 return s.String() 3786} 3787 3788// Validate inspects the fields of the type to determine if they are valid. 3789func (s *ListFindingsInput) Validate() error { 3790 invalidParams := request.ErrInvalidParams{Context: "ListFindingsInput"} 3791 if s.AnalyzerArn == nil { 3792 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 3793 } 3794 if s.Filter != nil { 3795 for i, v := range s.Filter { 3796 if v == nil { 3797 continue 3798 } 3799 if err := v.Validate(); err != nil { 3800 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filter", i), err.(request.ErrInvalidParams)) 3801 } 3802 } 3803 } 3804 3805 if invalidParams.Len() > 0 { 3806 return invalidParams 3807 } 3808 return nil 3809} 3810 3811// SetAnalyzerArn sets the AnalyzerArn field's value. 3812func (s *ListFindingsInput) SetAnalyzerArn(v string) *ListFindingsInput { 3813 s.AnalyzerArn = &v 3814 return s 3815} 3816 3817// SetFilter sets the Filter field's value. 3818func (s *ListFindingsInput) SetFilter(v map[string]*Criterion) *ListFindingsInput { 3819 s.Filter = v 3820 return s 3821} 3822 3823// SetMaxResults sets the MaxResults field's value. 3824func (s *ListFindingsInput) SetMaxResults(v int64) *ListFindingsInput { 3825 s.MaxResults = &v 3826 return s 3827} 3828 3829// SetNextToken sets the NextToken field's value. 3830func (s *ListFindingsInput) SetNextToken(v string) *ListFindingsInput { 3831 s.NextToken = &v 3832 return s 3833} 3834 3835// SetSort sets the Sort field's value. 3836func (s *ListFindingsInput) SetSort(v *SortCriteria) *ListFindingsInput { 3837 s.Sort = v 3838 return s 3839} 3840 3841// The response to the request. 3842type ListFindingsOutput struct { 3843 _ struct{} `type:"structure"` 3844 3845 // A list of findings retrieved from the analyzer that match the filter criteria 3846 // specified, if any. 3847 // 3848 // Findings is a required field 3849 Findings []*FindingSummary `locationName:"findings" type:"list" required:"true"` 3850 3851 // A token used for pagination of results returned. 3852 NextToken *string `locationName:"nextToken" type:"string"` 3853} 3854 3855// String returns the string representation 3856func (s ListFindingsOutput) String() string { 3857 return awsutil.Prettify(s) 3858} 3859 3860// GoString returns the string representation 3861func (s ListFindingsOutput) GoString() string { 3862 return s.String() 3863} 3864 3865// SetFindings sets the Findings field's value. 3866func (s *ListFindingsOutput) SetFindings(v []*FindingSummary) *ListFindingsOutput { 3867 s.Findings = v 3868 return s 3869} 3870 3871// SetNextToken sets the NextToken field's value. 3872func (s *ListFindingsOutput) SetNextToken(v string) *ListFindingsOutput { 3873 s.NextToken = &v 3874 return s 3875} 3876 3877// Retrieves a list of tags applied to the specified resource. 3878type ListTagsForResourceInput struct { 3879 _ struct{} `type:"structure"` 3880 3881 // The ARN of the resource to retrieve tags from. 3882 // 3883 // ResourceArn is a required field 3884 ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` 3885} 3886 3887// String returns the string representation 3888func (s ListTagsForResourceInput) String() string { 3889 return awsutil.Prettify(s) 3890} 3891 3892// GoString returns the string representation 3893func (s ListTagsForResourceInput) GoString() string { 3894 return s.String() 3895} 3896 3897// Validate inspects the fields of the type to determine if they are valid. 3898func (s *ListTagsForResourceInput) Validate() error { 3899 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 3900 if s.ResourceArn == nil { 3901 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 3902 } 3903 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 3904 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 3905 } 3906 3907 if invalidParams.Len() > 0 { 3908 return invalidParams 3909 } 3910 return nil 3911} 3912 3913// SetResourceArn sets the ResourceArn field's value. 3914func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { 3915 s.ResourceArn = &v 3916 return s 3917} 3918 3919// The response to the request. 3920type ListTagsForResourceOutput struct { 3921 _ struct{} `type:"structure"` 3922 3923 // The tags that are applied to the specified resource. 3924 Tags map[string]*string `locationName:"tags" type:"map"` 3925} 3926 3927// String returns the string representation 3928func (s ListTagsForResourceOutput) String() string { 3929 return awsutil.Prettify(s) 3930} 3931 3932// GoString returns the string representation 3933func (s ListTagsForResourceOutput) GoString() string { 3934 return s.String() 3935} 3936 3937// SetTags sets the Tags field's value. 3938func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForResourceOutput { 3939 s.Tags = v 3940 return s 3941} 3942 3943// The specified resource could not be found. 3944type ResourceNotFoundException struct { 3945 _ struct{} `type:"structure"` 3946 respMetadata protocol.ResponseMetadata 3947 3948 Message_ *string `locationName:"message" type:"string"` 3949 3950 // The ID of the resource. 3951 // 3952 // ResourceId is a required field 3953 ResourceId *string `locationName:"resourceId" type:"string" required:"true"` 3954 3955 // The type of the resource. 3956 // 3957 // ResourceType is a required field 3958 ResourceType *string `locationName:"resourceType" type:"string" required:"true"` 3959} 3960 3961// String returns the string representation 3962func (s ResourceNotFoundException) String() string { 3963 return awsutil.Prettify(s) 3964} 3965 3966// GoString returns the string representation 3967func (s ResourceNotFoundException) GoString() string { 3968 return s.String() 3969} 3970 3971func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 3972 return &ResourceNotFoundException{ 3973 respMetadata: v, 3974 } 3975} 3976 3977// Code returns the exception type name. 3978func (s ResourceNotFoundException) Code() string { 3979 return "ResourceNotFoundException" 3980} 3981 3982// Message returns the exception's message. 3983func (s ResourceNotFoundException) Message() string { 3984 if s.Message_ != nil { 3985 return *s.Message_ 3986 } 3987 return "" 3988} 3989 3990// OrigErr always returns nil, satisfies awserr.Error interface. 3991func (s ResourceNotFoundException) OrigErr() error { 3992 return nil 3993} 3994 3995func (s ResourceNotFoundException) Error() string { 3996 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 3997} 3998 3999// Status code returns the HTTP status code for the request's response error. 4000func (s ResourceNotFoundException) StatusCode() int { 4001 return s.respMetadata.StatusCode 4002} 4003 4004// RequestID returns the service's response RequestID for request. 4005func (s ResourceNotFoundException) RequestID() string { 4006 return s.respMetadata.RequestID 4007} 4008 4009// Service quote met error. 4010type ServiceQuotaExceededException struct { 4011 _ struct{} `type:"structure"` 4012 respMetadata protocol.ResponseMetadata 4013 4014 Message_ *string `locationName:"message" type:"string"` 4015 4016 // The resource ID. 4017 // 4018 // ResourceId is a required field 4019 ResourceId *string `locationName:"resourceId" type:"string" required:"true"` 4020 4021 // The resource type. 4022 // 4023 // ResourceType is a required field 4024 ResourceType *string `locationName:"resourceType" type:"string" required:"true"` 4025} 4026 4027// String returns the string representation 4028func (s ServiceQuotaExceededException) String() string { 4029 return awsutil.Prettify(s) 4030} 4031 4032// GoString returns the string representation 4033func (s ServiceQuotaExceededException) GoString() string { 4034 return s.String() 4035} 4036 4037func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error { 4038 return &ServiceQuotaExceededException{ 4039 respMetadata: v, 4040 } 4041} 4042 4043// Code returns the exception type name. 4044func (s ServiceQuotaExceededException) Code() string { 4045 return "ServiceQuotaExceededException" 4046} 4047 4048// Message returns the exception's message. 4049func (s ServiceQuotaExceededException) Message() string { 4050 if s.Message_ != nil { 4051 return *s.Message_ 4052 } 4053 return "" 4054} 4055 4056// OrigErr always returns nil, satisfies awserr.Error interface. 4057func (s ServiceQuotaExceededException) OrigErr() error { 4058 return nil 4059} 4060 4061func (s ServiceQuotaExceededException) Error() string { 4062 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 4063} 4064 4065// Status code returns the HTTP status code for the request's response error. 4066func (s ServiceQuotaExceededException) StatusCode() int { 4067 return s.respMetadata.StatusCode 4068} 4069 4070// RequestID returns the service's response RequestID for request. 4071func (s ServiceQuotaExceededException) RequestID() string { 4072 return s.respMetadata.RequestID 4073} 4074 4075// The criteria used to sort. 4076type SortCriteria struct { 4077 _ struct{} `type:"structure"` 4078 4079 // The name of the attribute to sort on. 4080 AttributeName *string `locationName:"attributeName" type:"string"` 4081 4082 // The sort order, ascending or descending. 4083 OrderBy *string `locationName:"orderBy" type:"string" enum:"OrderBy"` 4084} 4085 4086// String returns the string representation 4087func (s SortCriteria) String() string { 4088 return awsutil.Prettify(s) 4089} 4090 4091// GoString returns the string representation 4092func (s SortCriteria) GoString() string { 4093 return s.String() 4094} 4095 4096// SetAttributeName sets the AttributeName field's value. 4097func (s *SortCriteria) SetAttributeName(v string) *SortCriteria { 4098 s.AttributeName = &v 4099 return s 4100} 4101 4102// SetOrderBy sets the OrderBy field's value. 4103func (s *SortCriteria) SetOrderBy(v string) *SortCriteria { 4104 s.OrderBy = &v 4105 return s 4106} 4107 4108// Starts a scan of the policies applied to the specified resource. 4109type StartResourceScanInput struct { 4110 _ struct{} `type:"structure"` 4111 4112 // The ARN of the analyzer to use to scan the policies applied to the specified 4113 // resource. 4114 // 4115 // AnalyzerArn is a required field 4116 AnalyzerArn *string `locationName:"analyzerArn" type:"string" required:"true"` 4117 4118 // The ARN of the resource to scan. 4119 // 4120 // ResourceArn is a required field 4121 ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` 4122} 4123 4124// String returns the string representation 4125func (s StartResourceScanInput) String() string { 4126 return awsutil.Prettify(s) 4127} 4128 4129// GoString returns the string representation 4130func (s StartResourceScanInput) GoString() string { 4131 return s.String() 4132} 4133 4134// Validate inspects the fields of the type to determine if they are valid. 4135func (s *StartResourceScanInput) Validate() error { 4136 invalidParams := request.ErrInvalidParams{Context: "StartResourceScanInput"} 4137 if s.AnalyzerArn == nil { 4138 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 4139 } 4140 if s.ResourceArn == nil { 4141 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 4142 } 4143 4144 if invalidParams.Len() > 0 { 4145 return invalidParams 4146 } 4147 return nil 4148} 4149 4150// SetAnalyzerArn sets the AnalyzerArn field's value. 4151func (s *StartResourceScanInput) SetAnalyzerArn(v string) *StartResourceScanInput { 4152 s.AnalyzerArn = &v 4153 return s 4154} 4155 4156// SetResourceArn sets the ResourceArn field's value. 4157func (s *StartResourceScanInput) SetResourceArn(v string) *StartResourceScanInput { 4158 s.ResourceArn = &v 4159 return s 4160} 4161 4162type StartResourceScanOutput struct { 4163 _ struct{} `type:"structure"` 4164} 4165 4166// String returns the string representation 4167func (s StartResourceScanOutput) String() string { 4168 return awsutil.Prettify(s) 4169} 4170 4171// GoString returns the string representation 4172func (s StartResourceScanOutput) GoString() string { 4173 return s.String() 4174} 4175 4176// Adds a tag to the specified resource. 4177type TagResourceInput struct { 4178 _ struct{} `type:"structure"` 4179 4180 // The ARN of the resource to add the tag to. 4181 // 4182 // ResourceArn is a required field 4183 ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` 4184 4185 // The tags to add to the resource. 4186 // 4187 // Tags is a required field 4188 Tags map[string]*string `locationName:"tags" type:"map" required:"true"` 4189} 4190 4191// String returns the string representation 4192func (s TagResourceInput) String() string { 4193 return awsutil.Prettify(s) 4194} 4195 4196// GoString returns the string representation 4197func (s TagResourceInput) GoString() string { 4198 return s.String() 4199} 4200 4201// Validate inspects the fields of the type to determine if they are valid. 4202func (s *TagResourceInput) Validate() error { 4203 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 4204 if s.ResourceArn == nil { 4205 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 4206 } 4207 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 4208 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 4209 } 4210 if s.Tags == nil { 4211 invalidParams.Add(request.NewErrParamRequired("Tags")) 4212 } 4213 4214 if invalidParams.Len() > 0 { 4215 return invalidParams 4216 } 4217 return nil 4218} 4219 4220// SetResourceArn sets the ResourceArn field's value. 4221func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { 4222 s.ResourceArn = &v 4223 return s 4224} 4225 4226// SetTags sets the Tags field's value. 4227func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput { 4228 s.Tags = v 4229 return s 4230} 4231 4232// The response to the request. 4233type TagResourceOutput struct { 4234 _ struct{} `type:"structure"` 4235} 4236 4237// String returns the string representation 4238func (s TagResourceOutput) String() string { 4239 return awsutil.Prettify(s) 4240} 4241 4242// GoString returns the string representation 4243func (s TagResourceOutput) GoString() string { 4244 return s.String() 4245} 4246 4247// Throttling limit exceeded error. 4248type ThrottlingException struct { 4249 _ struct{} `type:"structure"` 4250 respMetadata protocol.ResponseMetadata 4251 4252 Message_ *string `locationName:"message" type:"string"` 4253 4254 // The seconds to wait to retry. 4255 RetryAfterSeconds *int64 `location:"header" locationName:"Retry-After" type:"integer"` 4256} 4257 4258// String returns the string representation 4259func (s ThrottlingException) String() string { 4260 return awsutil.Prettify(s) 4261} 4262 4263// GoString returns the string representation 4264func (s ThrottlingException) GoString() string { 4265 return s.String() 4266} 4267 4268func newErrorThrottlingException(v protocol.ResponseMetadata) error { 4269 return &ThrottlingException{ 4270 respMetadata: v, 4271 } 4272} 4273 4274// Code returns the exception type name. 4275func (s ThrottlingException) Code() string { 4276 return "ThrottlingException" 4277} 4278 4279// Message returns the exception's message. 4280func (s ThrottlingException) Message() string { 4281 if s.Message_ != nil { 4282 return *s.Message_ 4283 } 4284 return "" 4285} 4286 4287// OrigErr always returns nil, satisfies awserr.Error interface. 4288func (s ThrottlingException) OrigErr() error { 4289 return nil 4290} 4291 4292func (s ThrottlingException) Error() string { 4293 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 4294} 4295 4296// Status code returns the HTTP status code for the request's response error. 4297func (s ThrottlingException) StatusCode() int { 4298 return s.respMetadata.StatusCode 4299} 4300 4301// RequestID returns the service's response RequestID for request. 4302func (s ThrottlingException) RequestID() string { 4303 return s.respMetadata.RequestID 4304} 4305 4306// Removes a tag from the specified resource. 4307type UntagResourceInput struct { 4308 _ struct{} `type:"structure"` 4309 4310 // The ARN of the resource to remove the tag from. 4311 // 4312 // ResourceArn is a required field 4313 ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` 4314 4315 // The key for the tag to add. 4316 // 4317 // TagKeys is a required field 4318 TagKeys []*string `location:"querystring" locationName:"tagKeys" type:"list" required:"true"` 4319} 4320 4321// String returns the string representation 4322func (s UntagResourceInput) String() string { 4323 return awsutil.Prettify(s) 4324} 4325 4326// GoString returns the string representation 4327func (s UntagResourceInput) GoString() string { 4328 return s.String() 4329} 4330 4331// Validate inspects the fields of the type to determine if they are valid. 4332func (s *UntagResourceInput) Validate() error { 4333 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 4334 if s.ResourceArn == nil { 4335 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 4336 } 4337 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 4338 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 4339 } 4340 if s.TagKeys == nil { 4341 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 4342 } 4343 4344 if invalidParams.Len() > 0 { 4345 return invalidParams 4346 } 4347 return nil 4348} 4349 4350// SetResourceArn sets the ResourceArn field's value. 4351func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { 4352 s.ResourceArn = &v 4353 return s 4354} 4355 4356// SetTagKeys sets the TagKeys field's value. 4357func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 4358 s.TagKeys = v 4359 return s 4360} 4361 4362// The response to the request. 4363type UntagResourceOutput struct { 4364 _ struct{} `type:"structure"` 4365} 4366 4367// String returns the string representation 4368func (s UntagResourceOutput) String() string { 4369 return awsutil.Prettify(s) 4370} 4371 4372// GoString returns the string representation 4373func (s UntagResourceOutput) GoString() string { 4374 return s.String() 4375} 4376 4377// Updates the specified archive rule. 4378type UpdateArchiveRuleInput struct { 4379 _ struct{} `type:"structure"` 4380 4381 // The name of the analyzer to update the archive rules for. 4382 // 4383 // AnalyzerName is a required field 4384 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 4385 4386 // A client token. 4387 ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` 4388 4389 // A filter to match for the rules to update. Only rules that match the filter 4390 // are updated. 4391 // 4392 // Filter is a required field 4393 Filter map[string]*Criterion `locationName:"filter" type:"map" required:"true"` 4394 4395 // The name of the rule to update. 4396 // 4397 // RuleName is a required field 4398 RuleName *string `location:"uri" locationName:"ruleName" min:"1" type:"string" required:"true"` 4399} 4400 4401// String returns the string representation 4402func (s UpdateArchiveRuleInput) String() string { 4403 return awsutil.Prettify(s) 4404} 4405 4406// GoString returns the string representation 4407func (s UpdateArchiveRuleInput) GoString() string { 4408 return s.String() 4409} 4410 4411// Validate inspects the fields of the type to determine if they are valid. 4412func (s *UpdateArchiveRuleInput) Validate() error { 4413 invalidParams := request.ErrInvalidParams{Context: "UpdateArchiveRuleInput"} 4414 if s.AnalyzerName == nil { 4415 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 4416 } 4417 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 4418 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 4419 } 4420 if s.Filter == nil { 4421 invalidParams.Add(request.NewErrParamRequired("Filter")) 4422 } 4423 if s.RuleName == nil { 4424 invalidParams.Add(request.NewErrParamRequired("RuleName")) 4425 } 4426 if s.RuleName != nil && len(*s.RuleName) < 1 { 4427 invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) 4428 } 4429 if s.Filter != nil { 4430 for i, v := range s.Filter { 4431 if v == nil { 4432 continue 4433 } 4434 if err := v.Validate(); err != nil { 4435 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filter", i), err.(request.ErrInvalidParams)) 4436 } 4437 } 4438 } 4439 4440 if invalidParams.Len() > 0 { 4441 return invalidParams 4442 } 4443 return nil 4444} 4445 4446// SetAnalyzerName sets the AnalyzerName field's value. 4447func (s *UpdateArchiveRuleInput) SetAnalyzerName(v string) *UpdateArchiveRuleInput { 4448 s.AnalyzerName = &v 4449 return s 4450} 4451 4452// SetClientToken sets the ClientToken field's value. 4453func (s *UpdateArchiveRuleInput) SetClientToken(v string) *UpdateArchiveRuleInput { 4454 s.ClientToken = &v 4455 return s 4456} 4457 4458// SetFilter sets the Filter field's value. 4459func (s *UpdateArchiveRuleInput) SetFilter(v map[string]*Criterion) *UpdateArchiveRuleInput { 4460 s.Filter = v 4461 return s 4462} 4463 4464// SetRuleName sets the RuleName field's value. 4465func (s *UpdateArchiveRuleInput) SetRuleName(v string) *UpdateArchiveRuleInput { 4466 s.RuleName = &v 4467 return s 4468} 4469 4470type UpdateArchiveRuleOutput struct { 4471 _ struct{} `type:"structure"` 4472} 4473 4474// String returns the string representation 4475func (s UpdateArchiveRuleOutput) String() string { 4476 return awsutil.Prettify(s) 4477} 4478 4479// GoString returns the string representation 4480func (s UpdateArchiveRuleOutput) GoString() string { 4481 return s.String() 4482} 4483 4484// Updates findings with the new values provided in the request. 4485type UpdateFindingsInput struct { 4486 _ struct{} `type:"structure"` 4487 4488 // The ARN of the analyzer that generated the findings to update. 4489 // 4490 // AnalyzerArn is a required field 4491 AnalyzerArn *string `locationName:"analyzerArn" type:"string" required:"true"` 4492 4493 // A client token. 4494 ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` 4495 4496 // The IDs of the findings to update. 4497 Ids []*string `locationName:"ids" type:"list"` 4498 4499 // The ARN of the resource identified in the finding. 4500 ResourceArn *string `locationName:"resourceArn" type:"string"` 4501 4502 // The state represents the action to take to update the finding Status. Use 4503 // ARCHIVE to change an Active finding to an Archived finding. Use ACTIVE to 4504 // change an Archived finding to an Active finding. 4505 // 4506 // Status is a required field 4507 Status *string `locationName:"status" type:"string" required:"true" enum:"FindingStatusUpdate"` 4508} 4509 4510// String returns the string representation 4511func (s UpdateFindingsInput) String() string { 4512 return awsutil.Prettify(s) 4513} 4514 4515// GoString returns the string representation 4516func (s UpdateFindingsInput) GoString() string { 4517 return s.String() 4518} 4519 4520// Validate inspects the fields of the type to determine if they are valid. 4521func (s *UpdateFindingsInput) Validate() error { 4522 invalidParams := request.ErrInvalidParams{Context: "UpdateFindingsInput"} 4523 if s.AnalyzerArn == nil { 4524 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 4525 } 4526 if s.Status == nil { 4527 invalidParams.Add(request.NewErrParamRequired("Status")) 4528 } 4529 4530 if invalidParams.Len() > 0 { 4531 return invalidParams 4532 } 4533 return nil 4534} 4535 4536// SetAnalyzerArn sets the AnalyzerArn field's value. 4537func (s *UpdateFindingsInput) SetAnalyzerArn(v string) *UpdateFindingsInput { 4538 s.AnalyzerArn = &v 4539 return s 4540} 4541 4542// SetClientToken sets the ClientToken field's value. 4543func (s *UpdateFindingsInput) SetClientToken(v string) *UpdateFindingsInput { 4544 s.ClientToken = &v 4545 return s 4546} 4547 4548// SetIds sets the Ids field's value. 4549func (s *UpdateFindingsInput) SetIds(v []*string) *UpdateFindingsInput { 4550 s.Ids = v 4551 return s 4552} 4553 4554// SetResourceArn sets the ResourceArn field's value. 4555func (s *UpdateFindingsInput) SetResourceArn(v string) *UpdateFindingsInput { 4556 s.ResourceArn = &v 4557 return s 4558} 4559 4560// SetStatus sets the Status field's value. 4561func (s *UpdateFindingsInput) SetStatus(v string) *UpdateFindingsInput { 4562 s.Status = &v 4563 return s 4564} 4565 4566type UpdateFindingsOutput struct { 4567 _ struct{} `type:"structure"` 4568} 4569 4570// String returns the string representation 4571func (s UpdateFindingsOutput) String() string { 4572 return awsutil.Prettify(s) 4573} 4574 4575// GoString returns the string representation 4576func (s UpdateFindingsOutput) GoString() string { 4577 return s.String() 4578} 4579 4580// Validation exception error. 4581type ValidationException struct { 4582 _ struct{} `type:"structure"` 4583 respMetadata protocol.ResponseMetadata 4584 4585 // A list of fields that didn't validate. 4586 FieldList []*ValidationExceptionField `locationName:"fieldList" type:"list"` 4587 4588 Message_ *string `locationName:"message" type:"string"` 4589 4590 // The reason for the exception. 4591 // 4592 // Reason is a required field 4593 Reason *string `locationName:"reason" type:"string" required:"true" enum:"ValidationExceptionReason"` 4594} 4595 4596// String returns the string representation 4597func (s ValidationException) String() string { 4598 return awsutil.Prettify(s) 4599} 4600 4601// GoString returns the string representation 4602func (s ValidationException) GoString() string { 4603 return s.String() 4604} 4605 4606func newErrorValidationException(v protocol.ResponseMetadata) error { 4607 return &ValidationException{ 4608 respMetadata: v, 4609 } 4610} 4611 4612// Code returns the exception type name. 4613func (s ValidationException) Code() string { 4614 return "ValidationException" 4615} 4616 4617// Message returns the exception's message. 4618func (s ValidationException) Message() string { 4619 if s.Message_ != nil { 4620 return *s.Message_ 4621 } 4622 return "" 4623} 4624 4625// OrigErr always returns nil, satisfies awserr.Error interface. 4626func (s ValidationException) OrigErr() error { 4627 return nil 4628} 4629 4630func (s ValidationException) Error() string { 4631 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 4632} 4633 4634// Status code returns the HTTP status code for the request's response error. 4635func (s ValidationException) StatusCode() int { 4636 return s.respMetadata.StatusCode 4637} 4638 4639// RequestID returns the service's response RequestID for request. 4640func (s ValidationException) RequestID() string { 4641 return s.respMetadata.RequestID 4642} 4643 4644// Contains information about a validation exception. 4645type ValidationExceptionField struct { 4646 _ struct{} `type:"structure"` 4647 4648 // A message about the validation exception. 4649 // 4650 // Message is a required field 4651 Message *string `locationName:"message" type:"string" required:"true"` 4652 4653 // The name of the validation exception. 4654 // 4655 // Name is a required field 4656 Name *string `locationName:"name" type:"string" required:"true"` 4657} 4658 4659// String returns the string representation 4660func (s ValidationExceptionField) String() string { 4661 return awsutil.Prettify(s) 4662} 4663 4664// GoString returns the string representation 4665func (s ValidationExceptionField) GoString() string { 4666 return s.String() 4667} 4668 4669// SetMessage sets the Message field's value. 4670func (s *ValidationExceptionField) SetMessage(v string) *ValidationExceptionField { 4671 s.Message = &v 4672 return s 4673} 4674 4675// SetName sets the Name field's value. 4676func (s *ValidationExceptionField) SetName(v string) *ValidationExceptionField { 4677 s.Name = &v 4678 return s 4679} 4680 4681const ( 4682 // FindingStatusActive is a FindingStatus enum value 4683 FindingStatusActive = "ACTIVE" 4684 4685 // FindingStatusArchived is a FindingStatus enum value 4686 FindingStatusArchived = "ARCHIVED" 4687 4688 // FindingStatusResolved is a FindingStatus enum value 4689 FindingStatusResolved = "RESOLVED" 4690) 4691 4692const ( 4693 // FindingStatusUpdateActive is a FindingStatusUpdate enum value 4694 FindingStatusUpdateActive = "ACTIVE" 4695 4696 // FindingStatusUpdateArchived is a FindingStatusUpdate enum value 4697 FindingStatusUpdateArchived = "ARCHIVED" 4698) 4699 4700const ( 4701 // OrderByAsc is a OrderBy enum value 4702 OrderByAsc = "ASC" 4703 4704 // OrderByDesc is a OrderBy enum value 4705 OrderByDesc = "DESC" 4706) 4707 4708const ( 4709 // ResourceTypeAwsIamRole is a ResourceType enum value 4710 ResourceTypeAwsIamRole = "AWS::IAM::Role" 4711 4712 // ResourceTypeAwsKmsKey is a ResourceType enum value 4713 ResourceTypeAwsKmsKey = "AWS::KMS::Key" 4714 4715 // ResourceTypeAwsLambdaFunction is a ResourceType enum value 4716 ResourceTypeAwsLambdaFunction = "AWS::Lambda::Function" 4717 4718 // ResourceTypeAwsLambdaLayerVersion is a ResourceType enum value 4719 ResourceTypeAwsLambdaLayerVersion = "AWS::Lambda::LayerVersion" 4720 4721 // ResourceTypeAwsS3Bucket is a ResourceType enum value 4722 ResourceTypeAwsS3Bucket = "AWS::S3::Bucket" 4723 4724 // ResourceTypeAwsSqsQueue is a ResourceType enum value 4725 ResourceTypeAwsSqsQueue = "AWS::SQS::Queue" 4726) 4727 4728const ( 4729 // TypeAccount is a Type enum value 4730 TypeAccount = "ACCOUNT" 4731) 4732 4733const ( 4734 // ValidationExceptionReasonCannotParse is a ValidationExceptionReason enum value 4735 ValidationExceptionReasonCannotParse = "cannotParse" 4736 4737 // ValidationExceptionReasonFieldValidationFailed is a ValidationExceptionReason enum value 4738 ValidationExceptionReasonFieldValidationFailed = "fieldValidationFailed" 4739 4740 // ValidationExceptionReasonOther is a ValidationExceptionReason enum value 4741 ValidationExceptionReasonOther = "other" 4742 4743 // ValidationExceptionReasonUnknownOperation is a ValidationExceptionReason enum value 4744 ValidationExceptionReasonUnknownOperation = "unknownOperation" 4745) 4746