1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package inspector 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/jsonrpc" 14) 15 16const opAddAttributesToFindings = "AddAttributesToFindings" 17 18// AddAttributesToFindingsRequest generates a "aws/request.Request" representing the 19// client's request for the AddAttributesToFindings operation. The "output" return 20// value will be populated with the request's response once the request complets 21// successfuly. 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 AddAttributesToFindings for more information on using the AddAttributesToFindings 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 AddAttributesToFindingsRequest method. 34// req, resp := client.AddAttributesToFindingsRequest(params) 35// 36// err := req.Send() 37// if err == nil { // resp is now filled 38// fmt.Println(resp) 39// } 40// 41// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AddAttributesToFindings 42func (c *Inspector) AddAttributesToFindingsRequest(input *AddAttributesToFindingsInput) (req *request.Request, output *AddAttributesToFindingsOutput) { 43 op := &request.Operation{ 44 Name: opAddAttributesToFindings, 45 HTTPMethod: "POST", 46 HTTPPath: "/", 47 } 48 49 if input == nil { 50 input = &AddAttributesToFindingsInput{} 51 } 52 53 output = &AddAttributesToFindingsOutput{} 54 req = c.newRequest(op, input, output) 55 return 56} 57 58// AddAttributesToFindings API operation for Amazon Inspector. 59// 60// Assigns attributes (key and value pairs) to the findings that are specified 61// by the ARNs of the findings. 62// 63// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 64// with awserr.Error's Code and Message methods to get detailed information about 65// the error. 66// 67// See the AWS API reference guide for Amazon Inspector's 68// API operation AddAttributesToFindings for usage and error information. 69// 70// Returned Error Codes: 71// * ErrCodeInternalException "InternalException" 72// Internal server error. 73// 74// * ErrCodeInvalidInputException "InvalidInputException" 75// The request was rejected because an invalid or out-of-range value was supplied 76// for an input parameter. 77// 78// * ErrCodeAccessDeniedException "AccessDeniedException" 79// You do not have required permissions to access the requested resource. 80// 81// * ErrCodeNoSuchEntityException "NoSuchEntityException" 82// The request was rejected because it referenced an entity that does not exist. 83// The error code describes the entity. 84// 85// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AddAttributesToFindings 86func (c *Inspector) AddAttributesToFindings(input *AddAttributesToFindingsInput) (*AddAttributesToFindingsOutput, error) { 87 req, out := c.AddAttributesToFindingsRequest(input) 88 return out, req.Send() 89} 90 91// AddAttributesToFindingsWithContext is the same as AddAttributesToFindings with the addition of 92// the ability to pass a context and additional request options. 93// 94// See AddAttributesToFindings for details on how to use this API operation. 95// 96// The context must be non-nil and will be used for request cancellation. If 97// the context is nil a panic will occur. In the future the SDK may create 98// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 99// for more information on using Contexts. 100func (c *Inspector) AddAttributesToFindingsWithContext(ctx aws.Context, input *AddAttributesToFindingsInput, opts ...request.Option) (*AddAttributesToFindingsOutput, error) { 101 req, out := c.AddAttributesToFindingsRequest(input) 102 req.SetContext(ctx) 103 req.ApplyOptions(opts...) 104 return out, req.Send() 105} 106 107const opCreateAssessmentTarget = "CreateAssessmentTarget" 108 109// CreateAssessmentTargetRequest generates a "aws/request.Request" representing the 110// client's request for the CreateAssessmentTarget operation. The "output" return 111// value will be populated with the request's response once the request complets 112// successfuly. 113// 114// Use "Send" method on the returned Request to send the API call to the service. 115// the "output" return value is not valid until after Send returns without error. 116// 117// See CreateAssessmentTarget for more information on using the CreateAssessmentTarget 118// API call, and error handling. 119// 120// This method is useful when you want to inject custom logic or configuration 121// into the SDK's request lifecycle. Such as custom headers, or retry logic. 122// 123// 124// // Example sending a request using the CreateAssessmentTargetRequest method. 125// req, resp := client.CreateAssessmentTargetRequest(params) 126// 127// err := req.Send() 128// if err == nil { // resp is now filled 129// fmt.Println(resp) 130// } 131// 132// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateAssessmentTarget 133func (c *Inspector) CreateAssessmentTargetRequest(input *CreateAssessmentTargetInput) (req *request.Request, output *CreateAssessmentTargetOutput) { 134 op := &request.Operation{ 135 Name: opCreateAssessmentTarget, 136 HTTPMethod: "POST", 137 HTTPPath: "/", 138 } 139 140 if input == nil { 141 input = &CreateAssessmentTargetInput{} 142 } 143 144 output = &CreateAssessmentTargetOutput{} 145 req = c.newRequest(op, input, output) 146 return 147} 148 149// CreateAssessmentTarget API operation for Amazon Inspector. 150// 151// Creates a new assessment target using the ARN of the resource group that 152// is generated by CreateResourceGroup. You can create up to 50 assessment targets 153// per AWS account. You can run up to 500 concurrent agents per AWS account. 154// For more information, see Amazon Inspector Assessment Targets (http://docs.aws.amazon.com/inspector/latest/userguide/inspector_applications.html). 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 Amazon Inspector's 161// API operation CreateAssessmentTarget for usage and error information. 162// 163// Returned Error Codes: 164// * ErrCodeInternalException "InternalException" 165// Internal server error. 166// 167// * ErrCodeInvalidInputException "InvalidInputException" 168// The request was rejected because an invalid or out-of-range value was supplied 169// for an input parameter. 170// 171// * ErrCodeLimitExceededException "LimitExceededException" 172// The request was rejected because it attempted to create resources beyond 173// the current AWS account limits. The error code describes the limit exceeded. 174// 175// * ErrCodeAccessDeniedException "AccessDeniedException" 176// You do not have required permissions to access the requested resource. 177// 178// * ErrCodeNoSuchEntityException "NoSuchEntityException" 179// The request was rejected because it referenced an entity that does not exist. 180// The error code describes the entity. 181// 182// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateAssessmentTarget 183func (c *Inspector) CreateAssessmentTarget(input *CreateAssessmentTargetInput) (*CreateAssessmentTargetOutput, error) { 184 req, out := c.CreateAssessmentTargetRequest(input) 185 return out, req.Send() 186} 187 188// CreateAssessmentTargetWithContext is the same as CreateAssessmentTarget with the addition of 189// the ability to pass a context and additional request options. 190// 191// See CreateAssessmentTarget for details on how to use this API operation. 192// 193// The context must be non-nil and will be used for request cancellation. If 194// the context is nil a panic will occur. In the future the SDK may create 195// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 196// for more information on using Contexts. 197func (c *Inspector) CreateAssessmentTargetWithContext(ctx aws.Context, input *CreateAssessmentTargetInput, opts ...request.Option) (*CreateAssessmentTargetOutput, error) { 198 req, out := c.CreateAssessmentTargetRequest(input) 199 req.SetContext(ctx) 200 req.ApplyOptions(opts...) 201 return out, req.Send() 202} 203 204const opCreateAssessmentTemplate = "CreateAssessmentTemplate" 205 206// CreateAssessmentTemplateRequest generates a "aws/request.Request" representing the 207// client's request for the CreateAssessmentTemplate operation. The "output" return 208// value will be populated with the request's response once the request complets 209// successfuly. 210// 211// Use "Send" method on the returned Request to send the API call to the service. 212// the "output" return value is not valid until after Send returns without error. 213// 214// See CreateAssessmentTemplate for more information on using the CreateAssessmentTemplate 215// API call, and error handling. 216// 217// This method is useful when you want to inject custom logic or configuration 218// into the SDK's request lifecycle. Such as custom headers, or retry logic. 219// 220// 221// // Example sending a request using the CreateAssessmentTemplateRequest method. 222// req, resp := client.CreateAssessmentTemplateRequest(params) 223// 224// err := req.Send() 225// if err == nil { // resp is now filled 226// fmt.Println(resp) 227// } 228// 229// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateAssessmentTemplate 230func (c *Inspector) CreateAssessmentTemplateRequest(input *CreateAssessmentTemplateInput) (req *request.Request, output *CreateAssessmentTemplateOutput) { 231 op := &request.Operation{ 232 Name: opCreateAssessmentTemplate, 233 HTTPMethod: "POST", 234 HTTPPath: "/", 235 } 236 237 if input == nil { 238 input = &CreateAssessmentTemplateInput{} 239 } 240 241 output = &CreateAssessmentTemplateOutput{} 242 req = c.newRequest(op, input, output) 243 return 244} 245 246// CreateAssessmentTemplate API operation for Amazon Inspector. 247// 248// Creates an assessment template for the assessment target that is specified 249// by the ARN of the assessment target. 250// 251// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 252// with awserr.Error's Code and Message methods to get detailed information about 253// the error. 254// 255// See the AWS API reference guide for Amazon Inspector's 256// API operation CreateAssessmentTemplate for usage and error information. 257// 258// Returned Error Codes: 259// * ErrCodeInternalException "InternalException" 260// Internal server error. 261// 262// * ErrCodeInvalidInputException "InvalidInputException" 263// The request was rejected because an invalid or out-of-range value was supplied 264// for an input parameter. 265// 266// * ErrCodeLimitExceededException "LimitExceededException" 267// The request was rejected because it attempted to create resources beyond 268// the current AWS account limits. The error code describes the limit exceeded. 269// 270// * ErrCodeAccessDeniedException "AccessDeniedException" 271// You do not have required permissions to access the requested resource. 272// 273// * ErrCodeNoSuchEntityException "NoSuchEntityException" 274// The request was rejected because it referenced an entity that does not exist. 275// The error code describes the entity. 276// 277// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateAssessmentTemplate 278func (c *Inspector) CreateAssessmentTemplate(input *CreateAssessmentTemplateInput) (*CreateAssessmentTemplateOutput, error) { 279 req, out := c.CreateAssessmentTemplateRequest(input) 280 return out, req.Send() 281} 282 283// CreateAssessmentTemplateWithContext is the same as CreateAssessmentTemplate with the addition of 284// the ability to pass a context and additional request options. 285// 286// See CreateAssessmentTemplate for details on how to use this API operation. 287// 288// The context must be non-nil and will be used for request cancellation. If 289// the context is nil a panic will occur. In the future the SDK may create 290// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 291// for more information on using Contexts. 292func (c *Inspector) CreateAssessmentTemplateWithContext(ctx aws.Context, input *CreateAssessmentTemplateInput, opts ...request.Option) (*CreateAssessmentTemplateOutput, error) { 293 req, out := c.CreateAssessmentTemplateRequest(input) 294 req.SetContext(ctx) 295 req.ApplyOptions(opts...) 296 return out, req.Send() 297} 298 299const opCreateResourceGroup = "CreateResourceGroup" 300 301// CreateResourceGroupRequest generates a "aws/request.Request" representing the 302// client's request for the CreateResourceGroup operation. The "output" return 303// value will be populated with the request's response once the request complets 304// successfuly. 305// 306// Use "Send" method on the returned Request to send the API call to the service. 307// the "output" return value is not valid until after Send returns without error. 308// 309// See CreateResourceGroup for more information on using the CreateResourceGroup 310// API call, and error handling. 311// 312// This method is useful when you want to inject custom logic or configuration 313// into the SDK's request lifecycle. Such as custom headers, or retry logic. 314// 315// 316// // Example sending a request using the CreateResourceGroupRequest method. 317// req, resp := client.CreateResourceGroupRequest(params) 318// 319// err := req.Send() 320// if err == nil { // resp is now filled 321// fmt.Println(resp) 322// } 323// 324// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateResourceGroup 325func (c *Inspector) CreateResourceGroupRequest(input *CreateResourceGroupInput) (req *request.Request, output *CreateResourceGroupOutput) { 326 op := &request.Operation{ 327 Name: opCreateResourceGroup, 328 HTTPMethod: "POST", 329 HTTPPath: "/", 330 } 331 332 if input == nil { 333 input = &CreateResourceGroupInput{} 334 } 335 336 output = &CreateResourceGroupOutput{} 337 req = c.newRequest(op, input, output) 338 return 339} 340 341// CreateResourceGroup API operation for Amazon Inspector. 342// 343// Creates a resource group using the specified set of tags (key and value pairs) 344// that are used to select the EC2 instances to be included in an Amazon Inspector 345// assessment target. The created resource group is then used to create an Amazon 346// Inspector assessment target. For more information, see CreateAssessmentTarget. 347// 348// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 349// with awserr.Error's Code and Message methods to get detailed information about 350// the error. 351// 352// See the AWS API reference guide for Amazon Inspector's 353// API operation CreateResourceGroup for usage and error information. 354// 355// Returned Error Codes: 356// * ErrCodeInternalException "InternalException" 357// Internal server error. 358// 359// * ErrCodeInvalidInputException "InvalidInputException" 360// The request was rejected because an invalid or out-of-range value was supplied 361// for an input parameter. 362// 363// * ErrCodeLimitExceededException "LimitExceededException" 364// The request was rejected because it attempted to create resources beyond 365// the current AWS account limits. The error code describes the limit exceeded. 366// 367// * ErrCodeAccessDeniedException "AccessDeniedException" 368// You do not have required permissions to access the requested resource. 369// 370// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateResourceGroup 371func (c *Inspector) CreateResourceGroup(input *CreateResourceGroupInput) (*CreateResourceGroupOutput, error) { 372 req, out := c.CreateResourceGroupRequest(input) 373 return out, req.Send() 374} 375 376// CreateResourceGroupWithContext is the same as CreateResourceGroup with the addition of 377// the ability to pass a context and additional request options. 378// 379// See CreateResourceGroup for details on how to use this API operation. 380// 381// The context must be non-nil and will be used for request cancellation. If 382// the context is nil a panic will occur. In the future the SDK may create 383// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 384// for more information on using Contexts. 385func (c *Inspector) CreateResourceGroupWithContext(ctx aws.Context, input *CreateResourceGroupInput, opts ...request.Option) (*CreateResourceGroupOutput, error) { 386 req, out := c.CreateResourceGroupRequest(input) 387 req.SetContext(ctx) 388 req.ApplyOptions(opts...) 389 return out, req.Send() 390} 391 392const opDeleteAssessmentRun = "DeleteAssessmentRun" 393 394// DeleteAssessmentRunRequest generates a "aws/request.Request" representing the 395// client's request for the DeleteAssessmentRun operation. The "output" return 396// value will be populated with the request's response once the request complets 397// successfuly. 398// 399// Use "Send" method on the returned Request to send the API call to the service. 400// the "output" return value is not valid until after Send returns without error. 401// 402// See DeleteAssessmentRun for more information on using the DeleteAssessmentRun 403// API call, and error handling. 404// 405// This method is useful when you want to inject custom logic or configuration 406// into the SDK's request lifecycle. Such as custom headers, or retry logic. 407// 408// 409// // Example sending a request using the DeleteAssessmentRunRequest method. 410// req, resp := client.DeleteAssessmentRunRequest(params) 411// 412// err := req.Send() 413// if err == nil { // resp is now filled 414// fmt.Println(resp) 415// } 416// 417// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentRun 418func (c *Inspector) DeleteAssessmentRunRequest(input *DeleteAssessmentRunInput) (req *request.Request, output *DeleteAssessmentRunOutput) { 419 op := &request.Operation{ 420 Name: opDeleteAssessmentRun, 421 HTTPMethod: "POST", 422 HTTPPath: "/", 423 } 424 425 if input == nil { 426 input = &DeleteAssessmentRunInput{} 427 } 428 429 output = &DeleteAssessmentRunOutput{} 430 req = c.newRequest(op, input, output) 431 req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) 432 req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) 433 return 434} 435 436// DeleteAssessmentRun API operation for Amazon Inspector. 437// 438// Deletes the assessment run that is specified by the ARN of the assessment 439// run. 440// 441// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 442// with awserr.Error's Code and Message methods to get detailed information about 443// the error. 444// 445// See the AWS API reference guide for Amazon Inspector's 446// API operation DeleteAssessmentRun for usage and error information. 447// 448// Returned Error Codes: 449// * ErrCodeInternalException "InternalException" 450// Internal server error. 451// 452// * ErrCodeInvalidInputException "InvalidInputException" 453// The request was rejected because an invalid or out-of-range value was supplied 454// for an input parameter. 455// 456// * ErrCodeAssessmentRunInProgressException "AssessmentRunInProgressException" 457// You cannot perform a specified action if an assessment run is currently in 458// progress. 459// 460// * ErrCodeAccessDeniedException "AccessDeniedException" 461// You do not have required permissions to access the requested resource. 462// 463// * ErrCodeNoSuchEntityException "NoSuchEntityException" 464// The request was rejected because it referenced an entity that does not exist. 465// The error code describes the entity. 466// 467// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentRun 468func (c *Inspector) DeleteAssessmentRun(input *DeleteAssessmentRunInput) (*DeleteAssessmentRunOutput, error) { 469 req, out := c.DeleteAssessmentRunRequest(input) 470 return out, req.Send() 471} 472 473// DeleteAssessmentRunWithContext is the same as DeleteAssessmentRun with the addition of 474// the ability to pass a context and additional request options. 475// 476// See DeleteAssessmentRun for details on how to use this API operation. 477// 478// The context must be non-nil and will be used for request cancellation. If 479// the context is nil a panic will occur. In the future the SDK may create 480// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 481// for more information on using Contexts. 482func (c *Inspector) DeleteAssessmentRunWithContext(ctx aws.Context, input *DeleteAssessmentRunInput, opts ...request.Option) (*DeleteAssessmentRunOutput, error) { 483 req, out := c.DeleteAssessmentRunRequest(input) 484 req.SetContext(ctx) 485 req.ApplyOptions(opts...) 486 return out, req.Send() 487} 488 489const opDeleteAssessmentTarget = "DeleteAssessmentTarget" 490 491// DeleteAssessmentTargetRequest generates a "aws/request.Request" representing the 492// client's request for the DeleteAssessmentTarget operation. The "output" return 493// value will be populated with the request's response once the request complets 494// successfuly. 495// 496// Use "Send" method on the returned Request to send the API call to the service. 497// the "output" return value is not valid until after Send returns without error. 498// 499// See DeleteAssessmentTarget for more information on using the DeleteAssessmentTarget 500// API call, and error handling. 501// 502// This method is useful when you want to inject custom logic or configuration 503// into the SDK's request lifecycle. Such as custom headers, or retry logic. 504// 505// 506// // Example sending a request using the DeleteAssessmentTargetRequest method. 507// req, resp := client.DeleteAssessmentTargetRequest(params) 508// 509// err := req.Send() 510// if err == nil { // resp is now filled 511// fmt.Println(resp) 512// } 513// 514// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentTarget 515func (c *Inspector) DeleteAssessmentTargetRequest(input *DeleteAssessmentTargetInput) (req *request.Request, output *DeleteAssessmentTargetOutput) { 516 op := &request.Operation{ 517 Name: opDeleteAssessmentTarget, 518 HTTPMethod: "POST", 519 HTTPPath: "/", 520 } 521 522 if input == nil { 523 input = &DeleteAssessmentTargetInput{} 524 } 525 526 output = &DeleteAssessmentTargetOutput{} 527 req = c.newRequest(op, input, output) 528 req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) 529 req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) 530 return 531} 532 533// DeleteAssessmentTarget API operation for Amazon Inspector. 534// 535// Deletes the assessment target that is specified by the ARN of the assessment 536// target. 537// 538// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 539// with awserr.Error's Code and Message methods to get detailed information about 540// the error. 541// 542// See the AWS API reference guide for Amazon Inspector's 543// API operation DeleteAssessmentTarget for usage and error information. 544// 545// Returned Error Codes: 546// * ErrCodeInternalException "InternalException" 547// Internal server error. 548// 549// * ErrCodeInvalidInputException "InvalidInputException" 550// The request was rejected because an invalid or out-of-range value was supplied 551// for an input parameter. 552// 553// * ErrCodeAssessmentRunInProgressException "AssessmentRunInProgressException" 554// You cannot perform a specified action if an assessment run is currently in 555// progress. 556// 557// * ErrCodeAccessDeniedException "AccessDeniedException" 558// You do not have required permissions to access the requested resource. 559// 560// * ErrCodeNoSuchEntityException "NoSuchEntityException" 561// The request was rejected because it referenced an entity that does not exist. 562// The error code describes the entity. 563// 564// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentTarget 565func (c *Inspector) DeleteAssessmentTarget(input *DeleteAssessmentTargetInput) (*DeleteAssessmentTargetOutput, error) { 566 req, out := c.DeleteAssessmentTargetRequest(input) 567 return out, req.Send() 568} 569 570// DeleteAssessmentTargetWithContext is the same as DeleteAssessmentTarget with the addition of 571// the ability to pass a context and additional request options. 572// 573// See DeleteAssessmentTarget for details on how to use this API operation. 574// 575// The context must be non-nil and will be used for request cancellation. If 576// the context is nil a panic will occur. In the future the SDK may create 577// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 578// for more information on using Contexts. 579func (c *Inspector) DeleteAssessmentTargetWithContext(ctx aws.Context, input *DeleteAssessmentTargetInput, opts ...request.Option) (*DeleteAssessmentTargetOutput, error) { 580 req, out := c.DeleteAssessmentTargetRequest(input) 581 req.SetContext(ctx) 582 req.ApplyOptions(opts...) 583 return out, req.Send() 584} 585 586const opDeleteAssessmentTemplate = "DeleteAssessmentTemplate" 587 588// DeleteAssessmentTemplateRequest generates a "aws/request.Request" representing the 589// client's request for the DeleteAssessmentTemplate operation. The "output" return 590// value will be populated with the request's response once the request complets 591// successfuly. 592// 593// Use "Send" method on the returned Request to send the API call to the service. 594// the "output" return value is not valid until after Send returns without error. 595// 596// See DeleteAssessmentTemplate for more information on using the DeleteAssessmentTemplate 597// API call, and error handling. 598// 599// This method is useful when you want to inject custom logic or configuration 600// into the SDK's request lifecycle. Such as custom headers, or retry logic. 601// 602// 603// // Example sending a request using the DeleteAssessmentTemplateRequest method. 604// req, resp := client.DeleteAssessmentTemplateRequest(params) 605// 606// err := req.Send() 607// if err == nil { // resp is now filled 608// fmt.Println(resp) 609// } 610// 611// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentTemplate 612func (c *Inspector) DeleteAssessmentTemplateRequest(input *DeleteAssessmentTemplateInput) (req *request.Request, output *DeleteAssessmentTemplateOutput) { 613 op := &request.Operation{ 614 Name: opDeleteAssessmentTemplate, 615 HTTPMethod: "POST", 616 HTTPPath: "/", 617 } 618 619 if input == nil { 620 input = &DeleteAssessmentTemplateInput{} 621 } 622 623 output = &DeleteAssessmentTemplateOutput{} 624 req = c.newRequest(op, input, output) 625 req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) 626 req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) 627 return 628} 629 630// DeleteAssessmentTemplate API operation for Amazon Inspector. 631// 632// Deletes the assessment template that is specified by the ARN of the assessment 633// template. 634// 635// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 636// with awserr.Error's Code and Message methods to get detailed information about 637// the error. 638// 639// See the AWS API reference guide for Amazon Inspector's 640// API operation DeleteAssessmentTemplate for usage and error information. 641// 642// Returned Error Codes: 643// * ErrCodeInternalException "InternalException" 644// Internal server error. 645// 646// * ErrCodeInvalidInputException "InvalidInputException" 647// The request was rejected because an invalid or out-of-range value was supplied 648// for an input parameter. 649// 650// * ErrCodeAssessmentRunInProgressException "AssessmentRunInProgressException" 651// You cannot perform a specified action if an assessment run is currently in 652// progress. 653// 654// * ErrCodeAccessDeniedException "AccessDeniedException" 655// You do not have required permissions to access the requested resource. 656// 657// * ErrCodeNoSuchEntityException "NoSuchEntityException" 658// The request was rejected because it referenced an entity that does not exist. 659// The error code describes the entity. 660// 661// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentTemplate 662func (c *Inspector) DeleteAssessmentTemplate(input *DeleteAssessmentTemplateInput) (*DeleteAssessmentTemplateOutput, error) { 663 req, out := c.DeleteAssessmentTemplateRequest(input) 664 return out, req.Send() 665} 666 667// DeleteAssessmentTemplateWithContext is the same as DeleteAssessmentTemplate with the addition of 668// the ability to pass a context and additional request options. 669// 670// See DeleteAssessmentTemplate for details on how to use this API operation. 671// 672// The context must be non-nil and will be used for request cancellation. If 673// the context is nil a panic will occur. In the future the SDK may create 674// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 675// for more information on using Contexts. 676func (c *Inspector) DeleteAssessmentTemplateWithContext(ctx aws.Context, input *DeleteAssessmentTemplateInput, opts ...request.Option) (*DeleteAssessmentTemplateOutput, error) { 677 req, out := c.DeleteAssessmentTemplateRequest(input) 678 req.SetContext(ctx) 679 req.ApplyOptions(opts...) 680 return out, req.Send() 681} 682 683const opDescribeAssessmentRuns = "DescribeAssessmentRuns" 684 685// DescribeAssessmentRunsRequest generates a "aws/request.Request" representing the 686// client's request for the DescribeAssessmentRuns operation. The "output" return 687// value will be populated with the request's response once the request complets 688// successfuly. 689// 690// Use "Send" method on the returned Request to send the API call to the service. 691// the "output" return value is not valid until after Send returns without error. 692// 693// See DescribeAssessmentRuns for more information on using the DescribeAssessmentRuns 694// API call, and error handling. 695// 696// This method is useful when you want to inject custom logic or configuration 697// into the SDK's request lifecycle. Such as custom headers, or retry logic. 698// 699// 700// // Example sending a request using the DescribeAssessmentRunsRequest method. 701// req, resp := client.DescribeAssessmentRunsRequest(params) 702// 703// err := req.Send() 704// if err == nil { // resp is now filled 705// fmt.Println(resp) 706// } 707// 708// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentRuns 709func (c *Inspector) DescribeAssessmentRunsRequest(input *DescribeAssessmentRunsInput) (req *request.Request, output *DescribeAssessmentRunsOutput) { 710 op := &request.Operation{ 711 Name: opDescribeAssessmentRuns, 712 HTTPMethod: "POST", 713 HTTPPath: "/", 714 } 715 716 if input == nil { 717 input = &DescribeAssessmentRunsInput{} 718 } 719 720 output = &DescribeAssessmentRunsOutput{} 721 req = c.newRequest(op, input, output) 722 return 723} 724 725// DescribeAssessmentRuns API operation for Amazon Inspector. 726// 727// Describes the assessment runs that are specified by the ARNs of the assessment 728// runs. 729// 730// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 731// with awserr.Error's Code and Message methods to get detailed information about 732// the error. 733// 734// See the AWS API reference guide for Amazon Inspector's 735// API operation DescribeAssessmentRuns for usage and error information. 736// 737// Returned Error Codes: 738// * ErrCodeInternalException "InternalException" 739// Internal server error. 740// 741// * ErrCodeInvalidInputException "InvalidInputException" 742// The request was rejected because an invalid or out-of-range value was supplied 743// for an input parameter. 744// 745// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentRuns 746func (c *Inspector) DescribeAssessmentRuns(input *DescribeAssessmentRunsInput) (*DescribeAssessmentRunsOutput, error) { 747 req, out := c.DescribeAssessmentRunsRequest(input) 748 return out, req.Send() 749} 750 751// DescribeAssessmentRunsWithContext is the same as DescribeAssessmentRuns with the addition of 752// the ability to pass a context and additional request options. 753// 754// See DescribeAssessmentRuns for details on how to use this API operation. 755// 756// The context must be non-nil and will be used for request cancellation. If 757// the context is nil a panic will occur. In the future the SDK may create 758// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 759// for more information on using Contexts. 760func (c *Inspector) DescribeAssessmentRunsWithContext(ctx aws.Context, input *DescribeAssessmentRunsInput, opts ...request.Option) (*DescribeAssessmentRunsOutput, error) { 761 req, out := c.DescribeAssessmentRunsRequest(input) 762 req.SetContext(ctx) 763 req.ApplyOptions(opts...) 764 return out, req.Send() 765} 766 767const opDescribeAssessmentTargets = "DescribeAssessmentTargets" 768 769// DescribeAssessmentTargetsRequest generates a "aws/request.Request" representing the 770// client's request for the DescribeAssessmentTargets operation. The "output" return 771// value will be populated with the request's response once the request complets 772// successfuly. 773// 774// Use "Send" method on the returned Request to send the API call to the service. 775// the "output" return value is not valid until after Send returns without error. 776// 777// See DescribeAssessmentTargets for more information on using the DescribeAssessmentTargets 778// API call, and error handling. 779// 780// This method is useful when you want to inject custom logic or configuration 781// into the SDK's request lifecycle. Such as custom headers, or retry logic. 782// 783// 784// // Example sending a request using the DescribeAssessmentTargetsRequest method. 785// req, resp := client.DescribeAssessmentTargetsRequest(params) 786// 787// err := req.Send() 788// if err == nil { // resp is now filled 789// fmt.Println(resp) 790// } 791// 792// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentTargets 793func (c *Inspector) DescribeAssessmentTargetsRequest(input *DescribeAssessmentTargetsInput) (req *request.Request, output *DescribeAssessmentTargetsOutput) { 794 op := &request.Operation{ 795 Name: opDescribeAssessmentTargets, 796 HTTPMethod: "POST", 797 HTTPPath: "/", 798 } 799 800 if input == nil { 801 input = &DescribeAssessmentTargetsInput{} 802 } 803 804 output = &DescribeAssessmentTargetsOutput{} 805 req = c.newRequest(op, input, output) 806 return 807} 808 809// DescribeAssessmentTargets API operation for Amazon Inspector. 810// 811// Describes the assessment targets that are specified by the ARNs of the assessment 812// targets. 813// 814// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 815// with awserr.Error's Code and Message methods to get detailed information about 816// the error. 817// 818// See the AWS API reference guide for Amazon Inspector's 819// API operation DescribeAssessmentTargets for usage and error information. 820// 821// Returned Error Codes: 822// * ErrCodeInternalException "InternalException" 823// Internal server error. 824// 825// * ErrCodeInvalidInputException "InvalidInputException" 826// The request was rejected because an invalid or out-of-range value was supplied 827// for an input parameter. 828// 829// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentTargets 830func (c *Inspector) DescribeAssessmentTargets(input *DescribeAssessmentTargetsInput) (*DescribeAssessmentTargetsOutput, error) { 831 req, out := c.DescribeAssessmentTargetsRequest(input) 832 return out, req.Send() 833} 834 835// DescribeAssessmentTargetsWithContext is the same as DescribeAssessmentTargets with the addition of 836// the ability to pass a context and additional request options. 837// 838// See DescribeAssessmentTargets for details on how to use this API operation. 839// 840// The context must be non-nil and will be used for request cancellation. If 841// the context is nil a panic will occur. In the future the SDK may create 842// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 843// for more information on using Contexts. 844func (c *Inspector) DescribeAssessmentTargetsWithContext(ctx aws.Context, input *DescribeAssessmentTargetsInput, opts ...request.Option) (*DescribeAssessmentTargetsOutput, error) { 845 req, out := c.DescribeAssessmentTargetsRequest(input) 846 req.SetContext(ctx) 847 req.ApplyOptions(opts...) 848 return out, req.Send() 849} 850 851const opDescribeAssessmentTemplates = "DescribeAssessmentTemplates" 852 853// DescribeAssessmentTemplatesRequest generates a "aws/request.Request" representing the 854// client's request for the DescribeAssessmentTemplates operation. The "output" return 855// value will be populated with the request's response once the request complets 856// successfuly. 857// 858// Use "Send" method on the returned Request to send the API call to the service. 859// the "output" return value is not valid until after Send returns without error. 860// 861// See DescribeAssessmentTemplates for more information on using the DescribeAssessmentTemplates 862// API call, and error handling. 863// 864// This method is useful when you want to inject custom logic or configuration 865// into the SDK's request lifecycle. Such as custom headers, or retry logic. 866// 867// 868// // Example sending a request using the DescribeAssessmentTemplatesRequest method. 869// req, resp := client.DescribeAssessmentTemplatesRequest(params) 870// 871// err := req.Send() 872// if err == nil { // resp is now filled 873// fmt.Println(resp) 874// } 875// 876// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentTemplates 877func (c *Inspector) DescribeAssessmentTemplatesRequest(input *DescribeAssessmentTemplatesInput) (req *request.Request, output *DescribeAssessmentTemplatesOutput) { 878 op := &request.Operation{ 879 Name: opDescribeAssessmentTemplates, 880 HTTPMethod: "POST", 881 HTTPPath: "/", 882 } 883 884 if input == nil { 885 input = &DescribeAssessmentTemplatesInput{} 886 } 887 888 output = &DescribeAssessmentTemplatesOutput{} 889 req = c.newRequest(op, input, output) 890 return 891} 892 893// DescribeAssessmentTemplates API operation for Amazon Inspector. 894// 895// Describes the assessment templates that are specified by the ARNs of the 896// assessment templates. 897// 898// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 899// with awserr.Error's Code and Message methods to get detailed information about 900// the error. 901// 902// See the AWS API reference guide for Amazon Inspector's 903// API operation DescribeAssessmentTemplates for usage and error information. 904// 905// Returned Error Codes: 906// * ErrCodeInternalException "InternalException" 907// Internal server error. 908// 909// * ErrCodeInvalidInputException "InvalidInputException" 910// The request was rejected because an invalid or out-of-range value was supplied 911// for an input parameter. 912// 913// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentTemplates 914func (c *Inspector) DescribeAssessmentTemplates(input *DescribeAssessmentTemplatesInput) (*DescribeAssessmentTemplatesOutput, error) { 915 req, out := c.DescribeAssessmentTemplatesRequest(input) 916 return out, req.Send() 917} 918 919// DescribeAssessmentTemplatesWithContext is the same as DescribeAssessmentTemplates with the addition of 920// the ability to pass a context and additional request options. 921// 922// See DescribeAssessmentTemplates for details on how to use this API operation. 923// 924// The context must be non-nil and will be used for request cancellation. If 925// the context is nil a panic will occur. In the future the SDK may create 926// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 927// for more information on using Contexts. 928func (c *Inspector) DescribeAssessmentTemplatesWithContext(ctx aws.Context, input *DescribeAssessmentTemplatesInput, opts ...request.Option) (*DescribeAssessmentTemplatesOutput, error) { 929 req, out := c.DescribeAssessmentTemplatesRequest(input) 930 req.SetContext(ctx) 931 req.ApplyOptions(opts...) 932 return out, req.Send() 933} 934 935const opDescribeCrossAccountAccessRole = "DescribeCrossAccountAccessRole" 936 937// DescribeCrossAccountAccessRoleRequest generates a "aws/request.Request" representing the 938// client's request for the DescribeCrossAccountAccessRole operation. The "output" return 939// value will be populated with the request's response once the request complets 940// successfuly. 941// 942// Use "Send" method on the returned Request to send the API call to the service. 943// the "output" return value is not valid until after Send returns without error. 944// 945// See DescribeCrossAccountAccessRole for more information on using the DescribeCrossAccountAccessRole 946// API call, and error handling. 947// 948// This method is useful when you want to inject custom logic or configuration 949// into the SDK's request lifecycle. Such as custom headers, or retry logic. 950// 951// 952// // Example sending a request using the DescribeCrossAccountAccessRoleRequest method. 953// req, resp := client.DescribeCrossAccountAccessRoleRequest(params) 954// 955// err := req.Send() 956// if err == nil { // resp is now filled 957// fmt.Println(resp) 958// } 959// 960// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeCrossAccountAccessRole 961func (c *Inspector) DescribeCrossAccountAccessRoleRequest(input *DescribeCrossAccountAccessRoleInput) (req *request.Request, output *DescribeCrossAccountAccessRoleOutput) { 962 op := &request.Operation{ 963 Name: opDescribeCrossAccountAccessRole, 964 HTTPMethod: "POST", 965 HTTPPath: "/", 966 } 967 968 if input == nil { 969 input = &DescribeCrossAccountAccessRoleInput{} 970 } 971 972 output = &DescribeCrossAccountAccessRoleOutput{} 973 req = c.newRequest(op, input, output) 974 return 975} 976 977// DescribeCrossAccountAccessRole API operation for Amazon Inspector. 978// 979// Describes the IAM role that enables Amazon Inspector to access your AWS account. 980// 981// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 982// with awserr.Error's Code and Message methods to get detailed information about 983// the error. 984// 985// See the AWS API reference guide for Amazon Inspector's 986// API operation DescribeCrossAccountAccessRole for usage and error information. 987// 988// Returned Error Codes: 989// * ErrCodeInternalException "InternalException" 990// Internal server error. 991// 992// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeCrossAccountAccessRole 993func (c *Inspector) DescribeCrossAccountAccessRole(input *DescribeCrossAccountAccessRoleInput) (*DescribeCrossAccountAccessRoleOutput, error) { 994 req, out := c.DescribeCrossAccountAccessRoleRequest(input) 995 return out, req.Send() 996} 997 998// DescribeCrossAccountAccessRoleWithContext is the same as DescribeCrossAccountAccessRole with the addition of 999// the ability to pass a context and additional request options. 1000// 1001// See DescribeCrossAccountAccessRole for details on how to use this API operation. 1002// 1003// The context must be non-nil and will be used for request cancellation. If 1004// the context is nil a panic will occur. In the future the SDK may create 1005// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1006// for more information on using Contexts. 1007func (c *Inspector) DescribeCrossAccountAccessRoleWithContext(ctx aws.Context, input *DescribeCrossAccountAccessRoleInput, opts ...request.Option) (*DescribeCrossAccountAccessRoleOutput, error) { 1008 req, out := c.DescribeCrossAccountAccessRoleRequest(input) 1009 req.SetContext(ctx) 1010 req.ApplyOptions(opts...) 1011 return out, req.Send() 1012} 1013 1014const opDescribeFindings = "DescribeFindings" 1015 1016// DescribeFindingsRequest generates a "aws/request.Request" representing the 1017// client's request for the DescribeFindings operation. The "output" return 1018// value will be populated with the request's response once the request complets 1019// successfuly. 1020// 1021// Use "Send" method on the returned Request to send the API call to the service. 1022// the "output" return value is not valid until after Send returns without error. 1023// 1024// See DescribeFindings for more information on using the DescribeFindings 1025// API call, and error handling. 1026// 1027// This method is useful when you want to inject custom logic or configuration 1028// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1029// 1030// 1031// // Example sending a request using the DescribeFindingsRequest method. 1032// req, resp := client.DescribeFindingsRequest(params) 1033// 1034// err := req.Send() 1035// if err == nil { // resp is now filled 1036// fmt.Println(resp) 1037// } 1038// 1039// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeFindings 1040func (c *Inspector) DescribeFindingsRequest(input *DescribeFindingsInput) (req *request.Request, output *DescribeFindingsOutput) { 1041 op := &request.Operation{ 1042 Name: opDescribeFindings, 1043 HTTPMethod: "POST", 1044 HTTPPath: "/", 1045 } 1046 1047 if input == nil { 1048 input = &DescribeFindingsInput{} 1049 } 1050 1051 output = &DescribeFindingsOutput{} 1052 req = c.newRequest(op, input, output) 1053 return 1054} 1055 1056// DescribeFindings API operation for Amazon Inspector. 1057// 1058// Describes the findings that are specified by the ARNs of the findings. 1059// 1060// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1061// with awserr.Error's Code and Message methods to get detailed information about 1062// the error. 1063// 1064// See the AWS API reference guide for Amazon Inspector's 1065// API operation DescribeFindings for usage and error information. 1066// 1067// Returned Error Codes: 1068// * ErrCodeInternalException "InternalException" 1069// Internal server error. 1070// 1071// * ErrCodeInvalidInputException "InvalidInputException" 1072// The request was rejected because an invalid or out-of-range value was supplied 1073// for an input parameter. 1074// 1075// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeFindings 1076func (c *Inspector) DescribeFindings(input *DescribeFindingsInput) (*DescribeFindingsOutput, error) { 1077 req, out := c.DescribeFindingsRequest(input) 1078 return out, req.Send() 1079} 1080 1081// DescribeFindingsWithContext is the same as DescribeFindings with the addition of 1082// the ability to pass a context and additional request options. 1083// 1084// See DescribeFindings for details on how to use this API operation. 1085// 1086// The context must be non-nil and will be used for request cancellation. If 1087// the context is nil a panic will occur. In the future the SDK may create 1088// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1089// for more information on using Contexts. 1090func (c *Inspector) DescribeFindingsWithContext(ctx aws.Context, input *DescribeFindingsInput, opts ...request.Option) (*DescribeFindingsOutput, error) { 1091 req, out := c.DescribeFindingsRequest(input) 1092 req.SetContext(ctx) 1093 req.ApplyOptions(opts...) 1094 return out, req.Send() 1095} 1096 1097const opDescribeResourceGroups = "DescribeResourceGroups" 1098 1099// DescribeResourceGroupsRequest generates a "aws/request.Request" representing the 1100// client's request for the DescribeResourceGroups operation. The "output" return 1101// value will be populated with the request's response once the request complets 1102// successfuly. 1103// 1104// Use "Send" method on the returned Request to send the API call to the service. 1105// the "output" return value is not valid until after Send returns without error. 1106// 1107// See DescribeResourceGroups for more information on using the DescribeResourceGroups 1108// API call, and error handling. 1109// 1110// This method is useful when you want to inject custom logic or configuration 1111// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1112// 1113// 1114// // Example sending a request using the DescribeResourceGroupsRequest method. 1115// req, resp := client.DescribeResourceGroupsRequest(params) 1116// 1117// err := req.Send() 1118// if err == nil { // resp is now filled 1119// fmt.Println(resp) 1120// } 1121// 1122// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeResourceGroups 1123func (c *Inspector) DescribeResourceGroupsRequest(input *DescribeResourceGroupsInput) (req *request.Request, output *DescribeResourceGroupsOutput) { 1124 op := &request.Operation{ 1125 Name: opDescribeResourceGroups, 1126 HTTPMethod: "POST", 1127 HTTPPath: "/", 1128 } 1129 1130 if input == nil { 1131 input = &DescribeResourceGroupsInput{} 1132 } 1133 1134 output = &DescribeResourceGroupsOutput{} 1135 req = c.newRequest(op, input, output) 1136 return 1137} 1138 1139// DescribeResourceGroups API operation for Amazon Inspector. 1140// 1141// Describes the resource groups that are specified by the ARNs of the resource 1142// groups. 1143// 1144// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1145// with awserr.Error's Code and Message methods to get detailed information about 1146// the error. 1147// 1148// See the AWS API reference guide for Amazon Inspector's 1149// API operation DescribeResourceGroups for usage and error information. 1150// 1151// Returned Error Codes: 1152// * ErrCodeInternalException "InternalException" 1153// Internal server error. 1154// 1155// * ErrCodeInvalidInputException "InvalidInputException" 1156// The request was rejected because an invalid or out-of-range value was supplied 1157// for an input parameter. 1158// 1159// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeResourceGroups 1160func (c *Inspector) DescribeResourceGroups(input *DescribeResourceGroupsInput) (*DescribeResourceGroupsOutput, error) { 1161 req, out := c.DescribeResourceGroupsRequest(input) 1162 return out, req.Send() 1163} 1164 1165// DescribeResourceGroupsWithContext is the same as DescribeResourceGroups with the addition of 1166// the ability to pass a context and additional request options. 1167// 1168// See DescribeResourceGroups for details on how to use this API operation. 1169// 1170// The context must be non-nil and will be used for request cancellation. If 1171// the context is nil a panic will occur. In the future the SDK may create 1172// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1173// for more information on using Contexts. 1174func (c *Inspector) DescribeResourceGroupsWithContext(ctx aws.Context, input *DescribeResourceGroupsInput, opts ...request.Option) (*DescribeResourceGroupsOutput, error) { 1175 req, out := c.DescribeResourceGroupsRequest(input) 1176 req.SetContext(ctx) 1177 req.ApplyOptions(opts...) 1178 return out, req.Send() 1179} 1180 1181const opDescribeRulesPackages = "DescribeRulesPackages" 1182 1183// DescribeRulesPackagesRequest generates a "aws/request.Request" representing the 1184// client's request for the DescribeRulesPackages operation. The "output" return 1185// value will be populated with the request's response once the request complets 1186// successfuly. 1187// 1188// Use "Send" method on the returned Request to send the API call to the service. 1189// the "output" return value is not valid until after Send returns without error. 1190// 1191// See DescribeRulesPackages for more information on using the DescribeRulesPackages 1192// API call, and error handling. 1193// 1194// This method is useful when you want to inject custom logic or configuration 1195// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1196// 1197// 1198// // Example sending a request using the DescribeRulesPackagesRequest method. 1199// req, resp := client.DescribeRulesPackagesRequest(params) 1200// 1201// err := req.Send() 1202// if err == nil { // resp is now filled 1203// fmt.Println(resp) 1204// } 1205// 1206// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeRulesPackages 1207func (c *Inspector) DescribeRulesPackagesRequest(input *DescribeRulesPackagesInput) (req *request.Request, output *DescribeRulesPackagesOutput) { 1208 op := &request.Operation{ 1209 Name: opDescribeRulesPackages, 1210 HTTPMethod: "POST", 1211 HTTPPath: "/", 1212 } 1213 1214 if input == nil { 1215 input = &DescribeRulesPackagesInput{} 1216 } 1217 1218 output = &DescribeRulesPackagesOutput{} 1219 req = c.newRequest(op, input, output) 1220 return 1221} 1222 1223// DescribeRulesPackages API operation for Amazon Inspector. 1224// 1225// Describes the rules packages that are specified by the ARNs of the rules 1226// packages. 1227// 1228// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1229// with awserr.Error's Code and Message methods to get detailed information about 1230// the error. 1231// 1232// See the AWS API reference guide for Amazon Inspector's 1233// API operation DescribeRulesPackages for usage and error information. 1234// 1235// Returned Error Codes: 1236// * ErrCodeInternalException "InternalException" 1237// Internal server error. 1238// 1239// * ErrCodeInvalidInputException "InvalidInputException" 1240// The request was rejected because an invalid or out-of-range value was supplied 1241// for an input parameter. 1242// 1243// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeRulesPackages 1244func (c *Inspector) DescribeRulesPackages(input *DescribeRulesPackagesInput) (*DescribeRulesPackagesOutput, error) { 1245 req, out := c.DescribeRulesPackagesRequest(input) 1246 return out, req.Send() 1247} 1248 1249// DescribeRulesPackagesWithContext is the same as DescribeRulesPackages with the addition of 1250// the ability to pass a context and additional request options. 1251// 1252// See DescribeRulesPackages for details on how to use this API operation. 1253// 1254// The context must be non-nil and will be used for request cancellation. If 1255// the context is nil a panic will occur. In the future the SDK may create 1256// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1257// for more information on using Contexts. 1258func (c *Inspector) DescribeRulesPackagesWithContext(ctx aws.Context, input *DescribeRulesPackagesInput, opts ...request.Option) (*DescribeRulesPackagesOutput, error) { 1259 req, out := c.DescribeRulesPackagesRequest(input) 1260 req.SetContext(ctx) 1261 req.ApplyOptions(opts...) 1262 return out, req.Send() 1263} 1264 1265const opGetAssessmentReport = "GetAssessmentReport" 1266 1267// GetAssessmentReportRequest generates a "aws/request.Request" representing the 1268// client's request for the GetAssessmentReport operation. The "output" return 1269// value will be populated with the request's response once the request complets 1270// successfuly. 1271// 1272// Use "Send" method on the returned Request to send the API call to the service. 1273// the "output" return value is not valid until after Send returns without error. 1274// 1275// See GetAssessmentReport for more information on using the GetAssessmentReport 1276// API call, and error handling. 1277// 1278// This method is useful when you want to inject custom logic or configuration 1279// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1280// 1281// 1282// // Example sending a request using the GetAssessmentReportRequest method. 1283// req, resp := client.GetAssessmentReportRequest(params) 1284// 1285// err := req.Send() 1286// if err == nil { // resp is now filled 1287// fmt.Println(resp) 1288// } 1289// 1290// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetAssessmentReport 1291func (c *Inspector) GetAssessmentReportRequest(input *GetAssessmentReportInput) (req *request.Request, output *GetAssessmentReportOutput) { 1292 op := &request.Operation{ 1293 Name: opGetAssessmentReport, 1294 HTTPMethod: "POST", 1295 HTTPPath: "/", 1296 } 1297 1298 if input == nil { 1299 input = &GetAssessmentReportInput{} 1300 } 1301 1302 output = &GetAssessmentReportOutput{} 1303 req = c.newRequest(op, input, output) 1304 return 1305} 1306 1307// GetAssessmentReport API operation for Amazon Inspector. 1308// 1309// Produces an assessment report that includes detailed and comprehensive results 1310// of a specified assessment run. 1311// 1312// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1313// with awserr.Error's Code and Message methods to get detailed information about 1314// the error. 1315// 1316// See the AWS API reference guide for Amazon Inspector's 1317// API operation GetAssessmentReport for usage and error information. 1318// 1319// Returned Error Codes: 1320// * ErrCodeInternalException "InternalException" 1321// Internal server error. 1322// 1323// * ErrCodeInvalidInputException "InvalidInputException" 1324// The request was rejected because an invalid or out-of-range value was supplied 1325// for an input parameter. 1326// 1327// * ErrCodeAccessDeniedException "AccessDeniedException" 1328// You do not have required permissions to access the requested resource. 1329// 1330// * ErrCodeNoSuchEntityException "NoSuchEntityException" 1331// The request was rejected because it referenced an entity that does not exist. 1332// The error code describes the entity. 1333// 1334// * ErrCodeAssessmentRunInProgressException "AssessmentRunInProgressException" 1335// You cannot perform a specified action if an assessment run is currently in 1336// progress. 1337// 1338// * ErrCodeUnsupportedFeatureException "UnsupportedFeatureException" 1339// Used by the GetAssessmentReport API. The request was rejected because you 1340// tried to generate a report for an assessment run that existed before reporting 1341// was supported in Amazon Inspector. You can only generate reports for assessment 1342// runs that took place or will take place after generating reports in Amazon 1343// Inspector became available. 1344// 1345// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetAssessmentReport 1346func (c *Inspector) GetAssessmentReport(input *GetAssessmentReportInput) (*GetAssessmentReportOutput, error) { 1347 req, out := c.GetAssessmentReportRequest(input) 1348 return out, req.Send() 1349} 1350 1351// GetAssessmentReportWithContext is the same as GetAssessmentReport with the addition of 1352// the ability to pass a context and additional request options. 1353// 1354// See GetAssessmentReport for details on how to use this API operation. 1355// 1356// The context must be non-nil and will be used for request cancellation. If 1357// the context is nil a panic will occur. In the future the SDK may create 1358// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1359// for more information on using Contexts. 1360func (c *Inspector) GetAssessmentReportWithContext(ctx aws.Context, input *GetAssessmentReportInput, opts ...request.Option) (*GetAssessmentReportOutput, error) { 1361 req, out := c.GetAssessmentReportRequest(input) 1362 req.SetContext(ctx) 1363 req.ApplyOptions(opts...) 1364 return out, req.Send() 1365} 1366 1367const opGetTelemetryMetadata = "GetTelemetryMetadata" 1368 1369// GetTelemetryMetadataRequest generates a "aws/request.Request" representing the 1370// client's request for the GetTelemetryMetadata operation. The "output" return 1371// value will be populated with the request's response once the request complets 1372// successfuly. 1373// 1374// Use "Send" method on the returned Request to send the API call to the service. 1375// the "output" return value is not valid until after Send returns without error. 1376// 1377// See GetTelemetryMetadata for more information on using the GetTelemetryMetadata 1378// API call, and error handling. 1379// 1380// This method is useful when you want to inject custom logic or configuration 1381// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1382// 1383// 1384// // Example sending a request using the GetTelemetryMetadataRequest method. 1385// req, resp := client.GetTelemetryMetadataRequest(params) 1386// 1387// err := req.Send() 1388// if err == nil { // resp is now filled 1389// fmt.Println(resp) 1390// } 1391// 1392// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetTelemetryMetadata 1393func (c *Inspector) GetTelemetryMetadataRequest(input *GetTelemetryMetadataInput) (req *request.Request, output *GetTelemetryMetadataOutput) { 1394 op := &request.Operation{ 1395 Name: opGetTelemetryMetadata, 1396 HTTPMethod: "POST", 1397 HTTPPath: "/", 1398 } 1399 1400 if input == nil { 1401 input = &GetTelemetryMetadataInput{} 1402 } 1403 1404 output = &GetTelemetryMetadataOutput{} 1405 req = c.newRequest(op, input, output) 1406 return 1407} 1408 1409// GetTelemetryMetadata API operation for Amazon Inspector. 1410// 1411// Information about the data that is collected for the specified assessment 1412// run. 1413// 1414// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1415// with awserr.Error's Code and Message methods to get detailed information about 1416// the error. 1417// 1418// See the AWS API reference guide for Amazon Inspector's 1419// API operation GetTelemetryMetadata for usage and error information. 1420// 1421// Returned Error Codes: 1422// * ErrCodeInternalException "InternalException" 1423// Internal server error. 1424// 1425// * ErrCodeInvalidInputException "InvalidInputException" 1426// The request was rejected because an invalid or out-of-range value was supplied 1427// for an input parameter. 1428// 1429// * ErrCodeAccessDeniedException "AccessDeniedException" 1430// You do not have required permissions to access the requested resource. 1431// 1432// * ErrCodeNoSuchEntityException "NoSuchEntityException" 1433// The request was rejected because it referenced an entity that does not exist. 1434// The error code describes the entity. 1435// 1436// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetTelemetryMetadata 1437func (c *Inspector) GetTelemetryMetadata(input *GetTelemetryMetadataInput) (*GetTelemetryMetadataOutput, error) { 1438 req, out := c.GetTelemetryMetadataRequest(input) 1439 return out, req.Send() 1440} 1441 1442// GetTelemetryMetadataWithContext is the same as GetTelemetryMetadata with the addition of 1443// the ability to pass a context and additional request options. 1444// 1445// See GetTelemetryMetadata for details on how to use this API operation. 1446// 1447// The context must be non-nil and will be used for request cancellation. If 1448// the context is nil a panic will occur. In the future the SDK may create 1449// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1450// for more information on using Contexts. 1451func (c *Inspector) GetTelemetryMetadataWithContext(ctx aws.Context, input *GetTelemetryMetadataInput, opts ...request.Option) (*GetTelemetryMetadataOutput, error) { 1452 req, out := c.GetTelemetryMetadataRequest(input) 1453 req.SetContext(ctx) 1454 req.ApplyOptions(opts...) 1455 return out, req.Send() 1456} 1457 1458const opListAssessmentRunAgents = "ListAssessmentRunAgents" 1459 1460// ListAssessmentRunAgentsRequest generates a "aws/request.Request" representing the 1461// client's request for the ListAssessmentRunAgents operation. The "output" return 1462// value will be populated with the request's response once the request complets 1463// successfuly. 1464// 1465// Use "Send" method on the returned Request to send the API call to the service. 1466// the "output" return value is not valid until after Send returns without error. 1467// 1468// See ListAssessmentRunAgents for more information on using the ListAssessmentRunAgents 1469// API call, and error handling. 1470// 1471// This method is useful when you want to inject custom logic or configuration 1472// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1473// 1474// 1475// // Example sending a request using the ListAssessmentRunAgentsRequest method. 1476// req, resp := client.ListAssessmentRunAgentsRequest(params) 1477// 1478// err := req.Send() 1479// if err == nil { // resp is now filled 1480// fmt.Println(resp) 1481// } 1482// 1483// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentRunAgents 1484func (c *Inspector) ListAssessmentRunAgentsRequest(input *ListAssessmentRunAgentsInput) (req *request.Request, output *ListAssessmentRunAgentsOutput) { 1485 op := &request.Operation{ 1486 Name: opListAssessmentRunAgents, 1487 HTTPMethod: "POST", 1488 HTTPPath: "/", 1489 Paginator: &request.Paginator{ 1490 InputTokens: []string{"nextToken"}, 1491 OutputTokens: []string{"nextToken"}, 1492 LimitToken: "maxResults", 1493 TruncationToken: "", 1494 }, 1495 } 1496 1497 if input == nil { 1498 input = &ListAssessmentRunAgentsInput{} 1499 } 1500 1501 output = &ListAssessmentRunAgentsOutput{} 1502 req = c.newRequest(op, input, output) 1503 return 1504} 1505 1506// ListAssessmentRunAgents API operation for Amazon Inspector. 1507// 1508// Lists the agents of the assessment runs that are specified by the ARNs of 1509// the assessment runs. 1510// 1511// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1512// with awserr.Error's Code and Message methods to get detailed information about 1513// the error. 1514// 1515// See the AWS API reference guide for Amazon Inspector's 1516// API operation ListAssessmentRunAgents for usage and error information. 1517// 1518// Returned Error Codes: 1519// * ErrCodeInternalException "InternalException" 1520// Internal server error. 1521// 1522// * ErrCodeInvalidInputException "InvalidInputException" 1523// The request was rejected because an invalid or out-of-range value was supplied 1524// for an input parameter. 1525// 1526// * ErrCodeAccessDeniedException "AccessDeniedException" 1527// You do not have required permissions to access the requested resource. 1528// 1529// * ErrCodeNoSuchEntityException "NoSuchEntityException" 1530// The request was rejected because it referenced an entity that does not exist. 1531// The error code describes the entity. 1532// 1533// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentRunAgents 1534func (c *Inspector) ListAssessmentRunAgents(input *ListAssessmentRunAgentsInput) (*ListAssessmentRunAgentsOutput, error) { 1535 req, out := c.ListAssessmentRunAgentsRequest(input) 1536 return out, req.Send() 1537} 1538 1539// ListAssessmentRunAgentsWithContext is the same as ListAssessmentRunAgents with the addition of 1540// the ability to pass a context and additional request options. 1541// 1542// See ListAssessmentRunAgents for details on how to use this API operation. 1543// 1544// The context must be non-nil and will be used for request cancellation. If 1545// the context is nil a panic will occur. In the future the SDK may create 1546// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1547// for more information on using Contexts. 1548func (c *Inspector) ListAssessmentRunAgentsWithContext(ctx aws.Context, input *ListAssessmentRunAgentsInput, opts ...request.Option) (*ListAssessmentRunAgentsOutput, error) { 1549 req, out := c.ListAssessmentRunAgentsRequest(input) 1550 req.SetContext(ctx) 1551 req.ApplyOptions(opts...) 1552 return out, req.Send() 1553} 1554 1555// ListAssessmentRunAgentsPages iterates over the pages of a ListAssessmentRunAgents operation, 1556// calling the "fn" function with the response data for each page. To stop 1557// iterating, return false from the fn function. 1558// 1559// See ListAssessmentRunAgents method for more information on how to use this operation. 1560// 1561// Note: This operation can generate multiple requests to a service. 1562// 1563// // Example iterating over at most 3 pages of a ListAssessmentRunAgents operation. 1564// pageNum := 0 1565// err := client.ListAssessmentRunAgentsPages(params, 1566// func(page *ListAssessmentRunAgentsOutput, lastPage bool) bool { 1567// pageNum++ 1568// fmt.Println(page) 1569// return pageNum <= 3 1570// }) 1571// 1572func (c *Inspector) ListAssessmentRunAgentsPages(input *ListAssessmentRunAgentsInput, fn func(*ListAssessmentRunAgentsOutput, bool) bool) error { 1573 return c.ListAssessmentRunAgentsPagesWithContext(aws.BackgroundContext(), input, fn) 1574} 1575 1576// ListAssessmentRunAgentsPagesWithContext same as ListAssessmentRunAgentsPages except 1577// it takes a Context and allows setting request options on the pages. 1578// 1579// The context must be non-nil and will be used for request cancellation. If 1580// the context is nil a panic will occur. In the future the SDK may create 1581// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1582// for more information on using Contexts. 1583func (c *Inspector) ListAssessmentRunAgentsPagesWithContext(ctx aws.Context, input *ListAssessmentRunAgentsInput, fn func(*ListAssessmentRunAgentsOutput, bool) bool, opts ...request.Option) error { 1584 p := request.Pagination{ 1585 NewRequest: func() (*request.Request, error) { 1586 var inCpy *ListAssessmentRunAgentsInput 1587 if input != nil { 1588 tmp := *input 1589 inCpy = &tmp 1590 } 1591 req, _ := c.ListAssessmentRunAgentsRequest(inCpy) 1592 req.SetContext(ctx) 1593 req.ApplyOptions(opts...) 1594 return req, nil 1595 }, 1596 } 1597 1598 cont := true 1599 for p.Next() && cont { 1600 cont = fn(p.Page().(*ListAssessmentRunAgentsOutput), !p.HasNextPage()) 1601 } 1602 return p.Err() 1603} 1604 1605const opListAssessmentRuns = "ListAssessmentRuns" 1606 1607// ListAssessmentRunsRequest generates a "aws/request.Request" representing the 1608// client's request for the ListAssessmentRuns operation. The "output" return 1609// value will be populated with the request's response once the request complets 1610// successfuly. 1611// 1612// Use "Send" method on the returned Request to send the API call to the service. 1613// the "output" return value is not valid until after Send returns without error. 1614// 1615// See ListAssessmentRuns for more information on using the ListAssessmentRuns 1616// API call, and error handling. 1617// 1618// This method is useful when you want to inject custom logic or configuration 1619// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1620// 1621// 1622// // Example sending a request using the ListAssessmentRunsRequest method. 1623// req, resp := client.ListAssessmentRunsRequest(params) 1624// 1625// err := req.Send() 1626// if err == nil { // resp is now filled 1627// fmt.Println(resp) 1628// } 1629// 1630// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentRuns 1631func (c *Inspector) ListAssessmentRunsRequest(input *ListAssessmentRunsInput) (req *request.Request, output *ListAssessmentRunsOutput) { 1632 op := &request.Operation{ 1633 Name: opListAssessmentRuns, 1634 HTTPMethod: "POST", 1635 HTTPPath: "/", 1636 Paginator: &request.Paginator{ 1637 InputTokens: []string{"nextToken"}, 1638 OutputTokens: []string{"nextToken"}, 1639 LimitToken: "maxResults", 1640 TruncationToken: "", 1641 }, 1642 } 1643 1644 if input == nil { 1645 input = &ListAssessmentRunsInput{} 1646 } 1647 1648 output = &ListAssessmentRunsOutput{} 1649 req = c.newRequest(op, input, output) 1650 return 1651} 1652 1653// ListAssessmentRuns API operation for Amazon Inspector. 1654// 1655// Lists the assessment runs that correspond to the assessment templates that 1656// are specified by the ARNs of the assessment templates. 1657// 1658// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1659// with awserr.Error's Code and Message methods to get detailed information about 1660// the error. 1661// 1662// See the AWS API reference guide for Amazon Inspector's 1663// API operation ListAssessmentRuns for usage and error information. 1664// 1665// Returned Error Codes: 1666// * ErrCodeInternalException "InternalException" 1667// Internal server error. 1668// 1669// * ErrCodeInvalidInputException "InvalidInputException" 1670// The request was rejected because an invalid or out-of-range value was supplied 1671// for an input parameter. 1672// 1673// * ErrCodeAccessDeniedException "AccessDeniedException" 1674// You do not have required permissions to access the requested resource. 1675// 1676// * ErrCodeNoSuchEntityException "NoSuchEntityException" 1677// The request was rejected because it referenced an entity that does not exist. 1678// The error code describes the entity. 1679// 1680// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentRuns 1681func (c *Inspector) ListAssessmentRuns(input *ListAssessmentRunsInput) (*ListAssessmentRunsOutput, error) { 1682 req, out := c.ListAssessmentRunsRequest(input) 1683 return out, req.Send() 1684} 1685 1686// ListAssessmentRunsWithContext is the same as ListAssessmentRuns with the addition of 1687// the ability to pass a context and additional request options. 1688// 1689// See ListAssessmentRuns for details on how to use this API operation. 1690// 1691// The context must be non-nil and will be used for request cancellation. If 1692// the context is nil a panic will occur. In the future the SDK may create 1693// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1694// for more information on using Contexts. 1695func (c *Inspector) ListAssessmentRunsWithContext(ctx aws.Context, input *ListAssessmentRunsInput, opts ...request.Option) (*ListAssessmentRunsOutput, error) { 1696 req, out := c.ListAssessmentRunsRequest(input) 1697 req.SetContext(ctx) 1698 req.ApplyOptions(opts...) 1699 return out, req.Send() 1700} 1701 1702// ListAssessmentRunsPages iterates over the pages of a ListAssessmentRuns operation, 1703// calling the "fn" function with the response data for each page. To stop 1704// iterating, return false from the fn function. 1705// 1706// See ListAssessmentRuns method for more information on how to use this operation. 1707// 1708// Note: This operation can generate multiple requests to a service. 1709// 1710// // Example iterating over at most 3 pages of a ListAssessmentRuns operation. 1711// pageNum := 0 1712// err := client.ListAssessmentRunsPages(params, 1713// func(page *ListAssessmentRunsOutput, lastPage bool) bool { 1714// pageNum++ 1715// fmt.Println(page) 1716// return pageNum <= 3 1717// }) 1718// 1719func (c *Inspector) ListAssessmentRunsPages(input *ListAssessmentRunsInput, fn func(*ListAssessmentRunsOutput, bool) bool) error { 1720 return c.ListAssessmentRunsPagesWithContext(aws.BackgroundContext(), input, fn) 1721} 1722 1723// ListAssessmentRunsPagesWithContext same as ListAssessmentRunsPages except 1724// it takes a Context and allows setting request options on the pages. 1725// 1726// The context must be non-nil and will be used for request cancellation. If 1727// the context is nil a panic will occur. In the future the SDK may create 1728// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1729// for more information on using Contexts. 1730func (c *Inspector) ListAssessmentRunsPagesWithContext(ctx aws.Context, input *ListAssessmentRunsInput, fn func(*ListAssessmentRunsOutput, bool) bool, opts ...request.Option) error { 1731 p := request.Pagination{ 1732 NewRequest: func() (*request.Request, error) { 1733 var inCpy *ListAssessmentRunsInput 1734 if input != nil { 1735 tmp := *input 1736 inCpy = &tmp 1737 } 1738 req, _ := c.ListAssessmentRunsRequest(inCpy) 1739 req.SetContext(ctx) 1740 req.ApplyOptions(opts...) 1741 return req, nil 1742 }, 1743 } 1744 1745 cont := true 1746 for p.Next() && cont { 1747 cont = fn(p.Page().(*ListAssessmentRunsOutput), !p.HasNextPage()) 1748 } 1749 return p.Err() 1750} 1751 1752const opListAssessmentTargets = "ListAssessmentTargets" 1753 1754// ListAssessmentTargetsRequest generates a "aws/request.Request" representing the 1755// client's request for the ListAssessmentTargets operation. The "output" return 1756// value will be populated with the request's response once the request complets 1757// successfuly. 1758// 1759// Use "Send" method on the returned Request to send the API call to the service. 1760// the "output" return value is not valid until after Send returns without error. 1761// 1762// See ListAssessmentTargets for more information on using the ListAssessmentTargets 1763// API call, and error handling. 1764// 1765// This method is useful when you want to inject custom logic or configuration 1766// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1767// 1768// 1769// // Example sending a request using the ListAssessmentTargetsRequest method. 1770// req, resp := client.ListAssessmentTargetsRequest(params) 1771// 1772// err := req.Send() 1773// if err == nil { // resp is now filled 1774// fmt.Println(resp) 1775// } 1776// 1777// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentTargets 1778func (c *Inspector) ListAssessmentTargetsRequest(input *ListAssessmentTargetsInput) (req *request.Request, output *ListAssessmentTargetsOutput) { 1779 op := &request.Operation{ 1780 Name: opListAssessmentTargets, 1781 HTTPMethod: "POST", 1782 HTTPPath: "/", 1783 Paginator: &request.Paginator{ 1784 InputTokens: []string{"nextToken"}, 1785 OutputTokens: []string{"nextToken"}, 1786 LimitToken: "maxResults", 1787 TruncationToken: "", 1788 }, 1789 } 1790 1791 if input == nil { 1792 input = &ListAssessmentTargetsInput{} 1793 } 1794 1795 output = &ListAssessmentTargetsOutput{} 1796 req = c.newRequest(op, input, output) 1797 return 1798} 1799 1800// ListAssessmentTargets API operation for Amazon Inspector. 1801// 1802// Lists the ARNs of the assessment targets within this AWS account. For more 1803// information about assessment targets, see Amazon Inspector Assessment Targets 1804// (http://docs.aws.amazon.com/inspector/latest/userguide/inspector_applications.html). 1805// 1806// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1807// with awserr.Error's Code and Message methods to get detailed information about 1808// the error. 1809// 1810// See the AWS API reference guide for Amazon Inspector's 1811// API operation ListAssessmentTargets for usage and error information. 1812// 1813// Returned Error Codes: 1814// * ErrCodeInternalException "InternalException" 1815// Internal server error. 1816// 1817// * ErrCodeInvalidInputException "InvalidInputException" 1818// The request was rejected because an invalid or out-of-range value was supplied 1819// for an input parameter. 1820// 1821// * ErrCodeAccessDeniedException "AccessDeniedException" 1822// You do not have required permissions to access the requested resource. 1823// 1824// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentTargets 1825func (c *Inspector) ListAssessmentTargets(input *ListAssessmentTargetsInput) (*ListAssessmentTargetsOutput, error) { 1826 req, out := c.ListAssessmentTargetsRequest(input) 1827 return out, req.Send() 1828} 1829 1830// ListAssessmentTargetsWithContext is the same as ListAssessmentTargets with the addition of 1831// the ability to pass a context and additional request options. 1832// 1833// See ListAssessmentTargets for details on how to use this API operation. 1834// 1835// The context must be non-nil and will be used for request cancellation. If 1836// the context is nil a panic will occur. In the future the SDK may create 1837// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1838// for more information on using Contexts. 1839func (c *Inspector) ListAssessmentTargetsWithContext(ctx aws.Context, input *ListAssessmentTargetsInput, opts ...request.Option) (*ListAssessmentTargetsOutput, error) { 1840 req, out := c.ListAssessmentTargetsRequest(input) 1841 req.SetContext(ctx) 1842 req.ApplyOptions(opts...) 1843 return out, req.Send() 1844} 1845 1846// ListAssessmentTargetsPages iterates over the pages of a ListAssessmentTargets operation, 1847// calling the "fn" function with the response data for each page. To stop 1848// iterating, return false from the fn function. 1849// 1850// See ListAssessmentTargets method for more information on how to use this operation. 1851// 1852// Note: This operation can generate multiple requests to a service. 1853// 1854// // Example iterating over at most 3 pages of a ListAssessmentTargets operation. 1855// pageNum := 0 1856// err := client.ListAssessmentTargetsPages(params, 1857// func(page *ListAssessmentTargetsOutput, lastPage bool) bool { 1858// pageNum++ 1859// fmt.Println(page) 1860// return pageNum <= 3 1861// }) 1862// 1863func (c *Inspector) ListAssessmentTargetsPages(input *ListAssessmentTargetsInput, fn func(*ListAssessmentTargetsOutput, bool) bool) error { 1864 return c.ListAssessmentTargetsPagesWithContext(aws.BackgroundContext(), input, fn) 1865} 1866 1867// ListAssessmentTargetsPagesWithContext same as ListAssessmentTargetsPages except 1868// it takes a Context and allows setting request options on the pages. 1869// 1870// The context must be non-nil and will be used for request cancellation. If 1871// the context is nil a panic will occur. In the future the SDK may create 1872// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1873// for more information on using Contexts. 1874func (c *Inspector) ListAssessmentTargetsPagesWithContext(ctx aws.Context, input *ListAssessmentTargetsInput, fn func(*ListAssessmentTargetsOutput, bool) bool, opts ...request.Option) error { 1875 p := request.Pagination{ 1876 NewRequest: func() (*request.Request, error) { 1877 var inCpy *ListAssessmentTargetsInput 1878 if input != nil { 1879 tmp := *input 1880 inCpy = &tmp 1881 } 1882 req, _ := c.ListAssessmentTargetsRequest(inCpy) 1883 req.SetContext(ctx) 1884 req.ApplyOptions(opts...) 1885 return req, nil 1886 }, 1887 } 1888 1889 cont := true 1890 for p.Next() && cont { 1891 cont = fn(p.Page().(*ListAssessmentTargetsOutput), !p.HasNextPage()) 1892 } 1893 return p.Err() 1894} 1895 1896const opListAssessmentTemplates = "ListAssessmentTemplates" 1897 1898// ListAssessmentTemplatesRequest generates a "aws/request.Request" representing the 1899// client's request for the ListAssessmentTemplates operation. The "output" return 1900// value will be populated with the request's response once the request complets 1901// successfuly. 1902// 1903// Use "Send" method on the returned Request to send the API call to the service. 1904// the "output" return value is not valid until after Send returns without error. 1905// 1906// See ListAssessmentTemplates for more information on using the ListAssessmentTemplates 1907// API call, and error handling. 1908// 1909// This method is useful when you want to inject custom logic or configuration 1910// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1911// 1912// 1913// // Example sending a request using the ListAssessmentTemplatesRequest method. 1914// req, resp := client.ListAssessmentTemplatesRequest(params) 1915// 1916// err := req.Send() 1917// if err == nil { // resp is now filled 1918// fmt.Println(resp) 1919// } 1920// 1921// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentTemplates 1922func (c *Inspector) ListAssessmentTemplatesRequest(input *ListAssessmentTemplatesInput) (req *request.Request, output *ListAssessmentTemplatesOutput) { 1923 op := &request.Operation{ 1924 Name: opListAssessmentTemplates, 1925 HTTPMethod: "POST", 1926 HTTPPath: "/", 1927 Paginator: &request.Paginator{ 1928 InputTokens: []string{"nextToken"}, 1929 OutputTokens: []string{"nextToken"}, 1930 LimitToken: "maxResults", 1931 TruncationToken: "", 1932 }, 1933 } 1934 1935 if input == nil { 1936 input = &ListAssessmentTemplatesInput{} 1937 } 1938 1939 output = &ListAssessmentTemplatesOutput{} 1940 req = c.newRequest(op, input, output) 1941 return 1942} 1943 1944// ListAssessmentTemplates API operation for Amazon Inspector. 1945// 1946// Lists the assessment templates that correspond to the assessment targets 1947// that are specified by the ARNs of the assessment targets. 1948// 1949// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1950// with awserr.Error's Code and Message methods to get detailed information about 1951// the error. 1952// 1953// See the AWS API reference guide for Amazon Inspector's 1954// API operation ListAssessmentTemplates for usage and error information. 1955// 1956// Returned Error Codes: 1957// * ErrCodeInternalException "InternalException" 1958// Internal server error. 1959// 1960// * ErrCodeInvalidInputException "InvalidInputException" 1961// The request was rejected because an invalid or out-of-range value was supplied 1962// for an input parameter. 1963// 1964// * ErrCodeAccessDeniedException "AccessDeniedException" 1965// You do not have required permissions to access the requested resource. 1966// 1967// * ErrCodeNoSuchEntityException "NoSuchEntityException" 1968// The request was rejected because it referenced an entity that does not exist. 1969// The error code describes the entity. 1970// 1971// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentTemplates 1972func (c *Inspector) ListAssessmentTemplates(input *ListAssessmentTemplatesInput) (*ListAssessmentTemplatesOutput, error) { 1973 req, out := c.ListAssessmentTemplatesRequest(input) 1974 return out, req.Send() 1975} 1976 1977// ListAssessmentTemplatesWithContext is the same as ListAssessmentTemplates with the addition of 1978// the ability to pass a context and additional request options. 1979// 1980// See ListAssessmentTemplates for details on how to use this API operation. 1981// 1982// The context must be non-nil and will be used for request cancellation. If 1983// the context is nil a panic will occur. In the future the SDK may create 1984// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1985// for more information on using Contexts. 1986func (c *Inspector) ListAssessmentTemplatesWithContext(ctx aws.Context, input *ListAssessmentTemplatesInput, opts ...request.Option) (*ListAssessmentTemplatesOutput, error) { 1987 req, out := c.ListAssessmentTemplatesRequest(input) 1988 req.SetContext(ctx) 1989 req.ApplyOptions(opts...) 1990 return out, req.Send() 1991} 1992 1993// ListAssessmentTemplatesPages iterates over the pages of a ListAssessmentTemplates operation, 1994// calling the "fn" function with the response data for each page. To stop 1995// iterating, return false from the fn function. 1996// 1997// See ListAssessmentTemplates method for more information on how to use this operation. 1998// 1999// Note: This operation can generate multiple requests to a service. 2000// 2001// // Example iterating over at most 3 pages of a ListAssessmentTemplates operation. 2002// pageNum := 0 2003// err := client.ListAssessmentTemplatesPages(params, 2004// func(page *ListAssessmentTemplatesOutput, lastPage bool) bool { 2005// pageNum++ 2006// fmt.Println(page) 2007// return pageNum <= 3 2008// }) 2009// 2010func (c *Inspector) ListAssessmentTemplatesPages(input *ListAssessmentTemplatesInput, fn func(*ListAssessmentTemplatesOutput, bool) bool) error { 2011 return c.ListAssessmentTemplatesPagesWithContext(aws.BackgroundContext(), input, fn) 2012} 2013 2014// ListAssessmentTemplatesPagesWithContext same as ListAssessmentTemplatesPages except 2015// it takes a Context and allows setting request options on the pages. 2016// 2017// The context must be non-nil and will be used for request cancellation. If 2018// the context is nil a panic will occur. In the future the SDK may create 2019// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2020// for more information on using Contexts. 2021func (c *Inspector) ListAssessmentTemplatesPagesWithContext(ctx aws.Context, input *ListAssessmentTemplatesInput, fn func(*ListAssessmentTemplatesOutput, bool) bool, opts ...request.Option) error { 2022 p := request.Pagination{ 2023 NewRequest: func() (*request.Request, error) { 2024 var inCpy *ListAssessmentTemplatesInput 2025 if input != nil { 2026 tmp := *input 2027 inCpy = &tmp 2028 } 2029 req, _ := c.ListAssessmentTemplatesRequest(inCpy) 2030 req.SetContext(ctx) 2031 req.ApplyOptions(opts...) 2032 return req, nil 2033 }, 2034 } 2035 2036 cont := true 2037 for p.Next() && cont { 2038 cont = fn(p.Page().(*ListAssessmentTemplatesOutput), !p.HasNextPage()) 2039 } 2040 return p.Err() 2041} 2042 2043const opListEventSubscriptions = "ListEventSubscriptions" 2044 2045// ListEventSubscriptionsRequest generates a "aws/request.Request" representing the 2046// client's request for the ListEventSubscriptions operation. The "output" return 2047// value will be populated with the request's response once the request complets 2048// successfuly. 2049// 2050// Use "Send" method on the returned Request to send the API call to the service. 2051// the "output" return value is not valid until after Send returns without error. 2052// 2053// See ListEventSubscriptions for more information on using the ListEventSubscriptions 2054// API call, and error handling. 2055// 2056// This method is useful when you want to inject custom logic or configuration 2057// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2058// 2059// 2060// // Example sending a request using the ListEventSubscriptionsRequest method. 2061// req, resp := client.ListEventSubscriptionsRequest(params) 2062// 2063// err := req.Send() 2064// if err == nil { // resp is now filled 2065// fmt.Println(resp) 2066// } 2067// 2068// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListEventSubscriptions 2069func (c *Inspector) ListEventSubscriptionsRequest(input *ListEventSubscriptionsInput) (req *request.Request, output *ListEventSubscriptionsOutput) { 2070 op := &request.Operation{ 2071 Name: opListEventSubscriptions, 2072 HTTPMethod: "POST", 2073 HTTPPath: "/", 2074 Paginator: &request.Paginator{ 2075 InputTokens: []string{"nextToken"}, 2076 OutputTokens: []string{"nextToken"}, 2077 LimitToken: "maxResults", 2078 TruncationToken: "", 2079 }, 2080 } 2081 2082 if input == nil { 2083 input = &ListEventSubscriptionsInput{} 2084 } 2085 2086 output = &ListEventSubscriptionsOutput{} 2087 req = c.newRequest(op, input, output) 2088 return 2089} 2090 2091// ListEventSubscriptions API operation for Amazon Inspector. 2092// 2093// Lists all the event subscriptions for the assessment template that is specified 2094// by the ARN of the assessment template. For more information, see SubscribeToEvent 2095// and UnsubscribeFromEvent. 2096// 2097// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2098// with awserr.Error's Code and Message methods to get detailed information about 2099// the error. 2100// 2101// See the AWS API reference guide for Amazon Inspector's 2102// API operation ListEventSubscriptions for usage and error information. 2103// 2104// Returned Error Codes: 2105// * ErrCodeInternalException "InternalException" 2106// Internal server error. 2107// 2108// * ErrCodeInvalidInputException "InvalidInputException" 2109// The request was rejected because an invalid or out-of-range value was supplied 2110// for an input parameter. 2111// 2112// * ErrCodeAccessDeniedException "AccessDeniedException" 2113// You do not have required permissions to access the requested resource. 2114// 2115// * ErrCodeNoSuchEntityException "NoSuchEntityException" 2116// The request was rejected because it referenced an entity that does not exist. 2117// The error code describes the entity. 2118// 2119// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListEventSubscriptions 2120func (c *Inspector) ListEventSubscriptions(input *ListEventSubscriptionsInput) (*ListEventSubscriptionsOutput, error) { 2121 req, out := c.ListEventSubscriptionsRequest(input) 2122 return out, req.Send() 2123} 2124 2125// ListEventSubscriptionsWithContext is the same as ListEventSubscriptions with the addition of 2126// the ability to pass a context and additional request options. 2127// 2128// See ListEventSubscriptions for details on how to use this API operation. 2129// 2130// The context must be non-nil and will be used for request cancellation. If 2131// the context is nil a panic will occur. In the future the SDK may create 2132// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2133// for more information on using Contexts. 2134func (c *Inspector) ListEventSubscriptionsWithContext(ctx aws.Context, input *ListEventSubscriptionsInput, opts ...request.Option) (*ListEventSubscriptionsOutput, error) { 2135 req, out := c.ListEventSubscriptionsRequest(input) 2136 req.SetContext(ctx) 2137 req.ApplyOptions(opts...) 2138 return out, req.Send() 2139} 2140 2141// ListEventSubscriptionsPages iterates over the pages of a ListEventSubscriptions operation, 2142// calling the "fn" function with the response data for each page. To stop 2143// iterating, return false from the fn function. 2144// 2145// See ListEventSubscriptions method for more information on how to use this operation. 2146// 2147// Note: This operation can generate multiple requests to a service. 2148// 2149// // Example iterating over at most 3 pages of a ListEventSubscriptions operation. 2150// pageNum := 0 2151// err := client.ListEventSubscriptionsPages(params, 2152// func(page *ListEventSubscriptionsOutput, lastPage bool) bool { 2153// pageNum++ 2154// fmt.Println(page) 2155// return pageNum <= 3 2156// }) 2157// 2158func (c *Inspector) ListEventSubscriptionsPages(input *ListEventSubscriptionsInput, fn func(*ListEventSubscriptionsOutput, bool) bool) error { 2159 return c.ListEventSubscriptionsPagesWithContext(aws.BackgroundContext(), input, fn) 2160} 2161 2162// ListEventSubscriptionsPagesWithContext same as ListEventSubscriptionsPages except 2163// it takes a Context and allows setting request options on the pages. 2164// 2165// The context must be non-nil and will be used for request cancellation. If 2166// the context is nil a panic will occur. In the future the SDK may create 2167// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2168// for more information on using Contexts. 2169func (c *Inspector) ListEventSubscriptionsPagesWithContext(ctx aws.Context, input *ListEventSubscriptionsInput, fn func(*ListEventSubscriptionsOutput, bool) bool, opts ...request.Option) error { 2170 p := request.Pagination{ 2171 NewRequest: func() (*request.Request, error) { 2172 var inCpy *ListEventSubscriptionsInput 2173 if input != nil { 2174 tmp := *input 2175 inCpy = &tmp 2176 } 2177 req, _ := c.ListEventSubscriptionsRequest(inCpy) 2178 req.SetContext(ctx) 2179 req.ApplyOptions(opts...) 2180 return req, nil 2181 }, 2182 } 2183 2184 cont := true 2185 for p.Next() && cont { 2186 cont = fn(p.Page().(*ListEventSubscriptionsOutput), !p.HasNextPage()) 2187 } 2188 return p.Err() 2189} 2190 2191const opListFindings = "ListFindings" 2192 2193// ListFindingsRequest generates a "aws/request.Request" representing the 2194// client's request for the ListFindings operation. The "output" return 2195// value will be populated with the request's response once the request complets 2196// successfuly. 2197// 2198// Use "Send" method on the returned Request to send the API call to the service. 2199// the "output" return value is not valid until after Send returns without error. 2200// 2201// See ListFindings for more information on using the ListFindings 2202// API call, and error handling. 2203// 2204// This method is useful when you want to inject custom logic or configuration 2205// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2206// 2207// 2208// // Example sending a request using the ListFindingsRequest method. 2209// req, resp := client.ListFindingsRequest(params) 2210// 2211// err := req.Send() 2212// if err == nil { // resp is now filled 2213// fmt.Println(resp) 2214// } 2215// 2216// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListFindings 2217func (c *Inspector) ListFindingsRequest(input *ListFindingsInput) (req *request.Request, output *ListFindingsOutput) { 2218 op := &request.Operation{ 2219 Name: opListFindings, 2220 HTTPMethod: "POST", 2221 HTTPPath: "/", 2222 Paginator: &request.Paginator{ 2223 InputTokens: []string{"nextToken"}, 2224 OutputTokens: []string{"nextToken"}, 2225 LimitToken: "maxResults", 2226 TruncationToken: "", 2227 }, 2228 } 2229 2230 if input == nil { 2231 input = &ListFindingsInput{} 2232 } 2233 2234 output = &ListFindingsOutput{} 2235 req = c.newRequest(op, input, output) 2236 return 2237} 2238 2239// ListFindings API operation for Amazon Inspector. 2240// 2241// Lists findings that are generated by the assessment runs that are specified 2242// by the ARNs of the assessment runs. 2243// 2244// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2245// with awserr.Error's Code and Message methods to get detailed information about 2246// the error. 2247// 2248// See the AWS API reference guide for Amazon Inspector's 2249// API operation ListFindings for usage and error information. 2250// 2251// Returned Error Codes: 2252// * ErrCodeInternalException "InternalException" 2253// Internal server error. 2254// 2255// * ErrCodeInvalidInputException "InvalidInputException" 2256// The request was rejected because an invalid or out-of-range value was supplied 2257// for an input parameter. 2258// 2259// * ErrCodeAccessDeniedException "AccessDeniedException" 2260// You do not have required permissions to access the requested resource. 2261// 2262// * ErrCodeNoSuchEntityException "NoSuchEntityException" 2263// The request was rejected because it referenced an entity that does not exist. 2264// The error code describes the entity. 2265// 2266// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListFindings 2267func (c *Inspector) ListFindings(input *ListFindingsInput) (*ListFindingsOutput, error) { 2268 req, out := c.ListFindingsRequest(input) 2269 return out, req.Send() 2270} 2271 2272// ListFindingsWithContext is the same as ListFindings with the addition of 2273// the ability to pass a context and additional request options. 2274// 2275// See ListFindings for details on how to use this API operation. 2276// 2277// The context must be non-nil and will be used for request cancellation. If 2278// the context is nil a panic will occur. In the future the SDK may create 2279// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2280// for more information on using Contexts. 2281func (c *Inspector) ListFindingsWithContext(ctx aws.Context, input *ListFindingsInput, opts ...request.Option) (*ListFindingsOutput, error) { 2282 req, out := c.ListFindingsRequest(input) 2283 req.SetContext(ctx) 2284 req.ApplyOptions(opts...) 2285 return out, req.Send() 2286} 2287 2288// ListFindingsPages iterates over the pages of a ListFindings operation, 2289// calling the "fn" function with the response data for each page. To stop 2290// iterating, return false from the fn function. 2291// 2292// See ListFindings method for more information on how to use this operation. 2293// 2294// Note: This operation can generate multiple requests to a service. 2295// 2296// // Example iterating over at most 3 pages of a ListFindings operation. 2297// pageNum := 0 2298// err := client.ListFindingsPages(params, 2299// func(page *ListFindingsOutput, lastPage bool) bool { 2300// pageNum++ 2301// fmt.Println(page) 2302// return pageNum <= 3 2303// }) 2304// 2305func (c *Inspector) ListFindingsPages(input *ListFindingsInput, fn func(*ListFindingsOutput, bool) bool) error { 2306 return c.ListFindingsPagesWithContext(aws.BackgroundContext(), input, fn) 2307} 2308 2309// ListFindingsPagesWithContext same as ListFindingsPages except 2310// it takes a Context and allows setting request options on the pages. 2311// 2312// The context must be non-nil and will be used for request cancellation. If 2313// the context is nil a panic will occur. In the future the SDK may create 2314// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2315// for more information on using Contexts. 2316func (c *Inspector) ListFindingsPagesWithContext(ctx aws.Context, input *ListFindingsInput, fn func(*ListFindingsOutput, bool) bool, opts ...request.Option) error { 2317 p := request.Pagination{ 2318 NewRequest: func() (*request.Request, error) { 2319 var inCpy *ListFindingsInput 2320 if input != nil { 2321 tmp := *input 2322 inCpy = &tmp 2323 } 2324 req, _ := c.ListFindingsRequest(inCpy) 2325 req.SetContext(ctx) 2326 req.ApplyOptions(opts...) 2327 return req, nil 2328 }, 2329 } 2330 2331 cont := true 2332 for p.Next() && cont { 2333 cont = fn(p.Page().(*ListFindingsOutput), !p.HasNextPage()) 2334 } 2335 return p.Err() 2336} 2337 2338const opListRulesPackages = "ListRulesPackages" 2339 2340// ListRulesPackagesRequest generates a "aws/request.Request" representing the 2341// client's request for the ListRulesPackages operation. The "output" return 2342// value will be populated with the request's response once the request complets 2343// successfuly. 2344// 2345// Use "Send" method on the returned Request to send the API call to the service. 2346// the "output" return value is not valid until after Send returns without error. 2347// 2348// See ListRulesPackages for more information on using the ListRulesPackages 2349// API call, and error handling. 2350// 2351// This method is useful when you want to inject custom logic or configuration 2352// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2353// 2354// 2355// // Example sending a request using the ListRulesPackagesRequest method. 2356// req, resp := client.ListRulesPackagesRequest(params) 2357// 2358// err := req.Send() 2359// if err == nil { // resp is now filled 2360// fmt.Println(resp) 2361// } 2362// 2363// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListRulesPackages 2364func (c *Inspector) ListRulesPackagesRequest(input *ListRulesPackagesInput) (req *request.Request, output *ListRulesPackagesOutput) { 2365 op := &request.Operation{ 2366 Name: opListRulesPackages, 2367 HTTPMethod: "POST", 2368 HTTPPath: "/", 2369 Paginator: &request.Paginator{ 2370 InputTokens: []string{"nextToken"}, 2371 OutputTokens: []string{"nextToken"}, 2372 LimitToken: "maxResults", 2373 TruncationToken: "", 2374 }, 2375 } 2376 2377 if input == nil { 2378 input = &ListRulesPackagesInput{} 2379 } 2380 2381 output = &ListRulesPackagesOutput{} 2382 req = c.newRequest(op, input, output) 2383 return 2384} 2385 2386// ListRulesPackages API operation for Amazon Inspector. 2387// 2388// Lists all available Amazon Inspector rules packages. 2389// 2390// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2391// with awserr.Error's Code and Message methods to get detailed information about 2392// the error. 2393// 2394// See the AWS API reference guide for Amazon Inspector's 2395// API operation ListRulesPackages for usage and error information. 2396// 2397// Returned Error Codes: 2398// * ErrCodeInternalException "InternalException" 2399// Internal server error. 2400// 2401// * ErrCodeInvalidInputException "InvalidInputException" 2402// The request was rejected because an invalid or out-of-range value was supplied 2403// for an input parameter. 2404// 2405// * ErrCodeAccessDeniedException "AccessDeniedException" 2406// You do not have required permissions to access the requested resource. 2407// 2408// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListRulesPackages 2409func (c *Inspector) ListRulesPackages(input *ListRulesPackagesInput) (*ListRulesPackagesOutput, error) { 2410 req, out := c.ListRulesPackagesRequest(input) 2411 return out, req.Send() 2412} 2413 2414// ListRulesPackagesWithContext is the same as ListRulesPackages with the addition of 2415// the ability to pass a context and additional request options. 2416// 2417// See ListRulesPackages for details on how to use this API operation. 2418// 2419// The context must be non-nil and will be used for request cancellation. If 2420// the context is nil a panic will occur. In the future the SDK may create 2421// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2422// for more information on using Contexts. 2423func (c *Inspector) ListRulesPackagesWithContext(ctx aws.Context, input *ListRulesPackagesInput, opts ...request.Option) (*ListRulesPackagesOutput, error) { 2424 req, out := c.ListRulesPackagesRequest(input) 2425 req.SetContext(ctx) 2426 req.ApplyOptions(opts...) 2427 return out, req.Send() 2428} 2429 2430// ListRulesPackagesPages iterates over the pages of a ListRulesPackages operation, 2431// calling the "fn" function with the response data for each page. To stop 2432// iterating, return false from the fn function. 2433// 2434// See ListRulesPackages method for more information on how to use this operation. 2435// 2436// Note: This operation can generate multiple requests to a service. 2437// 2438// // Example iterating over at most 3 pages of a ListRulesPackages operation. 2439// pageNum := 0 2440// err := client.ListRulesPackagesPages(params, 2441// func(page *ListRulesPackagesOutput, lastPage bool) bool { 2442// pageNum++ 2443// fmt.Println(page) 2444// return pageNum <= 3 2445// }) 2446// 2447func (c *Inspector) ListRulesPackagesPages(input *ListRulesPackagesInput, fn func(*ListRulesPackagesOutput, bool) bool) error { 2448 return c.ListRulesPackagesPagesWithContext(aws.BackgroundContext(), input, fn) 2449} 2450 2451// ListRulesPackagesPagesWithContext same as ListRulesPackagesPages except 2452// it takes a Context and allows setting request options on the pages. 2453// 2454// The context must be non-nil and will be used for request cancellation. If 2455// the context is nil a panic will occur. In the future the SDK may create 2456// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2457// for more information on using Contexts. 2458func (c *Inspector) ListRulesPackagesPagesWithContext(ctx aws.Context, input *ListRulesPackagesInput, fn func(*ListRulesPackagesOutput, bool) bool, opts ...request.Option) error { 2459 p := request.Pagination{ 2460 NewRequest: func() (*request.Request, error) { 2461 var inCpy *ListRulesPackagesInput 2462 if input != nil { 2463 tmp := *input 2464 inCpy = &tmp 2465 } 2466 req, _ := c.ListRulesPackagesRequest(inCpy) 2467 req.SetContext(ctx) 2468 req.ApplyOptions(opts...) 2469 return req, nil 2470 }, 2471 } 2472 2473 cont := true 2474 for p.Next() && cont { 2475 cont = fn(p.Page().(*ListRulesPackagesOutput), !p.HasNextPage()) 2476 } 2477 return p.Err() 2478} 2479 2480const opListTagsForResource = "ListTagsForResource" 2481 2482// ListTagsForResourceRequest generates a "aws/request.Request" representing the 2483// client's request for the ListTagsForResource operation. The "output" return 2484// value will be populated with the request's response once the request complets 2485// successfuly. 2486// 2487// Use "Send" method on the returned Request to send the API call to the service. 2488// the "output" return value is not valid until after Send returns without error. 2489// 2490// See ListTagsForResource for more information on using the ListTagsForResource 2491// API call, and error handling. 2492// 2493// This method is useful when you want to inject custom logic or configuration 2494// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2495// 2496// 2497// // Example sending a request using the ListTagsForResourceRequest method. 2498// req, resp := client.ListTagsForResourceRequest(params) 2499// 2500// err := req.Send() 2501// if err == nil { // resp is now filled 2502// fmt.Println(resp) 2503// } 2504// 2505// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListTagsForResource 2506func (c *Inspector) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 2507 op := &request.Operation{ 2508 Name: opListTagsForResource, 2509 HTTPMethod: "POST", 2510 HTTPPath: "/", 2511 } 2512 2513 if input == nil { 2514 input = &ListTagsForResourceInput{} 2515 } 2516 2517 output = &ListTagsForResourceOutput{} 2518 req = c.newRequest(op, input, output) 2519 return 2520} 2521 2522// ListTagsForResource API operation for Amazon Inspector. 2523// 2524// Lists all tags associated with an assessment template. 2525// 2526// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2527// with awserr.Error's Code and Message methods to get detailed information about 2528// the error. 2529// 2530// See the AWS API reference guide for Amazon Inspector's 2531// API operation ListTagsForResource for usage and error information. 2532// 2533// Returned Error Codes: 2534// * ErrCodeInternalException "InternalException" 2535// Internal server error. 2536// 2537// * ErrCodeInvalidInputException "InvalidInputException" 2538// The request was rejected because an invalid or out-of-range value was supplied 2539// for an input parameter. 2540// 2541// * ErrCodeAccessDeniedException "AccessDeniedException" 2542// You do not have required permissions to access the requested resource. 2543// 2544// * ErrCodeNoSuchEntityException "NoSuchEntityException" 2545// The request was rejected because it referenced an entity that does not exist. 2546// The error code describes the entity. 2547// 2548// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListTagsForResource 2549func (c *Inspector) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 2550 req, out := c.ListTagsForResourceRequest(input) 2551 return out, req.Send() 2552} 2553 2554// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 2555// the ability to pass a context and additional request options. 2556// 2557// See ListTagsForResource for details on how to use this API operation. 2558// 2559// The context must be non-nil and will be used for request cancellation. If 2560// the context is nil a panic will occur. In the future the SDK may create 2561// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2562// for more information on using Contexts. 2563func (c *Inspector) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 2564 req, out := c.ListTagsForResourceRequest(input) 2565 req.SetContext(ctx) 2566 req.ApplyOptions(opts...) 2567 return out, req.Send() 2568} 2569 2570const opPreviewAgents = "PreviewAgents" 2571 2572// PreviewAgentsRequest generates a "aws/request.Request" representing the 2573// client's request for the PreviewAgents operation. The "output" return 2574// value will be populated with the request's response once the request complets 2575// successfuly. 2576// 2577// Use "Send" method on the returned Request to send the API call to the service. 2578// the "output" return value is not valid until after Send returns without error. 2579// 2580// See PreviewAgents for more information on using the PreviewAgents 2581// API call, and error handling. 2582// 2583// This method is useful when you want to inject custom logic or configuration 2584// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2585// 2586// 2587// // Example sending a request using the PreviewAgentsRequest method. 2588// req, resp := client.PreviewAgentsRequest(params) 2589// 2590// err := req.Send() 2591// if err == nil { // resp is now filled 2592// fmt.Println(resp) 2593// } 2594// 2595// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/PreviewAgents 2596func (c *Inspector) PreviewAgentsRequest(input *PreviewAgentsInput) (req *request.Request, output *PreviewAgentsOutput) { 2597 op := &request.Operation{ 2598 Name: opPreviewAgents, 2599 HTTPMethod: "POST", 2600 HTTPPath: "/", 2601 Paginator: &request.Paginator{ 2602 InputTokens: []string{"nextToken"}, 2603 OutputTokens: []string{"nextToken"}, 2604 LimitToken: "maxResults", 2605 TruncationToken: "", 2606 }, 2607 } 2608 2609 if input == nil { 2610 input = &PreviewAgentsInput{} 2611 } 2612 2613 output = &PreviewAgentsOutput{} 2614 req = c.newRequest(op, input, output) 2615 return 2616} 2617 2618// PreviewAgents API operation for Amazon Inspector. 2619// 2620// Previews the agents installed on the EC2 instances that are part of the specified 2621// assessment target. 2622// 2623// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2624// with awserr.Error's Code and Message methods to get detailed information about 2625// the error. 2626// 2627// See the AWS API reference guide for Amazon Inspector's 2628// API operation PreviewAgents for usage and error information. 2629// 2630// Returned Error Codes: 2631// * ErrCodeInternalException "InternalException" 2632// Internal server error. 2633// 2634// * ErrCodeInvalidInputException "InvalidInputException" 2635// The request was rejected because an invalid or out-of-range value was supplied 2636// for an input parameter. 2637// 2638// * ErrCodeAccessDeniedException "AccessDeniedException" 2639// You do not have required permissions to access the requested resource. 2640// 2641// * ErrCodeNoSuchEntityException "NoSuchEntityException" 2642// The request was rejected because it referenced an entity that does not exist. 2643// The error code describes the entity. 2644// 2645// * ErrCodeInvalidCrossAccountRoleException "InvalidCrossAccountRoleException" 2646// Amazon Inspector cannot assume the cross-account role that it needs to list 2647// your EC2 instances during the assessment run. 2648// 2649// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/PreviewAgents 2650func (c *Inspector) PreviewAgents(input *PreviewAgentsInput) (*PreviewAgentsOutput, error) { 2651 req, out := c.PreviewAgentsRequest(input) 2652 return out, req.Send() 2653} 2654 2655// PreviewAgentsWithContext is the same as PreviewAgents with the addition of 2656// the ability to pass a context and additional request options. 2657// 2658// See PreviewAgents for details on how to use this API operation. 2659// 2660// The context must be non-nil and will be used for request cancellation. If 2661// the context is nil a panic will occur. In the future the SDK may create 2662// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2663// for more information on using Contexts. 2664func (c *Inspector) PreviewAgentsWithContext(ctx aws.Context, input *PreviewAgentsInput, opts ...request.Option) (*PreviewAgentsOutput, error) { 2665 req, out := c.PreviewAgentsRequest(input) 2666 req.SetContext(ctx) 2667 req.ApplyOptions(opts...) 2668 return out, req.Send() 2669} 2670 2671// PreviewAgentsPages iterates over the pages of a PreviewAgents operation, 2672// calling the "fn" function with the response data for each page. To stop 2673// iterating, return false from the fn function. 2674// 2675// See PreviewAgents method for more information on how to use this operation. 2676// 2677// Note: This operation can generate multiple requests to a service. 2678// 2679// // Example iterating over at most 3 pages of a PreviewAgents operation. 2680// pageNum := 0 2681// err := client.PreviewAgentsPages(params, 2682// func(page *PreviewAgentsOutput, lastPage bool) bool { 2683// pageNum++ 2684// fmt.Println(page) 2685// return pageNum <= 3 2686// }) 2687// 2688func (c *Inspector) PreviewAgentsPages(input *PreviewAgentsInput, fn func(*PreviewAgentsOutput, bool) bool) error { 2689 return c.PreviewAgentsPagesWithContext(aws.BackgroundContext(), input, fn) 2690} 2691 2692// PreviewAgentsPagesWithContext same as PreviewAgentsPages except 2693// it takes a Context and allows setting request options on the pages. 2694// 2695// The context must be non-nil and will be used for request cancellation. If 2696// the context is nil a panic will occur. In the future the SDK may create 2697// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2698// for more information on using Contexts. 2699func (c *Inspector) PreviewAgentsPagesWithContext(ctx aws.Context, input *PreviewAgentsInput, fn func(*PreviewAgentsOutput, bool) bool, opts ...request.Option) error { 2700 p := request.Pagination{ 2701 NewRequest: func() (*request.Request, error) { 2702 var inCpy *PreviewAgentsInput 2703 if input != nil { 2704 tmp := *input 2705 inCpy = &tmp 2706 } 2707 req, _ := c.PreviewAgentsRequest(inCpy) 2708 req.SetContext(ctx) 2709 req.ApplyOptions(opts...) 2710 return req, nil 2711 }, 2712 } 2713 2714 cont := true 2715 for p.Next() && cont { 2716 cont = fn(p.Page().(*PreviewAgentsOutput), !p.HasNextPage()) 2717 } 2718 return p.Err() 2719} 2720 2721const opRegisterCrossAccountAccessRole = "RegisterCrossAccountAccessRole" 2722 2723// RegisterCrossAccountAccessRoleRequest generates a "aws/request.Request" representing the 2724// client's request for the RegisterCrossAccountAccessRole operation. The "output" return 2725// value will be populated with the request's response once the request complets 2726// successfuly. 2727// 2728// Use "Send" method on the returned Request to send the API call to the service. 2729// the "output" return value is not valid until after Send returns without error. 2730// 2731// See RegisterCrossAccountAccessRole for more information on using the RegisterCrossAccountAccessRole 2732// API call, and error handling. 2733// 2734// This method is useful when you want to inject custom logic or configuration 2735// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2736// 2737// 2738// // Example sending a request using the RegisterCrossAccountAccessRoleRequest method. 2739// req, resp := client.RegisterCrossAccountAccessRoleRequest(params) 2740// 2741// err := req.Send() 2742// if err == nil { // resp is now filled 2743// fmt.Println(resp) 2744// } 2745// 2746// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RegisterCrossAccountAccessRole 2747func (c *Inspector) RegisterCrossAccountAccessRoleRequest(input *RegisterCrossAccountAccessRoleInput) (req *request.Request, output *RegisterCrossAccountAccessRoleOutput) { 2748 op := &request.Operation{ 2749 Name: opRegisterCrossAccountAccessRole, 2750 HTTPMethod: "POST", 2751 HTTPPath: "/", 2752 } 2753 2754 if input == nil { 2755 input = &RegisterCrossAccountAccessRoleInput{} 2756 } 2757 2758 output = &RegisterCrossAccountAccessRoleOutput{} 2759 req = c.newRequest(op, input, output) 2760 req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) 2761 req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) 2762 return 2763} 2764 2765// RegisterCrossAccountAccessRole API operation for Amazon Inspector. 2766// 2767// Registers the IAM role that Amazon Inspector uses to list your EC2 instances 2768// at the start of the assessment run or when you call the PreviewAgents action. 2769// 2770// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2771// with awserr.Error's Code and Message methods to get detailed information about 2772// the error. 2773// 2774// See the AWS API reference guide for Amazon Inspector's 2775// API operation RegisterCrossAccountAccessRole for usage and error information. 2776// 2777// Returned Error Codes: 2778// * ErrCodeInternalException "InternalException" 2779// Internal server error. 2780// 2781// * ErrCodeInvalidInputException "InvalidInputException" 2782// The request was rejected because an invalid or out-of-range value was supplied 2783// for an input parameter. 2784// 2785// * ErrCodeAccessDeniedException "AccessDeniedException" 2786// You do not have required permissions to access the requested resource. 2787// 2788// * ErrCodeInvalidCrossAccountRoleException "InvalidCrossAccountRoleException" 2789// Amazon Inspector cannot assume the cross-account role that it needs to list 2790// your EC2 instances during the assessment run. 2791// 2792// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RegisterCrossAccountAccessRole 2793func (c *Inspector) RegisterCrossAccountAccessRole(input *RegisterCrossAccountAccessRoleInput) (*RegisterCrossAccountAccessRoleOutput, error) { 2794 req, out := c.RegisterCrossAccountAccessRoleRequest(input) 2795 return out, req.Send() 2796} 2797 2798// RegisterCrossAccountAccessRoleWithContext is the same as RegisterCrossAccountAccessRole with the addition of 2799// the ability to pass a context and additional request options. 2800// 2801// See RegisterCrossAccountAccessRole for details on how to use this API operation. 2802// 2803// The context must be non-nil and will be used for request cancellation. If 2804// the context is nil a panic will occur. In the future the SDK may create 2805// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2806// for more information on using Contexts. 2807func (c *Inspector) RegisterCrossAccountAccessRoleWithContext(ctx aws.Context, input *RegisterCrossAccountAccessRoleInput, opts ...request.Option) (*RegisterCrossAccountAccessRoleOutput, error) { 2808 req, out := c.RegisterCrossAccountAccessRoleRequest(input) 2809 req.SetContext(ctx) 2810 req.ApplyOptions(opts...) 2811 return out, req.Send() 2812} 2813 2814const opRemoveAttributesFromFindings = "RemoveAttributesFromFindings" 2815 2816// RemoveAttributesFromFindingsRequest generates a "aws/request.Request" representing the 2817// client's request for the RemoveAttributesFromFindings operation. The "output" return 2818// value will be populated with the request's response once the request complets 2819// successfuly. 2820// 2821// Use "Send" method on the returned Request to send the API call to the service. 2822// the "output" return value is not valid until after Send returns without error. 2823// 2824// See RemoveAttributesFromFindings for more information on using the RemoveAttributesFromFindings 2825// API call, and error handling. 2826// 2827// This method is useful when you want to inject custom logic or configuration 2828// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2829// 2830// 2831// // Example sending a request using the RemoveAttributesFromFindingsRequest method. 2832// req, resp := client.RemoveAttributesFromFindingsRequest(params) 2833// 2834// err := req.Send() 2835// if err == nil { // resp is now filled 2836// fmt.Println(resp) 2837// } 2838// 2839// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RemoveAttributesFromFindings 2840func (c *Inspector) RemoveAttributesFromFindingsRequest(input *RemoveAttributesFromFindingsInput) (req *request.Request, output *RemoveAttributesFromFindingsOutput) { 2841 op := &request.Operation{ 2842 Name: opRemoveAttributesFromFindings, 2843 HTTPMethod: "POST", 2844 HTTPPath: "/", 2845 } 2846 2847 if input == nil { 2848 input = &RemoveAttributesFromFindingsInput{} 2849 } 2850 2851 output = &RemoveAttributesFromFindingsOutput{} 2852 req = c.newRequest(op, input, output) 2853 return 2854} 2855 2856// RemoveAttributesFromFindings API operation for Amazon Inspector. 2857// 2858// Removes entire attributes (key and value pairs) from the findings that are 2859// specified by the ARNs of the findings where an attribute with the specified 2860// key exists. 2861// 2862// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2863// with awserr.Error's Code and Message methods to get detailed information about 2864// the error. 2865// 2866// See the AWS API reference guide for Amazon Inspector's 2867// API operation RemoveAttributesFromFindings for usage and error information. 2868// 2869// Returned Error Codes: 2870// * ErrCodeInternalException "InternalException" 2871// Internal server error. 2872// 2873// * ErrCodeInvalidInputException "InvalidInputException" 2874// The request was rejected because an invalid or out-of-range value was supplied 2875// for an input parameter. 2876// 2877// * ErrCodeAccessDeniedException "AccessDeniedException" 2878// You do not have required permissions to access the requested resource. 2879// 2880// * ErrCodeNoSuchEntityException "NoSuchEntityException" 2881// The request was rejected because it referenced an entity that does not exist. 2882// The error code describes the entity. 2883// 2884// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RemoveAttributesFromFindings 2885func (c *Inspector) RemoveAttributesFromFindings(input *RemoveAttributesFromFindingsInput) (*RemoveAttributesFromFindingsOutput, error) { 2886 req, out := c.RemoveAttributesFromFindingsRequest(input) 2887 return out, req.Send() 2888} 2889 2890// RemoveAttributesFromFindingsWithContext is the same as RemoveAttributesFromFindings with the addition of 2891// the ability to pass a context and additional request options. 2892// 2893// See RemoveAttributesFromFindings for details on how to use this API operation. 2894// 2895// The context must be non-nil and will be used for request cancellation. If 2896// the context is nil a panic will occur. In the future the SDK may create 2897// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2898// for more information on using Contexts. 2899func (c *Inspector) RemoveAttributesFromFindingsWithContext(ctx aws.Context, input *RemoveAttributesFromFindingsInput, opts ...request.Option) (*RemoveAttributesFromFindingsOutput, error) { 2900 req, out := c.RemoveAttributesFromFindingsRequest(input) 2901 req.SetContext(ctx) 2902 req.ApplyOptions(opts...) 2903 return out, req.Send() 2904} 2905 2906const opSetTagsForResource = "SetTagsForResource" 2907 2908// SetTagsForResourceRequest generates a "aws/request.Request" representing the 2909// client's request for the SetTagsForResource operation. The "output" return 2910// value will be populated with the request's response once the request complets 2911// successfuly. 2912// 2913// Use "Send" method on the returned Request to send the API call to the service. 2914// the "output" return value is not valid until after Send returns without error. 2915// 2916// See SetTagsForResource for more information on using the SetTagsForResource 2917// API call, and error handling. 2918// 2919// This method is useful when you want to inject custom logic or configuration 2920// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2921// 2922// 2923// // Example sending a request using the SetTagsForResourceRequest method. 2924// req, resp := client.SetTagsForResourceRequest(params) 2925// 2926// err := req.Send() 2927// if err == nil { // resp is now filled 2928// fmt.Println(resp) 2929// } 2930// 2931// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/SetTagsForResource 2932func (c *Inspector) SetTagsForResourceRequest(input *SetTagsForResourceInput) (req *request.Request, output *SetTagsForResourceOutput) { 2933 op := &request.Operation{ 2934 Name: opSetTagsForResource, 2935 HTTPMethod: "POST", 2936 HTTPPath: "/", 2937 } 2938 2939 if input == nil { 2940 input = &SetTagsForResourceInput{} 2941 } 2942 2943 output = &SetTagsForResourceOutput{} 2944 req = c.newRequest(op, input, output) 2945 req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) 2946 req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) 2947 return 2948} 2949 2950// SetTagsForResource API operation for Amazon Inspector. 2951// 2952// Sets tags (key and value pairs) to the assessment template that is specified 2953// by the ARN of the assessment template. 2954// 2955// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2956// with awserr.Error's Code and Message methods to get detailed information about 2957// the error. 2958// 2959// See the AWS API reference guide for Amazon Inspector's 2960// API operation SetTagsForResource for usage and error information. 2961// 2962// Returned Error Codes: 2963// * ErrCodeInternalException "InternalException" 2964// Internal server error. 2965// 2966// * ErrCodeInvalidInputException "InvalidInputException" 2967// The request was rejected because an invalid or out-of-range value was supplied 2968// for an input parameter. 2969// 2970// * ErrCodeAccessDeniedException "AccessDeniedException" 2971// You do not have required permissions to access the requested resource. 2972// 2973// * ErrCodeNoSuchEntityException "NoSuchEntityException" 2974// The request was rejected because it referenced an entity that does not exist. 2975// The error code describes the entity. 2976// 2977// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/SetTagsForResource 2978func (c *Inspector) SetTagsForResource(input *SetTagsForResourceInput) (*SetTagsForResourceOutput, error) { 2979 req, out := c.SetTagsForResourceRequest(input) 2980 return out, req.Send() 2981} 2982 2983// SetTagsForResourceWithContext is the same as SetTagsForResource with the addition of 2984// the ability to pass a context and additional request options. 2985// 2986// See SetTagsForResource for details on how to use this API operation. 2987// 2988// The context must be non-nil and will be used for request cancellation. If 2989// the context is nil a panic will occur. In the future the SDK may create 2990// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2991// for more information on using Contexts. 2992func (c *Inspector) SetTagsForResourceWithContext(ctx aws.Context, input *SetTagsForResourceInput, opts ...request.Option) (*SetTagsForResourceOutput, error) { 2993 req, out := c.SetTagsForResourceRequest(input) 2994 req.SetContext(ctx) 2995 req.ApplyOptions(opts...) 2996 return out, req.Send() 2997} 2998 2999const opStartAssessmentRun = "StartAssessmentRun" 3000 3001// StartAssessmentRunRequest generates a "aws/request.Request" representing the 3002// client's request for the StartAssessmentRun operation. The "output" return 3003// value will be populated with the request's response once the request complets 3004// successfuly. 3005// 3006// Use "Send" method on the returned Request to send the API call to the service. 3007// the "output" return value is not valid until after Send returns without error. 3008// 3009// See StartAssessmentRun for more information on using the StartAssessmentRun 3010// API call, and error handling. 3011// 3012// This method is useful when you want to inject custom logic or configuration 3013// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3014// 3015// 3016// // Example sending a request using the StartAssessmentRunRequest method. 3017// req, resp := client.StartAssessmentRunRequest(params) 3018// 3019// err := req.Send() 3020// if err == nil { // resp is now filled 3021// fmt.Println(resp) 3022// } 3023// 3024// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/StartAssessmentRun 3025func (c *Inspector) StartAssessmentRunRequest(input *StartAssessmentRunInput) (req *request.Request, output *StartAssessmentRunOutput) { 3026 op := &request.Operation{ 3027 Name: opStartAssessmentRun, 3028 HTTPMethod: "POST", 3029 HTTPPath: "/", 3030 } 3031 3032 if input == nil { 3033 input = &StartAssessmentRunInput{} 3034 } 3035 3036 output = &StartAssessmentRunOutput{} 3037 req = c.newRequest(op, input, output) 3038 return 3039} 3040 3041// StartAssessmentRun API operation for Amazon Inspector. 3042// 3043// Starts the assessment run specified by the ARN of the assessment template. 3044// For this API to function properly, you must not exceed the limit of running 3045// up to 500 concurrent agents per AWS account. 3046// 3047// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3048// with awserr.Error's Code and Message methods to get detailed information about 3049// the error. 3050// 3051// See the AWS API reference guide for Amazon Inspector's 3052// API operation StartAssessmentRun for usage and error information. 3053// 3054// Returned Error Codes: 3055// * ErrCodeInternalException "InternalException" 3056// Internal server error. 3057// 3058// * ErrCodeInvalidInputException "InvalidInputException" 3059// The request was rejected because an invalid or out-of-range value was supplied 3060// for an input parameter. 3061// 3062// * ErrCodeLimitExceededException "LimitExceededException" 3063// The request was rejected because it attempted to create resources beyond 3064// the current AWS account limits. The error code describes the limit exceeded. 3065// 3066// * ErrCodeAccessDeniedException "AccessDeniedException" 3067// You do not have required permissions to access the requested resource. 3068// 3069// * ErrCodeNoSuchEntityException "NoSuchEntityException" 3070// The request was rejected because it referenced an entity that does not exist. 3071// The error code describes the entity. 3072// 3073// * ErrCodeInvalidCrossAccountRoleException "InvalidCrossAccountRoleException" 3074// Amazon Inspector cannot assume the cross-account role that it needs to list 3075// your EC2 instances during the assessment run. 3076// 3077// * ErrCodeAgentsAlreadyRunningAssessmentException "AgentsAlreadyRunningAssessmentException" 3078// You started an assessment run, but one of the instances is already participating 3079// in another assessment run. 3080// 3081// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/StartAssessmentRun 3082func (c *Inspector) StartAssessmentRun(input *StartAssessmentRunInput) (*StartAssessmentRunOutput, error) { 3083 req, out := c.StartAssessmentRunRequest(input) 3084 return out, req.Send() 3085} 3086 3087// StartAssessmentRunWithContext is the same as StartAssessmentRun with the addition of 3088// the ability to pass a context and additional request options. 3089// 3090// See StartAssessmentRun for details on how to use this API operation. 3091// 3092// The context must be non-nil and will be used for request cancellation. If 3093// the context is nil a panic will occur. In the future the SDK may create 3094// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3095// for more information on using Contexts. 3096func (c *Inspector) StartAssessmentRunWithContext(ctx aws.Context, input *StartAssessmentRunInput, opts ...request.Option) (*StartAssessmentRunOutput, error) { 3097 req, out := c.StartAssessmentRunRequest(input) 3098 req.SetContext(ctx) 3099 req.ApplyOptions(opts...) 3100 return out, req.Send() 3101} 3102 3103const opStopAssessmentRun = "StopAssessmentRun" 3104 3105// StopAssessmentRunRequest generates a "aws/request.Request" representing the 3106// client's request for the StopAssessmentRun operation. The "output" return 3107// value will be populated with the request's response once the request complets 3108// successfuly. 3109// 3110// Use "Send" method on the returned Request to send the API call to the service. 3111// the "output" return value is not valid until after Send returns without error. 3112// 3113// See StopAssessmentRun for more information on using the StopAssessmentRun 3114// API call, and error handling. 3115// 3116// This method is useful when you want to inject custom logic or configuration 3117// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3118// 3119// 3120// // Example sending a request using the StopAssessmentRunRequest method. 3121// req, resp := client.StopAssessmentRunRequest(params) 3122// 3123// err := req.Send() 3124// if err == nil { // resp is now filled 3125// fmt.Println(resp) 3126// } 3127// 3128// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/StopAssessmentRun 3129func (c *Inspector) StopAssessmentRunRequest(input *StopAssessmentRunInput) (req *request.Request, output *StopAssessmentRunOutput) { 3130 op := &request.Operation{ 3131 Name: opStopAssessmentRun, 3132 HTTPMethod: "POST", 3133 HTTPPath: "/", 3134 } 3135 3136 if input == nil { 3137 input = &StopAssessmentRunInput{} 3138 } 3139 3140 output = &StopAssessmentRunOutput{} 3141 req = c.newRequest(op, input, output) 3142 req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) 3143 req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) 3144 return 3145} 3146 3147// StopAssessmentRun API operation for Amazon Inspector. 3148// 3149// Stops the assessment run that is specified by the ARN of the assessment run. 3150// 3151// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3152// with awserr.Error's Code and Message methods to get detailed information about 3153// the error. 3154// 3155// See the AWS API reference guide for Amazon Inspector's 3156// API operation StopAssessmentRun for usage and error information. 3157// 3158// Returned Error Codes: 3159// * ErrCodeInternalException "InternalException" 3160// Internal server error. 3161// 3162// * ErrCodeInvalidInputException "InvalidInputException" 3163// The request was rejected because an invalid or out-of-range value was supplied 3164// for an input parameter. 3165// 3166// * ErrCodeAccessDeniedException "AccessDeniedException" 3167// You do not have required permissions to access the requested resource. 3168// 3169// * ErrCodeNoSuchEntityException "NoSuchEntityException" 3170// The request was rejected because it referenced an entity that does not exist. 3171// The error code describes the entity. 3172// 3173// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/StopAssessmentRun 3174func (c *Inspector) StopAssessmentRun(input *StopAssessmentRunInput) (*StopAssessmentRunOutput, error) { 3175 req, out := c.StopAssessmentRunRequest(input) 3176 return out, req.Send() 3177} 3178 3179// StopAssessmentRunWithContext is the same as StopAssessmentRun with the addition of 3180// the ability to pass a context and additional request options. 3181// 3182// See StopAssessmentRun for details on how to use this API operation. 3183// 3184// The context must be non-nil and will be used for request cancellation. If 3185// the context is nil a panic will occur. In the future the SDK may create 3186// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3187// for more information on using Contexts. 3188func (c *Inspector) StopAssessmentRunWithContext(ctx aws.Context, input *StopAssessmentRunInput, opts ...request.Option) (*StopAssessmentRunOutput, error) { 3189 req, out := c.StopAssessmentRunRequest(input) 3190 req.SetContext(ctx) 3191 req.ApplyOptions(opts...) 3192 return out, req.Send() 3193} 3194 3195const opSubscribeToEvent = "SubscribeToEvent" 3196 3197// SubscribeToEventRequest generates a "aws/request.Request" representing the 3198// client's request for the SubscribeToEvent operation. The "output" return 3199// value will be populated with the request's response once the request complets 3200// successfuly. 3201// 3202// Use "Send" method on the returned Request to send the API call to the service. 3203// the "output" return value is not valid until after Send returns without error. 3204// 3205// See SubscribeToEvent for more information on using the SubscribeToEvent 3206// API call, and error handling. 3207// 3208// This method is useful when you want to inject custom logic or configuration 3209// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3210// 3211// 3212// // Example sending a request using the SubscribeToEventRequest method. 3213// req, resp := client.SubscribeToEventRequest(params) 3214// 3215// err := req.Send() 3216// if err == nil { // resp is now filled 3217// fmt.Println(resp) 3218// } 3219// 3220// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/SubscribeToEvent 3221func (c *Inspector) SubscribeToEventRequest(input *SubscribeToEventInput) (req *request.Request, output *SubscribeToEventOutput) { 3222 op := &request.Operation{ 3223 Name: opSubscribeToEvent, 3224 HTTPMethod: "POST", 3225 HTTPPath: "/", 3226 } 3227 3228 if input == nil { 3229 input = &SubscribeToEventInput{} 3230 } 3231 3232 output = &SubscribeToEventOutput{} 3233 req = c.newRequest(op, input, output) 3234 req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) 3235 req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) 3236 return 3237} 3238 3239// SubscribeToEvent API operation for Amazon Inspector. 3240// 3241// Enables the process of sending Amazon Simple Notification Service (SNS) notifications 3242// about a specified event to a specified SNS topic. 3243// 3244// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3245// with awserr.Error's Code and Message methods to get detailed information about 3246// the error. 3247// 3248// See the AWS API reference guide for Amazon Inspector's 3249// API operation SubscribeToEvent for usage and error information. 3250// 3251// Returned Error Codes: 3252// * ErrCodeInternalException "InternalException" 3253// Internal server error. 3254// 3255// * ErrCodeInvalidInputException "InvalidInputException" 3256// The request was rejected because an invalid or out-of-range value was supplied 3257// for an input parameter. 3258// 3259// * ErrCodeLimitExceededException "LimitExceededException" 3260// The request was rejected because it attempted to create resources beyond 3261// the current AWS account limits. The error code describes the limit exceeded. 3262// 3263// * ErrCodeAccessDeniedException "AccessDeniedException" 3264// You do not have required permissions to access the requested resource. 3265// 3266// * ErrCodeNoSuchEntityException "NoSuchEntityException" 3267// The request was rejected because it referenced an entity that does not exist. 3268// The error code describes the entity. 3269// 3270// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/SubscribeToEvent 3271func (c *Inspector) SubscribeToEvent(input *SubscribeToEventInput) (*SubscribeToEventOutput, error) { 3272 req, out := c.SubscribeToEventRequest(input) 3273 return out, req.Send() 3274} 3275 3276// SubscribeToEventWithContext is the same as SubscribeToEvent with the addition of 3277// the ability to pass a context and additional request options. 3278// 3279// See SubscribeToEvent for details on how to use this API operation. 3280// 3281// The context must be non-nil and will be used for request cancellation. If 3282// the context is nil a panic will occur. In the future the SDK may create 3283// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3284// for more information on using Contexts. 3285func (c *Inspector) SubscribeToEventWithContext(ctx aws.Context, input *SubscribeToEventInput, opts ...request.Option) (*SubscribeToEventOutput, error) { 3286 req, out := c.SubscribeToEventRequest(input) 3287 req.SetContext(ctx) 3288 req.ApplyOptions(opts...) 3289 return out, req.Send() 3290} 3291 3292const opUnsubscribeFromEvent = "UnsubscribeFromEvent" 3293 3294// UnsubscribeFromEventRequest generates a "aws/request.Request" representing the 3295// client's request for the UnsubscribeFromEvent operation. The "output" return 3296// value will be populated with the request's response once the request complets 3297// successfuly. 3298// 3299// Use "Send" method on the returned Request to send the API call to the service. 3300// the "output" return value is not valid until after Send returns without error. 3301// 3302// See UnsubscribeFromEvent for more information on using the UnsubscribeFromEvent 3303// API call, and error handling. 3304// 3305// This method is useful when you want to inject custom logic or configuration 3306// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3307// 3308// 3309// // Example sending a request using the UnsubscribeFromEventRequest method. 3310// req, resp := client.UnsubscribeFromEventRequest(params) 3311// 3312// err := req.Send() 3313// if err == nil { // resp is now filled 3314// fmt.Println(resp) 3315// } 3316// 3317// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/UnsubscribeFromEvent 3318func (c *Inspector) UnsubscribeFromEventRequest(input *UnsubscribeFromEventInput) (req *request.Request, output *UnsubscribeFromEventOutput) { 3319 op := &request.Operation{ 3320 Name: opUnsubscribeFromEvent, 3321 HTTPMethod: "POST", 3322 HTTPPath: "/", 3323 } 3324 3325 if input == nil { 3326 input = &UnsubscribeFromEventInput{} 3327 } 3328 3329 output = &UnsubscribeFromEventOutput{} 3330 req = c.newRequest(op, input, output) 3331 req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) 3332 req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) 3333 return 3334} 3335 3336// UnsubscribeFromEvent API operation for Amazon Inspector. 3337// 3338// Disables the process of sending Amazon Simple Notification Service (SNS) 3339// notifications about a specified event to a specified SNS topic. 3340// 3341// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3342// with awserr.Error's Code and Message methods to get detailed information about 3343// the error. 3344// 3345// See the AWS API reference guide for Amazon Inspector's 3346// API operation UnsubscribeFromEvent for usage and error information. 3347// 3348// Returned Error Codes: 3349// * ErrCodeInternalException "InternalException" 3350// Internal server error. 3351// 3352// * ErrCodeInvalidInputException "InvalidInputException" 3353// The request was rejected because an invalid or out-of-range value was supplied 3354// for an input parameter. 3355// 3356// * ErrCodeAccessDeniedException "AccessDeniedException" 3357// You do not have required permissions to access the requested resource. 3358// 3359// * ErrCodeNoSuchEntityException "NoSuchEntityException" 3360// The request was rejected because it referenced an entity that does not exist. 3361// The error code describes the entity. 3362// 3363// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/UnsubscribeFromEvent 3364func (c *Inspector) UnsubscribeFromEvent(input *UnsubscribeFromEventInput) (*UnsubscribeFromEventOutput, error) { 3365 req, out := c.UnsubscribeFromEventRequest(input) 3366 return out, req.Send() 3367} 3368 3369// UnsubscribeFromEventWithContext is the same as UnsubscribeFromEvent with the addition of 3370// the ability to pass a context and additional request options. 3371// 3372// See UnsubscribeFromEvent for details on how to use this API operation. 3373// 3374// The context must be non-nil and will be used for request cancellation. If 3375// the context is nil a panic will occur. In the future the SDK may create 3376// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3377// for more information on using Contexts. 3378func (c *Inspector) UnsubscribeFromEventWithContext(ctx aws.Context, input *UnsubscribeFromEventInput, opts ...request.Option) (*UnsubscribeFromEventOutput, error) { 3379 req, out := c.UnsubscribeFromEventRequest(input) 3380 req.SetContext(ctx) 3381 req.ApplyOptions(opts...) 3382 return out, req.Send() 3383} 3384 3385const opUpdateAssessmentTarget = "UpdateAssessmentTarget" 3386 3387// UpdateAssessmentTargetRequest generates a "aws/request.Request" representing the 3388// client's request for the UpdateAssessmentTarget operation. The "output" return 3389// value will be populated with the request's response once the request complets 3390// successfuly. 3391// 3392// Use "Send" method on the returned Request to send the API call to the service. 3393// the "output" return value is not valid until after Send returns without error. 3394// 3395// See UpdateAssessmentTarget for more information on using the UpdateAssessmentTarget 3396// API call, and error handling. 3397// 3398// This method is useful when you want to inject custom logic or configuration 3399// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3400// 3401// 3402// // Example sending a request using the UpdateAssessmentTargetRequest method. 3403// req, resp := client.UpdateAssessmentTargetRequest(params) 3404// 3405// err := req.Send() 3406// if err == nil { // resp is now filled 3407// fmt.Println(resp) 3408// } 3409// 3410// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/UpdateAssessmentTarget 3411func (c *Inspector) UpdateAssessmentTargetRequest(input *UpdateAssessmentTargetInput) (req *request.Request, output *UpdateAssessmentTargetOutput) { 3412 op := &request.Operation{ 3413 Name: opUpdateAssessmentTarget, 3414 HTTPMethod: "POST", 3415 HTTPPath: "/", 3416 } 3417 3418 if input == nil { 3419 input = &UpdateAssessmentTargetInput{} 3420 } 3421 3422 output = &UpdateAssessmentTargetOutput{} 3423 req = c.newRequest(op, input, output) 3424 req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) 3425 req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) 3426 return 3427} 3428 3429// UpdateAssessmentTarget API operation for Amazon Inspector. 3430// 3431// Updates the assessment target that is specified by the ARN of the assessment 3432// target. 3433// 3434// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3435// with awserr.Error's Code and Message methods to get detailed information about 3436// the error. 3437// 3438// See the AWS API reference guide for Amazon Inspector's 3439// API operation UpdateAssessmentTarget for usage and error information. 3440// 3441// Returned Error Codes: 3442// * ErrCodeInternalException "InternalException" 3443// Internal server error. 3444// 3445// * ErrCodeInvalidInputException "InvalidInputException" 3446// The request was rejected because an invalid or out-of-range value was supplied 3447// for an input parameter. 3448// 3449// * ErrCodeAccessDeniedException "AccessDeniedException" 3450// You do not have required permissions to access the requested resource. 3451// 3452// * ErrCodeNoSuchEntityException "NoSuchEntityException" 3453// The request was rejected because it referenced an entity that does not exist. 3454// The error code describes the entity. 3455// 3456// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/UpdateAssessmentTarget 3457func (c *Inspector) UpdateAssessmentTarget(input *UpdateAssessmentTargetInput) (*UpdateAssessmentTargetOutput, error) { 3458 req, out := c.UpdateAssessmentTargetRequest(input) 3459 return out, req.Send() 3460} 3461 3462// UpdateAssessmentTargetWithContext is the same as UpdateAssessmentTarget with the addition of 3463// the ability to pass a context and additional request options. 3464// 3465// See UpdateAssessmentTarget for details on how to use this API operation. 3466// 3467// The context must be non-nil and will be used for request cancellation. If 3468// the context is nil a panic will occur. In the future the SDK may create 3469// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3470// for more information on using Contexts. 3471func (c *Inspector) UpdateAssessmentTargetWithContext(ctx aws.Context, input *UpdateAssessmentTargetInput, opts ...request.Option) (*UpdateAssessmentTargetOutput, error) { 3472 req, out := c.UpdateAssessmentTargetRequest(input) 3473 req.SetContext(ctx) 3474 req.ApplyOptions(opts...) 3475 return out, req.Send() 3476} 3477 3478// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AddAttributesToFindingsRequest 3479type AddAttributesToFindingsInput struct { 3480 _ struct{} `type:"structure"` 3481 3482 // The array of attributes that you want to assign to specified findings. 3483 // 3484 // Attributes is a required field 3485 Attributes []*Attribute `locationName:"attributes" type:"list" required:"true"` 3486 3487 // The ARNs that specify the findings that you want to assign attributes to. 3488 // 3489 // FindingArns is a required field 3490 FindingArns []*string `locationName:"findingArns" min:"1" type:"list" required:"true"` 3491} 3492 3493// String returns the string representation 3494func (s AddAttributesToFindingsInput) String() string { 3495 return awsutil.Prettify(s) 3496} 3497 3498// GoString returns the string representation 3499func (s AddAttributesToFindingsInput) GoString() string { 3500 return s.String() 3501} 3502 3503// Validate inspects the fields of the type to determine if they are valid. 3504func (s *AddAttributesToFindingsInput) Validate() error { 3505 invalidParams := request.ErrInvalidParams{Context: "AddAttributesToFindingsInput"} 3506 if s.Attributes == nil { 3507 invalidParams.Add(request.NewErrParamRequired("Attributes")) 3508 } 3509 if s.FindingArns == nil { 3510 invalidParams.Add(request.NewErrParamRequired("FindingArns")) 3511 } 3512 if s.FindingArns != nil && len(s.FindingArns) < 1 { 3513 invalidParams.Add(request.NewErrParamMinLen("FindingArns", 1)) 3514 } 3515 if s.Attributes != nil { 3516 for i, v := range s.Attributes { 3517 if v == nil { 3518 continue 3519 } 3520 if err := v.Validate(); err != nil { 3521 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams)) 3522 } 3523 } 3524 } 3525 3526 if invalidParams.Len() > 0 { 3527 return invalidParams 3528 } 3529 return nil 3530} 3531 3532// SetAttributes sets the Attributes field's value. 3533func (s *AddAttributesToFindingsInput) SetAttributes(v []*Attribute) *AddAttributesToFindingsInput { 3534 s.Attributes = v 3535 return s 3536} 3537 3538// SetFindingArns sets the FindingArns field's value. 3539func (s *AddAttributesToFindingsInput) SetFindingArns(v []*string) *AddAttributesToFindingsInput { 3540 s.FindingArns = v 3541 return s 3542} 3543 3544// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AddAttributesToFindingsResponse 3545type AddAttributesToFindingsOutput struct { 3546 _ struct{} `type:"structure"` 3547 3548 // Attribute details that cannot be described. An error code is provided for 3549 // each failed item. 3550 // 3551 // FailedItems is a required field 3552 FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"` 3553} 3554 3555// String returns the string representation 3556func (s AddAttributesToFindingsOutput) String() string { 3557 return awsutil.Prettify(s) 3558} 3559 3560// GoString returns the string representation 3561func (s AddAttributesToFindingsOutput) GoString() string { 3562 return s.String() 3563} 3564 3565// SetFailedItems sets the FailedItems field's value. 3566func (s *AddAttributesToFindingsOutput) SetFailedItems(v map[string]*FailedItemDetails) *AddAttributesToFindingsOutput { 3567 s.FailedItems = v 3568 return s 3569} 3570 3571// Used in the exception error that is thrown if you start an assessment run 3572// for an assessment target that includes an EC2 instance that is already participating 3573// in another started assessment run. 3574// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AgentAlreadyRunningAssessment 3575type AgentAlreadyRunningAssessment struct { 3576 _ struct{} `type:"structure"` 3577 3578 // ID of the agent that is running on an EC2 instance that is already participating 3579 // in another started assessment run. 3580 // 3581 // AgentId is a required field 3582 AgentId *string `locationName:"agentId" min:"1" type:"string" required:"true"` 3583 3584 // The ARN of the assessment run that has already been started. 3585 // 3586 // AssessmentRunArn is a required field 3587 AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"` 3588} 3589 3590// String returns the string representation 3591func (s AgentAlreadyRunningAssessment) String() string { 3592 return awsutil.Prettify(s) 3593} 3594 3595// GoString returns the string representation 3596func (s AgentAlreadyRunningAssessment) GoString() string { 3597 return s.String() 3598} 3599 3600// SetAgentId sets the AgentId field's value. 3601func (s *AgentAlreadyRunningAssessment) SetAgentId(v string) *AgentAlreadyRunningAssessment { 3602 s.AgentId = &v 3603 return s 3604} 3605 3606// SetAssessmentRunArn sets the AssessmentRunArn field's value. 3607func (s *AgentAlreadyRunningAssessment) SetAssessmentRunArn(v string) *AgentAlreadyRunningAssessment { 3608 s.AssessmentRunArn = &v 3609 return s 3610} 3611 3612// Contains information about an Amazon Inspector agent. This data type is used 3613// as a request parameter in the ListAssessmentRunAgents action. 3614// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AgentFilter 3615type AgentFilter struct { 3616 _ struct{} `type:"structure"` 3617 3618 // The detailed health state of the agent. Values can be set to IDLE, RUNNING, 3619 // SHUTDOWN, UNHEALTHY, THROTTLED, and UNKNOWN. 3620 // 3621 // AgentHealthCodes is a required field 3622 AgentHealthCodes []*string `locationName:"agentHealthCodes" type:"list" required:"true"` 3623 3624 // The current health state of the agent. Values can be set to HEALTHY or UNHEALTHY. 3625 // 3626 // AgentHealths is a required field 3627 AgentHealths []*string `locationName:"agentHealths" type:"list" required:"true"` 3628} 3629 3630// String returns the string representation 3631func (s AgentFilter) String() string { 3632 return awsutil.Prettify(s) 3633} 3634 3635// GoString returns the string representation 3636func (s AgentFilter) GoString() string { 3637 return s.String() 3638} 3639 3640// Validate inspects the fields of the type to determine if they are valid. 3641func (s *AgentFilter) Validate() error { 3642 invalidParams := request.ErrInvalidParams{Context: "AgentFilter"} 3643 if s.AgentHealthCodes == nil { 3644 invalidParams.Add(request.NewErrParamRequired("AgentHealthCodes")) 3645 } 3646 if s.AgentHealths == nil { 3647 invalidParams.Add(request.NewErrParamRequired("AgentHealths")) 3648 } 3649 3650 if invalidParams.Len() > 0 { 3651 return invalidParams 3652 } 3653 return nil 3654} 3655 3656// SetAgentHealthCodes sets the AgentHealthCodes field's value. 3657func (s *AgentFilter) SetAgentHealthCodes(v []*string) *AgentFilter { 3658 s.AgentHealthCodes = v 3659 return s 3660} 3661 3662// SetAgentHealths sets the AgentHealths field's value. 3663func (s *AgentFilter) SetAgentHealths(v []*string) *AgentFilter { 3664 s.AgentHealths = v 3665 return s 3666} 3667 3668// Used as a response element in the PreviewAgents action. 3669// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AgentPreview 3670type AgentPreview struct { 3671 _ struct{} `type:"structure"` 3672 3673 // The ID of the EC2 instance where the agent is installed. 3674 // 3675 // AgentId is a required field 3676 AgentId *string `locationName:"agentId" min:"1" type:"string" required:"true"` 3677 3678 // The Auto Scaling group for the EC2 instance where the agent is installed. 3679 AutoScalingGroup *string `locationName:"autoScalingGroup" min:"1" type:"string"` 3680} 3681 3682// String returns the string representation 3683func (s AgentPreview) String() string { 3684 return awsutil.Prettify(s) 3685} 3686 3687// GoString returns the string representation 3688func (s AgentPreview) GoString() string { 3689 return s.String() 3690} 3691 3692// SetAgentId sets the AgentId field's value. 3693func (s *AgentPreview) SetAgentId(v string) *AgentPreview { 3694 s.AgentId = &v 3695 return s 3696} 3697 3698// SetAutoScalingGroup sets the AutoScalingGroup field's value. 3699func (s *AgentPreview) SetAutoScalingGroup(v string) *AgentPreview { 3700 s.AutoScalingGroup = &v 3701 return s 3702} 3703 3704// A snapshot of an Amazon Inspector assessment run that contains the findings 3705// of the assessment run . 3706// 3707// Used as the response element in the DescribeAssessmentRuns action. 3708// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AssessmentRun 3709type AssessmentRun struct { 3710 _ struct{} `type:"structure"` 3711 3712 // The ARN of the assessment run. 3713 // 3714 // Arn is a required field 3715 Arn *string `locationName:"arn" min:"1" type:"string" required:"true"` 3716 3717 // The ARN of the assessment template that is associated with the assessment 3718 // run. 3719 // 3720 // AssessmentTemplateArn is a required field 3721 AssessmentTemplateArn *string `locationName:"assessmentTemplateArn" min:"1" type:"string" required:"true"` 3722 3723 // The assessment run completion time that corresponds to the rules packages 3724 // evaluation completion time or failure. 3725 CompletedAt *time.Time `locationName:"completedAt" type:"timestamp" timestampFormat:"unix"` 3726 3727 // The time when StartAssessmentRun was called. 3728 // 3729 // CreatedAt is a required field 3730 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"` 3731 3732 // A Boolean value (true or false) that specifies whether the process of collecting 3733 // data from the agents is completed. 3734 // 3735 // DataCollected is a required field 3736 DataCollected *bool `locationName:"dataCollected" type:"boolean" required:"true"` 3737 3738 // The duration of the assessment run. 3739 // 3740 // DurationInSeconds is a required field 3741 DurationInSeconds *int64 `locationName:"durationInSeconds" min:"180" type:"integer" required:"true"` 3742 3743 // Provides a total count of generated findings per severity. 3744 // 3745 // FindingCounts is a required field 3746 FindingCounts map[string]*int64 `locationName:"findingCounts" type:"map" required:"true"` 3747 3748 // The auto-generated name for the assessment run. 3749 // 3750 // Name is a required field 3751 Name *string `locationName:"name" min:"1" type:"string" required:"true"` 3752 3753 // A list of notifications for the event subscriptions. A notification about 3754 // a particular generated finding is added to this list only once. 3755 // 3756 // Notifications is a required field 3757 Notifications []*AssessmentRunNotification `locationName:"notifications" type:"list" required:"true"` 3758 3759 // The rules packages selected for the assessment run. 3760 // 3761 // RulesPackageArns is a required field 3762 RulesPackageArns []*string `locationName:"rulesPackageArns" min:"1" type:"list" required:"true"` 3763 3764 // The time when StartAssessmentRun was called. 3765 StartedAt *time.Time `locationName:"startedAt" type:"timestamp" timestampFormat:"unix"` 3766 3767 // The state of the assessment run. 3768 // 3769 // State is a required field 3770 State *string `locationName:"state" type:"string" required:"true" enum:"AssessmentRunState"` 3771 3772 // The last time when the assessment run's state changed. 3773 // 3774 // StateChangedAt is a required field 3775 StateChangedAt *time.Time `locationName:"stateChangedAt" type:"timestamp" timestampFormat:"unix" required:"true"` 3776 3777 // A list of the assessment run state changes. 3778 // 3779 // StateChanges is a required field 3780 StateChanges []*AssessmentRunStateChange `locationName:"stateChanges" type:"list" required:"true"` 3781 3782 // The user-defined attributes that are assigned to every generated finding. 3783 // 3784 // UserAttributesForFindings is a required field 3785 UserAttributesForFindings []*Attribute `locationName:"userAttributesForFindings" type:"list" required:"true"` 3786} 3787 3788// String returns the string representation 3789func (s AssessmentRun) String() string { 3790 return awsutil.Prettify(s) 3791} 3792 3793// GoString returns the string representation 3794func (s AssessmentRun) GoString() string { 3795 return s.String() 3796} 3797 3798// SetArn sets the Arn field's value. 3799func (s *AssessmentRun) SetArn(v string) *AssessmentRun { 3800 s.Arn = &v 3801 return s 3802} 3803 3804// SetAssessmentTemplateArn sets the AssessmentTemplateArn field's value. 3805func (s *AssessmentRun) SetAssessmentTemplateArn(v string) *AssessmentRun { 3806 s.AssessmentTemplateArn = &v 3807 return s 3808} 3809 3810// SetCompletedAt sets the CompletedAt field's value. 3811func (s *AssessmentRun) SetCompletedAt(v time.Time) *AssessmentRun { 3812 s.CompletedAt = &v 3813 return s 3814} 3815 3816// SetCreatedAt sets the CreatedAt field's value. 3817func (s *AssessmentRun) SetCreatedAt(v time.Time) *AssessmentRun { 3818 s.CreatedAt = &v 3819 return s 3820} 3821 3822// SetDataCollected sets the DataCollected field's value. 3823func (s *AssessmentRun) SetDataCollected(v bool) *AssessmentRun { 3824 s.DataCollected = &v 3825 return s 3826} 3827 3828// SetDurationInSeconds sets the DurationInSeconds field's value. 3829func (s *AssessmentRun) SetDurationInSeconds(v int64) *AssessmentRun { 3830 s.DurationInSeconds = &v 3831 return s 3832} 3833 3834// SetFindingCounts sets the FindingCounts field's value. 3835func (s *AssessmentRun) SetFindingCounts(v map[string]*int64) *AssessmentRun { 3836 s.FindingCounts = v 3837 return s 3838} 3839 3840// SetName sets the Name field's value. 3841func (s *AssessmentRun) SetName(v string) *AssessmentRun { 3842 s.Name = &v 3843 return s 3844} 3845 3846// SetNotifications sets the Notifications field's value. 3847func (s *AssessmentRun) SetNotifications(v []*AssessmentRunNotification) *AssessmentRun { 3848 s.Notifications = v 3849 return s 3850} 3851 3852// SetRulesPackageArns sets the RulesPackageArns field's value. 3853func (s *AssessmentRun) SetRulesPackageArns(v []*string) *AssessmentRun { 3854 s.RulesPackageArns = v 3855 return s 3856} 3857 3858// SetStartedAt sets the StartedAt field's value. 3859func (s *AssessmentRun) SetStartedAt(v time.Time) *AssessmentRun { 3860 s.StartedAt = &v 3861 return s 3862} 3863 3864// SetState sets the State field's value. 3865func (s *AssessmentRun) SetState(v string) *AssessmentRun { 3866 s.State = &v 3867 return s 3868} 3869 3870// SetStateChangedAt sets the StateChangedAt field's value. 3871func (s *AssessmentRun) SetStateChangedAt(v time.Time) *AssessmentRun { 3872 s.StateChangedAt = &v 3873 return s 3874} 3875 3876// SetStateChanges sets the StateChanges field's value. 3877func (s *AssessmentRun) SetStateChanges(v []*AssessmentRunStateChange) *AssessmentRun { 3878 s.StateChanges = v 3879 return s 3880} 3881 3882// SetUserAttributesForFindings sets the UserAttributesForFindings field's value. 3883func (s *AssessmentRun) SetUserAttributesForFindings(v []*Attribute) *AssessmentRun { 3884 s.UserAttributesForFindings = v 3885 return s 3886} 3887 3888// Contains information about an Amazon Inspector agent. This data type is used 3889// as a response element in the ListAssessmentRunAgents action. 3890// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AssessmentRunAgent 3891type AssessmentRunAgent struct { 3892 _ struct{} `type:"structure"` 3893 3894 // The current health state of the agent. 3895 // 3896 // AgentHealth is a required field 3897 AgentHealth *string `locationName:"agentHealth" type:"string" required:"true" enum:"AgentHealth"` 3898 3899 // The detailed health state of the agent. 3900 // 3901 // AgentHealthCode is a required field 3902 AgentHealthCode *string `locationName:"agentHealthCode" type:"string" required:"true" enum:"AgentHealthCode"` 3903 3904 // The description for the agent health code. 3905 AgentHealthDetails *string `locationName:"agentHealthDetails" type:"string"` 3906 3907 // The AWS account of the EC2 instance where the agent is installed. 3908 // 3909 // AgentId is a required field 3910 AgentId *string `locationName:"agentId" min:"1" type:"string" required:"true"` 3911 3912 // The ARN of the assessment run that is associated with the agent. 3913 // 3914 // AssessmentRunArn is a required field 3915 AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"` 3916 3917 // The Auto Scaling group of the EC2 instance that is specified by the agent 3918 // ID. 3919 AutoScalingGroup *string `locationName:"autoScalingGroup" min:"1" type:"string"` 3920 3921 // The Amazon Inspector application data metrics that are collected by the agent. 3922 // 3923 // TelemetryMetadata is a required field 3924 TelemetryMetadata []*TelemetryMetadata `locationName:"telemetryMetadata" type:"list" required:"true"` 3925} 3926 3927// String returns the string representation 3928func (s AssessmentRunAgent) String() string { 3929 return awsutil.Prettify(s) 3930} 3931 3932// GoString returns the string representation 3933func (s AssessmentRunAgent) GoString() string { 3934 return s.String() 3935} 3936 3937// SetAgentHealth sets the AgentHealth field's value. 3938func (s *AssessmentRunAgent) SetAgentHealth(v string) *AssessmentRunAgent { 3939 s.AgentHealth = &v 3940 return s 3941} 3942 3943// SetAgentHealthCode sets the AgentHealthCode field's value. 3944func (s *AssessmentRunAgent) SetAgentHealthCode(v string) *AssessmentRunAgent { 3945 s.AgentHealthCode = &v 3946 return s 3947} 3948 3949// SetAgentHealthDetails sets the AgentHealthDetails field's value. 3950func (s *AssessmentRunAgent) SetAgentHealthDetails(v string) *AssessmentRunAgent { 3951 s.AgentHealthDetails = &v 3952 return s 3953} 3954 3955// SetAgentId sets the AgentId field's value. 3956func (s *AssessmentRunAgent) SetAgentId(v string) *AssessmentRunAgent { 3957 s.AgentId = &v 3958 return s 3959} 3960 3961// SetAssessmentRunArn sets the AssessmentRunArn field's value. 3962func (s *AssessmentRunAgent) SetAssessmentRunArn(v string) *AssessmentRunAgent { 3963 s.AssessmentRunArn = &v 3964 return s 3965} 3966 3967// SetAutoScalingGroup sets the AutoScalingGroup field's value. 3968func (s *AssessmentRunAgent) SetAutoScalingGroup(v string) *AssessmentRunAgent { 3969 s.AutoScalingGroup = &v 3970 return s 3971} 3972 3973// SetTelemetryMetadata sets the TelemetryMetadata field's value. 3974func (s *AssessmentRunAgent) SetTelemetryMetadata(v []*TelemetryMetadata) *AssessmentRunAgent { 3975 s.TelemetryMetadata = v 3976 return s 3977} 3978 3979// Used as the request parameter in the ListAssessmentRuns action. 3980// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AssessmentRunFilter 3981type AssessmentRunFilter struct { 3982 _ struct{} `type:"structure"` 3983 3984 // For a record to match a filter, the value that is specified for this data 3985 // type property must inclusively match any value between the specified minimum 3986 // and maximum values of the completedAt property of the AssessmentRun data 3987 // type. 3988 CompletionTimeRange *TimestampRange `locationName:"completionTimeRange" type:"structure"` 3989 3990 // For a record to match a filter, the value that is specified for this data 3991 // type property must inclusively match any value between the specified minimum 3992 // and maximum values of the durationInSeconds property of the AssessmentRun 3993 // data type. 3994 DurationRange *DurationRange `locationName:"durationRange" type:"structure"` 3995 3996 // For a record to match a filter, an explicit value or a string containing 3997 // a wildcard that is specified for this data type property must match the value 3998 // of the assessmentRunName property of the AssessmentRun data type. 3999 NamePattern *string `locationName:"namePattern" min:"1" type:"string"` 4000 4001 // For a record to match a filter, the value that is specified for this data 4002 // type property must be contained in the list of values of the rulesPackages 4003 // property of the AssessmentRun data type. 4004 RulesPackageArns []*string `locationName:"rulesPackageArns" type:"list"` 4005 4006 // For a record to match a filter, the value that is specified for this data 4007 // type property must inclusively match any value between the specified minimum 4008 // and maximum values of the startTime property of the AssessmentRun data type. 4009 StartTimeRange *TimestampRange `locationName:"startTimeRange" type:"structure"` 4010 4011 // For a record to match a filter, the value that is specified for this data 4012 // type property must match the stateChangedAt property of the AssessmentRun 4013 // data type. 4014 StateChangeTimeRange *TimestampRange `locationName:"stateChangeTimeRange" type:"structure"` 4015 4016 // For a record to match a filter, one of the values specified for this data 4017 // type property must be the exact match of the value of the assessmentRunState 4018 // property of the AssessmentRun data type. 4019 States []*string `locationName:"states" type:"list"` 4020} 4021 4022// String returns the string representation 4023func (s AssessmentRunFilter) String() string { 4024 return awsutil.Prettify(s) 4025} 4026 4027// GoString returns the string representation 4028func (s AssessmentRunFilter) GoString() string { 4029 return s.String() 4030} 4031 4032// Validate inspects the fields of the type to determine if they are valid. 4033func (s *AssessmentRunFilter) Validate() error { 4034 invalidParams := request.ErrInvalidParams{Context: "AssessmentRunFilter"} 4035 if s.NamePattern != nil && len(*s.NamePattern) < 1 { 4036 invalidParams.Add(request.NewErrParamMinLen("NamePattern", 1)) 4037 } 4038 if s.DurationRange != nil { 4039 if err := s.DurationRange.Validate(); err != nil { 4040 invalidParams.AddNested("DurationRange", err.(request.ErrInvalidParams)) 4041 } 4042 } 4043 4044 if invalidParams.Len() > 0 { 4045 return invalidParams 4046 } 4047 return nil 4048} 4049 4050// SetCompletionTimeRange sets the CompletionTimeRange field's value. 4051func (s *AssessmentRunFilter) SetCompletionTimeRange(v *TimestampRange) *AssessmentRunFilter { 4052 s.CompletionTimeRange = v 4053 return s 4054} 4055 4056// SetDurationRange sets the DurationRange field's value. 4057func (s *AssessmentRunFilter) SetDurationRange(v *DurationRange) *AssessmentRunFilter { 4058 s.DurationRange = v 4059 return s 4060} 4061 4062// SetNamePattern sets the NamePattern field's value. 4063func (s *AssessmentRunFilter) SetNamePattern(v string) *AssessmentRunFilter { 4064 s.NamePattern = &v 4065 return s 4066} 4067 4068// SetRulesPackageArns sets the RulesPackageArns field's value. 4069func (s *AssessmentRunFilter) SetRulesPackageArns(v []*string) *AssessmentRunFilter { 4070 s.RulesPackageArns = v 4071 return s 4072} 4073 4074// SetStartTimeRange sets the StartTimeRange field's value. 4075func (s *AssessmentRunFilter) SetStartTimeRange(v *TimestampRange) *AssessmentRunFilter { 4076 s.StartTimeRange = v 4077 return s 4078} 4079 4080// SetStateChangeTimeRange sets the StateChangeTimeRange field's value. 4081func (s *AssessmentRunFilter) SetStateChangeTimeRange(v *TimestampRange) *AssessmentRunFilter { 4082 s.StateChangeTimeRange = v 4083 return s 4084} 4085 4086// SetStates sets the States field's value. 4087func (s *AssessmentRunFilter) SetStates(v []*string) *AssessmentRunFilter { 4088 s.States = v 4089 return s 4090} 4091 4092// Used as one of the elements of the AssessmentRun data type. 4093// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AssessmentRunNotification 4094type AssessmentRunNotification struct { 4095 _ struct{} `type:"structure"` 4096 4097 // The date of the notification. 4098 // 4099 // Date is a required field 4100 Date *time.Time `locationName:"date" type:"timestamp" timestampFormat:"unix" required:"true"` 4101 4102 // The Boolean value that specifies whether the notification represents an error. 4103 // 4104 // Error is a required field 4105 Error *bool `locationName:"error" type:"boolean" required:"true"` 4106 4107 // The event for which a notification is sent. 4108 // 4109 // Event is a required field 4110 Event *string `locationName:"event" type:"string" required:"true" enum:"Event"` 4111 4112 // The message included in the notification. 4113 Message *string `locationName:"message" type:"string"` 4114 4115 // The status code of the SNS notification. 4116 SnsPublishStatusCode *string `locationName:"snsPublishStatusCode" type:"string" enum:"AssessmentRunNotificationSnsStatusCode"` 4117 4118 // The SNS topic to which the SNS notification is sent. 4119 SnsTopicArn *string `locationName:"snsTopicArn" min:"1" type:"string"` 4120} 4121 4122// String returns the string representation 4123func (s AssessmentRunNotification) String() string { 4124 return awsutil.Prettify(s) 4125} 4126 4127// GoString returns the string representation 4128func (s AssessmentRunNotification) GoString() string { 4129 return s.String() 4130} 4131 4132// SetDate sets the Date field's value. 4133func (s *AssessmentRunNotification) SetDate(v time.Time) *AssessmentRunNotification { 4134 s.Date = &v 4135 return s 4136} 4137 4138// SetError sets the Error field's value. 4139func (s *AssessmentRunNotification) SetError(v bool) *AssessmentRunNotification { 4140 s.Error = &v 4141 return s 4142} 4143 4144// SetEvent sets the Event field's value. 4145func (s *AssessmentRunNotification) SetEvent(v string) *AssessmentRunNotification { 4146 s.Event = &v 4147 return s 4148} 4149 4150// SetMessage sets the Message field's value. 4151func (s *AssessmentRunNotification) SetMessage(v string) *AssessmentRunNotification { 4152 s.Message = &v 4153 return s 4154} 4155 4156// SetSnsPublishStatusCode sets the SnsPublishStatusCode field's value. 4157func (s *AssessmentRunNotification) SetSnsPublishStatusCode(v string) *AssessmentRunNotification { 4158 s.SnsPublishStatusCode = &v 4159 return s 4160} 4161 4162// SetSnsTopicArn sets the SnsTopicArn field's value. 4163func (s *AssessmentRunNotification) SetSnsTopicArn(v string) *AssessmentRunNotification { 4164 s.SnsTopicArn = &v 4165 return s 4166} 4167 4168// Used as one of the elements of the AssessmentRun data type. 4169// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AssessmentRunStateChange 4170type AssessmentRunStateChange struct { 4171 _ struct{} `type:"structure"` 4172 4173 // The assessment run state. 4174 // 4175 // State is a required field 4176 State *string `locationName:"state" type:"string" required:"true" enum:"AssessmentRunState"` 4177 4178 // The last time the assessment run state changed. 4179 // 4180 // StateChangedAt is a required field 4181 StateChangedAt *time.Time `locationName:"stateChangedAt" type:"timestamp" timestampFormat:"unix" required:"true"` 4182} 4183 4184// String returns the string representation 4185func (s AssessmentRunStateChange) String() string { 4186 return awsutil.Prettify(s) 4187} 4188 4189// GoString returns the string representation 4190func (s AssessmentRunStateChange) GoString() string { 4191 return s.String() 4192} 4193 4194// SetState sets the State field's value. 4195func (s *AssessmentRunStateChange) SetState(v string) *AssessmentRunStateChange { 4196 s.State = &v 4197 return s 4198} 4199 4200// SetStateChangedAt sets the StateChangedAt field's value. 4201func (s *AssessmentRunStateChange) SetStateChangedAt(v time.Time) *AssessmentRunStateChange { 4202 s.StateChangedAt = &v 4203 return s 4204} 4205 4206// Contains information about an Amazon Inspector application. This data type 4207// is used as the response element in the DescribeAssessmentTargets action. 4208// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AssessmentTarget 4209type AssessmentTarget struct { 4210 _ struct{} `type:"structure"` 4211 4212 // The ARN that specifies the Amazon Inspector assessment target. 4213 // 4214 // Arn is a required field 4215 Arn *string `locationName:"arn" min:"1" type:"string" required:"true"` 4216 4217 // The time at which the assessment target is created. 4218 // 4219 // CreatedAt is a required field 4220 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"` 4221 4222 // The name of the Amazon Inspector assessment target. 4223 // 4224 // Name is a required field 4225 Name *string `locationName:"name" min:"1" type:"string" required:"true"` 4226 4227 // The ARN that specifies the resource group that is associated with the assessment 4228 // target. 4229 // 4230 // ResourceGroupArn is a required field 4231 ResourceGroupArn *string `locationName:"resourceGroupArn" min:"1" type:"string" required:"true"` 4232 4233 // The time at which UpdateAssessmentTarget is called. 4234 // 4235 // UpdatedAt is a required field 4236 UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"unix" required:"true"` 4237} 4238 4239// String returns the string representation 4240func (s AssessmentTarget) String() string { 4241 return awsutil.Prettify(s) 4242} 4243 4244// GoString returns the string representation 4245func (s AssessmentTarget) GoString() string { 4246 return s.String() 4247} 4248 4249// SetArn sets the Arn field's value. 4250func (s *AssessmentTarget) SetArn(v string) *AssessmentTarget { 4251 s.Arn = &v 4252 return s 4253} 4254 4255// SetCreatedAt sets the CreatedAt field's value. 4256func (s *AssessmentTarget) SetCreatedAt(v time.Time) *AssessmentTarget { 4257 s.CreatedAt = &v 4258 return s 4259} 4260 4261// SetName sets the Name field's value. 4262func (s *AssessmentTarget) SetName(v string) *AssessmentTarget { 4263 s.Name = &v 4264 return s 4265} 4266 4267// SetResourceGroupArn sets the ResourceGroupArn field's value. 4268func (s *AssessmentTarget) SetResourceGroupArn(v string) *AssessmentTarget { 4269 s.ResourceGroupArn = &v 4270 return s 4271} 4272 4273// SetUpdatedAt sets the UpdatedAt field's value. 4274func (s *AssessmentTarget) SetUpdatedAt(v time.Time) *AssessmentTarget { 4275 s.UpdatedAt = &v 4276 return s 4277} 4278 4279// Used as the request parameter in the ListAssessmentTargets action. 4280// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AssessmentTargetFilter 4281type AssessmentTargetFilter struct { 4282 _ struct{} `type:"structure"` 4283 4284 // For a record to match a filter, an explicit value or a string that contains 4285 // a wildcard that is specified for this data type property must match the value 4286 // of the assessmentTargetName property of the AssessmentTarget data type. 4287 AssessmentTargetNamePattern *string `locationName:"assessmentTargetNamePattern" min:"1" type:"string"` 4288} 4289 4290// String returns the string representation 4291func (s AssessmentTargetFilter) String() string { 4292 return awsutil.Prettify(s) 4293} 4294 4295// GoString returns the string representation 4296func (s AssessmentTargetFilter) GoString() string { 4297 return s.String() 4298} 4299 4300// Validate inspects the fields of the type to determine if they are valid. 4301func (s *AssessmentTargetFilter) Validate() error { 4302 invalidParams := request.ErrInvalidParams{Context: "AssessmentTargetFilter"} 4303 if s.AssessmentTargetNamePattern != nil && len(*s.AssessmentTargetNamePattern) < 1 { 4304 invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetNamePattern", 1)) 4305 } 4306 4307 if invalidParams.Len() > 0 { 4308 return invalidParams 4309 } 4310 return nil 4311} 4312 4313// SetAssessmentTargetNamePattern sets the AssessmentTargetNamePattern field's value. 4314func (s *AssessmentTargetFilter) SetAssessmentTargetNamePattern(v string) *AssessmentTargetFilter { 4315 s.AssessmentTargetNamePattern = &v 4316 return s 4317} 4318 4319// Contains information about an Amazon Inspector assessment template. This 4320// data type is used as the response element in the DescribeAssessmentTemplates 4321// action. 4322// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AssessmentTemplate 4323type AssessmentTemplate struct { 4324 _ struct{} `type:"structure"` 4325 4326 // The ARN of the assessment template. 4327 // 4328 // Arn is a required field 4329 Arn *string `locationName:"arn" min:"1" type:"string" required:"true"` 4330 4331 // The ARN of the assessment target that corresponds to this assessment template. 4332 // 4333 // AssessmentTargetArn is a required field 4334 AssessmentTargetArn *string `locationName:"assessmentTargetArn" min:"1" type:"string" required:"true"` 4335 4336 // The time at which the assessment template is created. 4337 // 4338 // CreatedAt is a required field 4339 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"` 4340 4341 // The duration in seconds specified for this assessment tempate. The default 4342 // value is 3600 seconds (one hour). The maximum value is 86400 seconds (one 4343 // day). 4344 // 4345 // DurationInSeconds is a required field 4346 DurationInSeconds *int64 `locationName:"durationInSeconds" min:"180" type:"integer" required:"true"` 4347 4348 // The name of the assessment template. 4349 // 4350 // Name is a required field 4351 Name *string `locationName:"name" min:"1" type:"string" required:"true"` 4352 4353 // The rules packages that are specified for this assessment template. 4354 // 4355 // RulesPackageArns is a required field 4356 RulesPackageArns []*string `locationName:"rulesPackageArns" type:"list" required:"true"` 4357 4358 // The user-defined attributes that are assigned to every generated finding 4359 // from the assessment run that uses this assessment template. 4360 // 4361 // UserAttributesForFindings is a required field 4362 UserAttributesForFindings []*Attribute `locationName:"userAttributesForFindings" type:"list" required:"true"` 4363} 4364 4365// String returns the string representation 4366func (s AssessmentTemplate) String() string { 4367 return awsutil.Prettify(s) 4368} 4369 4370// GoString returns the string representation 4371func (s AssessmentTemplate) GoString() string { 4372 return s.String() 4373} 4374 4375// SetArn sets the Arn field's value. 4376func (s *AssessmentTemplate) SetArn(v string) *AssessmentTemplate { 4377 s.Arn = &v 4378 return s 4379} 4380 4381// SetAssessmentTargetArn sets the AssessmentTargetArn field's value. 4382func (s *AssessmentTemplate) SetAssessmentTargetArn(v string) *AssessmentTemplate { 4383 s.AssessmentTargetArn = &v 4384 return s 4385} 4386 4387// SetCreatedAt sets the CreatedAt field's value. 4388func (s *AssessmentTemplate) SetCreatedAt(v time.Time) *AssessmentTemplate { 4389 s.CreatedAt = &v 4390 return s 4391} 4392 4393// SetDurationInSeconds sets the DurationInSeconds field's value. 4394func (s *AssessmentTemplate) SetDurationInSeconds(v int64) *AssessmentTemplate { 4395 s.DurationInSeconds = &v 4396 return s 4397} 4398 4399// SetName sets the Name field's value. 4400func (s *AssessmentTemplate) SetName(v string) *AssessmentTemplate { 4401 s.Name = &v 4402 return s 4403} 4404 4405// SetRulesPackageArns sets the RulesPackageArns field's value. 4406func (s *AssessmentTemplate) SetRulesPackageArns(v []*string) *AssessmentTemplate { 4407 s.RulesPackageArns = v 4408 return s 4409} 4410 4411// SetUserAttributesForFindings sets the UserAttributesForFindings field's value. 4412func (s *AssessmentTemplate) SetUserAttributesForFindings(v []*Attribute) *AssessmentTemplate { 4413 s.UserAttributesForFindings = v 4414 return s 4415} 4416 4417// Used as the request parameter in the ListAssessmentTemplates action. 4418// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AssessmentTemplateFilter 4419type AssessmentTemplateFilter struct { 4420 _ struct{} `type:"structure"` 4421 4422 // For a record to match a filter, the value specified for this data type property 4423 // must inclusively match any value between the specified minimum and maximum 4424 // values of the durationInSeconds property of the AssessmentTemplate data type. 4425 DurationRange *DurationRange `locationName:"durationRange" type:"structure"` 4426 4427 // For a record to match a filter, an explicit value or a string that contains 4428 // a wildcard that is specified for this data type property must match the value 4429 // of the assessmentTemplateName property of the AssessmentTemplate data type. 4430 NamePattern *string `locationName:"namePattern" min:"1" type:"string"` 4431 4432 // For a record to match a filter, the values that are specified for this data 4433 // type property must be contained in the list of values of the rulesPackageArns 4434 // property of the AssessmentTemplate data type. 4435 RulesPackageArns []*string `locationName:"rulesPackageArns" type:"list"` 4436} 4437 4438// String returns the string representation 4439func (s AssessmentTemplateFilter) String() string { 4440 return awsutil.Prettify(s) 4441} 4442 4443// GoString returns the string representation 4444func (s AssessmentTemplateFilter) GoString() string { 4445 return s.String() 4446} 4447 4448// Validate inspects the fields of the type to determine if they are valid. 4449func (s *AssessmentTemplateFilter) Validate() error { 4450 invalidParams := request.ErrInvalidParams{Context: "AssessmentTemplateFilter"} 4451 if s.NamePattern != nil && len(*s.NamePattern) < 1 { 4452 invalidParams.Add(request.NewErrParamMinLen("NamePattern", 1)) 4453 } 4454 if s.DurationRange != nil { 4455 if err := s.DurationRange.Validate(); err != nil { 4456 invalidParams.AddNested("DurationRange", err.(request.ErrInvalidParams)) 4457 } 4458 } 4459 4460 if invalidParams.Len() > 0 { 4461 return invalidParams 4462 } 4463 return nil 4464} 4465 4466// SetDurationRange sets the DurationRange field's value. 4467func (s *AssessmentTemplateFilter) SetDurationRange(v *DurationRange) *AssessmentTemplateFilter { 4468 s.DurationRange = v 4469 return s 4470} 4471 4472// SetNamePattern sets the NamePattern field's value. 4473func (s *AssessmentTemplateFilter) SetNamePattern(v string) *AssessmentTemplateFilter { 4474 s.NamePattern = &v 4475 return s 4476} 4477 4478// SetRulesPackageArns sets the RulesPackageArns field's value. 4479func (s *AssessmentTemplateFilter) SetRulesPackageArns(v []*string) *AssessmentTemplateFilter { 4480 s.RulesPackageArns = v 4481 return s 4482} 4483 4484// A collection of attributes of the host from which the finding is generated. 4485// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AssetAttributes 4486type AssetAttributes struct { 4487 _ struct{} `type:"structure"` 4488 4489 // The ID of the agent that is installed on the EC2 instance where the finding 4490 // is generated. 4491 AgentId *string `locationName:"agentId" min:"1" type:"string"` 4492 4493 // The ID of the Amazon Machine Image (AMI) that is installed on the EC2 instance 4494 // where the finding is generated. 4495 AmiId *string `locationName:"amiId" type:"string"` 4496 4497 // The Auto Scaling group of the EC2 instance where the finding is generated. 4498 AutoScalingGroup *string `locationName:"autoScalingGroup" min:"1" type:"string"` 4499 4500 // The hostname of the EC2 instance where the finding is generated. 4501 Hostname *string `locationName:"hostname" type:"string"` 4502 4503 // The list of IP v4 addresses of the EC2 instance where the finding is generated. 4504 Ipv4Addresses []*string `locationName:"ipv4Addresses" type:"list"` 4505 4506 // The schema version of this data type. 4507 // 4508 // SchemaVersion is a required field 4509 SchemaVersion *int64 `locationName:"schemaVersion" type:"integer" required:"true"` 4510} 4511 4512// String returns the string representation 4513func (s AssetAttributes) String() string { 4514 return awsutil.Prettify(s) 4515} 4516 4517// GoString returns the string representation 4518func (s AssetAttributes) GoString() string { 4519 return s.String() 4520} 4521 4522// SetAgentId sets the AgentId field's value. 4523func (s *AssetAttributes) SetAgentId(v string) *AssetAttributes { 4524 s.AgentId = &v 4525 return s 4526} 4527 4528// SetAmiId sets the AmiId field's value. 4529func (s *AssetAttributes) SetAmiId(v string) *AssetAttributes { 4530 s.AmiId = &v 4531 return s 4532} 4533 4534// SetAutoScalingGroup sets the AutoScalingGroup field's value. 4535func (s *AssetAttributes) SetAutoScalingGroup(v string) *AssetAttributes { 4536 s.AutoScalingGroup = &v 4537 return s 4538} 4539 4540// SetHostname sets the Hostname field's value. 4541func (s *AssetAttributes) SetHostname(v string) *AssetAttributes { 4542 s.Hostname = &v 4543 return s 4544} 4545 4546// SetIpv4Addresses sets the Ipv4Addresses field's value. 4547func (s *AssetAttributes) SetIpv4Addresses(v []*string) *AssetAttributes { 4548 s.Ipv4Addresses = v 4549 return s 4550} 4551 4552// SetSchemaVersion sets the SchemaVersion field's value. 4553func (s *AssetAttributes) SetSchemaVersion(v int64) *AssetAttributes { 4554 s.SchemaVersion = &v 4555 return s 4556} 4557 4558// This data type is used as a request parameter in the AddAttributesToFindings 4559// and CreateAssessmentTemplate actions. 4560// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/Attribute 4561type Attribute struct { 4562 _ struct{} `type:"structure"` 4563 4564 // The attribute key. 4565 // 4566 // Key is a required field 4567 Key *string `locationName:"key" min:"1" type:"string" required:"true"` 4568 4569 // The value assigned to the attribute key. 4570 Value *string `locationName:"value" min:"1" type:"string"` 4571} 4572 4573// String returns the string representation 4574func (s Attribute) String() string { 4575 return awsutil.Prettify(s) 4576} 4577 4578// GoString returns the string representation 4579func (s Attribute) GoString() string { 4580 return s.String() 4581} 4582 4583// Validate inspects the fields of the type to determine if they are valid. 4584func (s *Attribute) Validate() error { 4585 invalidParams := request.ErrInvalidParams{Context: "Attribute"} 4586 if s.Key == nil { 4587 invalidParams.Add(request.NewErrParamRequired("Key")) 4588 } 4589 if s.Key != nil && len(*s.Key) < 1 { 4590 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 4591 } 4592 if s.Value != nil && len(*s.Value) < 1 { 4593 invalidParams.Add(request.NewErrParamMinLen("Value", 1)) 4594 } 4595 4596 if invalidParams.Len() > 0 { 4597 return invalidParams 4598 } 4599 return nil 4600} 4601 4602// SetKey sets the Key field's value. 4603func (s *Attribute) SetKey(v string) *Attribute { 4604 s.Key = &v 4605 return s 4606} 4607 4608// SetValue sets the Value field's value. 4609func (s *Attribute) SetValue(v string) *Attribute { 4610 s.Value = &v 4611 return s 4612} 4613 4614// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateAssessmentTargetRequest 4615type CreateAssessmentTargetInput struct { 4616 _ struct{} `type:"structure"` 4617 4618 // The user-defined name that identifies the assessment target that you want 4619 // to create. The name must be unique within the AWS account. 4620 // 4621 // AssessmentTargetName is a required field 4622 AssessmentTargetName *string `locationName:"assessmentTargetName" min:"1" type:"string" required:"true"` 4623 4624 // The ARN that specifies the resource group that is used to create the assessment 4625 // target. 4626 // 4627 // ResourceGroupArn is a required field 4628 ResourceGroupArn *string `locationName:"resourceGroupArn" min:"1" type:"string" required:"true"` 4629} 4630 4631// String returns the string representation 4632func (s CreateAssessmentTargetInput) String() string { 4633 return awsutil.Prettify(s) 4634} 4635 4636// GoString returns the string representation 4637func (s CreateAssessmentTargetInput) GoString() string { 4638 return s.String() 4639} 4640 4641// Validate inspects the fields of the type to determine if they are valid. 4642func (s *CreateAssessmentTargetInput) Validate() error { 4643 invalidParams := request.ErrInvalidParams{Context: "CreateAssessmentTargetInput"} 4644 if s.AssessmentTargetName == nil { 4645 invalidParams.Add(request.NewErrParamRequired("AssessmentTargetName")) 4646 } 4647 if s.AssessmentTargetName != nil && len(*s.AssessmentTargetName) < 1 { 4648 invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetName", 1)) 4649 } 4650 if s.ResourceGroupArn == nil { 4651 invalidParams.Add(request.NewErrParamRequired("ResourceGroupArn")) 4652 } 4653 if s.ResourceGroupArn != nil && len(*s.ResourceGroupArn) < 1 { 4654 invalidParams.Add(request.NewErrParamMinLen("ResourceGroupArn", 1)) 4655 } 4656 4657 if invalidParams.Len() > 0 { 4658 return invalidParams 4659 } 4660 return nil 4661} 4662 4663// SetAssessmentTargetName sets the AssessmentTargetName field's value. 4664func (s *CreateAssessmentTargetInput) SetAssessmentTargetName(v string) *CreateAssessmentTargetInput { 4665 s.AssessmentTargetName = &v 4666 return s 4667} 4668 4669// SetResourceGroupArn sets the ResourceGroupArn field's value. 4670func (s *CreateAssessmentTargetInput) SetResourceGroupArn(v string) *CreateAssessmentTargetInput { 4671 s.ResourceGroupArn = &v 4672 return s 4673} 4674 4675// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateAssessmentTargetResponse 4676type CreateAssessmentTargetOutput struct { 4677 _ struct{} `type:"structure"` 4678 4679 // The ARN that specifies the assessment target that is created. 4680 // 4681 // AssessmentTargetArn is a required field 4682 AssessmentTargetArn *string `locationName:"assessmentTargetArn" min:"1" type:"string" required:"true"` 4683} 4684 4685// String returns the string representation 4686func (s CreateAssessmentTargetOutput) String() string { 4687 return awsutil.Prettify(s) 4688} 4689 4690// GoString returns the string representation 4691func (s CreateAssessmentTargetOutput) GoString() string { 4692 return s.String() 4693} 4694 4695// SetAssessmentTargetArn sets the AssessmentTargetArn field's value. 4696func (s *CreateAssessmentTargetOutput) SetAssessmentTargetArn(v string) *CreateAssessmentTargetOutput { 4697 s.AssessmentTargetArn = &v 4698 return s 4699} 4700 4701// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateAssessmentTemplateRequest 4702type CreateAssessmentTemplateInput struct { 4703 _ struct{} `type:"structure"` 4704 4705 // The ARN that specifies the assessment target for which you want to create 4706 // the assessment template. 4707 // 4708 // AssessmentTargetArn is a required field 4709 AssessmentTargetArn *string `locationName:"assessmentTargetArn" min:"1" type:"string" required:"true"` 4710 4711 // The user-defined name that identifies the assessment template that you want 4712 // to create. You can create several assessment templates for an assessment 4713 // target. The names of the assessment templates that correspond to a particular 4714 // assessment target must be unique. 4715 // 4716 // AssessmentTemplateName is a required field 4717 AssessmentTemplateName *string `locationName:"assessmentTemplateName" min:"1" type:"string" required:"true"` 4718 4719 // The duration of the assessment run in seconds. The default value is 3600 4720 // seconds (one hour). 4721 // 4722 // DurationInSeconds is a required field 4723 DurationInSeconds *int64 `locationName:"durationInSeconds" min:"180" type:"integer" required:"true"` 4724 4725 // The ARNs that specify the rules packages that you want to attach to the assessment 4726 // template. 4727 // 4728 // RulesPackageArns is a required field 4729 RulesPackageArns []*string `locationName:"rulesPackageArns" type:"list" required:"true"` 4730 4731 // The user-defined attributes that are assigned to every finding that is generated 4732 // by the assessment run that uses this assessment template. An attribute is 4733 // a key and value pair (an Attribute object). Within an assessment template, 4734 // each key must be unique. 4735 UserAttributesForFindings []*Attribute `locationName:"userAttributesForFindings" type:"list"` 4736} 4737 4738// String returns the string representation 4739func (s CreateAssessmentTemplateInput) String() string { 4740 return awsutil.Prettify(s) 4741} 4742 4743// GoString returns the string representation 4744func (s CreateAssessmentTemplateInput) GoString() string { 4745 return s.String() 4746} 4747 4748// Validate inspects the fields of the type to determine if they are valid. 4749func (s *CreateAssessmentTemplateInput) Validate() error { 4750 invalidParams := request.ErrInvalidParams{Context: "CreateAssessmentTemplateInput"} 4751 if s.AssessmentTargetArn == nil { 4752 invalidParams.Add(request.NewErrParamRequired("AssessmentTargetArn")) 4753 } 4754 if s.AssessmentTargetArn != nil && len(*s.AssessmentTargetArn) < 1 { 4755 invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetArn", 1)) 4756 } 4757 if s.AssessmentTemplateName == nil { 4758 invalidParams.Add(request.NewErrParamRequired("AssessmentTemplateName")) 4759 } 4760 if s.AssessmentTemplateName != nil && len(*s.AssessmentTemplateName) < 1 { 4761 invalidParams.Add(request.NewErrParamMinLen("AssessmentTemplateName", 1)) 4762 } 4763 if s.DurationInSeconds == nil { 4764 invalidParams.Add(request.NewErrParamRequired("DurationInSeconds")) 4765 } 4766 if s.DurationInSeconds != nil && *s.DurationInSeconds < 180 { 4767 invalidParams.Add(request.NewErrParamMinValue("DurationInSeconds", 180)) 4768 } 4769 if s.RulesPackageArns == nil { 4770 invalidParams.Add(request.NewErrParamRequired("RulesPackageArns")) 4771 } 4772 if s.UserAttributesForFindings != nil { 4773 for i, v := range s.UserAttributesForFindings { 4774 if v == nil { 4775 continue 4776 } 4777 if err := v.Validate(); err != nil { 4778 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "UserAttributesForFindings", i), err.(request.ErrInvalidParams)) 4779 } 4780 } 4781 } 4782 4783 if invalidParams.Len() > 0 { 4784 return invalidParams 4785 } 4786 return nil 4787} 4788 4789// SetAssessmentTargetArn sets the AssessmentTargetArn field's value. 4790func (s *CreateAssessmentTemplateInput) SetAssessmentTargetArn(v string) *CreateAssessmentTemplateInput { 4791 s.AssessmentTargetArn = &v 4792 return s 4793} 4794 4795// SetAssessmentTemplateName sets the AssessmentTemplateName field's value. 4796func (s *CreateAssessmentTemplateInput) SetAssessmentTemplateName(v string) *CreateAssessmentTemplateInput { 4797 s.AssessmentTemplateName = &v 4798 return s 4799} 4800 4801// SetDurationInSeconds sets the DurationInSeconds field's value. 4802func (s *CreateAssessmentTemplateInput) SetDurationInSeconds(v int64) *CreateAssessmentTemplateInput { 4803 s.DurationInSeconds = &v 4804 return s 4805} 4806 4807// SetRulesPackageArns sets the RulesPackageArns field's value. 4808func (s *CreateAssessmentTemplateInput) SetRulesPackageArns(v []*string) *CreateAssessmentTemplateInput { 4809 s.RulesPackageArns = v 4810 return s 4811} 4812 4813// SetUserAttributesForFindings sets the UserAttributesForFindings field's value. 4814func (s *CreateAssessmentTemplateInput) SetUserAttributesForFindings(v []*Attribute) *CreateAssessmentTemplateInput { 4815 s.UserAttributesForFindings = v 4816 return s 4817} 4818 4819// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateAssessmentTemplateResponse 4820type CreateAssessmentTemplateOutput struct { 4821 _ struct{} `type:"structure"` 4822 4823 // The ARN that specifies the assessment template that is created. 4824 // 4825 // AssessmentTemplateArn is a required field 4826 AssessmentTemplateArn *string `locationName:"assessmentTemplateArn" min:"1" type:"string" required:"true"` 4827} 4828 4829// String returns the string representation 4830func (s CreateAssessmentTemplateOutput) String() string { 4831 return awsutil.Prettify(s) 4832} 4833 4834// GoString returns the string representation 4835func (s CreateAssessmentTemplateOutput) GoString() string { 4836 return s.String() 4837} 4838 4839// SetAssessmentTemplateArn sets the AssessmentTemplateArn field's value. 4840func (s *CreateAssessmentTemplateOutput) SetAssessmentTemplateArn(v string) *CreateAssessmentTemplateOutput { 4841 s.AssessmentTemplateArn = &v 4842 return s 4843} 4844 4845// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateResourceGroupRequest 4846type CreateResourceGroupInput struct { 4847 _ struct{} `type:"structure"` 4848 4849 // A collection of keys and an array of possible values, '[{"key":"key1","values":["Value1","Value2"]},{"key":"Key2","values":["Value3"]}]'. 4850 // 4851 // For example,'[{"key":"Name","values":["TestEC2Instance"]}]'. 4852 // 4853 // ResourceGroupTags is a required field 4854 ResourceGroupTags []*ResourceGroupTag `locationName:"resourceGroupTags" min:"1" type:"list" required:"true"` 4855} 4856 4857// String returns the string representation 4858func (s CreateResourceGroupInput) String() string { 4859 return awsutil.Prettify(s) 4860} 4861 4862// GoString returns the string representation 4863func (s CreateResourceGroupInput) GoString() string { 4864 return s.String() 4865} 4866 4867// Validate inspects the fields of the type to determine if they are valid. 4868func (s *CreateResourceGroupInput) Validate() error { 4869 invalidParams := request.ErrInvalidParams{Context: "CreateResourceGroupInput"} 4870 if s.ResourceGroupTags == nil { 4871 invalidParams.Add(request.NewErrParamRequired("ResourceGroupTags")) 4872 } 4873 if s.ResourceGroupTags != nil && len(s.ResourceGroupTags) < 1 { 4874 invalidParams.Add(request.NewErrParamMinLen("ResourceGroupTags", 1)) 4875 } 4876 if s.ResourceGroupTags != nil { 4877 for i, v := range s.ResourceGroupTags { 4878 if v == nil { 4879 continue 4880 } 4881 if err := v.Validate(); err != nil { 4882 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceGroupTags", i), err.(request.ErrInvalidParams)) 4883 } 4884 } 4885 } 4886 4887 if invalidParams.Len() > 0 { 4888 return invalidParams 4889 } 4890 return nil 4891} 4892 4893// SetResourceGroupTags sets the ResourceGroupTags field's value. 4894func (s *CreateResourceGroupInput) SetResourceGroupTags(v []*ResourceGroupTag) *CreateResourceGroupInput { 4895 s.ResourceGroupTags = v 4896 return s 4897} 4898 4899// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateResourceGroupResponse 4900type CreateResourceGroupOutput struct { 4901 _ struct{} `type:"structure"` 4902 4903 // The ARN that specifies the resource group that is created. 4904 // 4905 // ResourceGroupArn is a required field 4906 ResourceGroupArn *string `locationName:"resourceGroupArn" min:"1" type:"string" required:"true"` 4907} 4908 4909// String returns the string representation 4910func (s CreateResourceGroupOutput) String() string { 4911 return awsutil.Prettify(s) 4912} 4913 4914// GoString returns the string representation 4915func (s CreateResourceGroupOutput) GoString() string { 4916 return s.String() 4917} 4918 4919// SetResourceGroupArn sets the ResourceGroupArn field's value. 4920func (s *CreateResourceGroupOutput) SetResourceGroupArn(v string) *CreateResourceGroupOutput { 4921 s.ResourceGroupArn = &v 4922 return s 4923} 4924 4925// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentRunRequest 4926type DeleteAssessmentRunInput struct { 4927 _ struct{} `type:"structure"` 4928 4929 // The ARN that specifies the assessment run that you want to delete. 4930 // 4931 // AssessmentRunArn is a required field 4932 AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"` 4933} 4934 4935// String returns the string representation 4936func (s DeleteAssessmentRunInput) String() string { 4937 return awsutil.Prettify(s) 4938} 4939 4940// GoString returns the string representation 4941func (s DeleteAssessmentRunInput) GoString() string { 4942 return s.String() 4943} 4944 4945// Validate inspects the fields of the type to determine if they are valid. 4946func (s *DeleteAssessmentRunInput) Validate() error { 4947 invalidParams := request.ErrInvalidParams{Context: "DeleteAssessmentRunInput"} 4948 if s.AssessmentRunArn == nil { 4949 invalidParams.Add(request.NewErrParamRequired("AssessmentRunArn")) 4950 } 4951 if s.AssessmentRunArn != nil && len(*s.AssessmentRunArn) < 1 { 4952 invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArn", 1)) 4953 } 4954 4955 if invalidParams.Len() > 0 { 4956 return invalidParams 4957 } 4958 return nil 4959} 4960 4961// SetAssessmentRunArn sets the AssessmentRunArn field's value. 4962func (s *DeleteAssessmentRunInput) SetAssessmentRunArn(v string) *DeleteAssessmentRunInput { 4963 s.AssessmentRunArn = &v 4964 return s 4965} 4966 4967// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentRunOutput 4968type DeleteAssessmentRunOutput struct { 4969 _ struct{} `type:"structure"` 4970} 4971 4972// String returns the string representation 4973func (s DeleteAssessmentRunOutput) String() string { 4974 return awsutil.Prettify(s) 4975} 4976 4977// GoString returns the string representation 4978func (s DeleteAssessmentRunOutput) GoString() string { 4979 return s.String() 4980} 4981 4982// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentTargetRequest 4983type DeleteAssessmentTargetInput struct { 4984 _ struct{} `type:"structure"` 4985 4986 // The ARN that specifies the assessment target that you want to delete. 4987 // 4988 // AssessmentTargetArn is a required field 4989 AssessmentTargetArn *string `locationName:"assessmentTargetArn" min:"1" type:"string" required:"true"` 4990} 4991 4992// String returns the string representation 4993func (s DeleteAssessmentTargetInput) String() string { 4994 return awsutil.Prettify(s) 4995} 4996 4997// GoString returns the string representation 4998func (s DeleteAssessmentTargetInput) GoString() string { 4999 return s.String() 5000} 5001 5002// Validate inspects the fields of the type to determine if they are valid. 5003func (s *DeleteAssessmentTargetInput) Validate() error { 5004 invalidParams := request.ErrInvalidParams{Context: "DeleteAssessmentTargetInput"} 5005 if s.AssessmentTargetArn == nil { 5006 invalidParams.Add(request.NewErrParamRequired("AssessmentTargetArn")) 5007 } 5008 if s.AssessmentTargetArn != nil && len(*s.AssessmentTargetArn) < 1 { 5009 invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetArn", 1)) 5010 } 5011 5012 if invalidParams.Len() > 0 { 5013 return invalidParams 5014 } 5015 return nil 5016} 5017 5018// SetAssessmentTargetArn sets the AssessmentTargetArn field's value. 5019func (s *DeleteAssessmentTargetInput) SetAssessmentTargetArn(v string) *DeleteAssessmentTargetInput { 5020 s.AssessmentTargetArn = &v 5021 return s 5022} 5023 5024// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentTargetOutput 5025type DeleteAssessmentTargetOutput struct { 5026 _ struct{} `type:"structure"` 5027} 5028 5029// String returns the string representation 5030func (s DeleteAssessmentTargetOutput) String() string { 5031 return awsutil.Prettify(s) 5032} 5033 5034// GoString returns the string representation 5035func (s DeleteAssessmentTargetOutput) GoString() string { 5036 return s.String() 5037} 5038 5039// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentTemplateRequest 5040type DeleteAssessmentTemplateInput struct { 5041 _ struct{} `type:"structure"` 5042 5043 // The ARN that specifies the assessment template that you want to delete. 5044 // 5045 // AssessmentTemplateArn is a required field 5046 AssessmentTemplateArn *string `locationName:"assessmentTemplateArn" min:"1" type:"string" required:"true"` 5047} 5048 5049// String returns the string representation 5050func (s DeleteAssessmentTemplateInput) String() string { 5051 return awsutil.Prettify(s) 5052} 5053 5054// GoString returns the string representation 5055func (s DeleteAssessmentTemplateInput) GoString() string { 5056 return s.String() 5057} 5058 5059// Validate inspects the fields of the type to determine if they are valid. 5060func (s *DeleteAssessmentTemplateInput) Validate() error { 5061 invalidParams := request.ErrInvalidParams{Context: "DeleteAssessmentTemplateInput"} 5062 if s.AssessmentTemplateArn == nil { 5063 invalidParams.Add(request.NewErrParamRequired("AssessmentTemplateArn")) 5064 } 5065 if s.AssessmentTemplateArn != nil && len(*s.AssessmentTemplateArn) < 1 { 5066 invalidParams.Add(request.NewErrParamMinLen("AssessmentTemplateArn", 1)) 5067 } 5068 5069 if invalidParams.Len() > 0 { 5070 return invalidParams 5071 } 5072 return nil 5073} 5074 5075// SetAssessmentTemplateArn sets the AssessmentTemplateArn field's value. 5076func (s *DeleteAssessmentTemplateInput) SetAssessmentTemplateArn(v string) *DeleteAssessmentTemplateInput { 5077 s.AssessmentTemplateArn = &v 5078 return s 5079} 5080 5081// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentTemplateOutput 5082type DeleteAssessmentTemplateOutput struct { 5083 _ struct{} `type:"structure"` 5084} 5085 5086// String returns the string representation 5087func (s DeleteAssessmentTemplateOutput) String() string { 5088 return awsutil.Prettify(s) 5089} 5090 5091// GoString returns the string representation 5092func (s DeleteAssessmentTemplateOutput) GoString() string { 5093 return s.String() 5094} 5095 5096// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentRunsRequest 5097type DescribeAssessmentRunsInput struct { 5098 _ struct{} `type:"structure"` 5099 5100 // The ARN that specifies the assessment run that you want to describe. 5101 // 5102 // AssessmentRunArns is a required field 5103 AssessmentRunArns []*string `locationName:"assessmentRunArns" min:"1" type:"list" required:"true"` 5104} 5105 5106// String returns the string representation 5107func (s DescribeAssessmentRunsInput) String() string { 5108 return awsutil.Prettify(s) 5109} 5110 5111// GoString returns the string representation 5112func (s DescribeAssessmentRunsInput) GoString() string { 5113 return s.String() 5114} 5115 5116// Validate inspects the fields of the type to determine if they are valid. 5117func (s *DescribeAssessmentRunsInput) Validate() error { 5118 invalidParams := request.ErrInvalidParams{Context: "DescribeAssessmentRunsInput"} 5119 if s.AssessmentRunArns == nil { 5120 invalidParams.Add(request.NewErrParamRequired("AssessmentRunArns")) 5121 } 5122 if s.AssessmentRunArns != nil && len(s.AssessmentRunArns) < 1 { 5123 invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArns", 1)) 5124 } 5125 5126 if invalidParams.Len() > 0 { 5127 return invalidParams 5128 } 5129 return nil 5130} 5131 5132// SetAssessmentRunArns sets the AssessmentRunArns field's value. 5133func (s *DescribeAssessmentRunsInput) SetAssessmentRunArns(v []*string) *DescribeAssessmentRunsInput { 5134 s.AssessmentRunArns = v 5135 return s 5136} 5137 5138// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentRunsResponse 5139type DescribeAssessmentRunsOutput struct { 5140 _ struct{} `type:"structure"` 5141 5142 // Information about the assessment run. 5143 // 5144 // AssessmentRuns is a required field 5145 AssessmentRuns []*AssessmentRun `locationName:"assessmentRuns" type:"list" required:"true"` 5146 5147 // Assessment run details that cannot be described. An error code is provided 5148 // for each failed item. 5149 // 5150 // FailedItems is a required field 5151 FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"` 5152} 5153 5154// String returns the string representation 5155func (s DescribeAssessmentRunsOutput) String() string { 5156 return awsutil.Prettify(s) 5157} 5158 5159// GoString returns the string representation 5160func (s DescribeAssessmentRunsOutput) GoString() string { 5161 return s.String() 5162} 5163 5164// SetAssessmentRuns sets the AssessmentRuns field's value. 5165func (s *DescribeAssessmentRunsOutput) SetAssessmentRuns(v []*AssessmentRun) *DescribeAssessmentRunsOutput { 5166 s.AssessmentRuns = v 5167 return s 5168} 5169 5170// SetFailedItems sets the FailedItems field's value. 5171func (s *DescribeAssessmentRunsOutput) SetFailedItems(v map[string]*FailedItemDetails) *DescribeAssessmentRunsOutput { 5172 s.FailedItems = v 5173 return s 5174} 5175 5176// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentTargetsRequest 5177type DescribeAssessmentTargetsInput struct { 5178 _ struct{} `type:"structure"` 5179 5180 // The ARNs that specifies the assessment targets that you want to describe. 5181 // 5182 // AssessmentTargetArns is a required field 5183 AssessmentTargetArns []*string `locationName:"assessmentTargetArns" min:"1" type:"list" required:"true"` 5184} 5185 5186// String returns the string representation 5187func (s DescribeAssessmentTargetsInput) String() string { 5188 return awsutil.Prettify(s) 5189} 5190 5191// GoString returns the string representation 5192func (s DescribeAssessmentTargetsInput) GoString() string { 5193 return s.String() 5194} 5195 5196// Validate inspects the fields of the type to determine if they are valid. 5197func (s *DescribeAssessmentTargetsInput) Validate() error { 5198 invalidParams := request.ErrInvalidParams{Context: "DescribeAssessmentTargetsInput"} 5199 if s.AssessmentTargetArns == nil { 5200 invalidParams.Add(request.NewErrParamRequired("AssessmentTargetArns")) 5201 } 5202 if s.AssessmentTargetArns != nil && len(s.AssessmentTargetArns) < 1 { 5203 invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetArns", 1)) 5204 } 5205 5206 if invalidParams.Len() > 0 { 5207 return invalidParams 5208 } 5209 return nil 5210} 5211 5212// SetAssessmentTargetArns sets the AssessmentTargetArns field's value. 5213func (s *DescribeAssessmentTargetsInput) SetAssessmentTargetArns(v []*string) *DescribeAssessmentTargetsInput { 5214 s.AssessmentTargetArns = v 5215 return s 5216} 5217 5218// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentTargetsResponse 5219type DescribeAssessmentTargetsOutput struct { 5220 _ struct{} `type:"structure"` 5221 5222 // Information about the assessment targets. 5223 // 5224 // AssessmentTargets is a required field 5225 AssessmentTargets []*AssessmentTarget `locationName:"assessmentTargets" type:"list" required:"true"` 5226 5227 // Assessment target details that cannot be described. An error code is provided 5228 // for each failed item. 5229 // 5230 // FailedItems is a required field 5231 FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"` 5232} 5233 5234// String returns the string representation 5235func (s DescribeAssessmentTargetsOutput) String() string { 5236 return awsutil.Prettify(s) 5237} 5238 5239// GoString returns the string representation 5240func (s DescribeAssessmentTargetsOutput) GoString() string { 5241 return s.String() 5242} 5243 5244// SetAssessmentTargets sets the AssessmentTargets field's value. 5245func (s *DescribeAssessmentTargetsOutput) SetAssessmentTargets(v []*AssessmentTarget) *DescribeAssessmentTargetsOutput { 5246 s.AssessmentTargets = v 5247 return s 5248} 5249 5250// SetFailedItems sets the FailedItems field's value. 5251func (s *DescribeAssessmentTargetsOutput) SetFailedItems(v map[string]*FailedItemDetails) *DescribeAssessmentTargetsOutput { 5252 s.FailedItems = v 5253 return s 5254} 5255 5256// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentTemplatesRequest 5257type DescribeAssessmentTemplatesInput struct { 5258 _ struct{} `type:"structure"` 5259 5260 // AssessmentTemplateArns is a required field 5261 AssessmentTemplateArns []*string `locationName:"assessmentTemplateArns" min:"1" type:"list" required:"true"` 5262} 5263 5264// String returns the string representation 5265func (s DescribeAssessmentTemplatesInput) String() string { 5266 return awsutil.Prettify(s) 5267} 5268 5269// GoString returns the string representation 5270func (s DescribeAssessmentTemplatesInput) GoString() string { 5271 return s.String() 5272} 5273 5274// Validate inspects the fields of the type to determine if they are valid. 5275func (s *DescribeAssessmentTemplatesInput) Validate() error { 5276 invalidParams := request.ErrInvalidParams{Context: "DescribeAssessmentTemplatesInput"} 5277 if s.AssessmentTemplateArns == nil { 5278 invalidParams.Add(request.NewErrParamRequired("AssessmentTemplateArns")) 5279 } 5280 if s.AssessmentTemplateArns != nil && len(s.AssessmentTemplateArns) < 1 { 5281 invalidParams.Add(request.NewErrParamMinLen("AssessmentTemplateArns", 1)) 5282 } 5283 5284 if invalidParams.Len() > 0 { 5285 return invalidParams 5286 } 5287 return nil 5288} 5289 5290// SetAssessmentTemplateArns sets the AssessmentTemplateArns field's value. 5291func (s *DescribeAssessmentTemplatesInput) SetAssessmentTemplateArns(v []*string) *DescribeAssessmentTemplatesInput { 5292 s.AssessmentTemplateArns = v 5293 return s 5294} 5295 5296// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentTemplatesResponse 5297type DescribeAssessmentTemplatesOutput struct { 5298 _ struct{} `type:"structure"` 5299 5300 // Information about the assessment templates. 5301 // 5302 // AssessmentTemplates is a required field 5303 AssessmentTemplates []*AssessmentTemplate `locationName:"assessmentTemplates" type:"list" required:"true"` 5304 5305 // Assessment template details that cannot be described. An error code is provided 5306 // for each failed item. 5307 // 5308 // FailedItems is a required field 5309 FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"` 5310} 5311 5312// String returns the string representation 5313func (s DescribeAssessmentTemplatesOutput) String() string { 5314 return awsutil.Prettify(s) 5315} 5316 5317// GoString returns the string representation 5318func (s DescribeAssessmentTemplatesOutput) GoString() string { 5319 return s.String() 5320} 5321 5322// SetAssessmentTemplates sets the AssessmentTemplates field's value. 5323func (s *DescribeAssessmentTemplatesOutput) SetAssessmentTemplates(v []*AssessmentTemplate) *DescribeAssessmentTemplatesOutput { 5324 s.AssessmentTemplates = v 5325 return s 5326} 5327 5328// SetFailedItems sets the FailedItems field's value. 5329func (s *DescribeAssessmentTemplatesOutput) SetFailedItems(v map[string]*FailedItemDetails) *DescribeAssessmentTemplatesOutput { 5330 s.FailedItems = v 5331 return s 5332} 5333 5334// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeCrossAccountAccessRoleInput 5335type DescribeCrossAccountAccessRoleInput struct { 5336 _ struct{} `type:"structure"` 5337} 5338 5339// String returns the string representation 5340func (s DescribeCrossAccountAccessRoleInput) String() string { 5341 return awsutil.Prettify(s) 5342} 5343 5344// GoString returns the string representation 5345func (s DescribeCrossAccountAccessRoleInput) GoString() string { 5346 return s.String() 5347} 5348 5349// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeCrossAccountAccessRoleResponse 5350type DescribeCrossAccountAccessRoleOutput struct { 5351 _ struct{} `type:"structure"` 5352 5353 // The date when the cross-account access role was registered. 5354 // 5355 // RegisteredAt is a required field 5356 RegisteredAt *time.Time `locationName:"registeredAt" type:"timestamp" timestampFormat:"unix" required:"true"` 5357 5358 // The ARN that specifies the IAM role that Amazon Inspector uses to access 5359 // your AWS account. 5360 // 5361 // RoleArn is a required field 5362 RoleArn *string `locationName:"roleArn" min:"1" type:"string" required:"true"` 5363 5364 // A Boolean value that specifies whether the IAM role has the necessary policies 5365 // attached to enable Amazon Inspector to access your AWS account. 5366 // 5367 // Valid is a required field 5368 Valid *bool `locationName:"valid" type:"boolean" required:"true"` 5369} 5370 5371// String returns the string representation 5372func (s DescribeCrossAccountAccessRoleOutput) String() string { 5373 return awsutil.Prettify(s) 5374} 5375 5376// GoString returns the string representation 5377func (s DescribeCrossAccountAccessRoleOutput) GoString() string { 5378 return s.String() 5379} 5380 5381// SetRegisteredAt sets the RegisteredAt field's value. 5382func (s *DescribeCrossAccountAccessRoleOutput) SetRegisteredAt(v time.Time) *DescribeCrossAccountAccessRoleOutput { 5383 s.RegisteredAt = &v 5384 return s 5385} 5386 5387// SetRoleArn sets the RoleArn field's value. 5388func (s *DescribeCrossAccountAccessRoleOutput) SetRoleArn(v string) *DescribeCrossAccountAccessRoleOutput { 5389 s.RoleArn = &v 5390 return s 5391} 5392 5393// SetValid sets the Valid field's value. 5394func (s *DescribeCrossAccountAccessRoleOutput) SetValid(v bool) *DescribeCrossAccountAccessRoleOutput { 5395 s.Valid = &v 5396 return s 5397} 5398 5399// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeFindingsRequest 5400type DescribeFindingsInput struct { 5401 _ struct{} `type:"structure"` 5402 5403 // The ARN that specifies the finding that you want to describe. 5404 // 5405 // FindingArns is a required field 5406 FindingArns []*string `locationName:"findingArns" min:"1" type:"list" required:"true"` 5407 5408 // The locale into which you want to translate a finding description, recommendation, 5409 // and the short description that identifies the finding. 5410 Locale *string `locationName:"locale" type:"string" enum:"Locale"` 5411} 5412 5413// String returns the string representation 5414func (s DescribeFindingsInput) String() string { 5415 return awsutil.Prettify(s) 5416} 5417 5418// GoString returns the string representation 5419func (s DescribeFindingsInput) GoString() string { 5420 return s.String() 5421} 5422 5423// Validate inspects the fields of the type to determine if they are valid. 5424func (s *DescribeFindingsInput) Validate() error { 5425 invalidParams := request.ErrInvalidParams{Context: "DescribeFindingsInput"} 5426 if s.FindingArns == nil { 5427 invalidParams.Add(request.NewErrParamRequired("FindingArns")) 5428 } 5429 if s.FindingArns != nil && len(s.FindingArns) < 1 { 5430 invalidParams.Add(request.NewErrParamMinLen("FindingArns", 1)) 5431 } 5432 5433 if invalidParams.Len() > 0 { 5434 return invalidParams 5435 } 5436 return nil 5437} 5438 5439// SetFindingArns sets the FindingArns field's value. 5440func (s *DescribeFindingsInput) SetFindingArns(v []*string) *DescribeFindingsInput { 5441 s.FindingArns = v 5442 return s 5443} 5444 5445// SetLocale sets the Locale field's value. 5446func (s *DescribeFindingsInput) SetLocale(v string) *DescribeFindingsInput { 5447 s.Locale = &v 5448 return s 5449} 5450 5451// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeFindingsResponse 5452type DescribeFindingsOutput struct { 5453 _ struct{} `type:"structure"` 5454 5455 // Finding details that cannot be described. An error code is provided for each 5456 // failed item. 5457 // 5458 // FailedItems is a required field 5459 FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"` 5460 5461 // Information about the finding. 5462 // 5463 // Findings is a required field 5464 Findings []*Finding `locationName:"findings" type:"list" required:"true"` 5465} 5466 5467// String returns the string representation 5468func (s DescribeFindingsOutput) String() string { 5469 return awsutil.Prettify(s) 5470} 5471 5472// GoString returns the string representation 5473func (s DescribeFindingsOutput) GoString() string { 5474 return s.String() 5475} 5476 5477// SetFailedItems sets the FailedItems field's value. 5478func (s *DescribeFindingsOutput) SetFailedItems(v map[string]*FailedItemDetails) *DescribeFindingsOutput { 5479 s.FailedItems = v 5480 return s 5481} 5482 5483// SetFindings sets the Findings field's value. 5484func (s *DescribeFindingsOutput) SetFindings(v []*Finding) *DescribeFindingsOutput { 5485 s.Findings = v 5486 return s 5487} 5488 5489// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeResourceGroupsRequest 5490type DescribeResourceGroupsInput struct { 5491 _ struct{} `type:"structure"` 5492 5493 // The ARN that specifies the resource group that you want to describe. 5494 // 5495 // ResourceGroupArns is a required field 5496 ResourceGroupArns []*string `locationName:"resourceGroupArns" min:"1" type:"list" required:"true"` 5497} 5498 5499// String returns the string representation 5500func (s DescribeResourceGroupsInput) String() string { 5501 return awsutil.Prettify(s) 5502} 5503 5504// GoString returns the string representation 5505func (s DescribeResourceGroupsInput) GoString() string { 5506 return s.String() 5507} 5508 5509// Validate inspects the fields of the type to determine if they are valid. 5510func (s *DescribeResourceGroupsInput) Validate() error { 5511 invalidParams := request.ErrInvalidParams{Context: "DescribeResourceGroupsInput"} 5512 if s.ResourceGroupArns == nil { 5513 invalidParams.Add(request.NewErrParamRequired("ResourceGroupArns")) 5514 } 5515 if s.ResourceGroupArns != nil && len(s.ResourceGroupArns) < 1 { 5516 invalidParams.Add(request.NewErrParamMinLen("ResourceGroupArns", 1)) 5517 } 5518 5519 if invalidParams.Len() > 0 { 5520 return invalidParams 5521 } 5522 return nil 5523} 5524 5525// SetResourceGroupArns sets the ResourceGroupArns field's value. 5526func (s *DescribeResourceGroupsInput) SetResourceGroupArns(v []*string) *DescribeResourceGroupsInput { 5527 s.ResourceGroupArns = v 5528 return s 5529} 5530 5531// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeResourceGroupsResponse 5532type DescribeResourceGroupsOutput struct { 5533 _ struct{} `type:"structure"` 5534 5535 // Resource group details that cannot be described. An error code is provided 5536 // for each failed item. 5537 // 5538 // FailedItems is a required field 5539 FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"` 5540 5541 // Information about a resource group. 5542 // 5543 // ResourceGroups is a required field 5544 ResourceGroups []*ResourceGroup `locationName:"resourceGroups" type:"list" required:"true"` 5545} 5546 5547// String returns the string representation 5548func (s DescribeResourceGroupsOutput) String() string { 5549 return awsutil.Prettify(s) 5550} 5551 5552// GoString returns the string representation 5553func (s DescribeResourceGroupsOutput) GoString() string { 5554 return s.String() 5555} 5556 5557// SetFailedItems sets the FailedItems field's value. 5558func (s *DescribeResourceGroupsOutput) SetFailedItems(v map[string]*FailedItemDetails) *DescribeResourceGroupsOutput { 5559 s.FailedItems = v 5560 return s 5561} 5562 5563// SetResourceGroups sets the ResourceGroups field's value. 5564func (s *DescribeResourceGroupsOutput) SetResourceGroups(v []*ResourceGroup) *DescribeResourceGroupsOutput { 5565 s.ResourceGroups = v 5566 return s 5567} 5568 5569// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeRulesPackagesRequest 5570type DescribeRulesPackagesInput struct { 5571 _ struct{} `type:"structure"` 5572 5573 // The locale that you want to translate a rules package description into. 5574 Locale *string `locationName:"locale" type:"string" enum:"Locale"` 5575 5576 // The ARN that specifies the rules package that you want to describe. 5577 // 5578 // RulesPackageArns is a required field 5579 RulesPackageArns []*string `locationName:"rulesPackageArns" min:"1" type:"list" required:"true"` 5580} 5581 5582// String returns the string representation 5583func (s DescribeRulesPackagesInput) String() string { 5584 return awsutil.Prettify(s) 5585} 5586 5587// GoString returns the string representation 5588func (s DescribeRulesPackagesInput) GoString() string { 5589 return s.String() 5590} 5591 5592// Validate inspects the fields of the type to determine if they are valid. 5593func (s *DescribeRulesPackagesInput) Validate() error { 5594 invalidParams := request.ErrInvalidParams{Context: "DescribeRulesPackagesInput"} 5595 if s.RulesPackageArns == nil { 5596 invalidParams.Add(request.NewErrParamRequired("RulesPackageArns")) 5597 } 5598 if s.RulesPackageArns != nil && len(s.RulesPackageArns) < 1 { 5599 invalidParams.Add(request.NewErrParamMinLen("RulesPackageArns", 1)) 5600 } 5601 5602 if invalidParams.Len() > 0 { 5603 return invalidParams 5604 } 5605 return nil 5606} 5607 5608// SetLocale sets the Locale field's value. 5609func (s *DescribeRulesPackagesInput) SetLocale(v string) *DescribeRulesPackagesInput { 5610 s.Locale = &v 5611 return s 5612} 5613 5614// SetRulesPackageArns sets the RulesPackageArns field's value. 5615func (s *DescribeRulesPackagesInput) SetRulesPackageArns(v []*string) *DescribeRulesPackagesInput { 5616 s.RulesPackageArns = v 5617 return s 5618} 5619 5620// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeRulesPackagesResponse 5621type DescribeRulesPackagesOutput struct { 5622 _ struct{} `type:"structure"` 5623 5624 // Rules package details that cannot be described. An error code is provided 5625 // for each failed item. 5626 // 5627 // FailedItems is a required field 5628 FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"` 5629 5630 // Information about the rules package. 5631 // 5632 // RulesPackages is a required field 5633 RulesPackages []*RulesPackage `locationName:"rulesPackages" type:"list" required:"true"` 5634} 5635 5636// String returns the string representation 5637func (s DescribeRulesPackagesOutput) String() string { 5638 return awsutil.Prettify(s) 5639} 5640 5641// GoString returns the string representation 5642func (s DescribeRulesPackagesOutput) GoString() string { 5643 return s.String() 5644} 5645 5646// SetFailedItems sets the FailedItems field's value. 5647func (s *DescribeRulesPackagesOutput) SetFailedItems(v map[string]*FailedItemDetails) *DescribeRulesPackagesOutput { 5648 s.FailedItems = v 5649 return s 5650} 5651 5652// SetRulesPackages sets the RulesPackages field's value. 5653func (s *DescribeRulesPackagesOutput) SetRulesPackages(v []*RulesPackage) *DescribeRulesPackagesOutput { 5654 s.RulesPackages = v 5655 return s 5656} 5657 5658// This data type is used in the AssessmentTemplateFilter data type. 5659// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DurationRange 5660type DurationRange struct { 5661 _ struct{} `type:"structure"` 5662 5663 // The maximum value of the duration range. Must be less than or equal to 604800 5664 // seconds (1 week). 5665 MaxSeconds *int64 `locationName:"maxSeconds" min:"180" type:"integer"` 5666 5667 // The minimum value of the duration range. Must be greater than zero. 5668 MinSeconds *int64 `locationName:"minSeconds" min:"180" type:"integer"` 5669} 5670 5671// String returns the string representation 5672func (s DurationRange) String() string { 5673 return awsutil.Prettify(s) 5674} 5675 5676// GoString returns the string representation 5677func (s DurationRange) GoString() string { 5678 return s.String() 5679} 5680 5681// Validate inspects the fields of the type to determine if they are valid. 5682func (s *DurationRange) Validate() error { 5683 invalidParams := request.ErrInvalidParams{Context: "DurationRange"} 5684 if s.MaxSeconds != nil && *s.MaxSeconds < 180 { 5685 invalidParams.Add(request.NewErrParamMinValue("MaxSeconds", 180)) 5686 } 5687 if s.MinSeconds != nil && *s.MinSeconds < 180 { 5688 invalidParams.Add(request.NewErrParamMinValue("MinSeconds", 180)) 5689 } 5690 5691 if invalidParams.Len() > 0 { 5692 return invalidParams 5693 } 5694 return nil 5695} 5696 5697// SetMaxSeconds sets the MaxSeconds field's value. 5698func (s *DurationRange) SetMaxSeconds(v int64) *DurationRange { 5699 s.MaxSeconds = &v 5700 return s 5701} 5702 5703// SetMinSeconds sets the MinSeconds field's value. 5704func (s *DurationRange) SetMinSeconds(v int64) *DurationRange { 5705 s.MinSeconds = &v 5706 return s 5707} 5708 5709// This data type is used in the Subscription data type. 5710// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/EventSubscription 5711type EventSubscription struct { 5712 _ struct{} `type:"structure"` 5713 5714 // The event for which Amazon Simple Notification Service (SNS) notifications 5715 // are sent. 5716 // 5717 // Event is a required field 5718 Event *string `locationName:"event" type:"string" required:"true" enum:"Event"` 5719 5720 // The time at which SubscribeToEvent is called. 5721 // 5722 // SubscribedAt is a required field 5723 SubscribedAt *time.Time `locationName:"subscribedAt" type:"timestamp" timestampFormat:"unix" required:"true"` 5724} 5725 5726// String returns the string representation 5727func (s EventSubscription) String() string { 5728 return awsutil.Prettify(s) 5729} 5730 5731// GoString returns the string representation 5732func (s EventSubscription) GoString() string { 5733 return s.String() 5734} 5735 5736// SetEvent sets the Event field's value. 5737func (s *EventSubscription) SetEvent(v string) *EventSubscription { 5738 s.Event = &v 5739 return s 5740} 5741 5742// SetSubscribedAt sets the SubscribedAt field's value. 5743func (s *EventSubscription) SetSubscribedAt(v time.Time) *EventSubscription { 5744 s.SubscribedAt = &v 5745 return s 5746} 5747 5748// Includes details about the failed items. 5749// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/FailedItemDetails 5750type FailedItemDetails struct { 5751 _ struct{} `type:"structure"` 5752 5753 // The status code of a failed item. 5754 // 5755 // FailureCode is a required field 5756 FailureCode *string `locationName:"failureCode" type:"string" required:"true" enum:"FailedItemErrorCode"` 5757 5758 // Indicates whether you can immediately retry a request for this item for a 5759 // specified resource. 5760 // 5761 // Retryable is a required field 5762 Retryable *bool `locationName:"retryable" type:"boolean" required:"true"` 5763} 5764 5765// String returns the string representation 5766func (s FailedItemDetails) String() string { 5767 return awsutil.Prettify(s) 5768} 5769 5770// GoString returns the string representation 5771func (s FailedItemDetails) GoString() string { 5772 return s.String() 5773} 5774 5775// SetFailureCode sets the FailureCode field's value. 5776func (s *FailedItemDetails) SetFailureCode(v string) *FailedItemDetails { 5777 s.FailureCode = &v 5778 return s 5779} 5780 5781// SetRetryable sets the Retryable field's value. 5782func (s *FailedItemDetails) SetRetryable(v bool) *FailedItemDetails { 5783 s.Retryable = &v 5784 return s 5785} 5786 5787// Contains information about an Amazon Inspector finding. This data type is 5788// used as the response element in the DescribeFindings action. 5789// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/Finding 5790type Finding struct { 5791 _ struct{} `type:"structure"` 5792 5793 // The ARN that specifies the finding. 5794 // 5795 // Arn is a required field 5796 Arn *string `locationName:"arn" min:"1" type:"string" required:"true"` 5797 5798 // A collection of attributes of the host from which the finding is generated. 5799 AssetAttributes *AssetAttributes `locationName:"assetAttributes" type:"structure"` 5800 5801 // The type of the host from which the finding is generated. 5802 AssetType *string `locationName:"assetType" type:"string" enum:"AssetType"` 5803 5804 // The system-defined attributes for the finding. 5805 // 5806 // Attributes is a required field 5807 Attributes []*Attribute `locationName:"attributes" type:"list" required:"true"` 5808 5809 // This data element is currently not used. 5810 Confidence *int64 `locationName:"confidence" type:"integer"` 5811 5812 // The time when the finding was generated. 5813 // 5814 // CreatedAt is a required field 5815 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"` 5816 5817 // The description of the finding. 5818 Description *string `locationName:"description" type:"string"` 5819 5820 // The ID of the finding. 5821 Id *string `locationName:"id" type:"string"` 5822 5823 // This data element is currently not used. 5824 IndicatorOfCompromise *bool `locationName:"indicatorOfCompromise" type:"boolean"` 5825 5826 // The numeric value of the finding severity. 5827 NumericSeverity *float64 `locationName:"numericSeverity" type:"double"` 5828 5829 // The recommendation for the finding. 5830 Recommendation *string `locationName:"recommendation" type:"string"` 5831 5832 // The schema version of this data type. 5833 SchemaVersion *int64 `locationName:"schemaVersion" type:"integer"` 5834 5835 // The data element is set to "Inspector". 5836 Service *string `locationName:"service" type:"string"` 5837 5838 // This data type is used in the Finding data type. 5839 ServiceAttributes *ServiceAttributes `locationName:"serviceAttributes" type:"structure"` 5840 5841 // The finding severity. Values can be set to High, Medium, Low, and Informational. 5842 Severity *string `locationName:"severity" type:"string" enum:"Severity"` 5843 5844 // The name of the finding. 5845 Title *string `locationName:"title" type:"string"` 5846 5847 // The time when AddAttributesToFindings is called. 5848 // 5849 // UpdatedAt is a required field 5850 UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"unix" required:"true"` 5851 5852 // The user-defined attributes that are assigned to the finding. 5853 // 5854 // UserAttributes is a required field 5855 UserAttributes []*Attribute `locationName:"userAttributes" type:"list" required:"true"` 5856} 5857 5858// String returns the string representation 5859func (s Finding) String() string { 5860 return awsutil.Prettify(s) 5861} 5862 5863// GoString returns the string representation 5864func (s Finding) GoString() string { 5865 return s.String() 5866} 5867 5868// SetArn sets the Arn field's value. 5869func (s *Finding) SetArn(v string) *Finding { 5870 s.Arn = &v 5871 return s 5872} 5873 5874// SetAssetAttributes sets the AssetAttributes field's value. 5875func (s *Finding) SetAssetAttributes(v *AssetAttributes) *Finding { 5876 s.AssetAttributes = v 5877 return s 5878} 5879 5880// SetAssetType sets the AssetType field's value. 5881func (s *Finding) SetAssetType(v string) *Finding { 5882 s.AssetType = &v 5883 return s 5884} 5885 5886// SetAttributes sets the Attributes field's value. 5887func (s *Finding) SetAttributes(v []*Attribute) *Finding { 5888 s.Attributes = v 5889 return s 5890} 5891 5892// SetConfidence sets the Confidence field's value. 5893func (s *Finding) SetConfidence(v int64) *Finding { 5894 s.Confidence = &v 5895 return s 5896} 5897 5898// SetCreatedAt sets the CreatedAt field's value. 5899func (s *Finding) SetCreatedAt(v time.Time) *Finding { 5900 s.CreatedAt = &v 5901 return s 5902} 5903 5904// SetDescription sets the Description field's value. 5905func (s *Finding) SetDescription(v string) *Finding { 5906 s.Description = &v 5907 return s 5908} 5909 5910// SetId sets the Id field's value. 5911func (s *Finding) SetId(v string) *Finding { 5912 s.Id = &v 5913 return s 5914} 5915 5916// SetIndicatorOfCompromise sets the IndicatorOfCompromise field's value. 5917func (s *Finding) SetIndicatorOfCompromise(v bool) *Finding { 5918 s.IndicatorOfCompromise = &v 5919 return s 5920} 5921 5922// SetNumericSeverity sets the NumericSeverity field's value. 5923func (s *Finding) SetNumericSeverity(v float64) *Finding { 5924 s.NumericSeverity = &v 5925 return s 5926} 5927 5928// SetRecommendation sets the Recommendation field's value. 5929func (s *Finding) SetRecommendation(v string) *Finding { 5930 s.Recommendation = &v 5931 return s 5932} 5933 5934// SetSchemaVersion sets the SchemaVersion field's value. 5935func (s *Finding) SetSchemaVersion(v int64) *Finding { 5936 s.SchemaVersion = &v 5937 return s 5938} 5939 5940// SetService sets the Service field's value. 5941func (s *Finding) SetService(v string) *Finding { 5942 s.Service = &v 5943 return s 5944} 5945 5946// SetServiceAttributes sets the ServiceAttributes field's value. 5947func (s *Finding) SetServiceAttributes(v *ServiceAttributes) *Finding { 5948 s.ServiceAttributes = v 5949 return s 5950} 5951 5952// SetSeverity sets the Severity field's value. 5953func (s *Finding) SetSeverity(v string) *Finding { 5954 s.Severity = &v 5955 return s 5956} 5957 5958// SetTitle sets the Title field's value. 5959func (s *Finding) SetTitle(v string) *Finding { 5960 s.Title = &v 5961 return s 5962} 5963 5964// SetUpdatedAt sets the UpdatedAt field's value. 5965func (s *Finding) SetUpdatedAt(v time.Time) *Finding { 5966 s.UpdatedAt = &v 5967 return s 5968} 5969 5970// SetUserAttributes sets the UserAttributes field's value. 5971func (s *Finding) SetUserAttributes(v []*Attribute) *Finding { 5972 s.UserAttributes = v 5973 return s 5974} 5975 5976// This data type is used as a request parameter in the ListFindings action. 5977// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/FindingFilter 5978type FindingFilter struct { 5979 _ struct{} `type:"structure"` 5980 5981 // For a record to match a filter, one of the values that is specified for this 5982 // data type property must be the exact match of the value of the agentId property 5983 // of the Finding data type. 5984 AgentIds []*string `locationName:"agentIds" type:"list"` 5985 5986 // For a record to match a filter, the list of values that are specified for 5987 // this data type property must be contained in the list of values of the attributes 5988 // property of the Finding data type. 5989 Attributes []*Attribute `locationName:"attributes" type:"list"` 5990 5991 // For a record to match a filter, one of the values that is specified for this 5992 // data type property must be the exact match of the value of the autoScalingGroup 5993 // property of the Finding data type. 5994 AutoScalingGroups []*string `locationName:"autoScalingGroups" type:"list"` 5995 5996 // The time range during which the finding is generated. 5997 CreationTimeRange *TimestampRange `locationName:"creationTimeRange" type:"structure"` 5998 5999 // For a record to match a filter, one of the values that is specified for this 6000 // data type property must be the exact match of the value of the ruleName property 6001 // of the Finding data type. 6002 RuleNames []*string `locationName:"ruleNames" type:"list"` 6003 6004 // For a record to match a filter, one of the values that is specified for this 6005 // data type property must be the exact match of the value of the rulesPackageArn 6006 // property of the Finding data type. 6007 RulesPackageArns []*string `locationName:"rulesPackageArns" type:"list"` 6008 6009 // For a record to match a filter, one of the values that is specified for this 6010 // data type property must be the exact match of the value of the severity property 6011 // of the Finding data type. 6012 Severities []*string `locationName:"severities" type:"list"` 6013 6014 // For a record to match a filter, the value that is specified for this data 6015 // type property must be contained in the list of values of the userAttributes 6016 // property of the Finding data type. 6017 UserAttributes []*Attribute `locationName:"userAttributes" type:"list"` 6018} 6019 6020// String returns the string representation 6021func (s FindingFilter) String() string { 6022 return awsutil.Prettify(s) 6023} 6024 6025// GoString returns the string representation 6026func (s FindingFilter) GoString() string { 6027 return s.String() 6028} 6029 6030// Validate inspects the fields of the type to determine if they are valid. 6031func (s *FindingFilter) Validate() error { 6032 invalidParams := request.ErrInvalidParams{Context: "FindingFilter"} 6033 if s.Attributes != nil { 6034 for i, v := range s.Attributes { 6035 if v == nil { 6036 continue 6037 } 6038 if err := v.Validate(); err != nil { 6039 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams)) 6040 } 6041 } 6042 } 6043 if s.UserAttributes != nil { 6044 for i, v := range s.UserAttributes { 6045 if v == nil { 6046 continue 6047 } 6048 if err := v.Validate(); err != nil { 6049 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "UserAttributes", i), err.(request.ErrInvalidParams)) 6050 } 6051 } 6052 } 6053 6054 if invalidParams.Len() > 0 { 6055 return invalidParams 6056 } 6057 return nil 6058} 6059 6060// SetAgentIds sets the AgentIds field's value. 6061func (s *FindingFilter) SetAgentIds(v []*string) *FindingFilter { 6062 s.AgentIds = v 6063 return s 6064} 6065 6066// SetAttributes sets the Attributes field's value. 6067func (s *FindingFilter) SetAttributes(v []*Attribute) *FindingFilter { 6068 s.Attributes = v 6069 return s 6070} 6071 6072// SetAutoScalingGroups sets the AutoScalingGroups field's value. 6073func (s *FindingFilter) SetAutoScalingGroups(v []*string) *FindingFilter { 6074 s.AutoScalingGroups = v 6075 return s 6076} 6077 6078// SetCreationTimeRange sets the CreationTimeRange field's value. 6079func (s *FindingFilter) SetCreationTimeRange(v *TimestampRange) *FindingFilter { 6080 s.CreationTimeRange = v 6081 return s 6082} 6083 6084// SetRuleNames sets the RuleNames field's value. 6085func (s *FindingFilter) SetRuleNames(v []*string) *FindingFilter { 6086 s.RuleNames = v 6087 return s 6088} 6089 6090// SetRulesPackageArns sets the RulesPackageArns field's value. 6091func (s *FindingFilter) SetRulesPackageArns(v []*string) *FindingFilter { 6092 s.RulesPackageArns = v 6093 return s 6094} 6095 6096// SetSeverities sets the Severities field's value. 6097func (s *FindingFilter) SetSeverities(v []*string) *FindingFilter { 6098 s.Severities = v 6099 return s 6100} 6101 6102// SetUserAttributes sets the UserAttributes field's value. 6103func (s *FindingFilter) SetUserAttributes(v []*Attribute) *FindingFilter { 6104 s.UserAttributes = v 6105 return s 6106} 6107 6108// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetAssessmentReportRequest 6109type GetAssessmentReportInput struct { 6110 _ struct{} `type:"structure"` 6111 6112 // The ARN that specifies the assessment run for which you want to generate 6113 // a report. 6114 // 6115 // AssessmentRunArn is a required field 6116 AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"` 6117 6118 // Specifies the file format (html or pdf) of the assessment report that you 6119 // want to generate. 6120 // 6121 // ReportFileFormat is a required field 6122 ReportFileFormat *string `locationName:"reportFileFormat" type:"string" required:"true" enum:"ReportFileFormat"` 6123 6124 // Specifies the type of the assessment report that you want to generate. There 6125 // are two types of assessment reports: a finding report and a full report. 6126 // For more information, see Assessment Reports (http://docs.aws.amazon.com/inspector/latest/userguide/inspector_reports.html). 6127 // 6128 // ReportType is a required field 6129 ReportType *string `locationName:"reportType" type:"string" required:"true" enum:"ReportType"` 6130} 6131 6132// String returns the string representation 6133func (s GetAssessmentReportInput) String() string { 6134 return awsutil.Prettify(s) 6135} 6136 6137// GoString returns the string representation 6138func (s GetAssessmentReportInput) GoString() string { 6139 return s.String() 6140} 6141 6142// Validate inspects the fields of the type to determine if they are valid. 6143func (s *GetAssessmentReportInput) Validate() error { 6144 invalidParams := request.ErrInvalidParams{Context: "GetAssessmentReportInput"} 6145 if s.AssessmentRunArn == nil { 6146 invalidParams.Add(request.NewErrParamRequired("AssessmentRunArn")) 6147 } 6148 if s.AssessmentRunArn != nil && len(*s.AssessmentRunArn) < 1 { 6149 invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArn", 1)) 6150 } 6151 if s.ReportFileFormat == nil { 6152 invalidParams.Add(request.NewErrParamRequired("ReportFileFormat")) 6153 } 6154 if s.ReportType == nil { 6155 invalidParams.Add(request.NewErrParamRequired("ReportType")) 6156 } 6157 6158 if invalidParams.Len() > 0 { 6159 return invalidParams 6160 } 6161 return nil 6162} 6163 6164// SetAssessmentRunArn sets the AssessmentRunArn field's value. 6165func (s *GetAssessmentReportInput) SetAssessmentRunArn(v string) *GetAssessmentReportInput { 6166 s.AssessmentRunArn = &v 6167 return s 6168} 6169 6170// SetReportFileFormat sets the ReportFileFormat field's value. 6171func (s *GetAssessmentReportInput) SetReportFileFormat(v string) *GetAssessmentReportInput { 6172 s.ReportFileFormat = &v 6173 return s 6174} 6175 6176// SetReportType sets the ReportType field's value. 6177func (s *GetAssessmentReportInput) SetReportType(v string) *GetAssessmentReportInput { 6178 s.ReportType = &v 6179 return s 6180} 6181 6182// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetAssessmentReportResponse 6183type GetAssessmentReportOutput struct { 6184 _ struct{} `type:"structure"` 6185 6186 // Specifies the status of the request to generate an assessment report. 6187 // 6188 // Status is a required field 6189 Status *string `locationName:"status" type:"string" required:"true" enum:"ReportStatus"` 6190 6191 // Specifies the URL where you can find the generated assessment report. This 6192 // parameter is only returned if the report is successfully generated. 6193 Url *string `locationName:"url" type:"string"` 6194} 6195 6196// String returns the string representation 6197func (s GetAssessmentReportOutput) String() string { 6198 return awsutil.Prettify(s) 6199} 6200 6201// GoString returns the string representation 6202func (s GetAssessmentReportOutput) GoString() string { 6203 return s.String() 6204} 6205 6206// SetStatus sets the Status field's value. 6207func (s *GetAssessmentReportOutput) SetStatus(v string) *GetAssessmentReportOutput { 6208 s.Status = &v 6209 return s 6210} 6211 6212// SetUrl sets the Url field's value. 6213func (s *GetAssessmentReportOutput) SetUrl(v string) *GetAssessmentReportOutput { 6214 s.Url = &v 6215 return s 6216} 6217 6218// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetTelemetryMetadataRequest 6219type GetTelemetryMetadataInput struct { 6220 _ struct{} `type:"structure"` 6221 6222 // The ARN that specifies the assessment run that has the telemetry data that 6223 // you want to obtain. 6224 // 6225 // AssessmentRunArn is a required field 6226 AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"` 6227} 6228 6229// String returns the string representation 6230func (s GetTelemetryMetadataInput) String() string { 6231 return awsutil.Prettify(s) 6232} 6233 6234// GoString returns the string representation 6235func (s GetTelemetryMetadataInput) GoString() string { 6236 return s.String() 6237} 6238 6239// Validate inspects the fields of the type to determine if they are valid. 6240func (s *GetTelemetryMetadataInput) Validate() error { 6241 invalidParams := request.ErrInvalidParams{Context: "GetTelemetryMetadataInput"} 6242 if s.AssessmentRunArn == nil { 6243 invalidParams.Add(request.NewErrParamRequired("AssessmentRunArn")) 6244 } 6245 if s.AssessmentRunArn != nil && len(*s.AssessmentRunArn) < 1 { 6246 invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArn", 1)) 6247 } 6248 6249 if invalidParams.Len() > 0 { 6250 return invalidParams 6251 } 6252 return nil 6253} 6254 6255// SetAssessmentRunArn sets the AssessmentRunArn field's value. 6256func (s *GetTelemetryMetadataInput) SetAssessmentRunArn(v string) *GetTelemetryMetadataInput { 6257 s.AssessmentRunArn = &v 6258 return s 6259} 6260 6261// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetTelemetryMetadataResponse 6262type GetTelemetryMetadataOutput struct { 6263 _ struct{} `type:"structure"` 6264 6265 // Telemetry details. 6266 // 6267 // TelemetryMetadata is a required field 6268 TelemetryMetadata []*TelemetryMetadata `locationName:"telemetryMetadata" type:"list" required:"true"` 6269} 6270 6271// String returns the string representation 6272func (s GetTelemetryMetadataOutput) String() string { 6273 return awsutil.Prettify(s) 6274} 6275 6276// GoString returns the string representation 6277func (s GetTelemetryMetadataOutput) GoString() string { 6278 return s.String() 6279} 6280 6281// SetTelemetryMetadata sets the TelemetryMetadata field's value. 6282func (s *GetTelemetryMetadataOutput) SetTelemetryMetadata(v []*TelemetryMetadata) *GetTelemetryMetadataOutput { 6283 s.TelemetryMetadata = v 6284 return s 6285} 6286 6287// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentRunAgentsRequest 6288type ListAssessmentRunAgentsInput struct { 6289 _ struct{} `type:"structure"` 6290 6291 // The ARN that specifies the assessment run whose agents you want to list. 6292 // 6293 // AssessmentRunArn is a required field 6294 AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"` 6295 6296 // You can use this parameter to specify a subset of data to be included in 6297 // the action's response. 6298 // 6299 // For a record to match a filter, all specified filter attributes must match. 6300 // When multiple values are specified for a filter attribute, any of the values 6301 // can match. 6302 Filter *AgentFilter `locationName:"filter" type:"structure"` 6303 6304 // You can use this parameter to indicate the maximum number of items that you 6305 // want in the response. The default value is 10. The maximum value is 500. 6306 MaxResults *int64 `locationName:"maxResults" type:"integer"` 6307 6308 // You can use this parameter when paginating results. Set the value of this 6309 // parameter to null on your first call to the ListAssessmentRunAgents action. 6310 // Subsequent calls to the action fill nextToken in the request with the value 6311 // of NextToken from the previous response to continue listing data. 6312 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6313} 6314 6315// String returns the string representation 6316func (s ListAssessmentRunAgentsInput) String() string { 6317 return awsutil.Prettify(s) 6318} 6319 6320// GoString returns the string representation 6321func (s ListAssessmentRunAgentsInput) GoString() string { 6322 return s.String() 6323} 6324 6325// Validate inspects the fields of the type to determine if they are valid. 6326func (s *ListAssessmentRunAgentsInput) Validate() error { 6327 invalidParams := request.ErrInvalidParams{Context: "ListAssessmentRunAgentsInput"} 6328 if s.AssessmentRunArn == nil { 6329 invalidParams.Add(request.NewErrParamRequired("AssessmentRunArn")) 6330 } 6331 if s.AssessmentRunArn != nil && len(*s.AssessmentRunArn) < 1 { 6332 invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArn", 1)) 6333 } 6334 if s.NextToken != nil && len(*s.NextToken) < 1 { 6335 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 6336 } 6337 if s.Filter != nil { 6338 if err := s.Filter.Validate(); err != nil { 6339 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 6340 } 6341 } 6342 6343 if invalidParams.Len() > 0 { 6344 return invalidParams 6345 } 6346 return nil 6347} 6348 6349// SetAssessmentRunArn sets the AssessmentRunArn field's value. 6350func (s *ListAssessmentRunAgentsInput) SetAssessmentRunArn(v string) *ListAssessmentRunAgentsInput { 6351 s.AssessmentRunArn = &v 6352 return s 6353} 6354 6355// SetFilter sets the Filter field's value. 6356func (s *ListAssessmentRunAgentsInput) SetFilter(v *AgentFilter) *ListAssessmentRunAgentsInput { 6357 s.Filter = v 6358 return s 6359} 6360 6361// SetMaxResults sets the MaxResults field's value. 6362func (s *ListAssessmentRunAgentsInput) SetMaxResults(v int64) *ListAssessmentRunAgentsInput { 6363 s.MaxResults = &v 6364 return s 6365} 6366 6367// SetNextToken sets the NextToken field's value. 6368func (s *ListAssessmentRunAgentsInput) SetNextToken(v string) *ListAssessmentRunAgentsInput { 6369 s.NextToken = &v 6370 return s 6371} 6372 6373// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentRunAgentsResponse 6374type ListAssessmentRunAgentsOutput struct { 6375 _ struct{} `type:"structure"` 6376 6377 // A list of ARNs that specifies the agents returned by the action. 6378 // 6379 // AssessmentRunAgents is a required field 6380 AssessmentRunAgents []*AssessmentRunAgent `locationName:"assessmentRunAgents" type:"list" required:"true"` 6381 6382 // When a response is generated, if there is more data to be listed, this parameter 6383 // is present in the response and contains the value to use for the nextToken 6384 // parameter in a subsequent pagination request. If there is no more data to 6385 // be listed, this parameter is set to null. 6386 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6387} 6388 6389// String returns the string representation 6390func (s ListAssessmentRunAgentsOutput) String() string { 6391 return awsutil.Prettify(s) 6392} 6393 6394// GoString returns the string representation 6395func (s ListAssessmentRunAgentsOutput) GoString() string { 6396 return s.String() 6397} 6398 6399// SetAssessmentRunAgents sets the AssessmentRunAgents field's value. 6400func (s *ListAssessmentRunAgentsOutput) SetAssessmentRunAgents(v []*AssessmentRunAgent) *ListAssessmentRunAgentsOutput { 6401 s.AssessmentRunAgents = v 6402 return s 6403} 6404 6405// SetNextToken sets the NextToken field's value. 6406func (s *ListAssessmentRunAgentsOutput) SetNextToken(v string) *ListAssessmentRunAgentsOutput { 6407 s.NextToken = &v 6408 return s 6409} 6410 6411// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentRunsRequest 6412type ListAssessmentRunsInput struct { 6413 _ struct{} `type:"structure"` 6414 6415 // The ARNs that specify the assessment templates whose assessment runs you 6416 // want to list. 6417 AssessmentTemplateArns []*string `locationName:"assessmentTemplateArns" type:"list"` 6418 6419 // You can use this parameter to specify a subset of data to be included in 6420 // the action's response. 6421 // 6422 // For a record to match a filter, all specified filter attributes must match. 6423 // When multiple values are specified for a filter attribute, any of the values 6424 // can match. 6425 Filter *AssessmentRunFilter `locationName:"filter" type:"structure"` 6426 6427 // You can use this parameter to indicate the maximum number of items that you 6428 // want in the response. The default value is 10. The maximum value is 500. 6429 MaxResults *int64 `locationName:"maxResults" type:"integer"` 6430 6431 // You can use this parameter when paginating results. Set the value of this 6432 // parameter to null on your first call to the ListAssessmentRuns action. Subsequent 6433 // calls to the action fill nextToken in the request with the value of NextToken 6434 // from the previous response to continue listing data. 6435 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6436} 6437 6438// String returns the string representation 6439func (s ListAssessmentRunsInput) String() string { 6440 return awsutil.Prettify(s) 6441} 6442 6443// GoString returns the string representation 6444func (s ListAssessmentRunsInput) GoString() string { 6445 return s.String() 6446} 6447 6448// Validate inspects the fields of the type to determine if they are valid. 6449func (s *ListAssessmentRunsInput) Validate() error { 6450 invalidParams := request.ErrInvalidParams{Context: "ListAssessmentRunsInput"} 6451 if s.NextToken != nil && len(*s.NextToken) < 1 { 6452 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 6453 } 6454 if s.Filter != nil { 6455 if err := s.Filter.Validate(); err != nil { 6456 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 6457 } 6458 } 6459 6460 if invalidParams.Len() > 0 { 6461 return invalidParams 6462 } 6463 return nil 6464} 6465 6466// SetAssessmentTemplateArns sets the AssessmentTemplateArns field's value. 6467func (s *ListAssessmentRunsInput) SetAssessmentTemplateArns(v []*string) *ListAssessmentRunsInput { 6468 s.AssessmentTemplateArns = v 6469 return s 6470} 6471 6472// SetFilter sets the Filter field's value. 6473func (s *ListAssessmentRunsInput) SetFilter(v *AssessmentRunFilter) *ListAssessmentRunsInput { 6474 s.Filter = v 6475 return s 6476} 6477 6478// SetMaxResults sets the MaxResults field's value. 6479func (s *ListAssessmentRunsInput) SetMaxResults(v int64) *ListAssessmentRunsInput { 6480 s.MaxResults = &v 6481 return s 6482} 6483 6484// SetNextToken sets the NextToken field's value. 6485func (s *ListAssessmentRunsInput) SetNextToken(v string) *ListAssessmentRunsInput { 6486 s.NextToken = &v 6487 return s 6488} 6489 6490// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentRunsResponse 6491type ListAssessmentRunsOutput struct { 6492 _ struct{} `type:"structure"` 6493 6494 // A list of ARNs that specifies the assessment runs that are returned by the 6495 // action. 6496 // 6497 // AssessmentRunArns is a required field 6498 AssessmentRunArns []*string `locationName:"assessmentRunArns" type:"list" required:"true"` 6499 6500 // When a response is generated, if there is more data to be listed, this parameter 6501 // is present in the response and contains the value to use for the nextToken 6502 // parameter in a subsequent pagination request. If there is no more data to 6503 // be listed, this parameter is set to null. 6504 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6505} 6506 6507// String returns the string representation 6508func (s ListAssessmentRunsOutput) String() string { 6509 return awsutil.Prettify(s) 6510} 6511 6512// GoString returns the string representation 6513func (s ListAssessmentRunsOutput) GoString() string { 6514 return s.String() 6515} 6516 6517// SetAssessmentRunArns sets the AssessmentRunArns field's value. 6518func (s *ListAssessmentRunsOutput) SetAssessmentRunArns(v []*string) *ListAssessmentRunsOutput { 6519 s.AssessmentRunArns = v 6520 return s 6521} 6522 6523// SetNextToken sets the NextToken field's value. 6524func (s *ListAssessmentRunsOutput) SetNextToken(v string) *ListAssessmentRunsOutput { 6525 s.NextToken = &v 6526 return s 6527} 6528 6529// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentTargetsRequest 6530type ListAssessmentTargetsInput struct { 6531 _ struct{} `type:"structure"` 6532 6533 // You can use this parameter to specify a subset of data to be included in 6534 // the action's response. 6535 // 6536 // For a record to match a filter, all specified filter attributes must match. 6537 // When multiple values are specified for a filter attribute, any of the values 6538 // can match. 6539 Filter *AssessmentTargetFilter `locationName:"filter" type:"structure"` 6540 6541 // You can use this parameter to indicate the maximum number of items you want 6542 // in the response. The default value is 10. The maximum value is 500. 6543 MaxResults *int64 `locationName:"maxResults" type:"integer"` 6544 6545 // You can use this parameter when paginating results. Set the value of this 6546 // parameter to null on your first call to the ListAssessmentTargets action. 6547 // Subsequent calls to the action fill nextToken in the request with the value 6548 // of NextToken from the previous response to continue listing data. 6549 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6550} 6551 6552// String returns the string representation 6553func (s ListAssessmentTargetsInput) String() string { 6554 return awsutil.Prettify(s) 6555} 6556 6557// GoString returns the string representation 6558func (s ListAssessmentTargetsInput) GoString() string { 6559 return s.String() 6560} 6561 6562// Validate inspects the fields of the type to determine if they are valid. 6563func (s *ListAssessmentTargetsInput) Validate() error { 6564 invalidParams := request.ErrInvalidParams{Context: "ListAssessmentTargetsInput"} 6565 if s.NextToken != nil && len(*s.NextToken) < 1 { 6566 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 6567 } 6568 if s.Filter != nil { 6569 if err := s.Filter.Validate(); err != nil { 6570 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 6571 } 6572 } 6573 6574 if invalidParams.Len() > 0 { 6575 return invalidParams 6576 } 6577 return nil 6578} 6579 6580// SetFilter sets the Filter field's value. 6581func (s *ListAssessmentTargetsInput) SetFilter(v *AssessmentTargetFilter) *ListAssessmentTargetsInput { 6582 s.Filter = v 6583 return s 6584} 6585 6586// SetMaxResults sets the MaxResults field's value. 6587func (s *ListAssessmentTargetsInput) SetMaxResults(v int64) *ListAssessmentTargetsInput { 6588 s.MaxResults = &v 6589 return s 6590} 6591 6592// SetNextToken sets the NextToken field's value. 6593func (s *ListAssessmentTargetsInput) SetNextToken(v string) *ListAssessmentTargetsInput { 6594 s.NextToken = &v 6595 return s 6596} 6597 6598// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentTargetsResponse 6599type ListAssessmentTargetsOutput struct { 6600 _ struct{} `type:"structure"` 6601 6602 // A list of ARNs that specifies the assessment targets that are returned by 6603 // the action. 6604 // 6605 // AssessmentTargetArns is a required field 6606 AssessmentTargetArns []*string `locationName:"assessmentTargetArns" type:"list" required:"true"` 6607 6608 // When a response is generated, if there is more data to be listed, this parameter 6609 // is present in the response and contains the value to use for the nextToken 6610 // parameter in a subsequent pagination request. If there is no more data to 6611 // be listed, this parameter is set to null. 6612 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6613} 6614 6615// String returns the string representation 6616func (s ListAssessmentTargetsOutput) String() string { 6617 return awsutil.Prettify(s) 6618} 6619 6620// GoString returns the string representation 6621func (s ListAssessmentTargetsOutput) GoString() string { 6622 return s.String() 6623} 6624 6625// SetAssessmentTargetArns sets the AssessmentTargetArns field's value. 6626func (s *ListAssessmentTargetsOutput) SetAssessmentTargetArns(v []*string) *ListAssessmentTargetsOutput { 6627 s.AssessmentTargetArns = v 6628 return s 6629} 6630 6631// SetNextToken sets the NextToken field's value. 6632func (s *ListAssessmentTargetsOutput) SetNextToken(v string) *ListAssessmentTargetsOutput { 6633 s.NextToken = &v 6634 return s 6635} 6636 6637// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentTemplatesRequest 6638type ListAssessmentTemplatesInput struct { 6639 _ struct{} `type:"structure"` 6640 6641 // A list of ARNs that specifies the assessment targets whose assessment templates 6642 // you want to list. 6643 AssessmentTargetArns []*string `locationName:"assessmentTargetArns" type:"list"` 6644 6645 // You can use this parameter to specify a subset of data to be included in 6646 // the action's response. 6647 // 6648 // For a record to match a filter, all specified filter attributes must match. 6649 // When multiple values are specified for a filter attribute, any of the values 6650 // can match. 6651 Filter *AssessmentTemplateFilter `locationName:"filter" type:"structure"` 6652 6653 // You can use this parameter to indicate the maximum number of items you want 6654 // in the response. The default value is 10. The maximum value is 500. 6655 MaxResults *int64 `locationName:"maxResults" type:"integer"` 6656 6657 // You can use this parameter when paginating results. Set the value of this 6658 // parameter to null on your first call to the ListAssessmentTemplates action. 6659 // Subsequent calls to the action fill nextToken in the request with the value 6660 // of NextToken from the previous response to continue listing data. 6661 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6662} 6663 6664// String returns the string representation 6665func (s ListAssessmentTemplatesInput) String() string { 6666 return awsutil.Prettify(s) 6667} 6668 6669// GoString returns the string representation 6670func (s ListAssessmentTemplatesInput) GoString() string { 6671 return s.String() 6672} 6673 6674// Validate inspects the fields of the type to determine if they are valid. 6675func (s *ListAssessmentTemplatesInput) Validate() error { 6676 invalidParams := request.ErrInvalidParams{Context: "ListAssessmentTemplatesInput"} 6677 if s.NextToken != nil && len(*s.NextToken) < 1 { 6678 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 6679 } 6680 if s.Filter != nil { 6681 if err := s.Filter.Validate(); err != nil { 6682 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 6683 } 6684 } 6685 6686 if invalidParams.Len() > 0 { 6687 return invalidParams 6688 } 6689 return nil 6690} 6691 6692// SetAssessmentTargetArns sets the AssessmentTargetArns field's value. 6693func (s *ListAssessmentTemplatesInput) SetAssessmentTargetArns(v []*string) *ListAssessmentTemplatesInput { 6694 s.AssessmentTargetArns = v 6695 return s 6696} 6697 6698// SetFilter sets the Filter field's value. 6699func (s *ListAssessmentTemplatesInput) SetFilter(v *AssessmentTemplateFilter) *ListAssessmentTemplatesInput { 6700 s.Filter = v 6701 return s 6702} 6703 6704// SetMaxResults sets the MaxResults field's value. 6705func (s *ListAssessmentTemplatesInput) SetMaxResults(v int64) *ListAssessmentTemplatesInput { 6706 s.MaxResults = &v 6707 return s 6708} 6709 6710// SetNextToken sets the NextToken field's value. 6711func (s *ListAssessmentTemplatesInput) SetNextToken(v string) *ListAssessmentTemplatesInput { 6712 s.NextToken = &v 6713 return s 6714} 6715 6716// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentTemplatesResponse 6717type ListAssessmentTemplatesOutput struct { 6718 _ struct{} `type:"structure"` 6719 6720 // A list of ARNs that specifies the assessment templates returned by the action. 6721 // 6722 // AssessmentTemplateArns is a required field 6723 AssessmentTemplateArns []*string `locationName:"assessmentTemplateArns" type:"list" required:"true"` 6724 6725 // When a response is generated, if there is more data to be listed, this parameter 6726 // is present in the response and contains the value to use for the nextToken 6727 // parameter in a subsequent pagination request. If there is no more data to 6728 // be listed, this parameter is set to null. 6729 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6730} 6731 6732// String returns the string representation 6733func (s ListAssessmentTemplatesOutput) String() string { 6734 return awsutil.Prettify(s) 6735} 6736 6737// GoString returns the string representation 6738func (s ListAssessmentTemplatesOutput) GoString() string { 6739 return s.String() 6740} 6741 6742// SetAssessmentTemplateArns sets the AssessmentTemplateArns field's value. 6743func (s *ListAssessmentTemplatesOutput) SetAssessmentTemplateArns(v []*string) *ListAssessmentTemplatesOutput { 6744 s.AssessmentTemplateArns = v 6745 return s 6746} 6747 6748// SetNextToken sets the NextToken field's value. 6749func (s *ListAssessmentTemplatesOutput) SetNextToken(v string) *ListAssessmentTemplatesOutput { 6750 s.NextToken = &v 6751 return s 6752} 6753 6754// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListEventSubscriptionsRequest 6755type ListEventSubscriptionsInput struct { 6756 _ struct{} `type:"structure"` 6757 6758 // You can use this parameter to indicate the maximum number of items you want 6759 // in the response. The default value is 10. The maximum value is 500. 6760 MaxResults *int64 `locationName:"maxResults" type:"integer"` 6761 6762 // You can use this parameter when paginating results. Set the value of this 6763 // parameter to null on your first call to the ListEventSubscriptions action. 6764 // Subsequent calls to the action fill nextToken in the request with the value 6765 // of NextToken from the previous response to continue listing data. 6766 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6767 6768 // The ARN of the assessment template for which you want to list the existing 6769 // event subscriptions. 6770 ResourceArn *string `locationName:"resourceArn" min:"1" type:"string"` 6771} 6772 6773// String returns the string representation 6774func (s ListEventSubscriptionsInput) String() string { 6775 return awsutil.Prettify(s) 6776} 6777 6778// GoString returns the string representation 6779func (s ListEventSubscriptionsInput) GoString() string { 6780 return s.String() 6781} 6782 6783// Validate inspects the fields of the type to determine if they are valid. 6784func (s *ListEventSubscriptionsInput) Validate() error { 6785 invalidParams := request.ErrInvalidParams{Context: "ListEventSubscriptionsInput"} 6786 if s.NextToken != nil && len(*s.NextToken) < 1 { 6787 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 6788 } 6789 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 6790 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 6791 } 6792 6793 if invalidParams.Len() > 0 { 6794 return invalidParams 6795 } 6796 return nil 6797} 6798 6799// SetMaxResults sets the MaxResults field's value. 6800func (s *ListEventSubscriptionsInput) SetMaxResults(v int64) *ListEventSubscriptionsInput { 6801 s.MaxResults = &v 6802 return s 6803} 6804 6805// SetNextToken sets the NextToken field's value. 6806func (s *ListEventSubscriptionsInput) SetNextToken(v string) *ListEventSubscriptionsInput { 6807 s.NextToken = &v 6808 return s 6809} 6810 6811// SetResourceArn sets the ResourceArn field's value. 6812func (s *ListEventSubscriptionsInput) SetResourceArn(v string) *ListEventSubscriptionsInput { 6813 s.ResourceArn = &v 6814 return s 6815} 6816 6817// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListEventSubscriptionsResponse 6818type ListEventSubscriptionsOutput struct { 6819 _ struct{} `type:"structure"` 6820 6821 // When a response is generated, if there is more data to be listed, this parameter 6822 // is present in the response and contains the value to use for the nextToken 6823 // parameter in a subsequent pagination request. If there is no more data to 6824 // be listed, this parameter is set to null. 6825 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6826 6827 // Details of the returned event subscriptions. 6828 // 6829 // Subscriptions is a required field 6830 Subscriptions []*Subscription `locationName:"subscriptions" type:"list" required:"true"` 6831} 6832 6833// String returns the string representation 6834func (s ListEventSubscriptionsOutput) String() string { 6835 return awsutil.Prettify(s) 6836} 6837 6838// GoString returns the string representation 6839func (s ListEventSubscriptionsOutput) GoString() string { 6840 return s.String() 6841} 6842 6843// SetNextToken sets the NextToken field's value. 6844func (s *ListEventSubscriptionsOutput) SetNextToken(v string) *ListEventSubscriptionsOutput { 6845 s.NextToken = &v 6846 return s 6847} 6848 6849// SetSubscriptions sets the Subscriptions field's value. 6850func (s *ListEventSubscriptionsOutput) SetSubscriptions(v []*Subscription) *ListEventSubscriptionsOutput { 6851 s.Subscriptions = v 6852 return s 6853} 6854 6855// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListFindingsRequest 6856type ListFindingsInput struct { 6857 _ struct{} `type:"structure"` 6858 6859 // The ARNs of the assessment runs that generate the findings that you want 6860 // to list. 6861 AssessmentRunArns []*string `locationName:"assessmentRunArns" type:"list"` 6862 6863 // You can use this parameter to specify a subset of data to be included in 6864 // the action's response. 6865 // 6866 // For a record to match a filter, all specified filter attributes must match. 6867 // When multiple values are specified for a filter attribute, any of the values 6868 // can match. 6869 Filter *FindingFilter `locationName:"filter" type:"structure"` 6870 6871 // You can use this parameter to indicate the maximum number of items you want 6872 // in the response. The default value is 10. The maximum value is 500. 6873 MaxResults *int64 `locationName:"maxResults" type:"integer"` 6874 6875 // You can use this parameter when paginating results. Set the value of this 6876 // parameter to null on your first call to the ListFindings action. Subsequent 6877 // calls to the action fill nextToken in the request with the value of NextToken 6878 // from the previous response to continue listing data. 6879 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6880} 6881 6882// String returns the string representation 6883func (s ListFindingsInput) String() string { 6884 return awsutil.Prettify(s) 6885} 6886 6887// GoString returns the string representation 6888func (s ListFindingsInput) GoString() string { 6889 return s.String() 6890} 6891 6892// Validate inspects the fields of the type to determine if they are valid. 6893func (s *ListFindingsInput) Validate() error { 6894 invalidParams := request.ErrInvalidParams{Context: "ListFindingsInput"} 6895 if s.NextToken != nil && len(*s.NextToken) < 1 { 6896 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 6897 } 6898 if s.Filter != nil { 6899 if err := s.Filter.Validate(); err != nil { 6900 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 6901 } 6902 } 6903 6904 if invalidParams.Len() > 0 { 6905 return invalidParams 6906 } 6907 return nil 6908} 6909 6910// SetAssessmentRunArns sets the AssessmentRunArns field's value. 6911func (s *ListFindingsInput) SetAssessmentRunArns(v []*string) *ListFindingsInput { 6912 s.AssessmentRunArns = v 6913 return s 6914} 6915 6916// SetFilter sets the Filter field's value. 6917func (s *ListFindingsInput) SetFilter(v *FindingFilter) *ListFindingsInput { 6918 s.Filter = v 6919 return s 6920} 6921 6922// SetMaxResults sets the MaxResults field's value. 6923func (s *ListFindingsInput) SetMaxResults(v int64) *ListFindingsInput { 6924 s.MaxResults = &v 6925 return s 6926} 6927 6928// SetNextToken sets the NextToken field's value. 6929func (s *ListFindingsInput) SetNextToken(v string) *ListFindingsInput { 6930 s.NextToken = &v 6931 return s 6932} 6933 6934// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListFindingsResponse 6935type ListFindingsOutput struct { 6936 _ struct{} `type:"structure"` 6937 6938 // A list of ARNs that specifies the findings returned by the action. 6939 // 6940 // FindingArns is a required field 6941 FindingArns []*string `locationName:"findingArns" type:"list" required:"true"` 6942 6943 // When a response is generated, if there is more data to be listed, this parameter 6944 // is present in the response and contains the value to use for the nextToken 6945 // parameter in a subsequent pagination request. If there is no more data to 6946 // be listed, this parameter is set to null. 6947 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6948} 6949 6950// String returns the string representation 6951func (s ListFindingsOutput) String() string { 6952 return awsutil.Prettify(s) 6953} 6954 6955// GoString returns the string representation 6956func (s ListFindingsOutput) GoString() string { 6957 return s.String() 6958} 6959 6960// SetFindingArns sets the FindingArns field's value. 6961func (s *ListFindingsOutput) SetFindingArns(v []*string) *ListFindingsOutput { 6962 s.FindingArns = v 6963 return s 6964} 6965 6966// SetNextToken sets the NextToken field's value. 6967func (s *ListFindingsOutput) SetNextToken(v string) *ListFindingsOutput { 6968 s.NextToken = &v 6969 return s 6970} 6971 6972// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListRulesPackagesRequest 6973type ListRulesPackagesInput struct { 6974 _ struct{} `type:"structure"` 6975 6976 // You can use this parameter to indicate the maximum number of items you want 6977 // in the response. The default value is 10. The maximum value is 500. 6978 MaxResults *int64 `locationName:"maxResults" type:"integer"` 6979 6980 // You can use this parameter when paginating results. Set the value of this 6981 // parameter to null on your first call to the ListRulesPackages action. Subsequent 6982 // calls to the action fill nextToken in the request with the value of NextToken 6983 // from the previous response to continue listing data. 6984 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6985} 6986 6987// String returns the string representation 6988func (s ListRulesPackagesInput) String() string { 6989 return awsutil.Prettify(s) 6990} 6991 6992// GoString returns the string representation 6993func (s ListRulesPackagesInput) GoString() string { 6994 return s.String() 6995} 6996 6997// Validate inspects the fields of the type to determine if they are valid. 6998func (s *ListRulesPackagesInput) Validate() error { 6999 invalidParams := request.ErrInvalidParams{Context: "ListRulesPackagesInput"} 7000 if s.NextToken != nil && len(*s.NextToken) < 1 { 7001 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 7002 } 7003 7004 if invalidParams.Len() > 0 { 7005 return invalidParams 7006 } 7007 return nil 7008} 7009 7010// SetMaxResults sets the MaxResults field's value. 7011func (s *ListRulesPackagesInput) SetMaxResults(v int64) *ListRulesPackagesInput { 7012 s.MaxResults = &v 7013 return s 7014} 7015 7016// SetNextToken sets the NextToken field's value. 7017func (s *ListRulesPackagesInput) SetNextToken(v string) *ListRulesPackagesInput { 7018 s.NextToken = &v 7019 return s 7020} 7021 7022// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListRulesPackagesResponse 7023type ListRulesPackagesOutput struct { 7024 _ struct{} `type:"structure"` 7025 7026 // When a response is generated, if there is more data to be listed, this parameter 7027 // is present in the response and contains the value to use for the nextToken 7028 // parameter in a subsequent pagination request. If there is no more data to 7029 // be listed, this parameter is set to null. 7030 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 7031 7032 // The list of ARNs that specifies the rules packages returned by the action. 7033 // 7034 // RulesPackageArns is a required field 7035 RulesPackageArns []*string `locationName:"rulesPackageArns" type:"list" required:"true"` 7036} 7037 7038// String returns the string representation 7039func (s ListRulesPackagesOutput) String() string { 7040 return awsutil.Prettify(s) 7041} 7042 7043// GoString returns the string representation 7044func (s ListRulesPackagesOutput) GoString() string { 7045 return s.String() 7046} 7047 7048// SetNextToken sets the NextToken field's value. 7049func (s *ListRulesPackagesOutput) SetNextToken(v string) *ListRulesPackagesOutput { 7050 s.NextToken = &v 7051 return s 7052} 7053 7054// SetRulesPackageArns sets the RulesPackageArns field's value. 7055func (s *ListRulesPackagesOutput) SetRulesPackageArns(v []*string) *ListRulesPackagesOutput { 7056 s.RulesPackageArns = v 7057 return s 7058} 7059 7060// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListTagsForResourceRequest 7061type ListTagsForResourceInput struct { 7062 _ struct{} `type:"structure"` 7063 7064 // The ARN that specifies the assessment template whose tags you want to list. 7065 // 7066 // ResourceArn is a required field 7067 ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` 7068} 7069 7070// String returns the string representation 7071func (s ListTagsForResourceInput) String() string { 7072 return awsutil.Prettify(s) 7073} 7074 7075// GoString returns the string representation 7076func (s ListTagsForResourceInput) GoString() string { 7077 return s.String() 7078} 7079 7080// Validate inspects the fields of the type to determine if they are valid. 7081func (s *ListTagsForResourceInput) Validate() error { 7082 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 7083 if s.ResourceArn == nil { 7084 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 7085 } 7086 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 7087 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 7088 } 7089 7090 if invalidParams.Len() > 0 { 7091 return invalidParams 7092 } 7093 return nil 7094} 7095 7096// SetResourceArn sets the ResourceArn field's value. 7097func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { 7098 s.ResourceArn = &v 7099 return s 7100} 7101 7102// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListTagsForResourceResponse 7103type ListTagsForResourceOutput struct { 7104 _ struct{} `type:"structure"` 7105 7106 // A collection of key and value pairs. 7107 // 7108 // Tags is a required field 7109 Tags []*Tag `locationName:"tags" type:"list" required:"true"` 7110} 7111 7112// String returns the string representation 7113func (s ListTagsForResourceOutput) String() string { 7114 return awsutil.Prettify(s) 7115} 7116 7117// GoString returns the string representation 7118func (s ListTagsForResourceOutput) GoString() string { 7119 return s.String() 7120} 7121 7122// SetTags sets the Tags field's value. 7123func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { 7124 s.Tags = v 7125 return s 7126} 7127 7128// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/PreviewAgentsRequest 7129type PreviewAgentsInput struct { 7130 _ struct{} `type:"structure"` 7131 7132 // You can use this parameter to indicate the maximum number of items you want 7133 // in the response. The default value is 10. The maximum value is 500. 7134 MaxResults *int64 `locationName:"maxResults" type:"integer"` 7135 7136 // You can use this parameter when paginating results. Set the value of this 7137 // parameter to null on your first call to the PreviewAgents action. Subsequent 7138 // calls to the action fill nextToken in the request with the value of NextToken 7139 // from the previous response to continue listing data. 7140 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 7141 7142 // The ARN of the assessment target whose agents you want to preview. 7143 // 7144 // PreviewAgentsArn is a required field 7145 PreviewAgentsArn *string `locationName:"previewAgentsArn" min:"1" type:"string" required:"true"` 7146} 7147 7148// String returns the string representation 7149func (s PreviewAgentsInput) String() string { 7150 return awsutil.Prettify(s) 7151} 7152 7153// GoString returns the string representation 7154func (s PreviewAgentsInput) GoString() string { 7155 return s.String() 7156} 7157 7158// Validate inspects the fields of the type to determine if they are valid. 7159func (s *PreviewAgentsInput) Validate() error { 7160 invalidParams := request.ErrInvalidParams{Context: "PreviewAgentsInput"} 7161 if s.NextToken != nil && len(*s.NextToken) < 1 { 7162 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 7163 } 7164 if s.PreviewAgentsArn == nil { 7165 invalidParams.Add(request.NewErrParamRequired("PreviewAgentsArn")) 7166 } 7167 if s.PreviewAgentsArn != nil && len(*s.PreviewAgentsArn) < 1 { 7168 invalidParams.Add(request.NewErrParamMinLen("PreviewAgentsArn", 1)) 7169 } 7170 7171 if invalidParams.Len() > 0 { 7172 return invalidParams 7173 } 7174 return nil 7175} 7176 7177// SetMaxResults sets the MaxResults field's value. 7178func (s *PreviewAgentsInput) SetMaxResults(v int64) *PreviewAgentsInput { 7179 s.MaxResults = &v 7180 return s 7181} 7182 7183// SetNextToken sets the NextToken field's value. 7184func (s *PreviewAgentsInput) SetNextToken(v string) *PreviewAgentsInput { 7185 s.NextToken = &v 7186 return s 7187} 7188 7189// SetPreviewAgentsArn sets the PreviewAgentsArn field's value. 7190func (s *PreviewAgentsInput) SetPreviewAgentsArn(v string) *PreviewAgentsInput { 7191 s.PreviewAgentsArn = &v 7192 return s 7193} 7194 7195// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/PreviewAgentsResponse 7196type PreviewAgentsOutput struct { 7197 _ struct{} `type:"structure"` 7198 7199 // The resulting list of agents. 7200 // 7201 // AgentPreviews is a required field 7202 AgentPreviews []*AgentPreview `locationName:"agentPreviews" type:"list" required:"true"` 7203 7204 // When a response is generated, if there is more data to be listed, this parameter 7205 // is present in the response and contains the value to use for the nextToken 7206 // parameter in a subsequent pagination request. If there is no more data to 7207 // be listed, this parameter is set to null. 7208 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 7209} 7210 7211// String returns the string representation 7212func (s PreviewAgentsOutput) String() string { 7213 return awsutil.Prettify(s) 7214} 7215 7216// GoString returns the string representation 7217func (s PreviewAgentsOutput) GoString() string { 7218 return s.String() 7219} 7220 7221// SetAgentPreviews sets the AgentPreviews field's value. 7222func (s *PreviewAgentsOutput) SetAgentPreviews(v []*AgentPreview) *PreviewAgentsOutput { 7223 s.AgentPreviews = v 7224 return s 7225} 7226 7227// SetNextToken sets the NextToken field's value. 7228func (s *PreviewAgentsOutput) SetNextToken(v string) *PreviewAgentsOutput { 7229 s.NextToken = &v 7230 return s 7231} 7232 7233// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RegisterCrossAccountAccessRoleRequest 7234type RegisterCrossAccountAccessRoleInput struct { 7235 _ struct{} `type:"structure"` 7236 7237 // The ARN of the IAM role that Amazon Inspector uses to list your EC2 instances 7238 // during the assessment run or when you call the PreviewAgents action. 7239 // 7240 // RoleArn is a required field 7241 RoleArn *string `locationName:"roleArn" min:"1" type:"string" required:"true"` 7242} 7243 7244// String returns the string representation 7245func (s RegisterCrossAccountAccessRoleInput) String() string { 7246 return awsutil.Prettify(s) 7247} 7248 7249// GoString returns the string representation 7250func (s RegisterCrossAccountAccessRoleInput) GoString() string { 7251 return s.String() 7252} 7253 7254// Validate inspects the fields of the type to determine if they are valid. 7255func (s *RegisterCrossAccountAccessRoleInput) Validate() error { 7256 invalidParams := request.ErrInvalidParams{Context: "RegisterCrossAccountAccessRoleInput"} 7257 if s.RoleArn == nil { 7258 invalidParams.Add(request.NewErrParamRequired("RoleArn")) 7259 } 7260 if s.RoleArn != nil && len(*s.RoleArn) < 1 { 7261 invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) 7262 } 7263 7264 if invalidParams.Len() > 0 { 7265 return invalidParams 7266 } 7267 return nil 7268} 7269 7270// SetRoleArn sets the RoleArn field's value. 7271func (s *RegisterCrossAccountAccessRoleInput) SetRoleArn(v string) *RegisterCrossAccountAccessRoleInput { 7272 s.RoleArn = &v 7273 return s 7274} 7275 7276// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RegisterCrossAccountAccessRoleOutput 7277type RegisterCrossAccountAccessRoleOutput struct { 7278 _ struct{} `type:"structure"` 7279} 7280 7281// String returns the string representation 7282func (s RegisterCrossAccountAccessRoleOutput) String() string { 7283 return awsutil.Prettify(s) 7284} 7285 7286// GoString returns the string representation 7287func (s RegisterCrossAccountAccessRoleOutput) GoString() string { 7288 return s.String() 7289} 7290 7291// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RemoveAttributesFromFindingsRequest 7292type RemoveAttributesFromFindingsInput struct { 7293 _ struct{} `type:"structure"` 7294 7295 // The array of attribute keys that you want to remove from specified findings. 7296 // 7297 // AttributeKeys is a required field 7298 AttributeKeys []*string `locationName:"attributeKeys" type:"list" required:"true"` 7299 7300 // The ARNs that specify the findings that you want to remove attributes from. 7301 // 7302 // FindingArns is a required field 7303 FindingArns []*string `locationName:"findingArns" min:"1" type:"list" required:"true"` 7304} 7305 7306// String returns the string representation 7307func (s RemoveAttributesFromFindingsInput) String() string { 7308 return awsutil.Prettify(s) 7309} 7310 7311// GoString returns the string representation 7312func (s RemoveAttributesFromFindingsInput) GoString() string { 7313 return s.String() 7314} 7315 7316// Validate inspects the fields of the type to determine if they are valid. 7317func (s *RemoveAttributesFromFindingsInput) Validate() error { 7318 invalidParams := request.ErrInvalidParams{Context: "RemoveAttributesFromFindingsInput"} 7319 if s.AttributeKeys == nil { 7320 invalidParams.Add(request.NewErrParamRequired("AttributeKeys")) 7321 } 7322 if s.FindingArns == nil { 7323 invalidParams.Add(request.NewErrParamRequired("FindingArns")) 7324 } 7325 if s.FindingArns != nil && len(s.FindingArns) < 1 { 7326 invalidParams.Add(request.NewErrParamMinLen("FindingArns", 1)) 7327 } 7328 7329 if invalidParams.Len() > 0 { 7330 return invalidParams 7331 } 7332 return nil 7333} 7334 7335// SetAttributeKeys sets the AttributeKeys field's value. 7336func (s *RemoveAttributesFromFindingsInput) SetAttributeKeys(v []*string) *RemoveAttributesFromFindingsInput { 7337 s.AttributeKeys = v 7338 return s 7339} 7340 7341// SetFindingArns sets the FindingArns field's value. 7342func (s *RemoveAttributesFromFindingsInput) SetFindingArns(v []*string) *RemoveAttributesFromFindingsInput { 7343 s.FindingArns = v 7344 return s 7345} 7346 7347// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RemoveAttributesFromFindingsResponse 7348type RemoveAttributesFromFindingsOutput struct { 7349 _ struct{} `type:"structure"` 7350 7351 // Attributes details that cannot be described. An error code is provided for 7352 // each failed item. 7353 // 7354 // FailedItems is a required field 7355 FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"` 7356} 7357 7358// String returns the string representation 7359func (s RemoveAttributesFromFindingsOutput) String() string { 7360 return awsutil.Prettify(s) 7361} 7362 7363// GoString returns the string representation 7364func (s RemoveAttributesFromFindingsOutput) GoString() string { 7365 return s.String() 7366} 7367 7368// SetFailedItems sets the FailedItems field's value. 7369func (s *RemoveAttributesFromFindingsOutput) SetFailedItems(v map[string]*FailedItemDetails) *RemoveAttributesFromFindingsOutput { 7370 s.FailedItems = v 7371 return s 7372} 7373 7374// Contains information about a resource group. The resource group defines a 7375// set of tags that, when queried, identify the AWS resources that make up the 7376// assessment target. This data type is used as the response element in the 7377// DescribeResourceGroups action. 7378// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ResourceGroup 7379type ResourceGroup struct { 7380 _ struct{} `type:"structure"` 7381 7382 // The ARN of the resource group. 7383 // 7384 // Arn is a required field 7385 Arn *string `locationName:"arn" min:"1" type:"string" required:"true"` 7386 7387 // The time at which resource group is created. 7388 // 7389 // CreatedAt is a required field 7390 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"` 7391 7392 // The tags (key and value pairs) of the resource group. This data type property 7393 // is used in the CreateResourceGroup action. 7394 // 7395 // Tags is a required field 7396 Tags []*ResourceGroupTag `locationName:"tags" min:"1" type:"list" required:"true"` 7397} 7398 7399// String returns the string representation 7400func (s ResourceGroup) String() string { 7401 return awsutil.Prettify(s) 7402} 7403 7404// GoString returns the string representation 7405func (s ResourceGroup) GoString() string { 7406 return s.String() 7407} 7408 7409// SetArn sets the Arn field's value. 7410func (s *ResourceGroup) SetArn(v string) *ResourceGroup { 7411 s.Arn = &v 7412 return s 7413} 7414 7415// SetCreatedAt sets the CreatedAt field's value. 7416func (s *ResourceGroup) SetCreatedAt(v time.Time) *ResourceGroup { 7417 s.CreatedAt = &v 7418 return s 7419} 7420 7421// SetTags sets the Tags field's value. 7422func (s *ResourceGroup) SetTags(v []*ResourceGroupTag) *ResourceGroup { 7423 s.Tags = v 7424 return s 7425} 7426 7427// This data type is used as one of the elements of the ResourceGroup data type. 7428// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ResourceGroupTag 7429type ResourceGroupTag struct { 7430 _ struct{} `type:"structure"` 7431 7432 // A tag key. 7433 // 7434 // Key is a required field 7435 Key *string `locationName:"key" min:"1" type:"string" required:"true"` 7436 7437 // The value assigned to a tag key. 7438 Value *string `locationName:"value" min:"1" type:"string"` 7439} 7440 7441// String returns the string representation 7442func (s ResourceGroupTag) String() string { 7443 return awsutil.Prettify(s) 7444} 7445 7446// GoString returns the string representation 7447func (s ResourceGroupTag) GoString() string { 7448 return s.String() 7449} 7450 7451// Validate inspects the fields of the type to determine if they are valid. 7452func (s *ResourceGroupTag) Validate() error { 7453 invalidParams := request.ErrInvalidParams{Context: "ResourceGroupTag"} 7454 if s.Key == nil { 7455 invalidParams.Add(request.NewErrParamRequired("Key")) 7456 } 7457 if s.Key != nil && len(*s.Key) < 1 { 7458 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 7459 } 7460 if s.Value != nil && len(*s.Value) < 1 { 7461 invalidParams.Add(request.NewErrParamMinLen("Value", 1)) 7462 } 7463 7464 if invalidParams.Len() > 0 { 7465 return invalidParams 7466 } 7467 return nil 7468} 7469 7470// SetKey sets the Key field's value. 7471func (s *ResourceGroupTag) SetKey(v string) *ResourceGroupTag { 7472 s.Key = &v 7473 return s 7474} 7475 7476// SetValue sets the Value field's value. 7477func (s *ResourceGroupTag) SetValue(v string) *ResourceGroupTag { 7478 s.Value = &v 7479 return s 7480} 7481 7482// Contains information about an Amazon Inspector rules package. This data type 7483// is used as the response element in the DescribeRulesPackages action. 7484// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RulesPackage 7485type RulesPackage struct { 7486 _ struct{} `type:"structure"` 7487 7488 // The ARN of the rules package. 7489 // 7490 // Arn is a required field 7491 Arn *string `locationName:"arn" min:"1" type:"string" required:"true"` 7492 7493 // The description of the rules package. 7494 Description *string `locationName:"description" type:"string"` 7495 7496 // The name of the rules package. 7497 // 7498 // Name is a required field 7499 Name *string `locationName:"name" type:"string" required:"true"` 7500 7501 // The provider of the rules package. 7502 // 7503 // Provider is a required field 7504 Provider *string `locationName:"provider" type:"string" required:"true"` 7505 7506 // The version ID of the rules package. 7507 // 7508 // Version is a required field 7509 Version *string `locationName:"version" type:"string" required:"true"` 7510} 7511 7512// String returns the string representation 7513func (s RulesPackage) String() string { 7514 return awsutil.Prettify(s) 7515} 7516 7517// GoString returns the string representation 7518func (s RulesPackage) GoString() string { 7519 return s.String() 7520} 7521 7522// SetArn sets the Arn field's value. 7523func (s *RulesPackage) SetArn(v string) *RulesPackage { 7524 s.Arn = &v 7525 return s 7526} 7527 7528// SetDescription sets the Description field's value. 7529func (s *RulesPackage) SetDescription(v string) *RulesPackage { 7530 s.Description = &v 7531 return s 7532} 7533 7534// SetName sets the Name field's value. 7535func (s *RulesPackage) SetName(v string) *RulesPackage { 7536 s.Name = &v 7537 return s 7538} 7539 7540// SetProvider sets the Provider field's value. 7541func (s *RulesPackage) SetProvider(v string) *RulesPackage { 7542 s.Provider = &v 7543 return s 7544} 7545 7546// SetVersion sets the Version field's value. 7547func (s *RulesPackage) SetVersion(v string) *RulesPackage { 7548 s.Version = &v 7549 return s 7550} 7551 7552// This data type is used in the Finding data type. 7553// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/InspectorServiceAttributes 7554type ServiceAttributes struct { 7555 _ struct{} `type:"structure"` 7556 7557 // The ARN of the assessment run during which the finding is generated. 7558 AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string"` 7559 7560 // The ARN of the rules package that is used to generate the finding. 7561 RulesPackageArn *string `locationName:"rulesPackageArn" min:"1" type:"string"` 7562 7563 // The schema version of this data type. 7564 // 7565 // SchemaVersion is a required field 7566 SchemaVersion *int64 `locationName:"schemaVersion" type:"integer" required:"true"` 7567} 7568 7569// String returns the string representation 7570func (s ServiceAttributes) String() string { 7571 return awsutil.Prettify(s) 7572} 7573 7574// GoString returns the string representation 7575func (s ServiceAttributes) GoString() string { 7576 return s.String() 7577} 7578 7579// SetAssessmentRunArn sets the AssessmentRunArn field's value. 7580func (s *ServiceAttributes) SetAssessmentRunArn(v string) *ServiceAttributes { 7581 s.AssessmentRunArn = &v 7582 return s 7583} 7584 7585// SetRulesPackageArn sets the RulesPackageArn field's value. 7586func (s *ServiceAttributes) SetRulesPackageArn(v string) *ServiceAttributes { 7587 s.RulesPackageArn = &v 7588 return s 7589} 7590 7591// SetSchemaVersion sets the SchemaVersion field's value. 7592func (s *ServiceAttributes) SetSchemaVersion(v int64) *ServiceAttributes { 7593 s.SchemaVersion = &v 7594 return s 7595} 7596 7597// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/SetTagsForResourceRequest 7598type SetTagsForResourceInput struct { 7599 _ struct{} `type:"structure"` 7600 7601 // The ARN of the assessment template that you want to set tags to. 7602 // 7603 // ResourceArn is a required field 7604 ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` 7605 7606 // A collection of key and value pairs that you want to set to the assessment 7607 // template. 7608 Tags []*Tag `locationName:"tags" type:"list"` 7609} 7610 7611// String returns the string representation 7612func (s SetTagsForResourceInput) String() string { 7613 return awsutil.Prettify(s) 7614} 7615 7616// GoString returns the string representation 7617func (s SetTagsForResourceInput) GoString() string { 7618 return s.String() 7619} 7620 7621// Validate inspects the fields of the type to determine if they are valid. 7622func (s *SetTagsForResourceInput) Validate() error { 7623 invalidParams := request.ErrInvalidParams{Context: "SetTagsForResourceInput"} 7624 if s.ResourceArn == nil { 7625 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 7626 } 7627 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 7628 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 7629 } 7630 if s.Tags != nil { 7631 for i, v := range s.Tags { 7632 if v == nil { 7633 continue 7634 } 7635 if err := v.Validate(); err != nil { 7636 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 7637 } 7638 } 7639 } 7640 7641 if invalidParams.Len() > 0 { 7642 return invalidParams 7643 } 7644 return nil 7645} 7646 7647// SetResourceArn sets the ResourceArn field's value. 7648func (s *SetTagsForResourceInput) SetResourceArn(v string) *SetTagsForResourceInput { 7649 s.ResourceArn = &v 7650 return s 7651} 7652 7653// SetTags sets the Tags field's value. 7654func (s *SetTagsForResourceInput) SetTags(v []*Tag) *SetTagsForResourceInput { 7655 s.Tags = v 7656 return s 7657} 7658 7659// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/SetTagsForResourceOutput 7660type SetTagsForResourceOutput struct { 7661 _ struct{} `type:"structure"` 7662} 7663 7664// String returns the string representation 7665func (s SetTagsForResourceOutput) String() string { 7666 return awsutil.Prettify(s) 7667} 7668 7669// GoString returns the string representation 7670func (s SetTagsForResourceOutput) GoString() string { 7671 return s.String() 7672} 7673 7674// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/StartAssessmentRunRequest 7675type StartAssessmentRunInput struct { 7676 _ struct{} `type:"structure"` 7677 7678 // You can specify the name for the assessment run. The name must be unique 7679 // for the assessment template whose ARN is used to start the assessment run. 7680 AssessmentRunName *string `locationName:"assessmentRunName" min:"1" type:"string"` 7681 7682 // The ARN of the assessment template of the assessment run that you want to 7683 // start. 7684 // 7685 // AssessmentTemplateArn is a required field 7686 AssessmentTemplateArn *string `locationName:"assessmentTemplateArn" min:"1" type:"string" required:"true"` 7687} 7688 7689// String returns the string representation 7690func (s StartAssessmentRunInput) String() string { 7691 return awsutil.Prettify(s) 7692} 7693 7694// GoString returns the string representation 7695func (s StartAssessmentRunInput) GoString() string { 7696 return s.String() 7697} 7698 7699// Validate inspects the fields of the type to determine if they are valid. 7700func (s *StartAssessmentRunInput) Validate() error { 7701 invalidParams := request.ErrInvalidParams{Context: "StartAssessmentRunInput"} 7702 if s.AssessmentRunName != nil && len(*s.AssessmentRunName) < 1 { 7703 invalidParams.Add(request.NewErrParamMinLen("AssessmentRunName", 1)) 7704 } 7705 if s.AssessmentTemplateArn == nil { 7706 invalidParams.Add(request.NewErrParamRequired("AssessmentTemplateArn")) 7707 } 7708 if s.AssessmentTemplateArn != nil && len(*s.AssessmentTemplateArn) < 1 { 7709 invalidParams.Add(request.NewErrParamMinLen("AssessmentTemplateArn", 1)) 7710 } 7711 7712 if invalidParams.Len() > 0 { 7713 return invalidParams 7714 } 7715 return nil 7716} 7717 7718// SetAssessmentRunName sets the AssessmentRunName field's value. 7719func (s *StartAssessmentRunInput) SetAssessmentRunName(v string) *StartAssessmentRunInput { 7720 s.AssessmentRunName = &v 7721 return s 7722} 7723 7724// SetAssessmentTemplateArn sets the AssessmentTemplateArn field's value. 7725func (s *StartAssessmentRunInput) SetAssessmentTemplateArn(v string) *StartAssessmentRunInput { 7726 s.AssessmentTemplateArn = &v 7727 return s 7728} 7729 7730// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/StartAssessmentRunResponse 7731type StartAssessmentRunOutput struct { 7732 _ struct{} `type:"structure"` 7733 7734 // The ARN of the assessment run that has been started. 7735 // 7736 // AssessmentRunArn is a required field 7737 AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"` 7738} 7739 7740// String returns the string representation 7741func (s StartAssessmentRunOutput) String() string { 7742 return awsutil.Prettify(s) 7743} 7744 7745// GoString returns the string representation 7746func (s StartAssessmentRunOutput) GoString() string { 7747 return s.String() 7748} 7749 7750// SetAssessmentRunArn sets the AssessmentRunArn field's value. 7751func (s *StartAssessmentRunOutput) SetAssessmentRunArn(v string) *StartAssessmentRunOutput { 7752 s.AssessmentRunArn = &v 7753 return s 7754} 7755 7756// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/StopAssessmentRunRequest 7757type StopAssessmentRunInput struct { 7758 _ struct{} `type:"structure"` 7759 7760 // The ARN of the assessment run that you want to stop. 7761 // 7762 // AssessmentRunArn is a required field 7763 AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"` 7764 7765 // An input option that can be set to either START_EVALUATION or SKIP_EVALUATION. 7766 // START_EVALUATION (the default value), stops the AWS agent from collecting 7767 // data and begins the results evaluation and the findings generation process. 7768 // SKIP_EVALUATION cancels the assessment run immediately, after which no findings 7769 // are generated. 7770 StopAction *string `locationName:"stopAction" type:"string" enum:"StopAction"` 7771} 7772 7773// String returns the string representation 7774func (s StopAssessmentRunInput) String() string { 7775 return awsutil.Prettify(s) 7776} 7777 7778// GoString returns the string representation 7779func (s StopAssessmentRunInput) GoString() string { 7780 return s.String() 7781} 7782 7783// Validate inspects the fields of the type to determine if they are valid. 7784func (s *StopAssessmentRunInput) Validate() error { 7785 invalidParams := request.ErrInvalidParams{Context: "StopAssessmentRunInput"} 7786 if s.AssessmentRunArn == nil { 7787 invalidParams.Add(request.NewErrParamRequired("AssessmentRunArn")) 7788 } 7789 if s.AssessmentRunArn != nil && len(*s.AssessmentRunArn) < 1 { 7790 invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArn", 1)) 7791 } 7792 7793 if invalidParams.Len() > 0 { 7794 return invalidParams 7795 } 7796 return nil 7797} 7798 7799// SetAssessmentRunArn sets the AssessmentRunArn field's value. 7800func (s *StopAssessmentRunInput) SetAssessmentRunArn(v string) *StopAssessmentRunInput { 7801 s.AssessmentRunArn = &v 7802 return s 7803} 7804 7805// SetStopAction sets the StopAction field's value. 7806func (s *StopAssessmentRunInput) SetStopAction(v string) *StopAssessmentRunInput { 7807 s.StopAction = &v 7808 return s 7809} 7810 7811// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/StopAssessmentRunOutput 7812type StopAssessmentRunOutput struct { 7813 _ struct{} `type:"structure"` 7814} 7815 7816// String returns the string representation 7817func (s StopAssessmentRunOutput) String() string { 7818 return awsutil.Prettify(s) 7819} 7820 7821// GoString returns the string representation 7822func (s StopAssessmentRunOutput) GoString() string { 7823 return s.String() 7824} 7825 7826// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/SubscribeToEventRequest 7827type SubscribeToEventInput struct { 7828 _ struct{} `type:"structure"` 7829 7830 // The event for which you want to receive SNS notifications. 7831 // 7832 // Event is a required field 7833 Event *string `locationName:"event" type:"string" required:"true" enum:"Event"` 7834 7835 // The ARN of the assessment template that is used during the event for which 7836 // you want to receive SNS notifications. 7837 // 7838 // ResourceArn is a required field 7839 ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` 7840 7841 // The ARN of the SNS topic to which the SNS notifications are sent. 7842 // 7843 // TopicArn is a required field 7844 TopicArn *string `locationName:"topicArn" min:"1" type:"string" required:"true"` 7845} 7846 7847// String returns the string representation 7848func (s SubscribeToEventInput) String() string { 7849 return awsutil.Prettify(s) 7850} 7851 7852// GoString returns the string representation 7853func (s SubscribeToEventInput) GoString() string { 7854 return s.String() 7855} 7856 7857// Validate inspects the fields of the type to determine if they are valid. 7858func (s *SubscribeToEventInput) Validate() error { 7859 invalidParams := request.ErrInvalidParams{Context: "SubscribeToEventInput"} 7860 if s.Event == nil { 7861 invalidParams.Add(request.NewErrParamRequired("Event")) 7862 } 7863 if s.ResourceArn == nil { 7864 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 7865 } 7866 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 7867 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 7868 } 7869 if s.TopicArn == nil { 7870 invalidParams.Add(request.NewErrParamRequired("TopicArn")) 7871 } 7872 if s.TopicArn != nil && len(*s.TopicArn) < 1 { 7873 invalidParams.Add(request.NewErrParamMinLen("TopicArn", 1)) 7874 } 7875 7876 if invalidParams.Len() > 0 { 7877 return invalidParams 7878 } 7879 return nil 7880} 7881 7882// SetEvent sets the Event field's value. 7883func (s *SubscribeToEventInput) SetEvent(v string) *SubscribeToEventInput { 7884 s.Event = &v 7885 return s 7886} 7887 7888// SetResourceArn sets the ResourceArn field's value. 7889func (s *SubscribeToEventInput) SetResourceArn(v string) *SubscribeToEventInput { 7890 s.ResourceArn = &v 7891 return s 7892} 7893 7894// SetTopicArn sets the TopicArn field's value. 7895func (s *SubscribeToEventInput) SetTopicArn(v string) *SubscribeToEventInput { 7896 s.TopicArn = &v 7897 return s 7898} 7899 7900// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/SubscribeToEventOutput 7901type SubscribeToEventOutput struct { 7902 _ struct{} `type:"structure"` 7903} 7904 7905// String returns the string representation 7906func (s SubscribeToEventOutput) String() string { 7907 return awsutil.Prettify(s) 7908} 7909 7910// GoString returns the string representation 7911func (s SubscribeToEventOutput) GoString() string { 7912 return s.String() 7913} 7914 7915// This data type is used as a response element in the ListEventSubscriptions 7916// action. 7917// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/Subscription 7918type Subscription struct { 7919 _ struct{} `type:"structure"` 7920 7921 // The list of existing event subscriptions. 7922 // 7923 // EventSubscriptions is a required field 7924 EventSubscriptions []*EventSubscription `locationName:"eventSubscriptions" min:"1" type:"list" required:"true"` 7925 7926 // The ARN of the assessment template that is used during the event for which 7927 // the SNS notification is sent. 7928 // 7929 // ResourceArn is a required field 7930 ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` 7931 7932 // The ARN of the Amazon Simple Notification Service (SNS) topic to which the 7933 // SNS notifications are sent. 7934 // 7935 // TopicArn is a required field 7936 TopicArn *string `locationName:"topicArn" min:"1" type:"string" required:"true"` 7937} 7938 7939// String returns the string representation 7940func (s Subscription) String() string { 7941 return awsutil.Prettify(s) 7942} 7943 7944// GoString returns the string representation 7945func (s Subscription) GoString() string { 7946 return s.String() 7947} 7948 7949// SetEventSubscriptions sets the EventSubscriptions field's value. 7950func (s *Subscription) SetEventSubscriptions(v []*EventSubscription) *Subscription { 7951 s.EventSubscriptions = v 7952 return s 7953} 7954 7955// SetResourceArn sets the ResourceArn field's value. 7956func (s *Subscription) SetResourceArn(v string) *Subscription { 7957 s.ResourceArn = &v 7958 return s 7959} 7960 7961// SetTopicArn sets the TopicArn field's value. 7962func (s *Subscription) SetTopicArn(v string) *Subscription { 7963 s.TopicArn = &v 7964 return s 7965} 7966 7967// A key and value pair. This data type is used as a request parameter in the 7968// SetTagsForResource action and a response element in the ListTagsForResource 7969// action. 7970// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/Tag 7971type Tag struct { 7972 _ struct{} `type:"structure"` 7973 7974 // A tag key. 7975 // 7976 // Key is a required field 7977 Key *string `locationName:"key" min:"1" type:"string" required:"true"` 7978 7979 // A value assigned to a tag key. 7980 Value *string `locationName:"value" min:"1" type:"string"` 7981} 7982 7983// String returns the string representation 7984func (s Tag) String() string { 7985 return awsutil.Prettify(s) 7986} 7987 7988// GoString returns the string representation 7989func (s Tag) GoString() string { 7990 return s.String() 7991} 7992 7993// Validate inspects the fields of the type to determine if they are valid. 7994func (s *Tag) Validate() error { 7995 invalidParams := request.ErrInvalidParams{Context: "Tag"} 7996 if s.Key == nil { 7997 invalidParams.Add(request.NewErrParamRequired("Key")) 7998 } 7999 if s.Key != nil && len(*s.Key) < 1 { 8000 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 8001 } 8002 if s.Value != nil && len(*s.Value) < 1 { 8003 invalidParams.Add(request.NewErrParamMinLen("Value", 1)) 8004 } 8005 8006 if invalidParams.Len() > 0 { 8007 return invalidParams 8008 } 8009 return nil 8010} 8011 8012// SetKey sets the Key field's value. 8013func (s *Tag) SetKey(v string) *Tag { 8014 s.Key = &v 8015 return s 8016} 8017 8018// SetValue sets the Value field's value. 8019func (s *Tag) SetValue(v string) *Tag { 8020 s.Value = &v 8021 return s 8022} 8023 8024// The metadata about the Amazon Inspector application data metrics collected 8025// by the agent. This data type is used as the response element in the GetTelemetryMetadata 8026// action. 8027// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/TelemetryMetadata 8028type TelemetryMetadata struct { 8029 _ struct{} `type:"structure"` 8030 8031 // The count of messages that the agent sends to the Amazon Inspector service. 8032 // 8033 // Count is a required field 8034 Count *int64 `locationName:"count" type:"long" required:"true"` 8035 8036 // The data size of messages that the agent sends to the Amazon Inspector service. 8037 DataSize *int64 `locationName:"dataSize" type:"long"` 8038 8039 // A specific type of behavioral data that is collected by the agent. 8040 // 8041 // MessageType is a required field 8042 MessageType *string `locationName:"messageType" min:"1" type:"string" required:"true"` 8043} 8044 8045// String returns the string representation 8046func (s TelemetryMetadata) String() string { 8047 return awsutil.Prettify(s) 8048} 8049 8050// GoString returns the string representation 8051func (s TelemetryMetadata) GoString() string { 8052 return s.String() 8053} 8054 8055// SetCount sets the Count field's value. 8056func (s *TelemetryMetadata) SetCount(v int64) *TelemetryMetadata { 8057 s.Count = &v 8058 return s 8059} 8060 8061// SetDataSize sets the DataSize field's value. 8062func (s *TelemetryMetadata) SetDataSize(v int64) *TelemetryMetadata { 8063 s.DataSize = &v 8064 return s 8065} 8066 8067// SetMessageType sets the MessageType field's value. 8068func (s *TelemetryMetadata) SetMessageType(v string) *TelemetryMetadata { 8069 s.MessageType = &v 8070 return s 8071} 8072 8073// This data type is used in the AssessmentRunFilter data type. 8074// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/TimestampRange 8075type TimestampRange struct { 8076 _ struct{} `type:"structure"` 8077 8078 // The minimum value of the timestamp range. 8079 BeginDate *time.Time `locationName:"beginDate" type:"timestamp" timestampFormat:"unix"` 8080 8081 // The maximum value of the timestamp range. 8082 EndDate *time.Time `locationName:"endDate" type:"timestamp" timestampFormat:"unix"` 8083} 8084 8085// String returns the string representation 8086func (s TimestampRange) String() string { 8087 return awsutil.Prettify(s) 8088} 8089 8090// GoString returns the string representation 8091func (s TimestampRange) GoString() string { 8092 return s.String() 8093} 8094 8095// SetBeginDate sets the BeginDate field's value. 8096func (s *TimestampRange) SetBeginDate(v time.Time) *TimestampRange { 8097 s.BeginDate = &v 8098 return s 8099} 8100 8101// SetEndDate sets the EndDate field's value. 8102func (s *TimestampRange) SetEndDate(v time.Time) *TimestampRange { 8103 s.EndDate = &v 8104 return s 8105} 8106 8107// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/UnsubscribeFromEventRequest 8108type UnsubscribeFromEventInput struct { 8109 _ struct{} `type:"structure"` 8110 8111 // The event for which you want to stop receiving SNS notifications. 8112 // 8113 // Event is a required field 8114 Event *string `locationName:"event" type:"string" required:"true" enum:"Event"` 8115 8116 // The ARN of the assessment template that is used during the event for which 8117 // you want to stop receiving SNS notifications. 8118 // 8119 // ResourceArn is a required field 8120 ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` 8121 8122 // The ARN of the SNS topic to which SNS notifications are sent. 8123 // 8124 // TopicArn is a required field 8125 TopicArn *string `locationName:"topicArn" min:"1" type:"string" required:"true"` 8126} 8127 8128// String returns the string representation 8129func (s UnsubscribeFromEventInput) String() string { 8130 return awsutil.Prettify(s) 8131} 8132 8133// GoString returns the string representation 8134func (s UnsubscribeFromEventInput) GoString() string { 8135 return s.String() 8136} 8137 8138// Validate inspects the fields of the type to determine if they are valid. 8139func (s *UnsubscribeFromEventInput) Validate() error { 8140 invalidParams := request.ErrInvalidParams{Context: "UnsubscribeFromEventInput"} 8141 if s.Event == nil { 8142 invalidParams.Add(request.NewErrParamRequired("Event")) 8143 } 8144 if s.ResourceArn == nil { 8145 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 8146 } 8147 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 8148 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 8149 } 8150 if s.TopicArn == nil { 8151 invalidParams.Add(request.NewErrParamRequired("TopicArn")) 8152 } 8153 if s.TopicArn != nil && len(*s.TopicArn) < 1 { 8154 invalidParams.Add(request.NewErrParamMinLen("TopicArn", 1)) 8155 } 8156 8157 if invalidParams.Len() > 0 { 8158 return invalidParams 8159 } 8160 return nil 8161} 8162 8163// SetEvent sets the Event field's value. 8164func (s *UnsubscribeFromEventInput) SetEvent(v string) *UnsubscribeFromEventInput { 8165 s.Event = &v 8166 return s 8167} 8168 8169// SetResourceArn sets the ResourceArn field's value. 8170func (s *UnsubscribeFromEventInput) SetResourceArn(v string) *UnsubscribeFromEventInput { 8171 s.ResourceArn = &v 8172 return s 8173} 8174 8175// SetTopicArn sets the TopicArn field's value. 8176func (s *UnsubscribeFromEventInput) SetTopicArn(v string) *UnsubscribeFromEventInput { 8177 s.TopicArn = &v 8178 return s 8179} 8180 8181// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/UnsubscribeFromEventOutput 8182type UnsubscribeFromEventOutput struct { 8183 _ struct{} `type:"structure"` 8184} 8185 8186// String returns the string representation 8187func (s UnsubscribeFromEventOutput) String() string { 8188 return awsutil.Prettify(s) 8189} 8190 8191// GoString returns the string representation 8192func (s UnsubscribeFromEventOutput) GoString() string { 8193 return s.String() 8194} 8195 8196// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/UpdateAssessmentTargetRequest 8197type UpdateAssessmentTargetInput struct { 8198 _ struct{} `type:"structure"` 8199 8200 // The ARN of the assessment target that you want to update. 8201 // 8202 // AssessmentTargetArn is a required field 8203 AssessmentTargetArn *string `locationName:"assessmentTargetArn" min:"1" type:"string" required:"true"` 8204 8205 // The name of the assessment target that you want to update. 8206 // 8207 // AssessmentTargetName is a required field 8208 AssessmentTargetName *string `locationName:"assessmentTargetName" min:"1" type:"string" required:"true"` 8209 8210 // The ARN of the resource group that is used to specify the new resource group 8211 // to associate with the assessment target. 8212 // 8213 // ResourceGroupArn is a required field 8214 ResourceGroupArn *string `locationName:"resourceGroupArn" min:"1" type:"string" required:"true"` 8215} 8216 8217// String returns the string representation 8218func (s UpdateAssessmentTargetInput) String() string { 8219 return awsutil.Prettify(s) 8220} 8221 8222// GoString returns the string representation 8223func (s UpdateAssessmentTargetInput) GoString() string { 8224 return s.String() 8225} 8226 8227// Validate inspects the fields of the type to determine if they are valid. 8228func (s *UpdateAssessmentTargetInput) Validate() error { 8229 invalidParams := request.ErrInvalidParams{Context: "UpdateAssessmentTargetInput"} 8230 if s.AssessmentTargetArn == nil { 8231 invalidParams.Add(request.NewErrParamRequired("AssessmentTargetArn")) 8232 } 8233 if s.AssessmentTargetArn != nil && len(*s.AssessmentTargetArn) < 1 { 8234 invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetArn", 1)) 8235 } 8236 if s.AssessmentTargetName == nil { 8237 invalidParams.Add(request.NewErrParamRequired("AssessmentTargetName")) 8238 } 8239 if s.AssessmentTargetName != nil && len(*s.AssessmentTargetName) < 1 { 8240 invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetName", 1)) 8241 } 8242 if s.ResourceGroupArn == nil { 8243 invalidParams.Add(request.NewErrParamRequired("ResourceGroupArn")) 8244 } 8245 if s.ResourceGroupArn != nil && len(*s.ResourceGroupArn) < 1 { 8246 invalidParams.Add(request.NewErrParamMinLen("ResourceGroupArn", 1)) 8247 } 8248 8249 if invalidParams.Len() > 0 { 8250 return invalidParams 8251 } 8252 return nil 8253} 8254 8255// SetAssessmentTargetArn sets the AssessmentTargetArn field's value. 8256func (s *UpdateAssessmentTargetInput) SetAssessmentTargetArn(v string) *UpdateAssessmentTargetInput { 8257 s.AssessmentTargetArn = &v 8258 return s 8259} 8260 8261// SetAssessmentTargetName sets the AssessmentTargetName field's value. 8262func (s *UpdateAssessmentTargetInput) SetAssessmentTargetName(v string) *UpdateAssessmentTargetInput { 8263 s.AssessmentTargetName = &v 8264 return s 8265} 8266 8267// SetResourceGroupArn sets the ResourceGroupArn field's value. 8268func (s *UpdateAssessmentTargetInput) SetResourceGroupArn(v string) *UpdateAssessmentTargetInput { 8269 s.ResourceGroupArn = &v 8270 return s 8271} 8272 8273// Please also see https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/UpdateAssessmentTargetOutput 8274type UpdateAssessmentTargetOutput struct { 8275 _ struct{} `type:"structure"` 8276} 8277 8278// String returns the string representation 8279func (s UpdateAssessmentTargetOutput) String() string { 8280 return awsutil.Prettify(s) 8281} 8282 8283// GoString returns the string representation 8284func (s UpdateAssessmentTargetOutput) GoString() string { 8285 return s.String() 8286} 8287 8288const ( 8289 // AccessDeniedErrorCodeAccessDeniedToAssessmentTarget is a AccessDeniedErrorCode enum value 8290 AccessDeniedErrorCodeAccessDeniedToAssessmentTarget = "ACCESS_DENIED_TO_ASSESSMENT_TARGET" 8291 8292 // AccessDeniedErrorCodeAccessDeniedToAssessmentTemplate is a AccessDeniedErrorCode enum value 8293 AccessDeniedErrorCodeAccessDeniedToAssessmentTemplate = "ACCESS_DENIED_TO_ASSESSMENT_TEMPLATE" 8294 8295 // AccessDeniedErrorCodeAccessDeniedToAssessmentRun is a AccessDeniedErrorCode enum value 8296 AccessDeniedErrorCodeAccessDeniedToAssessmentRun = "ACCESS_DENIED_TO_ASSESSMENT_RUN" 8297 8298 // AccessDeniedErrorCodeAccessDeniedToFinding is a AccessDeniedErrorCode enum value 8299 AccessDeniedErrorCodeAccessDeniedToFinding = "ACCESS_DENIED_TO_FINDING" 8300 8301 // AccessDeniedErrorCodeAccessDeniedToResourceGroup is a AccessDeniedErrorCode enum value 8302 AccessDeniedErrorCodeAccessDeniedToResourceGroup = "ACCESS_DENIED_TO_RESOURCE_GROUP" 8303 8304 // AccessDeniedErrorCodeAccessDeniedToRulesPackage is a AccessDeniedErrorCode enum value 8305 AccessDeniedErrorCodeAccessDeniedToRulesPackage = "ACCESS_DENIED_TO_RULES_PACKAGE" 8306 8307 // AccessDeniedErrorCodeAccessDeniedToSnsTopic is a AccessDeniedErrorCode enum value 8308 AccessDeniedErrorCodeAccessDeniedToSnsTopic = "ACCESS_DENIED_TO_SNS_TOPIC" 8309 8310 // AccessDeniedErrorCodeAccessDeniedToIamRole is a AccessDeniedErrorCode enum value 8311 AccessDeniedErrorCodeAccessDeniedToIamRole = "ACCESS_DENIED_TO_IAM_ROLE" 8312) 8313 8314const ( 8315 // AgentHealthHealthy is a AgentHealth enum value 8316 AgentHealthHealthy = "HEALTHY" 8317 8318 // AgentHealthUnhealthy is a AgentHealth enum value 8319 AgentHealthUnhealthy = "UNHEALTHY" 8320) 8321 8322const ( 8323 // AgentHealthCodeIdle is a AgentHealthCode enum value 8324 AgentHealthCodeIdle = "IDLE" 8325 8326 // AgentHealthCodeRunning is a AgentHealthCode enum value 8327 AgentHealthCodeRunning = "RUNNING" 8328 8329 // AgentHealthCodeShutdown is a AgentHealthCode enum value 8330 AgentHealthCodeShutdown = "SHUTDOWN" 8331 8332 // AgentHealthCodeUnhealthy is a AgentHealthCode enum value 8333 AgentHealthCodeUnhealthy = "UNHEALTHY" 8334 8335 // AgentHealthCodeThrottled is a AgentHealthCode enum value 8336 AgentHealthCodeThrottled = "THROTTLED" 8337 8338 // AgentHealthCodeUnknown is a AgentHealthCode enum value 8339 AgentHealthCodeUnknown = "UNKNOWN" 8340) 8341 8342const ( 8343 // AssessmentRunNotificationSnsStatusCodeSuccess is a AssessmentRunNotificationSnsStatusCode enum value 8344 AssessmentRunNotificationSnsStatusCodeSuccess = "SUCCESS" 8345 8346 // AssessmentRunNotificationSnsStatusCodeTopicDoesNotExist is a AssessmentRunNotificationSnsStatusCode enum value 8347 AssessmentRunNotificationSnsStatusCodeTopicDoesNotExist = "TOPIC_DOES_NOT_EXIST" 8348 8349 // AssessmentRunNotificationSnsStatusCodeAccessDenied is a AssessmentRunNotificationSnsStatusCode enum value 8350 AssessmentRunNotificationSnsStatusCodeAccessDenied = "ACCESS_DENIED" 8351 8352 // AssessmentRunNotificationSnsStatusCodeInternalError is a AssessmentRunNotificationSnsStatusCode enum value 8353 AssessmentRunNotificationSnsStatusCodeInternalError = "INTERNAL_ERROR" 8354) 8355 8356const ( 8357 // AssessmentRunStateCreated is a AssessmentRunState enum value 8358 AssessmentRunStateCreated = "CREATED" 8359 8360 // AssessmentRunStateStartDataCollectionPending is a AssessmentRunState enum value 8361 AssessmentRunStateStartDataCollectionPending = "START_DATA_COLLECTION_PENDING" 8362 8363 // AssessmentRunStateStartDataCollectionInProgress is a AssessmentRunState enum value 8364 AssessmentRunStateStartDataCollectionInProgress = "START_DATA_COLLECTION_IN_PROGRESS" 8365 8366 // AssessmentRunStateCollectingData is a AssessmentRunState enum value 8367 AssessmentRunStateCollectingData = "COLLECTING_DATA" 8368 8369 // AssessmentRunStateStopDataCollectionPending is a AssessmentRunState enum value 8370 AssessmentRunStateStopDataCollectionPending = "STOP_DATA_COLLECTION_PENDING" 8371 8372 // AssessmentRunStateDataCollected is a AssessmentRunState enum value 8373 AssessmentRunStateDataCollected = "DATA_COLLECTED" 8374 8375 // AssessmentRunStateStartEvaluatingRulesPending is a AssessmentRunState enum value 8376 AssessmentRunStateStartEvaluatingRulesPending = "START_EVALUATING_RULES_PENDING" 8377 8378 // AssessmentRunStateEvaluatingRules is a AssessmentRunState enum value 8379 AssessmentRunStateEvaluatingRules = "EVALUATING_RULES" 8380 8381 // AssessmentRunStateFailed is a AssessmentRunState enum value 8382 AssessmentRunStateFailed = "FAILED" 8383 8384 // AssessmentRunStateError is a AssessmentRunState enum value 8385 AssessmentRunStateError = "ERROR" 8386 8387 // AssessmentRunStateCompleted is a AssessmentRunState enum value 8388 AssessmentRunStateCompleted = "COMPLETED" 8389 8390 // AssessmentRunStateCompletedWithErrors is a AssessmentRunState enum value 8391 AssessmentRunStateCompletedWithErrors = "COMPLETED_WITH_ERRORS" 8392 8393 // AssessmentRunStateCanceled is a AssessmentRunState enum value 8394 AssessmentRunStateCanceled = "CANCELED" 8395) 8396 8397const ( 8398 // AssetTypeEc2Instance is a AssetType enum value 8399 AssetTypeEc2Instance = "ec2-instance" 8400) 8401 8402const ( 8403 // EventAssessmentRunStarted is a Event enum value 8404 EventAssessmentRunStarted = "ASSESSMENT_RUN_STARTED" 8405 8406 // EventAssessmentRunCompleted is a Event enum value 8407 EventAssessmentRunCompleted = "ASSESSMENT_RUN_COMPLETED" 8408 8409 // EventAssessmentRunStateChanged is a Event enum value 8410 EventAssessmentRunStateChanged = "ASSESSMENT_RUN_STATE_CHANGED" 8411 8412 // EventFindingReported is a Event enum value 8413 EventFindingReported = "FINDING_REPORTED" 8414 8415 // EventOther is a Event enum value 8416 EventOther = "OTHER" 8417) 8418 8419const ( 8420 // FailedItemErrorCodeInvalidArn is a FailedItemErrorCode enum value 8421 FailedItemErrorCodeInvalidArn = "INVALID_ARN" 8422 8423 // FailedItemErrorCodeDuplicateArn is a FailedItemErrorCode enum value 8424 FailedItemErrorCodeDuplicateArn = "DUPLICATE_ARN" 8425 8426 // FailedItemErrorCodeItemDoesNotExist is a FailedItemErrorCode enum value 8427 FailedItemErrorCodeItemDoesNotExist = "ITEM_DOES_NOT_EXIST" 8428 8429 // FailedItemErrorCodeAccessDenied is a FailedItemErrorCode enum value 8430 FailedItemErrorCodeAccessDenied = "ACCESS_DENIED" 8431 8432 // FailedItemErrorCodeLimitExceeded is a FailedItemErrorCode enum value 8433 FailedItemErrorCodeLimitExceeded = "LIMIT_EXCEEDED" 8434 8435 // FailedItemErrorCodeInternalError is a FailedItemErrorCode enum value 8436 FailedItemErrorCodeInternalError = "INTERNAL_ERROR" 8437) 8438 8439const ( 8440 // InvalidCrossAccountRoleErrorCodeRoleDoesNotExistOrInvalidTrustRelationship is a InvalidCrossAccountRoleErrorCode enum value 8441 InvalidCrossAccountRoleErrorCodeRoleDoesNotExistOrInvalidTrustRelationship = "ROLE_DOES_NOT_EXIST_OR_INVALID_TRUST_RELATIONSHIP" 8442 8443 // InvalidCrossAccountRoleErrorCodeRoleDoesNotHaveCorrectPolicy is a InvalidCrossAccountRoleErrorCode enum value 8444 InvalidCrossAccountRoleErrorCodeRoleDoesNotHaveCorrectPolicy = "ROLE_DOES_NOT_HAVE_CORRECT_POLICY" 8445) 8446 8447const ( 8448 // InvalidInputErrorCodeInvalidAssessmentTargetArn is a InvalidInputErrorCode enum value 8449 InvalidInputErrorCodeInvalidAssessmentTargetArn = "INVALID_ASSESSMENT_TARGET_ARN" 8450 8451 // InvalidInputErrorCodeInvalidAssessmentTemplateArn is a InvalidInputErrorCode enum value 8452 InvalidInputErrorCodeInvalidAssessmentTemplateArn = "INVALID_ASSESSMENT_TEMPLATE_ARN" 8453 8454 // InvalidInputErrorCodeInvalidAssessmentRunArn is a InvalidInputErrorCode enum value 8455 InvalidInputErrorCodeInvalidAssessmentRunArn = "INVALID_ASSESSMENT_RUN_ARN" 8456 8457 // InvalidInputErrorCodeInvalidFindingArn is a InvalidInputErrorCode enum value 8458 InvalidInputErrorCodeInvalidFindingArn = "INVALID_FINDING_ARN" 8459 8460 // InvalidInputErrorCodeInvalidResourceGroupArn is a InvalidInputErrorCode enum value 8461 InvalidInputErrorCodeInvalidResourceGroupArn = "INVALID_RESOURCE_GROUP_ARN" 8462 8463 // InvalidInputErrorCodeInvalidRulesPackageArn is a InvalidInputErrorCode enum value 8464 InvalidInputErrorCodeInvalidRulesPackageArn = "INVALID_RULES_PACKAGE_ARN" 8465 8466 // InvalidInputErrorCodeInvalidResourceArn is a InvalidInputErrorCode enum value 8467 InvalidInputErrorCodeInvalidResourceArn = "INVALID_RESOURCE_ARN" 8468 8469 // InvalidInputErrorCodeInvalidSnsTopicArn is a InvalidInputErrorCode enum value 8470 InvalidInputErrorCodeInvalidSnsTopicArn = "INVALID_SNS_TOPIC_ARN" 8471 8472 // InvalidInputErrorCodeInvalidIamRoleArn is a InvalidInputErrorCode enum value 8473 InvalidInputErrorCodeInvalidIamRoleArn = "INVALID_IAM_ROLE_ARN" 8474 8475 // InvalidInputErrorCodeInvalidAssessmentTargetName is a InvalidInputErrorCode enum value 8476 InvalidInputErrorCodeInvalidAssessmentTargetName = "INVALID_ASSESSMENT_TARGET_NAME" 8477 8478 // InvalidInputErrorCodeInvalidAssessmentTargetNamePattern is a InvalidInputErrorCode enum value 8479 InvalidInputErrorCodeInvalidAssessmentTargetNamePattern = "INVALID_ASSESSMENT_TARGET_NAME_PATTERN" 8480 8481 // InvalidInputErrorCodeInvalidAssessmentTemplateName is a InvalidInputErrorCode enum value 8482 InvalidInputErrorCodeInvalidAssessmentTemplateName = "INVALID_ASSESSMENT_TEMPLATE_NAME" 8483 8484 // InvalidInputErrorCodeInvalidAssessmentTemplateNamePattern is a InvalidInputErrorCode enum value 8485 InvalidInputErrorCodeInvalidAssessmentTemplateNamePattern = "INVALID_ASSESSMENT_TEMPLATE_NAME_PATTERN" 8486 8487 // InvalidInputErrorCodeInvalidAssessmentTemplateDuration is a InvalidInputErrorCode enum value 8488 InvalidInputErrorCodeInvalidAssessmentTemplateDuration = "INVALID_ASSESSMENT_TEMPLATE_DURATION" 8489 8490 // InvalidInputErrorCodeInvalidAssessmentTemplateDurationRange is a InvalidInputErrorCode enum value 8491 InvalidInputErrorCodeInvalidAssessmentTemplateDurationRange = "INVALID_ASSESSMENT_TEMPLATE_DURATION_RANGE" 8492 8493 // InvalidInputErrorCodeInvalidAssessmentRunDurationRange is a InvalidInputErrorCode enum value 8494 InvalidInputErrorCodeInvalidAssessmentRunDurationRange = "INVALID_ASSESSMENT_RUN_DURATION_RANGE" 8495 8496 // InvalidInputErrorCodeInvalidAssessmentRunStartTimeRange is a InvalidInputErrorCode enum value 8497 InvalidInputErrorCodeInvalidAssessmentRunStartTimeRange = "INVALID_ASSESSMENT_RUN_START_TIME_RANGE" 8498 8499 // InvalidInputErrorCodeInvalidAssessmentRunCompletionTimeRange is a InvalidInputErrorCode enum value 8500 InvalidInputErrorCodeInvalidAssessmentRunCompletionTimeRange = "INVALID_ASSESSMENT_RUN_COMPLETION_TIME_RANGE" 8501 8502 // InvalidInputErrorCodeInvalidAssessmentRunStateChangeTimeRange is a InvalidInputErrorCode enum value 8503 InvalidInputErrorCodeInvalidAssessmentRunStateChangeTimeRange = "INVALID_ASSESSMENT_RUN_STATE_CHANGE_TIME_RANGE" 8504 8505 // InvalidInputErrorCodeInvalidAssessmentRunState is a InvalidInputErrorCode enum value 8506 InvalidInputErrorCodeInvalidAssessmentRunState = "INVALID_ASSESSMENT_RUN_STATE" 8507 8508 // InvalidInputErrorCodeInvalidTag is a InvalidInputErrorCode enum value 8509 InvalidInputErrorCodeInvalidTag = "INVALID_TAG" 8510 8511 // InvalidInputErrorCodeInvalidTagKey is a InvalidInputErrorCode enum value 8512 InvalidInputErrorCodeInvalidTagKey = "INVALID_TAG_KEY" 8513 8514 // InvalidInputErrorCodeInvalidTagValue is a InvalidInputErrorCode enum value 8515 InvalidInputErrorCodeInvalidTagValue = "INVALID_TAG_VALUE" 8516 8517 // InvalidInputErrorCodeInvalidResourceGroupTagKey is a InvalidInputErrorCode enum value 8518 InvalidInputErrorCodeInvalidResourceGroupTagKey = "INVALID_RESOURCE_GROUP_TAG_KEY" 8519 8520 // InvalidInputErrorCodeInvalidResourceGroupTagValue is a InvalidInputErrorCode enum value 8521 InvalidInputErrorCodeInvalidResourceGroupTagValue = "INVALID_RESOURCE_GROUP_TAG_VALUE" 8522 8523 // InvalidInputErrorCodeInvalidAttribute is a InvalidInputErrorCode enum value 8524 InvalidInputErrorCodeInvalidAttribute = "INVALID_ATTRIBUTE" 8525 8526 // InvalidInputErrorCodeInvalidUserAttribute is a InvalidInputErrorCode enum value 8527 InvalidInputErrorCodeInvalidUserAttribute = "INVALID_USER_ATTRIBUTE" 8528 8529 // InvalidInputErrorCodeInvalidUserAttributeKey is a InvalidInputErrorCode enum value 8530 InvalidInputErrorCodeInvalidUserAttributeKey = "INVALID_USER_ATTRIBUTE_KEY" 8531 8532 // InvalidInputErrorCodeInvalidUserAttributeValue is a InvalidInputErrorCode enum value 8533 InvalidInputErrorCodeInvalidUserAttributeValue = "INVALID_USER_ATTRIBUTE_VALUE" 8534 8535 // InvalidInputErrorCodeInvalidPaginationToken is a InvalidInputErrorCode enum value 8536 InvalidInputErrorCodeInvalidPaginationToken = "INVALID_PAGINATION_TOKEN" 8537 8538 // InvalidInputErrorCodeInvalidMaxResults is a InvalidInputErrorCode enum value 8539 InvalidInputErrorCodeInvalidMaxResults = "INVALID_MAX_RESULTS" 8540 8541 // InvalidInputErrorCodeInvalidAgentId is a InvalidInputErrorCode enum value 8542 InvalidInputErrorCodeInvalidAgentId = "INVALID_AGENT_ID" 8543 8544 // InvalidInputErrorCodeInvalidAutoScalingGroup is a InvalidInputErrorCode enum value 8545 InvalidInputErrorCodeInvalidAutoScalingGroup = "INVALID_AUTO_SCALING_GROUP" 8546 8547 // InvalidInputErrorCodeInvalidRuleName is a InvalidInputErrorCode enum value 8548 InvalidInputErrorCodeInvalidRuleName = "INVALID_RULE_NAME" 8549 8550 // InvalidInputErrorCodeInvalidSeverity is a InvalidInputErrorCode enum value 8551 InvalidInputErrorCodeInvalidSeverity = "INVALID_SEVERITY" 8552 8553 // InvalidInputErrorCodeInvalidLocale is a InvalidInputErrorCode enum value 8554 InvalidInputErrorCodeInvalidLocale = "INVALID_LOCALE" 8555 8556 // InvalidInputErrorCodeInvalidEvent is a InvalidInputErrorCode enum value 8557 InvalidInputErrorCodeInvalidEvent = "INVALID_EVENT" 8558 8559 // InvalidInputErrorCodeAssessmentTargetNameAlreadyTaken is a InvalidInputErrorCode enum value 8560 InvalidInputErrorCodeAssessmentTargetNameAlreadyTaken = "ASSESSMENT_TARGET_NAME_ALREADY_TAKEN" 8561 8562 // InvalidInputErrorCodeAssessmentTemplateNameAlreadyTaken is a InvalidInputErrorCode enum value 8563 InvalidInputErrorCodeAssessmentTemplateNameAlreadyTaken = "ASSESSMENT_TEMPLATE_NAME_ALREADY_TAKEN" 8564 8565 // InvalidInputErrorCodeInvalidNumberOfAssessmentTargetArns is a InvalidInputErrorCode enum value 8566 InvalidInputErrorCodeInvalidNumberOfAssessmentTargetArns = "INVALID_NUMBER_OF_ASSESSMENT_TARGET_ARNS" 8567 8568 // InvalidInputErrorCodeInvalidNumberOfAssessmentTemplateArns is a InvalidInputErrorCode enum value 8569 InvalidInputErrorCodeInvalidNumberOfAssessmentTemplateArns = "INVALID_NUMBER_OF_ASSESSMENT_TEMPLATE_ARNS" 8570 8571 // InvalidInputErrorCodeInvalidNumberOfAssessmentRunArns is a InvalidInputErrorCode enum value 8572 InvalidInputErrorCodeInvalidNumberOfAssessmentRunArns = "INVALID_NUMBER_OF_ASSESSMENT_RUN_ARNS" 8573 8574 // InvalidInputErrorCodeInvalidNumberOfFindingArns is a InvalidInputErrorCode enum value 8575 InvalidInputErrorCodeInvalidNumberOfFindingArns = "INVALID_NUMBER_OF_FINDING_ARNS" 8576 8577 // InvalidInputErrorCodeInvalidNumberOfResourceGroupArns is a InvalidInputErrorCode enum value 8578 InvalidInputErrorCodeInvalidNumberOfResourceGroupArns = "INVALID_NUMBER_OF_RESOURCE_GROUP_ARNS" 8579 8580 // InvalidInputErrorCodeInvalidNumberOfRulesPackageArns is a InvalidInputErrorCode enum value 8581 InvalidInputErrorCodeInvalidNumberOfRulesPackageArns = "INVALID_NUMBER_OF_RULES_PACKAGE_ARNS" 8582 8583 // InvalidInputErrorCodeInvalidNumberOfAssessmentRunStates is a InvalidInputErrorCode enum value 8584 InvalidInputErrorCodeInvalidNumberOfAssessmentRunStates = "INVALID_NUMBER_OF_ASSESSMENT_RUN_STATES" 8585 8586 // InvalidInputErrorCodeInvalidNumberOfTags is a InvalidInputErrorCode enum value 8587 InvalidInputErrorCodeInvalidNumberOfTags = "INVALID_NUMBER_OF_TAGS" 8588 8589 // InvalidInputErrorCodeInvalidNumberOfResourceGroupTags is a InvalidInputErrorCode enum value 8590 InvalidInputErrorCodeInvalidNumberOfResourceGroupTags = "INVALID_NUMBER_OF_RESOURCE_GROUP_TAGS" 8591 8592 // InvalidInputErrorCodeInvalidNumberOfAttributes is a InvalidInputErrorCode enum value 8593 InvalidInputErrorCodeInvalidNumberOfAttributes = "INVALID_NUMBER_OF_ATTRIBUTES" 8594 8595 // InvalidInputErrorCodeInvalidNumberOfUserAttributes is a InvalidInputErrorCode enum value 8596 InvalidInputErrorCodeInvalidNumberOfUserAttributes = "INVALID_NUMBER_OF_USER_ATTRIBUTES" 8597 8598 // InvalidInputErrorCodeInvalidNumberOfAgentIds is a InvalidInputErrorCode enum value 8599 InvalidInputErrorCodeInvalidNumberOfAgentIds = "INVALID_NUMBER_OF_AGENT_IDS" 8600 8601 // InvalidInputErrorCodeInvalidNumberOfAutoScalingGroups is a InvalidInputErrorCode enum value 8602 InvalidInputErrorCodeInvalidNumberOfAutoScalingGroups = "INVALID_NUMBER_OF_AUTO_SCALING_GROUPS" 8603 8604 // InvalidInputErrorCodeInvalidNumberOfRuleNames is a InvalidInputErrorCode enum value 8605 InvalidInputErrorCodeInvalidNumberOfRuleNames = "INVALID_NUMBER_OF_RULE_NAMES" 8606 8607 // InvalidInputErrorCodeInvalidNumberOfSeverities is a InvalidInputErrorCode enum value 8608 InvalidInputErrorCodeInvalidNumberOfSeverities = "INVALID_NUMBER_OF_SEVERITIES" 8609) 8610 8611const ( 8612 // LimitExceededErrorCodeAssessmentTargetLimitExceeded is a LimitExceededErrorCode enum value 8613 LimitExceededErrorCodeAssessmentTargetLimitExceeded = "ASSESSMENT_TARGET_LIMIT_EXCEEDED" 8614 8615 // LimitExceededErrorCodeAssessmentTemplateLimitExceeded is a LimitExceededErrorCode enum value 8616 LimitExceededErrorCodeAssessmentTemplateLimitExceeded = "ASSESSMENT_TEMPLATE_LIMIT_EXCEEDED" 8617 8618 // LimitExceededErrorCodeAssessmentRunLimitExceeded is a LimitExceededErrorCode enum value 8619 LimitExceededErrorCodeAssessmentRunLimitExceeded = "ASSESSMENT_RUN_LIMIT_EXCEEDED" 8620 8621 // LimitExceededErrorCodeResourceGroupLimitExceeded is a LimitExceededErrorCode enum value 8622 LimitExceededErrorCodeResourceGroupLimitExceeded = "RESOURCE_GROUP_LIMIT_EXCEEDED" 8623 8624 // LimitExceededErrorCodeEventSubscriptionLimitExceeded is a LimitExceededErrorCode enum value 8625 LimitExceededErrorCodeEventSubscriptionLimitExceeded = "EVENT_SUBSCRIPTION_LIMIT_EXCEEDED" 8626) 8627 8628const ( 8629 // LocaleEnUs is a Locale enum value 8630 LocaleEnUs = "EN_US" 8631) 8632 8633const ( 8634 // NoSuchEntityErrorCodeAssessmentTargetDoesNotExist is a NoSuchEntityErrorCode enum value 8635 NoSuchEntityErrorCodeAssessmentTargetDoesNotExist = "ASSESSMENT_TARGET_DOES_NOT_EXIST" 8636 8637 // NoSuchEntityErrorCodeAssessmentTemplateDoesNotExist is a NoSuchEntityErrorCode enum value 8638 NoSuchEntityErrorCodeAssessmentTemplateDoesNotExist = "ASSESSMENT_TEMPLATE_DOES_NOT_EXIST" 8639 8640 // NoSuchEntityErrorCodeAssessmentRunDoesNotExist is a NoSuchEntityErrorCode enum value 8641 NoSuchEntityErrorCodeAssessmentRunDoesNotExist = "ASSESSMENT_RUN_DOES_NOT_EXIST" 8642 8643 // NoSuchEntityErrorCodeFindingDoesNotExist is a NoSuchEntityErrorCode enum value 8644 NoSuchEntityErrorCodeFindingDoesNotExist = "FINDING_DOES_NOT_EXIST" 8645 8646 // NoSuchEntityErrorCodeResourceGroupDoesNotExist is a NoSuchEntityErrorCode enum value 8647 NoSuchEntityErrorCodeResourceGroupDoesNotExist = "RESOURCE_GROUP_DOES_NOT_EXIST" 8648 8649 // NoSuchEntityErrorCodeRulesPackageDoesNotExist is a NoSuchEntityErrorCode enum value 8650 NoSuchEntityErrorCodeRulesPackageDoesNotExist = "RULES_PACKAGE_DOES_NOT_EXIST" 8651 8652 // NoSuchEntityErrorCodeSnsTopicDoesNotExist is a NoSuchEntityErrorCode enum value 8653 NoSuchEntityErrorCodeSnsTopicDoesNotExist = "SNS_TOPIC_DOES_NOT_EXIST" 8654 8655 // NoSuchEntityErrorCodeIamRoleDoesNotExist is a NoSuchEntityErrorCode enum value 8656 NoSuchEntityErrorCodeIamRoleDoesNotExist = "IAM_ROLE_DOES_NOT_EXIST" 8657) 8658 8659const ( 8660 // ReportFileFormatHtml is a ReportFileFormat enum value 8661 ReportFileFormatHtml = "HTML" 8662 8663 // ReportFileFormatPdf is a ReportFileFormat enum value 8664 ReportFileFormatPdf = "PDF" 8665) 8666 8667const ( 8668 // ReportStatusWorkInProgress is a ReportStatus enum value 8669 ReportStatusWorkInProgress = "WORK_IN_PROGRESS" 8670 8671 // ReportStatusFailed is a ReportStatus enum value 8672 ReportStatusFailed = "FAILED" 8673 8674 // ReportStatusCompleted is a ReportStatus enum value 8675 ReportStatusCompleted = "COMPLETED" 8676) 8677 8678const ( 8679 // ReportTypeFinding is a ReportType enum value 8680 ReportTypeFinding = "FINDING" 8681 8682 // ReportTypeFull is a ReportType enum value 8683 ReportTypeFull = "FULL" 8684) 8685 8686const ( 8687 // SeverityLow is a Severity enum value 8688 SeverityLow = "Low" 8689 8690 // SeverityMedium is a Severity enum value 8691 SeverityMedium = "Medium" 8692 8693 // SeverityHigh is a Severity enum value 8694 SeverityHigh = "High" 8695 8696 // SeverityInformational is a Severity enum value 8697 SeverityInformational = "Informational" 8698 8699 // SeverityUndefined is a Severity enum value 8700 SeverityUndefined = "Undefined" 8701) 8702 8703const ( 8704 // StopActionStartEvaluation is a StopAction enum value 8705 StopActionStartEvaluation = "START_EVALUATION" 8706 8707 // StopActionSkipEvaluation is a StopAction enum value 8708 StopActionSkipEvaluation = "SKIP_EVALUATION" 8709) 8710