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 opApplyArchiveRule = "ApplyArchiveRule" 17 18// ApplyArchiveRuleRequest generates a "aws/request.Request" representing the 19// client's request for the ApplyArchiveRule 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 ApplyArchiveRule for more information on using the ApplyArchiveRule 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 ApplyArchiveRuleRequest method. 34// req, resp := client.ApplyArchiveRuleRequest(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/ApplyArchiveRule 42func (c *AccessAnalyzer) ApplyArchiveRuleRequest(input *ApplyArchiveRuleInput) (req *request.Request, output *ApplyArchiveRuleOutput) { 43 op := &request.Operation{ 44 Name: opApplyArchiveRule, 45 HTTPMethod: "PUT", 46 HTTPPath: "/archive-rule", 47 } 48 49 if input == nil { 50 input = &ApplyArchiveRuleInput{} 51 } 52 53 output = &ApplyArchiveRuleOutput{} 54 req = c.newRequest(op, input, output) 55 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 56 return 57} 58 59// ApplyArchiveRule API operation for Access Analyzer. 60// 61// Retroactively applies the archive rule to existing findings that meet the 62// archive rule criteria. 63// 64// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 65// with awserr.Error's Code and Message methods to get detailed information about 66// the error. 67// 68// See the AWS API reference guide for Access Analyzer's 69// API operation ApplyArchiveRule for usage and error information. 70// 71// Returned Error Types: 72// * ResourceNotFoundException 73// The specified resource could not be found. 74// 75// * ValidationException 76// Validation exception error. 77// 78// * InternalServerException 79// Internal server error. 80// 81// * ThrottlingException 82// Throttling limit exceeded error. 83// 84// * AccessDeniedException 85// You do not have sufficient access to perform this action. 86// 87// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ApplyArchiveRule 88func (c *AccessAnalyzer) ApplyArchiveRule(input *ApplyArchiveRuleInput) (*ApplyArchiveRuleOutput, error) { 89 req, out := c.ApplyArchiveRuleRequest(input) 90 return out, req.Send() 91} 92 93// ApplyArchiveRuleWithContext is the same as ApplyArchiveRule with the addition of 94// the ability to pass a context and additional request options. 95// 96// See ApplyArchiveRule for details on how to use this API operation. 97// 98// The context must be non-nil and will be used for request cancellation. If 99// the context is nil a panic will occur. In the future the SDK may create 100// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 101// for more information on using Contexts. 102func (c *AccessAnalyzer) ApplyArchiveRuleWithContext(ctx aws.Context, input *ApplyArchiveRuleInput, opts ...request.Option) (*ApplyArchiveRuleOutput, error) { 103 req, out := c.ApplyArchiveRuleRequest(input) 104 req.SetContext(ctx) 105 req.ApplyOptions(opts...) 106 return out, req.Send() 107} 108 109const opCancelPolicyGeneration = "CancelPolicyGeneration" 110 111// CancelPolicyGenerationRequest generates a "aws/request.Request" representing the 112// client's request for the CancelPolicyGeneration operation. The "output" return 113// value will be populated with the request's response once the request completes 114// successfully. 115// 116// Use "Send" method on the returned Request to send the API call to the service. 117// the "output" return value is not valid until after Send returns without error. 118// 119// See CancelPolicyGeneration for more information on using the CancelPolicyGeneration 120// API call, and error handling. 121// 122// This method is useful when you want to inject custom logic or configuration 123// into the SDK's request lifecycle. Such as custom headers, or retry logic. 124// 125// 126// // Example sending a request using the CancelPolicyGenerationRequest method. 127// req, resp := client.CancelPolicyGenerationRequest(params) 128// 129// err := req.Send() 130// if err == nil { // resp is now filled 131// fmt.Println(resp) 132// } 133// 134// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/CancelPolicyGeneration 135func (c *AccessAnalyzer) CancelPolicyGenerationRequest(input *CancelPolicyGenerationInput) (req *request.Request, output *CancelPolicyGenerationOutput) { 136 op := &request.Operation{ 137 Name: opCancelPolicyGeneration, 138 HTTPMethod: "PUT", 139 HTTPPath: "/policy/generation/{jobId}", 140 } 141 142 if input == nil { 143 input = &CancelPolicyGenerationInput{} 144 } 145 146 output = &CancelPolicyGenerationOutput{} 147 req = c.newRequest(op, input, output) 148 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 149 return 150} 151 152// CancelPolicyGeneration API operation for Access Analyzer. 153// 154// Cancels the requested policy generation. 155// 156// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 157// with awserr.Error's Code and Message methods to get detailed information about 158// the error. 159// 160// See the AWS API reference guide for Access Analyzer's 161// API operation CancelPolicyGeneration for usage and error information. 162// 163// Returned Error Types: 164// * ValidationException 165// Validation exception error. 166// 167// * InternalServerException 168// Internal server error. 169// 170// * ThrottlingException 171// Throttling limit exceeded error. 172// 173// * AccessDeniedException 174// You do not have sufficient access to perform this action. 175// 176// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/CancelPolicyGeneration 177func (c *AccessAnalyzer) CancelPolicyGeneration(input *CancelPolicyGenerationInput) (*CancelPolicyGenerationOutput, error) { 178 req, out := c.CancelPolicyGenerationRequest(input) 179 return out, req.Send() 180} 181 182// CancelPolicyGenerationWithContext is the same as CancelPolicyGeneration with the addition of 183// the ability to pass a context and additional request options. 184// 185// See CancelPolicyGeneration for details on how to use this API operation. 186// 187// The context must be non-nil and will be used for request cancellation. If 188// the context is nil a panic will occur. In the future the SDK may create 189// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 190// for more information on using Contexts. 191func (c *AccessAnalyzer) CancelPolicyGenerationWithContext(ctx aws.Context, input *CancelPolicyGenerationInput, opts ...request.Option) (*CancelPolicyGenerationOutput, error) { 192 req, out := c.CancelPolicyGenerationRequest(input) 193 req.SetContext(ctx) 194 req.ApplyOptions(opts...) 195 return out, req.Send() 196} 197 198const opCreateAccessPreview = "CreateAccessPreview" 199 200// CreateAccessPreviewRequest generates a "aws/request.Request" representing the 201// client's request for the CreateAccessPreview operation. The "output" return 202// value will be populated with the request's response once the request completes 203// successfully. 204// 205// Use "Send" method on the returned Request to send the API call to the service. 206// the "output" return value is not valid until after Send returns without error. 207// 208// See CreateAccessPreview for more information on using the CreateAccessPreview 209// API call, and error handling. 210// 211// This method is useful when you want to inject custom logic or configuration 212// into the SDK's request lifecycle. Such as custom headers, or retry logic. 213// 214// 215// // Example sending a request using the CreateAccessPreviewRequest method. 216// req, resp := client.CreateAccessPreviewRequest(params) 217// 218// err := req.Send() 219// if err == nil { // resp is now filled 220// fmt.Println(resp) 221// } 222// 223// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/CreateAccessPreview 224func (c *AccessAnalyzer) CreateAccessPreviewRequest(input *CreateAccessPreviewInput) (req *request.Request, output *CreateAccessPreviewOutput) { 225 op := &request.Operation{ 226 Name: opCreateAccessPreview, 227 HTTPMethod: "PUT", 228 HTTPPath: "/access-preview", 229 } 230 231 if input == nil { 232 input = &CreateAccessPreviewInput{} 233 } 234 235 output = &CreateAccessPreviewOutput{} 236 req = c.newRequest(op, input, output) 237 return 238} 239 240// CreateAccessPreview API operation for Access Analyzer. 241// 242// Creates an access preview that allows you to preview Access Analyzer findings 243// for your resource before deploying resource permissions. 244// 245// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 246// with awserr.Error's Code and Message methods to get detailed information about 247// the error. 248// 249// See the AWS API reference guide for Access Analyzer's 250// API operation CreateAccessPreview for usage and error information. 251// 252// Returned Error Types: 253// * ResourceNotFoundException 254// The specified resource could not be found. 255// 256// * ConflictException 257// A conflict exception error. 258// 259// * ValidationException 260// Validation exception error. 261// 262// * InternalServerException 263// Internal server error. 264// 265// * ServiceQuotaExceededException 266// Service quote met error. 267// 268// * ThrottlingException 269// Throttling limit exceeded error. 270// 271// * AccessDeniedException 272// You do not have sufficient access to perform this action. 273// 274// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/CreateAccessPreview 275func (c *AccessAnalyzer) CreateAccessPreview(input *CreateAccessPreviewInput) (*CreateAccessPreviewOutput, error) { 276 req, out := c.CreateAccessPreviewRequest(input) 277 return out, req.Send() 278} 279 280// CreateAccessPreviewWithContext is the same as CreateAccessPreview with the addition of 281// the ability to pass a context and additional request options. 282// 283// See CreateAccessPreview for details on how to use this API operation. 284// 285// The context must be non-nil and will be used for request cancellation. If 286// the context is nil a panic will occur. In the future the SDK may create 287// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 288// for more information on using Contexts. 289func (c *AccessAnalyzer) CreateAccessPreviewWithContext(ctx aws.Context, input *CreateAccessPreviewInput, opts ...request.Option) (*CreateAccessPreviewOutput, error) { 290 req, out := c.CreateAccessPreviewRequest(input) 291 req.SetContext(ctx) 292 req.ApplyOptions(opts...) 293 return out, req.Send() 294} 295 296const opCreateAnalyzer = "CreateAnalyzer" 297 298// CreateAnalyzerRequest generates a "aws/request.Request" representing the 299// client's request for the CreateAnalyzer operation. The "output" return 300// value will be populated with the request's response once the request completes 301// successfully. 302// 303// Use "Send" method on the returned Request to send the API call to the service. 304// the "output" return value is not valid until after Send returns without error. 305// 306// See CreateAnalyzer for more information on using the CreateAnalyzer 307// API call, and error handling. 308// 309// This method is useful when you want to inject custom logic or configuration 310// into the SDK's request lifecycle. Such as custom headers, or retry logic. 311// 312// 313// // Example sending a request using the CreateAnalyzerRequest method. 314// req, resp := client.CreateAnalyzerRequest(params) 315// 316// err := req.Send() 317// if err == nil { // resp is now filled 318// fmt.Println(resp) 319// } 320// 321// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/CreateAnalyzer 322func (c *AccessAnalyzer) CreateAnalyzerRequest(input *CreateAnalyzerInput) (req *request.Request, output *CreateAnalyzerOutput) { 323 op := &request.Operation{ 324 Name: opCreateAnalyzer, 325 HTTPMethod: "PUT", 326 HTTPPath: "/analyzer", 327 } 328 329 if input == nil { 330 input = &CreateAnalyzerInput{} 331 } 332 333 output = &CreateAnalyzerOutput{} 334 req = c.newRequest(op, input, output) 335 return 336} 337 338// CreateAnalyzer API operation for Access Analyzer. 339// 340// Creates an analyzer for your account. 341// 342// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 343// with awserr.Error's Code and Message methods to get detailed information about 344// the error. 345// 346// See the AWS API reference guide for Access Analyzer's 347// API operation CreateAnalyzer for usage and error information. 348// 349// Returned Error Types: 350// * ConflictException 351// A conflict exception error. 352// 353// * ValidationException 354// Validation exception error. 355// 356// * InternalServerException 357// Internal server error. 358// 359// * ServiceQuotaExceededException 360// Service quote met error. 361// 362// * ThrottlingException 363// Throttling limit exceeded error. 364// 365// * AccessDeniedException 366// You do not have sufficient access to perform this action. 367// 368// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/CreateAnalyzer 369func (c *AccessAnalyzer) CreateAnalyzer(input *CreateAnalyzerInput) (*CreateAnalyzerOutput, error) { 370 req, out := c.CreateAnalyzerRequest(input) 371 return out, req.Send() 372} 373 374// CreateAnalyzerWithContext is the same as CreateAnalyzer with the addition of 375// the ability to pass a context and additional request options. 376// 377// See CreateAnalyzer for details on how to use this API operation. 378// 379// The context must be non-nil and will be used for request cancellation. If 380// the context is nil a panic will occur. In the future the SDK may create 381// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 382// for more information on using Contexts. 383func (c *AccessAnalyzer) CreateAnalyzerWithContext(ctx aws.Context, input *CreateAnalyzerInput, opts ...request.Option) (*CreateAnalyzerOutput, error) { 384 req, out := c.CreateAnalyzerRequest(input) 385 req.SetContext(ctx) 386 req.ApplyOptions(opts...) 387 return out, req.Send() 388} 389 390const opCreateArchiveRule = "CreateArchiveRule" 391 392// CreateArchiveRuleRequest generates a "aws/request.Request" representing the 393// client's request for the CreateArchiveRule operation. The "output" return 394// value will be populated with the request's response once the request completes 395// successfully. 396// 397// Use "Send" method on the returned Request to send the API call to the service. 398// the "output" return value is not valid until after Send returns without error. 399// 400// See CreateArchiveRule for more information on using the CreateArchiveRule 401// API call, and error handling. 402// 403// This method is useful when you want to inject custom logic or configuration 404// into the SDK's request lifecycle. Such as custom headers, or retry logic. 405// 406// 407// // Example sending a request using the CreateArchiveRuleRequest method. 408// req, resp := client.CreateArchiveRuleRequest(params) 409// 410// err := req.Send() 411// if err == nil { // resp is now filled 412// fmt.Println(resp) 413// } 414// 415// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/CreateArchiveRule 416func (c *AccessAnalyzer) CreateArchiveRuleRequest(input *CreateArchiveRuleInput) (req *request.Request, output *CreateArchiveRuleOutput) { 417 op := &request.Operation{ 418 Name: opCreateArchiveRule, 419 HTTPMethod: "PUT", 420 HTTPPath: "/analyzer/{analyzerName}/archive-rule", 421 } 422 423 if input == nil { 424 input = &CreateArchiveRuleInput{} 425 } 426 427 output = &CreateArchiveRuleOutput{} 428 req = c.newRequest(op, input, output) 429 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 430 return 431} 432 433// CreateArchiveRule API operation for Access Analyzer. 434// 435// Creates an archive rule for the specified analyzer. Archive rules automatically 436// archive new findings that meet the criteria you define when you create the 437// rule. 438// 439// To learn about filter keys that you can use to create an archive rule, see 440// Access Analyzer filter keys (https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-filter-keys.html) 441// in the IAM User Guide. 442// 443// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 444// with awserr.Error's Code and Message methods to get detailed information about 445// the error. 446// 447// See the AWS API reference guide for Access Analyzer's 448// API operation CreateArchiveRule for usage and error information. 449// 450// Returned Error Types: 451// * ResourceNotFoundException 452// The specified resource could not be found. 453// 454// * ConflictException 455// A conflict exception error. 456// 457// * ValidationException 458// Validation exception error. 459// 460// * InternalServerException 461// Internal server error. 462// 463// * ServiceQuotaExceededException 464// Service quote met error. 465// 466// * ThrottlingException 467// Throttling limit exceeded error. 468// 469// * AccessDeniedException 470// You do not have sufficient access to perform this action. 471// 472// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/CreateArchiveRule 473func (c *AccessAnalyzer) CreateArchiveRule(input *CreateArchiveRuleInput) (*CreateArchiveRuleOutput, error) { 474 req, out := c.CreateArchiveRuleRequest(input) 475 return out, req.Send() 476} 477 478// CreateArchiveRuleWithContext is the same as CreateArchiveRule with the addition of 479// the ability to pass a context and additional request options. 480// 481// See CreateArchiveRule for details on how to use this API operation. 482// 483// The context must be non-nil and will be used for request cancellation. If 484// the context is nil a panic will occur. In the future the SDK may create 485// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 486// for more information on using Contexts. 487func (c *AccessAnalyzer) CreateArchiveRuleWithContext(ctx aws.Context, input *CreateArchiveRuleInput, opts ...request.Option) (*CreateArchiveRuleOutput, error) { 488 req, out := c.CreateArchiveRuleRequest(input) 489 req.SetContext(ctx) 490 req.ApplyOptions(opts...) 491 return out, req.Send() 492} 493 494const opDeleteAnalyzer = "DeleteAnalyzer" 495 496// DeleteAnalyzerRequest generates a "aws/request.Request" representing the 497// client's request for the DeleteAnalyzer operation. The "output" return 498// value will be populated with the request's response once the request completes 499// successfully. 500// 501// Use "Send" method on the returned Request to send the API call to the service. 502// the "output" return value is not valid until after Send returns without error. 503// 504// See DeleteAnalyzer for more information on using the DeleteAnalyzer 505// API call, and error handling. 506// 507// This method is useful when you want to inject custom logic or configuration 508// into the SDK's request lifecycle. Such as custom headers, or retry logic. 509// 510// 511// // Example sending a request using the DeleteAnalyzerRequest method. 512// req, resp := client.DeleteAnalyzerRequest(params) 513// 514// err := req.Send() 515// if err == nil { // resp is now filled 516// fmt.Println(resp) 517// } 518// 519// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/DeleteAnalyzer 520func (c *AccessAnalyzer) DeleteAnalyzerRequest(input *DeleteAnalyzerInput) (req *request.Request, output *DeleteAnalyzerOutput) { 521 op := &request.Operation{ 522 Name: opDeleteAnalyzer, 523 HTTPMethod: "DELETE", 524 HTTPPath: "/analyzer/{analyzerName}", 525 } 526 527 if input == nil { 528 input = &DeleteAnalyzerInput{} 529 } 530 531 output = &DeleteAnalyzerOutput{} 532 req = c.newRequest(op, input, output) 533 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 534 return 535} 536 537// DeleteAnalyzer API operation for Access Analyzer. 538// 539// Deletes the specified analyzer. When you delete an analyzer, Access Analyzer 540// is disabled for the account or organization in the current or specific Region. 541// All findings that were generated by the analyzer are deleted. You cannot 542// undo this action. 543// 544// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 545// with awserr.Error's Code and Message methods to get detailed information about 546// the error. 547// 548// See the AWS API reference guide for Access Analyzer's 549// API operation DeleteAnalyzer for usage and error information. 550// 551// Returned Error Types: 552// * ResourceNotFoundException 553// The specified resource could not be found. 554// 555// * ValidationException 556// Validation exception error. 557// 558// * InternalServerException 559// Internal server error. 560// 561// * ThrottlingException 562// Throttling limit exceeded error. 563// 564// * AccessDeniedException 565// You do not have sufficient access to perform this action. 566// 567// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/DeleteAnalyzer 568func (c *AccessAnalyzer) DeleteAnalyzer(input *DeleteAnalyzerInput) (*DeleteAnalyzerOutput, error) { 569 req, out := c.DeleteAnalyzerRequest(input) 570 return out, req.Send() 571} 572 573// DeleteAnalyzerWithContext is the same as DeleteAnalyzer with the addition of 574// the ability to pass a context and additional request options. 575// 576// See DeleteAnalyzer for details on how to use this API operation. 577// 578// The context must be non-nil and will be used for request cancellation. If 579// the context is nil a panic will occur. In the future the SDK may create 580// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 581// for more information on using Contexts. 582func (c *AccessAnalyzer) DeleteAnalyzerWithContext(ctx aws.Context, input *DeleteAnalyzerInput, opts ...request.Option) (*DeleteAnalyzerOutput, error) { 583 req, out := c.DeleteAnalyzerRequest(input) 584 req.SetContext(ctx) 585 req.ApplyOptions(opts...) 586 return out, req.Send() 587} 588 589const opDeleteArchiveRule = "DeleteArchiveRule" 590 591// DeleteArchiveRuleRequest generates a "aws/request.Request" representing the 592// client's request for the DeleteArchiveRule operation. The "output" return 593// value will be populated with the request's response once the request completes 594// successfully. 595// 596// Use "Send" method on the returned Request to send the API call to the service. 597// the "output" return value is not valid until after Send returns without error. 598// 599// See DeleteArchiveRule for more information on using the DeleteArchiveRule 600// API call, and error handling. 601// 602// This method is useful when you want to inject custom logic or configuration 603// into the SDK's request lifecycle. Such as custom headers, or retry logic. 604// 605// 606// // Example sending a request using the DeleteArchiveRuleRequest method. 607// req, resp := client.DeleteArchiveRuleRequest(params) 608// 609// err := req.Send() 610// if err == nil { // resp is now filled 611// fmt.Println(resp) 612// } 613// 614// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/DeleteArchiveRule 615func (c *AccessAnalyzer) DeleteArchiveRuleRequest(input *DeleteArchiveRuleInput) (req *request.Request, output *DeleteArchiveRuleOutput) { 616 op := &request.Operation{ 617 Name: opDeleteArchiveRule, 618 HTTPMethod: "DELETE", 619 HTTPPath: "/analyzer/{analyzerName}/archive-rule/{ruleName}", 620 } 621 622 if input == nil { 623 input = &DeleteArchiveRuleInput{} 624 } 625 626 output = &DeleteArchiveRuleOutput{} 627 req = c.newRequest(op, input, output) 628 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 629 return 630} 631 632// DeleteArchiveRule API operation for Access Analyzer. 633// 634// Deletes the specified archive rule. 635// 636// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 637// with awserr.Error's Code and Message methods to get detailed information about 638// the error. 639// 640// See the AWS API reference guide for Access Analyzer's 641// API operation DeleteArchiveRule for usage and error information. 642// 643// Returned Error Types: 644// * ResourceNotFoundException 645// The specified resource could not be found. 646// 647// * ValidationException 648// Validation exception error. 649// 650// * InternalServerException 651// Internal server error. 652// 653// * ThrottlingException 654// Throttling limit exceeded error. 655// 656// * AccessDeniedException 657// You do not have sufficient access to perform this action. 658// 659// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/DeleteArchiveRule 660func (c *AccessAnalyzer) DeleteArchiveRule(input *DeleteArchiveRuleInput) (*DeleteArchiveRuleOutput, error) { 661 req, out := c.DeleteArchiveRuleRequest(input) 662 return out, req.Send() 663} 664 665// DeleteArchiveRuleWithContext is the same as DeleteArchiveRule with the addition of 666// the ability to pass a context and additional request options. 667// 668// See DeleteArchiveRule for details on how to use this API operation. 669// 670// The context must be non-nil and will be used for request cancellation. If 671// the context is nil a panic will occur. In the future the SDK may create 672// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 673// for more information on using Contexts. 674func (c *AccessAnalyzer) DeleteArchiveRuleWithContext(ctx aws.Context, input *DeleteArchiveRuleInput, opts ...request.Option) (*DeleteArchiveRuleOutput, error) { 675 req, out := c.DeleteArchiveRuleRequest(input) 676 req.SetContext(ctx) 677 req.ApplyOptions(opts...) 678 return out, req.Send() 679} 680 681const opGetAccessPreview = "GetAccessPreview" 682 683// GetAccessPreviewRequest generates a "aws/request.Request" representing the 684// client's request for the GetAccessPreview operation. The "output" return 685// value will be populated with the request's response once the request completes 686// successfully. 687// 688// Use "Send" method on the returned Request to send the API call to the service. 689// the "output" return value is not valid until after Send returns without error. 690// 691// See GetAccessPreview for more information on using the GetAccessPreview 692// API call, and error handling. 693// 694// This method is useful when you want to inject custom logic or configuration 695// into the SDK's request lifecycle. Such as custom headers, or retry logic. 696// 697// 698// // Example sending a request using the GetAccessPreviewRequest method. 699// req, resp := client.GetAccessPreviewRequest(params) 700// 701// err := req.Send() 702// if err == nil { // resp is now filled 703// fmt.Println(resp) 704// } 705// 706// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetAccessPreview 707func (c *AccessAnalyzer) GetAccessPreviewRequest(input *GetAccessPreviewInput) (req *request.Request, output *GetAccessPreviewOutput) { 708 op := &request.Operation{ 709 Name: opGetAccessPreview, 710 HTTPMethod: "GET", 711 HTTPPath: "/access-preview/{accessPreviewId}", 712 } 713 714 if input == nil { 715 input = &GetAccessPreviewInput{} 716 } 717 718 output = &GetAccessPreviewOutput{} 719 req = c.newRequest(op, input, output) 720 return 721} 722 723// GetAccessPreview API operation for Access Analyzer. 724// 725// Retrieves information about an access preview for the specified analyzer. 726// 727// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 728// with awserr.Error's Code and Message methods to get detailed information about 729// the error. 730// 731// See the AWS API reference guide for Access Analyzer's 732// API operation GetAccessPreview for usage and error information. 733// 734// Returned Error Types: 735// * ResourceNotFoundException 736// The specified resource could not be found. 737// 738// * ValidationException 739// Validation exception error. 740// 741// * InternalServerException 742// Internal server error. 743// 744// * ThrottlingException 745// Throttling limit exceeded error. 746// 747// * AccessDeniedException 748// You do not have sufficient access to perform this action. 749// 750// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetAccessPreview 751func (c *AccessAnalyzer) GetAccessPreview(input *GetAccessPreviewInput) (*GetAccessPreviewOutput, error) { 752 req, out := c.GetAccessPreviewRequest(input) 753 return out, req.Send() 754} 755 756// GetAccessPreviewWithContext is the same as GetAccessPreview with the addition of 757// the ability to pass a context and additional request options. 758// 759// See GetAccessPreview for details on how to use this API operation. 760// 761// The context must be non-nil and will be used for request cancellation. If 762// the context is nil a panic will occur. In the future the SDK may create 763// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 764// for more information on using Contexts. 765func (c *AccessAnalyzer) GetAccessPreviewWithContext(ctx aws.Context, input *GetAccessPreviewInput, opts ...request.Option) (*GetAccessPreviewOutput, error) { 766 req, out := c.GetAccessPreviewRequest(input) 767 req.SetContext(ctx) 768 req.ApplyOptions(opts...) 769 return out, req.Send() 770} 771 772const opGetAnalyzedResource = "GetAnalyzedResource" 773 774// GetAnalyzedResourceRequest generates a "aws/request.Request" representing the 775// client's request for the GetAnalyzedResource operation. The "output" return 776// value will be populated with the request's response once the request completes 777// successfully. 778// 779// Use "Send" method on the returned Request to send the API call to the service. 780// the "output" return value is not valid until after Send returns without error. 781// 782// See GetAnalyzedResource for more information on using the GetAnalyzedResource 783// API call, and error handling. 784// 785// This method is useful when you want to inject custom logic or configuration 786// into the SDK's request lifecycle. Such as custom headers, or retry logic. 787// 788// 789// // Example sending a request using the GetAnalyzedResourceRequest method. 790// req, resp := client.GetAnalyzedResourceRequest(params) 791// 792// err := req.Send() 793// if err == nil { // resp is now filled 794// fmt.Println(resp) 795// } 796// 797// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetAnalyzedResource 798func (c *AccessAnalyzer) GetAnalyzedResourceRequest(input *GetAnalyzedResourceInput) (req *request.Request, output *GetAnalyzedResourceOutput) { 799 op := &request.Operation{ 800 Name: opGetAnalyzedResource, 801 HTTPMethod: "GET", 802 HTTPPath: "/analyzed-resource", 803 } 804 805 if input == nil { 806 input = &GetAnalyzedResourceInput{} 807 } 808 809 output = &GetAnalyzedResourceOutput{} 810 req = c.newRequest(op, input, output) 811 return 812} 813 814// GetAnalyzedResource API operation for Access Analyzer. 815// 816// Retrieves information about a resource that was analyzed. 817// 818// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 819// with awserr.Error's Code and Message methods to get detailed information about 820// the error. 821// 822// See the AWS API reference guide for Access Analyzer's 823// API operation GetAnalyzedResource for usage and error information. 824// 825// Returned Error Types: 826// * ResourceNotFoundException 827// The specified resource could not be found. 828// 829// * ValidationException 830// Validation exception error. 831// 832// * InternalServerException 833// Internal server error. 834// 835// * ThrottlingException 836// Throttling limit exceeded error. 837// 838// * AccessDeniedException 839// You do not have sufficient access to perform this action. 840// 841// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetAnalyzedResource 842func (c *AccessAnalyzer) GetAnalyzedResource(input *GetAnalyzedResourceInput) (*GetAnalyzedResourceOutput, error) { 843 req, out := c.GetAnalyzedResourceRequest(input) 844 return out, req.Send() 845} 846 847// GetAnalyzedResourceWithContext is the same as GetAnalyzedResource with the addition of 848// the ability to pass a context and additional request options. 849// 850// See GetAnalyzedResource for details on how to use this API operation. 851// 852// The context must be non-nil and will be used for request cancellation. If 853// the context is nil a panic will occur. In the future the SDK may create 854// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 855// for more information on using Contexts. 856func (c *AccessAnalyzer) GetAnalyzedResourceWithContext(ctx aws.Context, input *GetAnalyzedResourceInput, opts ...request.Option) (*GetAnalyzedResourceOutput, error) { 857 req, out := c.GetAnalyzedResourceRequest(input) 858 req.SetContext(ctx) 859 req.ApplyOptions(opts...) 860 return out, req.Send() 861} 862 863const opGetAnalyzer = "GetAnalyzer" 864 865// GetAnalyzerRequest generates a "aws/request.Request" representing the 866// client's request for the GetAnalyzer operation. The "output" return 867// value will be populated with the request's response once the request completes 868// successfully. 869// 870// Use "Send" method on the returned Request to send the API call to the service. 871// the "output" return value is not valid until after Send returns without error. 872// 873// See GetAnalyzer for more information on using the GetAnalyzer 874// API call, and error handling. 875// 876// This method is useful when you want to inject custom logic or configuration 877// into the SDK's request lifecycle. Such as custom headers, or retry logic. 878// 879// 880// // Example sending a request using the GetAnalyzerRequest method. 881// req, resp := client.GetAnalyzerRequest(params) 882// 883// err := req.Send() 884// if err == nil { // resp is now filled 885// fmt.Println(resp) 886// } 887// 888// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetAnalyzer 889func (c *AccessAnalyzer) GetAnalyzerRequest(input *GetAnalyzerInput) (req *request.Request, output *GetAnalyzerOutput) { 890 op := &request.Operation{ 891 Name: opGetAnalyzer, 892 HTTPMethod: "GET", 893 HTTPPath: "/analyzer/{analyzerName}", 894 } 895 896 if input == nil { 897 input = &GetAnalyzerInput{} 898 } 899 900 output = &GetAnalyzerOutput{} 901 req = c.newRequest(op, input, output) 902 return 903} 904 905// GetAnalyzer API operation for Access Analyzer. 906// 907// Retrieves information about the specified analyzer. 908// 909// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 910// with awserr.Error's Code and Message methods to get detailed information about 911// the error. 912// 913// See the AWS API reference guide for Access Analyzer's 914// API operation GetAnalyzer for usage and error information. 915// 916// Returned Error Types: 917// * ResourceNotFoundException 918// The specified resource could not be found. 919// 920// * ValidationException 921// Validation exception error. 922// 923// * InternalServerException 924// Internal server error. 925// 926// * ThrottlingException 927// Throttling limit exceeded error. 928// 929// * AccessDeniedException 930// You do not have sufficient access to perform this action. 931// 932// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetAnalyzer 933func (c *AccessAnalyzer) GetAnalyzer(input *GetAnalyzerInput) (*GetAnalyzerOutput, error) { 934 req, out := c.GetAnalyzerRequest(input) 935 return out, req.Send() 936} 937 938// GetAnalyzerWithContext is the same as GetAnalyzer with the addition of 939// the ability to pass a context and additional request options. 940// 941// See GetAnalyzer for details on how to use this API operation. 942// 943// The context must be non-nil and will be used for request cancellation. If 944// the context is nil a panic will occur. In the future the SDK may create 945// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 946// for more information on using Contexts. 947func (c *AccessAnalyzer) GetAnalyzerWithContext(ctx aws.Context, input *GetAnalyzerInput, opts ...request.Option) (*GetAnalyzerOutput, error) { 948 req, out := c.GetAnalyzerRequest(input) 949 req.SetContext(ctx) 950 req.ApplyOptions(opts...) 951 return out, req.Send() 952} 953 954const opGetArchiveRule = "GetArchiveRule" 955 956// GetArchiveRuleRequest generates a "aws/request.Request" representing the 957// client's request for the GetArchiveRule operation. The "output" return 958// value will be populated with the request's response once the request completes 959// successfully. 960// 961// Use "Send" method on the returned Request to send the API call to the service. 962// the "output" return value is not valid until after Send returns without error. 963// 964// See GetArchiveRule for more information on using the GetArchiveRule 965// API call, and error handling. 966// 967// This method is useful when you want to inject custom logic or configuration 968// into the SDK's request lifecycle. Such as custom headers, or retry logic. 969// 970// 971// // Example sending a request using the GetArchiveRuleRequest method. 972// req, resp := client.GetArchiveRuleRequest(params) 973// 974// err := req.Send() 975// if err == nil { // resp is now filled 976// fmt.Println(resp) 977// } 978// 979// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetArchiveRule 980func (c *AccessAnalyzer) GetArchiveRuleRequest(input *GetArchiveRuleInput) (req *request.Request, output *GetArchiveRuleOutput) { 981 op := &request.Operation{ 982 Name: opGetArchiveRule, 983 HTTPMethod: "GET", 984 HTTPPath: "/analyzer/{analyzerName}/archive-rule/{ruleName}", 985 } 986 987 if input == nil { 988 input = &GetArchiveRuleInput{} 989 } 990 991 output = &GetArchiveRuleOutput{} 992 req = c.newRequest(op, input, output) 993 return 994} 995 996// GetArchiveRule API operation for Access Analyzer. 997// 998// Retrieves information about an archive rule. 999// 1000// To learn about filter keys that you can use to create an archive rule, see 1001// Access Analyzer filter keys (https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-filter-keys.html) 1002// in the IAM User Guide. 1003// 1004// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1005// with awserr.Error's Code and Message methods to get detailed information about 1006// the error. 1007// 1008// See the AWS API reference guide for Access Analyzer's 1009// API operation GetArchiveRule for usage and error information. 1010// 1011// Returned Error Types: 1012// * ResourceNotFoundException 1013// The specified resource could not be found. 1014// 1015// * ValidationException 1016// Validation exception error. 1017// 1018// * InternalServerException 1019// Internal server error. 1020// 1021// * ThrottlingException 1022// Throttling limit exceeded error. 1023// 1024// * AccessDeniedException 1025// You do not have sufficient access to perform this action. 1026// 1027// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetArchiveRule 1028func (c *AccessAnalyzer) GetArchiveRule(input *GetArchiveRuleInput) (*GetArchiveRuleOutput, error) { 1029 req, out := c.GetArchiveRuleRequest(input) 1030 return out, req.Send() 1031} 1032 1033// GetArchiveRuleWithContext is the same as GetArchiveRule with the addition of 1034// the ability to pass a context and additional request options. 1035// 1036// See GetArchiveRule for details on how to use this API operation. 1037// 1038// The context must be non-nil and will be used for request cancellation. If 1039// the context is nil a panic will occur. In the future the SDK may create 1040// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1041// for more information on using Contexts. 1042func (c *AccessAnalyzer) GetArchiveRuleWithContext(ctx aws.Context, input *GetArchiveRuleInput, opts ...request.Option) (*GetArchiveRuleOutput, error) { 1043 req, out := c.GetArchiveRuleRequest(input) 1044 req.SetContext(ctx) 1045 req.ApplyOptions(opts...) 1046 return out, req.Send() 1047} 1048 1049const opGetFinding = "GetFinding" 1050 1051// GetFindingRequest generates a "aws/request.Request" representing the 1052// client's request for the GetFinding operation. The "output" return 1053// value will be populated with the request's response once the request completes 1054// successfully. 1055// 1056// Use "Send" method on the returned Request to send the API call to the service. 1057// the "output" return value is not valid until after Send returns without error. 1058// 1059// See GetFinding for more information on using the GetFinding 1060// API call, and error handling. 1061// 1062// This method is useful when you want to inject custom logic or configuration 1063// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1064// 1065// 1066// // Example sending a request using the GetFindingRequest method. 1067// req, resp := client.GetFindingRequest(params) 1068// 1069// err := req.Send() 1070// if err == nil { // resp is now filled 1071// fmt.Println(resp) 1072// } 1073// 1074// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetFinding 1075func (c *AccessAnalyzer) GetFindingRequest(input *GetFindingInput) (req *request.Request, output *GetFindingOutput) { 1076 op := &request.Operation{ 1077 Name: opGetFinding, 1078 HTTPMethod: "GET", 1079 HTTPPath: "/finding/{id}", 1080 } 1081 1082 if input == nil { 1083 input = &GetFindingInput{} 1084 } 1085 1086 output = &GetFindingOutput{} 1087 req = c.newRequest(op, input, output) 1088 return 1089} 1090 1091// GetFinding API operation for Access Analyzer. 1092// 1093// Retrieves information about the specified finding. 1094// 1095// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1096// with awserr.Error's Code and Message methods to get detailed information about 1097// the error. 1098// 1099// See the AWS API reference guide for Access Analyzer's 1100// API operation GetFinding for usage and error information. 1101// 1102// Returned Error Types: 1103// * ResourceNotFoundException 1104// The specified resource could not be found. 1105// 1106// * ValidationException 1107// Validation exception error. 1108// 1109// * InternalServerException 1110// Internal server error. 1111// 1112// * ThrottlingException 1113// Throttling limit exceeded error. 1114// 1115// * AccessDeniedException 1116// You do not have sufficient access to perform this action. 1117// 1118// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetFinding 1119func (c *AccessAnalyzer) GetFinding(input *GetFindingInput) (*GetFindingOutput, error) { 1120 req, out := c.GetFindingRequest(input) 1121 return out, req.Send() 1122} 1123 1124// GetFindingWithContext is the same as GetFinding with the addition of 1125// the ability to pass a context and additional request options. 1126// 1127// See GetFinding for details on how to use this API operation. 1128// 1129// The context must be non-nil and will be used for request cancellation. If 1130// the context is nil a panic will occur. In the future the SDK may create 1131// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1132// for more information on using Contexts. 1133func (c *AccessAnalyzer) GetFindingWithContext(ctx aws.Context, input *GetFindingInput, opts ...request.Option) (*GetFindingOutput, error) { 1134 req, out := c.GetFindingRequest(input) 1135 req.SetContext(ctx) 1136 req.ApplyOptions(opts...) 1137 return out, req.Send() 1138} 1139 1140const opGetGeneratedPolicy = "GetGeneratedPolicy" 1141 1142// GetGeneratedPolicyRequest generates a "aws/request.Request" representing the 1143// client's request for the GetGeneratedPolicy operation. The "output" return 1144// value will be populated with the request's response once the request completes 1145// successfully. 1146// 1147// Use "Send" method on the returned Request to send the API call to the service. 1148// the "output" return value is not valid until after Send returns without error. 1149// 1150// See GetGeneratedPolicy for more information on using the GetGeneratedPolicy 1151// API call, and error handling. 1152// 1153// This method is useful when you want to inject custom logic or configuration 1154// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1155// 1156// 1157// // Example sending a request using the GetGeneratedPolicyRequest method. 1158// req, resp := client.GetGeneratedPolicyRequest(params) 1159// 1160// err := req.Send() 1161// if err == nil { // resp is now filled 1162// fmt.Println(resp) 1163// } 1164// 1165// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetGeneratedPolicy 1166func (c *AccessAnalyzer) GetGeneratedPolicyRequest(input *GetGeneratedPolicyInput) (req *request.Request, output *GetGeneratedPolicyOutput) { 1167 op := &request.Operation{ 1168 Name: opGetGeneratedPolicy, 1169 HTTPMethod: "GET", 1170 HTTPPath: "/policy/generation/{jobId}", 1171 } 1172 1173 if input == nil { 1174 input = &GetGeneratedPolicyInput{} 1175 } 1176 1177 output = &GetGeneratedPolicyOutput{} 1178 req = c.newRequest(op, input, output) 1179 return 1180} 1181 1182// GetGeneratedPolicy API operation for Access Analyzer. 1183// 1184// Retrieves the policy that was generated using StartPolicyGeneration. 1185// 1186// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1187// with awserr.Error's Code and Message methods to get detailed information about 1188// the error. 1189// 1190// See the AWS API reference guide for Access Analyzer's 1191// API operation GetGeneratedPolicy for usage and error information. 1192// 1193// Returned Error Types: 1194// * ValidationException 1195// Validation exception error. 1196// 1197// * InternalServerException 1198// Internal server error. 1199// 1200// * ThrottlingException 1201// Throttling limit exceeded error. 1202// 1203// * AccessDeniedException 1204// You do not have sufficient access to perform this action. 1205// 1206// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/GetGeneratedPolicy 1207func (c *AccessAnalyzer) GetGeneratedPolicy(input *GetGeneratedPolicyInput) (*GetGeneratedPolicyOutput, error) { 1208 req, out := c.GetGeneratedPolicyRequest(input) 1209 return out, req.Send() 1210} 1211 1212// GetGeneratedPolicyWithContext is the same as GetGeneratedPolicy with the addition of 1213// the ability to pass a context and additional request options. 1214// 1215// See GetGeneratedPolicy for details on how to use this API operation. 1216// 1217// The context must be non-nil and will be used for request cancellation. If 1218// the context is nil a panic will occur. In the future the SDK may create 1219// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1220// for more information on using Contexts. 1221func (c *AccessAnalyzer) GetGeneratedPolicyWithContext(ctx aws.Context, input *GetGeneratedPolicyInput, opts ...request.Option) (*GetGeneratedPolicyOutput, error) { 1222 req, out := c.GetGeneratedPolicyRequest(input) 1223 req.SetContext(ctx) 1224 req.ApplyOptions(opts...) 1225 return out, req.Send() 1226} 1227 1228const opListAccessPreviewFindings = "ListAccessPreviewFindings" 1229 1230// ListAccessPreviewFindingsRequest generates a "aws/request.Request" representing the 1231// client's request for the ListAccessPreviewFindings operation. The "output" return 1232// value will be populated with the request's response once the request completes 1233// successfully. 1234// 1235// Use "Send" method on the returned Request to send the API call to the service. 1236// the "output" return value is not valid until after Send returns without error. 1237// 1238// See ListAccessPreviewFindings for more information on using the ListAccessPreviewFindings 1239// API call, and error handling. 1240// 1241// This method is useful when you want to inject custom logic or configuration 1242// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1243// 1244// 1245// // Example sending a request using the ListAccessPreviewFindingsRequest method. 1246// req, resp := client.ListAccessPreviewFindingsRequest(params) 1247// 1248// err := req.Send() 1249// if err == nil { // resp is now filled 1250// fmt.Println(resp) 1251// } 1252// 1253// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListAccessPreviewFindings 1254func (c *AccessAnalyzer) ListAccessPreviewFindingsRequest(input *ListAccessPreviewFindingsInput) (req *request.Request, output *ListAccessPreviewFindingsOutput) { 1255 op := &request.Operation{ 1256 Name: opListAccessPreviewFindings, 1257 HTTPMethod: "POST", 1258 HTTPPath: "/access-preview/{accessPreviewId}", 1259 Paginator: &request.Paginator{ 1260 InputTokens: []string{"nextToken"}, 1261 OutputTokens: []string{"nextToken"}, 1262 LimitToken: "maxResults", 1263 TruncationToken: "", 1264 }, 1265 } 1266 1267 if input == nil { 1268 input = &ListAccessPreviewFindingsInput{} 1269 } 1270 1271 output = &ListAccessPreviewFindingsOutput{} 1272 req = c.newRequest(op, input, output) 1273 return 1274} 1275 1276// ListAccessPreviewFindings API operation for Access Analyzer. 1277// 1278// Retrieves a list of access preview findings generated by the specified access 1279// preview. 1280// 1281// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1282// with awserr.Error's Code and Message methods to get detailed information about 1283// the error. 1284// 1285// See the AWS API reference guide for Access Analyzer's 1286// API operation ListAccessPreviewFindings for usage and error information. 1287// 1288// Returned Error Types: 1289// * ResourceNotFoundException 1290// The specified resource could not be found. 1291// 1292// * ConflictException 1293// A conflict exception error. 1294// 1295// * ValidationException 1296// Validation exception error. 1297// 1298// * InternalServerException 1299// Internal server error. 1300// 1301// * ThrottlingException 1302// Throttling limit exceeded error. 1303// 1304// * AccessDeniedException 1305// You do not have sufficient access to perform this action. 1306// 1307// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListAccessPreviewFindings 1308func (c *AccessAnalyzer) ListAccessPreviewFindings(input *ListAccessPreviewFindingsInput) (*ListAccessPreviewFindingsOutput, error) { 1309 req, out := c.ListAccessPreviewFindingsRequest(input) 1310 return out, req.Send() 1311} 1312 1313// ListAccessPreviewFindingsWithContext is the same as ListAccessPreviewFindings with the addition of 1314// the ability to pass a context and additional request options. 1315// 1316// See ListAccessPreviewFindings for details on how to use this API operation. 1317// 1318// The context must be non-nil and will be used for request cancellation. If 1319// the context is nil a panic will occur. In the future the SDK may create 1320// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1321// for more information on using Contexts. 1322func (c *AccessAnalyzer) ListAccessPreviewFindingsWithContext(ctx aws.Context, input *ListAccessPreviewFindingsInput, opts ...request.Option) (*ListAccessPreviewFindingsOutput, error) { 1323 req, out := c.ListAccessPreviewFindingsRequest(input) 1324 req.SetContext(ctx) 1325 req.ApplyOptions(opts...) 1326 return out, req.Send() 1327} 1328 1329// ListAccessPreviewFindingsPages iterates over the pages of a ListAccessPreviewFindings operation, 1330// calling the "fn" function with the response data for each page. To stop 1331// iterating, return false from the fn function. 1332// 1333// See ListAccessPreviewFindings method for more information on how to use this operation. 1334// 1335// Note: This operation can generate multiple requests to a service. 1336// 1337// // Example iterating over at most 3 pages of a ListAccessPreviewFindings operation. 1338// pageNum := 0 1339// err := client.ListAccessPreviewFindingsPages(params, 1340// func(page *accessanalyzer.ListAccessPreviewFindingsOutput, lastPage bool) bool { 1341// pageNum++ 1342// fmt.Println(page) 1343// return pageNum <= 3 1344// }) 1345// 1346func (c *AccessAnalyzer) ListAccessPreviewFindingsPages(input *ListAccessPreviewFindingsInput, fn func(*ListAccessPreviewFindingsOutput, bool) bool) error { 1347 return c.ListAccessPreviewFindingsPagesWithContext(aws.BackgroundContext(), input, fn) 1348} 1349 1350// ListAccessPreviewFindingsPagesWithContext same as ListAccessPreviewFindingsPages except 1351// it takes a Context and allows setting request options on the pages. 1352// 1353// The context must be non-nil and will be used for request cancellation. If 1354// the context is nil a panic will occur. In the future the SDK may create 1355// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1356// for more information on using Contexts. 1357func (c *AccessAnalyzer) ListAccessPreviewFindingsPagesWithContext(ctx aws.Context, input *ListAccessPreviewFindingsInput, fn func(*ListAccessPreviewFindingsOutput, bool) bool, opts ...request.Option) error { 1358 p := request.Pagination{ 1359 NewRequest: func() (*request.Request, error) { 1360 var inCpy *ListAccessPreviewFindingsInput 1361 if input != nil { 1362 tmp := *input 1363 inCpy = &tmp 1364 } 1365 req, _ := c.ListAccessPreviewFindingsRequest(inCpy) 1366 req.SetContext(ctx) 1367 req.ApplyOptions(opts...) 1368 return req, nil 1369 }, 1370 } 1371 1372 for p.Next() { 1373 if !fn(p.Page().(*ListAccessPreviewFindingsOutput), !p.HasNextPage()) { 1374 break 1375 } 1376 } 1377 1378 return p.Err() 1379} 1380 1381const opListAccessPreviews = "ListAccessPreviews" 1382 1383// ListAccessPreviewsRequest generates a "aws/request.Request" representing the 1384// client's request for the ListAccessPreviews operation. The "output" return 1385// value will be populated with the request's response once the request completes 1386// successfully. 1387// 1388// Use "Send" method on the returned Request to send the API call to the service. 1389// the "output" return value is not valid until after Send returns without error. 1390// 1391// See ListAccessPreviews for more information on using the ListAccessPreviews 1392// API call, and error handling. 1393// 1394// This method is useful when you want to inject custom logic or configuration 1395// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1396// 1397// 1398// // Example sending a request using the ListAccessPreviewsRequest method. 1399// req, resp := client.ListAccessPreviewsRequest(params) 1400// 1401// err := req.Send() 1402// if err == nil { // resp is now filled 1403// fmt.Println(resp) 1404// } 1405// 1406// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListAccessPreviews 1407func (c *AccessAnalyzer) ListAccessPreviewsRequest(input *ListAccessPreviewsInput) (req *request.Request, output *ListAccessPreviewsOutput) { 1408 op := &request.Operation{ 1409 Name: opListAccessPreviews, 1410 HTTPMethod: "GET", 1411 HTTPPath: "/access-preview", 1412 Paginator: &request.Paginator{ 1413 InputTokens: []string{"nextToken"}, 1414 OutputTokens: []string{"nextToken"}, 1415 LimitToken: "maxResults", 1416 TruncationToken: "", 1417 }, 1418 } 1419 1420 if input == nil { 1421 input = &ListAccessPreviewsInput{} 1422 } 1423 1424 output = &ListAccessPreviewsOutput{} 1425 req = c.newRequest(op, input, output) 1426 return 1427} 1428 1429// ListAccessPreviews API operation for Access Analyzer. 1430// 1431// Retrieves a list of access previews for the specified analyzer. 1432// 1433// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1434// with awserr.Error's Code and Message methods to get detailed information about 1435// the error. 1436// 1437// See the AWS API reference guide for Access Analyzer's 1438// API operation ListAccessPreviews for usage and error information. 1439// 1440// Returned Error Types: 1441// * ResourceNotFoundException 1442// The specified resource could not be found. 1443// 1444// * ValidationException 1445// Validation exception error. 1446// 1447// * InternalServerException 1448// Internal server error. 1449// 1450// * ThrottlingException 1451// Throttling limit exceeded error. 1452// 1453// * AccessDeniedException 1454// You do not have sufficient access to perform this action. 1455// 1456// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListAccessPreviews 1457func (c *AccessAnalyzer) ListAccessPreviews(input *ListAccessPreviewsInput) (*ListAccessPreviewsOutput, error) { 1458 req, out := c.ListAccessPreviewsRequest(input) 1459 return out, req.Send() 1460} 1461 1462// ListAccessPreviewsWithContext is the same as ListAccessPreviews with the addition of 1463// the ability to pass a context and additional request options. 1464// 1465// See ListAccessPreviews for details on how to use this API operation. 1466// 1467// The context must be non-nil and will be used for request cancellation. If 1468// the context is nil a panic will occur. In the future the SDK may create 1469// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1470// for more information on using Contexts. 1471func (c *AccessAnalyzer) ListAccessPreviewsWithContext(ctx aws.Context, input *ListAccessPreviewsInput, opts ...request.Option) (*ListAccessPreviewsOutput, error) { 1472 req, out := c.ListAccessPreviewsRequest(input) 1473 req.SetContext(ctx) 1474 req.ApplyOptions(opts...) 1475 return out, req.Send() 1476} 1477 1478// ListAccessPreviewsPages iterates over the pages of a ListAccessPreviews operation, 1479// calling the "fn" function with the response data for each page. To stop 1480// iterating, return false from the fn function. 1481// 1482// See ListAccessPreviews method for more information on how to use this operation. 1483// 1484// Note: This operation can generate multiple requests to a service. 1485// 1486// // Example iterating over at most 3 pages of a ListAccessPreviews operation. 1487// pageNum := 0 1488// err := client.ListAccessPreviewsPages(params, 1489// func(page *accessanalyzer.ListAccessPreviewsOutput, lastPage bool) bool { 1490// pageNum++ 1491// fmt.Println(page) 1492// return pageNum <= 3 1493// }) 1494// 1495func (c *AccessAnalyzer) ListAccessPreviewsPages(input *ListAccessPreviewsInput, fn func(*ListAccessPreviewsOutput, bool) bool) error { 1496 return c.ListAccessPreviewsPagesWithContext(aws.BackgroundContext(), input, fn) 1497} 1498 1499// ListAccessPreviewsPagesWithContext same as ListAccessPreviewsPages except 1500// it takes a Context and allows setting request options on the pages. 1501// 1502// The context must be non-nil and will be used for request cancellation. If 1503// the context is nil a panic will occur. In the future the SDK may create 1504// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1505// for more information on using Contexts. 1506func (c *AccessAnalyzer) ListAccessPreviewsPagesWithContext(ctx aws.Context, input *ListAccessPreviewsInput, fn func(*ListAccessPreviewsOutput, bool) bool, opts ...request.Option) error { 1507 p := request.Pagination{ 1508 NewRequest: func() (*request.Request, error) { 1509 var inCpy *ListAccessPreviewsInput 1510 if input != nil { 1511 tmp := *input 1512 inCpy = &tmp 1513 } 1514 req, _ := c.ListAccessPreviewsRequest(inCpy) 1515 req.SetContext(ctx) 1516 req.ApplyOptions(opts...) 1517 return req, nil 1518 }, 1519 } 1520 1521 for p.Next() { 1522 if !fn(p.Page().(*ListAccessPreviewsOutput), !p.HasNextPage()) { 1523 break 1524 } 1525 } 1526 1527 return p.Err() 1528} 1529 1530const opListAnalyzedResources = "ListAnalyzedResources" 1531 1532// ListAnalyzedResourcesRequest generates a "aws/request.Request" representing the 1533// client's request for the ListAnalyzedResources operation. The "output" return 1534// value will be populated with the request's response once the request completes 1535// successfully. 1536// 1537// Use "Send" method on the returned Request to send the API call to the service. 1538// the "output" return value is not valid until after Send returns without error. 1539// 1540// See ListAnalyzedResources for more information on using the ListAnalyzedResources 1541// API call, and error handling. 1542// 1543// This method is useful when you want to inject custom logic or configuration 1544// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1545// 1546// 1547// // Example sending a request using the ListAnalyzedResourcesRequest method. 1548// req, resp := client.ListAnalyzedResourcesRequest(params) 1549// 1550// err := req.Send() 1551// if err == nil { // resp is now filled 1552// fmt.Println(resp) 1553// } 1554// 1555// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListAnalyzedResources 1556func (c *AccessAnalyzer) ListAnalyzedResourcesRequest(input *ListAnalyzedResourcesInput) (req *request.Request, output *ListAnalyzedResourcesOutput) { 1557 op := &request.Operation{ 1558 Name: opListAnalyzedResources, 1559 HTTPMethod: "POST", 1560 HTTPPath: "/analyzed-resource", 1561 Paginator: &request.Paginator{ 1562 InputTokens: []string{"nextToken"}, 1563 OutputTokens: []string{"nextToken"}, 1564 LimitToken: "maxResults", 1565 TruncationToken: "", 1566 }, 1567 } 1568 1569 if input == nil { 1570 input = &ListAnalyzedResourcesInput{} 1571 } 1572 1573 output = &ListAnalyzedResourcesOutput{} 1574 req = c.newRequest(op, input, output) 1575 return 1576} 1577 1578// ListAnalyzedResources API operation for Access Analyzer. 1579// 1580// Retrieves a list of resources of the specified type that have been analyzed 1581// by the specified analyzer.. 1582// 1583// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1584// with awserr.Error's Code and Message methods to get detailed information about 1585// the error. 1586// 1587// See the AWS API reference guide for Access Analyzer's 1588// API operation ListAnalyzedResources for usage and error information. 1589// 1590// Returned Error Types: 1591// * ResourceNotFoundException 1592// The specified resource could not be found. 1593// 1594// * ValidationException 1595// Validation exception error. 1596// 1597// * InternalServerException 1598// Internal server error. 1599// 1600// * ThrottlingException 1601// Throttling limit exceeded error. 1602// 1603// * AccessDeniedException 1604// You do not have sufficient access to perform this action. 1605// 1606// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListAnalyzedResources 1607func (c *AccessAnalyzer) ListAnalyzedResources(input *ListAnalyzedResourcesInput) (*ListAnalyzedResourcesOutput, error) { 1608 req, out := c.ListAnalyzedResourcesRequest(input) 1609 return out, req.Send() 1610} 1611 1612// ListAnalyzedResourcesWithContext is the same as ListAnalyzedResources with the addition of 1613// the ability to pass a context and additional request options. 1614// 1615// See ListAnalyzedResources for details on how to use this API operation. 1616// 1617// The context must be non-nil and will be used for request cancellation. If 1618// the context is nil a panic will occur. In the future the SDK may create 1619// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1620// for more information on using Contexts. 1621func (c *AccessAnalyzer) ListAnalyzedResourcesWithContext(ctx aws.Context, input *ListAnalyzedResourcesInput, opts ...request.Option) (*ListAnalyzedResourcesOutput, error) { 1622 req, out := c.ListAnalyzedResourcesRequest(input) 1623 req.SetContext(ctx) 1624 req.ApplyOptions(opts...) 1625 return out, req.Send() 1626} 1627 1628// ListAnalyzedResourcesPages iterates over the pages of a ListAnalyzedResources operation, 1629// calling the "fn" function with the response data for each page. To stop 1630// iterating, return false from the fn function. 1631// 1632// See ListAnalyzedResources method for more information on how to use this operation. 1633// 1634// Note: This operation can generate multiple requests to a service. 1635// 1636// // Example iterating over at most 3 pages of a ListAnalyzedResources operation. 1637// pageNum := 0 1638// err := client.ListAnalyzedResourcesPages(params, 1639// func(page *accessanalyzer.ListAnalyzedResourcesOutput, lastPage bool) bool { 1640// pageNum++ 1641// fmt.Println(page) 1642// return pageNum <= 3 1643// }) 1644// 1645func (c *AccessAnalyzer) ListAnalyzedResourcesPages(input *ListAnalyzedResourcesInput, fn func(*ListAnalyzedResourcesOutput, bool) bool) error { 1646 return c.ListAnalyzedResourcesPagesWithContext(aws.BackgroundContext(), input, fn) 1647} 1648 1649// ListAnalyzedResourcesPagesWithContext same as ListAnalyzedResourcesPages except 1650// it takes a Context and allows setting request options on the pages. 1651// 1652// The context must be non-nil and will be used for request cancellation. If 1653// the context is nil a panic will occur. In the future the SDK may create 1654// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1655// for more information on using Contexts. 1656func (c *AccessAnalyzer) ListAnalyzedResourcesPagesWithContext(ctx aws.Context, input *ListAnalyzedResourcesInput, fn func(*ListAnalyzedResourcesOutput, bool) bool, opts ...request.Option) error { 1657 p := request.Pagination{ 1658 NewRequest: func() (*request.Request, error) { 1659 var inCpy *ListAnalyzedResourcesInput 1660 if input != nil { 1661 tmp := *input 1662 inCpy = &tmp 1663 } 1664 req, _ := c.ListAnalyzedResourcesRequest(inCpy) 1665 req.SetContext(ctx) 1666 req.ApplyOptions(opts...) 1667 return req, nil 1668 }, 1669 } 1670 1671 for p.Next() { 1672 if !fn(p.Page().(*ListAnalyzedResourcesOutput), !p.HasNextPage()) { 1673 break 1674 } 1675 } 1676 1677 return p.Err() 1678} 1679 1680const opListAnalyzers = "ListAnalyzers" 1681 1682// ListAnalyzersRequest generates a "aws/request.Request" representing the 1683// client's request for the ListAnalyzers operation. The "output" return 1684// value will be populated with the request's response once the request completes 1685// successfully. 1686// 1687// Use "Send" method on the returned Request to send the API call to the service. 1688// the "output" return value is not valid until after Send returns without error. 1689// 1690// See ListAnalyzers for more information on using the ListAnalyzers 1691// API call, and error handling. 1692// 1693// This method is useful when you want to inject custom logic or configuration 1694// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1695// 1696// 1697// // Example sending a request using the ListAnalyzersRequest method. 1698// req, resp := client.ListAnalyzersRequest(params) 1699// 1700// err := req.Send() 1701// if err == nil { // resp is now filled 1702// fmt.Println(resp) 1703// } 1704// 1705// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListAnalyzers 1706func (c *AccessAnalyzer) ListAnalyzersRequest(input *ListAnalyzersInput) (req *request.Request, output *ListAnalyzersOutput) { 1707 op := &request.Operation{ 1708 Name: opListAnalyzers, 1709 HTTPMethod: "GET", 1710 HTTPPath: "/analyzer", 1711 Paginator: &request.Paginator{ 1712 InputTokens: []string{"nextToken"}, 1713 OutputTokens: []string{"nextToken"}, 1714 LimitToken: "maxResults", 1715 TruncationToken: "", 1716 }, 1717 } 1718 1719 if input == nil { 1720 input = &ListAnalyzersInput{} 1721 } 1722 1723 output = &ListAnalyzersOutput{} 1724 req = c.newRequest(op, input, output) 1725 return 1726} 1727 1728// ListAnalyzers API operation for Access Analyzer. 1729// 1730// Retrieves a list of analyzers. 1731// 1732// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1733// with awserr.Error's Code and Message methods to get detailed information about 1734// the error. 1735// 1736// See the AWS API reference guide for Access Analyzer's 1737// API operation ListAnalyzers for usage and error information. 1738// 1739// Returned Error Types: 1740// * ValidationException 1741// Validation exception error. 1742// 1743// * InternalServerException 1744// Internal server error. 1745// 1746// * ThrottlingException 1747// Throttling limit exceeded error. 1748// 1749// * AccessDeniedException 1750// You do not have sufficient access to perform this action. 1751// 1752// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListAnalyzers 1753func (c *AccessAnalyzer) ListAnalyzers(input *ListAnalyzersInput) (*ListAnalyzersOutput, error) { 1754 req, out := c.ListAnalyzersRequest(input) 1755 return out, req.Send() 1756} 1757 1758// ListAnalyzersWithContext is the same as ListAnalyzers with the addition of 1759// the ability to pass a context and additional request options. 1760// 1761// See ListAnalyzers for details on how to use this API operation. 1762// 1763// The context must be non-nil and will be used for request cancellation. If 1764// the context is nil a panic will occur. In the future the SDK may create 1765// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1766// for more information on using Contexts. 1767func (c *AccessAnalyzer) ListAnalyzersWithContext(ctx aws.Context, input *ListAnalyzersInput, opts ...request.Option) (*ListAnalyzersOutput, error) { 1768 req, out := c.ListAnalyzersRequest(input) 1769 req.SetContext(ctx) 1770 req.ApplyOptions(opts...) 1771 return out, req.Send() 1772} 1773 1774// ListAnalyzersPages iterates over the pages of a ListAnalyzers operation, 1775// calling the "fn" function with the response data for each page. To stop 1776// iterating, return false from the fn function. 1777// 1778// See ListAnalyzers method for more information on how to use this operation. 1779// 1780// Note: This operation can generate multiple requests to a service. 1781// 1782// // Example iterating over at most 3 pages of a ListAnalyzers operation. 1783// pageNum := 0 1784// err := client.ListAnalyzersPages(params, 1785// func(page *accessanalyzer.ListAnalyzersOutput, lastPage bool) bool { 1786// pageNum++ 1787// fmt.Println(page) 1788// return pageNum <= 3 1789// }) 1790// 1791func (c *AccessAnalyzer) ListAnalyzersPages(input *ListAnalyzersInput, fn func(*ListAnalyzersOutput, bool) bool) error { 1792 return c.ListAnalyzersPagesWithContext(aws.BackgroundContext(), input, fn) 1793} 1794 1795// ListAnalyzersPagesWithContext same as ListAnalyzersPages except 1796// it takes a Context and allows setting request options on the pages. 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) ListAnalyzersPagesWithContext(ctx aws.Context, input *ListAnalyzersInput, fn func(*ListAnalyzersOutput, bool) bool, opts ...request.Option) error { 1803 p := request.Pagination{ 1804 NewRequest: func() (*request.Request, error) { 1805 var inCpy *ListAnalyzersInput 1806 if input != nil { 1807 tmp := *input 1808 inCpy = &tmp 1809 } 1810 req, _ := c.ListAnalyzersRequest(inCpy) 1811 req.SetContext(ctx) 1812 req.ApplyOptions(opts...) 1813 return req, nil 1814 }, 1815 } 1816 1817 for p.Next() { 1818 if !fn(p.Page().(*ListAnalyzersOutput), !p.HasNextPage()) { 1819 break 1820 } 1821 } 1822 1823 return p.Err() 1824} 1825 1826const opListArchiveRules = "ListArchiveRules" 1827 1828// ListArchiveRulesRequest generates a "aws/request.Request" representing the 1829// client's request for the ListArchiveRules operation. The "output" return 1830// value will be populated with the request's response once the request completes 1831// successfully. 1832// 1833// Use "Send" method on the returned Request to send the API call to the service. 1834// the "output" return value is not valid until after Send returns without error. 1835// 1836// See ListArchiveRules for more information on using the ListArchiveRules 1837// API call, and error handling. 1838// 1839// This method is useful when you want to inject custom logic or configuration 1840// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1841// 1842// 1843// // Example sending a request using the ListArchiveRulesRequest method. 1844// req, resp := client.ListArchiveRulesRequest(params) 1845// 1846// err := req.Send() 1847// if err == nil { // resp is now filled 1848// fmt.Println(resp) 1849// } 1850// 1851// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListArchiveRules 1852func (c *AccessAnalyzer) ListArchiveRulesRequest(input *ListArchiveRulesInput) (req *request.Request, output *ListArchiveRulesOutput) { 1853 op := &request.Operation{ 1854 Name: opListArchiveRules, 1855 HTTPMethod: "GET", 1856 HTTPPath: "/analyzer/{analyzerName}/archive-rule", 1857 Paginator: &request.Paginator{ 1858 InputTokens: []string{"nextToken"}, 1859 OutputTokens: []string{"nextToken"}, 1860 LimitToken: "maxResults", 1861 TruncationToken: "", 1862 }, 1863 } 1864 1865 if input == nil { 1866 input = &ListArchiveRulesInput{} 1867 } 1868 1869 output = &ListArchiveRulesOutput{} 1870 req = c.newRequest(op, input, output) 1871 return 1872} 1873 1874// ListArchiveRules API operation for Access Analyzer. 1875// 1876// Retrieves a list of archive rules created for the specified analyzer. 1877// 1878// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1879// with awserr.Error's Code and Message methods to get detailed information about 1880// the error. 1881// 1882// See the AWS API reference guide for Access Analyzer's 1883// API operation ListArchiveRules for usage and error information. 1884// 1885// Returned Error Types: 1886// * ValidationException 1887// Validation exception error. 1888// 1889// * InternalServerException 1890// Internal server error. 1891// 1892// * ThrottlingException 1893// Throttling limit exceeded error. 1894// 1895// * AccessDeniedException 1896// You do not have sufficient access to perform this action. 1897// 1898// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListArchiveRules 1899func (c *AccessAnalyzer) ListArchiveRules(input *ListArchiveRulesInput) (*ListArchiveRulesOutput, error) { 1900 req, out := c.ListArchiveRulesRequest(input) 1901 return out, req.Send() 1902} 1903 1904// ListArchiveRulesWithContext is the same as ListArchiveRules with the addition of 1905// the ability to pass a context and additional request options. 1906// 1907// See ListArchiveRules for details on how to use this API operation. 1908// 1909// The context must be non-nil and will be used for request cancellation. If 1910// the context is nil a panic will occur. In the future the SDK may create 1911// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1912// for more information on using Contexts. 1913func (c *AccessAnalyzer) ListArchiveRulesWithContext(ctx aws.Context, input *ListArchiveRulesInput, opts ...request.Option) (*ListArchiveRulesOutput, error) { 1914 req, out := c.ListArchiveRulesRequest(input) 1915 req.SetContext(ctx) 1916 req.ApplyOptions(opts...) 1917 return out, req.Send() 1918} 1919 1920// ListArchiveRulesPages iterates over the pages of a ListArchiveRules operation, 1921// calling the "fn" function with the response data for each page. To stop 1922// iterating, return false from the fn function. 1923// 1924// See ListArchiveRules method for more information on how to use this operation. 1925// 1926// Note: This operation can generate multiple requests to a service. 1927// 1928// // Example iterating over at most 3 pages of a ListArchiveRules operation. 1929// pageNum := 0 1930// err := client.ListArchiveRulesPages(params, 1931// func(page *accessanalyzer.ListArchiveRulesOutput, lastPage bool) bool { 1932// pageNum++ 1933// fmt.Println(page) 1934// return pageNum <= 3 1935// }) 1936// 1937func (c *AccessAnalyzer) ListArchiveRulesPages(input *ListArchiveRulesInput, fn func(*ListArchiveRulesOutput, bool) bool) error { 1938 return c.ListArchiveRulesPagesWithContext(aws.BackgroundContext(), input, fn) 1939} 1940 1941// ListArchiveRulesPagesWithContext same as ListArchiveRulesPages except 1942// it takes a Context and allows setting request options on the pages. 1943// 1944// The context must be non-nil and will be used for request cancellation. If 1945// the context is nil a panic will occur. In the future the SDK may create 1946// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1947// for more information on using Contexts. 1948func (c *AccessAnalyzer) ListArchiveRulesPagesWithContext(ctx aws.Context, input *ListArchiveRulesInput, fn func(*ListArchiveRulesOutput, bool) bool, opts ...request.Option) error { 1949 p := request.Pagination{ 1950 NewRequest: func() (*request.Request, error) { 1951 var inCpy *ListArchiveRulesInput 1952 if input != nil { 1953 tmp := *input 1954 inCpy = &tmp 1955 } 1956 req, _ := c.ListArchiveRulesRequest(inCpy) 1957 req.SetContext(ctx) 1958 req.ApplyOptions(opts...) 1959 return req, nil 1960 }, 1961 } 1962 1963 for p.Next() { 1964 if !fn(p.Page().(*ListArchiveRulesOutput), !p.HasNextPage()) { 1965 break 1966 } 1967 } 1968 1969 return p.Err() 1970} 1971 1972const opListFindings = "ListFindings" 1973 1974// ListFindingsRequest generates a "aws/request.Request" representing the 1975// client's request for the ListFindings operation. The "output" return 1976// value will be populated with the request's response once the request completes 1977// successfully. 1978// 1979// Use "Send" method on the returned Request to send the API call to the service. 1980// the "output" return value is not valid until after Send returns without error. 1981// 1982// See ListFindings for more information on using the ListFindings 1983// API call, and error handling. 1984// 1985// This method is useful when you want to inject custom logic or configuration 1986// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1987// 1988// 1989// // Example sending a request using the ListFindingsRequest method. 1990// req, resp := client.ListFindingsRequest(params) 1991// 1992// err := req.Send() 1993// if err == nil { // resp is now filled 1994// fmt.Println(resp) 1995// } 1996// 1997// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListFindings 1998func (c *AccessAnalyzer) ListFindingsRequest(input *ListFindingsInput) (req *request.Request, output *ListFindingsOutput) { 1999 op := &request.Operation{ 2000 Name: opListFindings, 2001 HTTPMethod: "POST", 2002 HTTPPath: "/finding", 2003 Paginator: &request.Paginator{ 2004 InputTokens: []string{"nextToken"}, 2005 OutputTokens: []string{"nextToken"}, 2006 LimitToken: "maxResults", 2007 TruncationToken: "", 2008 }, 2009 } 2010 2011 if input == nil { 2012 input = &ListFindingsInput{} 2013 } 2014 2015 output = &ListFindingsOutput{} 2016 req = c.newRequest(op, input, output) 2017 return 2018} 2019 2020// ListFindings API operation for Access Analyzer. 2021// 2022// Retrieves a list of findings generated by the specified analyzer. 2023// 2024// To learn about filter keys that you can use to retrieve a list of findings, 2025// see Access Analyzer filter keys (https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-filter-keys.html) 2026// in the IAM User Guide. 2027// 2028// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2029// with awserr.Error's Code and Message methods to get detailed information about 2030// the error. 2031// 2032// See the AWS API reference guide for Access Analyzer's 2033// API operation ListFindings for usage and error information. 2034// 2035// Returned Error Types: 2036// * ResourceNotFoundException 2037// The specified resource could not be found. 2038// 2039// * ValidationException 2040// Validation exception error. 2041// 2042// * InternalServerException 2043// Internal server error. 2044// 2045// * ThrottlingException 2046// Throttling limit exceeded error. 2047// 2048// * AccessDeniedException 2049// You do not have sufficient access to perform this action. 2050// 2051// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListFindings 2052func (c *AccessAnalyzer) ListFindings(input *ListFindingsInput) (*ListFindingsOutput, error) { 2053 req, out := c.ListFindingsRequest(input) 2054 return out, req.Send() 2055} 2056 2057// ListFindingsWithContext is the same as ListFindings with the addition of 2058// the ability to pass a context and additional request options. 2059// 2060// See ListFindings for details on how to use this API operation. 2061// 2062// The context must be non-nil and will be used for request cancellation. If 2063// the context is nil a panic will occur. In the future the SDK may create 2064// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2065// for more information on using Contexts. 2066func (c *AccessAnalyzer) ListFindingsWithContext(ctx aws.Context, input *ListFindingsInput, opts ...request.Option) (*ListFindingsOutput, error) { 2067 req, out := c.ListFindingsRequest(input) 2068 req.SetContext(ctx) 2069 req.ApplyOptions(opts...) 2070 return out, req.Send() 2071} 2072 2073// ListFindingsPages iterates over the pages of a ListFindings operation, 2074// calling the "fn" function with the response data for each page. To stop 2075// iterating, return false from the fn function. 2076// 2077// See ListFindings method for more information on how to use this operation. 2078// 2079// Note: This operation can generate multiple requests to a service. 2080// 2081// // Example iterating over at most 3 pages of a ListFindings operation. 2082// pageNum := 0 2083// err := client.ListFindingsPages(params, 2084// func(page *accessanalyzer.ListFindingsOutput, lastPage bool) bool { 2085// pageNum++ 2086// fmt.Println(page) 2087// return pageNum <= 3 2088// }) 2089// 2090func (c *AccessAnalyzer) ListFindingsPages(input *ListFindingsInput, fn func(*ListFindingsOutput, bool) bool) error { 2091 return c.ListFindingsPagesWithContext(aws.BackgroundContext(), input, fn) 2092} 2093 2094// ListFindingsPagesWithContext same as ListFindingsPages except 2095// it takes a Context and allows setting request options on the pages. 2096// 2097// The context must be non-nil and will be used for request cancellation. If 2098// the context is nil a panic will occur. In the future the SDK may create 2099// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2100// for more information on using Contexts. 2101func (c *AccessAnalyzer) ListFindingsPagesWithContext(ctx aws.Context, input *ListFindingsInput, fn func(*ListFindingsOutput, bool) bool, opts ...request.Option) error { 2102 p := request.Pagination{ 2103 NewRequest: func() (*request.Request, error) { 2104 var inCpy *ListFindingsInput 2105 if input != nil { 2106 tmp := *input 2107 inCpy = &tmp 2108 } 2109 req, _ := c.ListFindingsRequest(inCpy) 2110 req.SetContext(ctx) 2111 req.ApplyOptions(opts...) 2112 return req, nil 2113 }, 2114 } 2115 2116 for p.Next() { 2117 if !fn(p.Page().(*ListFindingsOutput), !p.HasNextPage()) { 2118 break 2119 } 2120 } 2121 2122 return p.Err() 2123} 2124 2125const opListPolicyGenerations = "ListPolicyGenerations" 2126 2127// ListPolicyGenerationsRequest generates a "aws/request.Request" representing the 2128// client's request for the ListPolicyGenerations operation. The "output" return 2129// value will be populated with the request's response once the request completes 2130// successfully. 2131// 2132// Use "Send" method on the returned Request to send the API call to the service. 2133// the "output" return value is not valid until after Send returns without error. 2134// 2135// See ListPolicyGenerations for more information on using the ListPolicyGenerations 2136// API call, and error handling. 2137// 2138// This method is useful when you want to inject custom logic or configuration 2139// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2140// 2141// 2142// // Example sending a request using the ListPolicyGenerationsRequest method. 2143// req, resp := client.ListPolicyGenerationsRequest(params) 2144// 2145// err := req.Send() 2146// if err == nil { // resp is now filled 2147// fmt.Println(resp) 2148// } 2149// 2150// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListPolicyGenerations 2151func (c *AccessAnalyzer) ListPolicyGenerationsRequest(input *ListPolicyGenerationsInput) (req *request.Request, output *ListPolicyGenerationsOutput) { 2152 op := &request.Operation{ 2153 Name: opListPolicyGenerations, 2154 HTTPMethod: "GET", 2155 HTTPPath: "/policy/generation", 2156 Paginator: &request.Paginator{ 2157 InputTokens: []string{"nextToken"}, 2158 OutputTokens: []string{"nextToken"}, 2159 LimitToken: "maxResults", 2160 TruncationToken: "", 2161 }, 2162 } 2163 2164 if input == nil { 2165 input = &ListPolicyGenerationsInput{} 2166 } 2167 2168 output = &ListPolicyGenerationsOutput{} 2169 req = c.newRequest(op, input, output) 2170 return 2171} 2172 2173// ListPolicyGenerations API operation for Access Analyzer. 2174// 2175// Lists all of the policy generations requested in the last seven days. 2176// 2177// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2178// with awserr.Error's Code and Message methods to get detailed information about 2179// the error. 2180// 2181// See the AWS API reference guide for Access Analyzer's 2182// API operation ListPolicyGenerations for usage and error information. 2183// 2184// Returned Error Types: 2185// * ValidationException 2186// Validation exception error. 2187// 2188// * InternalServerException 2189// Internal server error. 2190// 2191// * ThrottlingException 2192// Throttling limit exceeded error. 2193// 2194// * AccessDeniedException 2195// You do not have sufficient access to perform this action. 2196// 2197// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListPolicyGenerations 2198func (c *AccessAnalyzer) ListPolicyGenerations(input *ListPolicyGenerationsInput) (*ListPolicyGenerationsOutput, error) { 2199 req, out := c.ListPolicyGenerationsRequest(input) 2200 return out, req.Send() 2201} 2202 2203// ListPolicyGenerationsWithContext is the same as ListPolicyGenerations with the addition of 2204// the ability to pass a context and additional request options. 2205// 2206// See ListPolicyGenerations for details on how to use this API operation. 2207// 2208// The context must be non-nil and will be used for request cancellation. If 2209// the context is nil a panic will occur. In the future the SDK may create 2210// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2211// for more information on using Contexts. 2212func (c *AccessAnalyzer) ListPolicyGenerationsWithContext(ctx aws.Context, input *ListPolicyGenerationsInput, opts ...request.Option) (*ListPolicyGenerationsOutput, error) { 2213 req, out := c.ListPolicyGenerationsRequest(input) 2214 req.SetContext(ctx) 2215 req.ApplyOptions(opts...) 2216 return out, req.Send() 2217} 2218 2219// ListPolicyGenerationsPages iterates over the pages of a ListPolicyGenerations operation, 2220// calling the "fn" function with the response data for each page. To stop 2221// iterating, return false from the fn function. 2222// 2223// See ListPolicyGenerations method for more information on how to use this operation. 2224// 2225// Note: This operation can generate multiple requests to a service. 2226// 2227// // Example iterating over at most 3 pages of a ListPolicyGenerations operation. 2228// pageNum := 0 2229// err := client.ListPolicyGenerationsPages(params, 2230// func(page *accessanalyzer.ListPolicyGenerationsOutput, lastPage bool) bool { 2231// pageNum++ 2232// fmt.Println(page) 2233// return pageNum <= 3 2234// }) 2235// 2236func (c *AccessAnalyzer) ListPolicyGenerationsPages(input *ListPolicyGenerationsInput, fn func(*ListPolicyGenerationsOutput, bool) bool) error { 2237 return c.ListPolicyGenerationsPagesWithContext(aws.BackgroundContext(), input, fn) 2238} 2239 2240// ListPolicyGenerationsPagesWithContext same as ListPolicyGenerationsPages except 2241// it takes a Context and allows setting request options on the pages. 2242// 2243// The context must be non-nil and will be used for request cancellation. If 2244// the context is nil a panic will occur. In the future the SDK may create 2245// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2246// for more information on using Contexts. 2247func (c *AccessAnalyzer) ListPolicyGenerationsPagesWithContext(ctx aws.Context, input *ListPolicyGenerationsInput, fn func(*ListPolicyGenerationsOutput, bool) bool, opts ...request.Option) error { 2248 p := request.Pagination{ 2249 NewRequest: func() (*request.Request, error) { 2250 var inCpy *ListPolicyGenerationsInput 2251 if input != nil { 2252 tmp := *input 2253 inCpy = &tmp 2254 } 2255 req, _ := c.ListPolicyGenerationsRequest(inCpy) 2256 req.SetContext(ctx) 2257 req.ApplyOptions(opts...) 2258 return req, nil 2259 }, 2260 } 2261 2262 for p.Next() { 2263 if !fn(p.Page().(*ListPolicyGenerationsOutput), !p.HasNextPage()) { 2264 break 2265 } 2266 } 2267 2268 return p.Err() 2269} 2270 2271const opListTagsForResource = "ListTagsForResource" 2272 2273// ListTagsForResourceRequest generates a "aws/request.Request" representing the 2274// client's request for the ListTagsForResource operation. The "output" return 2275// value will be populated with the request's response once the request completes 2276// successfully. 2277// 2278// Use "Send" method on the returned Request to send the API call to the service. 2279// the "output" return value is not valid until after Send returns without error. 2280// 2281// See ListTagsForResource for more information on using the ListTagsForResource 2282// API call, and error handling. 2283// 2284// This method is useful when you want to inject custom logic or configuration 2285// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2286// 2287// 2288// // Example sending a request using the ListTagsForResourceRequest method. 2289// req, resp := client.ListTagsForResourceRequest(params) 2290// 2291// err := req.Send() 2292// if err == nil { // resp is now filled 2293// fmt.Println(resp) 2294// } 2295// 2296// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListTagsForResource 2297func (c *AccessAnalyzer) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 2298 op := &request.Operation{ 2299 Name: opListTagsForResource, 2300 HTTPMethod: "GET", 2301 HTTPPath: "/tags/{resourceArn}", 2302 } 2303 2304 if input == nil { 2305 input = &ListTagsForResourceInput{} 2306 } 2307 2308 output = &ListTagsForResourceOutput{} 2309 req = c.newRequest(op, input, output) 2310 return 2311} 2312 2313// ListTagsForResource API operation for Access Analyzer. 2314// 2315// Retrieves a list of tags applied to the specified resource. 2316// 2317// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2318// with awserr.Error's Code and Message methods to get detailed information about 2319// the error. 2320// 2321// See the AWS API reference guide for Access Analyzer's 2322// API operation ListTagsForResource for usage and error information. 2323// 2324// Returned Error Types: 2325// * ResourceNotFoundException 2326// The specified resource could not be found. 2327// 2328// * ValidationException 2329// Validation exception error. 2330// 2331// * InternalServerException 2332// Internal server error. 2333// 2334// * ThrottlingException 2335// Throttling limit exceeded error. 2336// 2337// * AccessDeniedException 2338// You do not have sufficient access to perform this action. 2339// 2340// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ListTagsForResource 2341func (c *AccessAnalyzer) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 2342 req, out := c.ListTagsForResourceRequest(input) 2343 return out, req.Send() 2344} 2345 2346// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 2347// the ability to pass a context and additional request options. 2348// 2349// See ListTagsForResource for details on how to use this API operation. 2350// 2351// The context must be non-nil and will be used for request cancellation. If 2352// the context is nil a panic will occur. In the future the SDK may create 2353// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2354// for more information on using Contexts. 2355func (c *AccessAnalyzer) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 2356 req, out := c.ListTagsForResourceRequest(input) 2357 req.SetContext(ctx) 2358 req.ApplyOptions(opts...) 2359 return out, req.Send() 2360} 2361 2362const opStartPolicyGeneration = "StartPolicyGeneration" 2363 2364// StartPolicyGenerationRequest generates a "aws/request.Request" representing the 2365// client's request for the StartPolicyGeneration operation. The "output" return 2366// value will be populated with the request's response once the request completes 2367// successfully. 2368// 2369// Use "Send" method on the returned Request to send the API call to the service. 2370// the "output" return value is not valid until after Send returns without error. 2371// 2372// See StartPolicyGeneration for more information on using the StartPolicyGeneration 2373// API call, and error handling. 2374// 2375// This method is useful when you want to inject custom logic or configuration 2376// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2377// 2378// 2379// // Example sending a request using the StartPolicyGenerationRequest method. 2380// req, resp := client.StartPolicyGenerationRequest(params) 2381// 2382// err := req.Send() 2383// if err == nil { // resp is now filled 2384// fmt.Println(resp) 2385// } 2386// 2387// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/StartPolicyGeneration 2388func (c *AccessAnalyzer) StartPolicyGenerationRequest(input *StartPolicyGenerationInput) (req *request.Request, output *StartPolicyGenerationOutput) { 2389 op := &request.Operation{ 2390 Name: opStartPolicyGeneration, 2391 HTTPMethod: "PUT", 2392 HTTPPath: "/policy/generation", 2393 } 2394 2395 if input == nil { 2396 input = &StartPolicyGenerationInput{} 2397 } 2398 2399 output = &StartPolicyGenerationOutput{} 2400 req = c.newRequest(op, input, output) 2401 return 2402} 2403 2404// StartPolicyGeneration API operation for Access Analyzer. 2405// 2406// Starts the policy generation request. 2407// 2408// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2409// with awserr.Error's Code and Message methods to get detailed information about 2410// the error. 2411// 2412// See the AWS API reference guide for Access Analyzer's 2413// API operation StartPolicyGeneration for usage and error information. 2414// 2415// Returned Error Types: 2416// * ConflictException 2417// A conflict exception error. 2418// 2419// * ValidationException 2420// Validation exception error. 2421// 2422// * InternalServerException 2423// Internal server error. 2424// 2425// * ServiceQuotaExceededException 2426// Service quote met error. 2427// 2428// * ThrottlingException 2429// Throttling limit exceeded error. 2430// 2431// * AccessDeniedException 2432// You do not have sufficient access to perform this action. 2433// 2434// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/StartPolicyGeneration 2435func (c *AccessAnalyzer) StartPolicyGeneration(input *StartPolicyGenerationInput) (*StartPolicyGenerationOutput, error) { 2436 req, out := c.StartPolicyGenerationRequest(input) 2437 return out, req.Send() 2438} 2439 2440// StartPolicyGenerationWithContext is the same as StartPolicyGeneration with the addition of 2441// the ability to pass a context and additional request options. 2442// 2443// See StartPolicyGeneration for details on how to use this API operation. 2444// 2445// The context must be non-nil and will be used for request cancellation. If 2446// the context is nil a panic will occur. In the future the SDK may create 2447// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2448// for more information on using Contexts. 2449func (c *AccessAnalyzer) StartPolicyGenerationWithContext(ctx aws.Context, input *StartPolicyGenerationInput, opts ...request.Option) (*StartPolicyGenerationOutput, error) { 2450 req, out := c.StartPolicyGenerationRequest(input) 2451 req.SetContext(ctx) 2452 req.ApplyOptions(opts...) 2453 return out, req.Send() 2454} 2455 2456const opStartResourceScan = "StartResourceScan" 2457 2458// StartResourceScanRequest generates a "aws/request.Request" representing the 2459// client's request for the StartResourceScan operation. The "output" return 2460// value will be populated with the request's response once the request completes 2461// successfully. 2462// 2463// Use "Send" method on the returned Request to send the API call to the service. 2464// the "output" return value is not valid until after Send returns without error. 2465// 2466// See StartResourceScan for more information on using the StartResourceScan 2467// API call, and error handling. 2468// 2469// This method is useful when you want to inject custom logic or configuration 2470// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2471// 2472// 2473// // Example sending a request using the StartResourceScanRequest method. 2474// req, resp := client.StartResourceScanRequest(params) 2475// 2476// err := req.Send() 2477// if err == nil { // resp is now filled 2478// fmt.Println(resp) 2479// } 2480// 2481// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/StartResourceScan 2482func (c *AccessAnalyzer) StartResourceScanRequest(input *StartResourceScanInput) (req *request.Request, output *StartResourceScanOutput) { 2483 op := &request.Operation{ 2484 Name: opStartResourceScan, 2485 HTTPMethod: "POST", 2486 HTTPPath: "/resource/scan", 2487 } 2488 2489 if input == nil { 2490 input = &StartResourceScanInput{} 2491 } 2492 2493 output = &StartResourceScanOutput{} 2494 req = c.newRequest(op, input, output) 2495 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2496 return 2497} 2498 2499// StartResourceScan API operation for Access Analyzer. 2500// 2501// Immediately starts a scan of the policies applied to the specified resource. 2502// 2503// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2504// with awserr.Error's Code and Message methods to get detailed information about 2505// the error. 2506// 2507// See the AWS API reference guide for Access Analyzer's 2508// API operation StartResourceScan for usage and error information. 2509// 2510// Returned Error Types: 2511// * ResourceNotFoundException 2512// The specified resource could not be found. 2513// 2514// * ValidationException 2515// Validation exception error. 2516// 2517// * InternalServerException 2518// Internal server error. 2519// 2520// * ThrottlingException 2521// Throttling limit exceeded error. 2522// 2523// * AccessDeniedException 2524// You do not have sufficient access to perform this action. 2525// 2526// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/StartResourceScan 2527func (c *AccessAnalyzer) StartResourceScan(input *StartResourceScanInput) (*StartResourceScanOutput, error) { 2528 req, out := c.StartResourceScanRequest(input) 2529 return out, req.Send() 2530} 2531 2532// StartResourceScanWithContext is the same as StartResourceScan with the addition of 2533// the ability to pass a context and additional request options. 2534// 2535// See StartResourceScan for details on how to use this API operation. 2536// 2537// The context must be non-nil and will be used for request cancellation. If 2538// the context is nil a panic will occur. In the future the SDK may create 2539// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2540// for more information on using Contexts. 2541func (c *AccessAnalyzer) StartResourceScanWithContext(ctx aws.Context, input *StartResourceScanInput, opts ...request.Option) (*StartResourceScanOutput, error) { 2542 req, out := c.StartResourceScanRequest(input) 2543 req.SetContext(ctx) 2544 req.ApplyOptions(opts...) 2545 return out, req.Send() 2546} 2547 2548const opTagResource = "TagResource" 2549 2550// TagResourceRequest generates a "aws/request.Request" representing the 2551// client's request for the TagResource operation. The "output" return 2552// value will be populated with the request's response once the request completes 2553// successfully. 2554// 2555// Use "Send" method on the returned Request to send the API call to the service. 2556// the "output" return value is not valid until after Send returns without error. 2557// 2558// See TagResource for more information on using the TagResource 2559// API call, and error handling. 2560// 2561// This method is useful when you want to inject custom logic or configuration 2562// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2563// 2564// 2565// // Example sending a request using the TagResourceRequest method. 2566// req, resp := client.TagResourceRequest(params) 2567// 2568// err := req.Send() 2569// if err == nil { // resp is now filled 2570// fmt.Println(resp) 2571// } 2572// 2573// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/TagResource 2574func (c *AccessAnalyzer) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 2575 op := &request.Operation{ 2576 Name: opTagResource, 2577 HTTPMethod: "POST", 2578 HTTPPath: "/tags/{resourceArn}", 2579 } 2580 2581 if input == nil { 2582 input = &TagResourceInput{} 2583 } 2584 2585 output = &TagResourceOutput{} 2586 req = c.newRequest(op, input, output) 2587 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2588 return 2589} 2590 2591// TagResource API operation for Access Analyzer. 2592// 2593// Adds a tag to the specified resource. 2594// 2595// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2596// with awserr.Error's Code and Message methods to get detailed information about 2597// the error. 2598// 2599// See the AWS API reference guide for Access Analyzer's 2600// API operation TagResource for usage and error information. 2601// 2602// Returned Error Types: 2603// * ResourceNotFoundException 2604// The specified resource could not be found. 2605// 2606// * ValidationException 2607// Validation exception error. 2608// 2609// * InternalServerException 2610// Internal server error. 2611// 2612// * ThrottlingException 2613// Throttling limit exceeded error. 2614// 2615// * AccessDeniedException 2616// You do not have sufficient access to perform this action. 2617// 2618// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/TagResource 2619func (c *AccessAnalyzer) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 2620 req, out := c.TagResourceRequest(input) 2621 return out, req.Send() 2622} 2623 2624// TagResourceWithContext is the same as TagResource with the addition of 2625// the ability to pass a context and additional request options. 2626// 2627// See TagResource for details on how to use this API operation. 2628// 2629// The context must be non-nil and will be used for request cancellation. If 2630// the context is nil a panic will occur. In the future the SDK may create 2631// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2632// for more information on using Contexts. 2633func (c *AccessAnalyzer) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 2634 req, out := c.TagResourceRequest(input) 2635 req.SetContext(ctx) 2636 req.ApplyOptions(opts...) 2637 return out, req.Send() 2638} 2639 2640const opUntagResource = "UntagResource" 2641 2642// UntagResourceRequest generates a "aws/request.Request" representing the 2643// client's request for the UntagResource operation. The "output" return 2644// value will be populated with the request's response once the request completes 2645// successfully. 2646// 2647// Use "Send" method on the returned Request to send the API call to the service. 2648// the "output" return value is not valid until after Send returns without error. 2649// 2650// See UntagResource for more information on using the UntagResource 2651// API call, and error handling. 2652// 2653// This method is useful when you want to inject custom logic or configuration 2654// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2655// 2656// 2657// // Example sending a request using the UntagResourceRequest method. 2658// req, resp := client.UntagResourceRequest(params) 2659// 2660// err := req.Send() 2661// if err == nil { // resp is now filled 2662// fmt.Println(resp) 2663// } 2664// 2665// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/UntagResource 2666func (c *AccessAnalyzer) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 2667 op := &request.Operation{ 2668 Name: opUntagResource, 2669 HTTPMethod: "DELETE", 2670 HTTPPath: "/tags/{resourceArn}", 2671 } 2672 2673 if input == nil { 2674 input = &UntagResourceInput{} 2675 } 2676 2677 output = &UntagResourceOutput{} 2678 req = c.newRequest(op, input, output) 2679 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2680 return 2681} 2682 2683// UntagResource API operation for Access Analyzer. 2684// 2685// Removes a tag from the specified resource. 2686// 2687// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2688// with awserr.Error's Code and Message methods to get detailed information about 2689// the error. 2690// 2691// See the AWS API reference guide for Access Analyzer's 2692// API operation UntagResource for usage and error information. 2693// 2694// Returned Error Types: 2695// * ResourceNotFoundException 2696// The specified resource could not be found. 2697// 2698// * ValidationException 2699// Validation exception error. 2700// 2701// * InternalServerException 2702// Internal server error. 2703// 2704// * ThrottlingException 2705// Throttling limit exceeded error. 2706// 2707// * AccessDeniedException 2708// You do not have sufficient access to perform this action. 2709// 2710// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/UntagResource 2711func (c *AccessAnalyzer) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 2712 req, out := c.UntagResourceRequest(input) 2713 return out, req.Send() 2714} 2715 2716// UntagResourceWithContext is the same as UntagResource with the addition of 2717// the ability to pass a context and additional request options. 2718// 2719// See UntagResource for details on how to use this API operation. 2720// 2721// The context must be non-nil and will be used for request cancellation. If 2722// the context is nil a panic will occur. In the future the SDK may create 2723// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2724// for more information on using Contexts. 2725func (c *AccessAnalyzer) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 2726 req, out := c.UntagResourceRequest(input) 2727 req.SetContext(ctx) 2728 req.ApplyOptions(opts...) 2729 return out, req.Send() 2730} 2731 2732const opUpdateArchiveRule = "UpdateArchiveRule" 2733 2734// UpdateArchiveRuleRequest generates a "aws/request.Request" representing the 2735// client's request for the UpdateArchiveRule operation. The "output" return 2736// value will be populated with the request's response once the request completes 2737// successfully. 2738// 2739// Use "Send" method on the returned Request to send the API call to the service. 2740// the "output" return value is not valid until after Send returns without error. 2741// 2742// See UpdateArchiveRule for more information on using the UpdateArchiveRule 2743// API call, and error handling. 2744// 2745// This method is useful when you want to inject custom logic or configuration 2746// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2747// 2748// 2749// // Example sending a request using the UpdateArchiveRuleRequest method. 2750// req, resp := client.UpdateArchiveRuleRequest(params) 2751// 2752// err := req.Send() 2753// if err == nil { // resp is now filled 2754// fmt.Println(resp) 2755// } 2756// 2757// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/UpdateArchiveRule 2758func (c *AccessAnalyzer) UpdateArchiveRuleRequest(input *UpdateArchiveRuleInput) (req *request.Request, output *UpdateArchiveRuleOutput) { 2759 op := &request.Operation{ 2760 Name: opUpdateArchiveRule, 2761 HTTPMethod: "PUT", 2762 HTTPPath: "/analyzer/{analyzerName}/archive-rule/{ruleName}", 2763 } 2764 2765 if input == nil { 2766 input = &UpdateArchiveRuleInput{} 2767 } 2768 2769 output = &UpdateArchiveRuleOutput{} 2770 req = c.newRequest(op, input, output) 2771 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2772 return 2773} 2774 2775// UpdateArchiveRule API operation for Access Analyzer. 2776// 2777// Updates the criteria and values for the specified archive rule. 2778// 2779// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2780// with awserr.Error's Code and Message methods to get detailed information about 2781// the error. 2782// 2783// See the AWS API reference guide for Access Analyzer's 2784// API operation UpdateArchiveRule for usage and error information. 2785// 2786// Returned Error Types: 2787// * ResourceNotFoundException 2788// The specified resource could not be found. 2789// 2790// * ValidationException 2791// Validation exception error. 2792// 2793// * InternalServerException 2794// Internal server error. 2795// 2796// * ThrottlingException 2797// Throttling limit exceeded error. 2798// 2799// * AccessDeniedException 2800// You do not have sufficient access to perform this action. 2801// 2802// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/UpdateArchiveRule 2803func (c *AccessAnalyzer) UpdateArchiveRule(input *UpdateArchiveRuleInput) (*UpdateArchiveRuleOutput, error) { 2804 req, out := c.UpdateArchiveRuleRequest(input) 2805 return out, req.Send() 2806} 2807 2808// UpdateArchiveRuleWithContext is the same as UpdateArchiveRule with the addition of 2809// the ability to pass a context and additional request options. 2810// 2811// See UpdateArchiveRule for details on how to use this API operation. 2812// 2813// The context must be non-nil and will be used for request cancellation. If 2814// the context is nil a panic will occur. In the future the SDK may create 2815// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2816// for more information on using Contexts. 2817func (c *AccessAnalyzer) UpdateArchiveRuleWithContext(ctx aws.Context, input *UpdateArchiveRuleInput, opts ...request.Option) (*UpdateArchiveRuleOutput, error) { 2818 req, out := c.UpdateArchiveRuleRequest(input) 2819 req.SetContext(ctx) 2820 req.ApplyOptions(opts...) 2821 return out, req.Send() 2822} 2823 2824const opUpdateFindings = "UpdateFindings" 2825 2826// UpdateFindingsRequest generates a "aws/request.Request" representing the 2827// client's request for the UpdateFindings operation. The "output" return 2828// value will be populated with the request's response once the request completes 2829// successfully. 2830// 2831// Use "Send" method on the returned Request to send the API call to the service. 2832// the "output" return value is not valid until after Send returns without error. 2833// 2834// See UpdateFindings for more information on using the UpdateFindings 2835// API call, and error handling. 2836// 2837// This method is useful when you want to inject custom logic or configuration 2838// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2839// 2840// 2841// // Example sending a request using the UpdateFindingsRequest method. 2842// req, resp := client.UpdateFindingsRequest(params) 2843// 2844// err := req.Send() 2845// if err == nil { // resp is now filled 2846// fmt.Println(resp) 2847// } 2848// 2849// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/UpdateFindings 2850func (c *AccessAnalyzer) UpdateFindingsRequest(input *UpdateFindingsInput) (req *request.Request, output *UpdateFindingsOutput) { 2851 op := &request.Operation{ 2852 Name: opUpdateFindings, 2853 HTTPMethod: "PUT", 2854 HTTPPath: "/finding", 2855 } 2856 2857 if input == nil { 2858 input = &UpdateFindingsInput{} 2859 } 2860 2861 output = &UpdateFindingsOutput{} 2862 req = c.newRequest(op, input, output) 2863 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2864 return 2865} 2866 2867// UpdateFindings API operation for Access Analyzer. 2868// 2869// Updates the status for the specified findings. 2870// 2871// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2872// with awserr.Error's Code and Message methods to get detailed information about 2873// the error. 2874// 2875// See the AWS API reference guide for Access Analyzer's 2876// API operation UpdateFindings for usage and error information. 2877// 2878// Returned Error Types: 2879// * ResourceNotFoundException 2880// The specified resource could not be found. 2881// 2882// * ValidationException 2883// Validation exception error. 2884// 2885// * InternalServerException 2886// Internal server error. 2887// 2888// * ThrottlingException 2889// Throttling limit exceeded error. 2890// 2891// * AccessDeniedException 2892// You do not have sufficient access to perform this action. 2893// 2894// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/UpdateFindings 2895func (c *AccessAnalyzer) UpdateFindings(input *UpdateFindingsInput) (*UpdateFindingsOutput, error) { 2896 req, out := c.UpdateFindingsRequest(input) 2897 return out, req.Send() 2898} 2899 2900// UpdateFindingsWithContext is the same as UpdateFindings with the addition of 2901// the ability to pass a context and additional request options. 2902// 2903// See UpdateFindings for details on how to use this API operation. 2904// 2905// The context must be non-nil and will be used for request cancellation. If 2906// the context is nil a panic will occur. In the future the SDK may create 2907// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2908// for more information on using Contexts. 2909func (c *AccessAnalyzer) UpdateFindingsWithContext(ctx aws.Context, input *UpdateFindingsInput, opts ...request.Option) (*UpdateFindingsOutput, error) { 2910 req, out := c.UpdateFindingsRequest(input) 2911 req.SetContext(ctx) 2912 req.ApplyOptions(opts...) 2913 return out, req.Send() 2914} 2915 2916const opValidatePolicy = "ValidatePolicy" 2917 2918// ValidatePolicyRequest generates a "aws/request.Request" representing the 2919// client's request for the ValidatePolicy operation. The "output" return 2920// value will be populated with the request's response once the request completes 2921// successfully. 2922// 2923// Use "Send" method on the returned Request to send the API call to the service. 2924// the "output" return value is not valid until after Send returns without error. 2925// 2926// See ValidatePolicy for more information on using the ValidatePolicy 2927// API call, and error handling. 2928// 2929// This method is useful when you want to inject custom logic or configuration 2930// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2931// 2932// 2933// // Example sending a request using the ValidatePolicyRequest method. 2934// req, resp := client.ValidatePolicyRequest(params) 2935// 2936// err := req.Send() 2937// if err == nil { // resp is now filled 2938// fmt.Println(resp) 2939// } 2940// 2941// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ValidatePolicy 2942func (c *AccessAnalyzer) ValidatePolicyRequest(input *ValidatePolicyInput) (req *request.Request, output *ValidatePolicyOutput) { 2943 op := &request.Operation{ 2944 Name: opValidatePolicy, 2945 HTTPMethod: "POST", 2946 HTTPPath: "/policy/validation", 2947 Paginator: &request.Paginator{ 2948 InputTokens: []string{"nextToken"}, 2949 OutputTokens: []string{"nextToken"}, 2950 LimitToken: "maxResults", 2951 TruncationToken: "", 2952 }, 2953 } 2954 2955 if input == nil { 2956 input = &ValidatePolicyInput{} 2957 } 2958 2959 output = &ValidatePolicyOutput{} 2960 req = c.newRequest(op, input, output) 2961 return 2962} 2963 2964// ValidatePolicy API operation for Access Analyzer. 2965// 2966// Requests the validation of a policy and returns a list of findings. The findings 2967// help you identify issues and provide actionable recommendations to resolve 2968// the issue and enable you to author functional policies that meet security 2969// best practices. 2970// 2971// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2972// with awserr.Error's Code and Message methods to get detailed information about 2973// the error. 2974// 2975// See the AWS API reference guide for Access Analyzer's 2976// API operation ValidatePolicy for usage and error information. 2977// 2978// Returned Error Types: 2979// * ValidationException 2980// Validation exception error. 2981// 2982// * InternalServerException 2983// Internal server error. 2984// 2985// * ThrottlingException 2986// Throttling limit exceeded error. 2987// 2988// * AccessDeniedException 2989// You do not have sufficient access to perform this action. 2990// 2991// See also, https://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/ValidatePolicy 2992func (c *AccessAnalyzer) ValidatePolicy(input *ValidatePolicyInput) (*ValidatePolicyOutput, error) { 2993 req, out := c.ValidatePolicyRequest(input) 2994 return out, req.Send() 2995} 2996 2997// ValidatePolicyWithContext is the same as ValidatePolicy with the addition of 2998// the ability to pass a context and additional request options. 2999// 3000// See ValidatePolicy for details on how to use this API operation. 3001// 3002// The context must be non-nil and will be used for request cancellation. If 3003// the context is nil a panic will occur. In the future the SDK may create 3004// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3005// for more information on using Contexts. 3006func (c *AccessAnalyzer) ValidatePolicyWithContext(ctx aws.Context, input *ValidatePolicyInput, opts ...request.Option) (*ValidatePolicyOutput, error) { 3007 req, out := c.ValidatePolicyRequest(input) 3008 req.SetContext(ctx) 3009 req.ApplyOptions(opts...) 3010 return out, req.Send() 3011} 3012 3013// ValidatePolicyPages iterates over the pages of a ValidatePolicy operation, 3014// calling the "fn" function with the response data for each page. To stop 3015// iterating, return false from the fn function. 3016// 3017// See ValidatePolicy method for more information on how to use this operation. 3018// 3019// Note: This operation can generate multiple requests to a service. 3020// 3021// // Example iterating over at most 3 pages of a ValidatePolicy operation. 3022// pageNum := 0 3023// err := client.ValidatePolicyPages(params, 3024// func(page *accessanalyzer.ValidatePolicyOutput, lastPage bool) bool { 3025// pageNum++ 3026// fmt.Println(page) 3027// return pageNum <= 3 3028// }) 3029// 3030func (c *AccessAnalyzer) ValidatePolicyPages(input *ValidatePolicyInput, fn func(*ValidatePolicyOutput, bool) bool) error { 3031 return c.ValidatePolicyPagesWithContext(aws.BackgroundContext(), input, fn) 3032} 3033 3034// ValidatePolicyPagesWithContext same as ValidatePolicyPages except 3035// it takes a Context and allows setting request options on the pages. 3036// 3037// The context must be non-nil and will be used for request cancellation. If 3038// the context is nil a panic will occur. In the future the SDK may create 3039// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3040// for more information on using Contexts. 3041func (c *AccessAnalyzer) ValidatePolicyPagesWithContext(ctx aws.Context, input *ValidatePolicyInput, fn func(*ValidatePolicyOutput, bool) bool, opts ...request.Option) error { 3042 p := request.Pagination{ 3043 NewRequest: func() (*request.Request, error) { 3044 var inCpy *ValidatePolicyInput 3045 if input != nil { 3046 tmp := *input 3047 inCpy = &tmp 3048 } 3049 req, _ := c.ValidatePolicyRequest(inCpy) 3050 req.SetContext(ctx) 3051 req.ApplyOptions(opts...) 3052 return req, nil 3053 }, 3054 } 3055 3056 for p.Next() { 3057 if !fn(p.Page().(*ValidatePolicyOutput), !p.HasNextPage()) { 3058 break 3059 } 3060 } 3061 3062 return p.Err() 3063} 3064 3065// You do not have sufficient access to perform this action. 3066type AccessDeniedException struct { 3067 _ struct{} `type:"structure"` 3068 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3069 3070 Message_ *string `locationName:"message" type:"string"` 3071} 3072 3073// String returns the string representation 3074func (s AccessDeniedException) String() string { 3075 return awsutil.Prettify(s) 3076} 3077 3078// GoString returns the string representation 3079func (s AccessDeniedException) GoString() string { 3080 return s.String() 3081} 3082 3083func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { 3084 return &AccessDeniedException{ 3085 RespMetadata: v, 3086 } 3087} 3088 3089// Code returns the exception type name. 3090func (s *AccessDeniedException) Code() string { 3091 return "AccessDeniedException" 3092} 3093 3094// Message returns the exception's message. 3095func (s *AccessDeniedException) Message() string { 3096 if s.Message_ != nil { 3097 return *s.Message_ 3098 } 3099 return "" 3100} 3101 3102// OrigErr always returns nil, satisfies awserr.Error interface. 3103func (s *AccessDeniedException) OrigErr() error { 3104 return nil 3105} 3106 3107func (s *AccessDeniedException) Error() string { 3108 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3109} 3110 3111// Status code returns the HTTP status code for the request's response error. 3112func (s *AccessDeniedException) StatusCode() int { 3113 return s.RespMetadata.StatusCode 3114} 3115 3116// RequestID returns the service's response RequestID for request. 3117func (s *AccessDeniedException) RequestID() string { 3118 return s.RespMetadata.RequestID 3119} 3120 3121// Contains information about an access preview. 3122type AccessPreview struct { 3123 _ struct{} `type:"structure"` 3124 3125 // The ARN of the analyzer used to generate the access preview. 3126 // 3127 // AnalyzerArn is a required field 3128 AnalyzerArn *string `locationName:"analyzerArn" type:"string" required:"true"` 3129 3130 // A map of resource ARNs for the proposed resource configuration. 3131 // 3132 // Configurations is a required field 3133 Configurations map[string]*Configuration `locationName:"configurations" type:"map" required:"true"` 3134 3135 // The time at which the access preview was created. 3136 // 3137 // CreatedAt is a required field 3138 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 3139 3140 // The unique ID for the access preview. 3141 // 3142 // Id is a required field 3143 Id *string `locationName:"id" type:"string" required:"true"` 3144 3145 // The status of the access preview. 3146 // 3147 // * Creating - The access preview creation is in progress. 3148 // 3149 // * Completed - The access preview is complete. You can preview findings 3150 // for external access to the resource. 3151 // 3152 // * Failed - The access preview creation has failed. 3153 // 3154 // Status is a required field 3155 Status *string `locationName:"status" type:"string" required:"true" enum:"AccessPreviewStatus"` 3156 3157 // Provides more details about the current status of the access preview. 3158 // 3159 // For example, if the creation of the access preview fails, a Failed status 3160 // is returned. This failure can be due to an internal issue with the analysis 3161 // or due to an invalid resource configuration. 3162 StatusReason *AccessPreviewStatusReason `locationName:"statusReason" type:"structure"` 3163} 3164 3165// String returns the string representation 3166func (s AccessPreview) String() string { 3167 return awsutil.Prettify(s) 3168} 3169 3170// GoString returns the string representation 3171func (s AccessPreview) GoString() string { 3172 return s.String() 3173} 3174 3175// SetAnalyzerArn sets the AnalyzerArn field's value. 3176func (s *AccessPreview) SetAnalyzerArn(v string) *AccessPreview { 3177 s.AnalyzerArn = &v 3178 return s 3179} 3180 3181// SetConfigurations sets the Configurations field's value. 3182func (s *AccessPreview) SetConfigurations(v map[string]*Configuration) *AccessPreview { 3183 s.Configurations = v 3184 return s 3185} 3186 3187// SetCreatedAt sets the CreatedAt field's value. 3188func (s *AccessPreview) SetCreatedAt(v time.Time) *AccessPreview { 3189 s.CreatedAt = &v 3190 return s 3191} 3192 3193// SetId sets the Id field's value. 3194func (s *AccessPreview) SetId(v string) *AccessPreview { 3195 s.Id = &v 3196 return s 3197} 3198 3199// SetStatus sets the Status field's value. 3200func (s *AccessPreview) SetStatus(v string) *AccessPreview { 3201 s.Status = &v 3202 return s 3203} 3204 3205// SetStatusReason sets the StatusReason field's value. 3206func (s *AccessPreview) SetStatusReason(v *AccessPreviewStatusReason) *AccessPreview { 3207 s.StatusReason = v 3208 return s 3209} 3210 3211// An access preview finding generated by the access preview. 3212type AccessPreviewFinding struct { 3213 _ struct{} `type:"structure"` 3214 3215 // The action in the analyzed policy statement that an external principal has 3216 // permission to perform. 3217 Action []*string `locationName:"action" type:"list"` 3218 3219 // Provides context on how the access preview finding compares to existing access 3220 // identified in Access Analyzer. 3221 // 3222 // * New - The finding is for newly-introduced access. 3223 // 3224 // * Unchanged - The preview finding is an existing finding that would remain 3225 // unchanged. 3226 // 3227 // * Changed - The preview finding is an existing finding with a change in 3228 // status. 3229 // 3230 // For example, a Changed finding with preview status Resolved and existing 3231 // status Active indicates the existing Active finding would become Resolved 3232 // as a result of the proposed permissions change. 3233 // 3234 // ChangeType is a required field 3235 ChangeType *string `locationName:"changeType" type:"string" required:"true" enum:"FindingChangeType"` 3236 3237 // The condition in the analyzed policy statement that resulted in a finding. 3238 Condition map[string]*string `locationName:"condition" type:"map"` 3239 3240 // The time at which the access preview finding was created. 3241 // 3242 // CreatedAt is a required field 3243 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 3244 3245 // An error. 3246 Error *string `locationName:"error" type:"string"` 3247 3248 // The existing ID of the finding in Access Analyzer, provided only for existing 3249 // findings. 3250 ExistingFindingId *string `locationName:"existingFindingId" type:"string"` 3251 3252 // The existing status of the finding, provided only for existing findings. 3253 ExistingFindingStatus *string `locationName:"existingFindingStatus" type:"string" enum:"FindingStatus"` 3254 3255 // The ID of the access preview finding. This ID uniquely identifies the element 3256 // in the list of access preview findings and is not related to the finding 3257 // ID in Access Analyzer. 3258 // 3259 // Id is a required field 3260 Id *string `locationName:"id" type:"string" required:"true"` 3261 3262 // Indicates whether the policy that generated the finding allows public access 3263 // to the resource. 3264 IsPublic *bool `locationName:"isPublic" type:"boolean"` 3265 3266 // The external principal that has access to a resource within the zone of trust. 3267 Principal map[string]*string `locationName:"principal" type:"map"` 3268 3269 // The resource that an external principal has access to. This is the resource 3270 // associated with the access preview. 3271 Resource *string `locationName:"resource" type:"string"` 3272 3273 // The AWS account ID that owns the resource. For most AWS resources, the owning 3274 // account is the account in which the resource was created. 3275 // 3276 // ResourceOwnerAccount is a required field 3277 ResourceOwnerAccount *string `locationName:"resourceOwnerAccount" type:"string" required:"true"` 3278 3279 // The type of the resource that can be accessed in the finding. 3280 // 3281 // ResourceType is a required field 3282 ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` 3283 3284 // The sources of the finding. This indicates how the access that generated 3285 // the finding is granted. It is populated for Amazon S3 bucket findings. 3286 Sources []*FindingSource `locationName:"sources" type:"list"` 3287 3288 // The preview status of the finding. This is what the status of the finding 3289 // would be after permissions deployment. For example, a Changed finding with 3290 // preview status Resolved and existing status Active indicates the existing 3291 // Active finding would become Resolved as a result of the proposed permissions 3292 // change. 3293 // 3294 // Status is a required field 3295 Status *string `locationName:"status" type:"string" required:"true" enum:"FindingStatus"` 3296} 3297 3298// String returns the string representation 3299func (s AccessPreviewFinding) String() string { 3300 return awsutil.Prettify(s) 3301} 3302 3303// GoString returns the string representation 3304func (s AccessPreviewFinding) GoString() string { 3305 return s.String() 3306} 3307 3308// SetAction sets the Action field's value. 3309func (s *AccessPreviewFinding) SetAction(v []*string) *AccessPreviewFinding { 3310 s.Action = v 3311 return s 3312} 3313 3314// SetChangeType sets the ChangeType field's value. 3315func (s *AccessPreviewFinding) SetChangeType(v string) *AccessPreviewFinding { 3316 s.ChangeType = &v 3317 return s 3318} 3319 3320// SetCondition sets the Condition field's value. 3321func (s *AccessPreviewFinding) SetCondition(v map[string]*string) *AccessPreviewFinding { 3322 s.Condition = v 3323 return s 3324} 3325 3326// SetCreatedAt sets the CreatedAt field's value. 3327func (s *AccessPreviewFinding) SetCreatedAt(v time.Time) *AccessPreviewFinding { 3328 s.CreatedAt = &v 3329 return s 3330} 3331 3332// SetError sets the Error field's value. 3333func (s *AccessPreviewFinding) SetError(v string) *AccessPreviewFinding { 3334 s.Error = &v 3335 return s 3336} 3337 3338// SetExistingFindingId sets the ExistingFindingId field's value. 3339func (s *AccessPreviewFinding) SetExistingFindingId(v string) *AccessPreviewFinding { 3340 s.ExistingFindingId = &v 3341 return s 3342} 3343 3344// SetExistingFindingStatus sets the ExistingFindingStatus field's value. 3345func (s *AccessPreviewFinding) SetExistingFindingStatus(v string) *AccessPreviewFinding { 3346 s.ExistingFindingStatus = &v 3347 return s 3348} 3349 3350// SetId sets the Id field's value. 3351func (s *AccessPreviewFinding) SetId(v string) *AccessPreviewFinding { 3352 s.Id = &v 3353 return s 3354} 3355 3356// SetIsPublic sets the IsPublic field's value. 3357func (s *AccessPreviewFinding) SetIsPublic(v bool) *AccessPreviewFinding { 3358 s.IsPublic = &v 3359 return s 3360} 3361 3362// SetPrincipal sets the Principal field's value. 3363func (s *AccessPreviewFinding) SetPrincipal(v map[string]*string) *AccessPreviewFinding { 3364 s.Principal = v 3365 return s 3366} 3367 3368// SetResource sets the Resource field's value. 3369func (s *AccessPreviewFinding) SetResource(v string) *AccessPreviewFinding { 3370 s.Resource = &v 3371 return s 3372} 3373 3374// SetResourceOwnerAccount sets the ResourceOwnerAccount field's value. 3375func (s *AccessPreviewFinding) SetResourceOwnerAccount(v string) *AccessPreviewFinding { 3376 s.ResourceOwnerAccount = &v 3377 return s 3378} 3379 3380// SetResourceType sets the ResourceType field's value. 3381func (s *AccessPreviewFinding) SetResourceType(v string) *AccessPreviewFinding { 3382 s.ResourceType = &v 3383 return s 3384} 3385 3386// SetSources sets the Sources field's value. 3387func (s *AccessPreviewFinding) SetSources(v []*FindingSource) *AccessPreviewFinding { 3388 s.Sources = v 3389 return s 3390} 3391 3392// SetStatus sets the Status field's value. 3393func (s *AccessPreviewFinding) SetStatus(v string) *AccessPreviewFinding { 3394 s.Status = &v 3395 return s 3396} 3397 3398// Provides more details about the current status of the access preview. For 3399// example, if the creation of the access preview fails, a Failed status is 3400// returned. This failure can be due to an internal issue with the analysis 3401// or due to an invalid proposed resource configuration. 3402type AccessPreviewStatusReason struct { 3403 _ struct{} `type:"structure"` 3404 3405 // The reason code for the current status of the access preview. 3406 // 3407 // Code is a required field 3408 Code *string `locationName:"code" type:"string" required:"true" enum:"AccessPreviewStatusReasonCode"` 3409} 3410 3411// String returns the string representation 3412func (s AccessPreviewStatusReason) String() string { 3413 return awsutil.Prettify(s) 3414} 3415 3416// GoString returns the string representation 3417func (s AccessPreviewStatusReason) GoString() string { 3418 return s.String() 3419} 3420 3421// SetCode sets the Code field's value. 3422func (s *AccessPreviewStatusReason) SetCode(v string) *AccessPreviewStatusReason { 3423 s.Code = &v 3424 return s 3425} 3426 3427// Contains a summary of information about an access preview. 3428type AccessPreviewSummary struct { 3429 _ struct{} `type:"structure"` 3430 3431 // The ARN of the analyzer used to generate the access preview. 3432 // 3433 // AnalyzerArn is a required field 3434 AnalyzerArn *string `locationName:"analyzerArn" type:"string" required:"true"` 3435 3436 // The time at which the access preview was created. 3437 // 3438 // CreatedAt is a required field 3439 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 3440 3441 // The unique ID for the access preview. 3442 // 3443 // Id is a required field 3444 Id *string `locationName:"id" type:"string" required:"true"` 3445 3446 // The status of the access preview. 3447 // 3448 // * Creating - The access preview creation is in progress. 3449 // 3450 // * Completed - The access preview is complete and previews the findings 3451 // for external access to the resource. 3452 // 3453 // * Failed - The access preview creation has failed. 3454 // 3455 // Status is a required field 3456 Status *string `locationName:"status" type:"string" required:"true" enum:"AccessPreviewStatus"` 3457 3458 // Provides more details about the current status of the access preview. For 3459 // example, if the creation of the access preview fails, a Failed status is 3460 // returned. This failure can be due to an internal issue with the analysis 3461 // or due to an invalid proposed resource configuration. 3462 StatusReason *AccessPreviewStatusReason `locationName:"statusReason" type:"structure"` 3463} 3464 3465// String returns the string representation 3466func (s AccessPreviewSummary) String() string { 3467 return awsutil.Prettify(s) 3468} 3469 3470// GoString returns the string representation 3471func (s AccessPreviewSummary) GoString() string { 3472 return s.String() 3473} 3474 3475// SetAnalyzerArn sets the AnalyzerArn field's value. 3476func (s *AccessPreviewSummary) SetAnalyzerArn(v string) *AccessPreviewSummary { 3477 s.AnalyzerArn = &v 3478 return s 3479} 3480 3481// SetCreatedAt sets the CreatedAt field's value. 3482func (s *AccessPreviewSummary) SetCreatedAt(v time.Time) *AccessPreviewSummary { 3483 s.CreatedAt = &v 3484 return s 3485} 3486 3487// SetId sets the Id field's value. 3488func (s *AccessPreviewSummary) SetId(v string) *AccessPreviewSummary { 3489 s.Id = &v 3490 return s 3491} 3492 3493// SetStatus sets the Status field's value. 3494func (s *AccessPreviewSummary) SetStatus(v string) *AccessPreviewSummary { 3495 s.Status = &v 3496 return s 3497} 3498 3499// SetStatusReason sets the StatusReason field's value. 3500func (s *AccessPreviewSummary) SetStatusReason(v *AccessPreviewStatusReason) *AccessPreviewSummary { 3501 s.StatusReason = v 3502 return s 3503} 3504 3505// You specify each grantee as a type-value pair using one of these types. You 3506// can specify only one type of grantee. For more information, see PutBucketAcl 3507// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAcl.html). 3508type AclGrantee struct { 3509 _ struct{} `type:"structure"` 3510 3511 // The value specified is the canonical user ID of an AWS account. 3512 Id *string `locationName:"id" type:"string"` 3513 3514 // Used for granting permissions to a predefined group. 3515 Uri *string `locationName:"uri" type:"string"` 3516} 3517 3518// String returns the string representation 3519func (s AclGrantee) String() string { 3520 return awsutil.Prettify(s) 3521} 3522 3523// GoString returns the string representation 3524func (s AclGrantee) GoString() string { 3525 return s.String() 3526} 3527 3528// SetId sets the Id field's value. 3529func (s *AclGrantee) SetId(v string) *AclGrantee { 3530 s.Id = &v 3531 return s 3532} 3533 3534// SetUri sets the Uri field's value. 3535func (s *AclGrantee) SetUri(v string) *AclGrantee { 3536 s.Uri = &v 3537 return s 3538} 3539 3540// Contains details about the analyzed resource. 3541type AnalyzedResource struct { 3542 _ struct{} `type:"structure"` 3543 3544 // The actions that an external principal is granted permission to use by the 3545 // policy that generated the finding. 3546 Actions []*string `locationName:"actions" type:"list"` 3547 3548 // The time at which the resource was analyzed. 3549 // 3550 // AnalyzedAt is a required field 3551 AnalyzedAt *time.Time `locationName:"analyzedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 3552 3553 // The time at which the finding was created. 3554 // 3555 // CreatedAt is a required field 3556 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 3557 3558 // An error message. 3559 Error *string `locationName:"error" type:"string"` 3560 3561 // Indicates whether the policy that generated the finding grants public access 3562 // to the resource. 3563 // 3564 // IsPublic is a required field 3565 IsPublic *bool `locationName:"isPublic" type:"boolean" required:"true"` 3566 3567 // The ARN of the resource that was analyzed. 3568 // 3569 // ResourceArn is a required field 3570 ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` 3571 3572 // The AWS account ID that owns the resource. 3573 // 3574 // ResourceOwnerAccount is a required field 3575 ResourceOwnerAccount *string `locationName:"resourceOwnerAccount" type:"string" required:"true"` 3576 3577 // The type of the resource that was analyzed. 3578 // 3579 // ResourceType is a required field 3580 ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` 3581 3582 // Indicates how the access that generated the finding is granted. This is populated 3583 // for Amazon S3 bucket findings. 3584 SharedVia []*string `locationName:"sharedVia" type:"list"` 3585 3586 // The current status of the finding generated from the analyzed resource. 3587 Status *string `locationName:"status" type:"string" enum:"FindingStatus"` 3588 3589 // The time at which the finding was updated. 3590 // 3591 // UpdatedAt is a required field 3592 UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 3593} 3594 3595// String returns the string representation 3596func (s AnalyzedResource) String() string { 3597 return awsutil.Prettify(s) 3598} 3599 3600// GoString returns the string representation 3601func (s AnalyzedResource) GoString() string { 3602 return s.String() 3603} 3604 3605// SetActions sets the Actions field's value. 3606func (s *AnalyzedResource) SetActions(v []*string) *AnalyzedResource { 3607 s.Actions = v 3608 return s 3609} 3610 3611// SetAnalyzedAt sets the AnalyzedAt field's value. 3612func (s *AnalyzedResource) SetAnalyzedAt(v time.Time) *AnalyzedResource { 3613 s.AnalyzedAt = &v 3614 return s 3615} 3616 3617// SetCreatedAt sets the CreatedAt field's value. 3618func (s *AnalyzedResource) SetCreatedAt(v time.Time) *AnalyzedResource { 3619 s.CreatedAt = &v 3620 return s 3621} 3622 3623// SetError sets the Error field's value. 3624func (s *AnalyzedResource) SetError(v string) *AnalyzedResource { 3625 s.Error = &v 3626 return s 3627} 3628 3629// SetIsPublic sets the IsPublic field's value. 3630func (s *AnalyzedResource) SetIsPublic(v bool) *AnalyzedResource { 3631 s.IsPublic = &v 3632 return s 3633} 3634 3635// SetResourceArn sets the ResourceArn field's value. 3636func (s *AnalyzedResource) SetResourceArn(v string) *AnalyzedResource { 3637 s.ResourceArn = &v 3638 return s 3639} 3640 3641// SetResourceOwnerAccount sets the ResourceOwnerAccount field's value. 3642func (s *AnalyzedResource) SetResourceOwnerAccount(v string) *AnalyzedResource { 3643 s.ResourceOwnerAccount = &v 3644 return s 3645} 3646 3647// SetResourceType sets the ResourceType field's value. 3648func (s *AnalyzedResource) SetResourceType(v string) *AnalyzedResource { 3649 s.ResourceType = &v 3650 return s 3651} 3652 3653// SetSharedVia sets the SharedVia field's value. 3654func (s *AnalyzedResource) SetSharedVia(v []*string) *AnalyzedResource { 3655 s.SharedVia = v 3656 return s 3657} 3658 3659// SetStatus sets the Status field's value. 3660func (s *AnalyzedResource) SetStatus(v string) *AnalyzedResource { 3661 s.Status = &v 3662 return s 3663} 3664 3665// SetUpdatedAt sets the UpdatedAt field's value. 3666func (s *AnalyzedResource) SetUpdatedAt(v time.Time) *AnalyzedResource { 3667 s.UpdatedAt = &v 3668 return s 3669} 3670 3671// Contains the ARN of the analyzed resource. 3672type AnalyzedResourceSummary struct { 3673 _ struct{} `type:"structure"` 3674 3675 // The ARN of the analyzed resource. 3676 // 3677 // ResourceArn is a required field 3678 ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` 3679 3680 // The AWS account ID that owns the resource. 3681 // 3682 // ResourceOwnerAccount is a required field 3683 ResourceOwnerAccount *string `locationName:"resourceOwnerAccount" type:"string" required:"true"` 3684 3685 // The type of resource that was analyzed. 3686 // 3687 // ResourceType is a required field 3688 ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` 3689} 3690 3691// String returns the string representation 3692func (s AnalyzedResourceSummary) String() string { 3693 return awsutil.Prettify(s) 3694} 3695 3696// GoString returns the string representation 3697func (s AnalyzedResourceSummary) GoString() string { 3698 return s.String() 3699} 3700 3701// SetResourceArn sets the ResourceArn field's value. 3702func (s *AnalyzedResourceSummary) SetResourceArn(v string) *AnalyzedResourceSummary { 3703 s.ResourceArn = &v 3704 return s 3705} 3706 3707// SetResourceOwnerAccount sets the ResourceOwnerAccount field's value. 3708func (s *AnalyzedResourceSummary) SetResourceOwnerAccount(v string) *AnalyzedResourceSummary { 3709 s.ResourceOwnerAccount = &v 3710 return s 3711} 3712 3713// SetResourceType sets the ResourceType field's value. 3714func (s *AnalyzedResourceSummary) SetResourceType(v string) *AnalyzedResourceSummary { 3715 s.ResourceType = &v 3716 return s 3717} 3718 3719// Contains information about the analyzer. 3720type AnalyzerSummary struct { 3721 _ struct{} `type:"structure"` 3722 3723 // The ARN of the analyzer. 3724 // 3725 // Arn is a required field 3726 Arn *string `locationName:"arn" type:"string" required:"true"` 3727 3728 // A timestamp for the time at which the analyzer was created. 3729 // 3730 // CreatedAt is a required field 3731 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 3732 3733 // The resource that was most recently analyzed by the analyzer. 3734 LastResourceAnalyzed *string `locationName:"lastResourceAnalyzed" type:"string"` 3735 3736 // The time at which the most recently analyzed resource was analyzed. 3737 LastResourceAnalyzedAt *time.Time `locationName:"lastResourceAnalyzedAt" type:"timestamp" timestampFormat:"iso8601"` 3738 3739 // The name of the analyzer. 3740 // 3741 // Name is a required field 3742 Name *string `locationName:"name" min:"1" type:"string" required:"true"` 3743 3744 // The status of the analyzer. An Active analyzer successfully monitors supported 3745 // resources and generates new findings. The analyzer is Disabled when a user 3746 // action, such as removing trusted access for AWS IAM Access Analyzer from 3747 // AWS Organizations, causes the analyzer to stop generating new findings. The 3748 // status is Creating when the analyzer creation is in progress and Failed when 3749 // the analyzer creation has failed. 3750 // 3751 // Status is a required field 3752 Status *string `locationName:"status" type:"string" required:"true" enum:"AnalyzerStatus"` 3753 3754 // The statusReason provides more details about the current status of the analyzer. 3755 // For example, if the creation for the analyzer fails, a Failed status is returned. 3756 // For an analyzer with organization as the type, this failure can be due to 3757 // an issue with creating the service-linked roles required in the member accounts 3758 // of the AWS organization. 3759 StatusReason *StatusReason `locationName:"statusReason" type:"structure"` 3760 3761 // The tags added to the analyzer. 3762 Tags map[string]*string `locationName:"tags" type:"map"` 3763 3764 // The type of analyzer, which corresponds to the zone of trust chosen for the 3765 // analyzer. 3766 // 3767 // Type is a required field 3768 Type *string `locationName:"type" type:"string" required:"true" enum:"Type"` 3769} 3770 3771// String returns the string representation 3772func (s AnalyzerSummary) String() string { 3773 return awsutil.Prettify(s) 3774} 3775 3776// GoString returns the string representation 3777func (s AnalyzerSummary) GoString() string { 3778 return s.String() 3779} 3780 3781// SetArn sets the Arn field's value. 3782func (s *AnalyzerSummary) SetArn(v string) *AnalyzerSummary { 3783 s.Arn = &v 3784 return s 3785} 3786 3787// SetCreatedAt sets the CreatedAt field's value. 3788func (s *AnalyzerSummary) SetCreatedAt(v time.Time) *AnalyzerSummary { 3789 s.CreatedAt = &v 3790 return s 3791} 3792 3793// SetLastResourceAnalyzed sets the LastResourceAnalyzed field's value. 3794func (s *AnalyzerSummary) SetLastResourceAnalyzed(v string) *AnalyzerSummary { 3795 s.LastResourceAnalyzed = &v 3796 return s 3797} 3798 3799// SetLastResourceAnalyzedAt sets the LastResourceAnalyzedAt field's value. 3800func (s *AnalyzerSummary) SetLastResourceAnalyzedAt(v time.Time) *AnalyzerSummary { 3801 s.LastResourceAnalyzedAt = &v 3802 return s 3803} 3804 3805// SetName sets the Name field's value. 3806func (s *AnalyzerSummary) SetName(v string) *AnalyzerSummary { 3807 s.Name = &v 3808 return s 3809} 3810 3811// SetStatus sets the Status field's value. 3812func (s *AnalyzerSummary) SetStatus(v string) *AnalyzerSummary { 3813 s.Status = &v 3814 return s 3815} 3816 3817// SetStatusReason sets the StatusReason field's value. 3818func (s *AnalyzerSummary) SetStatusReason(v *StatusReason) *AnalyzerSummary { 3819 s.StatusReason = v 3820 return s 3821} 3822 3823// SetTags sets the Tags field's value. 3824func (s *AnalyzerSummary) SetTags(v map[string]*string) *AnalyzerSummary { 3825 s.Tags = v 3826 return s 3827} 3828 3829// SetType sets the Type field's value. 3830func (s *AnalyzerSummary) SetType(v string) *AnalyzerSummary { 3831 s.Type = &v 3832 return s 3833} 3834 3835// Retroactively applies an archive rule. 3836type ApplyArchiveRuleInput struct { 3837 _ struct{} `type:"structure"` 3838 3839 // The Amazon resource name (ARN) of the analyzer. 3840 // 3841 // AnalyzerArn is a required field 3842 AnalyzerArn *string `locationName:"analyzerArn" type:"string" required:"true"` 3843 3844 // A client token. 3845 ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` 3846 3847 // The name of the rule to apply. 3848 // 3849 // RuleName is a required field 3850 RuleName *string `locationName:"ruleName" min:"1" type:"string" required:"true"` 3851} 3852 3853// String returns the string representation 3854func (s ApplyArchiveRuleInput) String() string { 3855 return awsutil.Prettify(s) 3856} 3857 3858// GoString returns the string representation 3859func (s ApplyArchiveRuleInput) GoString() string { 3860 return s.String() 3861} 3862 3863// Validate inspects the fields of the type to determine if they are valid. 3864func (s *ApplyArchiveRuleInput) Validate() error { 3865 invalidParams := request.ErrInvalidParams{Context: "ApplyArchiveRuleInput"} 3866 if s.AnalyzerArn == nil { 3867 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 3868 } 3869 if s.RuleName == nil { 3870 invalidParams.Add(request.NewErrParamRequired("RuleName")) 3871 } 3872 if s.RuleName != nil && len(*s.RuleName) < 1 { 3873 invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) 3874 } 3875 3876 if invalidParams.Len() > 0 { 3877 return invalidParams 3878 } 3879 return nil 3880} 3881 3882// SetAnalyzerArn sets the AnalyzerArn field's value. 3883func (s *ApplyArchiveRuleInput) SetAnalyzerArn(v string) *ApplyArchiveRuleInput { 3884 s.AnalyzerArn = &v 3885 return s 3886} 3887 3888// SetClientToken sets the ClientToken field's value. 3889func (s *ApplyArchiveRuleInput) SetClientToken(v string) *ApplyArchiveRuleInput { 3890 s.ClientToken = &v 3891 return s 3892} 3893 3894// SetRuleName sets the RuleName field's value. 3895func (s *ApplyArchiveRuleInput) SetRuleName(v string) *ApplyArchiveRuleInput { 3896 s.RuleName = &v 3897 return s 3898} 3899 3900type ApplyArchiveRuleOutput struct { 3901 _ struct{} `type:"structure"` 3902} 3903 3904// String returns the string representation 3905func (s ApplyArchiveRuleOutput) String() string { 3906 return awsutil.Prettify(s) 3907} 3908 3909// GoString returns the string representation 3910func (s ApplyArchiveRuleOutput) GoString() string { 3911 return s.String() 3912} 3913 3914// Contains information about an archive rule. 3915type ArchiveRuleSummary struct { 3916 _ struct{} `type:"structure"` 3917 3918 // The time at which the archive rule was created. 3919 // 3920 // CreatedAt is a required field 3921 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 3922 3923 // A filter used to define the archive rule. 3924 // 3925 // Filter is a required field 3926 Filter map[string]*Criterion `locationName:"filter" type:"map" required:"true"` 3927 3928 // The name of the archive rule. 3929 // 3930 // RuleName is a required field 3931 RuleName *string `locationName:"ruleName" min:"1" type:"string" required:"true"` 3932 3933 // The time at which the archive rule was last updated. 3934 // 3935 // UpdatedAt is a required field 3936 UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 3937} 3938 3939// String returns the string representation 3940func (s ArchiveRuleSummary) String() string { 3941 return awsutil.Prettify(s) 3942} 3943 3944// GoString returns the string representation 3945func (s ArchiveRuleSummary) GoString() string { 3946 return s.String() 3947} 3948 3949// SetCreatedAt sets the CreatedAt field's value. 3950func (s *ArchiveRuleSummary) SetCreatedAt(v time.Time) *ArchiveRuleSummary { 3951 s.CreatedAt = &v 3952 return s 3953} 3954 3955// SetFilter sets the Filter field's value. 3956func (s *ArchiveRuleSummary) SetFilter(v map[string]*Criterion) *ArchiveRuleSummary { 3957 s.Filter = v 3958 return s 3959} 3960 3961// SetRuleName sets the RuleName field's value. 3962func (s *ArchiveRuleSummary) SetRuleName(v string) *ArchiveRuleSummary { 3963 s.RuleName = &v 3964 return s 3965} 3966 3967// SetUpdatedAt sets the UpdatedAt field's value. 3968func (s *ArchiveRuleSummary) SetUpdatedAt(v time.Time) *ArchiveRuleSummary { 3969 s.UpdatedAt = &v 3970 return s 3971} 3972 3973type CancelPolicyGenerationInput struct { 3974 _ struct{} `type:"structure"` 3975 3976 // The JobId that is returned by the StartPolicyGeneration operation. The JobId 3977 // can be used with GetGeneratedPolicy to retrieve the generated policies or 3978 // used with CancelPolicyGeneration to cancel the policy generation request. 3979 // 3980 // JobId is a required field 3981 JobId *string `location:"uri" locationName:"jobId" type:"string" required:"true"` 3982} 3983 3984// String returns the string representation 3985func (s CancelPolicyGenerationInput) String() string { 3986 return awsutil.Prettify(s) 3987} 3988 3989// GoString returns the string representation 3990func (s CancelPolicyGenerationInput) GoString() string { 3991 return s.String() 3992} 3993 3994// Validate inspects the fields of the type to determine if they are valid. 3995func (s *CancelPolicyGenerationInput) Validate() error { 3996 invalidParams := request.ErrInvalidParams{Context: "CancelPolicyGenerationInput"} 3997 if s.JobId == nil { 3998 invalidParams.Add(request.NewErrParamRequired("JobId")) 3999 } 4000 if s.JobId != nil && len(*s.JobId) < 1 { 4001 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 4002 } 4003 4004 if invalidParams.Len() > 0 { 4005 return invalidParams 4006 } 4007 return nil 4008} 4009 4010// SetJobId sets the JobId field's value. 4011func (s *CancelPolicyGenerationInput) SetJobId(v string) *CancelPolicyGenerationInput { 4012 s.JobId = &v 4013 return s 4014} 4015 4016type CancelPolicyGenerationOutput struct { 4017 _ struct{} `type:"structure"` 4018} 4019 4020// String returns the string representation 4021func (s CancelPolicyGenerationOutput) String() string { 4022 return awsutil.Prettify(s) 4023} 4024 4025// GoString returns the string representation 4026func (s CancelPolicyGenerationOutput) GoString() string { 4027 return s.String() 4028} 4029 4030// Contains information about CloudTrail access. 4031type CloudTrailDetails struct { 4032 _ struct{} `type:"structure"` 4033 4034 // The ARN of the service role that Access Analyzer uses to access your CloudTrail 4035 // trail and service last accessed information. 4036 // 4037 // AccessRole is a required field 4038 AccessRole *string `locationName:"accessRole" type:"string" required:"true"` 4039 4040 // The end of the time range for which Access Analyzer reviews your CloudTrail 4041 // events. Events with a timestamp after this time are not considered to generate 4042 // a policy. If this is not included in the request, the default value is the 4043 // current time. 4044 EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"iso8601"` 4045 4046 // The start of the time range for which Access Analyzer reviews your CloudTrail 4047 // events. Events with a timestamp before this time are not considered to generate 4048 // a policy. 4049 // 4050 // StartTime is a required field 4051 StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` 4052 4053 // A Trail object that contains settings for a trail. 4054 // 4055 // Trails is a required field 4056 Trails []*Trail `locationName:"trails" type:"list" required:"true"` 4057} 4058 4059// String returns the string representation 4060func (s CloudTrailDetails) String() string { 4061 return awsutil.Prettify(s) 4062} 4063 4064// GoString returns the string representation 4065func (s CloudTrailDetails) GoString() string { 4066 return s.String() 4067} 4068 4069// Validate inspects the fields of the type to determine if they are valid. 4070func (s *CloudTrailDetails) Validate() error { 4071 invalidParams := request.ErrInvalidParams{Context: "CloudTrailDetails"} 4072 if s.AccessRole == nil { 4073 invalidParams.Add(request.NewErrParamRequired("AccessRole")) 4074 } 4075 if s.StartTime == nil { 4076 invalidParams.Add(request.NewErrParamRequired("StartTime")) 4077 } 4078 if s.Trails == nil { 4079 invalidParams.Add(request.NewErrParamRequired("Trails")) 4080 } 4081 if s.Trails != nil { 4082 for i, v := range s.Trails { 4083 if v == nil { 4084 continue 4085 } 4086 if err := v.Validate(); err != nil { 4087 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Trails", i), err.(request.ErrInvalidParams)) 4088 } 4089 } 4090 } 4091 4092 if invalidParams.Len() > 0 { 4093 return invalidParams 4094 } 4095 return nil 4096} 4097 4098// SetAccessRole sets the AccessRole field's value. 4099func (s *CloudTrailDetails) SetAccessRole(v string) *CloudTrailDetails { 4100 s.AccessRole = &v 4101 return s 4102} 4103 4104// SetEndTime sets the EndTime field's value. 4105func (s *CloudTrailDetails) SetEndTime(v time.Time) *CloudTrailDetails { 4106 s.EndTime = &v 4107 return s 4108} 4109 4110// SetStartTime sets the StartTime field's value. 4111func (s *CloudTrailDetails) SetStartTime(v time.Time) *CloudTrailDetails { 4112 s.StartTime = &v 4113 return s 4114} 4115 4116// SetTrails sets the Trails field's value. 4117func (s *CloudTrailDetails) SetTrails(v []*Trail) *CloudTrailDetails { 4118 s.Trails = v 4119 return s 4120} 4121 4122// Contains information about CloudTrail access. 4123type CloudTrailProperties struct { 4124 _ struct{} `type:"structure"` 4125 4126 // The end of the time range for which Access Analyzer reviews your CloudTrail 4127 // events. Events with a timestamp after this time are not considered to generate 4128 // a policy. If this is not included in the request, the default value is the 4129 // current time. 4130 // 4131 // EndTime is a required field 4132 EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` 4133 4134 // The start of the time range for which Access Analyzer reviews your CloudTrail 4135 // events. Events with a timestamp before this time are not considered to generate 4136 // a policy. 4137 // 4138 // StartTime is a required field 4139 StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` 4140 4141 // A TrailProperties object that contains settings for trail properties. 4142 // 4143 // TrailProperties is a required field 4144 TrailProperties []*TrailProperties `locationName:"trailProperties" type:"list" required:"true"` 4145} 4146 4147// String returns the string representation 4148func (s CloudTrailProperties) String() string { 4149 return awsutil.Prettify(s) 4150} 4151 4152// GoString returns the string representation 4153func (s CloudTrailProperties) GoString() string { 4154 return s.String() 4155} 4156 4157// SetEndTime sets the EndTime field's value. 4158func (s *CloudTrailProperties) SetEndTime(v time.Time) *CloudTrailProperties { 4159 s.EndTime = &v 4160 return s 4161} 4162 4163// SetStartTime sets the StartTime field's value. 4164func (s *CloudTrailProperties) SetStartTime(v time.Time) *CloudTrailProperties { 4165 s.StartTime = &v 4166 return s 4167} 4168 4169// SetTrailProperties sets the TrailProperties field's value. 4170func (s *CloudTrailProperties) SetTrailProperties(v []*TrailProperties) *CloudTrailProperties { 4171 s.TrailProperties = v 4172 return s 4173} 4174 4175// Access control configuration structures for your resource. You specify the 4176// configuration as a type-value pair. You can specify only one type of access 4177// control configuration. 4178type Configuration struct { 4179 _ struct{} `type:"structure"` 4180 4181 // The access control configuration is for an IAM role. 4182 IamRole *IamRoleConfiguration `locationName:"iamRole" type:"structure"` 4183 4184 // The access control configuration is for a KMS key. 4185 KmsKey *KmsKeyConfiguration `locationName:"kmsKey" type:"structure"` 4186 4187 // The access control configuration is for an Amazon S3 Bucket. 4188 S3Bucket *S3BucketConfiguration `locationName:"s3Bucket" type:"structure"` 4189 4190 // The access control configuration is for a Secrets Manager secret. 4191 SecretsManagerSecret *SecretsManagerSecretConfiguration `locationName:"secretsManagerSecret" type:"structure"` 4192 4193 // The access control configuration is for an SQS queue. 4194 SqsQueue *SqsQueueConfiguration `locationName:"sqsQueue" type:"structure"` 4195} 4196 4197// String returns the string representation 4198func (s Configuration) String() string { 4199 return awsutil.Prettify(s) 4200} 4201 4202// GoString returns the string representation 4203func (s Configuration) GoString() string { 4204 return s.String() 4205} 4206 4207// Validate inspects the fields of the type to determine if they are valid. 4208func (s *Configuration) Validate() error { 4209 invalidParams := request.ErrInvalidParams{Context: "Configuration"} 4210 if s.KmsKey != nil { 4211 if err := s.KmsKey.Validate(); err != nil { 4212 invalidParams.AddNested("KmsKey", err.(request.ErrInvalidParams)) 4213 } 4214 } 4215 if s.S3Bucket != nil { 4216 if err := s.S3Bucket.Validate(); err != nil { 4217 invalidParams.AddNested("S3Bucket", err.(request.ErrInvalidParams)) 4218 } 4219 } 4220 4221 if invalidParams.Len() > 0 { 4222 return invalidParams 4223 } 4224 return nil 4225} 4226 4227// SetIamRole sets the IamRole field's value. 4228func (s *Configuration) SetIamRole(v *IamRoleConfiguration) *Configuration { 4229 s.IamRole = v 4230 return s 4231} 4232 4233// SetKmsKey sets the KmsKey field's value. 4234func (s *Configuration) SetKmsKey(v *KmsKeyConfiguration) *Configuration { 4235 s.KmsKey = v 4236 return s 4237} 4238 4239// SetS3Bucket sets the S3Bucket field's value. 4240func (s *Configuration) SetS3Bucket(v *S3BucketConfiguration) *Configuration { 4241 s.S3Bucket = v 4242 return s 4243} 4244 4245// SetSecretsManagerSecret sets the SecretsManagerSecret field's value. 4246func (s *Configuration) SetSecretsManagerSecret(v *SecretsManagerSecretConfiguration) *Configuration { 4247 s.SecretsManagerSecret = v 4248 return s 4249} 4250 4251// SetSqsQueue sets the SqsQueue field's value. 4252func (s *Configuration) SetSqsQueue(v *SqsQueueConfiguration) *Configuration { 4253 s.SqsQueue = v 4254 return s 4255} 4256 4257// A conflict exception error. 4258type ConflictException struct { 4259 _ struct{} `type:"structure"` 4260 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4261 4262 Message_ *string `locationName:"message" type:"string"` 4263 4264 // The ID of the resource. 4265 // 4266 // ResourceId is a required field 4267 ResourceId *string `locationName:"resourceId" type:"string" required:"true"` 4268 4269 // The resource type. 4270 // 4271 // ResourceType is a required field 4272 ResourceType *string `locationName:"resourceType" type:"string" required:"true"` 4273} 4274 4275// String returns the string representation 4276func (s ConflictException) String() string { 4277 return awsutil.Prettify(s) 4278} 4279 4280// GoString returns the string representation 4281func (s ConflictException) GoString() string { 4282 return s.String() 4283} 4284 4285func newErrorConflictException(v protocol.ResponseMetadata) error { 4286 return &ConflictException{ 4287 RespMetadata: v, 4288 } 4289} 4290 4291// Code returns the exception type name. 4292func (s *ConflictException) Code() string { 4293 return "ConflictException" 4294} 4295 4296// Message returns the exception's message. 4297func (s *ConflictException) Message() string { 4298 if s.Message_ != nil { 4299 return *s.Message_ 4300 } 4301 return "" 4302} 4303 4304// OrigErr always returns nil, satisfies awserr.Error interface. 4305func (s *ConflictException) OrigErr() error { 4306 return nil 4307} 4308 4309func (s *ConflictException) Error() string { 4310 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 4311} 4312 4313// Status code returns the HTTP status code for the request's response error. 4314func (s *ConflictException) StatusCode() int { 4315 return s.RespMetadata.StatusCode 4316} 4317 4318// RequestID returns the service's response RequestID for request. 4319func (s *ConflictException) RequestID() string { 4320 return s.RespMetadata.RequestID 4321} 4322 4323type CreateAccessPreviewInput struct { 4324 _ struct{} `type:"structure"` 4325 4326 // The ARN of the account analyzer (https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources) 4327 // used to generate the access preview. You can only create an access preview 4328 // for analyzers with an Account type and Active status. 4329 // 4330 // AnalyzerArn is a required field 4331 AnalyzerArn *string `locationName:"analyzerArn" type:"string" required:"true"` 4332 4333 // A client token. 4334 ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` 4335 4336 // Access control configuration for your resource that is used to generate the 4337 // access preview. The access preview includes findings for external access 4338 // allowed to the resource with the proposed access control configuration. The 4339 // configuration must contain exactly one element. 4340 // 4341 // Configurations is a required field 4342 Configurations map[string]*Configuration `locationName:"configurations" type:"map" required:"true"` 4343} 4344 4345// String returns the string representation 4346func (s CreateAccessPreviewInput) String() string { 4347 return awsutil.Prettify(s) 4348} 4349 4350// GoString returns the string representation 4351func (s CreateAccessPreviewInput) GoString() string { 4352 return s.String() 4353} 4354 4355// Validate inspects the fields of the type to determine if they are valid. 4356func (s *CreateAccessPreviewInput) Validate() error { 4357 invalidParams := request.ErrInvalidParams{Context: "CreateAccessPreviewInput"} 4358 if s.AnalyzerArn == nil { 4359 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 4360 } 4361 if s.Configurations == nil { 4362 invalidParams.Add(request.NewErrParamRequired("Configurations")) 4363 } 4364 if s.Configurations != nil { 4365 for i, v := range s.Configurations { 4366 if v == nil { 4367 continue 4368 } 4369 if err := v.Validate(); err != nil { 4370 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Configurations", i), err.(request.ErrInvalidParams)) 4371 } 4372 } 4373 } 4374 4375 if invalidParams.Len() > 0 { 4376 return invalidParams 4377 } 4378 return nil 4379} 4380 4381// SetAnalyzerArn sets the AnalyzerArn field's value. 4382func (s *CreateAccessPreviewInput) SetAnalyzerArn(v string) *CreateAccessPreviewInput { 4383 s.AnalyzerArn = &v 4384 return s 4385} 4386 4387// SetClientToken sets the ClientToken field's value. 4388func (s *CreateAccessPreviewInput) SetClientToken(v string) *CreateAccessPreviewInput { 4389 s.ClientToken = &v 4390 return s 4391} 4392 4393// SetConfigurations sets the Configurations field's value. 4394func (s *CreateAccessPreviewInput) SetConfigurations(v map[string]*Configuration) *CreateAccessPreviewInput { 4395 s.Configurations = v 4396 return s 4397} 4398 4399type CreateAccessPreviewOutput struct { 4400 _ struct{} `type:"structure"` 4401 4402 // The unique ID for the access preview. 4403 // 4404 // Id is a required field 4405 Id *string `locationName:"id" type:"string" required:"true"` 4406} 4407 4408// String returns the string representation 4409func (s CreateAccessPreviewOutput) String() string { 4410 return awsutil.Prettify(s) 4411} 4412 4413// GoString returns the string representation 4414func (s CreateAccessPreviewOutput) GoString() string { 4415 return s.String() 4416} 4417 4418// SetId sets the Id field's value. 4419func (s *CreateAccessPreviewOutput) SetId(v string) *CreateAccessPreviewOutput { 4420 s.Id = &v 4421 return s 4422} 4423 4424// Creates an analyzer. 4425type CreateAnalyzerInput struct { 4426 _ struct{} `type:"structure"` 4427 4428 // The name of the analyzer to create. 4429 // 4430 // AnalyzerName is a required field 4431 AnalyzerName *string `locationName:"analyzerName" min:"1" type:"string" required:"true"` 4432 4433 // Specifies the archive rules to add for the analyzer. Archive rules automatically 4434 // archive findings that meet the criteria you define for the rule. 4435 ArchiveRules []*InlineArchiveRule `locationName:"archiveRules" type:"list"` 4436 4437 // A client token. 4438 ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` 4439 4440 // The tags to apply to the analyzer. 4441 Tags map[string]*string `locationName:"tags" type:"map"` 4442 4443 // The type of analyzer to create. Only ACCOUNT and ORGANIZATION analyzers are 4444 // supported. You can create only one analyzer per account per Region. You can 4445 // create up to 5 analyzers per organization per Region. 4446 // 4447 // Type is a required field 4448 Type *string `locationName:"type" type:"string" required:"true" enum:"Type"` 4449} 4450 4451// String returns the string representation 4452func (s CreateAnalyzerInput) String() string { 4453 return awsutil.Prettify(s) 4454} 4455 4456// GoString returns the string representation 4457func (s CreateAnalyzerInput) GoString() string { 4458 return s.String() 4459} 4460 4461// Validate inspects the fields of the type to determine if they are valid. 4462func (s *CreateAnalyzerInput) Validate() error { 4463 invalidParams := request.ErrInvalidParams{Context: "CreateAnalyzerInput"} 4464 if s.AnalyzerName == nil { 4465 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 4466 } 4467 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 4468 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 4469 } 4470 if s.Type == nil { 4471 invalidParams.Add(request.NewErrParamRequired("Type")) 4472 } 4473 if s.ArchiveRules != nil { 4474 for i, v := range s.ArchiveRules { 4475 if v == nil { 4476 continue 4477 } 4478 if err := v.Validate(); err != nil { 4479 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ArchiveRules", i), err.(request.ErrInvalidParams)) 4480 } 4481 } 4482 } 4483 4484 if invalidParams.Len() > 0 { 4485 return invalidParams 4486 } 4487 return nil 4488} 4489 4490// SetAnalyzerName sets the AnalyzerName field's value. 4491func (s *CreateAnalyzerInput) SetAnalyzerName(v string) *CreateAnalyzerInput { 4492 s.AnalyzerName = &v 4493 return s 4494} 4495 4496// SetArchiveRules sets the ArchiveRules field's value. 4497func (s *CreateAnalyzerInput) SetArchiveRules(v []*InlineArchiveRule) *CreateAnalyzerInput { 4498 s.ArchiveRules = v 4499 return s 4500} 4501 4502// SetClientToken sets the ClientToken field's value. 4503func (s *CreateAnalyzerInput) SetClientToken(v string) *CreateAnalyzerInput { 4504 s.ClientToken = &v 4505 return s 4506} 4507 4508// SetTags sets the Tags field's value. 4509func (s *CreateAnalyzerInput) SetTags(v map[string]*string) *CreateAnalyzerInput { 4510 s.Tags = v 4511 return s 4512} 4513 4514// SetType sets the Type field's value. 4515func (s *CreateAnalyzerInput) SetType(v string) *CreateAnalyzerInput { 4516 s.Type = &v 4517 return s 4518} 4519 4520// The response to the request to create an analyzer. 4521type CreateAnalyzerOutput struct { 4522 _ struct{} `type:"structure"` 4523 4524 // The ARN of the analyzer that was created by the request. 4525 Arn *string `locationName:"arn" type:"string"` 4526} 4527 4528// String returns the string representation 4529func (s CreateAnalyzerOutput) String() string { 4530 return awsutil.Prettify(s) 4531} 4532 4533// GoString returns the string representation 4534func (s CreateAnalyzerOutput) GoString() string { 4535 return s.String() 4536} 4537 4538// SetArn sets the Arn field's value. 4539func (s *CreateAnalyzerOutput) SetArn(v string) *CreateAnalyzerOutput { 4540 s.Arn = &v 4541 return s 4542} 4543 4544// Creates an archive rule. 4545type CreateArchiveRuleInput struct { 4546 _ struct{} `type:"structure"` 4547 4548 // The name of the created analyzer. 4549 // 4550 // AnalyzerName is a required field 4551 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 4552 4553 // A client token. 4554 ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` 4555 4556 // The criteria for the rule. 4557 // 4558 // Filter is a required field 4559 Filter map[string]*Criterion `locationName:"filter" type:"map" required:"true"` 4560 4561 // The name of the rule to create. 4562 // 4563 // RuleName is a required field 4564 RuleName *string `locationName:"ruleName" min:"1" type:"string" required:"true"` 4565} 4566 4567// String returns the string representation 4568func (s CreateArchiveRuleInput) String() string { 4569 return awsutil.Prettify(s) 4570} 4571 4572// GoString returns the string representation 4573func (s CreateArchiveRuleInput) GoString() string { 4574 return s.String() 4575} 4576 4577// Validate inspects the fields of the type to determine if they are valid. 4578func (s *CreateArchiveRuleInput) Validate() error { 4579 invalidParams := request.ErrInvalidParams{Context: "CreateArchiveRuleInput"} 4580 if s.AnalyzerName == nil { 4581 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 4582 } 4583 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 4584 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 4585 } 4586 if s.Filter == nil { 4587 invalidParams.Add(request.NewErrParamRequired("Filter")) 4588 } 4589 if s.RuleName == nil { 4590 invalidParams.Add(request.NewErrParamRequired("RuleName")) 4591 } 4592 if s.RuleName != nil && len(*s.RuleName) < 1 { 4593 invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) 4594 } 4595 if s.Filter != nil { 4596 for i, v := range s.Filter { 4597 if v == nil { 4598 continue 4599 } 4600 if err := v.Validate(); err != nil { 4601 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filter", i), err.(request.ErrInvalidParams)) 4602 } 4603 } 4604 } 4605 4606 if invalidParams.Len() > 0 { 4607 return invalidParams 4608 } 4609 return nil 4610} 4611 4612// SetAnalyzerName sets the AnalyzerName field's value. 4613func (s *CreateArchiveRuleInput) SetAnalyzerName(v string) *CreateArchiveRuleInput { 4614 s.AnalyzerName = &v 4615 return s 4616} 4617 4618// SetClientToken sets the ClientToken field's value. 4619func (s *CreateArchiveRuleInput) SetClientToken(v string) *CreateArchiveRuleInput { 4620 s.ClientToken = &v 4621 return s 4622} 4623 4624// SetFilter sets the Filter field's value. 4625func (s *CreateArchiveRuleInput) SetFilter(v map[string]*Criterion) *CreateArchiveRuleInput { 4626 s.Filter = v 4627 return s 4628} 4629 4630// SetRuleName sets the RuleName field's value. 4631func (s *CreateArchiveRuleInput) SetRuleName(v string) *CreateArchiveRuleInput { 4632 s.RuleName = &v 4633 return s 4634} 4635 4636type CreateArchiveRuleOutput struct { 4637 _ struct{} `type:"structure"` 4638} 4639 4640// String returns the string representation 4641func (s CreateArchiveRuleOutput) String() string { 4642 return awsutil.Prettify(s) 4643} 4644 4645// GoString returns the string representation 4646func (s CreateArchiveRuleOutput) GoString() string { 4647 return s.String() 4648} 4649 4650// The criteria to use in the filter that defines the archive rule. 4651type Criterion struct { 4652 _ struct{} `type:"structure"` 4653 4654 // A "contains" operator to match for the filter used to create the rule. 4655 Contains []*string `locationName:"contains" min:"1" type:"list"` 4656 4657 // An "equals" operator to match for the filter used to create the rule. 4658 Eq []*string `locationName:"eq" min:"1" type:"list"` 4659 4660 // An "exists" operator to match for the filter used to create the rule. 4661 Exists *bool `locationName:"exists" type:"boolean"` 4662 4663 // A "not equals" operator to match for the filter used to create the rule. 4664 Neq []*string `locationName:"neq" min:"1" type:"list"` 4665} 4666 4667// String returns the string representation 4668func (s Criterion) String() string { 4669 return awsutil.Prettify(s) 4670} 4671 4672// GoString returns the string representation 4673func (s Criterion) GoString() string { 4674 return s.String() 4675} 4676 4677// Validate inspects the fields of the type to determine if they are valid. 4678func (s *Criterion) Validate() error { 4679 invalidParams := request.ErrInvalidParams{Context: "Criterion"} 4680 if s.Contains != nil && len(s.Contains) < 1 { 4681 invalidParams.Add(request.NewErrParamMinLen("Contains", 1)) 4682 } 4683 if s.Eq != nil && len(s.Eq) < 1 { 4684 invalidParams.Add(request.NewErrParamMinLen("Eq", 1)) 4685 } 4686 if s.Neq != nil && len(s.Neq) < 1 { 4687 invalidParams.Add(request.NewErrParamMinLen("Neq", 1)) 4688 } 4689 4690 if invalidParams.Len() > 0 { 4691 return invalidParams 4692 } 4693 return nil 4694} 4695 4696// SetContains sets the Contains field's value. 4697func (s *Criterion) SetContains(v []*string) *Criterion { 4698 s.Contains = v 4699 return s 4700} 4701 4702// SetEq sets the Eq field's value. 4703func (s *Criterion) SetEq(v []*string) *Criterion { 4704 s.Eq = v 4705 return s 4706} 4707 4708// SetExists sets the Exists field's value. 4709func (s *Criterion) SetExists(v bool) *Criterion { 4710 s.Exists = &v 4711 return s 4712} 4713 4714// SetNeq sets the Neq field's value. 4715func (s *Criterion) SetNeq(v []*string) *Criterion { 4716 s.Neq = v 4717 return s 4718} 4719 4720// Deletes an analyzer. 4721type DeleteAnalyzerInput struct { 4722 _ struct{} `type:"structure"` 4723 4724 // The name of the analyzer to delete. 4725 // 4726 // AnalyzerName is a required field 4727 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 4728 4729 // A client token. 4730 ClientToken *string `location:"querystring" locationName:"clientToken" type:"string" idempotencyToken:"true"` 4731} 4732 4733// String returns the string representation 4734func (s DeleteAnalyzerInput) String() string { 4735 return awsutil.Prettify(s) 4736} 4737 4738// GoString returns the string representation 4739func (s DeleteAnalyzerInput) GoString() string { 4740 return s.String() 4741} 4742 4743// Validate inspects the fields of the type to determine if they are valid. 4744func (s *DeleteAnalyzerInput) Validate() error { 4745 invalidParams := request.ErrInvalidParams{Context: "DeleteAnalyzerInput"} 4746 if s.AnalyzerName == nil { 4747 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 4748 } 4749 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 4750 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 4751 } 4752 4753 if invalidParams.Len() > 0 { 4754 return invalidParams 4755 } 4756 return nil 4757} 4758 4759// SetAnalyzerName sets the AnalyzerName field's value. 4760func (s *DeleteAnalyzerInput) SetAnalyzerName(v string) *DeleteAnalyzerInput { 4761 s.AnalyzerName = &v 4762 return s 4763} 4764 4765// SetClientToken sets the ClientToken field's value. 4766func (s *DeleteAnalyzerInput) SetClientToken(v string) *DeleteAnalyzerInput { 4767 s.ClientToken = &v 4768 return s 4769} 4770 4771type DeleteAnalyzerOutput struct { 4772 _ struct{} `type:"structure"` 4773} 4774 4775// String returns the string representation 4776func (s DeleteAnalyzerOutput) String() string { 4777 return awsutil.Prettify(s) 4778} 4779 4780// GoString returns the string representation 4781func (s DeleteAnalyzerOutput) GoString() string { 4782 return s.String() 4783} 4784 4785// Deletes an archive rule. 4786type DeleteArchiveRuleInput struct { 4787 _ struct{} `type:"structure"` 4788 4789 // The name of the analyzer that associated with the archive rule to delete. 4790 // 4791 // AnalyzerName is a required field 4792 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 4793 4794 // A client token. 4795 ClientToken *string `location:"querystring" locationName:"clientToken" type:"string" idempotencyToken:"true"` 4796 4797 // The name of the rule to delete. 4798 // 4799 // RuleName is a required field 4800 RuleName *string `location:"uri" locationName:"ruleName" min:"1" type:"string" required:"true"` 4801} 4802 4803// String returns the string representation 4804func (s DeleteArchiveRuleInput) String() string { 4805 return awsutil.Prettify(s) 4806} 4807 4808// GoString returns the string representation 4809func (s DeleteArchiveRuleInput) GoString() string { 4810 return s.String() 4811} 4812 4813// Validate inspects the fields of the type to determine if they are valid. 4814func (s *DeleteArchiveRuleInput) Validate() error { 4815 invalidParams := request.ErrInvalidParams{Context: "DeleteArchiveRuleInput"} 4816 if s.AnalyzerName == nil { 4817 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 4818 } 4819 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 4820 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 4821 } 4822 if s.RuleName == nil { 4823 invalidParams.Add(request.NewErrParamRequired("RuleName")) 4824 } 4825 if s.RuleName != nil && len(*s.RuleName) < 1 { 4826 invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) 4827 } 4828 4829 if invalidParams.Len() > 0 { 4830 return invalidParams 4831 } 4832 return nil 4833} 4834 4835// SetAnalyzerName sets the AnalyzerName field's value. 4836func (s *DeleteArchiveRuleInput) SetAnalyzerName(v string) *DeleteArchiveRuleInput { 4837 s.AnalyzerName = &v 4838 return s 4839} 4840 4841// SetClientToken sets the ClientToken field's value. 4842func (s *DeleteArchiveRuleInput) SetClientToken(v string) *DeleteArchiveRuleInput { 4843 s.ClientToken = &v 4844 return s 4845} 4846 4847// SetRuleName sets the RuleName field's value. 4848func (s *DeleteArchiveRuleInput) SetRuleName(v string) *DeleteArchiveRuleInput { 4849 s.RuleName = &v 4850 return s 4851} 4852 4853type DeleteArchiveRuleOutput struct { 4854 _ struct{} `type:"structure"` 4855} 4856 4857// String returns the string representation 4858func (s DeleteArchiveRuleOutput) String() string { 4859 return awsutil.Prettify(s) 4860} 4861 4862// GoString returns the string representation 4863func (s DeleteArchiveRuleOutput) GoString() string { 4864 return s.String() 4865} 4866 4867// Contains information about a finding. 4868type Finding struct { 4869 _ struct{} `type:"structure"` 4870 4871 // The action in the analyzed policy statement that an external principal has 4872 // permission to use. 4873 Action []*string `locationName:"action" type:"list"` 4874 4875 // The time at which the resource was analyzed. 4876 // 4877 // AnalyzedAt is a required field 4878 AnalyzedAt *time.Time `locationName:"analyzedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 4879 4880 // The condition in the analyzed policy statement that resulted in a finding. 4881 // 4882 // Condition is a required field 4883 Condition map[string]*string `locationName:"condition" type:"map" required:"true"` 4884 4885 // The time at which the finding was generated. 4886 // 4887 // CreatedAt is a required field 4888 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 4889 4890 // An error. 4891 Error *string `locationName:"error" type:"string"` 4892 4893 // The ID of the finding. 4894 // 4895 // Id is a required field 4896 Id *string `locationName:"id" type:"string" required:"true"` 4897 4898 // Indicates whether the policy that generated the finding allows public access 4899 // to the resource. 4900 IsPublic *bool `locationName:"isPublic" type:"boolean"` 4901 4902 // The external principal that access to a resource within the zone of trust. 4903 Principal map[string]*string `locationName:"principal" type:"map"` 4904 4905 // The resource that an external principal has access to. 4906 Resource *string `locationName:"resource" type:"string"` 4907 4908 // The AWS account ID that owns the resource. 4909 // 4910 // ResourceOwnerAccount is a required field 4911 ResourceOwnerAccount *string `locationName:"resourceOwnerAccount" type:"string" required:"true"` 4912 4913 // The type of the resource identified in the finding. 4914 // 4915 // ResourceType is a required field 4916 ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` 4917 4918 // The sources of the finding. This indicates how the access that generated 4919 // the finding is granted. It is populated for Amazon S3 bucket findings. 4920 Sources []*FindingSource `locationName:"sources" type:"list"` 4921 4922 // The current status of the finding. 4923 // 4924 // Status is a required field 4925 Status *string `locationName:"status" type:"string" required:"true" enum:"FindingStatus"` 4926 4927 // The time at which the finding was updated. 4928 // 4929 // UpdatedAt is a required field 4930 UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 4931} 4932 4933// String returns the string representation 4934func (s Finding) String() string { 4935 return awsutil.Prettify(s) 4936} 4937 4938// GoString returns the string representation 4939func (s Finding) GoString() string { 4940 return s.String() 4941} 4942 4943// SetAction sets the Action field's value. 4944func (s *Finding) SetAction(v []*string) *Finding { 4945 s.Action = v 4946 return s 4947} 4948 4949// SetAnalyzedAt sets the AnalyzedAt field's value. 4950func (s *Finding) SetAnalyzedAt(v time.Time) *Finding { 4951 s.AnalyzedAt = &v 4952 return s 4953} 4954 4955// SetCondition sets the Condition field's value. 4956func (s *Finding) SetCondition(v map[string]*string) *Finding { 4957 s.Condition = v 4958 return s 4959} 4960 4961// SetCreatedAt sets the CreatedAt field's value. 4962func (s *Finding) SetCreatedAt(v time.Time) *Finding { 4963 s.CreatedAt = &v 4964 return s 4965} 4966 4967// SetError sets the Error field's value. 4968func (s *Finding) SetError(v string) *Finding { 4969 s.Error = &v 4970 return s 4971} 4972 4973// SetId sets the Id field's value. 4974func (s *Finding) SetId(v string) *Finding { 4975 s.Id = &v 4976 return s 4977} 4978 4979// SetIsPublic sets the IsPublic field's value. 4980func (s *Finding) SetIsPublic(v bool) *Finding { 4981 s.IsPublic = &v 4982 return s 4983} 4984 4985// SetPrincipal sets the Principal field's value. 4986func (s *Finding) SetPrincipal(v map[string]*string) *Finding { 4987 s.Principal = v 4988 return s 4989} 4990 4991// SetResource sets the Resource field's value. 4992func (s *Finding) SetResource(v string) *Finding { 4993 s.Resource = &v 4994 return s 4995} 4996 4997// SetResourceOwnerAccount sets the ResourceOwnerAccount field's value. 4998func (s *Finding) SetResourceOwnerAccount(v string) *Finding { 4999 s.ResourceOwnerAccount = &v 5000 return s 5001} 5002 5003// SetResourceType sets the ResourceType field's value. 5004func (s *Finding) SetResourceType(v string) *Finding { 5005 s.ResourceType = &v 5006 return s 5007} 5008 5009// SetSources sets the Sources field's value. 5010func (s *Finding) SetSources(v []*FindingSource) *Finding { 5011 s.Sources = v 5012 return s 5013} 5014 5015// SetStatus sets the Status field's value. 5016func (s *Finding) SetStatus(v string) *Finding { 5017 s.Status = &v 5018 return s 5019} 5020 5021// SetUpdatedAt sets the UpdatedAt field's value. 5022func (s *Finding) SetUpdatedAt(v time.Time) *Finding { 5023 s.UpdatedAt = &v 5024 return s 5025} 5026 5027// The source of the finding. This indicates how the access that generated the 5028// finding is granted. It is populated for Amazon S3 bucket findings. 5029type FindingSource struct { 5030 _ struct{} `type:"structure"` 5031 5032 // Includes details about how the access that generated the finding is granted. 5033 // This is populated for Amazon S3 bucket findings. 5034 Detail *FindingSourceDetail `locationName:"detail" type:"structure"` 5035 5036 // Indicates the type of access that generated the finding. 5037 // 5038 // Type is a required field 5039 Type *string `locationName:"type" type:"string" required:"true" enum:"FindingSourceType"` 5040} 5041 5042// String returns the string representation 5043func (s FindingSource) String() string { 5044 return awsutil.Prettify(s) 5045} 5046 5047// GoString returns the string representation 5048func (s FindingSource) GoString() string { 5049 return s.String() 5050} 5051 5052// SetDetail sets the Detail field's value. 5053func (s *FindingSource) SetDetail(v *FindingSourceDetail) *FindingSource { 5054 s.Detail = v 5055 return s 5056} 5057 5058// SetType sets the Type field's value. 5059func (s *FindingSource) SetType(v string) *FindingSource { 5060 s.Type = &v 5061 return s 5062} 5063 5064// Includes details about how the access that generated the finding is granted. 5065// This is populated for Amazon S3 bucket findings. 5066type FindingSourceDetail struct { 5067 _ struct{} `type:"structure"` 5068 5069 // The ARN of the access point that generated the finding. 5070 AccessPointArn *string `locationName:"accessPointArn" type:"string"` 5071} 5072 5073// String returns the string representation 5074func (s FindingSourceDetail) String() string { 5075 return awsutil.Prettify(s) 5076} 5077 5078// GoString returns the string representation 5079func (s FindingSourceDetail) GoString() string { 5080 return s.String() 5081} 5082 5083// SetAccessPointArn sets the AccessPointArn field's value. 5084func (s *FindingSourceDetail) SetAccessPointArn(v string) *FindingSourceDetail { 5085 s.AccessPointArn = &v 5086 return s 5087} 5088 5089// Contains information about a finding. 5090type FindingSummary struct { 5091 _ struct{} `type:"structure"` 5092 5093 // The action in the analyzed policy statement that an external principal has 5094 // permission to use. 5095 Action []*string `locationName:"action" type:"list"` 5096 5097 // The time at which the resource-based policy that generated the finding was 5098 // analyzed. 5099 // 5100 // AnalyzedAt is a required field 5101 AnalyzedAt *time.Time `locationName:"analyzedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 5102 5103 // The condition in the analyzed policy statement that resulted in a finding. 5104 // 5105 // Condition is a required field 5106 Condition map[string]*string `locationName:"condition" type:"map" required:"true"` 5107 5108 // The time at which the finding was created. 5109 // 5110 // CreatedAt is a required field 5111 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 5112 5113 // The error that resulted in an Error finding. 5114 Error *string `locationName:"error" type:"string"` 5115 5116 // The ID of the finding. 5117 // 5118 // Id is a required field 5119 Id *string `locationName:"id" type:"string" required:"true"` 5120 5121 // Indicates whether the finding reports a resource that has a policy that allows 5122 // public access. 5123 IsPublic *bool `locationName:"isPublic" type:"boolean"` 5124 5125 // The external principal that has access to a resource within the zone of trust. 5126 Principal map[string]*string `locationName:"principal" type:"map"` 5127 5128 // The resource that the external principal has access to. 5129 Resource *string `locationName:"resource" type:"string"` 5130 5131 // The AWS account ID that owns the resource. 5132 // 5133 // ResourceOwnerAccount is a required field 5134 ResourceOwnerAccount *string `locationName:"resourceOwnerAccount" type:"string" required:"true"` 5135 5136 // The type of the resource that the external principal has access to. 5137 // 5138 // ResourceType is a required field 5139 ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` 5140 5141 // The sources of the finding. This indicates how the access that generated 5142 // the finding is granted. It is populated for Amazon S3 bucket findings. 5143 Sources []*FindingSource `locationName:"sources" type:"list"` 5144 5145 // The status of the finding. 5146 // 5147 // Status is a required field 5148 Status *string `locationName:"status" type:"string" required:"true" enum:"FindingStatus"` 5149 5150 // The time at which the finding was most recently updated. 5151 // 5152 // UpdatedAt is a required field 5153 UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"iso8601" required:"true"` 5154} 5155 5156// String returns the string representation 5157func (s FindingSummary) String() string { 5158 return awsutil.Prettify(s) 5159} 5160 5161// GoString returns the string representation 5162func (s FindingSummary) GoString() string { 5163 return s.String() 5164} 5165 5166// SetAction sets the Action field's value. 5167func (s *FindingSummary) SetAction(v []*string) *FindingSummary { 5168 s.Action = v 5169 return s 5170} 5171 5172// SetAnalyzedAt sets the AnalyzedAt field's value. 5173func (s *FindingSummary) SetAnalyzedAt(v time.Time) *FindingSummary { 5174 s.AnalyzedAt = &v 5175 return s 5176} 5177 5178// SetCondition sets the Condition field's value. 5179func (s *FindingSummary) SetCondition(v map[string]*string) *FindingSummary { 5180 s.Condition = v 5181 return s 5182} 5183 5184// SetCreatedAt sets the CreatedAt field's value. 5185func (s *FindingSummary) SetCreatedAt(v time.Time) *FindingSummary { 5186 s.CreatedAt = &v 5187 return s 5188} 5189 5190// SetError sets the Error field's value. 5191func (s *FindingSummary) SetError(v string) *FindingSummary { 5192 s.Error = &v 5193 return s 5194} 5195 5196// SetId sets the Id field's value. 5197func (s *FindingSummary) SetId(v string) *FindingSummary { 5198 s.Id = &v 5199 return s 5200} 5201 5202// SetIsPublic sets the IsPublic field's value. 5203func (s *FindingSummary) SetIsPublic(v bool) *FindingSummary { 5204 s.IsPublic = &v 5205 return s 5206} 5207 5208// SetPrincipal sets the Principal field's value. 5209func (s *FindingSummary) SetPrincipal(v map[string]*string) *FindingSummary { 5210 s.Principal = v 5211 return s 5212} 5213 5214// SetResource sets the Resource field's value. 5215func (s *FindingSummary) SetResource(v string) *FindingSummary { 5216 s.Resource = &v 5217 return s 5218} 5219 5220// SetResourceOwnerAccount sets the ResourceOwnerAccount field's value. 5221func (s *FindingSummary) SetResourceOwnerAccount(v string) *FindingSummary { 5222 s.ResourceOwnerAccount = &v 5223 return s 5224} 5225 5226// SetResourceType sets the ResourceType field's value. 5227func (s *FindingSummary) SetResourceType(v string) *FindingSummary { 5228 s.ResourceType = &v 5229 return s 5230} 5231 5232// SetSources sets the Sources field's value. 5233func (s *FindingSummary) SetSources(v []*FindingSource) *FindingSummary { 5234 s.Sources = v 5235 return s 5236} 5237 5238// SetStatus sets the Status field's value. 5239func (s *FindingSummary) SetStatus(v string) *FindingSummary { 5240 s.Status = &v 5241 return s 5242} 5243 5244// SetUpdatedAt sets the UpdatedAt field's value. 5245func (s *FindingSummary) SetUpdatedAt(v time.Time) *FindingSummary { 5246 s.UpdatedAt = &v 5247 return s 5248} 5249 5250// Contains the text for the generated policy. 5251type GeneratedPolicy struct { 5252 _ struct{} `type:"structure"` 5253 5254 // The text to use as the content for the new policy. The policy is created 5255 // using the CreatePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html) 5256 // action. 5257 // 5258 // Policy is a required field 5259 Policy *string `locationName:"policy" type:"string" required:"true"` 5260} 5261 5262// String returns the string representation 5263func (s GeneratedPolicy) String() string { 5264 return awsutil.Prettify(s) 5265} 5266 5267// GoString returns the string representation 5268func (s GeneratedPolicy) GoString() string { 5269 return s.String() 5270} 5271 5272// SetPolicy sets the Policy field's value. 5273func (s *GeneratedPolicy) SetPolicy(v string) *GeneratedPolicy { 5274 s.Policy = &v 5275 return s 5276} 5277 5278// Contains the generated policy details. 5279type GeneratedPolicyProperties struct { 5280 _ struct{} `type:"structure"` 5281 5282 // Lists details about the Trail used to generated policy. 5283 CloudTrailProperties *CloudTrailProperties `locationName:"cloudTrailProperties" type:"structure"` 5284 5285 // This value is set to true if the generated policy contains all possible actions 5286 // for a service that Access Analyzer identified from the CloudTrail trail that 5287 // you specified, and false otherwise. 5288 IsComplete *bool `locationName:"isComplete" type:"boolean"` 5289 5290 // The ARN of the IAM entity (user or role) for which you are generating a policy. 5291 // 5292 // PrincipalArn is a required field 5293 PrincipalArn *string `locationName:"principalArn" type:"string" required:"true"` 5294} 5295 5296// String returns the string representation 5297func (s GeneratedPolicyProperties) String() string { 5298 return awsutil.Prettify(s) 5299} 5300 5301// GoString returns the string representation 5302func (s GeneratedPolicyProperties) GoString() string { 5303 return s.String() 5304} 5305 5306// SetCloudTrailProperties sets the CloudTrailProperties field's value. 5307func (s *GeneratedPolicyProperties) SetCloudTrailProperties(v *CloudTrailProperties) *GeneratedPolicyProperties { 5308 s.CloudTrailProperties = v 5309 return s 5310} 5311 5312// SetIsComplete sets the IsComplete field's value. 5313func (s *GeneratedPolicyProperties) SetIsComplete(v bool) *GeneratedPolicyProperties { 5314 s.IsComplete = &v 5315 return s 5316} 5317 5318// SetPrincipalArn sets the PrincipalArn field's value. 5319func (s *GeneratedPolicyProperties) SetPrincipalArn(v string) *GeneratedPolicyProperties { 5320 s.PrincipalArn = &v 5321 return s 5322} 5323 5324// Contains the text for the generated policy and its details. 5325type GeneratedPolicyResult struct { 5326 _ struct{} `type:"structure"` 5327 5328 // The text to use as the content for the new policy. The policy is created 5329 // using the CreatePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html) 5330 // action. 5331 GeneratedPolicies []*GeneratedPolicy `locationName:"generatedPolicies" type:"list"` 5332 5333 // A GeneratedPolicyProperties object that contains properties of the generated 5334 // policy. 5335 // 5336 // Properties is a required field 5337 Properties *GeneratedPolicyProperties `locationName:"properties" type:"structure" required:"true"` 5338} 5339 5340// String returns the string representation 5341func (s GeneratedPolicyResult) String() string { 5342 return awsutil.Prettify(s) 5343} 5344 5345// GoString returns the string representation 5346func (s GeneratedPolicyResult) GoString() string { 5347 return s.String() 5348} 5349 5350// SetGeneratedPolicies sets the GeneratedPolicies field's value. 5351func (s *GeneratedPolicyResult) SetGeneratedPolicies(v []*GeneratedPolicy) *GeneratedPolicyResult { 5352 s.GeneratedPolicies = v 5353 return s 5354} 5355 5356// SetProperties sets the Properties field's value. 5357func (s *GeneratedPolicyResult) SetProperties(v *GeneratedPolicyProperties) *GeneratedPolicyResult { 5358 s.Properties = v 5359 return s 5360} 5361 5362type GetAccessPreviewInput struct { 5363 _ struct{} `type:"structure"` 5364 5365 // The unique ID for the access preview. 5366 // 5367 // AccessPreviewId is a required field 5368 AccessPreviewId *string `location:"uri" locationName:"accessPreviewId" type:"string" required:"true"` 5369 5370 // The ARN of the analyzer (https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources) 5371 // used to generate the access preview. 5372 // 5373 // AnalyzerArn is a required field 5374 AnalyzerArn *string `location:"querystring" locationName:"analyzerArn" type:"string" required:"true"` 5375} 5376 5377// String returns the string representation 5378func (s GetAccessPreviewInput) String() string { 5379 return awsutil.Prettify(s) 5380} 5381 5382// GoString returns the string representation 5383func (s GetAccessPreviewInput) GoString() string { 5384 return s.String() 5385} 5386 5387// Validate inspects the fields of the type to determine if they are valid. 5388func (s *GetAccessPreviewInput) Validate() error { 5389 invalidParams := request.ErrInvalidParams{Context: "GetAccessPreviewInput"} 5390 if s.AccessPreviewId == nil { 5391 invalidParams.Add(request.NewErrParamRequired("AccessPreviewId")) 5392 } 5393 if s.AccessPreviewId != nil && len(*s.AccessPreviewId) < 1 { 5394 invalidParams.Add(request.NewErrParamMinLen("AccessPreviewId", 1)) 5395 } 5396 if s.AnalyzerArn == nil { 5397 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 5398 } 5399 5400 if invalidParams.Len() > 0 { 5401 return invalidParams 5402 } 5403 return nil 5404} 5405 5406// SetAccessPreviewId sets the AccessPreviewId field's value. 5407func (s *GetAccessPreviewInput) SetAccessPreviewId(v string) *GetAccessPreviewInput { 5408 s.AccessPreviewId = &v 5409 return s 5410} 5411 5412// SetAnalyzerArn sets the AnalyzerArn field's value. 5413func (s *GetAccessPreviewInput) SetAnalyzerArn(v string) *GetAccessPreviewInput { 5414 s.AnalyzerArn = &v 5415 return s 5416} 5417 5418type GetAccessPreviewOutput struct { 5419 _ struct{} `type:"structure"` 5420 5421 // An object that contains information about the access preview. 5422 // 5423 // AccessPreview is a required field 5424 AccessPreview *AccessPreview `locationName:"accessPreview" type:"structure" required:"true"` 5425} 5426 5427// String returns the string representation 5428func (s GetAccessPreviewOutput) String() string { 5429 return awsutil.Prettify(s) 5430} 5431 5432// GoString returns the string representation 5433func (s GetAccessPreviewOutput) GoString() string { 5434 return s.String() 5435} 5436 5437// SetAccessPreview sets the AccessPreview field's value. 5438func (s *GetAccessPreviewOutput) SetAccessPreview(v *AccessPreview) *GetAccessPreviewOutput { 5439 s.AccessPreview = v 5440 return s 5441} 5442 5443// Retrieves an analyzed resource. 5444type GetAnalyzedResourceInput struct { 5445 _ struct{} `type:"structure"` 5446 5447 // The ARN of the analyzer (https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources) 5448 // to retrieve information from. 5449 // 5450 // AnalyzerArn is a required field 5451 AnalyzerArn *string `location:"querystring" locationName:"analyzerArn" type:"string" required:"true"` 5452 5453 // The ARN of the resource to retrieve information about. 5454 // 5455 // ResourceArn is a required field 5456 ResourceArn *string `location:"querystring" locationName:"resourceArn" type:"string" required:"true"` 5457} 5458 5459// String returns the string representation 5460func (s GetAnalyzedResourceInput) String() string { 5461 return awsutil.Prettify(s) 5462} 5463 5464// GoString returns the string representation 5465func (s GetAnalyzedResourceInput) GoString() string { 5466 return s.String() 5467} 5468 5469// Validate inspects the fields of the type to determine if they are valid. 5470func (s *GetAnalyzedResourceInput) Validate() error { 5471 invalidParams := request.ErrInvalidParams{Context: "GetAnalyzedResourceInput"} 5472 if s.AnalyzerArn == nil { 5473 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 5474 } 5475 if s.ResourceArn == nil { 5476 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 5477 } 5478 5479 if invalidParams.Len() > 0 { 5480 return invalidParams 5481 } 5482 return nil 5483} 5484 5485// SetAnalyzerArn sets the AnalyzerArn field's value. 5486func (s *GetAnalyzedResourceInput) SetAnalyzerArn(v string) *GetAnalyzedResourceInput { 5487 s.AnalyzerArn = &v 5488 return s 5489} 5490 5491// SetResourceArn sets the ResourceArn field's value. 5492func (s *GetAnalyzedResourceInput) SetResourceArn(v string) *GetAnalyzedResourceInput { 5493 s.ResourceArn = &v 5494 return s 5495} 5496 5497// The response to the request. 5498type GetAnalyzedResourceOutput struct { 5499 _ struct{} `type:"structure"` 5500 5501 // An AnalyzedResource object that contains information that Access Analyzer 5502 // found when it analyzed the resource. 5503 Resource *AnalyzedResource `locationName:"resource" type:"structure"` 5504} 5505 5506// String returns the string representation 5507func (s GetAnalyzedResourceOutput) String() string { 5508 return awsutil.Prettify(s) 5509} 5510 5511// GoString returns the string representation 5512func (s GetAnalyzedResourceOutput) GoString() string { 5513 return s.String() 5514} 5515 5516// SetResource sets the Resource field's value. 5517func (s *GetAnalyzedResourceOutput) SetResource(v *AnalyzedResource) *GetAnalyzedResourceOutput { 5518 s.Resource = v 5519 return s 5520} 5521 5522// Retrieves an analyzer. 5523type GetAnalyzerInput struct { 5524 _ struct{} `type:"structure"` 5525 5526 // The name of the analyzer retrieved. 5527 // 5528 // AnalyzerName is a required field 5529 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 5530} 5531 5532// String returns the string representation 5533func (s GetAnalyzerInput) String() string { 5534 return awsutil.Prettify(s) 5535} 5536 5537// GoString returns the string representation 5538func (s GetAnalyzerInput) GoString() string { 5539 return s.String() 5540} 5541 5542// Validate inspects the fields of the type to determine if they are valid. 5543func (s *GetAnalyzerInput) Validate() error { 5544 invalidParams := request.ErrInvalidParams{Context: "GetAnalyzerInput"} 5545 if s.AnalyzerName == nil { 5546 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 5547 } 5548 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 5549 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 5550 } 5551 5552 if invalidParams.Len() > 0 { 5553 return invalidParams 5554 } 5555 return nil 5556} 5557 5558// SetAnalyzerName sets the AnalyzerName field's value. 5559func (s *GetAnalyzerInput) SetAnalyzerName(v string) *GetAnalyzerInput { 5560 s.AnalyzerName = &v 5561 return s 5562} 5563 5564// The response to the request. 5565type GetAnalyzerOutput struct { 5566 _ struct{} `type:"structure"` 5567 5568 // An AnalyzerSummary object that contains information about the analyzer. 5569 // 5570 // Analyzer is a required field 5571 Analyzer *AnalyzerSummary `locationName:"analyzer" type:"structure" required:"true"` 5572} 5573 5574// String returns the string representation 5575func (s GetAnalyzerOutput) String() string { 5576 return awsutil.Prettify(s) 5577} 5578 5579// GoString returns the string representation 5580func (s GetAnalyzerOutput) GoString() string { 5581 return s.String() 5582} 5583 5584// SetAnalyzer sets the Analyzer field's value. 5585func (s *GetAnalyzerOutput) SetAnalyzer(v *AnalyzerSummary) *GetAnalyzerOutput { 5586 s.Analyzer = v 5587 return s 5588} 5589 5590// Retrieves an archive rule. 5591type GetArchiveRuleInput struct { 5592 _ struct{} `type:"structure"` 5593 5594 // The name of the analyzer to retrieve rules from. 5595 // 5596 // AnalyzerName is a required field 5597 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 5598 5599 // The name of the rule to retrieve. 5600 // 5601 // RuleName is a required field 5602 RuleName *string `location:"uri" locationName:"ruleName" min:"1" type:"string" required:"true"` 5603} 5604 5605// String returns the string representation 5606func (s GetArchiveRuleInput) String() string { 5607 return awsutil.Prettify(s) 5608} 5609 5610// GoString returns the string representation 5611func (s GetArchiveRuleInput) GoString() string { 5612 return s.String() 5613} 5614 5615// Validate inspects the fields of the type to determine if they are valid. 5616func (s *GetArchiveRuleInput) Validate() error { 5617 invalidParams := request.ErrInvalidParams{Context: "GetArchiveRuleInput"} 5618 if s.AnalyzerName == nil { 5619 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 5620 } 5621 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 5622 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 5623 } 5624 if s.RuleName == nil { 5625 invalidParams.Add(request.NewErrParamRequired("RuleName")) 5626 } 5627 if s.RuleName != nil && len(*s.RuleName) < 1 { 5628 invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) 5629 } 5630 5631 if invalidParams.Len() > 0 { 5632 return invalidParams 5633 } 5634 return nil 5635} 5636 5637// SetAnalyzerName sets the AnalyzerName field's value. 5638func (s *GetArchiveRuleInput) SetAnalyzerName(v string) *GetArchiveRuleInput { 5639 s.AnalyzerName = &v 5640 return s 5641} 5642 5643// SetRuleName sets the RuleName field's value. 5644func (s *GetArchiveRuleInput) SetRuleName(v string) *GetArchiveRuleInput { 5645 s.RuleName = &v 5646 return s 5647} 5648 5649// The response to the request. 5650type GetArchiveRuleOutput struct { 5651 _ struct{} `type:"structure"` 5652 5653 // Contains information about an archive rule. 5654 // 5655 // ArchiveRule is a required field 5656 ArchiveRule *ArchiveRuleSummary `locationName:"archiveRule" type:"structure" required:"true"` 5657} 5658 5659// String returns the string representation 5660func (s GetArchiveRuleOutput) String() string { 5661 return awsutil.Prettify(s) 5662} 5663 5664// GoString returns the string representation 5665func (s GetArchiveRuleOutput) GoString() string { 5666 return s.String() 5667} 5668 5669// SetArchiveRule sets the ArchiveRule field's value. 5670func (s *GetArchiveRuleOutput) SetArchiveRule(v *ArchiveRuleSummary) *GetArchiveRuleOutput { 5671 s.ArchiveRule = v 5672 return s 5673} 5674 5675// Retrieves a finding. 5676type GetFindingInput struct { 5677 _ struct{} `type:"structure"` 5678 5679 // The ARN of the analyzer (https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources) 5680 // that generated the finding. 5681 // 5682 // AnalyzerArn is a required field 5683 AnalyzerArn *string `location:"querystring" locationName:"analyzerArn" type:"string" required:"true"` 5684 5685 // The ID of the finding to retrieve. 5686 // 5687 // Id is a required field 5688 Id *string `location:"uri" locationName:"id" type:"string" required:"true"` 5689} 5690 5691// String returns the string representation 5692func (s GetFindingInput) String() string { 5693 return awsutil.Prettify(s) 5694} 5695 5696// GoString returns the string representation 5697func (s GetFindingInput) GoString() string { 5698 return s.String() 5699} 5700 5701// Validate inspects the fields of the type to determine if they are valid. 5702func (s *GetFindingInput) Validate() error { 5703 invalidParams := request.ErrInvalidParams{Context: "GetFindingInput"} 5704 if s.AnalyzerArn == nil { 5705 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 5706 } 5707 if s.Id == nil { 5708 invalidParams.Add(request.NewErrParamRequired("Id")) 5709 } 5710 if s.Id != nil && len(*s.Id) < 1 { 5711 invalidParams.Add(request.NewErrParamMinLen("Id", 1)) 5712 } 5713 5714 if invalidParams.Len() > 0 { 5715 return invalidParams 5716 } 5717 return nil 5718} 5719 5720// SetAnalyzerArn sets the AnalyzerArn field's value. 5721func (s *GetFindingInput) SetAnalyzerArn(v string) *GetFindingInput { 5722 s.AnalyzerArn = &v 5723 return s 5724} 5725 5726// SetId sets the Id field's value. 5727func (s *GetFindingInput) SetId(v string) *GetFindingInput { 5728 s.Id = &v 5729 return s 5730} 5731 5732// The response to the request. 5733type GetFindingOutput struct { 5734 _ struct{} `type:"structure"` 5735 5736 // A finding object that contains finding details. 5737 Finding *Finding `locationName:"finding" type:"structure"` 5738} 5739 5740// String returns the string representation 5741func (s GetFindingOutput) String() string { 5742 return awsutil.Prettify(s) 5743} 5744 5745// GoString returns the string representation 5746func (s GetFindingOutput) GoString() string { 5747 return s.String() 5748} 5749 5750// SetFinding sets the Finding field's value. 5751func (s *GetFindingOutput) SetFinding(v *Finding) *GetFindingOutput { 5752 s.Finding = v 5753 return s 5754} 5755 5756type GetGeneratedPolicyInput struct { 5757 _ struct{} `type:"structure"` 5758 5759 // The level of detail that you want to generate. You can specify whether to 5760 // generate policies with placeholders for resource ARNs for actions that support 5761 // resource level granularity in policies. 5762 // 5763 // For example, in the resource section of a policy, you can receive a placeholder 5764 // such as "Resource":"arn:aws:s3:::${BucketName}" instead of "*". 5765 IncludeResourcePlaceholders *bool `location:"querystring" locationName:"includeResourcePlaceholders" type:"boolean"` 5766 5767 // The level of detail that you want to generate. You can specify whether to 5768 // generate service-level policies. 5769 // 5770 // Access Analyzer uses iam:servicelastaccessed to identify services that have 5771 // been used recently to create this service-level template. 5772 IncludeServiceLevelTemplate *bool `location:"querystring" locationName:"includeServiceLevelTemplate" type:"boolean"` 5773 5774 // The JobId that is returned by the StartPolicyGeneration operation. The JobId 5775 // can be used with GetGeneratedPolicy to retrieve the generated policies or 5776 // used with CancelPolicyGeneration to cancel the policy generation request. 5777 // 5778 // JobId is a required field 5779 JobId *string `location:"uri" locationName:"jobId" type:"string" required:"true"` 5780} 5781 5782// String returns the string representation 5783func (s GetGeneratedPolicyInput) String() string { 5784 return awsutil.Prettify(s) 5785} 5786 5787// GoString returns the string representation 5788func (s GetGeneratedPolicyInput) GoString() string { 5789 return s.String() 5790} 5791 5792// Validate inspects the fields of the type to determine if they are valid. 5793func (s *GetGeneratedPolicyInput) Validate() error { 5794 invalidParams := request.ErrInvalidParams{Context: "GetGeneratedPolicyInput"} 5795 if s.JobId == nil { 5796 invalidParams.Add(request.NewErrParamRequired("JobId")) 5797 } 5798 if s.JobId != nil && len(*s.JobId) < 1 { 5799 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 5800 } 5801 5802 if invalidParams.Len() > 0 { 5803 return invalidParams 5804 } 5805 return nil 5806} 5807 5808// SetIncludeResourcePlaceholders sets the IncludeResourcePlaceholders field's value. 5809func (s *GetGeneratedPolicyInput) SetIncludeResourcePlaceholders(v bool) *GetGeneratedPolicyInput { 5810 s.IncludeResourcePlaceholders = &v 5811 return s 5812} 5813 5814// SetIncludeServiceLevelTemplate sets the IncludeServiceLevelTemplate field's value. 5815func (s *GetGeneratedPolicyInput) SetIncludeServiceLevelTemplate(v bool) *GetGeneratedPolicyInput { 5816 s.IncludeServiceLevelTemplate = &v 5817 return s 5818} 5819 5820// SetJobId sets the JobId field's value. 5821func (s *GetGeneratedPolicyInput) SetJobId(v string) *GetGeneratedPolicyInput { 5822 s.JobId = &v 5823 return s 5824} 5825 5826type GetGeneratedPolicyOutput struct { 5827 _ struct{} `type:"structure"` 5828 5829 // A GeneratedPolicyResult object that contains the generated policies and associated 5830 // details. 5831 // 5832 // GeneratedPolicyResult is a required field 5833 GeneratedPolicyResult *GeneratedPolicyResult `locationName:"generatedPolicyResult" type:"structure" required:"true"` 5834 5835 // A GeneratedPolicyDetails object that contains details about the generated 5836 // policy. 5837 // 5838 // JobDetails is a required field 5839 JobDetails *JobDetails `locationName:"jobDetails" type:"structure" required:"true"` 5840} 5841 5842// String returns the string representation 5843func (s GetGeneratedPolicyOutput) String() string { 5844 return awsutil.Prettify(s) 5845} 5846 5847// GoString returns the string representation 5848func (s GetGeneratedPolicyOutput) GoString() string { 5849 return s.String() 5850} 5851 5852// SetGeneratedPolicyResult sets the GeneratedPolicyResult field's value. 5853func (s *GetGeneratedPolicyOutput) SetGeneratedPolicyResult(v *GeneratedPolicyResult) *GetGeneratedPolicyOutput { 5854 s.GeneratedPolicyResult = v 5855 return s 5856} 5857 5858// SetJobDetails sets the JobDetails field's value. 5859func (s *GetGeneratedPolicyOutput) SetJobDetails(v *JobDetails) *GetGeneratedPolicyOutput { 5860 s.JobDetails = v 5861 return s 5862} 5863 5864// The proposed access control configuration for an IAM role. You can propose 5865// a configuration for a new IAM role or an existing IAM role that you own by 5866// specifying the trust policy. If the configuration is for a new IAM role, 5867// you must specify the trust policy. If the configuration is for an existing 5868// IAM role that you own and you do not propose the trust policy, the access 5869// preview uses the existing trust policy for the role. The proposed trust policy 5870// cannot be an empty string. For more information about role trust policy limits, 5871// see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html). 5872type IamRoleConfiguration struct { 5873 _ struct{} `type:"structure"` 5874 5875 // The proposed trust policy for the IAM role. 5876 TrustPolicy *string `locationName:"trustPolicy" type:"string"` 5877} 5878 5879// String returns the string representation 5880func (s IamRoleConfiguration) String() string { 5881 return awsutil.Prettify(s) 5882} 5883 5884// GoString returns the string representation 5885func (s IamRoleConfiguration) GoString() string { 5886 return s.String() 5887} 5888 5889// SetTrustPolicy sets the TrustPolicy field's value. 5890func (s *IamRoleConfiguration) SetTrustPolicy(v string) *IamRoleConfiguration { 5891 s.TrustPolicy = &v 5892 return s 5893} 5894 5895// An criterion statement in an archive rule. Each archive rule may have multiple 5896// criteria. 5897type InlineArchiveRule struct { 5898 _ struct{} `type:"structure"` 5899 5900 // The condition and values for a criterion. 5901 // 5902 // Filter is a required field 5903 Filter map[string]*Criterion `locationName:"filter" type:"map" required:"true"` 5904 5905 // The name of the rule. 5906 // 5907 // RuleName is a required field 5908 RuleName *string `locationName:"ruleName" min:"1" type:"string" required:"true"` 5909} 5910 5911// String returns the string representation 5912func (s InlineArchiveRule) String() string { 5913 return awsutil.Prettify(s) 5914} 5915 5916// GoString returns the string representation 5917func (s InlineArchiveRule) GoString() string { 5918 return s.String() 5919} 5920 5921// Validate inspects the fields of the type to determine if they are valid. 5922func (s *InlineArchiveRule) Validate() error { 5923 invalidParams := request.ErrInvalidParams{Context: "InlineArchiveRule"} 5924 if s.Filter == nil { 5925 invalidParams.Add(request.NewErrParamRequired("Filter")) 5926 } 5927 if s.RuleName == nil { 5928 invalidParams.Add(request.NewErrParamRequired("RuleName")) 5929 } 5930 if s.RuleName != nil && len(*s.RuleName) < 1 { 5931 invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) 5932 } 5933 if s.Filter != nil { 5934 for i, v := range s.Filter { 5935 if v == nil { 5936 continue 5937 } 5938 if err := v.Validate(); err != nil { 5939 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filter", i), err.(request.ErrInvalidParams)) 5940 } 5941 } 5942 } 5943 5944 if invalidParams.Len() > 0 { 5945 return invalidParams 5946 } 5947 return nil 5948} 5949 5950// SetFilter sets the Filter field's value. 5951func (s *InlineArchiveRule) SetFilter(v map[string]*Criterion) *InlineArchiveRule { 5952 s.Filter = v 5953 return s 5954} 5955 5956// SetRuleName sets the RuleName field's value. 5957func (s *InlineArchiveRule) SetRuleName(v string) *InlineArchiveRule { 5958 s.RuleName = &v 5959 return s 5960} 5961 5962// Internal server error. 5963type InternalServerException struct { 5964 _ struct{} `type:"structure"` 5965 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 5966 5967 Message_ *string `locationName:"message" type:"string"` 5968 5969 // The seconds to wait to retry. 5970 RetryAfterSeconds *int64 `location:"header" locationName:"Retry-After" type:"integer"` 5971} 5972 5973// String returns the string representation 5974func (s InternalServerException) String() string { 5975 return awsutil.Prettify(s) 5976} 5977 5978// GoString returns the string representation 5979func (s InternalServerException) GoString() string { 5980 return s.String() 5981} 5982 5983func newErrorInternalServerException(v protocol.ResponseMetadata) error { 5984 return &InternalServerException{ 5985 RespMetadata: v, 5986 } 5987} 5988 5989// Code returns the exception type name. 5990func (s *InternalServerException) Code() string { 5991 return "InternalServerException" 5992} 5993 5994// Message returns the exception's message. 5995func (s *InternalServerException) Message() string { 5996 if s.Message_ != nil { 5997 return *s.Message_ 5998 } 5999 return "" 6000} 6001 6002// OrigErr always returns nil, satisfies awserr.Error interface. 6003func (s *InternalServerException) OrigErr() error { 6004 return nil 6005} 6006 6007func (s *InternalServerException) Error() string { 6008 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 6009} 6010 6011// Status code returns the HTTP status code for the request's response error. 6012func (s *InternalServerException) StatusCode() int { 6013 return s.RespMetadata.StatusCode 6014} 6015 6016// RequestID returns the service's response RequestID for request. 6017func (s *InternalServerException) RequestID() string { 6018 return s.RespMetadata.RequestID 6019} 6020 6021// This configuration sets the Amazon S3 access point network origin to Internet. 6022type InternetConfiguration struct { 6023 _ struct{} `type:"structure"` 6024} 6025 6026// String returns the string representation 6027func (s InternetConfiguration) String() string { 6028 return awsutil.Prettify(s) 6029} 6030 6031// GoString returns the string representation 6032func (s InternetConfiguration) GoString() string { 6033 return s.String() 6034} 6035 6036// Contains details about the policy generation request. 6037type JobDetails struct { 6038 _ struct{} `type:"structure"` 6039 6040 // A timestamp of when the job was completed. 6041 CompletedOn *time.Time `locationName:"completedOn" type:"timestamp" timestampFormat:"iso8601"` 6042 6043 // Contains the details about the policy generation error. 6044 JobError *JobError `locationName:"jobError" type:"structure"` 6045 6046 // The JobId that is returned by the StartPolicyGeneration operation. The JobId 6047 // can be used with GetGeneratedPolicy to retrieve the generated policies or 6048 // used with CancelPolicyGeneration to cancel the policy generation request. 6049 // 6050 // JobId is a required field 6051 JobId *string `locationName:"jobId" type:"string" required:"true"` 6052 6053 // A timestamp of when the job was started. 6054 // 6055 // StartedOn is a required field 6056 StartedOn *time.Time `locationName:"startedOn" type:"timestamp" timestampFormat:"iso8601" required:"true"` 6057 6058 // The status of the job request. 6059 // 6060 // Status is a required field 6061 Status *string `locationName:"status" type:"string" required:"true" enum:"JobStatus"` 6062} 6063 6064// String returns the string representation 6065func (s JobDetails) String() string { 6066 return awsutil.Prettify(s) 6067} 6068 6069// GoString returns the string representation 6070func (s JobDetails) GoString() string { 6071 return s.String() 6072} 6073 6074// SetCompletedOn sets the CompletedOn field's value. 6075func (s *JobDetails) SetCompletedOn(v time.Time) *JobDetails { 6076 s.CompletedOn = &v 6077 return s 6078} 6079 6080// SetJobError sets the JobError field's value. 6081func (s *JobDetails) SetJobError(v *JobError) *JobDetails { 6082 s.JobError = v 6083 return s 6084} 6085 6086// SetJobId sets the JobId field's value. 6087func (s *JobDetails) SetJobId(v string) *JobDetails { 6088 s.JobId = &v 6089 return s 6090} 6091 6092// SetStartedOn sets the StartedOn field's value. 6093func (s *JobDetails) SetStartedOn(v time.Time) *JobDetails { 6094 s.StartedOn = &v 6095 return s 6096} 6097 6098// SetStatus sets the Status field's value. 6099func (s *JobDetails) SetStatus(v string) *JobDetails { 6100 s.Status = &v 6101 return s 6102} 6103 6104// Contains the details about the policy generation error. 6105type JobError struct { 6106 _ struct{} `type:"structure"` 6107 6108 // The job error code. 6109 // 6110 // Code is a required field 6111 Code *string `locationName:"code" type:"string" required:"true" enum:"JobErrorCode"` 6112 6113 // Specific information about the error. For example, which service quota was 6114 // exceeded or which resource was not found. 6115 // 6116 // Message is a required field 6117 Message *string `locationName:"message" type:"string" required:"true"` 6118} 6119 6120// String returns the string representation 6121func (s JobError) String() string { 6122 return awsutil.Prettify(s) 6123} 6124 6125// GoString returns the string representation 6126func (s JobError) GoString() string { 6127 return s.String() 6128} 6129 6130// SetCode sets the Code field's value. 6131func (s *JobError) SetCode(v string) *JobError { 6132 s.Code = &v 6133 return s 6134} 6135 6136// SetMessage sets the Message field's value. 6137func (s *JobError) SetMessage(v string) *JobError { 6138 s.Message = &v 6139 return s 6140} 6141 6142// A proposed grant configuration for a KMS key. For more information, see CreateGrant 6143// (https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateGrant.html). 6144type KmsGrantConfiguration struct { 6145 _ struct{} `type:"structure"` 6146 6147 // Use this structure to propose allowing cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) 6148 // in the grant only when the operation request includes the specified encryption 6149 // context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context). 6150 Constraints *KmsGrantConstraints `locationName:"constraints" type:"structure"` 6151 6152 // The principal that is given permission to perform the operations that the 6153 // grant permits. 6154 // 6155 // GranteePrincipal is a required field 6156 GranteePrincipal *string `locationName:"granteePrincipal" type:"string" required:"true"` 6157 6158 // The AWS account under which the grant was issued. The account is used to 6159 // propose KMS grants issued by accounts other than the owner of the key. 6160 // 6161 // IssuingAccount is a required field 6162 IssuingAccount *string `locationName:"issuingAccount" type:"string" required:"true"` 6163 6164 // A list of operations that the grant permits. 6165 // 6166 // Operations is a required field 6167 Operations []*string `locationName:"operations" type:"list" required:"true"` 6168 6169 // The principal that is given permission to retire the grant by using RetireGrant 6170 // (https://docs.aws.amazon.com/kms/latest/APIReference/API_RetireGrant.html) 6171 // operation. 6172 RetiringPrincipal *string `locationName:"retiringPrincipal" type:"string"` 6173} 6174 6175// String returns the string representation 6176func (s KmsGrantConfiguration) String() string { 6177 return awsutil.Prettify(s) 6178} 6179 6180// GoString returns the string representation 6181func (s KmsGrantConfiguration) GoString() string { 6182 return s.String() 6183} 6184 6185// Validate inspects the fields of the type to determine if they are valid. 6186func (s *KmsGrantConfiguration) Validate() error { 6187 invalidParams := request.ErrInvalidParams{Context: "KmsGrantConfiguration"} 6188 if s.GranteePrincipal == nil { 6189 invalidParams.Add(request.NewErrParamRequired("GranteePrincipal")) 6190 } 6191 if s.IssuingAccount == nil { 6192 invalidParams.Add(request.NewErrParamRequired("IssuingAccount")) 6193 } 6194 if s.Operations == nil { 6195 invalidParams.Add(request.NewErrParamRequired("Operations")) 6196 } 6197 6198 if invalidParams.Len() > 0 { 6199 return invalidParams 6200 } 6201 return nil 6202} 6203 6204// SetConstraints sets the Constraints field's value. 6205func (s *KmsGrantConfiguration) SetConstraints(v *KmsGrantConstraints) *KmsGrantConfiguration { 6206 s.Constraints = v 6207 return s 6208} 6209 6210// SetGranteePrincipal sets the GranteePrincipal field's value. 6211func (s *KmsGrantConfiguration) SetGranteePrincipal(v string) *KmsGrantConfiguration { 6212 s.GranteePrincipal = &v 6213 return s 6214} 6215 6216// SetIssuingAccount sets the IssuingAccount field's value. 6217func (s *KmsGrantConfiguration) SetIssuingAccount(v string) *KmsGrantConfiguration { 6218 s.IssuingAccount = &v 6219 return s 6220} 6221 6222// SetOperations sets the Operations field's value. 6223func (s *KmsGrantConfiguration) SetOperations(v []*string) *KmsGrantConfiguration { 6224 s.Operations = v 6225 return s 6226} 6227 6228// SetRetiringPrincipal sets the RetiringPrincipal field's value. 6229func (s *KmsGrantConfiguration) SetRetiringPrincipal(v string) *KmsGrantConfiguration { 6230 s.RetiringPrincipal = &v 6231 return s 6232} 6233 6234// Use this structure to propose allowing cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) 6235// in the grant only when the operation request includes the specified encryption 6236// context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context). 6237// You can specify only one type of encryption context. An empty map is treated 6238// as not specified. For more information, see GrantConstraints (https://docs.aws.amazon.com/kms/latest/APIReference/API_GrantConstraints.html). 6239type KmsGrantConstraints struct { 6240 _ struct{} `type:"structure"` 6241 6242 // A list of key-value pairs that must match the encryption context in the cryptographic 6243 // operation (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) 6244 // request. The grant allows the operation only when the encryption context 6245 // in the request is the same as the encryption context specified in this constraint. 6246 EncryptionContextEquals map[string]*string `locationName:"encryptionContextEquals" type:"map"` 6247 6248 // A list of key-value pairs that must be included in the encryption context 6249 // of the cryptographic operation (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) 6250 // request. The grant allows the cryptographic operation only when the encryption 6251 // context in the request includes the key-value pairs specified in this constraint, 6252 // although it can include additional key-value pairs. 6253 EncryptionContextSubset map[string]*string `locationName:"encryptionContextSubset" type:"map"` 6254} 6255 6256// String returns the string representation 6257func (s KmsGrantConstraints) String() string { 6258 return awsutil.Prettify(s) 6259} 6260 6261// GoString returns the string representation 6262func (s KmsGrantConstraints) GoString() string { 6263 return s.String() 6264} 6265 6266// SetEncryptionContextEquals sets the EncryptionContextEquals field's value. 6267func (s *KmsGrantConstraints) SetEncryptionContextEquals(v map[string]*string) *KmsGrantConstraints { 6268 s.EncryptionContextEquals = v 6269 return s 6270} 6271 6272// SetEncryptionContextSubset sets the EncryptionContextSubset field's value. 6273func (s *KmsGrantConstraints) SetEncryptionContextSubset(v map[string]*string) *KmsGrantConstraints { 6274 s.EncryptionContextSubset = v 6275 return s 6276} 6277 6278// Proposed access control configuration for a KMS key. You can propose a configuration 6279// for a new KMS key or an existing KMS key that you own by specifying the key 6280// policy and KMS grant configuration. If the configuration is for an existing 6281// key and you do not specify the key policy, the access preview uses the existing 6282// policy for the key. If the access preview is for a new resource and you do 6283// not specify the key policy, then the access preview uses the default key 6284// policy. The proposed key policy cannot be an empty string. For more information, 6285// see Default key policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default). 6286// For more information about key policy limits, see Resource quotas (https://docs.aws.amazon.com/kms/latest/developerguide/resource-limits.html). 6287type KmsKeyConfiguration struct { 6288 _ struct{} `type:"structure"` 6289 6290 // A list of proposed grant configurations for the KMS key. If the proposed 6291 // grant configuration is for an existing key, the access preview uses the proposed 6292 // list of grant configurations in place of the existing grants. Otherwise, 6293 // the access preview uses the existing grants for the key. 6294 Grants []*KmsGrantConfiguration `locationName:"grants" type:"list"` 6295 6296 // Resource policy configuration for the KMS key. The only valid value for the 6297 // name of the key policy is default. For more information, see Default key 6298 // policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default). 6299 KeyPolicies map[string]*string `locationName:"keyPolicies" type:"map"` 6300} 6301 6302// String returns the string representation 6303func (s KmsKeyConfiguration) String() string { 6304 return awsutil.Prettify(s) 6305} 6306 6307// GoString returns the string representation 6308func (s KmsKeyConfiguration) GoString() string { 6309 return s.String() 6310} 6311 6312// Validate inspects the fields of the type to determine if they are valid. 6313func (s *KmsKeyConfiguration) Validate() error { 6314 invalidParams := request.ErrInvalidParams{Context: "KmsKeyConfiguration"} 6315 if s.Grants != nil { 6316 for i, v := range s.Grants { 6317 if v == nil { 6318 continue 6319 } 6320 if err := v.Validate(); err != nil { 6321 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Grants", i), err.(request.ErrInvalidParams)) 6322 } 6323 } 6324 } 6325 6326 if invalidParams.Len() > 0 { 6327 return invalidParams 6328 } 6329 return nil 6330} 6331 6332// SetGrants sets the Grants field's value. 6333func (s *KmsKeyConfiguration) SetGrants(v []*KmsGrantConfiguration) *KmsKeyConfiguration { 6334 s.Grants = v 6335 return s 6336} 6337 6338// SetKeyPolicies sets the KeyPolicies field's value. 6339func (s *KmsKeyConfiguration) SetKeyPolicies(v map[string]*string) *KmsKeyConfiguration { 6340 s.KeyPolicies = v 6341 return s 6342} 6343 6344type ListAccessPreviewFindingsInput struct { 6345 _ struct{} `type:"structure"` 6346 6347 // The unique ID for the access preview. 6348 // 6349 // AccessPreviewId is a required field 6350 AccessPreviewId *string `location:"uri" locationName:"accessPreviewId" type:"string" required:"true"` 6351 6352 // The ARN of the analyzer (https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources) 6353 // used to generate the access. 6354 // 6355 // AnalyzerArn is a required field 6356 AnalyzerArn *string `locationName:"analyzerArn" type:"string" required:"true"` 6357 6358 // Criteria to filter the returned findings. 6359 Filter map[string]*Criterion `locationName:"filter" type:"map"` 6360 6361 // The maximum number of results to return in the response. 6362 MaxResults *int64 `locationName:"maxResults" type:"integer"` 6363 6364 // A token used for pagination of results returned. 6365 NextToken *string `locationName:"nextToken" type:"string"` 6366} 6367 6368// String returns the string representation 6369func (s ListAccessPreviewFindingsInput) String() string { 6370 return awsutil.Prettify(s) 6371} 6372 6373// GoString returns the string representation 6374func (s ListAccessPreviewFindingsInput) GoString() string { 6375 return s.String() 6376} 6377 6378// Validate inspects the fields of the type to determine if they are valid. 6379func (s *ListAccessPreviewFindingsInput) Validate() error { 6380 invalidParams := request.ErrInvalidParams{Context: "ListAccessPreviewFindingsInput"} 6381 if s.AccessPreviewId == nil { 6382 invalidParams.Add(request.NewErrParamRequired("AccessPreviewId")) 6383 } 6384 if s.AccessPreviewId != nil && len(*s.AccessPreviewId) < 1 { 6385 invalidParams.Add(request.NewErrParamMinLen("AccessPreviewId", 1)) 6386 } 6387 if s.AnalyzerArn == nil { 6388 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 6389 } 6390 if s.Filter != nil { 6391 for i, v := range s.Filter { 6392 if v == nil { 6393 continue 6394 } 6395 if err := v.Validate(); err != nil { 6396 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filter", i), err.(request.ErrInvalidParams)) 6397 } 6398 } 6399 } 6400 6401 if invalidParams.Len() > 0 { 6402 return invalidParams 6403 } 6404 return nil 6405} 6406 6407// SetAccessPreviewId sets the AccessPreviewId field's value. 6408func (s *ListAccessPreviewFindingsInput) SetAccessPreviewId(v string) *ListAccessPreviewFindingsInput { 6409 s.AccessPreviewId = &v 6410 return s 6411} 6412 6413// SetAnalyzerArn sets the AnalyzerArn field's value. 6414func (s *ListAccessPreviewFindingsInput) SetAnalyzerArn(v string) *ListAccessPreviewFindingsInput { 6415 s.AnalyzerArn = &v 6416 return s 6417} 6418 6419// SetFilter sets the Filter field's value. 6420func (s *ListAccessPreviewFindingsInput) SetFilter(v map[string]*Criterion) *ListAccessPreviewFindingsInput { 6421 s.Filter = v 6422 return s 6423} 6424 6425// SetMaxResults sets the MaxResults field's value. 6426func (s *ListAccessPreviewFindingsInput) SetMaxResults(v int64) *ListAccessPreviewFindingsInput { 6427 s.MaxResults = &v 6428 return s 6429} 6430 6431// SetNextToken sets the NextToken field's value. 6432func (s *ListAccessPreviewFindingsInput) SetNextToken(v string) *ListAccessPreviewFindingsInput { 6433 s.NextToken = &v 6434 return s 6435} 6436 6437type ListAccessPreviewFindingsOutput struct { 6438 _ struct{} `type:"structure"` 6439 6440 // A list of access preview findings that match the specified filter criteria. 6441 // 6442 // Findings is a required field 6443 Findings []*AccessPreviewFinding `locationName:"findings" type:"list" required:"true"` 6444 6445 // A token used for pagination of results returned. 6446 NextToken *string `locationName:"nextToken" type:"string"` 6447} 6448 6449// String returns the string representation 6450func (s ListAccessPreviewFindingsOutput) String() string { 6451 return awsutil.Prettify(s) 6452} 6453 6454// GoString returns the string representation 6455func (s ListAccessPreviewFindingsOutput) GoString() string { 6456 return s.String() 6457} 6458 6459// SetFindings sets the Findings field's value. 6460func (s *ListAccessPreviewFindingsOutput) SetFindings(v []*AccessPreviewFinding) *ListAccessPreviewFindingsOutput { 6461 s.Findings = v 6462 return s 6463} 6464 6465// SetNextToken sets the NextToken field's value. 6466func (s *ListAccessPreviewFindingsOutput) SetNextToken(v string) *ListAccessPreviewFindingsOutput { 6467 s.NextToken = &v 6468 return s 6469} 6470 6471type ListAccessPreviewsInput struct { 6472 _ struct{} `type:"structure"` 6473 6474 // The ARN of the analyzer (https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources) 6475 // used to generate the access preview. 6476 // 6477 // AnalyzerArn is a required field 6478 AnalyzerArn *string `location:"querystring" locationName:"analyzerArn" type:"string" required:"true"` 6479 6480 // The maximum number of results to return in the response. 6481 MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` 6482 6483 // A token used for pagination of results returned. 6484 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 6485} 6486 6487// String returns the string representation 6488func (s ListAccessPreviewsInput) String() string { 6489 return awsutil.Prettify(s) 6490} 6491 6492// GoString returns the string representation 6493func (s ListAccessPreviewsInput) GoString() string { 6494 return s.String() 6495} 6496 6497// Validate inspects the fields of the type to determine if they are valid. 6498func (s *ListAccessPreviewsInput) Validate() error { 6499 invalidParams := request.ErrInvalidParams{Context: "ListAccessPreviewsInput"} 6500 if s.AnalyzerArn == nil { 6501 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 6502 } 6503 6504 if invalidParams.Len() > 0 { 6505 return invalidParams 6506 } 6507 return nil 6508} 6509 6510// SetAnalyzerArn sets the AnalyzerArn field's value. 6511func (s *ListAccessPreviewsInput) SetAnalyzerArn(v string) *ListAccessPreviewsInput { 6512 s.AnalyzerArn = &v 6513 return s 6514} 6515 6516// SetMaxResults sets the MaxResults field's value. 6517func (s *ListAccessPreviewsInput) SetMaxResults(v int64) *ListAccessPreviewsInput { 6518 s.MaxResults = &v 6519 return s 6520} 6521 6522// SetNextToken sets the NextToken field's value. 6523func (s *ListAccessPreviewsInput) SetNextToken(v string) *ListAccessPreviewsInput { 6524 s.NextToken = &v 6525 return s 6526} 6527 6528type ListAccessPreviewsOutput struct { 6529 _ struct{} `type:"structure"` 6530 6531 // A list of access previews retrieved for the analyzer. 6532 // 6533 // AccessPreviews is a required field 6534 AccessPreviews []*AccessPreviewSummary `locationName:"accessPreviews" type:"list" required:"true"` 6535 6536 // A token used for pagination of results returned. 6537 NextToken *string `locationName:"nextToken" type:"string"` 6538} 6539 6540// String returns the string representation 6541func (s ListAccessPreviewsOutput) String() string { 6542 return awsutil.Prettify(s) 6543} 6544 6545// GoString returns the string representation 6546func (s ListAccessPreviewsOutput) GoString() string { 6547 return s.String() 6548} 6549 6550// SetAccessPreviews sets the AccessPreviews field's value. 6551func (s *ListAccessPreviewsOutput) SetAccessPreviews(v []*AccessPreviewSummary) *ListAccessPreviewsOutput { 6552 s.AccessPreviews = v 6553 return s 6554} 6555 6556// SetNextToken sets the NextToken field's value. 6557func (s *ListAccessPreviewsOutput) SetNextToken(v string) *ListAccessPreviewsOutput { 6558 s.NextToken = &v 6559 return s 6560} 6561 6562// Retrieves a list of resources that have been analyzed. 6563type ListAnalyzedResourcesInput struct { 6564 _ struct{} `type:"structure"` 6565 6566 // The ARN of the analyzer (https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources) 6567 // to retrieve a list of analyzed resources from. 6568 // 6569 // AnalyzerArn is a required field 6570 AnalyzerArn *string `locationName:"analyzerArn" type:"string" required:"true"` 6571 6572 // The maximum number of results to return in the response. 6573 MaxResults *int64 `locationName:"maxResults" type:"integer"` 6574 6575 // A token used for pagination of results returned. 6576 NextToken *string `locationName:"nextToken" type:"string"` 6577 6578 // The type of resource. 6579 ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` 6580} 6581 6582// String returns the string representation 6583func (s ListAnalyzedResourcesInput) String() string { 6584 return awsutil.Prettify(s) 6585} 6586 6587// GoString returns the string representation 6588func (s ListAnalyzedResourcesInput) GoString() string { 6589 return s.String() 6590} 6591 6592// Validate inspects the fields of the type to determine if they are valid. 6593func (s *ListAnalyzedResourcesInput) Validate() error { 6594 invalidParams := request.ErrInvalidParams{Context: "ListAnalyzedResourcesInput"} 6595 if s.AnalyzerArn == nil { 6596 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 6597 } 6598 6599 if invalidParams.Len() > 0 { 6600 return invalidParams 6601 } 6602 return nil 6603} 6604 6605// SetAnalyzerArn sets the AnalyzerArn field's value. 6606func (s *ListAnalyzedResourcesInput) SetAnalyzerArn(v string) *ListAnalyzedResourcesInput { 6607 s.AnalyzerArn = &v 6608 return s 6609} 6610 6611// SetMaxResults sets the MaxResults field's value. 6612func (s *ListAnalyzedResourcesInput) SetMaxResults(v int64) *ListAnalyzedResourcesInput { 6613 s.MaxResults = &v 6614 return s 6615} 6616 6617// SetNextToken sets the NextToken field's value. 6618func (s *ListAnalyzedResourcesInput) SetNextToken(v string) *ListAnalyzedResourcesInput { 6619 s.NextToken = &v 6620 return s 6621} 6622 6623// SetResourceType sets the ResourceType field's value. 6624func (s *ListAnalyzedResourcesInput) SetResourceType(v string) *ListAnalyzedResourcesInput { 6625 s.ResourceType = &v 6626 return s 6627} 6628 6629// The response to the request. 6630type ListAnalyzedResourcesOutput struct { 6631 _ struct{} `type:"structure"` 6632 6633 // A list of resources that were analyzed. 6634 // 6635 // AnalyzedResources is a required field 6636 AnalyzedResources []*AnalyzedResourceSummary `locationName:"analyzedResources" type:"list" required:"true"` 6637 6638 // A token used for pagination of results returned. 6639 NextToken *string `locationName:"nextToken" type:"string"` 6640} 6641 6642// String returns the string representation 6643func (s ListAnalyzedResourcesOutput) String() string { 6644 return awsutil.Prettify(s) 6645} 6646 6647// GoString returns the string representation 6648func (s ListAnalyzedResourcesOutput) GoString() string { 6649 return s.String() 6650} 6651 6652// SetAnalyzedResources sets the AnalyzedResources field's value. 6653func (s *ListAnalyzedResourcesOutput) SetAnalyzedResources(v []*AnalyzedResourceSummary) *ListAnalyzedResourcesOutput { 6654 s.AnalyzedResources = v 6655 return s 6656} 6657 6658// SetNextToken sets the NextToken field's value. 6659func (s *ListAnalyzedResourcesOutput) SetNextToken(v string) *ListAnalyzedResourcesOutput { 6660 s.NextToken = &v 6661 return s 6662} 6663 6664// Retrieves a list of analyzers. 6665type ListAnalyzersInput struct { 6666 _ struct{} `type:"structure"` 6667 6668 // The maximum number of results to return in the response. 6669 MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` 6670 6671 // A token used for pagination of results returned. 6672 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 6673 6674 // The type of analyzer. 6675 Type *string `location:"querystring" locationName:"type" type:"string" enum:"Type"` 6676} 6677 6678// String returns the string representation 6679func (s ListAnalyzersInput) String() string { 6680 return awsutil.Prettify(s) 6681} 6682 6683// GoString returns the string representation 6684func (s ListAnalyzersInput) GoString() string { 6685 return s.String() 6686} 6687 6688// SetMaxResults sets the MaxResults field's value. 6689func (s *ListAnalyzersInput) SetMaxResults(v int64) *ListAnalyzersInput { 6690 s.MaxResults = &v 6691 return s 6692} 6693 6694// SetNextToken sets the NextToken field's value. 6695func (s *ListAnalyzersInput) SetNextToken(v string) *ListAnalyzersInput { 6696 s.NextToken = &v 6697 return s 6698} 6699 6700// SetType sets the Type field's value. 6701func (s *ListAnalyzersInput) SetType(v string) *ListAnalyzersInput { 6702 s.Type = &v 6703 return s 6704} 6705 6706// The response to the request. 6707type ListAnalyzersOutput struct { 6708 _ struct{} `type:"structure"` 6709 6710 // The analyzers retrieved. 6711 // 6712 // Analyzers is a required field 6713 Analyzers []*AnalyzerSummary `locationName:"analyzers" type:"list" required:"true"` 6714 6715 // A token used for pagination of results returned. 6716 NextToken *string `locationName:"nextToken" type:"string"` 6717} 6718 6719// String returns the string representation 6720func (s ListAnalyzersOutput) String() string { 6721 return awsutil.Prettify(s) 6722} 6723 6724// GoString returns the string representation 6725func (s ListAnalyzersOutput) GoString() string { 6726 return s.String() 6727} 6728 6729// SetAnalyzers sets the Analyzers field's value. 6730func (s *ListAnalyzersOutput) SetAnalyzers(v []*AnalyzerSummary) *ListAnalyzersOutput { 6731 s.Analyzers = v 6732 return s 6733} 6734 6735// SetNextToken sets the NextToken field's value. 6736func (s *ListAnalyzersOutput) SetNextToken(v string) *ListAnalyzersOutput { 6737 s.NextToken = &v 6738 return s 6739} 6740 6741// Retrieves a list of archive rules created for the specified analyzer. 6742type ListArchiveRulesInput struct { 6743 _ struct{} `type:"structure"` 6744 6745 // The name of the analyzer to retrieve rules from. 6746 // 6747 // AnalyzerName is a required field 6748 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 6749 6750 // The maximum number of results to return in the request. 6751 MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` 6752 6753 // A token used for pagination of results returned. 6754 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 6755} 6756 6757// String returns the string representation 6758func (s ListArchiveRulesInput) String() string { 6759 return awsutil.Prettify(s) 6760} 6761 6762// GoString returns the string representation 6763func (s ListArchiveRulesInput) GoString() string { 6764 return s.String() 6765} 6766 6767// Validate inspects the fields of the type to determine if they are valid. 6768func (s *ListArchiveRulesInput) Validate() error { 6769 invalidParams := request.ErrInvalidParams{Context: "ListArchiveRulesInput"} 6770 if s.AnalyzerName == nil { 6771 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 6772 } 6773 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 6774 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 6775 } 6776 6777 if invalidParams.Len() > 0 { 6778 return invalidParams 6779 } 6780 return nil 6781} 6782 6783// SetAnalyzerName sets the AnalyzerName field's value. 6784func (s *ListArchiveRulesInput) SetAnalyzerName(v string) *ListArchiveRulesInput { 6785 s.AnalyzerName = &v 6786 return s 6787} 6788 6789// SetMaxResults sets the MaxResults field's value. 6790func (s *ListArchiveRulesInput) SetMaxResults(v int64) *ListArchiveRulesInput { 6791 s.MaxResults = &v 6792 return s 6793} 6794 6795// SetNextToken sets the NextToken field's value. 6796func (s *ListArchiveRulesInput) SetNextToken(v string) *ListArchiveRulesInput { 6797 s.NextToken = &v 6798 return s 6799} 6800 6801// The response to the request. 6802type ListArchiveRulesOutput struct { 6803 _ struct{} `type:"structure"` 6804 6805 // A list of archive rules created for the specified analyzer. 6806 // 6807 // ArchiveRules is a required field 6808 ArchiveRules []*ArchiveRuleSummary `locationName:"archiveRules" type:"list" required:"true"` 6809 6810 // A token used for pagination of results returned. 6811 NextToken *string `locationName:"nextToken" type:"string"` 6812} 6813 6814// String returns the string representation 6815func (s ListArchiveRulesOutput) String() string { 6816 return awsutil.Prettify(s) 6817} 6818 6819// GoString returns the string representation 6820func (s ListArchiveRulesOutput) GoString() string { 6821 return s.String() 6822} 6823 6824// SetArchiveRules sets the ArchiveRules field's value. 6825func (s *ListArchiveRulesOutput) SetArchiveRules(v []*ArchiveRuleSummary) *ListArchiveRulesOutput { 6826 s.ArchiveRules = v 6827 return s 6828} 6829 6830// SetNextToken sets the NextToken field's value. 6831func (s *ListArchiveRulesOutput) SetNextToken(v string) *ListArchiveRulesOutput { 6832 s.NextToken = &v 6833 return s 6834} 6835 6836// Retrieves a list of findings generated by the specified analyzer. 6837type ListFindingsInput struct { 6838 _ struct{} `type:"structure"` 6839 6840 // The ARN of the analyzer (https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources) 6841 // to retrieve findings from. 6842 // 6843 // AnalyzerArn is a required field 6844 AnalyzerArn *string `locationName:"analyzerArn" type:"string" required:"true"` 6845 6846 // A filter to match for the findings to return. 6847 Filter map[string]*Criterion `locationName:"filter" type:"map"` 6848 6849 // The maximum number of results to return in the response. 6850 MaxResults *int64 `locationName:"maxResults" type:"integer"` 6851 6852 // A token used for pagination of results returned. 6853 NextToken *string `locationName:"nextToken" type:"string"` 6854 6855 // The sort order for the findings returned. 6856 Sort *SortCriteria `locationName:"sort" type:"structure"` 6857} 6858 6859// String returns the string representation 6860func (s ListFindingsInput) String() string { 6861 return awsutil.Prettify(s) 6862} 6863 6864// GoString returns the string representation 6865func (s ListFindingsInput) GoString() string { 6866 return s.String() 6867} 6868 6869// Validate inspects the fields of the type to determine if they are valid. 6870func (s *ListFindingsInput) Validate() error { 6871 invalidParams := request.ErrInvalidParams{Context: "ListFindingsInput"} 6872 if s.AnalyzerArn == nil { 6873 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 6874 } 6875 if s.Filter != nil { 6876 for i, v := range s.Filter { 6877 if v == nil { 6878 continue 6879 } 6880 if err := v.Validate(); err != nil { 6881 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filter", i), err.(request.ErrInvalidParams)) 6882 } 6883 } 6884 } 6885 6886 if invalidParams.Len() > 0 { 6887 return invalidParams 6888 } 6889 return nil 6890} 6891 6892// SetAnalyzerArn sets the AnalyzerArn field's value. 6893func (s *ListFindingsInput) SetAnalyzerArn(v string) *ListFindingsInput { 6894 s.AnalyzerArn = &v 6895 return s 6896} 6897 6898// SetFilter sets the Filter field's value. 6899func (s *ListFindingsInput) SetFilter(v map[string]*Criterion) *ListFindingsInput { 6900 s.Filter = v 6901 return s 6902} 6903 6904// SetMaxResults sets the MaxResults field's value. 6905func (s *ListFindingsInput) SetMaxResults(v int64) *ListFindingsInput { 6906 s.MaxResults = &v 6907 return s 6908} 6909 6910// SetNextToken sets the NextToken field's value. 6911func (s *ListFindingsInput) SetNextToken(v string) *ListFindingsInput { 6912 s.NextToken = &v 6913 return s 6914} 6915 6916// SetSort sets the Sort field's value. 6917func (s *ListFindingsInput) SetSort(v *SortCriteria) *ListFindingsInput { 6918 s.Sort = v 6919 return s 6920} 6921 6922// The response to the request. 6923type ListFindingsOutput struct { 6924 _ struct{} `type:"structure"` 6925 6926 // A list of findings retrieved from the analyzer that match the filter criteria 6927 // specified, if any. 6928 // 6929 // Findings is a required field 6930 Findings []*FindingSummary `locationName:"findings" type:"list" required:"true"` 6931 6932 // A token used for pagination of results returned. 6933 NextToken *string `locationName:"nextToken" type:"string"` 6934} 6935 6936// String returns the string representation 6937func (s ListFindingsOutput) String() string { 6938 return awsutil.Prettify(s) 6939} 6940 6941// GoString returns the string representation 6942func (s ListFindingsOutput) GoString() string { 6943 return s.String() 6944} 6945 6946// SetFindings sets the Findings field's value. 6947func (s *ListFindingsOutput) SetFindings(v []*FindingSummary) *ListFindingsOutput { 6948 s.Findings = v 6949 return s 6950} 6951 6952// SetNextToken sets the NextToken field's value. 6953func (s *ListFindingsOutput) SetNextToken(v string) *ListFindingsOutput { 6954 s.NextToken = &v 6955 return s 6956} 6957 6958type ListPolicyGenerationsInput struct { 6959 _ struct{} `type:"structure"` 6960 6961 // The maximum number of results to return in the response. 6962 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 6963 6964 // A token used for pagination of results returned. 6965 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 6966 6967 // The ARN of the IAM entity (user or role) for which you are generating a policy. 6968 // Use this with ListGeneratedPolicies to filter the results to only include 6969 // results for a specific principal. 6970 PrincipalArn *string `location:"querystring" locationName:"principalArn" type:"string"` 6971} 6972 6973// String returns the string representation 6974func (s ListPolicyGenerationsInput) String() string { 6975 return awsutil.Prettify(s) 6976} 6977 6978// GoString returns the string representation 6979func (s ListPolicyGenerationsInput) GoString() string { 6980 return s.String() 6981} 6982 6983// Validate inspects the fields of the type to determine if they are valid. 6984func (s *ListPolicyGenerationsInput) Validate() error { 6985 invalidParams := request.ErrInvalidParams{Context: "ListPolicyGenerationsInput"} 6986 if s.MaxResults != nil && *s.MaxResults < 1 { 6987 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 6988 } 6989 6990 if invalidParams.Len() > 0 { 6991 return invalidParams 6992 } 6993 return nil 6994} 6995 6996// SetMaxResults sets the MaxResults field's value. 6997func (s *ListPolicyGenerationsInput) SetMaxResults(v int64) *ListPolicyGenerationsInput { 6998 s.MaxResults = &v 6999 return s 7000} 7001 7002// SetNextToken sets the NextToken field's value. 7003func (s *ListPolicyGenerationsInput) SetNextToken(v string) *ListPolicyGenerationsInput { 7004 s.NextToken = &v 7005 return s 7006} 7007 7008// SetPrincipalArn sets the PrincipalArn field's value. 7009func (s *ListPolicyGenerationsInput) SetPrincipalArn(v string) *ListPolicyGenerationsInput { 7010 s.PrincipalArn = &v 7011 return s 7012} 7013 7014type ListPolicyGenerationsOutput struct { 7015 _ struct{} `type:"structure"` 7016 7017 // A token used for pagination of results returned. 7018 NextToken *string `locationName:"nextToken" type:"string"` 7019 7020 // A PolicyGeneration object that contains details about the generated policy. 7021 // 7022 // PolicyGenerations is a required field 7023 PolicyGenerations []*PolicyGeneration `locationName:"policyGenerations" type:"list" required:"true"` 7024} 7025 7026// String returns the string representation 7027func (s ListPolicyGenerationsOutput) String() string { 7028 return awsutil.Prettify(s) 7029} 7030 7031// GoString returns the string representation 7032func (s ListPolicyGenerationsOutput) GoString() string { 7033 return s.String() 7034} 7035 7036// SetNextToken sets the NextToken field's value. 7037func (s *ListPolicyGenerationsOutput) SetNextToken(v string) *ListPolicyGenerationsOutput { 7038 s.NextToken = &v 7039 return s 7040} 7041 7042// SetPolicyGenerations sets the PolicyGenerations field's value. 7043func (s *ListPolicyGenerationsOutput) SetPolicyGenerations(v []*PolicyGeneration) *ListPolicyGenerationsOutput { 7044 s.PolicyGenerations = v 7045 return s 7046} 7047 7048// Retrieves a list of tags applied to the specified resource. 7049type ListTagsForResourceInput struct { 7050 _ struct{} `type:"structure"` 7051 7052 // The ARN of the resource to retrieve tags from. 7053 // 7054 // ResourceArn is a required field 7055 ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` 7056} 7057 7058// String returns the string representation 7059func (s ListTagsForResourceInput) String() string { 7060 return awsutil.Prettify(s) 7061} 7062 7063// GoString returns the string representation 7064func (s ListTagsForResourceInput) GoString() string { 7065 return s.String() 7066} 7067 7068// Validate inspects the fields of the type to determine if they are valid. 7069func (s *ListTagsForResourceInput) Validate() error { 7070 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 7071 if s.ResourceArn == nil { 7072 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 7073 } 7074 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 7075 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 7076 } 7077 7078 if invalidParams.Len() > 0 { 7079 return invalidParams 7080 } 7081 return nil 7082} 7083 7084// SetResourceArn sets the ResourceArn field's value. 7085func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { 7086 s.ResourceArn = &v 7087 return s 7088} 7089 7090// The response to the request. 7091type ListTagsForResourceOutput struct { 7092 _ struct{} `type:"structure"` 7093 7094 // The tags that are applied to the specified resource. 7095 Tags map[string]*string `locationName:"tags" type:"map"` 7096} 7097 7098// String returns the string representation 7099func (s ListTagsForResourceOutput) String() string { 7100 return awsutil.Prettify(s) 7101} 7102 7103// GoString returns the string representation 7104func (s ListTagsForResourceOutput) GoString() string { 7105 return s.String() 7106} 7107 7108// SetTags sets the Tags field's value. 7109func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForResourceOutput { 7110 s.Tags = v 7111 return s 7112} 7113 7114// A location in a policy that is represented as a path through the JSON representation 7115// and a corresponding span. 7116type Location struct { 7117 _ struct{} `type:"structure"` 7118 7119 // A path in a policy, represented as a sequence of path elements. 7120 // 7121 // Path is a required field 7122 Path []*PathElement `locationName:"path" type:"list" required:"true"` 7123 7124 // A span in a policy. 7125 // 7126 // Span is a required field 7127 Span *Span `locationName:"span" type:"structure" required:"true"` 7128} 7129 7130// String returns the string representation 7131func (s Location) String() string { 7132 return awsutil.Prettify(s) 7133} 7134 7135// GoString returns the string representation 7136func (s Location) GoString() string { 7137 return s.String() 7138} 7139 7140// SetPath sets the Path field's value. 7141func (s *Location) SetPath(v []*PathElement) *Location { 7142 s.Path = v 7143 return s 7144} 7145 7146// SetSpan sets the Span field's value. 7147func (s *Location) SetSpan(v *Span) *Location { 7148 s.Span = v 7149 return s 7150} 7151 7152// The proposed InternetConfiguration or VpcConfiguration to apply to the Amazon 7153// S3 Access point. You can make the access point accessible from the internet, 7154// or you can specify that all requests made through that access point must 7155// originate from a specific virtual private cloud (VPC). You can specify only 7156// one type of network configuration. For more information, see Creating access 7157// points (https://docs.aws.amazon.com/AmazonS3/latest/dev/creating-access-points.html). 7158type NetworkOriginConfiguration struct { 7159 _ struct{} `type:"structure"` 7160 7161 // The configuration for the Amazon S3 access point with an Internet origin. 7162 InternetConfiguration *InternetConfiguration `locationName:"internetConfiguration" type:"structure"` 7163 7164 // The proposed virtual private cloud (VPC) configuration for the Amazon S3 7165 // access point. For more information, see VpcConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_VpcConfiguration.html). 7166 VpcConfiguration *VpcConfiguration `locationName:"vpcConfiguration" type:"structure"` 7167} 7168 7169// String returns the string representation 7170func (s NetworkOriginConfiguration) String() string { 7171 return awsutil.Prettify(s) 7172} 7173 7174// GoString returns the string representation 7175func (s NetworkOriginConfiguration) GoString() string { 7176 return s.String() 7177} 7178 7179// Validate inspects the fields of the type to determine if they are valid. 7180func (s *NetworkOriginConfiguration) Validate() error { 7181 invalidParams := request.ErrInvalidParams{Context: "NetworkOriginConfiguration"} 7182 if s.VpcConfiguration != nil { 7183 if err := s.VpcConfiguration.Validate(); err != nil { 7184 invalidParams.AddNested("VpcConfiguration", err.(request.ErrInvalidParams)) 7185 } 7186 } 7187 7188 if invalidParams.Len() > 0 { 7189 return invalidParams 7190 } 7191 return nil 7192} 7193 7194// SetInternetConfiguration sets the InternetConfiguration field's value. 7195func (s *NetworkOriginConfiguration) SetInternetConfiguration(v *InternetConfiguration) *NetworkOriginConfiguration { 7196 s.InternetConfiguration = v 7197 return s 7198} 7199 7200// SetVpcConfiguration sets the VpcConfiguration field's value. 7201func (s *NetworkOriginConfiguration) SetVpcConfiguration(v *VpcConfiguration) *NetworkOriginConfiguration { 7202 s.VpcConfiguration = v 7203 return s 7204} 7205 7206// A single element in a path through the JSON representation of a policy. 7207type PathElement struct { 7208 _ struct{} `type:"structure"` 7209 7210 // Refers to an index in a JSON array. 7211 Index *int64 `locationName:"index" type:"integer"` 7212 7213 // Refers to a key in a JSON object. 7214 Key *string `locationName:"key" type:"string"` 7215 7216 // Refers to a substring of a literal string in a JSON object. 7217 Substring *Substring `locationName:"substring" type:"structure"` 7218 7219 // Refers to the value associated with a given key in a JSON object. 7220 Value *string `locationName:"value" type:"string"` 7221} 7222 7223// String returns the string representation 7224func (s PathElement) String() string { 7225 return awsutil.Prettify(s) 7226} 7227 7228// GoString returns the string representation 7229func (s PathElement) GoString() string { 7230 return s.String() 7231} 7232 7233// SetIndex sets the Index field's value. 7234func (s *PathElement) SetIndex(v int64) *PathElement { 7235 s.Index = &v 7236 return s 7237} 7238 7239// SetKey sets the Key field's value. 7240func (s *PathElement) SetKey(v string) *PathElement { 7241 s.Key = &v 7242 return s 7243} 7244 7245// SetSubstring sets the Substring field's value. 7246func (s *PathElement) SetSubstring(v *Substring) *PathElement { 7247 s.Substring = v 7248 return s 7249} 7250 7251// SetValue sets the Value field's value. 7252func (s *PathElement) SetValue(v string) *PathElement { 7253 s.Value = &v 7254 return s 7255} 7256 7257// Contains details about the policy generation status and properties. 7258type PolicyGeneration struct { 7259 _ struct{} `type:"structure"` 7260 7261 // A timestamp of when the policy generation was completed. 7262 CompletedOn *time.Time `locationName:"completedOn" type:"timestamp" timestampFormat:"iso8601"` 7263 7264 // The JobId that is returned by the StartPolicyGeneration operation. The JobId 7265 // can be used with GetGeneratedPolicy to retrieve the generated policies or 7266 // used with CancelPolicyGeneration to cancel the policy generation request. 7267 // 7268 // JobId is a required field 7269 JobId *string `locationName:"jobId" type:"string" required:"true"` 7270 7271 // The ARN of the IAM entity (user or role) for which you are generating a policy. 7272 // 7273 // PrincipalArn is a required field 7274 PrincipalArn *string `locationName:"principalArn" type:"string" required:"true"` 7275 7276 // A timestamp of when the policy generation started. 7277 // 7278 // StartedOn is a required field 7279 StartedOn *time.Time `locationName:"startedOn" type:"timestamp" timestampFormat:"iso8601" required:"true"` 7280 7281 // The status of the policy generation request. 7282 // 7283 // Status is a required field 7284 Status *string `locationName:"status" type:"string" required:"true" enum:"JobStatus"` 7285} 7286 7287// String returns the string representation 7288func (s PolicyGeneration) String() string { 7289 return awsutil.Prettify(s) 7290} 7291 7292// GoString returns the string representation 7293func (s PolicyGeneration) GoString() string { 7294 return s.String() 7295} 7296 7297// SetCompletedOn sets the CompletedOn field's value. 7298func (s *PolicyGeneration) SetCompletedOn(v time.Time) *PolicyGeneration { 7299 s.CompletedOn = &v 7300 return s 7301} 7302 7303// SetJobId sets the JobId field's value. 7304func (s *PolicyGeneration) SetJobId(v string) *PolicyGeneration { 7305 s.JobId = &v 7306 return s 7307} 7308 7309// SetPrincipalArn sets the PrincipalArn field's value. 7310func (s *PolicyGeneration) SetPrincipalArn(v string) *PolicyGeneration { 7311 s.PrincipalArn = &v 7312 return s 7313} 7314 7315// SetStartedOn sets the StartedOn field's value. 7316func (s *PolicyGeneration) SetStartedOn(v time.Time) *PolicyGeneration { 7317 s.StartedOn = &v 7318 return s 7319} 7320 7321// SetStatus sets the Status field's value. 7322func (s *PolicyGeneration) SetStatus(v string) *PolicyGeneration { 7323 s.Status = &v 7324 return s 7325} 7326 7327// Contains the ARN details about the IAM entity for which the policy is generated. 7328type PolicyGenerationDetails struct { 7329 _ struct{} `type:"structure"` 7330 7331 // The ARN of the IAM entity (user or role) for which you are generating a policy. 7332 // 7333 // PrincipalArn is a required field 7334 PrincipalArn *string `locationName:"principalArn" type:"string" required:"true"` 7335} 7336 7337// String returns the string representation 7338func (s PolicyGenerationDetails) String() string { 7339 return awsutil.Prettify(s) 7340} 7341 7342// GoString returns the string representation 7343func (s PolicyGenerationDetails) GoString() string { 7344 return s.String() 7345} 7346 7347// Validate inspects the fields of the type to determine if they are valid. 7348func (s *PolicyGenerationDetails) Validate() error { 7349 invalidParams := request.ErrInvalidParams{Context: "PolicyGenerationDetails"} 7350 if s.PrincipalArn == nil { 7351 invalidParams.Add(request.NewErrParamRequired("PrincipalArn")) 7352 } 7353 7354 if invalidParams.Len() > 0 { 7355 return invalidParams 7356 } 7357 return nil 7358} 7359 7360// SetPrincipalArn sets the PrincipalArn field's value. 7361func (s *PolicyGenerationDetails) SetPrincipalArn(v string) *PolicyGenerationDetails { 7362 s.PrincipalArn = &v 7363 return s 7364} 7365 7366// A position in a policy. 7367type Position struct { 7368 _ struct{} `type:"structure"` 7369 7370 // The column of the position, starting from 0. 7371 // 7372 // Column is a required field 7373 Column *int64 `locationName:"column" type:"integer" required:"true"` 7374 7375 // The line of the position, starting from 1. 7376 // 7377 // Line is a required field 7378 Line *int64 `locationName:"line" type:"integer" required:"true"` 7379 7380 // The offset within the policy that corresponds to the position, starting from 7381 // 0. 7382 // 7383 // Offset is a required field 7384 Offset *int64 `locationName:"offset" type:"integer" required:"true"` 7385} 7386 7387// String returns the string representation 7388func (s Position) String() string { 7389 return awsutil.Prettify(s) 7390} 7391 7392// GoString returns the string representation 7393func (s Position) GoString() string { 7394 return s.String() 7395} 7396 7397// SetColumn sets the Column field's value. 7398func (s *Position) SetColumn(v int64) *Position { 7399 s.Column = &v 7400 return s 7401} 7402 7403// SetLine sets the Line field's value. 7404func (s *Position) SetLine(v int64) *Position { 7405 s.Line = &v 7406 return s 7407} 7408 7409// SetOffset sets the Offset field's value. 7410func (s *Position) SetOffset(v int64) *Position { 7411 s.Offset = &v 7412 return s 7413} 7414 7415// The specified resource could not be found. 7416type ResourceNotFoundException struct { 7417 _ struct{} `type:"structure"` 7418 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 7419 7420 Message_ *string `locationName:"message" type:"string"` 7421 7422 // The ID of the resource. 7423 // 7424 // ResourceId is a required field 7425 ResourceId *string `locationName:"resourceId" type:"string" required:"true"` 7426 7427 // The type of the resource. 7428 // 7429 // ResourceType is a required field 7430 ResourceType *string `locationName:"resourceType" type:"string" required:"true"` 7431} 7432 7433// String returns the string representation 7434func (s ResourceNotFoundException) String() string { 7435 return awsutil.Prettify(s) 7436} 7437 7438// GoString returns the string representation 7439func (s ResourceNotFoundException) GoString() string { 7440 return s.String() 7441} 7442 7443func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 7444 return &ResourceNotFoundException{ 7445 RespMetadata: v, 7446 } 7447} 7448 7449// Code returns the exception type name. 7450func (s *ResourceNotFoundException) Code() string { 7451 return "ResourceNotFoundException" 7452} 7453 7454// Message returns the exception's message. 7455func (s *ResourceNotFoundException) Message() string { 7456 if s.Message_ != nil { 7457 return *s.Message_ 7458 } 7459 return "" 7460} 7461 7462// OrigErr always returns nil, satisfies awserr.Error interface. 7463func (s *ResourceNotFoundException) OrigErr() error { 7464 return nil 7465} 7466 7467func (s *ResourceNotFoundException) Error() string { 7468 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 7469} 7470 7471// Status code returns the HTTP status code for the request's response error. 7472func (s *ResourceNotFoundException) StatusCode() int { 7473 return s.RespMetadata.StatusCode 7474} 7475 7476// RequestID returns the service's response RequestID for request. 7477func (s *ResourceNotFoundException) RequestID() string { 7478 return s.RespMetadata.RequestID 7479} 7480 7481// The configuration for an Amazon S3 access point for the bucket. You can propose 7482// up to 10 access points per bucket. If the proposed Amazon S3 access point 7483// configuration is for an existing bucket, the access preview uses the proposed 7484// access point configuration in place of the existing access points. To propose 7485// an access point without a policy, you can provide an empty string as the 7486// access point policy. For more information, see Creating access points (https://docs.aws.amazon.com/https:/docs.aws.amazon.com/AmazonS3/latest/dev/creating-access-points.html). 7487// For more information about access point policy limits, see Access points 7488// restrictions and limitations (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-points-restrictions-limitations.html). 7489type S3AccessPointConfiguration struct { 7490 _ struct{} `type:"structure"` 7491 7492 // The access point policy. 7493 AccessPointPolicy *string `locationName:"accessPointPolicy" type:"string"` 7494 7495 // The proposed Internet and VpcConfiguration to apply to this Amazon S3 access 7496 // point. If the access preview is for a new resource and neither is specified, 7497 // the access preview uses Internet for the network origin. If the access preview 7498 // is for an existing resource and neither is specified, the access preview 7499 // uses the exiting network origin. 7500 NetworkOrigin *NetworkOriginConfiguration `locationName:"networkOrigin" type:"structure"` 7501 7502 // The proposed S3PublicAccessBlock configuration to apply to this Amazon S3 7503 // Access Point. 7504 PublicAccessBlock *S3PublicAccessBlockConfiguration `locationName:"publicAccessBlock" type:"structure"` 7505} 7506 7507// String returns the string representation 7508func (s S3AccessPointConfiguration) String() string { 7509 return awsutil.Prettify(s) 7510} 7511 7512// GoString returns the string representation 7513func (s S3AccessPointConfiguration) GoString() string { 7514 return s.String() 7515} 7516 7517// Validate inspects the fields of the type to determine if they are valid. 7518func (s *S3AccessPointConfiguration) Validate() error { 7519 invalidParams := request.ErrInvalidParams{Context: "S3AccessPointConfiguration"} 7520 if s.NetworkOrigin != nil { 7521 if err := s.NetworkOrigin.Validate(); err != nil { 7522 invalidParams.AddNested("NetworkOrigin", err.(request.ErrInvalidParams)) 7523 } 7524 } 7525 if s.PublicAccessBlock != nil { 7526 if err := s.PublicAccessBlock.Validate(); err != nil { 7527 invalidParams.AddNested("PublicAccessBlock", err.(request.ErrInvalidParams)) 7528 } 7529 } 7530 7531 if invalidParams.Len() > 0 { 7532 return invalidParams 7533 } 7534 return nil 7535} 7536 7537// SetAccessPointPolicy sets the AccessPointPolicy field's value. 7538func (s *S3AccessPointConfiguration) SetAccessPointPolicy(v string) *S3AccessPointConfiguration { 7539 s.AccessPointPolicy = &v 7540 return s 7541} 7542 7543// SetNetworkOrigin sets the NetworkOrigin field's value. 7544func (s *S3AccessPointConfiguration) SetNetworkOrigin(v *NetworkOriginConfiguration) *S3AccessPointConfiguration { 7545 s.NetworkOrigin = v 7546 return s 7547} 7548 7549// SetPublicAccessBlock sets the PublicAccessBlock field's value. 7550func (s *S3AccessPointConfiguration) SetPublicAccessBlock(v *S3PublicAccessBlockConfiguration) *S3AccessPointConfiguration { 7551 s.PublicAccessBlock = v 7552 return s 7553} 7554 7555// A proposed access control list grant configuration for an Amazon S3 bucket. 7556// For more information, see How to Specify an ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#setting-acls). 7557type S3BucketAclGrantConfiguration struct { 7558 _ struct{} `type:"structure"` 7559 7560 // The grantee to whom you’re assigning access rights. 7561 // 7562 // Grantee is a required field 7563 Grantee *AclGrantee `locationName:"grantee" type:"structure" required:"true"` 7564 7565 // The permissions being granted. 7566 // 7567 // Permission is a required field 7568 Permission *string `locationName:"permission" type:"string" required:"true" enum:"AclPermission"` 7569} 7570 7571// String returns the string representation 7572func (s S3BucketAclGrantConfiguration) String() string { 7573 return awsutil.Prettify(s) 7574} 7575 7576// GoString returns the string representation 7577func (s S3BucketAclGrantConfiguration) GoString() string { 7578 return s.String() 7579} 7580 7581// Validate inspects the fields of the type to determine if they are valid. 7582func (s *S3BucketAclGrantConfiguration) Validate() error { 7583 invalidParams := request.ErrInvalidParams{Context: "S3BucketAclGrantConfiguration"} 7584 if s.Grantee == nil { 7585 invalidParams.Add(request.NewErrParamRequired("Grantee")) 7586 } 7587 if s.Permission == nil { 7588 invalidParams.Add(request.NewErrParamRequired("Permission")) 7589 } 7590 7591 if invalidParams.Len() > 0 { 7592 return invalidParams 7593 } 7594 return nil 7595} 7596 7597// SetGrantee sets the Grantee field's value. 7598func (s *S3BucketAclGrantConfiguration) SetGrantee(v *AclGrantee) *S3BucketAclGrantConfiguration { 7599 s.Grantee = v 7600 return s 7601} 7602 7603// SetPermission sets the Permission field's value. 7604func (s *S3BucketAclGrantConfiguration) SetPermission(v string) *S3BucketAclGrantConfiguration { 7605 s.Permission = &v 7606 return s 7607} 7608 7609// Proposed access control configuration for an Amazon S3 bucket. You can propose 7610// a configuration for a new Amazon S3 bucket or an existing Amazon S3 bucket 7611// that you own by specifying the Amazon S3 bucket policy, bucket ACLs, bucket 7612// BPA settings, and Amazon S3 access points attached to the bucket. If the 7613// configuration is for an existing Amazon S3 bucket and you do not specify 7614// the Amazon S3 bucket policy, the access preview uses the existing policy 7615// attached to the bucket. If the access preview is for a new resource and you 7616// do not specify the Amazon S3 bucket policy, the access preview assumes a 7617// bucket without a policy. To propose deletion of an existing bucket policy, 7618// you can specify an empty string. For more information about bucket policy 7619// limits, see Bucket Policy Examples (https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html). 7620type S3BucketConfiguration struct { 7621 _ struct{} `type:"structure"` 7622 7623 // The configuration of Amazon S3 access points for the bucket. 7624 AccessPoints map[string]*S3AccessPointConfiguration `locationName:"accessPoints" type:"map"` 7625 7626 // The proposed list of ACL grants for the Amazon S3 bucket. You can propose 7627 // up to 100 ACL grants per bucket. If the proposed grant configuration is for 7628 // an existing bucket, the access preview uses the proposed list of grant configurations 7629 // in place of the existing grants. Otherwise, the access preview uses the existing 7630 // grants for the bucket. 7631 BucketAclGrants []*S3BucketAclGrantConfiguration `locationName:"bucketAclGrants" type:"list"` 7632 7633 // The proposed bucket policy for the Amazon S3 bucket. 7634 BucketPolicy *string `locationName:"bucketPolicy" type:"string"` 7635 7636 // The proposed block public access configuration for the Amazon S3 bucket. 7637 BucketPublicAccessBlock *S3PublicAccessBlockConfiguration `locationName:"bucketPublicAccessBlock" type:"structure"` 7638} 7639 7640// String returns the string representation 7641func (s S3BucketConfiguration) String() string { 7642 return awsutil.Prettify(s) 7643} 7644 7645// GoString returns the string representation 7646func (s S3BucketConfiguration) GoString() string { 7647 return s.String() 7648} 7649 7650// Validate inspects the fields of the type to determine if they are valid. 7651func (s *S3BucketConfiguration) Validate() error { 7652 invalidParams := request.ErrInvalidParams{Context: "S3BucketConfiguration"} 7653 if s.AccessPoints != nil { 7654 for i, v := range s.AccessPoints { 7655 if v == nil { 7656 continue 7657 } 7658 if err := v.Validate(); err != nil { 7659 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AccessPoints", i), err.(request.ErrInvalidParams)) 7660 } 7661 } 7662 } 7663 if s.BucketAclGrants != nil { 7664 for i, v := range s.BucketAclGrants { 7665 if v == nil { 7666 continue 7667 } 7668 if err := v.Validate(); err != nil { 7669 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "BucketAclGrants", i), err.(request.ErrInvalidParams)) 7670 } 7671 } 7672 } 7673 if s.BucketPublicAccessBlock != nil { 7674 if err := s.BucketPublicAccessBlock.Validate(); err != nil { 7675 invalidParams.AddNested("BucketPublicAccessBlock", err.(request.ErrInvalidParams)) 7676 } 7677 } 7678 7679 if invalidParams.Len() > 0 { 7680 return invalidParams 7681 } 7682 return nil 7683} 7684 7685// SetAccessPoints sets the AccessPoints field's value. 7686func (s *S3BucketConfiguration) SetAccessPoints(v map[string]*S3AccessPointConfiguration) *S3BucketConfiguration { 7687 s.AccessPoints = v 7688 return s 7689} 7690 7691// SetBucketAclGrants sets the BucketAclGrants field's value. 7692func (s *S3BucketConfiguration) SetBucketAclGrants(v []*S3BucketAclGrantConfiguration) *S3BucketConfiguration { 7693 s.BucketAclGrants = v 7694 return s 7695} 7696 7697// SetBucketPolicy sets the BucketPolicy field's value. 7698func (s *S3BucketConfiguration) SetBucketPolicy(v string) *S3BucketConfiguration { 7699 s.BucketPolicy = &v 7700 return s 7701} 7702 7703// SetBucketPublicAccessBlock sets the BucketPublicAccessBlock field's value. 7704func (s *S3BucketConfiguration) SetBucketPublicAccessBlock(v *S3PublicAccessBlockConfiguration) *S3BucketConfiguration { 7705 s.BucketPublicAccessBlock = v 7706 return s 7707} 7708 7709// The PublicAccessBlock configuration to apply to this Amazon S3 bucket. If 7710// the proposed configuration is for an existing Amazon S3 bucket and the configuration 7711// is not specified, the access preview uses the existing setting. If the proposed 7712// configuration is for a new bucket and the configuration is not specified, 7713// the access preview uses false. If the proposed configuration is for a new 7714// access point and the access point BPA configuration is not specified, the 7715// access preview uses true. For more information, see PublicAccessBlockConfiguration 7716// (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-publicaccessblockconfiguration.html). 7717type S3PublicAccessBlockConfiguration struct { 7718 _ struct{} `type:"structure"` 7719 7720 // Specifies whether Amazon S3 should ignore public ACLs for this bucket and 7721 // objects in this bucket. 7722 // 7723 // IgnorePublicAcls is a required field 7724 IgnorePublicAcls *bool `locationName:"ignorePublicAcls" type:"boolean" required:"true"` 7725 7726 // Specifies whether Amazon S3 should restrict public bucket policies for this 7727 // bucket. 7728 // 7729 // RestrictPublicBuckets is a required field 7730 RestrictPublicBuckets *bool `locationName:"restrictPublicBuckets" type:"boolean" required:"true"` 7731} 7732 7733// String returns the string representation 7734func (s S3PublicAccessBlockConfiguration) String() string { 7735 return awsutil.Prettify(s) 7736} 7737 7738// GoString returns the string representation 7739func (s S3PublicAccessBlockConfiguration) GoString() string { 7740 return s.String() 7741} 7742 7743// Validate inspects the fields of the type to determine if they are valid. 7744func (s *S3PublicAccessBlockConfiguration) Validate() error { 7745 invalidParams := request.ErrInvalidParams{Context: "S3PublicAccessBlockConfiguration"} 7746 if s.IgnorePublicAcls == nil { 7747 invalidParams.Add(request.NewErrParamRequired("IgnorePublicAcls")) 7748 } 7749 if s.RestrictPublicBuckets == nil { 7750 invalidParams.Add(request.NewErrParamRequired("RestrictPublicBuckets")) 7751 } 7752 7753 if invalidParams.Len() > 0 { 7754 return invalidParams 7755 } 7756 return nil 7757} 7758 7759// SetIgnorePublicAcls sets the IgnorePublicAcls field's value. 7760func (s *S3PublicAccessBlockConfiguration) SetIgnorePublicAcls(v bool) *S3PublicAccessBlockConfiguration { 7761 s.IgnorePublicAcls = &v 7762 return s 7763} 7764 7765// SetRestrictPublicBuckets sets the RestrictPublicBuckets field's value. 7766func (s *S3PublicAccessBlockConfiguration) SetRestrictPublicBuckets(v bool) *S3PublicAccessBlockConfiguration { 7767 s.RestrictPublicBuckets = &v 7768 return s 7769} 7770 7771// The configuration for a Secrets Manager secret. For more information, see 7772// CreateSecret (https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_CreateSecret.html). 7773// 7774// You can propose a configuration for a new secret or an existing secret that 7775// you own by specifying the secret policy and optional KMS encryption key. 7776// If the configuration is for an existing secret and you do not specify the 7777// secret policy, the access preview uses the existing policy for the secret. 7778// If the access preview is for a new resource and you do not specify the policy, 7779// the access preview assumes a secret without a policy. To propose deletion 7780// of an existing policy, you can specify an empty string. If the proposed configuration 7781// is for a new secret and you do not specify the KMS key ID, the access preview 7782// uses the default CMK of the AWS account. If you specify an empty string for 7783// the KMS key ID, the access preview uses the default CMK of the AWS account. 7784// For more information about secret policy limits, see Quotas for AWS Secrets 7785// Manager. (https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_limits.html). 7786type SecretsManagerSecretConfiguration struct { 7787 _ struct{} `type:"structure"` 7788 7789 // The proposed ARN, key ID, or alias of the AWS KMS customer master key (CMK). 7790 KmsKeyId *string `locationName:"kmsKeyId" type:"string"` 7791 7792 // The proposed resource policy defining who can access or manage the secret. 7793 SecretPolicy *string `locationName:"secretPolicy" type:"string"` 7794} 7795 7796// String returns the string representation 7797func (s SecretsManagerSecretConfiguration) String() string { 7798 return awsutil.Prettify(s) 7799} 7800 7801// GoString returns the string representation 7802func (s SecretsManagerSecretConfiguration) GoString() string { 7803 return s.String() 7804} 7805 7806// SetKmsKeyId sets the KmsKeyId field's value. 7807func (s *SecretsManagerSecretConfiguration) SetKmsKeyId(v string) *SecretsManagerSecretConfiguration { 7808 s.KmsKeyId = &v 7809 return s 7810} 7811 7812// SetSecretPolicy sets the SecretPolicy field's value. 7813func (s *SecretsManagerSecretConfiguration) SetSecretPolicy(v string) *SecretsManagerSecretConfiguration { 7814 s.SecretPolicy = &v 7815 return s 7816} 7817 7818// Service quote met error. 7819type ServiceQuotaExceededException struct { 7820 _ struct{} `type:"structure"` 7821 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 7822 7823 Message_ *string `locationName:"message" type:"string"` 7824 7825 // The resource ID. 7826 // 7827 // ResourceId is a required field 7828 ResourceId *string `locationName:"resourceId" type:"string" required:"true"` 7829 7830 // The resource type. 7831 // 7832 // ResourceType is a required field 7833 ResourceType *string `locationName:"resourceType" type:"string" required:"true"` 7834} 7835 7836// String returns the string representation 7837func (s ServiceQuotaExceededException) String() string { 7838 return awsutil.Prettify(s) 7839} 7840 7841// GoString returns the string representation 7842func (s ServiceQuotaExceededException) GoString() string { 7843 return s.String() 7844} 7845 7846func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error { 7847 return &ServiceQuotaExceededException{ 7848 RespMetadata: v, 7849 } 7850} 7851 7852// Code returns the exception type name. 7853func (s *ServiceQuotaExceededException) Code() string { 7854 return "ServiceQuotaExceededException" 7855} 7856 7857// Message returns the exception's message. 7858func (s *ServiceQuotaExceededException) Message() string { 7859 if s.Message_ != nil { 7860 return *s.Message_ 7861 } 7862 return "" 7863} 7864 7865// OrigErr always returns nil, satisfies awserr.Error interface. 7866func (s *ServiceQuotaExceededException) OrigErr() error { 7867 return nil 7868} 7869 7870func (s *ServiceQuotaExceededException) Error() string { 7871 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 7872} 7873 7874// Status code returns the HTTP status code for the request's response error. 7875func (s *ServiceQuotaExceededException) StatusCode() int { 7876 return s.RespMetadata.StatusCode 7877} 7878 7879// RequestID returns the service's response RequestID for request. 7880func (s *ServiceQuotaExceededException) RequestID() string { 7881 return s.RespMetadata.RequestID 7882} 7883 7884// The criteria used to sort. 7885type SortCriteria struct { 7886 _ struct{} `type:"structure"` 7887 7888 // The name of the attribute to sort on. 7889 AttributeName *string `locationName:"attributeName" type:"string"` 7890 7891 // The sort order, ascending or descending. 7892 OrderBy *string `locationName:"orderBy" type:"string" enum:"OrderBy"` 7893} 7894 7895// String returns the string representation 7896func (s SortCriteria) String() string { 7897 return awsutil.Prettify(s) 7898} 7899 7900// GoString returns the string representation 7901func (s SortCriteria) GoString() string { 7902 return s.String() 7903} 7904 7905// SetAttributeName sets the AttributeName field's value. 7906func (s *SortCriteria) SetAttributeName(v string) *SortCriteria { 7907 s.AttributeName = &v 7908 return s 7909} 7910 7911// SetOrderBy sets the OrderBy field's value. 7912func (s *SortCriteria) SetOrderBy(v string) *SortCriteria { 7913 s.OrderBy = &v 7914 return s 7915} 7916 7917// A span in a policy. The span consists of a start position (inclusive) and 7918// end position (exclusive). 7919type Span struct { 7920 _ struct{} `type:"structure"` 7921 7922 // The end position of the span (exclusive). 7923 // 7924 // End is a required field 7925 End *Position `locationName:"end" type:"structure" required:"true"` 7926 7927 // The start position of the span (inclusive). 7928 // 7929 // Start is a required field 7930 Start *Position `locationName:"start" type:"structure" required:"true"` 7931} 7932 7933// String returns the string representation 7934func (s Span) String() string { 7935 return awsutil.Prettify(s) 7936} 7937 7938// GoString returns the string representation 7939func (s Span) GoString() string { 7940 return s.String() 7941} 7942 7943// SetEnd sets the End field's value. 7944func (s *Span) SetEnd(v *Position) *Span { 7945 s.End = v 7946 return s 7947} 7948 7949// SetStart sets the Start field's value. 7950func (s *Span) SetStart(v *Position) *Span { 7951 s.Start = v 7952 return s 7953} 7954 7955// The proposed access control configuration for an SQS queue. You can propose 7956// a configuration for a new SQS queue or an existing SQS queue that you own 7957// by specifying the SQS policy. If the configuration is for an existing SQS 7958// queue and you do not specify the SQS policy, the access preview uses the 7959// existing SQS policy for the queue. If the access preview is for a new resource 7960// and you do not specify the policy, the access preview assumes an SQS queue 7961// without a policy. To propose deletion of an existing SQS queue policy, you 7962// can specify an empty string for the SQS policy. For more information about 7963// SQS policy limits, see Quotas related to policies (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/quotas-policies.html). 7964type SqsQueueConfiguration struct { 7965 _ struct{} `type:"structure"` 7966 7967 // The proposed resource policy for the SQS queue. 7968 QueuePolicy *string `locationName:"queuePolicy" type:"string"` 7969} 7970 7971// String returns the string representation 7972func (s SqsQueueConfiguration) String() string { 7973 return awsutil.Prettify(s) 7974} 7975 7976// GoString returns the string representation 7977func (s SqsQueueConfiguration) GoString() string { 7978 return s.String() 7979} 7980 7981// SetQueuePolicy sets the QueuePolicy field's value. 7982func (s *SqsQueueConfiguration) SetQueuePolicy(v string) *SqsQueueConfiguration { 7983 s.QueuePolicy = &v 7984 return s 7985} 7986 7987type StartPolicyGenerationInput struct { 7988 _ struct{} `type:"structure"` 7989 7990 // A unique, case-sensitive identifier that you provide to ensure the idempotency 7991 // of the request. Idempotency ensures that an API request completes only once. 7992 // With an idempotent request, if the original request completes successfully, 7993 // the subsequent retries with the same client token return the result from 7994 // the original successful request and they have no additional effect. 7995 // 7996 // If you do not specify a client token, one is automatically generated by the 7997 // AWS SDK. 7998 ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` 7999 8000 // A CloudTrailDetails object that contains details about a Trail that you want 8001 // to analyze to generate policies. 8002 CloudTrailDetails *CloudTrailDetails `locationName:"cloudTrailDetails" type:"structure"` 8003 8004 // Contains the ARN of the IAM entity (user or role) for which you are generating 8005 // a policy. 8006 // 8007 // PolicyGenerationDetails is a required field 8008 PolicyGenerationDetails *PolicyGenerationDetails `locationName:"policyGenerationDetails" type:"structure" required:"true"` 8009} 8010 8011// String returns the string representation 8012func (s StartPolicyGenerationInput) String() string { 8013 return awsutil.Prettify(s) 8014} 8015 8016// GoString returns the string representation 8017func (s StartPolicyGenerationInput) GoString() string { 8018 return s.String() 8019} 8020 8021// Validate inspects the fields of the type to determine if they are valid. 8022func (s *StartPolicyGenerationInput) Validate() error { 8023 invalidParams := request.ErrInvalidParams{Context: "StartPolicyGenerationInput"} 8024 if s.PolicyGenerationDetails == nil { 8025 invalidParams.Add(request.NewErrParamRequired("PolicyGenerationDetails")) 8026 } 8027 if s.CloudTrailDetails != nil { 8028 if err := s.CloudTrailDetails.Validate(); err != nil { 8029 invalidParams.AddNested("CloudTrailDetails", err.(request.ErrInvalidParams)) 8030 } 8031 } 8032 if s.PolicyGenerationDetails != nil { 8033 if err := s.PolicyGenerationDetails.Validate(); err != nil { 8034 invalidParams.AddNested("PolicyGenerationDetails", err.(request.ErrInvalidParams)) 8035 } 8036 } 8037 8038 if invalidParams.Len() > 0 { 8039 return invalidParams 8040 } 8041 return nil 8042} 8043 8044// SetClientToken sets the ClientToken field's value. 8045func (s *StartPolicyGenerationInput) SetClientToken(v string) *StartPolicyGenerationInput { 8046 s.ClientToken = &v 8047 return s 8048} 8049 8050// SetCloudTrailDetails sets the CloudTrailDetails field's value. 8051func (s *StartPolicyGenerationInput) SetCloudTrailDetails(v *CloudTrailDetails) *StartPolicyGenerationInput { 8052 s.CloudTrailDetails = v 8053 return s 8054} 8055 8056// SetPolicyGenerationDetails sets the PolicyGenerationDetails field's value. 8057func (s *StartPolicyGenerationInput) SetPolicyGenerationDetails(v *PolicyGenerationDetails) *StartPolicyGenerationInput { 8058 s.PolicyGenerationDetails = v 8059 return s 8060} 8061 8062type StartPolicyGenerationOutput struct { 8063 _ struct{} `type:"structure"` 8064 8065 // The JobId that is returned by the StartPolicyGeneration operation. The JobId 8066 // can be used with GetGeneratedPolicy to retrieve the generated policies or 8067 // used with CancelPolicyGeneration to cancel the policy generation request. 8068 // 8069 // JobId is a required field 8070 JobId *string `locationName:"jobId" type:"string" required:"true"` 8071} 8072 8073// String returns the string representation 8074func (s StartPolicyGenerationOutput) String() string { 8075 return awsutil.Prettify(s) 8076} 8077 8078// GoString returns the string representation 8079func (s StartPolicyGenerationOutput) GoString() string { 8080 return s.String() 8081} 8082 8083// SetJobId sets the JobId field's value. 8084func (s *StartPolicyGenerationOutput) SetJobId(v string) *StartPolicyGenerationOutput { 8085 s.JobId = &v 8086 return s 8087} 8088 8089// Starts a scan of the policies applied to the specified resource. 8090type StartResourceScanInput struct { 8091 _ struct{} `type:"structure"` 8092 8093 // The ARN of the analyzer (https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources) 8094 // to use to scan the policies applied to the specified resource. 8095 // 8096 // AnalyzerArn is a required field 8097 AnalyzerArn *string `locationName:"analyzerArn" type:"string" required:"true"` 8098 8099 // The ARN of the resource to scan. 8100 // 8101 // ResourceArn is a required field 8102 ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` 8103} 8104 8105// String returns the string representation 8106func (s StartResourceScanInput) String() string { 8107 return awsutil.Prettify(s) 8108} 8109 8110// GoString returns the string representation 8111func (s StartResourceScanInput) GoString() string { 8112 return s.String() 8113} 8114 8115// Validate inspects the fields of the type to determine if they are valid. 8116func (s *StartResourceScanInput) Validate() error { 8117 invalidParams := request.ErrInvalidParams{Context: "StartResourceScanInput"} 8118 if s.AnalyzerArn == nil { 8119 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 8120 } 8121 if s.ResourceArn == nil { 8122 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 8123 } 8124 8125 if invalidParams.Len() > 0 { 8126 return invalidParams 8127 } 8128 return nil 8129} 8130 8131// SetAnalyzerArn sets the AnalyzerArn field's value. 8132func (s *StartResourceScanInput) SetAnalyzerArn(v string) *StartResourceScanInput { 8133 s.AnalyzerArn = &v 8134 return s 8135} 8136 8137// SetResourceArn sets the ResourceArn field's value. 8138func (s *StartResourceScanInput) SetResourceArn(v string) *StartResourceScanInput { 8139 s.ResourceArn = &v 8140 return s 8141} 8142 8143type StartResourceScanOutput struct { 8144 _ struct{} `type:"structure"` 8145} 8146 8147// String returns the string representation 8148func (s StartResourceScanOutput) String() string { 8149 return awsutil.Prettify(s) 8150} 8151 8152// GoString returns the string representation 8153func (s StartResourceScanOutput) GoString() string { 8154 return s.String() 8155} 8156 8157// Provides more details about the current status of the analyzer. For example, 8158// if the creation for the analyzer fails, a Failed status is returned. For 8159// an analyzer with organization as the type, this failure can be due to an 8160// issue with creating the service-linked roles required in the member accounts 8161// of the AWS organization. 8162type StatusReason struct { 8163 _ struct{} `type:"structure"` 8164 8165 // The reason code for the current status of the analyzer. 8166 // 8167 // Code is a required field 8168 Code *string `locationName:"code" type:"string" required:"true" enum:"ReasonCode"` 8169} 8170 8171// String returns the string representation 8172func (s StatusReason) String() string { 8173 return awsutil.Prettify(s) 8174} 8175 8176// GoString returns the string representation 8177func (s StatusReason) GoString() string { 8178 return s.String() 8179} 8180 8181// SetCode sets the Code field's value. 8182func (s *StatusReason) SetCode(v string) *StatusReason { 8183 s.Code = &v 8184 return s 8185} 8186 8187// A reference to a substring of a literal string in a JSON document. 8188type Substring struct { 8189 _ struct{} `type:"structure"` 8190 8191 // The length of the substring. 8192 // 8193 // Length is a required field 8194 Length *int64 `locationName:"length" type:"integer" required:"true"` 8195 8196 // The start index of the substring, starting from 0. 8197 // 8198 // Start is a required field 8199 Start *int64 `locationName:"start" type:"integer" required:"true"` 8200} 8201 8202// String returns the string representation 8203func (s Substring) String() string { 8204 return awsutil.Prettify(s) 8205} 8206 8207// GoString returns the string representation 8208func (s Substring) GoString() string { 8209 return s.String() 8210} 8211 8212// SetLength sets the Length field's value. 8213func (s *Substring) SetLength(v int64) *Substring { 8214 s.Length = &v 8215 return s 8216} 8217 8218// SetStart sets the Start field's value. 8219func (s *Substring) SetStart(v int64) *Substring { 8220 s.Start = &v 8221 return s 8222} 8223 8224// Adds a tag to the specified resource. 8225type TagResourceInput struct { 8226 _ struct{} `type:"structure"` 8227 8228 // The ARN of the resource to add the tag to. 8229 // 8230 // ResourceArn is a required field 8231 ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` 8232 8233 // The tags to add to the resource. 8234 // 8235 // Tags is a required field 8236 Tags map[string]*string `locationName:"tags" type:"map" required:"true"` 8237} 8238 8239// String returns the string representation 8240func (s TagResourceInput) String() string { 8241 return awsutil.Prettify(s) 8242} 8243 8244// GoString returns the string representation 8245func (s TagResourceInput) GoString() string { 8246 return s.String() 8247} 8248 8249// Validate inspects the fields of the type to determine if they are valid. 8250func (s *TagResourceInput) Validate() error { 8251 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 8252 if s.ResourceArn == nil { 8253 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 8254 } 8255 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 8256 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 8257 } 8258 if s.Tags == nil { 8259 invalidParams.Add(request.NewErrParamRequired("Tags")) 8260 } 8261 8262 if invalidParams.Len() > 0 { 8263 return invalidParams 8264 } 8265 return nil 8266} 8267 8268// SetResourceArn sets the ResourceArn field's value. 8269func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { 8270 s.ResourceArn = &v 8271 return s 8272} 8273 8274// SetTags sets the Tags field's value. 8275func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput { 8276 s.Tags = v 8277 return s 8278} 8279 8280// The response to the request. 8281type TagResourceOutput struct { 8282 _ struct{} `type:"structure"` 8283} 8284 8285// String returns the string representation 8286func (s TagResourceOutput) String() string { 8287 return awsutil.Prettify(s) 8288} 8289 8290// GoString returns the string representation 8291func (s TagResourceOutput) GoString() string { 8292 return s.String() 8293} 8294 8295// Throttling limit exceeded error. 8296type ThrottlingException struct { 8297 _ struct{} `type:"structure"` 8298 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 8299 8300 Message_ *string `locationName:"message" type:"string"` 8301 8302 // The seconds to wait to retry. 8303 RetryAfterSeconds *int64 `location:"header" locationName:"Retry-After" type:"integer"` 8304} 8305 8306// String returns the string representation 8307func (s ThrottlingException) String() string { 8308 return awsutil.Prettify(s) 8309} 8310 8311// GoString returns the string representation 8312func (s ThrottlingException) GoString() string { 8313 return s.String() 8314} 8315 8316func newErrorThrottlingException(v protocol.ResponseMetadata) error { 8317 return &ThrottlingException{ 8318 RespMetadata: v, 8319 } 8320} 8321 8322// Code returns the exception type name. 8323func (s *ThrottlingException) Code() string { 8324 return "ThrottlingException" 8325} 8326 8327// Message returns the exception's message. 8328func (s *ThrottlingException) Message() string { 8329 if s.Message_ != nil { 8330 return *s.Message_ 8331 } 8332 return "" 8333} 8334 8335// OrigErr always returns nil, satisfies awserr.Error interface. 8336func (s *ThrottlingException) OrigErr() error { 8337 return nil 8338} 8339 8340func (s *ThrottlingException) Error() string { 8341 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 8342} 8343 8344// Status code returns the HTTP status code for the request's response error. 8345func (s *ThrottlingException) StatusCode() int { 8346 return s.RespMetadata.StatusCode 8347} 8348 8349// RequestID returns the service's response RequestID for request. 8350func (s *ThrottlingException) RequestID() string { 8351 return s.RespMetadata.RequestID 8352} 8353 8354// Contains details about the CloudTrail trail being analyzed to generate a 8355// policy. 8356type Trail struct { 8357 _ struct{} `type:"structure"` 8358 8359 // Possible values are true or false. If set to true, Access Analyzer retrieves 8360 // CloudTrail data from all regions to analyze and generate a policy. 8361 AllRegions *bool `locationName:"allRegions" type:"boolean"` 8362 8363 // Specifies the ARN of the trail. The format of a trail ARN is arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail. 8364 // 8365 // CloudTrailArn is a required field 8366 CloudTrailArn *string `locationName:"cloudTrailArn" type:"string" required:"true"` 8367 8368 // A list of regions to get CloudTrail data from and analyze to generate a policy. 8369 Regions []*string `locationName:"regions" type:"list"` 8370} 8371 8372// String returns the string representation 8373func (s Trail) String() string { 8374 return awsutil.Prettify(s) 8375} 8376 8377// GoString returns the string representation 8378func (s Trail) GoString() string { 8379 return s.String() 8380} 8381 8382// Validate inspects the fields of the type to determine if they are valid. 8383func (s *Trail) Validate() error { 8384 invalidParams := request.ErrInvalidParams{Context: "Trail"} 8385 if s.CloudTrailArn == nil { 8386 invalidParams.Add(request.NewErrParamRequired("CloudTrailArn")) 8387 } 8388 8389 if invalidParams.Len() > 0 { 8390 return invalidParams 8391 } 8392 return nil 8393} 8394 8395// SetAllRegions sets the AllRegions field's value. 8396func (s *Trail) SetAllRegions(v bool) *Trail { 8397 s.AllRegions = &v 8398 return s 8399} 8400 8401// SetCloudTrailArn sets the CloudTrailArn field's value. 8402func (s *Trail) SetCloudTrailArn(v string) *Trail { 8403 s.CloudTrailArn = &v 8404 return s 8405} 8406 8407// SetRegions sets the Regions field's value. 8408func (s *Trail) SetRegions(v []*string) *Trail { 8409 s.Regions = v 8410 return s 8411} 8412 8413// Contains details about the CloudTrail trail being analyzed to generate a 8414// policy. 8415type TrailProperties struct { 8416 _ struct{} `type:"structure"` 8417 8418 // Possible values are true or false. If set to true, Access Analyzer retrieves 8419 // CloudTrail data from all regions to analyze and generate a policy. 8420 AllRegions *bool `locationName:"allRegions" type:"boolean"` 8421 8422 // Specifies the ARN of the trail. The format of a trail ARN is arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail. 8423 // 8424 // CloudTrailArn is a required field 8425 CloudTrailArn *string `locationName:"cloudTrailArn" type:"string" required:"true"` 8426 8427 // A list of regions to get CloudTrail data from and analyze to generate a policy. 8428 Regions []*string `locationName:"regions" type:"list"` 8429} 8430 8431// String returns the string representation 8432func (s TrailProperties) String() string { 8433 return awsutil.Prettify(s) 8434} 8435 8436// GoString returns the string representation 8437func (s TrailProperties) GoString() string { 8438 return s.String() 8439} 8440 8441// SetAllRegions sets the AllRegions field's value. 8442func (s *TrailProperties) SetAllRegions(v bool) *TrailProperties { 8443 s.AllRegions = &v 8444 return s 8445} 8446 8447// SetCloudTrailArn sets the CloudTrailArn field's value. 8448func (s *TrailProperties) SetCloudTrailArn(v string) *TrailProperties { 8449 s.CloudTrailArn = &v 8450 return s 8451} 8452 8453// SetRegions sets the Regions field's value. 8454func (s *TrailProperties) SetRegions(v []*string) *TrailProperties { 8455 s.Regions = v 8456 return s 8457} 8458 8459// Removes a tag from the specified resource. 8460type UntagResourceInput struct { 8461 _ struct{} `type:"structure"` 8462 8463 // The ARN of the resource to remove the tag from. 8464 // 8465 // ResourceArn is a required field 8466 ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` 8467 8468 // The key for the tag to add. 8469 // 8470 // TagKeys is a required field 8471 TagKeys []*string `location:"querystring" locationName:"tagKeys" type:"list" required:"true"` 8472} 8473 8474// String returns the string representation 8475func (s UntagResourceInput) String() string { 8476 return awsutil.Prettify(s) 8477} 8478 8479// GoString returns the string representation 8480func (s UntagResourceInput) GoString() string { 8481 return s.String() 8482} 8483 8484// Validate inspects the fields of the type to determine if they are valid. 8485func (s *UntagResourceInput) Validate() error { 8486 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 8487 if s.ResourceArn == nil { 8488 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 8489 } 8490 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 8491 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 8492 } 8493 if s.TagKeys == nil { 8494 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 8495 } 8496 8497 if invalidParams.Len() > 0 { 8498 return invalidParams 8499 } 8500 return nil 8501} 8502 8503// SetResourceArn sets the ResourceArn field's value. 8504func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { 8505 s.ResourceArn = &v 8506 return s 8507} 8508 8509// SetTagKeys sets the TagKeys field's value. 8510func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 8511 s.TagKeys = v 8512 return s 8513} 8514 8515// The response to the request. 8516type UntagResourceOutput struct { 8517 _ struct{} `type:"structure"` 8518} 8519 8520// String returns the string representation 8521func (s UntagResourceOutput) String() string { 8522 return awsutil.Prettify(s) 8523} 8524 8525// GoString returns the string representation 8526func (s UntagResourceOutput) GoString() string { 8527 return s.String() 8528} 8529 8530// Updates the specified archive rule. 8531type UpdateArchiveRuleInput struct { 8532 _ struct{} `type:"structure"` 8533 8534 // The name of the analyzer to update the archive rules for. 8535 // 8536 // AnalyzerName is a required field 8537 AnalyzerName *string `location:"uri" locationName:"analyzerName" min:"1" type:"string" required:"true"` 8538 8539 // A client token. 8540 ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` 8541 8542 // A filter to match for the rules to update. Only rules that match the filter 8543 // are updated. 8544 // 8545 // Filter is a required field 8546 Filter map[string]*Criterion `locationName:"filter" type:"map" required:"true"` 8547 8548 // The name of the rule to update. 8549 // 8550 // RuleName is a required field 8551 RuleName *string `location:"uri" locationName:"ruleName" min:"1" type:"string" required:"true"` 8552} 8553 8554// String returns the string representation 8555func (s UpdateArchiveRuleInput) String() string { 8556 return awsutil.Prettify(s) 8557} 8558 8559// GoString returns the string representation 8560func (s UpdateArchiveRuleInput) GoString() string { 8561 return s.String() 8562} 8563 8564// Validate inspects the fields of the type to determine if they are valid. 8565func (s *UpdateArchiveRuleInput) Validate() error { 8566 invalidParams := request.ErrInvalidParams{Context: "UpdateArchiveRuleInput"} 8567 if s.AnalyzerName == nil { 8568 invalidParams.Add(request.NewErrParamRequired("AnalyzerName")) 8569 } 8570 if s.AnalyzerName != nil && len(*s.AnalyzerName) < 1 { 8571 invalidParams.Add(request.NewErrParamMinLen("AnalyzerName", 1)) 8572 } 8573 if s.Filter == nil { 8574 invalidParams.Add(request.NewErrParamRequired("Filter")) 8575 } 8576 if s.RuleName == nil { 8577 invalidParams.Add(request.NewErrParamRequired("RuleName")) 8578 } 8579 if s.RuleName != nil && len(*s.RuleName) < 1 { 8580 invalidParams.Add(request.NewErrParamMinLen("RuleName", 1)) 8581 } 8582 if s.Filter != nil { 8583 for i, v := range s.Filter { 8584 if v == nil { 8585 continue 8586 } 8587 if err := v.Validate(); err != nil { 8588 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filter", i), err.(request.ErrInvalidParams)) 8589 } 8590 } 8591 } 8592 8593 if invalidParams.Len() > 0 { 8594 return invalidParams 8595 } 8596 return nil 8597} 8598 8599// SetAnalyzerName sets the AnalyzerName field's value. 8600func (s *UpdateArchiveRuleInput) SetAnalyzerName(v string) *UpdateArchiveRuleInput { 8601 s.AnalyzerName = &v 8602 return s 8603} 8604 8605// SetClientToken sets the ClientToken field's value. 8606func (s *UpdateArchiveRuleInput) SetClientToken(v string) *UpdateArchiveRuleInput { 8607 s.ClientToken = &v 8608 return s 8609} 8610 8611// SetFilter sets the Filter field's value. 8612func (s *UpdateArchiveRuleInput) SetFilter(v map[string]*Criterion) *UpdateArchiveRuleInput { 8613 s.Filter = v 8614 return s 8615} 8616 8617// SetRuleName sets the RuleName field's value. 8618func (s *UpdateArchiveRuleInput) SetRuleName(v string) *UpdateArchiveRuleInput { 8619 s.RuleName = &v 8620 return s 8621} 8622 8623type UpdateArchiveRuleOutput struct { 8624 _ struct{} `type:"structure"` 8625} 8626 8627// String returns the string representation 8628func (s UpdateArchiveRuleOutput) String() string { 8629 return awsutil.Prettify(s) 8630} 8631 8632// GoString returns the string representation 8633func (s UpdateArchiveRuleOutput) GoString() string { 8634 return s.String() 8635} 8636 8637// Updates findings with the new values provided in the request. 8638type UpdateFindingsInput struct { 8639 _ struct{} `type:"structure"` 8640 8641 // The ARN of the analyzer (https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources) 8642 // that generated the findings to update. 8643 // 8644 // AnalyzerArn is a required field 8645 AnalyzerArn *string `locationName:"analyzerArn" type:"string" required:"true"` 8646 8647 // A client token. 8648 ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` 8649 8650 // The IDs of the findings to update. 8651 Ids []*string `locationName:"ids" type:"list"` 8652 8653 // The ARN of the resource identified in the finding. 8654 ResourceArn *string `locationName:"resourceArn" type:"string"` 8655 8656 // The state represents the action to take to update the finding Status. Use 8657 // ARCHIVE to change an Active finding to an Archived finding. Use ACTIVE to 8658 // change an Archived finding to an Active finding. 8659 // 8660 // Status is a required field 8661 Status *string `locationName:"status" type:"string" required:"true" enum:"FindingStatusUpdate"` 8662} 8663 8664// String returns the string representation 8665func (s UpdateFindingsInput) String() string { 8666 return awsutil.Prettify(s) 8667} 8668 8669// GoString returns the string representation 8670func (s UpdateFindingsInput) GoString() string { 8671 return s.String() 8672} 8673 8674// Validate inspects the fields of the type to determine if they are valid. 8675func (s *UpdateFindingsInput) Validate() error { 8676 invalidParams := request.ErrInvalidParams{Context: "UpdateFindingsInput"} 8677 if s.AnalyzerArn == nil { 8678 invalidParams.Add(request.NewErrParamRequired("AnalyzerArn")) 8679 } 8680 if s.Status == nil { 8681 invalidParams.Add(request.NewErrParamRequired("Status")) 8682 } 8683 8684 if invalidParams.Len() > 0 { 8685 return invalidParams 8686 } 8687 return nil 8688} 8689 8690// SetAnalyzerArn sets the AnalyzerArn field's value. 8691func (s *UpdateFindingsInput) SetAnalyzerArn(v string) *UpdateFindingsInput { 8692 s.AnalyzerArn = &v 8693 return s 8694} 8695 8696// SetClientToken sets the ClientToken field's value. 8697func (s *UpdateFindingsInput) SetClientToken(v string) *UpdateFindingsInput { 8698 s.ClientToken = &v 8699 return s 8700} 8701 8702// SetIds sets the Ids field's value. 8703func (s *UpdateFindingsInput) SetIds(v []*string) *UpdateFindingsInput { 8704 s.Ids = v 8705 return s 8706} 8707 8708// SetResourceArn sets the ResourceArn field's value. 8709func (s *UpdateFindingsInput) SetResourceArn(v string) *UpdateFindingsInput { 8710 s.ResourceArn = &v 8711 return s 8712} 8713 8714// SetStatus sets the Status field's value. 8715func (s *UpdateFindingsInput) SetStatus(v string) *UpdateFindingsInput { 8716 s.Status = &v 8717 return s 8718} 8719 8720type UpdateFindingsOutput struct { 8721 _ struct{} `type:"structure"` 8722} 8723 8724// String returns the string representation 8725func (s UpdateFindingsOutput) String() string { 8726 return awsutil.Prettify(s) 8727} 8728 8729// GoString returns the string representation 8730func (s UpdateFindingsOutput) GoString() string { 8731 return s.String() 8732} 8733 8734// A finding in a policy. Each finding is an actionable recommendation that 8735// can be used to improve the policy. 8736type ValidatePolicyFinding struct { 8737 _ struct{} `type:"structure"` 8738 8739 // A localized message that explains the finding and provides guidance on how 8740 // to address it. 8741 // 8742 // FindingDetails is a required field 8743 FindingDetails *string `locationName:"findingDetails" type:"string" required:"true"` 8744 8745 // The impact of the finding. 8746 // 8747 // Security warnings report when the policy allows access that we consider overly 8748 // permissive. 8749 // 8750 // Errors report when a part of the policy is not functional. 8751 // 8752 // Warnings report non-security issues when a policy does not conform to policy 8753 // writing best practices. 8754 // 8755 // Suggestions recommend stylistic improvements in the policy that do not impact 8756 // access. 8757 // 8758 // FindingType is a required field 8759 FindingType *string `locationName:"findingType" type:"string" required:"true" enum:"ValidatePolicyFindingType"` 8760 8761 // The issue code provides an identifier of the issue associated with this finding. 8762 // 8763 // IssueCode is a required field 8764 IssueCode *string `locationName:"issueCode" type:"string" required:"true"` 8765 8766 // A link to additional documentation about the type of finding. 8767 // 8768 // LearnMoreLink is a required field 8769 LearnMoreLink *string `locationName:"learnMoreLink" type:"string" required:"true"` 8770 8771 // The list of locations in the policy document that are related to the finding. 8772 // The issue code provides a summary of an issue identified by the finding. 8773 // 8774 // Locations is a required field 8775 Locations []*Location `locationName:"locations" type:"list" required:"true"` 8776} 8777 8778// String returns the string representation 8779func (s ValidatePolicyFinding) String() string { 8780 return awsutil.Prettify(s) 8781} 8782 8783// GoString returns the string representation 8784func (s ValidatePolicyFinding) GoString() string { 8785 return s.String() 8786} 8787 8788// SetFindingDetails sets the FindingDetails field's value. 8789func (s *ValidatePolicyFinding) SetFindingDetails(v string) *ValidatePolicyFinding { 8790 s.FindingDetails = &v 8791 return s 8792} 8793 8794// SetFindingType sets the FindingType field's value. 8795func (s *ValidatePolicyFinding) SetFindingType(v string) *ValidatePolicyFinding { 8796 s.FindingType = &v 8797 return s 8798} 8799 8800// SetIssueCode sets the IssueCode field's value. 8801func (s *ValidatePolicyFinding) SetIssueCode(v string) *ValidatePolicyFinding { 8802 s.IssueCode = &v 8803 return s 8804} 8805 8806// SetLearnMoreLink sets the LearnMoreLink field's value. 8807func (s *ValidatePolicyFinding) SetLearnMoreLink(v string) *ValidatePolicyFinding { 8808 s.LearnMoreLink = &v 8809 return s 8810} 8811 8812// SetLocations sets the Locations field's value. 8813func (s *ValidatePolicyFinding) SetLocations(v []*Location) *ValidatePolicyFinding { 8814 s.Locations = v 8815 return s 8816} 8817 8818type ValidatePolicyInput struct { 8819 _ struct{} `type:"structure"` 8820 8821 // The locale to use for localizing the findings. 8822 Locale *string `locationName:"locale" type:"string" enum:"Locale"` 8823 8824 // The maximum number of results to return in the response. 8825 MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` 8826 8827 // A token used for pagination of results returned. 8828 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 8829 8830 // The JSON policy document to use as the content for the policy. 8831 // 8832 // PolicyDocument is a required field 8833 PolicyDocument *string `locationName:"policyDocument" type:"string" required:"true"` 8834 8835 // The type of policy to validate. Identity policies grant permissions to IAM 8836 // principals. Identity policies include managed and inline policies for IAM 8837 // roles, users, and groups. They also include service-control policies (SCPs) 8838 // that are attached to an AWS organization, organizational unit (OU), or an 8839 // account. 8840 // 8841 // Resource policies grant permissions on AWS resources. Resource policies include 8842 // trust policies for IAM roles and bucket policies for S3 buckets. You can 8843 // provide a generic input such as identity policy or resource policy or a specific 8844 // input such as managed policy or S3 bucket policy. 8845 // 8846 // PolicyType is a required field 8847 PolicyType *string `locationName:"policyType" type:"string" required:"true" enum:"PolicyType"` 8848} 8849 8850// String returns the string representation 8851func (s ValidatePolicyInput) String() string { 8852 return awsutil.Prettify(s) 8853} 8854 8855// GoString returns the string representation 8856func (s ValidatePolicyInput) GoString() string { 8857 return s.String() 8858} 8859 8860// Validate inspects the fields of the type to determine if they are valid. 8861func (s *ValidatePolicyInput) Validate() error { 8862 invalidParams := request.ErrInvalidParams{Context: "ValidatePolicyInput"} 8863 if s.PolicyDocument == nil { 8864 invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) 8865 } 8866 if s.PolicyType == nil { 8867 invalidParams.Add(request.NewErrParamRequired("PolicyType")) 8868 } 8869 8870 if invalidParams.Len() > 0 { 8871 return invalidParams 8872 } 8873 return nil 8874} 8875 8876// SetLocale sets the Locale field's value. 8877func (s *ValidatePolicyInput) SetLocale(v string) *ValidatePolicyInput { 8878 s.Locale = &v 8879 return s 8880} 8881 8882// SetMaxResults sets the MaxResults field's value. 8883func (s *ValidatePolicyInput) SetMaxResults(v int64) *ValidatePolicyInput { 8884 s.MaxResults = &v 8885 return s 8886} 8887 8888// SetNextToken sets the NextToken field's value. 8889func (s *ValidatePolicyInput) SetNextToken(v string) *ValidatePolicyInput { 8890 s.NextToken = &v 8891 return s 8892} 8893 8894// SetPolicyDocument sets the PolicyDocument field's value. 8895func (s *ValidatePolicyInput) SetPolicyDocument(v string) *ValidatePolicyInput { 8896 s.PolicyDocument = &v 8897 return s 8898} 8899 8900// SetPolicyType sets the PolicyType field's value. 8901func (s *ValidatePolicyInput) SetPolicyType(v string) *ValidatePolicyInput { 8902 s.PolicyType = &v 8903 return s 8904} 8905 8906type ValidatePolicyOutput struct { 8907 _ struct{} `type:"structure"` 8908 8909 // The list of findings in a policy returned by Access Analyzer based on its 8910 // suite of policy checks. 8911 // 8912 // Findings is a required field 8913 Findings []*ValidatePolicyFinding `locationName:"findings" type:"list" required:"true"` 8914 8915 // A token used for pagination of results returned. 8916 NextToken *string `locationName:"nextToken" type:"string"` 8917} 8918 8919// String returns the string representation 8920func (s ValidatePolicyOutput) String() string { 8921 return awsutil.Prettify(s) 8922} 8923 8924// GoString returns the string representation 8925func (s ValidatePolicyOutput) GoString() string { 8926 return s.String() 8927} 8928 8929// SetFindings sets the Findings field's value. 8930func (s *ValidatePolicyOutput) SetFindings(v []*ValidatePolicyFinding) *ValidatePolicyOutput { 8931 s.Findings = v 8932 return s 8933} 8934 8935// SetNextToken sets the NextToken field's value. 8936func (s *ValidatePolicyOutput) SetNextToken(v string) *ValidatePolicyOutput { 8937 s.NextToken = &v 8938 return s 8939} 8940 8941// Validation exception error. 8942type ValidationException struct { 8943 _ struct{} `type:"structure"` 8944 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 8945 8946 // A list of fields that didn't validate. 8947 FieldList []*ValidationExceptionField `locationName:"fieldList" type:"list"` 8948 8949 Message_ *string `locationName:"message" type:"string"` 8950 8951 // The reason for the exception. 8952 // 8953 // Reason is a required field 8954 Reason *string `locationName:"reason" type:"string" required:"true" enum:"ValidationExceptionReason"` 8955} 8956 8957// String returns the string representation 8958func (s ValidationException) String() string { 8959 return awsutil.Prettify(s) 8960} 8961 8962// GoString returns the string representation 8963func (s ValidationException) GoString() string { 8964 return s.String() 8965} 8966 8967func newErrorValidationException(v protocol.ResponseMetadata) error { 8968 return &ValidationException{ 8969 RespMetadata: v, 8970 } 8971} 8972 8973// Code returns the exception type name. 8974func (s *ValidationException) Code() string { 8975 return "ValidationException" 8976} 8977 8978// Message returns the exception's message. 8979func (s *ValidationException) Message() string { 8980 if s.Message_ != nil { 8981 return *s.Message_ 8982 } 8983 return "" 8984} 8985 8986// OrigErr always returns nil, satisfies awserr.Error interface. 8987func (s *ValidationException) OrigErr() error { 8988 return nil 8989} 8990 8991func (s *ValidationException) Error() string { 8992 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 8993} 8994 8995// Status code returns the HTTP status code for the request's response error. 8996func (s *ValidationException) StatusCode() int { 8997 return s.RespMetadata.StatusCode 8998} 8999 9000// RequestID returns the service's response RequestID for request. 9001func (s *ValidationException) RequestID() string { 9002 return s.RespMetadata.RequestID 9003} 9004 9005// Contains information about a validation exception. 9006type ValidationExceptionField struct { 9007 _ struct{} `type:"structure"` 9008 9009 // A message about the validation exception. 9010 // 9011 // Message is a required field 9012 Message *string `locationName:"message" type:"string" required:"true"` 9013 9014 // The name of the validation exception. 9015 // 9016 // Name is a required field 9017 Name *string `locationName:"name" type:"string" required:"true"` 9018} 9019 9020// String returns the string representation 9021func (s ValidationExceptionField) String() string { 9022 return awsutil.Prettify(s) 9023} 9024 9025// GoString returns the string representation 9026func (s ValidationExceptionField) GoString() string { 9027 return s.String() 9028} 9029 9030// SetMessage sets the Message field's value. 9031func (s *ValidationExceptionField) SetMessage(v string) *ValidationExceptionField { 9032 s.Message = &v 9033 return s 9034} 9035 9036// SetName sets the Name field's value. 9037func (s *ValidationExceptionField) SetName(v string) *ValidationExceptionField { 9038 s.Name = &v 9039 return s 9040} 9041 9042// The proposed virtual private cloud (VPC) configuration for the Amazon S3 9043// access point. For more information, see VpcConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_VpcConfiguration.html). 9044type VpcConfiguration struct { 9045 _ struct{} `type:"structure"` 9046 9047 // If this field is specified, this access point will only allow connections 9048 // from the specified VPC ID. 9049 // 9050 // VpcId is a required field 9051 VpcId *string `locationName:"vpcId" type:"string" required:"true"` 9052} 9053 9054// String returns the string representation 9055func (s VpcConfiguration) String() string { 9056 return awsutil.Prettify(s) 9057} 9058 9059// GoString returns the string representation 9060func (s VpcConfiguration) GoString() string { 9061 return s.String() 9062} 9063 9064// Validate inspects the fields of the type to determine if they are valid. 9065func (s *VpcConfiguration) Validate() error { 9066 invalidParams := request.ErrInvalidParams{Context: "VpcConfiguration"} 9067 if s.VpcId == nil { 9068 invalidParams.Add(request.NewErrParamRequired("VpcId")) 9069 } 9070 9071 if invalidParams.Len() > 0 { 9072 return invalidParams 9073 } 9074 return nil 9075} 9076 9077// SetVpcId sets the VpcId field's value. 9078func (s *VpcConfiguration) SetVpcId(v string) *VpcConfiguration { 9079 s.VpcId = &v 9080 return s 9081} 9082 9083const ( 9084 // AccessPreviewStatusCompleted is a AccessPreviewStatus enum value 9085 AccessPreviewStatusCompleted = "COMPLETED" 9086 9087 // AccessPreviewStatusCreating is a AccessPreviewStatus enum value 9088 AccessPreviewStatusCreating = "CREATING" 9089 9090 // AccessPreviewStatusFailed is a AccessPreviewStatus enum value 9091 AccessPreviewStatusFailed = "FAILED" 9092) 9093 9094// AccessPreviewStatus_Values returns all elements of the AccessPreviewStatus enum 9095func AccessPreviewStatus_Values() []string { 9096 return []string{ 9097 AccessPreviewStatusCompleted, 9098 AccessPreviewStatusCreating, 9099 AccessPreviewStatusFailed, 9100 } 9101} 9102 9103const ( 9104 // AccessPreviewStatusReasonCodeInternalError is a AccessPreviewStatusReasonCode enum value 9105 AccessPreviewStatusReasonCodeInternalError = "INTERNAL_ERROR" 9106 9107 // AccessPreviewStatusReasonCodeInvalidConfiguration is a AccessPreviewStatusReasonCode enum value 9108 AccessPreviewStatusReasonCodeInvalidConfiguration = "INVALID_CONFIGURATION" 9109) 9110 9111// AccessPreviewStatusReasonCode_Values returns all elements of the AccessPreviewStatusReasonCode enum 9112func AccessPreviewStatusReasonCode_Values() []string { 9113 return []string{ 9114 AccessPreviewStatusReasonCodeInternalError, 9115 AccessPreviewStatusReasonCodeInvalidConfiguration, 9116 } 9117} 9118 9119const ( 9120 // AclPermissionRead is a AclPermission enum value 9121 AclPermissionRead = "READ" 9122 9123 // AclPermissionWrite is a AclPermission enum value 9124 AclPermissionWrite = "WRITE" 9125 9126 // AclPermissionReadAcp is a AclPermission enum value 9127 AclPermissionReadAcp = "READ_ACP" 9128 9129 // AclPermissionWriteAcp is a AclPermission enum value 9130 AclPermissionWriteAcp = "WRITE_ACP" 9131 9132 // AclPermissionFullControl is a AclPermission enum value 9133 AclPermissionFullControl = "FULL_CONTROL" 9134) 9135 9136// AclPermission_Values returns all elements of the AclPermission enum 9137func AclPermission_Values() []string { 9138 return []string{ 9139 AclPermissionRead, 9140 AclPermissionWrite, 9141 AclPermissionReadAcp, 9142 AclPermissionWriteAcp, 9143 AclPermissionFullControl, 9144 } 9145} 9146 9147const ( 9148 // AnalyzerStatusActive is a AnalyzerStatus enum value 9149 AnalyzerStatusActive = "ACTIVE" 9150 9151 // AnalyzerStatusCreating is a AnalyzerStatus enum value 9152 AnalyzerStatusCreating = "CREATING" 9153 9154 // AnalyzerStatusDisabled is a AnalyzerStatus enum value 9155 AnalyzerStatusDisabled = "DISABLED" 9156 9157 // AnalyzerStatusFailed is a AnalyzerStatus enum value 9158 AnalyzerStatusFailed = "FAILED" 9159) 9160 9161// AnalyzerStatus_Values returns all elements of the AnalyzerStatus enum 9162func AnalyzerStatus_Values() []string { 9163 return []string{ 9164 AnalyzerStatusActive, 9165 AnalyzerStatusCreating, 9166 AnalyzerStatusDisabled, 9167 AnalyzerStatusFailed, 9168 } 9169} 9170 9171const ( 9172 // FindingChangeTypeChanged is a FindingChangeType enum value 9173 FindingChangeTypeChanged = "CHANGED" 9174 9175 // FindingChangeTypeNew is a FindingChangeType enum value 9176 FindingChangeTypeNew = "NEW" 9177 9178 // FindingChangeTypeUnchanged is a FindingChangeType enum value 9179 FindingChangeTypeUnchanged = "UNCHANGED" 9180) 9181 9182// FindingChangeType_Values returns all elements of the FindingChangeType enum 9183func FindingChangeType_Values() []string { 9184 return []string{ 9185 FindingChangeTypeChanged, 9186 FindingChangeTypeNew, 9187 FindingChangeTypeUnchanged, 9188 } 9189} 9190 9191const ( 9192 // FindingSourceTypePolicy is a FindingSourceType enum value 9193 FindingSourceTypePolicy = "POLICY" 9194 9195 // FindingSourceTypeBucketAcl is a FindingSourceType enum value 9196 FindingSourceTypeBucketAcl = "BUCKET_ACL" 9197 9198 // FindingSourceTypeS3AccessPoint is a FindingSourceType enum value 9199 FindingSourceTypeS3AccessPoint = "S3_ACCESS_POINT" 9200) 9201 9202// FindingSourceType_Values returns all elements of the FindingSourceType enum 9203func FindingSourceType_Values() []string { 9204 return []string{ 9205 FindingSourceTypePolicy, 9206 FindingSourceTypeBucketAcl, 9207 FindingSourceTypeS3AccessPoint, 9208 } 9209} 9210 9211const ( 9212 // FindingStatusActive is a FindingStatus enum value 9213 FindingStatusActive = "ACTIVE" 9214 9215 // FindingStatusArchived is a FindingStatus enum value 9216 FindingStatusArchived = "ARCHIVED" 9217 9218 // FindingStatusResolved is a FindingStatus enum value 9219 FindingStatusResolved = "RESOLVED" 9220) 9221 9222// FindingStatus_Values returns all elements of the FindingStatus enum 9223func FindingStatus_Values() []string { 9224 return []string{ 9225 FindingStatusActive, 9226 FindingStatusArchived, 9227 FindingStatusResolved, 9228 } 9229} 9230 9231const ( 9232 // FindingStatusUpdateActive is a FindingStatusUpdate enum value 9233 FindingStatusUpdateActive = "ACTIVE" 9234 9235 // FindingStatusUpdateArchived is a FindingStatusUpdate enum value 9236 FindingStatusUpdateArchived = "ARCHIVED" 9237) 9238 9239// FindingStatusUpdate_Values returns all elements of the FindingStatusUpdate enum 9240func FindingStatusUpdate_Values() []string { 9241 return []string{ 9242 FindingStatusUpdateActive, 9243 FindingStatusUpdateArchived, 9244 } 9245} 9246 9247const ( 9248 // JobErrorCodeAuthorizationError is a JobErrorCode enum value 9249 JobErrorCodeAuthorizationError = "AUTHORIZATION_ERROR" 9250 9251 // JobErrorCodeResourceNotFoundError is a JobErrorCode enum value 9252 JobErrorCodeResourceNotFoundError = "RESOURCE_NOT_FOUND_ERROR" 9253 9254 // JobErrorCodeServiceQuotaExceededError is a JobErrorCode enum value 9255 JobErrorCodeServiceQuotaExceededError = "SERVICE_QUOTA_EXCEEDED_ERROR" 9256 9257 // JobErrorCodeServiceError is a JobErrorCode enum value 9258 JobErrorCodeServiceError = "SERVICE_ERROR" 9259) 9260 9261// JobErrorCode_Values returns all elements of the JobErrorCode enum 9262func JobErrorCode_Values() []string { 9263 return []string{ 9264 JobErrorCodeAuthorizationError, 9265 JobErrorCodeResourceNotFoundError, 9266 JobErrorCodeServiceQuotaExceededError, 9267 JobErrorCodeServiceError, 9268 } 9269} 9270 9271const ( 9272 // JobStatusInProgress is a JobStatus enum value 9273 JobStatusInProgress = "IN_PROGRESS" 9274 9275 // JobStatusSucceeded is a JobStatus enum value 9276 JobStatusSucceeded = "SUCCEEDED" 9277 9278 // JobStatusFailed is a JobStatus enum value 9279 JobStatusFailed = "FAILED" 9280 9281 // JobStatusCanceled is a JobStatus enum value 9282 JobStatusCanceled = "CANCELED" 9283) 9284 9285// JobStatus_Values returns all elements of the JobStatus enum 9286func JobStatus_Values() []string { 9287 return []string{ 9288 JobStatusInProgress, 9289 JobStatusSucceeded, 9290 JobStatusFailed, 9291 JobStatusCanceled, 9292 } 9293} 9294 9295const ( 9296 // KmsGrantOperationCreateGrant is a KmsGrantOperation enum value 9297 KmsGrantOperationCreateGrant = "CreateGrant" 9298 9299 // KmsGrantOperationDecrypt is a KmsGrantOperation enum value 9300 KmsGrantOperationDecrypt = "Decrypt" 9301 9302 // KmsGrantOperationDescribeKey is a KmsGrantOperation enum value 9303 KmsGrantOperationDescribeKey = "DescribeKey" 9304 9305 // KmsGrantOperationEncrypt is a KmsGrantOperation enum value 9306 KmsGrantOperationEncrypt = "Encrypt" 9307 9308 // KmsGrantOperationGenerateDataKey is a KmsGrantOperation enum value 9309 KmsGrantOperationGenerateDataKey = "GenerateDataKey" 9310 9311 // KmsGrantOperationGenerateDataKeyPair is a KmsGrantOperation enum value 9312 KmsGrantOperationGenerateDataKeyPair = "GenerateDataKeyPair" 9313 9314 // KmsGrantOperationGenerateDataKeyPairWithoutPlaintext is a KmsGrantOperation enum value 9315 KmsGrantOperationGenerateDataKeyPairWithoutPlaintext = "GenerateDataKeyPairWithoutPlaintext" 9316 9317 // KmsGrantOperationGenerateDataKeyWithoutPlaintext is a KmsGrantOperation enum value 9318 KmsGrantOperationGenerateDataKeyWithoutPlaintext = "GenerateDataKeyWithoutPlaintext" 9319 9320 // KmsGrantOperationGetPublicKey is a KmsGrantOperation enum value 9321 KmsGrantOperationGetPublicKey = "GetPublicKey" 9322 9323 // KmsGrantOperationReEncryptFrom is a KmsGrantOperation enum value 9324 KmsGrantOperationReEncryptFrom = "ReEncryptFrom" 9325 9326 // KmsGrantOperationReEncryptTo is a KmsGrantOperation enum value 9327 KmsGrantOperationReEncryptTo = "ReEncryptTo" 9328 9329 // KmsGrantOperationRetireGrant is a KmsGrantOperation enum value 9330 KmsGrantOperationRetireGrant = "RetireGrant" 9331 9332 // KmsGrantOperationSign is a KmsGrantOperation enum value 9333 KmsGrantOperationSign = "Sign" 9334 9335 // KmsGrantOperationVerify is a KmsGrantOperation enum value 9336 KmsGrantOperationVerify = "Verify" 9337) 9338 9339// KmsGrantOperation_Values returns all elements of the KmsGrantOperation enum 9340func KmsGrantOperation_Values() []string { 9341 return []string{ 9342 KmsGrantOperationCreateGrant, 9343 KmsGrantOperationDecrypt, 9344 KmsGrantOperationDescribeKey, 9345 KmsGrantOperationEncrypt, 9346 KmsGrantOperationGenerateDataKey, 9347 KmsGrantOperationGenerateDataKeyPair, 9348 KmsGrantOperationGenerateDataKeyPairWithoutPlaintext, 9349 KmsGrantOperationGenerateDataKeyWithoutPlaintext, 9350 KmsGrantOperationGetPublicKey, 9351 KmsGrantOperationReEncryptFrom, 9352 KmsGrantOperationReEncryptTo, 9353 KmsGrantOperationRetireGrant, 9354 KmsGrantOperationSign, 9355 KmsGrantOperationVerify, 9356 } 9357} 9358 9359const ( 9360 // LocaleDe is a Locale enum value 9361 LocaleDe = "DE" 9362 9363 // LocaleEn is a Locale enum value 9364 LocaleEn = "EN" 9365 9366 // LocaleEs is a Locale enum value 9367 LocaleEs = "ES" 9368 9369 // LocaleFr is a Locale enum value 9370 LocaleFr = "FR" 9371 9372 // LocaleIt is a Locale enum value 9373 LocaleIt = "IT" 9374 9375 // LocaleJa is a Locale enum value 9376 LocaleJa = "JA" 9377 9378 // LocaleKo is a Locale enum value 9379 LocaleKo = "KO" 9380 9381 // LocalePtBr is a Locale enum value 9382 LocalePtBr = "PT_BR" 9383 9384 // LocaleZhCn is a Locale enum value 9385 LocaleZhCn = "ZH_CN" 9386 9387 // LocaleZhTw is a Locale enum value 9388 LocaleZhTw = "ZH_TW" 9389) 9390 9391// Locale_Values returns all elements of the Locale enum 9392func Locale_Values() []string { 9393 return []string{ 9394 LocaleDe, 9395 LocaleEn, 9396 LocaleEs, 9397 LocaleFr, 9398 LocaleIt, 9399 LocaleJa, 9400 LocaleKo, 9401 LocalePtBr, 9402 LocaleZhCn, 9403 LocaleZhTw, 9404 } 9405} 9406 9407const ( 9408 // OrderByAsc is a OrderBy enum value 9409 OrderByAsc = "ASC" 9410 9411 // OrderByDesc is a OrderBy enum value 9412 OrderByDesc = "DESC" 9413) 9414 9415// OrderBy_Values returns all elements of the OrderBy enum 9416func OrderBy_Values() []string { 9417 return []string{ 9418 OrderByAsc, 9419 OrderByDesc, 9420 } 9421} 9422 9423const ( 9424 // PolicyTypeIdentityPolicy is a PolicyType enum value 9425 PolicyTypeIdentityPolicy = "IDENTITY_POLICY" 9426 9427 // PolicyTypeResourcePolicy is a PolicyType enum value 9428 PolicyTypeResourcePolicy = "RESOURCE_POLICY" 9429 9430 // PolicyTypeServiceControlPolicy is a PolicyType enum value 9431 PolicyTypeServiceControlPolicy = "SERVICE_CONTROL_POLICY" 9432) 9433 9434// PolicyType_Values returns all elements of the PolicyType enum 9435func PolicyType_Values() []string { 9436 return []string{ 9437 PolicyTypeIdentityPolicy, 9438 PolicyTypeResourcePolicy, 9439 PolicyTypeServiceControlPolicy, 9440 } 9441} 9442 9443const ( 9444 // ReasonCodeAwsServiceAccessDisabled is a ReasonCode enum value 9445 ReasonCodeAwsServiceAccessDisabled = "AWS_SERVICE_ACCESS_DISABLED" 9446 9447 // ReasonCodeDelegatedAdministratorDeregistered is a ReasonCode enum value 9448 ReasonCodeDelegatedAdministratorDeregistered = "DELEGATED_ADMINISTRATOR_DEREGISTERED" 9449 9450 // ReasonCodeOrganizationDeleted is a ReasonCode enum value 9451 ReasonCodeOrganizationDeleted = "ORGANIZATION_DELETED" 9452 9453 // ReasonCodeServiceLinkedRoleCreationFailed is a ReasonCode enum value 9454 ReasonCodeServiceLinkedRoleCreationFailed = "SERVICE_LINKED_ROLE_CREATION_FAILED" 9455) 9456 9457// ReasonCode_Values returns all elements of the ReasonCode enum 9458func ReasonCode_Values() []string { 9459 return []string{ 9460 ReasonCodeAwsServiceAccessDisabled, 9461 ReasonCodeDelegatedAdministratorDeregistered, 9462 ReasonCodeOrganizationDeleted, 9463 ReasonCodeServiceLinkedRoleCreationFailed, 9464 } 9465} 9466 9467const ( 9468 // ResourceTypeAwsS3Bucket is a ResourceType enum value 9469 ResourceTypeAwsS3Bucket = "AWS::S3::Bucket" 9470 9471 // ResourceTypeAwsIamRole is a ResourceType enum value 9472 ResourceTypeAwsIamRole = "AWS::IAM::Role" 9473 9474 // ResourceTypeAwsSqsQueue is a ResourceType enum value 9475 ResourceTypeAwsSqsQueue = "AWS::SQS::Queue" 9476 9477 // ResourceTypeAwsLambdaFunction is a ResourceType enum value 9478 ResourceTypeAwsLambdaFunction = "AWS::Lambda::Function" 9479 9480 // ResourceTypeAwsLambdaLayerVersion is a ResourceType enum value 9481 ResourceTypeAwsLambdaLayerVersion = "AWS::Lambda::LayerVersion" 9482 9483 // ResourceTypeAwsKmsKey is a ResourceType enum value 9484 ResourceTypeAwsKmsKey = "AWS::KMS::Key" 9485 9486 // ResourceTypeAwsSecretsManagerSecret is a ResourceType enum value 9487 ResourceTypeAwsSecretsManagerSecret = "AWS::SecretsManager::Secret" 9488) 9489 9490// ResourceType_Values returns all elements of the ResourceType enum 9491func ResourceType_Values() []string { 9492 return []string{ 9493 ResourceTypeAwsS3Bucket, 9494 ResourceTypeAwsIamRole, 9495 ResourceTypeAwsSqsQueue, 9496 ResourceTypeAwsLambdaFunction, 9497 ResourceTypeAwsLambdaLayerVersion, 9498 ResourceTypeAwsKmsKey, 9499 ResourceTypeAwsSecretsManagerSecret, 9500 } 9501} 9502 9503const ( 9504 // TypeAccount is a Type enum value 9505 TypeAccount = "ACCOUNT" 9506 9507 // TypeOrganization is a Type enum value 9508 TypeOrganization = "ORGANIZATION" 9509) 9510 9511// Type_Values returns all elements of the Type enum 9512func Type_Values() []string { 9513 return []string{ 9514 TypeAccount, 9515 TypeOrganization, 9516 } 9517} 9518 9519const ( 9520 // ValidatePolicyFindingTypeError is a ValidatePolicyFindingType enum value 9521 ValidatePolicyFindingTypeError = "ERROR" 9522 9523 // ValidatePolicyFindingTypeSecurityWarning is a ValidatePolicyFindingType enum value 9524 ValidatePolicyFindingTypeSecurityWarning = "SECURITY_WARNING" 9525 9526 // ValidatePolicyFindingTypeSuggestion is a ValidatePolicyFindingType enum value 9527 ValidatePolicyFindingTypeSuggestion = "SUGGESTION" 9528 9529 // ValidatePolicyFindingTypeWarning is a ValidatePolicyFindingType enum value 9530 ValidatePolicyFindingTypeWarning = "WARNING" 9531) 9532 9533// ValidatePolicyFindingType_Values returns all elements of the ValidatePolicyFindingType enum 9534func ValidatePolicyFindingType_Values() []string { 9535 return []string{ 9536 ValidatePolicyFindingTypeError, 9537 ValidatePolicyFindingTypeSecurityWarning, 9538 ValidatePolicyFindingTypeSuggestion, 9539 ValidatePolicyFindingTypeWarning, 9540 } 9541} 9542 9543const ( 9544 // ValidationExceptionReasonUnknownOperation is a ValidationExceptionReason enum value 9545 ValidationExceptionReasonUnknownOperation = "unknownOperation" 9546 9547 // ValidationExceptionReasonCannotParse is a ValidationExceptionReason enum value 9548 ValidationExceptionReasonCannotParse = "cannotParse" 9549 9550 // ValidationExceptionReasonFieldValidationFailed is a ValidationExceptionReason enum value 9551 ValidationExceptionReasonFieldValidationFailed = "fieldValidationFailed" 9552 9553 // ValidationExceptionReasonOther is a ValidationExceptionReason enum value 9554 ValidationExceptionReasonOther = "other" 9555) 9556 9557// ValidationExceptionReason_Values returns all elements of the ValidationExceptionReason enum 9558func ValidationExceptionReason_Values() []string { 9559 return []string{ 9560 ValidationExceptionReasonUnknownOperation, 9561 ValidationExceptionReasonCannotParse, 9562 ValidationExceptionReasonFieldValidationFailed, 9563 ValidationExceptionReasonOther, 9564 } 9565} 9566