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