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