Permalink
Fetching contributors…
Cannot retrieve contributors at this time
9822 lines (8482 sloc) 346 KB
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package inspector
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
const opAddAttributesToFindings = "AddAttributesToFindings"
// AddAttributesToFindingsRequest generates a "aws/request.Request" representing the
// client's request for the AddAttributesToFindings operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AddAttributesToFindings for more information on using the AddAttributesToFindings
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AddAttributesToFindingsRequest method.
// req, resp := client.AddAttributesToFindingsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AddAttributesToFindings
func (c *Inspector) AddAttributesToFindingsRequest(input *AddAttributesToFindingsInput) (req *request.Request, output *AddAttributesToFindingsOutput) {
op := &request.Operation{
Name: opAddAttributesToFindings,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AddAttributesToFindingsInput{}
}
output = &AddAttributesToFindingsOutput{}
req = c.newRequest(op, input, output)
return
}
// AddAttributesToFindings API operation for Amazon Inspector.
//
// Assigns attributes (key and value pairs) to the findings that are specified
// by the ARNs of the findings.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation AddAttributesToFindings for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeNoSuchEntityException "NoSuchEntityException"
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
//
// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException"
// The serice is temporary unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/AddAttributesToFindings
func (c *Inspector) AddAttributesToFindings(input *AddAttributesToFindingsInput) (*AddAttributesToFindingsOutput, error) {
req, out := c.AddAttributesToFindingsRequest(input)
return out, req.Send()
}
// AddAttributesToFindingsWithContext is the same as AddAttributesToFindings with the addition of
// the ability to pass a context and additional request options.
//
// See AddAttributesToFindings for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) AddAttributesToFindingsWithContext(ctx aws.Context, input *AddAttributesToFindingsInput, opts ...request.Option) (*AddAttributesToFindingsOutput, error) {
req, out := c.AddAttributesToFindingsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateAssessmentTarget = "CreateAssessmentTarget"
// CreateAssessmentTargetRequest generates a "aws/request.Request" representing the
// client's request for the CreateAssessmentTarget operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateAssessmentTarget for more information on using the CreateAssessmentTarget
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateAssessmentTargetRequest method.
// req, resp := client.CreateAssessmentTargetRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateAssessmentTarget
func (c *Inspector) CreateAssessmentTargetRequest(input *CreateAssessmentTargetInput) (req *request.Request, output *CreateAssessmentTargetOutput) {
op := &request.Operation{
Name: opCreateAssessmentTarget,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateAssessmentTargetInput{}
}
output = &CreateAssessmentTargetOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateAssessmentTarget API operation for Amazon Inspector.
//
// Creates a new assessment target using the ARN of the resource group that
// is generated by CreateResourceGroup. If resourceGroupArn is not specified,
// all EC2 instances in the current AWS account and region are included in the
// assessment target. If the service-linked role (https://docs.aws.amazon.com/inspector/latest/userguide/inspector_slr.html)
// isn’t already registered, this action also creates and registers a service-linked
// role to grant Amazon Inspector access to AWS Services needed to perform security
// assessments. You can create up to 50 assessment targets per AWS account.
// You can run up to 500 concurrent agents per AWS account. For more information,
// see Amazon Inspector Assessment Targets (http://docs.aws.amazon.com/inspector/latest/userguide/inspector_applications.html).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation CreateAssessmentTarget for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// The request was rejected because it attempted to create resources beyond
// the current AWS account limits. The error code describes the limit exceeded.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeNoSuchEntityException "NoSuchEntityException"
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
//
// * ErrCodeInvalidCrossAccountRoleException "InvalidCrossAccountRoleException"
// Amazon Inspector cannot assume the cross-account role that it needs to list
// your EC2 instances during the assessment run.
//
// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException"
// The serice is temporary unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateAssessmentTarget
func (c *Inspector) CreateAssessmentTarget(input *CreateAssessmentTargetInput) (*CreateAssessmentTargetOutput, error) {
req, out := c.CreateAssessmentTargetRequest(input)
return out, req.Send()
}
// CreateAssessmentTargetWithContext is the same as CreateAssessmentTarget with the addition of
// the ability to pass a context and additional request options.
//
// See CreateAssessmentTarget for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) CreateAssessmentTargetWithContext(ctx aws.Context, input *CreateAssessmentTargetInput, opts ...request.Option) (*CreateAssessmentTargetOutput, error) {
req, out := c.CreateAssessmentTargetRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateAssessmentTemplate = "CreateAssessmentTemplate"
// CreateAssessmentTemplateRequest generates a "aws/request.Request" representing the
// client's request for the CreateAssessmentTemplate operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateAssessmentTemplate for more information on using the CreateAssessmentTemplate
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateAssessmentTemplateRequest method.
// req, resp := client.CreateAssessmentTemplateRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateAssessmentTemplate
func (c *Inspector) CreateAssessmentTemplateRequest(input *CreateAssessmentTemplateInput) (req *request.Request, output *CreateAssessmentTemplateOutput) {
op := &request.Operation{
Name: opCreateAssessmentTemplate,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateAssessmentTemplateInput{}
}
output = &CreateAssessmentTemplateOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateAssessmentTemplate API operation for Amazon Inspector.
//
// Creates an assessment template for the assessment target that is specified
// by the ARN of the assessment target. If the service-linked role (https://docs.aws.amazon.com/inspector/latest/userguide/inspector_slr.html)
// isn’t already registered, this action also creates and registers a service-linked
// role to grant Amazon Inspector access to AWS Services needed to perform security
// assessments.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation CreateAssessmentTemplate for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// The request was rejected because it attempted to create resources beyond
// the current AWS account limits. The error code describes the limit exceeded.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeNoSuchEntityException "NoSuchEntityException"
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
//
// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException"
// The serice is temporary unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateAssessmentTemplate
func (c *Inspector) CreateAssessmentTemplate(input *CreateAssessmentTemplateInput) (*CreateAssessmentTemplateOutput, error) {
req, out := c.CreateAssessmentTemplateRequest(input)
return out, req.Send()
}
// CreateAssessmentTemplateWithContext is the same as CreateAssessmentTemplate with the addition of
// the ability to pass a context and additional request options.
//
// See CreateAssessmentTemplate for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) CreateAssessmentTemplateWithContext(ctx aws.Context, input *CreateAssessmentTemplateInput, opts ...request.Option) (*CreateAssessmentTemplateOutput, error) {
req, out := c.CreateAssessmentTemplateRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateExclusionsPreview = "CreateExclusionsPreview"
// CreateExclusionsPreviewRequest generates a "aws/request.Request" representing the
// client's request for the CreateExclusionsPreview operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateExclusionsPreview for more information on using the CreateExclusionsPreview
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateExclusionsPreviewRequest method.
// req, resp := client.CreateExclusionsPreviewRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateExclusionsPreview
func (c *Inspector) CreateExclusionsPreviewRequest(input *CreateExclusionsPreviewInput) (req *request.Request, output *CreateExclusionsPreviewOutput) {
op := &request.Operation{
Name: opCreateExclusionsPreview,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateExclusionsPreviewInput{}
}
output = &CreateExclusionsPreviewOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateExclusionsPreview API operation for Amazon Inspector.
//
// Starts the generation of an exclusions preview for the specified assessment
// template. The exclusions preview lists the potential exclusions (ExclusionPreview)
// that Inspector can detect before it runs the assessment.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation CreateExclusionsPreview for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodePreviewGenerationInProgressException "PreviewGenerationInProgressException"
// The request is rejected. The specified assessment template is currently generating
// an exclusions preview.
//
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeNoSuchEntityException "NoSuchEntityException"
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
//
// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException"
// The serice is temporary unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateExclusionsPreview
func (c *Inspector) CreateExclusionsPreview(input *CreateExclusionsPreviewInput) (*CreateExclusionsPreviewOutput, error) {
req, out := c.CreateExclusionsPreviewRequest(input)
return out, req.Send()
}
// CreateExclusionsPreviewWithContext is the same as CreateExclusionsPreview with the addition of
// the ability to pass a context and additional request options.
//
// See CreateExclusionsPreview for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) CreateExclusionsPreviewWithContext(ctx aws.Context, input *CreateExclusionsPreviewInput, opts ...request.Option) (*CreateExclusionsPreviewOutput, error) {
req, out := c.CreateExclusionsPreviewRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateResourceGroup = "CreateResourceGroup"
// CreateResourceGroupRequest generates a "aws/request.Request" representing the
// client's request for the CreateResourceGroup operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateResourceGroup for more information on using the CreateResourceGroup
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateResourceGroupRequest method.
// req, resp := client.CreateResourceGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateResourceGroup
func (c *Inspector) CreateResourceGroupRequest(input *CreateResourceGroupInput) (req *request.Request, output *CreateResourceGroupOutput) {
op := &request.Operation{
Name: opCreateResourceGroup,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateResourceGroupInput{}
}
output = &CreateResourceGroupOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateResourceGroup API operation for Amazon Inspector.
//
// Creates a resource group using the specified set of tags (key and value pairs)
// that are used to select the EC2 instances to be included in an Amazon Inspector
// assessment target. The created resource group is then used to create an Amazon
// Inspector assessment target. For more information, see CreateAssessmentTarget.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation CreateResourceGroup for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// The request was rejected because it attempted to create resources beyond
// the current AWS account limits. The error code describes the limit exceeded.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException"
// The serice is temporary unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateResourceGroup
func (c *Inspector) CreateResourceGroup(input *CreateResourceGroupInput) (*CreateResourceGroupOutput, error) {
req, out := c.CreateResourceGroupRequest(input)
return out, req.Send()
}
// CreateResourceGroupWithContext is the same as CreateResourceGroup with the addition of
// the ability to pass a context and additional request options.
//
// See CreateResourceGroup for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) CreateResourceGroupWithContext(ctx aws.Context, input *CreateResourceGroupInput, opts ...request.Option) (*CreateResourceGroupOutput, error) {
req, out := c.CreateResourceGroupRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteAssessmentRun = "DeleteAssessmentRun"
// DeleteAssessmentRunRequest generates a "aws/request.Request" representing the
// client's request for the DeleteAssessmentRun operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteAssessmentRun for more information on using the DeleteAssessmentRun
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteAssessmentRunRequest method.
// req, resp := client.DeleteAssessmentRunRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentRun
func (c *Inspector) DeleteAssessmentRunRequest(input *DeleteAssessmentRunInput) (req *request.Request, output *DeleteAssessmentRunOutput) {
op := &request.Operation{
Name: opDeleteAssessmentRun,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteAssessmentRunInput{}
}
output = &DeleteAssessmentRunOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteAssessmentRun API operation for Amazon Inspector.
//
// Deletes the assessment run that is specified by the ARN of the assessment
// run.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation DeleteAssessmentRun for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeAssessmentRunInProgressException "AssessmentRunInProgressException"
// You cannot perform a specified action if an assessment run is currently in
// progress.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeNoSuchEntityException "NoSuchEntityException"
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
//
// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException"
// The serice is temporary unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentRun
func (c *Inspector) DeleteAssessmentRun(input *DeleteAssessmentRunInput) (*DeleteAssessmentRunOutput, error) {
req, out := c.DeleteAssessmentRunRequest(input)
return out, req.Send()
}
// DeleteAssessmentRunWithContext is the same as DeleteAssessmentRun with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteAssessmentRun for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) DeleteAssessmentRunWithContext(ctx aws.Context, input *DeleteAssessmentRunInput, opts ...request.Option) (*DeleteAssessmentRunOutput, error) {
req, out := c.DeleteAssessmentRunRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteAssessmentTarget = "DeleteAssessmentTarget"
// DeleteAssessmentTargetRequest generates a "aws/request.Request" representing the
// client's request for the DeleteAssessmentTarget operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteAssessmentTarget for more information on using the DeleteAssessmentTarget
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteAssessmentTargetRequest method.
// req, resp := client.DeleteAssessmentTargetRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentTarget
func (c *Inspector) DeleteAssessmentTargetRequest(input *DeleteAssessmentTargetInput) (req *request.Request, output *DeleteAssessmentTargetOutput) {
op := &request.Operation{
Name: opDeleteAssessmentTarget,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteAssessmentTargetInput{}
}
output = &DeleteAssessmentTargetOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteAssessmentTarget API operation for Amazon Inspector.
//
// Deletes the assessment target that is specified by the ARN of the assessment
// target.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation DeleteAssessmentTarget for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeAssessmentRunInProgressException "AssessmentRunInProgressException"
// You cannot perform a specified action if an assessment run is currently in
// progress.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeNoSuchEntityException "NoSuchEntityException"
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
//
// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException"
// The serice is temporary unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentTarget
func (c *Inspector) DeleteAssessmentTarget(input *DeleteAssessmentTargetInput) (*DeleteAssessmentTargetOutput, error) {
req, out := c.DeleteAssessmentTargetRequest(input)
return out, req.Send()
}
// DeleteAssessmentTargetWithContext is the same as DeleteAssessmentTarget with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteAssessmentTarget for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) DeleteAssessmentTargetWithContext(ctx aws.Context, input *DeleteAssessmentTargetInput, opts ...request.Option) (*DeleteAssessmentTargetOutput, error) {
req, out := c.DeleteAssessmentTargetRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteAssessmentTemplate = "DeleteAssessmentTemplate"
// DeleteAssessmentTemplateRequest generates a "aws/request.Request" representing the
// client's request for the DeleteAssessmentTemplate operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteAssessmentTemplate for more information on using the DeleteAssessmentTemplate
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteAssessmentTemplateRequest method.
// req, resp := client.DeleteAssessmentTemplateRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentTemplate
func (c *Inspector) DeleteAssessmentTemplateRequest(input *DeleteAssessmentTemplateInput) (req *request.Request, output *DeleteAssessmentTemplateOutput) {
op := &request.Operation{
Name: opDeleteAssessmentTemplate,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteAssessmentTemplateInput{}
}
output = &DeleteAssessmentTemplateOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteAssessmentTemplate API operation for Amazon Inspector.
//
// Deletes the assessment template that is specified by the ARN of the assessment
// template.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation DeleteAssessmentTemplate for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeAssessmentRunInProgressException "AssessmentRunInProgressException"
// You cannot perform a specified action if an assessment run is currently in
// progress.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeNoSuchEntityException "NoSuchEntityException"
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
//
// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException"
// The serice is temporary unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DeleteAssessmentTemplate
func (c *Inspector) DeleteAssessmentTemplate(input *DeleteAssessmentTemplateInput) (*DeleteAssessmentTemplateOutput, error) {
req, out := c.DeleteAssessmentTemplateRequest(input)
return out, req.Send()
}
// DeleteAssessmentTemplateWithContext is the same as DeleteAssessmentTemplate with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteAssessmentTemplate for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) DeleteAssessmentTemplateWithContext(ctx aws.Context, input *DeleteAssessmentTemplateInput, opts ...request.Option) (*DeleteAssessmentTemplateOutput, error) {
req, out := c.DeleteAssessmentTemplateRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeAssessmentRuns = "DescribeAssessmentRuns"
// DescribeAssessmentRunsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAssessmentRuns operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeAssessmentRuns for more information on using the DescribeAssessmentRuns
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeAssessmentRunsRequest method.
// req, resp := client.DescribeAssessmentRunsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentRuns
func (c *Inspector) DescribeAssessmentRunsRequest(input *DescribeAssessmentRunsInput) (req *request.Request, output *DescribeAssessmentRunsOutput) {
op := &request.Operation{
Name: opDescribeAssessmentRuns,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeAssessmentRunsInput{}
}
output = &DescribeAssessmentRunsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeAssessmentRuns API operation for Amazon Inspector.
//
// Describes the assessment runs that are specified by the ARNs of the assessment
// runs.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation DescribeAssessmentRuns for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentRuns
func (c *Inspector) DescribeAssessmentRuns(input *DescribeAssessmentRunsInput) (*DescribeAssessmentRunsOutput, error) {
req, out := c.DescribeAssessmentRunsRequest(input)
return out, req.Send()
}
// DescribeAssessmentRunsWithContext is the same as DescribeAssessmentRuns with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeAssessmentRuns for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) DescribeAssessmentRunsWithContext(ctx aws.Context, input *DescribeAssessmentRunsInput, opts ...request.Option) (*DescribeAssessmentRunsOutput, error) {
req, out := c.DescribeAssessmentRunsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeAssessmentTargets = "DescribeAssessmentTargets"
// DescribeAssessmentTargetsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAssessmentTargets operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeAssessmentTargets for more information on using the DescribeAssessmentTargets
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeAssessmentTargetsRequest method.
// req, resp := client.DescribeAssessmentTargetsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentTargets
func (c *Inspector) DescribeAssessmentTargetsRequest(input *DescribeAssessmentTargetsInput) (req *request.Request, output *DescribeAssessmentTargetsOutput) {
op := &request.Operation{
Name: opDescribeAssessmentTargets,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeAssessmentTargetsInput{}
}
output = &DescribeAssessmentTargetsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeAssessmentTargets API operation for Amazon Inspector.
//
// Describes the assessment targets that are specified by the ARNs of the assessment
// targets.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation DescribeAssessmentTargets for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentTargets
func (c *Inspector) DescribeAssessmentTargets(input *DescribeAssessmentTargetsInput) (*DescribeAssessmentTargetsOutput, error) {
req, out := c.DescribeAssessmentTargetsRequest(input)
return out, req.Send()
}
// DescribeAssessmentTargetsWithContext is the same as DescribeAssessmentTargets with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeAssessmentTargets for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) DescribeAssessmentTargetsWithContext(ctx aws.Context, input *DescribeAssessmentTargetsInput, opts ...request.Option) (*DescribeAssessmentTargetsOutput, error) {
req, out := c.DescribeAssessmentTargetsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeAssessmentTemplates = "DescribeAssessmentTemplates"
// DescribeAssessmentTemplatesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAssessmentTemplates operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeAssessmentTemplates for more information on using the DescribeAssessmentTemplates
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeAssessmentTemplatesRequest method.
// req, resp := client.DescribeAssessmentTemplatesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentTemplates
func (c *Inspector) DescribeAssessmentTemplatesRequest(input *DescribeAssessmentTemplatesInput) (req *request.Request, output *DescribeAssessmentTemplatesOutput) {
op := &request.Operation{
Name: opDescribeAssessmentTemplates,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeAssessmentTemplatesInput{}
}
output = &DescribeAssessmentTemplatesOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeAssessmentTemplates API operation for Amazon Inspector.
//
// Describes the assessment templates that are specified by the ARNs of the
// assessment templates.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation DescribeAssessmentTemplates for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeAssessmentTemplates
func (c *Inspector) DescribeAssessmentTemplates(input *DescribeAssessmentTemplatesInput) (*DescribeAssessmentTemplatesOutput, error) {
req, out := c.DescribeAssessmentTemplatesRequest(input)
return out, req.Send()
}
// DescribeAssessmentTemplatesWithContext is the same as DescribeAssessmentTemplates with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeAssessmentTemplates for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) DescribeAssessmentTemplatesWithContext(ctx aws.Context, input *DescribeAssessmentTemplatesInput, opts ...request.Option) (*DescribeAssessmentTemplatesOutput, error) {
req, out := c.DescribeAssessmentTemplatesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeCrossAccountAccessRole = "DescribeCrossAccountAccessRole"
// DescribeCrossAccountAccessRoleRequest generates a "aws/request.Request" representing the
// client's request for the DescribeCrossAccountAccessRole operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeCrossAccountAccessRole for more information on using the DescribeCrossAccountAccessRole
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeCrossAccountAccessRoleRequest method.
// req, resp := client.DescribeCrossAccountAccessRoleRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeCrossAccountAccessRole
func (c *Inspector) DescribeCrossAccountAccessRoleRequest(input *DescribeCrossAccountAccessRoleInput) (req *request.Request, output *DescribeCrossAccountAccessRoleOutput) {
op := &request.Operation{
Name: opDescribeCrossAccountAccessRole,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeCrossAccountAccessRoleInput{}
}
output = &DescribeCrossAccountAccessRoleOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeCrossAccountAccessRole API operation for Amazon Inspector.
//
// Describes the IAM role that enables Amazon Inspector to access your AWS account.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation DescribeCrossAccountAccessRole for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeCrossAccountAccessRole
func (c *Inspector) DescribeCrossAccountAccessRole(input *DescribeCrossAccountAccessRoleInput) (*DescribeCrossAccountAccessRoleOutput, error) {
req, out := c.DescribeCrossAccountAccessRoleRequest(input)
return out, req.Send()
}
// DescribeCrossAccountAccessRoleWithContext is the same as DescribeCrossAccountAccessRole with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeCrossAccountAccessRole for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) DescribeCrossAccountAccessRoleWithContext(ctx aws.Context, input *DescribeCrossAccountAccessRoleInput, opts ...request.Option) (*DescribeCrossAccountAccessRoleOutput, error) {
req, out := c.DescribeCrossAccountAccessRoleRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeExclusions = "DescribeExclusions"
// DescribeExclusionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeExclusions operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeExclusions for more information on using the DescribeExclusions
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeExclusionsRequest method.
// req, resp := client.DescribeExclusionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeExclusions
func (c *Inspector) DescribeExclusionsRequest(input *DescribeExclusionsInput) (req *request.Request, output *DescribeExclusionsOutput) {
op := &request.Operation{
Name: opDescribeExclusions,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeExclusionsInput{}
}
output = &DescribeExclusionsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeExclusions API operation for Amazon Inspector.
//
// Describes the exclusions that are specified by the exclusions' ARNs.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation DescribeExclusions for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeExclusions
func (c *Inspector) DescribeExclusions(input *DescribeExclusionsInput) (*DescribeExclusionsOutput, error) {
req, out := c.DescribeExclusionsRequest(input)
return out, req.Send()
}
// DescribeExclusionsWithContext is the same as DescribeExclusions with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeExclusions for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) DescribeExclusionsWithContext(ctx aws.Context, input *DescribeExclusionsInput, opts ...request.Option) (*DescribeExclusionsOutput, error) {
req, out := c.DescribeExclusionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeFindings = "DescribeFindings"
// DescribeFindingsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeFindings operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeFindings for more information on using the DescribeFindings
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeFindingsRequest method.
// req, resp := client.DescribeFindingsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeFindings
func (c *Inspector) DescribeFindingsRequest(input *DescribeFindingsInput) (req *request.Request, output *DescribeFindingsOutput) {
op := &request.Operation{
Name: opDescribeFindings,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeFindingsInput{}
}
output = &DescribeFindingsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeFindings API operation for Amazon Inspector.
//
// Describes the findings that are specified by the ARNs of the findings.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation DescribeFindings for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeFindings
func (c *Inspector) DescribeFindings(input *DescribeFindingsInput) (*DescribeFindingsOutput, error) {
req, out := c.DescribeFindingsRequest(input)
return out, req.Send()
}
// DescribeFindingsWithContext is the same as DescribeFindings with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeFindings for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) DescribeFindingsWithContext(ctx aws.Context, input *DescribeFindingsInput, opts ...request.Option) (*DescribeFindingsOutput, error) {
req, out := c.DescribeFindingsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeResourceGroups = "DescribeResourceGroups"
// DescribeResourceGroupsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeResourceGroups operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeResourceGroups for more information on using the DescribeResourceGroups
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeResourceGroupsRequest method.
// req, resp := client.DescribeResourceGroupsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeResourceGroups
func (c *Inspector) DescribeResourceGroupsRequest(input *DescribeResourceGroupsInput) (req *request.Request, output *DescribeResourceGroupsOutput) {
op := &request.Operation{
Name: opDescribeResourceGroups,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeResourceGroupsInput{}
}
output = &DescribeResourceGroupsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeResourceGroups API operation for Amazon Inspector.
//
// Describes the resource groups that are specified by the ARNs of the resource
// groups.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation DescribeResourceGroups for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeResourceGroups
func (c *Inspector) DescribeResourceGroups(input *DescribeResourceGroupsInput) (*DescribeResourceGroupsOutput, error) {
req, out := c.DescribeResourceGroupsRequest(input)
return out, req.Send()
}
// DescribeResourceGroupsWithContext is the same as DescribeResourceGroups with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeResourceGroups for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) DescribeResourceGroupsWithContext(ctx aws.Context, input *DescribeResourceGroupsInput, opts ...request.Option) (*DescribeResourceGroupsOutput, error) {
req, out := c.DescribeResourceGroupsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeRulesPackages = "DescribeRulesPackages"
// DescribeRulesPackagesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeRulesPackages operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeRulesPackages for more information on using the DescribeRulesPackages
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeRulesPackagesRequest method.
// req, resp := client.DescribeRulesPackagesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeRulesPackages
func (c *Inspector) DescribeRulesPackagesRequest(input *DescribeRulesPackagesInput) (req *request.Request, output *DescribeRulesPackagesOutput) {
op := &request.Operation{
Name: opDescribeRulesPackages,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeRulesPackagesInput{}
}
output = &DescribeRulesPackagesOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeRulesPackages API operation for Amazon Inspector.
//
// Describes the rules packages that are specified by the ARNs of the rules
// packages.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation DescribeRulesPackages for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeRulesPackages
func (c *Inspector) DescribeRulesPackages(input *DescribeRulesPackagesInput) (*DescribeRulesPackagesOutput, error) {
req, out := c.DescribeRulesPackagesRequest(input)
return out, req.Send()
}
// DescribeRulesPackagesWithContext is the same as DescribeRulesPackages with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeRulesPackages for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) DescribeRulesPackagesWithContext(ctx aws.Context, input *DescribeRulesPackagesInput, opts ...request.Option) (*DescribeRulesPackagesOutput, error) {
req, out := c.DescribeRulesPackagesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetAssessmentReport = "GetAssessmentReport"
// GetAssessmentReportRequest generates a "aws/request.Request" representing the
// client's request for the GetAssessmentReport operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetAssessmentReport for more information on using the GetAssessmentReport
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetAssessmentReportRequest method.
// req, resp := client.GetAssessmentReportRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetAssessmentReport
func (c *Inspector) GetAssessmentReportRequest(input *GetAssessmentReportInput) (req *request.Request, output *GetAssessmentReportOutput) {
op := &request.Operation{
Name: opGetAssessmentReport,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetAssessmentReportInput{}
}
output = &GetAssessmentReportOutput{}
req = c.newRequest(op, input, output)
return
}
// GetAssessmentReport API operation for Amazon Inspector.
//
// Produces an assessment report that includes detailed and comprehensive results
// of a specified assessment run.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation GetAssessmentReport for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeNoSuchEntityException "NoSuchEntityException"
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
//
// * ErrCodeAssessmentRunInProgressException "AssessmentRunInProgressException"
// You cannot perform a specified action if an assessment run is currently in
// progress.
//
// * ErrCodeUnsupportedFeatureException "UnsupportedFeatureException"
// Used by the GetAssessmentReport API. The request was rejected because you
// tried to generate a report for an assessment run that existed before reporting
// was supported in Amazon Inspector. You can only generate reports for assessment
// runs that took place or will take place after generating reports in Amazon
// Inspector became available.
//
// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException"
// The serice is temporary unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetAssessmentReport
func (c *Inspector) GetAssessmentReport(input *GetAssessmentReportInput) (*GetAssessmentReportOutput, error) {
req, out := c.GetAssessmentReportRequest(input)
return out, req.Send()
}
// GetAssessmentReportWithContext is the same as GetAssessmentReport with the addition of
// the ability to pass a context and additional request options.
//
// See GetAssessmentReport for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) GetAssessmentReportWithContext(ctx aws.Context, input *GetAssessmentReportInput, opts ...request.Option) (*GetAssessmentReportOutput, error) {
req, out := c.GetAssessmentReportRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetExclusionsPreview = "GetExclusionsPreview"
// GetExclusionsPreviewRequest generates a "aws/request.Request" representing the
// client's request for the GetExclusionsPreview operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetExclusionsPreview for more information on using the GetExclusionsPreview
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetExclusionsPreviewRequest method.
// req, resp := client.GetExclusionsPreviewRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetExclusionsPreview
func (c *Inspector) GetExclusionsPreviewRequest(input *GetExclusionsPreviewInput) (req *request.Request, output *GetExclusionsPreviewOutput) {
op := &request.Operation{
Name: opGetExclusionsPreview,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &GetExclusionsPreviewInput{}
}
output = &GetExclusionsPreviewOutput{}
req = c.newRequest(op, input, output)
return
}
// GetExclusionsPreview API operation for Amazon Inspector.
//
// Retrieves the exclusions preview (a list of ExclusionPreview objects) specified
// by the preview token. You can obtain the preview token by running the CreateExclusionsPreview
// API.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation GetExclusionsPreview for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeNoSuchEntityException "NoSuchEntityException"
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetExclusionsPreview
func (c *Inspector) GetExclusionsPreview(input *GetExclusionsPreviewInput) (*GetExclusionsPreviewOutput, error) {
req, out := c.GetExclusionsPreviewRequest(input)
return out, req.Send()
}
// GetExclusionsPreviewWithContext is the same as GetExclusionsPreview with the addition of
// the ability to pass a context and additional request options.
//
// See GetExclusionsPreview for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) GetExclusionsPreviewWithContext(ctx aws.Context, input *GetExclusionsPreviewInput, opts ...request.Option) (*GetExclusionsPreviewOutput, error) {
req, out := c.GetExclusionsPreviewRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// GetExclusionsPreviewPages iterates over the pages of a GetExclusionsPreview operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See GetExclusionsPreview method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a GetExclusionsPreview operation.
// pageNum := 0
// err := client.GetExclusionsPreviewPages(params,
// func(page *GetExclusionsPreviewOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Inspector) GetExclusionsPreviewPages(input *GetExclusionsPreviewInput, fn func(*GetExclusionsPreviewOutput, bool) bool) error {
return c.GetExclusionsPreviewPagesWithContext(aws.BackgroundContext(), input, fn)
}
// GetExclusionsPreviewPagesWithContext same as GetExclusionsPreviewPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) GetExclusionsPreviewPagesWithContext(ctx aws.Context, input *GetExclusionsPreviewInput, fn func(*GetExclusionsPreviewOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *GetExclusionsPreviewInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.GetExclusionsPreviewRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*GetExclusionsPreviewOutput), !p.HasNextPage())
}
return p.Err()
}
const opGetTelemetryMetadata = "GetTelemetryMetadata"
// GetTelemetryMetadataRequest generates a "aws/request.Request" representing the
// client's request for the GetTelemetryMetadata operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetTelemetryMetadata for more information on using the GetTelemetryMetadata
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetTelemetryMetadataRequest method.
// req, resp := client.GetTelemetryMetadataRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetTelemetryMetadata
func (c *Inspector) GetTelemetryMetadataRequest(input *GetTelemetryMetadataInput) (req *request.Request, output *GetTelemetryMetadataOutput) {
op := &request.Operation{
Name: opGetTelemetryMetadata,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetTelemetryMetadataInput{}
}
output = &GetTelemetryMetadataOutput{}
req = c.newRequest(op, input, output)
return
}
// GetTelemetryMetadata API operation for Amazon Inspector.
//
// Information about the data that is collected for the specified assessment
// run.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation GetTelemetryMetadata for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeNoSuchEntityException "NoSuchEntityException"
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetTelemetryMetadata
func (c *Inspector) GetTelemetryMetadata(input *GetTelemetryMetadataInput) (*GetTelemetryMetadataOutput, error) {
req, out := c.GetTelemetryMetadataRequest(input)
return out, req.Send()
}
// GetTelemetryMetadataWithContext is the same as GetTelemetryMetadata with the addition of
// the ability to pass a context and additional request options.
//
// See GetTelemetryMetadata for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) GetTelemetryMetadataWithContext(ctx aws.Context, input *GetTelemetryMetadataInput, opts ...request.Option) (*GetTelemetryMetadataOutput, error) {
req, out := c.GetTelemetryMetadataRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListAssessmentRunAgents = "ListAssessmentRunAgents"
// ListAssessmentRunAgentsRequest generates a "aws/request.Request" representing the
// client's request for the ListAssessmentRunAgents operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListAssessmentRunAgents for more information on using the ListAssessmentRunAgents
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListAssessmentRunAgentsRequest method.
// req, resp := client.ListAssessmentRunAgentsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentRunAgents
func (c *Inspector) ListAssessmentRunAgentsRequest(input *ListAssessmentRunAgentsInput) (req *request.Request, output *ListAssessmentRunAgentsOutput) {
op := &request.Operation{
Name: opListAssessmentRunAgents,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListAssessmentRunAgentsInput{}
}
output = &ListAssessmentRunAgentsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListAssessmentRunAgents API operation for Amazon Inspector.
//
// Lists the agents of the assessment runs that are specified by the ARNs of
// the assessment runs.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation ListAssessmentRunAgents for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeNoSuchEntityException "NoSuchEntityException"
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentRunAgents
func (c *Inspector) ListAssessmentRunAgents(input *ListAssessmentRunAgentsInput) (*ListAssessmentRunAgentsOutput, error) {
req, out := c.ListAssessmentRunAgentsRequest(input)
return out, req.Send()
}
// ListAssessmentRunAgentsWithContext is the same as ListAssessmentRunAgents with the addition of
// the ability to pass a context and additional request options.
//
// See ListAssessmentRunAgents for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) ListAssessmentRunAgentsWithContext(ctx aws.Context, input *ListAssessmentRunAgentsInput, opts ...request.Option) (*ListAssessmentRunAgentsOutput, error) {
req, out := c.ListAssessmentRunAgentsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListAssessmentRunAgentsPages iterates over the pages of a ListAssessmentRunAgents operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListAssessmentRunAgents method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListAssessmentRunAgents operation.
// pageNum := 0
// err := client.ListAssessmentRunAgentsPages(params,
// func(page *ListAssessmentRunAgentsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Inspector) ListAssessmentRunAgentsPages(input *ListAssessmentRunAgentsInput, fn func(*ListAssessmentRunAgentsOutput, bool) bool) error {
return c.ListAssessmentRunAgentsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListAssessmentRunAgentsPagesWithContext same as ListAssessmentRunAgentsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) ListAssessmentRunAgentsPagesWithContext(ctx aws.Context, input *ListAssessmentRunAgentsInput, fn func(*ListAssessmentRunAgentsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListAssessmentRunAgentsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListAssessmentRunAgentsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListAssessmentRunAgentsOutput), !p.HasNextPage())
}
return p.Err()
}
const opListAssessmentRuns = "ListAssessmentRuns"
// ListAssessmentRunsRequest generates a "aws/request.Request" representing the
// client's request for the ListAssessmentRuns operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListAssessmentRuns for more information on using the ListAssessmentRuns
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListAssessmentRunsRequest method.
// req, resp := client.ListAssessmentRunsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentRuns
func (c *Inspector) ListAssessmentRunsRequest(input *ListAssessmentRunsInput) (req *request.Request, output *ListAssessmentRunsOutput) {
op := &request.Operation{
Name: opListAssessmentRuns,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListAssessmentRunsInput{}
}
output = &ListAssessmentRunsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListAssessmentRuns API operation for Amazon Inspector.
//
// Lists the assessment runs that correspond to the assessment templates that
// are specified by the ARNs of the assessment templates.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation ListAssessmentRuns for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeNoSuchEntityException "NoSuchEntityException"
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentRuns
func (c *Inspector) ListAssessmentRuns(input *ListAssessmentRunsInput) (*ListAssessmentRunsOutput, error) {
req, out := c.ListAssessmentRunsRequest(input)
return out, req.Send()
}
// ListAssessmentRunsWithContext is the same as ListAssessmentRuns with the addition of
// the ability to pass a context and additional request options.
//
// See ListAssessmentRuns for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) ListAssessmentRunsWithContext(ctx aws.Context, input *ListAssessmentRunsInput, opts ...request.Option) (*ListAssessmentRunsOutput, error) {
req, out := c.ListAssessmentRunsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListAssessmentRunsPages iterates over the pages of a ListAssessmentRuns operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListAssessmentRuns method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListAssessmentRuns operation.
// pageNum := 0
// err := client.ListAssessmentRunsPages(params,
// func(page *ListAssessmentRunsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Inspector) ListAssessmentRunsPages(input *ListAssessmentRunsInput, fn func(*ListAssessmentRunsOutput, bool) bool) error {
return c.ListAssessmentRunsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListAssessmentRunsPagesWithContext same as ListAssessmentRunsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) ListAssessmentRunsPagesWithContext(ctx aws.Context, input *ListAssessmentRunsInput, fn func(*ListAssessmentRunsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListAssessmentRunsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListAssessmentRunsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListAssessmentRunsOutput), !p.HasNextPage())
}
return p.Err()
}
const opListAssessmentTargets = "ListAssessmentTargets"
// ListAssessmentTargetsRequest generates a "aws/request.Request" representing the
// client's request for the ListAssessmentTargets operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListAssessmentTargets for more information on using the ListAssessmentTargets
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListAssessmentTargetsRequest method.
// req, resp := client.ListAssessmentTargetsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentTargets
func (c *Inspector) ListAssessmentTargetsRequest(input *ListAssessmentTargetsInput) (req *request.Request, output *ListAssessmentTargetsOutput) {
op := &request.Operation{
Name: opListAssessmentTargets,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListAssessmentTargetsInput{}
}
output = &ListAssessmentTargetsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListAssessmentTargets API operation for Amazon Inspector.
//
// Lists the ARNs of the assessment targets within this AWS account. For more
// information about assessment targets, see Amazon Inspector Assessment Targets
// (http://docs.aws.amazon.com/inspector/latest/userguide/inspector_applications.html).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation ListAssessmentTargets for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentTargets
func (c *Inspector) ListAssessmentTargets(input *ListAssessmentTargetsInput) (*ListAssessmentTargetsOutput, error) {
req, out := c.ListAssessmentTargetsRequest(input)
return out, req.Send()
}
// ListAssessmentTargetsWithContext is the same as ListAssessmentTargets with the addition of
// the ability to pass a context and additional request options.
//
// See ListAssessmentTargets for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) ListAssessmentTargetsWithContext(ctx aws.Context, input *ListAssessmentTargetsInput, opts ...request.Option) (*ListAssessmentTargetsOutput, error) {
req, out := c.ListAssessmentTargetsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListAssessmentTargetsPages iterates over the pages of a ListAssessmentTargets operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListAssessmentTargets method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListAssessmentTargets operation.
// pageNum := 0
// err := client.ListAssessmentTargetsPages(params,
// func(page *ListAssessmentTargetsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Inspector) ListAssessmentTargetsPages(input *ListAssessmentTargetsInput, fn func(*ListAssessmentTargetsOutput, bool) bool) error {
return c.ListAssessmentTargetsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListAssessmentTargetsPagesWithContext same as ListAssessmentTargetsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) ListAssessmentTargetsPagesWithContext(ctx aws.Context, input *ListAssessmentTargetsInput, fn func(*ListAssessmentTargetsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListAssessmentTargetsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListAssessmentTargetsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListAssessmentTargetsOutput), !p.HasNextPage())
}
return p.Err()
}
const opListAssessmentTemplates = "ListAssessmentTemplates"
// ListAssessmentTemplatesRequest generates a "aws/request.Request" representing the
// client's request for the ListAssessmentTemplates operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListAssessmentTemplates for more information on using the ListAssessmentTemplates
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListAssessmentTemplatesRequest method.
// req, resp := client.ListAssessmentTemplatesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentTemplates
func (c *Inspector) ListAssessmentTemplatesRequest(input *ListAssessmentTemplatesInput) (req *request.Request, output *ListAssessmentTemplatesOutput) {
op := &request.Operation{
Name: opListAssessmentTemplates,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListAssessmentTemplatesInput{}
}
output = &ListAssessmentTemplatesOutput{}
req = c.newRequest(op, input, output)
return
}
// ListAssessmentTemplates API operation for Amazon Inspector.
//
// Lists the assessment templates that correspond to the assessment targets
// that are specified by the ARNs of the assessment targets.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation ListAssessmentTemplates for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeNoSuchEntityException "NoSuchEntityException"
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentTemplates
func (c *Inspector) ListAssessmentTemplates(input *ListAssessmentTemplatesInput) (*ListAssessmentTemplatesOutput, error) {
req, out := c.ListAssessmentTemplatesRequest(input)
return out, req.Send()
}
// ListAssessmentTemplatesWithContext is the same as ListAssessmentTemplates with the addition of
// the ability to pass a context and additional request options.
//
// See ListAssessmentTemplates for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) ListAssessmentTemplatesWithContext(ctx aws.Context, input *ListAssessmentTemplatesInput, opts ...request.Option) (*ListAssessmentTemplatesOutput, error) {
req, out := c.ListAssessmentTemplatesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListAssessmentTemplatesPages iterates over the pages of a ListAssessmentTemplates operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListAssessmentTemplates method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListAssessmentTemplates operation.
// pageNum := 0
// err := client.ListAssessmentTemplatesPages(params,
// func(page *ListAssessmentTemplatesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Inspector) ListAssessmentTemplatesPages(input *ListAssessmentTemplatesInput, fn func(*ListAssessmentTemplatesOutput, bool) bool) error {
return c.ListAssessmentTemplatesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListAssessmentTemplatesPagesWithContext same as ListAssessmentTemplatesPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) ListAssessmentTemplatesPagesWithContext(ctx aws.Context, input *ListAssessmentTemplatesInput, fn func(*ListAssessmentTemplatesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListAssessmentTemplatesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListAssessmentTemplatesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListAssessmentTemplatesOutput), !p.HasNextPage())
}
return p.Err()
}
const opListEventSubscriptions = "ListEventSubscriptions"
// ListEventSubscriptionsRequest generates a "aws/request.Request" representing the
// client's request for the ListEventSubscriptions operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListEventSubscriptions for more information on using the ListEventSubscriptions
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListEventSubscriptionsRequest method.
// req, resp := client.ListEventSubscriptionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListEventSubscriptions
func (c *Inspector) ListEventSubscriptionsRequest(input *ListEventSubscriptionsInput) (req *request.Request, output *ListEventSubscriptionsOutput) {
op := &request.Operation{
Name: opListEventSubscriptions,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListEventSubscriptionsInput{}
}
output = &ListEventSubscriptionsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListEventSubscriptions API operation for Amazon Inspector.
//
// Lists all the event subscriptions for the assessment template that is specified
// by the ARN of the assessment template. For more information, see SubscribeToEvent
// and UnsubscribeFromEvent.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation ListEventSubscriptions for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeNoSuchEntityException "NoSuchEntityException"
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListEventSubscriptions
func (c *Inspector) ListEventSubscriptions(input *ListEventSubscriptionsInput) (*ListEventSubscriptionsOutput, error) {
req, out := c.ListEventSubscriptionsRequest(input)
return out, req.Send()
}
// ListEventSubscriptionsWithContext is the same as ListEventSubscriptions with the addition of
// the ability to pass a context and additional request options.
//
// See ListEventSubscriptions for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) ListEventSubscriptionsWithContext(ctx aws.Context, input *ListEventSubscriptionsInput, opts ...request.Option) (*ListEventSubscriptionsOutput, error) {
req, out := c.ListEventSubscriptionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListEventSubscriptionsPages iterates over the pages of a ListEventSubscriptions operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListEventSubscriptions method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListEventSubscriptions operation.
// pageNum := 0
// err := client.ListEventSubscriptionsPages(params,
// func(page *ListEventSubscriptionsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Inspector) ListEventSubscriptionsPages(input *ListEventSubscriptionsInput, fn func(*ListEventSubscriptionsOutput, bool) bool) error {
return c.ListEventSubscriptionsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListEventSubscriptionsPagesWithContext same as ListEventSubscriptionsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) ListEventSubscriptionsPagesWithContext(ctx aws.Context, input *ListEventSubscriptionsInput, fn func(*ListEventSubscriptionsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListEventSubscriptionsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListEventSubscriptionsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListEventSubscriptionsOutput), !p.HasNextPage())
}
return p.Err()
}
const opListExclusions = "ListExclusions"
// ListExclusionsRequest generates a "aws/request.Request" representing the
// client's request for the ListExclusions operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListExclusions for more information on using the ListExclusions
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListExclusionsRequest method.
// req, resp := client.ListExclusionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListExclusions
func (c *Inspector) ListExclusionsRequest(input *ListExclusionsInput) (req *request.Request, output *ListExclusionsOutput) {
op := &request.Operation{
Name: opListExclusions,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListExclusionsInput{}
}
output = &ListExclusionsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListExclusions API operation for Amazon Inspector.
//
// List exclusions that are generated by the assessment run.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation ListExclusions for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeNoSuchEntityException "NoSuchEntityException"
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListExclusions
func (c *Inspector) ListExclusions(input *ListExclusionsInput) (*ListExclusionsOutput, error) {
req, out := c.ListExclusionsRequest(input)
return out, req.Send()
}
// ListExclusionsWithContext is the same as ListExclusions with the addition of
// the ability to pass a context and additional request options.
//
// See ListExclusions for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) ListExclusionsWithContext(ctx aws.Context, input *ListExclusionsInput, opts ...request.Option) (*ListExclusionsOutput, error) {
req, out := c.ListExclusionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListExclusionsPages iterates over the pages of a ListExclusions operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListExclusions method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListExclusions operation.
// pageNum := 0
// err := client.ListExclusionsPages(params,
// func(page *ListExclusionsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Inspector) ListExclusionsPages(input *ListExclusionsInput, fn func(*ListExclusionsOutput, bool) bool) error {
return c.ListExclusionsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListExclusionsPagesWithContext same as ListExclusionsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) ListExclusionsPagesWithContext(ctx aws.Context, input *ListExclusionsInput, fn func(*ListExclusionsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListExclusionsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListExclusionsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListExclusionsOutput), !p.HasNextPage())
}
return p.Err()
}
const opListFindings = "ListFindings"
// ListFindingsRequest generates a "aws/request.Request" representing the
// client's request for the ListFindings operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListFindings for more information on using the ListFindings
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListFindingsRequest method.
// req, resp := client.ListFindingsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListFindings
func (c *Inspector) ListFindingsRequest(input *ListFindingsInput) (req *request.Request, output *ListFindingsOutput) {
op := &request.Operation{
Name: opListFindings,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListFindingsInput{}
}
output = &ListFindingsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListFindings API operation for Amazon Inspector.
//
// Lists findings that are generated by the assessment runs that are specified
// by the ARNs of the assessment runs.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation ListFindings for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeNoSuchEntityException "NoSuchEntityException"
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListFindings
func (c *Inspector) ListFindings(input *ListFindingsInput) (*ListFindingsOutput, error) {
req, out := c.ListFindingsRequest(input)
return out, req.Send()
}
// ListFindingsWithContext is the same as ListFindings with the addition of
// the ability to pass a context and additional request options.
//
// See ListFindings for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) ListFindingsWithContext(ctx aws.Context, input *ListFindingsInput, opts ...request.Option) (*ListFindingsOutput, error) {
req, out := c.ListFindingsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListFindingsPages iterates over the pages of a ListFindings operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListFindings method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListFindings operation.
// pageNum := 0
// err := client.ListFindingsPages(params,
// func(page *ListFindingsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Inspector) ListFindingsPages(input *ListFindingsInput, fn func(*ListFindingsOutput, bool) bool) error {
return c.ListFindingsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListFindingsPagesWithContext same as ListFindingsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) ListFindingsPagesWithContext(ctx aws.Context, input *ListFindingsInput, fn func(*ListFindingsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListFindingsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListFindingsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListFindingsOutput), !p.HasNextPage())
}
return p.Err()
}
const opListRulesPackages = "ListRulesPackages"
// ListRulesPackagesRequest generates a "aws/request.Request" representing the
// client's request for the ListRulesPackages operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListRulesPackages for more information on using the ListRulesPackages
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListRulesPackagesRequest method.
// req, resp := client.ListRulesPackagesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListRulesPackages
func (c *Inspector) ListRulesPackagesRequest(input *ListRulesPackagesInput) (req *request.Request, output *ListRulesPackagesOutput) {
op := &request.Operation{
Name: opListRulesPackages,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListRulesPackagesInput{}
}
output = &ListRulesPackagesOutput{}
req = c.newRequest(op, input, output)
return
}
// ListRulesPackages API operation for Amazon Inspector.
//
// Lists all available Amazon Inspector rules packages.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation ListRulesPackages for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListRulesPackages
func (c *Inspector) ListRulesPackages(input *ListRulesPackagesInput) (*ListRulesPackagesOutput, error) {
req, out := c.ListRulesPackagesRequest(input)
return out, req.Send()
}
// ListRulesPackagesWithContext is the same as ListRulesPackages with the addition of
// the ability to pass a context and additional request options.
//
// See ListRulesPackages for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) ListRulesPackagesWithContext(ctx aws.Context, input *ListRulesPackagesInput, opts ...request.Option) (*ListRulesPackagesOutput, error) {
req, out := c.ListRulesPackagesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListRulesPackagesPages iterates over the pages of a ListRulesPackages operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListRulesPackages method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListRulesPackages operation.
// pageNum := 0
// err := client.ListRulesPackagesPages(params,
// func(page *ListRulesPackagesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Inspector) ListRulesPackagesPages(input *ListRulesPackagesInput, fn func(*ListRulesPackagesOutput, bool) bool) error {
return c.ListRulesPackagesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListRulesPackagesPagesWithContext same as ListRulesPackagesPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) ListRulesPackagesPagesWithContext(ctx aws.Context, input *ListRulesPackagesInput, fn func(*ListRulesPackagesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListRulesPackagesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListRulesPackagesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListRulesPackagesOutput), !p.HasNextPage())
}
return p.Err()
}
const opListTagsForResource = "ListTagsForResource"
// ListTagsForResourceRequest generates a "aws/request.Request" representing the
// client's request for the ListTagsForResource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListTagsForResource for more information on using the ListTagsForResource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListTagsForResourceRequest method.
// req, resp := client.ListTagsForResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListTagsForResource
func (c *Inspector) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
op := &request.Operation{
Name: opListTagsForResource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListTagsForResourceInput{}
}
output = &ListTagsForResourceOutput{}
req = c.newRequest(op, input, output)
return
}
// ListTagsForResource API operation for Amazon Inspector.
//
// Lists all tags associated with an assessment template.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation ListTagsForResource for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeNoSuchEntityException "NoSuchEntityException"
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListTagsForResource
func (c *Inspector) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
req, out := c.ListTagsForResourceRequest(input)
return out, req.Send()
}
// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
// the ability to pass a context and additional request options.
//
// See ListTagsForResource for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
req, out := c.ListTagsForResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opPreviewAgents = "PreviewAgents"
// PreviewAgentsRequest generates a "aws/request.Request" representing the
// client's request for the PreviewAgents operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See PreviewAgents for more information on using the PreviewAgents
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the PreviewAgentsRequest method.
// req, resp := client.PreviewAgentsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/PreviewAgents
func (c *Inspector) PreviewAgentsRequest(input *PreviewAgentsInput) (req *request.Request, output *PreviewAgentsOutput) {
op := &request.Operation{
Name: opPreviewAgents,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &PreviewAgentsInput{}
}
output = &PreviewAgentsOutput{}
req = c.newRequest(op, input, output)
return
}
// PreviewAgents API operation for Amazon Inspector.
//
// Previews the agents installed on the EC2 instances that are part of the specified
// assessment target.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation PreviewAgents for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeNoSuchEntityException "NoSuchEntityException"
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
//
// * ErrCodeInvalidCrossAccountRoleException "InvalidCrossAccountRoleException"
// Amazon Inspector cannot assume the cross-account role that it needs to list
// your EC2 instances during the assessment run.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/PreviewAgents
func (c *Inspector) PreviewAgents(input *PreviewAgentsInput) (*PreviewAgentsOutput, error) {
req, out := c.PreviewAgentsRequest(input)
return out, req.Send()
}
// PreviewAgentsWithContext is the same as PreviewAgents with the addition of
// the ability to pass a context and additional request options.
//
// See PreviewAgents for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) PreviewAgentsWithContext(ctx aws.Context, input *PreviewAgentsInput, opts ...request.Option) (*PreviewAgentsOutput, error) {
req, out := c.PreviewAgentsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// PreviewAgentsPages iterates over the pages of a PreviewAgents operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See PreviewAgents method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a PreviewAgents operation.
// pageNum := 0
// err := client.PreviewAgentsPages(params,
// func(page *PreviewAgentsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Inspector) PreviewAgentsPages(input *PreviewAgentsInput, fn func(*PreviewAgentsOutput, bool) bool) error {
return c.PreviewAgentsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// PreviewAgentsPagesWithContext same as PreviewAgentsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) PreviewAgentsPagesWithContext(ctx aws.Context, input *PreviewAgentsInput, fn func(*PreviewAgentsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *PreviewAgentsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.PreviewAgentsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*PreviewAgentsOutput), !p.HasNextPage())
}
return p.Err()
}
const opRegisterCrossAccountAccessRole = "RegisterCrossAccountAccessRole"
// RegisterCrossAccountAccessRoleRequest generates a "aws/request.Request" representing the
// client's request for the RegisterCrossAccountAccessRole operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See RegisterCrossAccountAccessRole for more information on using the RegisterCrossAccountAccessRole
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the RegisterCrossAccountAccessRoleRequest method.
// req, resp := client.RegisterCrossAccountAccessRoleRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RegisterCrossAccountAccessRole
func (c *Inspector) RegisterCrossAccountAccessRoleRequest(input *RegisterCrossAccountAccessRoleInput) (req *request.Request, output *RegisterCrossAccountAccessRoleOutput) {
op := &request.Operation{
Name: opRegisterCrossAccountAccessRole,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RegisterCrossAccountAccessRoleInput{}
}
output = &RegisterCrossAccountAccessRoleOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
return
}
// RegisterCrossAccountAccessRole API operation for Amazon Inspector.
//
// Registers the IAM role that grants Amazon Inspector access to AWS Services
// needed to perform security assessments.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation RegisterCrossAccountAccessRole for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeInvalidCrossAccountRoleException "InvalidCrossAccountRoleException"
// Amazon Inspector cannot assume the cross-account role that it needs to list
// your EC2 instances during the assessment run.
//
// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException"
// The serice is temporary unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RegisterCrossAccountAccessRole
func (c *Inspector) RegisterCrossAccountAccessRole(input *RegisterCrossAccountAccessRoleInput) (*RegisterCrossAccountAccessRoleOutput, error) {
req, out := c.RegisterCrossAccountAccessRoleRequest(input)
return out, req.Send()
}
// RegisterCrossAccountAccessRoleWithContext is the same as RegisterCrossAccountAccessRole with the addition of
// the ability to pass a context and additional request options.
//
// See RegisterCrossAccountAccessRole for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Inspector) RegisterCrossAccountAccessRoleWithContext(ctx aws.Context, input *RegisterCrossAccountAccessRoleInput, opts ...request.Option) (*RegisterCrossAccountAccessRoleOutput, error) {
req, out := c.RegisterCrossAccountAccessRoleRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opRemoveAttributesFromFindings = "RemoveAttributesFromFindings"
// RemoveAttributesFromFindingsRequest generates a "aws/request.Request" representing the
// client's request for the RemoveAttributesFromFindings operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See RemoveAttributesFromFindings for more information on using the RemoveAttributesFromFindings
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the RemoveAttributesFromFindingsRequest method.
// req, resp := client.RemoveAttributesFromFindingsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RemoveAttributesFromFindings
func (c *Inspector) RemoveAttributesFromFindingsRequest(input *RemoveAttributesFromFindingsInput) (req *request.Request, output *RemoveAttributesFromFindingsOutput) {
op := &request.Operation{
Name: opRemoveAttributesFromFindings,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RemoveAttributesFromFindingsInput{}
}
output = &RemoveAttributesFromFindingsOutput{}
req = c.newRequest(op, input, output)
return
}
// RemoveAttributesFromFindings API operation for Amazon Inspector.
//
// Removes entire attributes (key and value pairs) from the findings that are
// specified by the ARNs of the findings where an attribute with the specified
// key exists.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Inspector's
// API operation RemoveAttributesFromFindings for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalException "InternalException"
// Internal server error.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
//
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have required permissions to access the requested resource.
//
// * ErrCodeNoSuchEntityException "NoSuchEntityException"
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
//
// * ErrCodeServiceTemporarilyUnavailableException "ServiceTemporarilyUnavailableException"
// The serice is temporary unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/RemoveAttributesFromFindings
func (c *Inspector) RemoveAttributesFromFindings(input *RemoveAttributesFromFindingsInput) (*RemoveAttributesFromFindingsOutput, error) {
req, out := c.RemoveAttributesFromFindingsRequest(input)
return out, req.Send()
}
// RemoveAttributesFromFindingsWithContext is the same as RemoveAttributesFromFindings with the addition of
// the ability to pass a context and additional request options.
//
// See RemoveAttributesFromFindings for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create