Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
10224 lines (8791 sloc) 328 KB
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package guardduty
import (
"fmt"
"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/restjson"
)
const opAcceptInvitation = "AcceptInvitation"
// AcceptInvitationRequest generates a "aws/request.Request" representing the
// client's request for the AcceptInvitation operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 AcceptInvitation for more information on using the AcceptInvitation
// 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 AcceptInvitationRequest method.
// req, resp := client.AcceptInvitationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/AcceptInvitation
func (c *GuardDuty) AcceptInvitationRequest(input *AcceptInvitationInput) (req *request.Request, output *AcceptInvitationOutput) {
op := &request.Operation{
Name: opAcceptInvitation,
HTTPMethod: "POST",
HTTPPath: "/detector/{detectorId}/master",
}
if input == nil {
input = &AcceptInvitationInput{}
}
output = &AcceptInvitationOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AcceptInvitation API operation for Amazon GuardDuty.
//
// Accepts the invitation to be monitored by a master GuardDuty 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 GuardDuty's
// API operation AcceptInvitation for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/AcceptInvitation
func (c *GuardDuty) AcceptInvitation(input *AcceptInvitationInput) (*AcceptInvitationOutput, error) {
req, out := c.AcceptInvitationRequest(input)
return out, req.Send()
}
// AcceptInvitationWithContext is the same as AcceptInvitation with the addition of
// the ability to pass a context and additional request options.
//
// See AcceptInvitation 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 *GuardDuty) AcceptInvitationWithContext(ctx aws.Context, input *AcceptInvitationInput, opts ...request.Option) (*AcceptInvitationOutput, error) {
req, out := c.AcceptInvitationRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opArchiveFindings = "ArchiveFindings"
// ArchiveFindingsRequest generates a "aws/request.Request" representing the
// client's request for the ArchiveFindings operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 ArchiveFindings for more information on using the ArchiveFindings
// 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 ArchiveFindingsRequest method.
// req, resp := client.ArchiveFindingsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ArchiveFindings
func (c *GuardDuty) ArchiveFindingsRequest(input *ArchiveFindingsInput) (req *request.Request, output *ArchiveFindingsOutput) {
op := &request.Operation{
Name: opArchiveFindings,
HTTPMethod: "POST",
HTTPPath: "/detector/{detectorId}/findings/archive",
}
if input == nil {
input = &ArchiveFindingsInput{}
}
output = &ArchiveFindingsOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// ArchiveFindings API operation for Amazon GuardDuty.
//
// Archives Amazon GuardDuty findings specified by the list of finding IDs.
//
// 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 GuardDuty's
// API operation ArchiveFindings for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ArchiveFindings
func (c *GuardDuty) ArchiveFindings(input *ArchiveFindingsInput) (*ArchiveFindingsOutput, error) {
req, out := c.ArchiveFindingsRequest(input)
return out, req.Send()
}
// ArchiveFindingsWithContext is the same as ArchiveFindings with the addition of
// the ability to pass a context and additional request options.
//
// See ArchiveFindings 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 *GuardDuty) ArchiveFindingsWithContext(ctx aws.Context, input *ArchiveFindingsInput, opts ...request.Option) (*ArchiveFindingsOutput, error) {
req, out := c.ArchiveFindingsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateDetector = "CreateDetector"
// CreateDetectorRequest generates a "aws/request.Request" representing the
// client's request for the CreateDetector operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 CreateDetector for more information on using the CreateDetector
// 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 CreateDetectorRequest method.
// req, resp := client.CreateDetectorRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateDetector
func (c *GuardDuty) CreateDetectorRequest(input *CreateDetectorInput) (req *request.Request, output *CreateDetectorOutput) {
op := &request.Operation{
Name: opCreateDetector,
HTTPMethod: "POST",
HTTPPath: "/detector",
}
if input == nil {
input = &CreateDetectorInput{}
}
output = &CreateDetectorOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateDetector API operation for Amazon GuardDuty.
//
// Creates a single Amazon GuardDuty detector. A detector is an object that
// represents the GuardDuty service. A detector must be created in order for
// GuardDuty to become operational.
//
// 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 GuardDuty's
// API operation CreateDetector for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateDetector
func (c *GuardDuty) CreateDetector(input *CreateDetectorInput) (*CreateDetectorOutput, error) {
req, out := c.CreateDetectorRequest(input)
return out, req.Send()
}
// CreateDetectorWithContext is the same as CreateDetector with the addition of
// the ability to pass a context and additional request options.
//
// See CreateDetector 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 *GuardDuty) CreateDetectorWithContext(ctx aws.Context, input *CreateDetectorInput, opts ...request.Option) (*CreateDetectorOutput, error) {
req, out := c.CreateDetectorRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateFilter = "CreateFilter"
// CreateFilterRequest generates a "aws/request.Request" representing the
// client's request for the CreateFilter operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 CreateFilter for more information on using the CreateFilter
// 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 CreateFilterRequest method.
// req, resp := client.CreateFilterRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateFilter
func (c *GuardDuty) CreateFilterRequest(input *CreateFilterInput) (req *request.Request, output *CreateFilterOutput) {
op := &request.Operation{
Name: opCreateFilter,
HTTPMethod: "POST",
HTTPPath: "/detector/{detectorId}/filter",
}
if input == nil {
input = &CreateFilterInput{}
}
output = &CreateFilterOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateFilter API operation for Amazon GuardDuty.
//
// Creates a filter using the specified finding criteria.
//
// 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 GuardDuty's
// API operation CreateFilter for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateFilter
func (c *GuardDuty) CreateFilter(input *CreateFilterInput) (*CreateFilterOutput, error) {
req, out := c.CreateFilterRequest(input)
return out, req.Send()
}
// CreateFilterWithContext is the same as CreateFilter with the addition of
// the ability to pass a context and additional request options.
//
// See CreateFilter 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 *GuardDuty) CreateFilterWithContext(ctx aws.Context, input *CreateFilterInput, opts ...request.Option) (*CreateFilterOutput, error) {
req, out := c.CreateFilterRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateIPSet = "CreateIPSet"
// CreateIPSetRequest generates a "aws/request.Request" representing the
// client's request for the CreateIPSet operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 CreateIPSet for more information on using the CreateIPSet
// 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 CreateIPSetRequest method.
// req, resp := client.CreateIPSetRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateIPSet
func (c *GuardDuty) CreateIPSetRequest(input *CreateIPSetInput) (req *request.Request, output *CreateIPSetOutput) {
op := &request.Operation{
Name: opCreateIPSet,
HTTPMethod: "POST",
HTTPPath: "/detector/{detectorId}/ipset",
}
if input == nil {
input = &CreateIPSetInput{}
}
output = &CreateIPSetOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateIPSet API operation for Amazon GuardDuty.
//
// Creates a new IPSet - a list of trusted IP addresses that have been whitelisted
// for secure communication with AWS infrastructure and applications.
//
// 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 GuardDuty's
// API operation CreateIPSet for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateIPSet
func (c *GuardDuty) CreateIPSet(input *CreateIPSetInput) (*CreateIPSetOutput, error) {
req, out := c.CreateIPSetRequest(input)
return out, req.Send()
}
// CreateIPSetWithContext is the same as CreateIPSet with the addition of
// the ability to pass a context and additional request options.
//
// See CreateIPSet 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 *GuardDuty) CreateIPSetWithContext(ctx aws.Context, input *CreateIPSetInput, opts ...request.Option) (*CreateIPSetOutput, error) {
req, out := c.CreateIPSetRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateMembers = "CreateMembers"
// CreateMembersRequest generates a "aws/request.Request" representing the
// client's request for the CreateMembers operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 CreateMembers for more information on using the CreateMembers
// 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 CreateMembersRequest method.
// req, resp := client.CreateMembersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateMembers
func (c *GuardDuty) CreateMembersRequest(input *CreateMembersInput) (req *request.Request, output *CreateMembersOutput) {
op := &request.Operation{
Name: opCreateMembers,
HTTPMethod: "POST",
HTTPPath: "/detector/{detectorId}/member",
}
if input == nil {
input = &CreateMembersInput{}
}
output = &CreateMembersOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateMembers API operation for Amazon GuardDuty.
//
// Creates member accounts of the current AWS account by specifying a list of
// AWS account IDs. The current AWS account can then invite these members to
// manage GuardDuty in their accounts.
//
// 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 GuardDuty's
// API operation CreateMembers for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateMembers
func (c *GuardDuty) CreateMembers(input *CreateMembersInput) (*CreateMembersOutput, error) {
req, out := c.CreateMembersRequest(input)
return out, req.Send()
}
// CreateMembersWithContext is the same as CreateMembers with the addition of
// the ability to pass a context and additional request options.
//
// See CreateMembers 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 *GuardDuty) CreateMembersWithContext(ctx aws.Context, input *CreateMembersInput, opts ...request.Option) (*CreateMembersOutput, error) {
req, out := c.CreateMembersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateSampleFindings = "CreateSampleFindings"
// CreateSampleFindingsRequest generates a "aws/request.Request" representing the
// client's request for the CreateSampleFindings operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 CreateSampleFindings for more information on using the CreateSampleFindings
// 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 CreateSampleFindingsRequest method.
// req, resp := client.CreateSampleFindingsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateSampleFindings
func (c *GuardDuty) CreateSampleFindingsRequest(input *CreateSampleFindingsInput) (req *request.Request, output *CreateSampleFindingsOutput) {
op := &request.Operation{
Name: opCreateSampleFindings,
HTTPMethod: "POST",
HTTPPath: "/detector/{detectorId}/findings/create",
}
if input == nil {
input = &CreateSampleFindingsInput{}
}
output = &CreateSampleFindingsOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// CreateSampleFindings API operation for Amazon GuardDuty.
//
// Generates example findings of types specified by the list of finding types.
// If 'NULL' is specified for findingTypes, the API generates example findings
// of all supported finding types.
//
// 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 GuardDuty's
// API operation CreateSampleFindings for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateSampleFindings
func (c *GuardDuty) CreateSampleFindings(input *CreateSampleFindingsInput) (*CreateSampleFindingsOutput, error) {
req, out := c.CreateSampleFindingsRequest(input)
return out, req.Send()
}
// CreateSampleFindingsWithContext is the same as CreateSampleFindings with the addition of
// the ability to pass a context and additional request options.
//
// See CreateSampleFindings 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 *GuardDuty) CreateSampleFindingsWithContext(ctx aws.Context, input *CreateSampleFindingsInput, opts ...request.Option) (*CreateSampleFindingsOutput, error) {
req, out := c.CreateSampleFindingsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateThreatIntelSet = "CreateThreatIntelSet"
// CreateThreatIntelSetRequest generates a "aws/request.Request" representing the
// client's request for the CreateThreatIntelSet operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 CreateThreatIntelSet for more information on using the CreateThreatIntelSet
// 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 CreateThreatIntelSetRequest method.
// req, resp := client.CreateThreatIntelSetRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateThreatIntelSet
func (c *GuardDuty) CreateThreatIntelSetRequest(input *CreateThreatIntelSetInput) (req *request.Request, output *CreateThreatIntelSetOutput) {
op := &request.Operation{
Name: opCreateThreatIntelSet,
HTTPMethod: "POST",
HTTPPath: "/detector/{detectorId}/threatintelset",
}
if input == nil {
input = &CreateThreatIntelSetInput{}
}
output = &CreateThreatIntelSetOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateThreatIntelSet API operation for Amazon GuardDuty.
//
// Create a new ThreatIntelSet. ThreatIntelSets consist of known malicious IP
// addresses. GuardDuty generates findings based on ThreatIntelSets.
//
// 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 GuardDuty's
// API operation CreateThreatIntelSet for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateThreatIntelSet
func (c *GuardDuty) CreateThreatIntelSet(input *CreateThreatIntelSetInput) (*CreateThreatIntelSetOutput, error) {
req, out := c.CreateThreatIntelSetRequest(input)
return out, req.Send()
}
// CreateThreatIntelSetWithContext is the same as CreateThreatIntelSet with the addition of
// the ability to pass a context and additional request options.
//
// See CreateThreatIntelSet 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 *GuardDuty) CreateThreatIntelSetWithContext(ctx aws.Context, input *CreateThreatIntelSetInput, opts ...request.Option) (*CreateThreatIntelSetOutput, error) {
req, out := c.CreateThreatIntelSetRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeclineInvitations = "DeclineInvitations"
// DeclineInvitationsRequest generates a "aws/request.Request" representing the
// client's request for the DeclineInvitations operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 DeclineInvitations for more information on using the DeclineInvitations
// 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 DeclineInvitationsRequest method.
// req, resp := client.DeclineInvitationsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeclineInvitations
func (c *GuardDuty) DeclineInvitationsRequest(input *DeclineInvitationsInput) (req *request.Request, output *DeclineInvitationsOutput) {
op := &request.Operation{
Name: opDeclineInvitations,
HTTPMethod: "POST",
HTTPPath: "/invitation/decline",
}
if input == nil {
input = &DeclineInvitationsInput{}
}
output = &DeclineInvitationsOutput{}
req = c.newRequest(op, input, output)
return
}
// DeclineInvitations API operation for Amazon GuardDuty.
//
// Declines invitations sent to the current member account by AWS account specified
// by their account IDs.
//
// 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 GuardDuty's
// API operation DeclineInvitations for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeclineInvitations
func (c *GuardDuty) DeclineInvitations(input *DeclineInvitationsInput) (*DeclineInvitationsOutput, error) {
req, out := c.DeclineInvitationsRequest(input)
return out, req.Send()
}
// DeclineInvitationsWithContext is the same as DeclineInvitations with the addition of
// the ability to pass a context and additional request options.
//
// See DeclineInvitations 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 *GuardDuty) DeclineInvitationsWithContext(ctx aws.Context, input *DeclineInvitationsInput, opts ...request.Option) (*DeclineInvitationsOutput, error) {
req, out := c.DeclineInvitationsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteDetector = "DeleteDetector"
// DeleteDetectorRequest generates a "aws/request.Request" representing the
// client's request for the DeleteDetector operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 DeleteDetector for more information on using the DeleteDetector
// 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 DeleteDetectorRequest method.
// req, resp := client.DeleteDetectorRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteDetector
func (c *GuardDuty) DeleteDetectorRequest(input *DeleteDetectorInput) (req *request.Request, output *DeleteDetectorOutput) {
op := &request.Operation{
Name: opDeleteDetector,
HTTPMethod: "DELETE",
HTTPPath: "/detector/{detectorId}",
}
if input == nil {
input = &DeleteDetectorInput{}
}
output = &DeleteDetectorOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteDetector API operation for Amazon GuardDuty.
//
// Deletes a Amazon GuardDuty detector specified by the detector ID.
//
// 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 GuardDuty's
// API operation DeleteDetector for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteDetector
func (c *GuardDuty) DeleteDetector(input *DeleteDetectorInput) (*DeleteDetectorOutput, error) {
req, out := c.DeleteDetectorRequest(input)
return out, req.Send()
}
// DeleteDetectorWithContext is the same as DeleteDetector with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteDetector 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 *GuardDuty) DeleteDetectorWithContext(ctx aws.Context, input *DeleteDetectorInput, opts ...request.Option) (*DeleteDetectorOutput, error) {
req, out := c.DeleteDetectorRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteFilter = "DeleteFilter"
// DeleteFilterRequest generates a "aws/request.Request" representing the
// client's request for the DeleteFilter operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 DeleteFilter for more information on using the DeleteFilter
// 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 DeleteFilterRequest method.
// req, resp := client.DeleteFilterRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteFilter
func (c *GuardDuty) DeleteFilterRequest(input *DeleteFilterInput) (req *request.Request, output *DeleteFilterOutput) {
op := &request.Operation{
Name: opDeleteFilter,
HTTPMethod: "DELETE",
HTTPPath: "/detector/{detectorId}/filter/{filterName}",
}
if input == nil {
input = &DeleteFilterInput{}
}
output = &DeleteFilterOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteFilter API operation for Amazon GuardDuty.
//
// Deletes the filter specified by the filter name.
//
// 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 GuardDuty's
// API operation DeleteFilter for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteFilter
func (c *GuardDuty) DeleteFilter(input *DeleteFilterInput) (*DeleteFilterOutput, error) {
req, out := c.DeleteFilterRequest(input)
return out, req.Send()
}
// DeleteFilterWithContext is the same as DeleteFilter with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteFilter 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 *GuardDuty) DeleteFilterWithContext(ctx aws.Context, input *DeleteFilterInput, opts ...request.Option) (*DeleteFilterOutput, error) {
req, out := c.DeleteFilterRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteIPSet = "DeleteIPSet"
// DeleteIPSetRequest generates a "aws/request.Request" representing the
// client's request for the DeleteIPSet operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 DeleteIPSet for more information on using the DeleteIPSet
// 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 DeleteIPSetRequest method.
// req, resp := client.DeleteIPSetRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteIPSet
func (c *GuardDuty) DeleteIPSetRequest(input *DeleteIPSetInput) (req *request.Request, output *DeleteIPSetOutput) {
op := &request.Operation{
Name: opDeleteIPSet,
HTTPMethod: "DELETE",
HTTPPath: "/detector/{detectorId}/ipset/{ipSetId}",
}
if input == nil {
input = &DeleteIPSetInput{}
}
output = &DeleteIPSetOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteIPSet API operation for Amazon GuardDuty.
//
// Deletes the IPSet specified by the IPSet ID.
//
// 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 GuardDuty's
// API operation DeleteIPSet for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteIPSet
func (c *GuardDuty) DeleteIPSet(input *DeleteIPSetInput) (*DeleteIPSetOutput, error) {
req, out := c.DeleteIPSetRequest(input)
return out, req.Send()
}
// DeleteIPSetWithContext is the same as DeleteIPSet with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteIPSet 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 *GuardDuty) DeleteIPSetWithContext(ctx aws.Context, input *DeleteIPSetInput, opts ...request.Option) (*DeleteIPSetOutput, error) {
req, out := c.DeleteIPSetRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteInvitations = "DeleteInvitations"
// DeleteInvitationsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteInvitations operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 DeleteInvitations for more information on using the DeleteInvitations
// 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 DeleteInvitationsRequest method.
// req, resp := client.DeleteInvitationsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteInvitations
func (c *GuardDuty) DeleteInvitationsRequest(input *DeleteInvitationsInput) (req *request.Request, output *DeleteInvitationsOutput) {
op := &request.Operation{
Name: opDeleteInvitations,
HTTPMethod: "POST",
HTTPPath: "/invitation/delete",
}
if input == nil {
input = &DeleteInvitationsInput{}
}
output = &DeleteInvitationsOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteInvitations API operation for Amazon GuardDuty.
//
// Deletes invitations sent to the current member account by AWS accounts specified
// by their account IDs.
//
// 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 GuardDuty's
// API operation DeleteInvitations for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteInvitations
func (c *GuardDuty) DeleteInvitations(input *DeleteInvitationsInput) (*DeleteInvitationsOutput, error) {
req, out := c.DeleteInvitationsRequest(input)
return out, req.Send()
}
// DeleteInvitationsWithContext is the same as DeleteInvitations with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteInvitations 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 *GuardDuty) DeleteInvitationsWithContext(ctx aws.Context, input *DeleteInvitationsInput, opts ...request.Option) (*DeleteInvitationsOutput, error) {
req, out := c.DeleteInvitationsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteMembers = "DeleteMembers"
// DeleteMembersRequest generates a "aws/request.Request" representing the
// client's request for the DeleteMembers operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 DeleteMembers for more information on using the DeleteMembers
// 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 DeleteMembersRequest method.
// req, resp := client.DeleteMembersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteMembers
func (c *GuardDuty) DeleteMembersRequest(input *DeleteMembersInput) (req *request.Request, output *DeleteMembersOutput) {
op := &request.Operation{
Name: opDeleteMembers,
HTTPMethod: "POST",
HTTPPath: "/detector/{detectorId}/member/delete",
}
if input == nil {
input = &DeleteMembersInput{}
}
output = &DeleteMembersOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteMembers API operation for Amazon GuardDuty.
//
// Deletes GuardDuty member accounts (to the current GuardDuty master account)
// specified by the account IDs.
//
// 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 GuardDuty's
// API operation DeleteMembers for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteMembers
func (c *GuardDuty) DeleteMembers(input *DeleteMembersInput) (*DeleteMembersOutput, error) {
req, out := c.DeleteMembersRequest(input)
return out, req.Send()
}
// DeleteMembersWithContext is the same as DeleteMembers with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteMembers 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 *GuardDuty) DeleteMembersWithContext(ctx aws.Context, input *DeleteMembersInput, opts ...request.Option) (*DeleteMembersOutput, error) {
req, out := c.DeleteMembersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteThreatIntelSet = "DeleteThreatIntelSet"
// DeleteThreatIntelSetRequest generates a "aws/request.Request" representing the
// client's request for the DeleteThreatIntelSet operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 DeleteThreatIntelSet for more information on using the DeleteThreatIntelSet
// 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 DeleteThreatIntelSetRequest method.
// req, resp := client.DeleteThreatIntelSetRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteThreatIntelSet
func (c *GuardDuty) DeleteThreatIntelSetRequest(input *DeleteThreatIntelSetInput) (req *request.Request, output *DeleteThreatIntelSetOutput) {
op := &request.Operation{
Name: opDeleteThreatIntelSet,
HTTPMethod: "DELETE",
HTTPPath: "/detector/{detectorId}/threatintelset/{threatIntelSetId}",
}
if input == nil {
input = &DeleteThreatIntelSetInput{}
}
output = &DeleteThreatIntelSetOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteThreatIntelSet API operation for Amazon GuardDuty.
//
// Deletes ThreatIntelSet specified by the ThreatIntelSet ID.
//
// 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 GuardDuty's
// API operation DeleteThreatIntelSet for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteThreatIntelSet
func (c *GuardDuty) DeleteThreatIntelSet(input *DeleteThreatIntelSetInput) (*DeleteThreatIntelSetOutput, error) {
req, out := c.DeleteThreatIntelSetRequest(input)
return out, req.Send()
}
// DeleteThreatIntelSetWithContext is the same as DeleteThreatIntelSet with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteThreatIntelSet 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 *GuardDuty) DeleteThreatIntelSetWithContext(ctx aws.Context, input *DeleteThreatIntelSetInput, opts ...request.Option) (*DeleteThreatIntelSetOutput, error) {
req, out := c.DeleteThreatIntelSetRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDisassociateFromMasterAccount = "DisassociateFromMasterAccount"
// DisassociateFromMasterAccountRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateFromMasterAccount operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 DisassociateFromMasterAccount for more information on using the DisassociateFromMasterAccount
// 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 DisassociateFromMasterAccountRequest method.
// req, resp := client.DisassociateFromMasterAccountRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DisassociateFromMasterAccount
func (c *GuardDuty) DisassociateFromMasterAccountRequest(input *DisassociateFromMasterAccountInput) (req *request.Request, output *DisassociateFromMasterAccountOutput) {
op := &request.Operation{
Name: opDisassociateFromMasterAccount,
HTTPMethod: "POST",
HTTPPath: "/detector/{detectorId}/master/disassociate",
}
if input == nil {
input = &DisassociateFromMasterAccountInput{}
}
output = &DisassociateFromMasterAccountOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DisassociateFromMasterAccount API operation for Amazon GuardDuty.
//
// Disassociates the current GuardDuty member account from its master 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 GuardDuty's
// API operation DisassociateFromMasterAccount for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DisassociateFromMasterAccount
func (c *GuardDuty) DisassociateFromMasterAccount(input *DisassociateFromMasterAccountInput) (*DisassociateFromMasterAccountOutput, error) {
req, out := c.DisassociateFromMasterAccountRequest(input)
return out, req.Send()
}
// DisassociateFromMasterAccountWithContext is the same as DisassociateFromMasterAccount with the addition of
// the ability to pass a context and additional request options.
//
// See DisassociateFromMasterAccount 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 *GuardDuty) DisassociateFromMasterAccountWithContext(ctx aws.Context, input *DisassociateFromMasterAccountInput, opts ...request.Option) (*DisassociateFromMasterAccountOutput, error) {
req, out := c.DisassociateFromMasterAccountRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDisassociateMembers = "DisassociateMembers"
// DisassociateMembersRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateMembers operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 DisassociateMembers for more information on using the DisassociateMembers
// 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 DisassociateMembersRequest method.
// req, resp := client.DisassociateMembersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DisassociateMembers
func (c *GuardDuty) DisassociateMembersRequest(input *DisassociateMembersInput) (req *request.Request, output *DisassociateMembersOutput) {
op := &request.Operation{
Name: opDisassociateMembers,
HTTPMethod: "POST",
HTTPPath: "/detector/{detectorId}/member/disassociate",
}
if input == nil {
input = &DisassociateMembersInput{}
}
output = &DisassociateMembersOutput{}
req = c.newRequest(op, input, output)
return
}
// DisassociateMembers API operation for Amazon GuardDuty.
//
// Disassociates GuardDuty member accounts (to the current GuardDuty master
// account) specified by the account IDs.
//
// 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 GuardDuty's
// API operation DisassociateMembers for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DisassociateMembers
func (c *GuardDuty) DisassociateMembers(input *DisassociateMembersInput) (*DisassociateMembersOutput, error) {
req, out := c.DisassociateMembersRequest(input)
return out, req.Send()
}
// DisassociateMembersWithContext is the same as DisassociateMembers with the addition of
// the ability to pass a context and additional request options.
//
// See DisassociateMembers 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 *GuardDuty) DisassociateMembersWithContext(ctx aws.Context, input *DisassociateMembersInput, opts ...request.Option) (*DisassociateMembersOutput, error) {
req, out := c.DisassociateMembersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetDetector = "GetDetector"
// GetDetectorRequest generates a "aws/request.Request" representing the
// client's request for the GetDetector operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 GetDetector for more information on using the GetDetector
// 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 GetDetectorRequest method.
// req, resp := client.GetDetectorRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetDetector
func (c *GuardDuty) GetDetectorRequest(input *GetDetectorInput) (req *request.Request, output *GetDetectorOutput) {
op := &request.Operation{
Name: opGetDetector,
HTTPMethod: "GET",
HTTPPath: "/detector/{detectorId}",
}
if input == nil {
input = &GetDetectorInput{}
}
output = &GetDetectorOutput{}
req = c.newRequest(op, input, output)
return
}
// GetDetector API operation for Amazon GuardDuty.
//
// Retrieves an Amazon GuardDuty detector specified by the detectorId.
//
// 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 GuardDuty's
// API operation GetDetector for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetDetector
func (c *GuardDuty) GetDetector(input *GetDetectorInput) (*GetDetectorOutput, error) {
req, out := c.GetDetectorRequest(input)
return out, req.Send()
}
// GetDetectorWithContext is the same as GetDetector with the addition of
// the ability to pass a context and additional request options.
//
// See GetDetector 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 *GuardDuty) GetDetectorWithContext(ctx aws.Context, input *GetDetectorInput, opts ...request.Option) (*GetDetectorOutput, error) {
req, out := c.GetDetectorRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetFilter = "GetFilter"
// GetFilterRequest generates a "aws/request.Request" representing the
// client's request for the GetFilter operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 GetFilter for more information on using the GetFilter
// 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 GetFilterRequest method.
// req, resp := client.GetFilterRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetFilter
func (c *GuardDuty) GetFilterRequest(input *GetFilterInput) (req *request.Request, output *GetFilterOutput) {
op := &request.Operation{
Name: opGetFilter,
HTTPMethod: "GET",
HTTPPath: "/detector/{detectorId}/filter/{filterName}",
}
if input == nil {
input = &GetFilterInput{}
}
output = &GetFilterOutput{}
req = c.newRequest(op, input, output)
return
}
// GetFilter API operation for Amazon GuardDuty.
//
// Returns the details of the filter specified by the filter name.
//
// 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 GuardDuty's
// API operation GetFilter for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetFilter
func (c *GuardDuty) GetFilter(input *GetFilterInput) (*GetFilterOutput, error) {
req, out := c.GetFilterRequest(input)
return out, req.Send()
}
// GetFilterWithContext is the same as GetFilter with the addition of
// the ability to pass a context and additional request options.
//
// See GetFilter 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 *GuardDuty) GetFilterWithContext(ctx aws.Context, input *GetFilterInput, opts ...request.Option) (*GetFilterOutput, error) {
req, out := c.GetFilterRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetFindings = "GetFindings"
// GetFindingsRequest generates a "aws/request.Request" representing the
// client's request for the GetFindings operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 GetFindings for more information on using the GetFindings
// 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 GetFindingsRequest method.
// req, resp := client.GetFindingsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetFindings
func (c *GuardDuty) GetFindingsRequest(input *GetFindingsInput) (req *request.Request, output *GetFindingsOutput) {
op := &request.Operation{
Name: opGetFindings,
HTTPMethod: "POST",
HTTPPath: "/detector/{detectorId}/findings/get",
}
if input == nil {
input = &GetFindingsInput{}
}
output = &GetFindingsOutput{}
req = c.newRequest(op, input, output)
return
}
// GetFindings API operation for Amazon GuardDuty.
//
// Describes Amazon GuardDuty findings specified by finding IDs.
//
// 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 GuardDuty's
// API operation GetFindings for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetFindings
func (c *GuardDuty) GetFindings(input *GetFindingsInput) (*GetFindingsOutput, error) {
req, out := c.GetFindingsRequest(input)
return out, req.Send()
}
// GetFindingsWithContext is the same as GetFindings with the addition of
// the ability to pass a context and additional request options.
//
// See GetFindings 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 *GuardDuty) GetFindingsWithContext(ctx aws.Context, input *GetFindingsInput, opts ...request.Option) (*GetFindingsOutput, error) {
req, out := c.GetFindingsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetFindingsStatistics = "GetFindingsStatistics"
// GetFindingsStatisticsRequest generates a "aws/request.Request" representing the
// client's request for the GetFindingsStatistics operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 GetFindingsStatistics for more information on using the GetFindingsStatistics
// 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 GetFindingsStatisticsRequest method.
// req, resp := client.GetFindingsStatisticsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetFindingsStatistics
func (c *GuardDuty) GetFindingsStatisticsRequest(input *GetFindingsStatisticsInput) (req *request.Request, output *GetFindingsStatisticsOutput) {
op := &request.Operation{
Name: opGetFindingsStatistics,
HTTPMethod: "POST",
HTTPPath: "/detector/{detectorId}/findings/statistics",
}
if input == nil {
input = &GetFindingsStatisticsInput{}
}
output = &GetFindingsStatisticsOutput{}
req = c.newRequest(op, input, output)
return
}
// GetFindingsStatistics API operation for Amazon GuardDuty.
//
// Lists Amazon GuardDuty findings' statistics for the specified detector ID.
//
// 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 GuardDuty's
// API operation GetFindingsStatistics for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetFindingsStatistics
func (c *GuardDuty) GetFindingsStatistics(input *GetFindingsStatisticsInput) (*GetFindingsStatisticsOutput, error) {
req, out := c.GetFindingsStatisticsRequest(input)
return out, req.Send()
}
// GetFindingsStatisticsWithContext is the same as GetFindingsStatistics with the addition of
// the ability to pass a context and additional request options.
//
// See GetFindingsStatistics 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 *GuardDuty) GetFindingsStatisticsWithContext(ctx aws.Context, input *GetFindingsStatisticsInput, opts ...request.Option) (*GetFindingsStatisticsOutput, error) {
req, out := c.GetFindingsStatisticsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetIPSet = "GetIPSet"
// GetIPSetRequest generates a "aws/request.Request" representing the
// client's request for the GetIPSet operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 GetIPSet for more information on using the GetIPSet
// 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 GetIPSetRequest method.
// req, resp := client.GetIPSetRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetIPSet
func (c *GuardDuty) GetIPSetRequest(input *GetIPSetInput) (req *request.Request, output *GetIPSetOutput) {
op := &request.Operation{
Name: opGetIPSet,
HTTPMethod: "GET",
HTTPPath: "/detector/{detectorId}/ipset/{ipSetId}",
}
if input == nil {
input = &GetIPSetInput{}
}
output = &GetIPSetOutput{}
req = c.newRequest(op, input, output)
return
}
// GetIPSet API operation for Amazon GuardDuty.
//
// Retrieves the IPSet specified by the IPSet ID.
//
// 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 GuardDuty's
// API operation GetIPSet for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetIPSet
func (c *GuardDuty) GetIPSet(input *GetIPSetInput) (*GetIPSetOutput, error) {
req, out := c.GetIPSetRequest(input)
return out, req.Send()
}
// GetIPSetWithContext is the same as GetIPSet with the addition of
// the ability to pass a context and additional request options.
//
// See GetIPSet 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 *GuardDuty) GetIPSetWithContext(ctx aws.Context, input *GetIPSetInput, opts ...request.Option) (*GetIPSetOutput, error) {
req, out := c.GetIPSetRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetInvitationsCount = "GetInvitationsCount"
// GetInvitationsCountRequest generates a "aws/request.Request" representing the
// client's request for the GetInvitationsCount operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 GetInvitationsCount for more information on using the GetInvitationsCount
// 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 GetInvitationsCountRequest method.
// req, resp := client.GetInvitationsCountRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetInvitationsCount
func (c *GuardDuty) GetInvitationsCountRequest(input *GetInvitationsCountInput) (req *request.Request, output *GetInvitationsCountOutput) {
op := &request.Operation{
Name: opGetInvitationsCount,
HTTPMethod: "GET",
HTTPPath: "/invitation/count",
}
if input == nil {
input = &GetInvitationsCountInput{}
}
output = &GetInvitationsCountOutput{}
req = c.newRequest(op, input, output)
return
}
// GetInvitationsCount API operation for Amazon GuardDuty.
//
// Returns the count of all GuardDuty membership invitations that were sent
// to the current member account except the currently accepted invitation.
//
// 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 GuardDuty's
// API operation GetInvitationsCount for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetInvitationsCount
func (c *GuardDuty) GetInvitationsCount(input *GetInvitationsCountInput) (*GetInvitationsCountOutput, error) {
req, out := c.GetInvitationsCountRequest(input)
return out, req.Send()
}
// GetInvitationsCountWithContext is the same as GetInvitationsCount with the addition of
// the ability to pass a context and additional request options.
//
// See GetInvitationsCount 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 *GuardDuty) GetInvitationsCountWithContext(ctx aws.Context, input *GetInvitationsCountInput, opts ...request.Option) (*GetInvitationsCountOutput, error) {
req, out := c.GetInvitationsCountRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetMasterAccount = "GetMasterAccount"
// GetMasterAccountRequest generates a "aws/request.Request" representing the
// client's request for the GetMasterAccount operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 GetMasterAccount for more information on using the GetMasterAccount
// 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 GetMasterAccountRequest method.
// req, resp := client.GetMasterAccountRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetMasterAccount
func (c *GuardDuty) GetMasterAccountRequest(input *GetMasterAccountInput) (req *request.Request, output *GetMasterAccountOutput) {
op := &request.Operation{
Name: opGetMasterAccount,
HTTPMethod: "GET",
HTTPPath: "/detector/{detectorId}/master",
}
if input == nil {
input = &GetMasterAccountInput{}
}
output = &GetMasterAccountOutput{}
req = c.newRequest(op, input, output)
return
}
// GetMasterAccount API operation for Amazon GuardDuty.
//
// Provides the details for the GuardDuty master account to the current GuardDuty
// member 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 GuardDuty's
// API operation GetMasterAccount for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetMasterAccount
func (c *GuardDuty) GetMasterAccount(input *GetMasterAccountInput) (*GetMasterAccountOutput, error) {
req, out := c.GetMasterAccountRequest(input)
return out, req.Send()
}
// GetMasterAccountWithContext is the same as GetMasterAccount with the addition of
// the ability to pass a context and additional request options.
//
// See GetMasterAccount 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 *GuardDuty) GetMasterAccountWithContext(ctx aws.Context, input *GetMasterAccountInput, opts ...request.Option) (*GetMasterAccountOutput, error) {
req, out := c.GetMasterAccountRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetMembers = "GetMembers"
// GetMembersRequest generates a "aws/request.Request" representing the
// client's request for the GetMembers operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 GetMembers for more information on using the GetMembers
// 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 GetMembersRequest method.
// req, resp := client.GetMembersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetMembers
func (c *GuardDuty) GetMembersRequest(input *GetMembersInput) (req *request.Request, output *GetMembersOutput) {
op := &request.Operation{
Name: opGetMembers,
HTTPMethod: "POST",
HTTPPath: "/detector/{detectorId}/member/get",
}
if input == nil {
input = &GetMembersInput{}
}
output = &GetMembersOutput{}
req = c.newRequest(op, input, output)
return
}
// GetMembers API operation for Amazon GuardDuty.
//
// Retrieves GuardDuty member accounts (to the current GuardDuty master account)
// specified by the account IDs.
//
// 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 GuardDuty's
// API operation GetMembers for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetMembers
func (c *GuardDuty) GetMembers(input *GetMembersInput) (*GetMembersOutput, error) {
req, out := c.GetMembersRequest(input)
return out, req.Send()
}
// GetMembersWithContext is the same as GetMembers with the addition of
// the ability to pass a context and additional request options.
//
// See GetMembers 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 *GuardDuty) GetMembersWithContext(ctx aws.Context, input *GetMembersInput, opts ...request.Option) (*GetMembersOutput, error) {
req, out := c.GetMembersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetThreatIntelSet = "GetThreatIntelSet"
// GetThreatIntelSetRequest generates a "aws/request.Request" representing the
// client's request for the GetThreatIntelSet operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 GetThreatIntelSet for more information on using the GetThreatIntelSet
// 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 GetThreatIntelSetRequest method.
// req, resp := client.GetThreatIntelSetRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetThreatIntelSet
func (c *GuardDuty) GetThreatIntelSetRequest(input *GetThreatIntelSetInput) (req *request.Request, output *GetThreatIntelSetOutput) {
op := &request.Operation{
Name: opGetThreatIntelSet,
HTTPMethod: "GET",
HTTPPath: "/detector/{detectorId}/threatintelset/{threatIntelSetId}",
}
if input == nil {
input = &GetThreatIntelSetInput{}
}
output = &GetThreatIntelSetOutput{}
req = c.newRequest(op, input, output)
return
}
// GetThreatIntelSet API operation for Amazon GuardDuty.
//
// Retrieves the ThreatIntelSet that is specified by the ThreatIntelSet ID.
//
// 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 GuardDuty's
// API operation GetThreatIntelSet for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetThreatIntelSet
func (c *GuardDuty) GetThreatIntelSet(input *GetThreatIntelSetInput) (*GetThreatIntelSetOutput, error) {
req, out := c.GetThreatIntelSetRequest(input)
return out, req.Send()
}
// GetThreatIntelSetWithContext is the same as GetThreatIntelSet with the addition of
// the ability to pass a context and additional request options.
//
// See GetThreatIntelSet 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 *GuardDuty) GetThreatIntelSetWithContext(ctx aws.Context, input *GetThreatIntelSetInput, opts ...request.Option) (*GetThreatIntelSetOutput, error) {
req, out := c.GetThreatIntelSetRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opInviteMembers = "InviteMembers"
// InviteMembersRequest generates a "aws/request.Request" representing the
// client's request for the InviteMembers operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 InviteMembers for more information on using the InviteMembers
// 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 InviteMembersRequest method.
// req, resp := client.InviteMembersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/InviteMembers
func (c *GuardDuty) InviteMembersRequest(input *InviteMembersInput) (req *request.Request, output *InviteMembersOutput) {
op := &request.Operation{
Name: opInviteMembers,
HTTPMethod: "POST",
HTTPPath: "/detector/{detectorId}/member/invite",
}
if input == nil {
input = &InviteMembersInput{}
}
output = &InviteMembersOutput{}
req = c.newRequest(op, input, output)
return
}
// InviteMembers API operation for Amazon GuardDuty.
//
// Invites other AWS accounts (created as members of the current AWS account
// by CreateMembers) to enable GuardDuty and allow the current AWS account to
// view and manage these accounts' GuardDuty findings on their behalf as the
// master 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 GuardDuty's
// API operation InviteMembers for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/InviteMembers
func (c *GuardDuty) InviteMembers(input *InviteMembersInput) (*InviteMembersOutput, error) {
req, out := c.InviteMembersRequest(input)
return out, req.Send()
}
// InviteMembersWithContext is the same as InviteMembers with the addition of
// the ability to pass a context and additional request options.
//
// See InviteMembers 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 *GuardDuty) InviteMembersWithContext(ctx aws.Context, input *InviteMembersInput, opts ...request.Option) (*InviteMembersOutput, error) {
req, out := c.InviteMembersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListDetectors = "ListDetectors"
// ListDetectorsRequest generates a "aws/request.Request" representing the
// client's request for the ListDetectors operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 ListDetectors for more information on using the ListDetectors
// 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 ListDetectorsRequest method.
// req, resp := client.ListDetectorsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListDetectors
func (c *GuardDuty) ListDetectorsRequest(input *ListDetectorsInput) (req *request.Request, output *ListDetectorsOutput) {
op := &request.Operation{
Name: opListDetectors,
HTTPMethod: "GET",
HTTPPath: "/detector",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListDetectorsInput{}
}
output = &ListDetectorsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListDetectors API operation for Amazon GuardDuty.
//
// Lists detectorIds of all the existing Amazon GuardDuty detector resources.
//
// 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 GuardDuty's
// API operation ListDetectors for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListDetectors
func (c *GuardDuty) ListDetectors(input *ListDetectorsInput) (*ListDetectorsOutput, error) {
req, out := c.ListDetectorsRequest(input)
return out, req.Send()
}
// ListDetectorsWithContext is the same as ListDetectors with the addition of
// the ability to pass a context and additional request options.
//
// See ListDetectors 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 *GuardDuty) ListDetectorsWithContext(ctx aws.Context, input *ListDetectorsInput, opts ...request.Option) (*ListDetectorsOutput, error) {
req, out := c.ListDetectorsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListDetectorsPages iterates over the pages of a ListDetectors operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListDetectors 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 ListDetectors operation.
// pageNum := 0
// err := client.ListDetectorsPages(params,
// func(page *guardduty.ListDetectorsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *GuardDuty) ListDetectorsPages(input *ListDetectorsInput, fn func(*ListDetectorsOutput, bool) bool) error {
return c.ListDetectorsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListDetectorsPagesWithContext same as ListDetectorsPages 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 *GuardDuty) ListDetectorsPagesWithContext(ctx aws.Context, input *ListDetectorsInput, fn func(*ListDetectorsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListDetectorsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListDetectorsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListDetectorsOutput), !p.HasNextPage())
}
return p.Err()
}
const opListFilters = "ListFilters"
// ListFiltersRequest generates a "aws/request.Request" representing the
// client's request for the ListFilters operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 ListFilters for more information on using the ListFilters
// 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 ListFiltersRequest method.
// req, resp := client.ListFiltersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListFilters
func (c *GuardDuty) ListFiltersRequest(input *ListFiltersInput) (req *request.Request, output *ListFiltersOutput) {
op := &request.Operation{
Name: opListFilters,
HTTPMethod: "GET",
HTTPPath: "/detector/{detectorId}/filter",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListFiltersInput{}
}
output = &ListFiltersOutput{}
req = c.newRequest(op, input, output)
return
}
// ListFilters API operation for Amazon GuardDuty.
//
// Returns a paginated list of the current filters.
//
// 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 GuardDuty's
// API operation ListFilters for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListFilters
func (c *GuardDuty) ListFilters(input *ListFiltersInput) (*ListFiltersOutput, error) {
req, out := c.ListFiltersRequest(input)
return out, req.Send()
}
// ListFiltersWithContext is the same as ListFilters with the addition of
// the ability to pass a context and additional request options.
//
// See ListFilters 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 *GuardDuty) ListFiltersWithContext(ctx aws.Context, input *ListFiltersInput, opts ...request.Option) (*ListFiltersOutput, error) {
req, out := c.ListFiltersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListFiltersPages iterates over the pages of a ListFilters operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListFilters 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 ListFilters operation.
// pageNum := 0
// err := client.ListFiltersPages(params,
// func(page *guardduty.ListFiltersOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *GuardDuty) ListFiltersPages(input *ListFiltersInput, fn func(*ListFiltersOutput, bool) bool) error {
return c.ListFiltersPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListFiltersPagesWithContext same as ListFiltersPages 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 *GuardDuty) ListFiltersPagesWithContext(ctx aws.Context, input *ListFiltersInput, fn func(*ListFiltersOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListFiltersInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListFiltersRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListFiltersOutput), !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
// successfully.
//
// 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/guardduty-2017-11-28/ListFindings
func (c *GuardDuty) ListFindingsRequest(input *ListFindingsInput) (req *request.Request, output *ListFindingsOutput) {
op := &request.Operation{
Name: opListFindings,
HTTPMethod: "POST",
HTTPPath: "/detector/{detectorId}/findings",
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 GuardDuty.
//
// Lists Amazon GuardDuty findings for the specified detector ID.
//
// 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 GuardDuty's
// API operation ListFindings for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListFindings
func (c *GuardDuty) 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 *GuardDuty) 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 *guardduty.ListFindingsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *GuardDuty) 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 *GuardDuty) 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 opListIPSets = "ListIPSets"
// ListIPSetsRequest generates a "aws/request.Request" representing the
// client's request for the ListIPSets operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 ListIPSets for more information on using the ListIPSets
// 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 ListIPSetsRequest method.
// req, resp := client.ListIPSetsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListIPSets
func (c *GuardDuty) ListIPSetsRequest(input *ListIPSetsInput) (req *request.Request, output *ListIPSetsOutput) {
op := &request.Operation{
Name: opListIPSets,
HTTPMethod: "GET",
HTTPPath: "/detector/{detectorId}/ipset",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListIPSetsInput{}
}
output = &ListIPSetsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListIPSets API operation for Amazon GuardDuty.
//
// Lists the IPSets of the GuardDuty service specified by the detector ID.
//
// 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 GuardDuty's
// API operation ListIPSets for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListIPSets
func (c *GuardDuty) ListIPSets(input *ListIPSetsInput) (*ListIPSetsOutput, error) {
req, out := c.ListIPSetsRequest(input)
return out, req.Send()
}
// ListIPSetsWithContext is the same as ListIPSets with the addition of
// the ability to pass a context and additional request options.
//
// See ListIPSets 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 *GuardDuty) ListIPSetsWithContext(ctx aws.Context, input *ListIPSetsInput, opts ...request.Option) (*ListIPSetsOutput, error) {
req, out := c.ListIPSetsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListIPSetsPages iterates over the pages of a ListIPSets operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListIPSets 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 ListIPSets operation.
// pageNum := 0
// err := client.ListIPSetsPages(params,
// func(page *guardduty.ListIPSetsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *GuardDuty) ListIPSetsPages(input *ListIPSetsInput, fn func(*ListIPSetsOutput, bool) bool) error {
return c.ListIPSetsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListIPSetsPagesWithContext same as ListIPSetsPages 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 *GuardDuty) ListIPSetsPagesWithContext(ctx aws.Context, input *ListIPSetsInput, fn func(*ListIPSetsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListIPSetsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListIPSetsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListIPSetsOutput), !p.HasNextPage())
}
return p.Err()
}
const opListInvitations = "ListInvitations"
// ListInvitationsRequest generates a "aws/request.Request" representing the
// client's request for the ListInvitations operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 ListInvitations for more information on using the ListInvitations
// 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 ListInvitationsRequest method.
// req, resp := client.ListInvitationsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListInvitations
func (c *GuardDuty) ListInvitationsRequest(input *ListInvitationsInput) (req *request.Request, output *ListInvitationsOutput) {
op := &request.Operation{
Name: opListInvitations,
HTTPMethod: "GET",
HTTPPath: "/invitation",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListInvitationsInput{}
}
output = &ListInvitationsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListInvitations API operation for Amazon GuardDuty.
//
// Lists all GuardDuty membership invitations that were sent to the current
// 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 GuardDuty's
// API operation ListInvitations for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListInvitations
func (c *GuardDuty) ListInvitations(input *ListInvitationsInput) (*ListInvitationsOutput, error) {
req, out := c.ListInvitationsRequest(input)
return out, req.Send()
}
// ListInvitationsWithContext is the same as ListInvitations with the addition of
// the ability to pass a context and additional request options.
//
// See ListInvitations 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 *GuardDuty) ListInvitationsWithContext(ctx aws.Context, input *ListInvitationsInput, opts ...request.Option) (*ListInvitationsOutput, error) {
req, out := c.ListInvitationsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListInvitationsPages iterates over the pages of a ListInvitations operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListInvitations 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 ListInvitations operation.
// pageNum := 0
// err := client.ListInvitationsPages(params,
// func(page *guardduty.ListInvitationsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *GuardDuty) ListInvitationsPages(input *ListInvitationsInput, fn func(*ListInvitationsOutput, bool) bool) error {
return c.ListInvitationsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListInvitationsPagesWithContext same as ListInvitationsPages 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 *GuardDuty) ListInvitationsPagesWithContext(ctx aws.Context, input *ListInvitationsInput, fn func(*ListInvitationsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListInvitationsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListInvitationsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListInvitationsOutput), !p.HasNextPage())
}
return p.Err()
}
const opListMembers = "ListMembers"
// ListMembersRequest generates a "aws/request.Request" representing the
// client's request for the ListMembers operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 ListMembers for more information on using the ListMembers
// 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 ListMembersRequest method.
// req, resp := client.ListMembersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListMembers
func (c *GuardDuty) ListMembersRequest(input *ListMembersInput) (req *request.Request, output *ListMembersOutput) {
op := &request.Operation{
Name: opListMembers,
HTTPMethod: "GET",
HTTPPath: "/detector/{detectorId}/member",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListMembersInput{}
}
output = &ListMembersOutput{}
req = c.newRequest(op, input, output)
return
}
// ListMembers API operation for Amazon GuardDuty.
//
// Lists details about all member accounts for the current GuardDuty master
// 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 GuardDuty's
// API operation ListMembers for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListMembers
func (c *GuardDuty) ListMembers(input *ListMembersInput) (*ListMembersOutput, error) {
req, out := c.ListMembersRequest(input)
return out, req.Send()
}
// ListMembersWithContext is the same as ListMembers with the addition of
// the ability to pass a context and additional request options.
//
// See ListMembers 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 *GuardDuty) ListMembersWithContext(ctx aws.Context, input *ListMembersInput, opts ...request.Option) (*ListMembersOutput, error) {
req, out := c.ListMembersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListMembersPages iterates over the pages of a ListMembers operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListMembers 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 ListMembers operation.
// pageNum := 0
// err := client.ListMembersPages(params,
// func(page *guardduty.ListMembersOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *GuardDuty) ListMembersPages(input *ListMembersInput, fn func(*ListMembersOutput, bool) bool) error {
return c.ListMembersPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListMembersPagesWithContext same as ListMembersPages 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 *GuardDuty) ListMembersPagesWithContext(ctx aws.Context, input *ListMembersInput, fn func(*ListMembersOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListMembersInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListMembersRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListMembersOutput), !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
// successfully.
//
// 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/guardduty-2017-11-28/ListTagsForResource
func (c *GuardDuty) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
op := &request.Operation{
Name: opListTagsForResource,
HTTPMethod: "GET",
HTTPPath: "/tags/{resourceArn}",
}
if input == nil {
input = &ListTagsForResourceInput{}
}
output = &ListTagsForResourceOutput{}
req = c.newRequest(op, input, output)
return
}
// ListTagsForResource API operation for Amazon GuardDuty.
//
// Lists tags for a resource. Tagging is currently supported for detectors,
// finding filters, IP sets, and Threat Intel sets, with a limit of 50 tags
// per resource. When invoked, this operation returns all assigned tags for
// a given resource..
//
// 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 GuardDuty's
// API operation ListTagsForResource for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListTagsForResource
func (c *GuardDuty) 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 *GuardDuty) 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 opListThreatIntelSets = "ListThreatIntelSets"
// ListThreatIntelSetsRequest generates a "aws/request.Request" representing the
// client's request for the ListThreatIntelSets operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 ListThreatIntelSets for more information on using the ListThreatIntelSets
// 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 ListThreatIntelSetsRequest method.
// req, resp := client.ListThreatIntelSetsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListThreatIntelSets
func (c *GuardDuty) ListThreatIntelSetsRequest(input *ListThreatIntelSetsInput) (req *request.Request, output *ListThreatIntelSetsOutput) {
op := &request.Operation{
Name: opListThreatIntelSets,
HTTPMethod: "GET",
HTTPPath: "/detector/{detectorId}/threatintelset",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListThreatIntelSetsInput{}
}
output = &ListThreatIntelSetsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListThreatIntelSets API operation for Amazon GuardDuty.
//
// Lists the ThreatIntelSets of the GuardDuty service specified by the detector
// ID.
//
// 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 GuardDuty's
// API operation ListThreatIntelSets for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListThreatIntelSets
func (c *GuardDuty) ListThreatIntelSets(input *ListThreatIntelSetsInput) (*ListThreatIntelSetsOutput, error) {
req, out := c.ListThreatIntelSetsRequest(input)
return out, req.Send()
}
// ListThreatIntelSetsWithContext is the same as ListThreatIntelSets with the addition of
// the ability to pass a context and additional request options.
//
// See ListThreatIntelSets 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 *GuardDuty) ListThreatIntelSetsWithContext(ctx aws.Context, input *ListThreatIntelSetsInput, opts ...request.Option) (*ListThreatIntelSetsOutput, error) {
req, out := c.ListThreatIntelSetsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListThreatIntelSetsPages iterates over the pages of a ListThreatIntelSets operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListThreatIntelSets 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 ListThreatIntelSets operation.
// pageNum := 0
// err := client.ListThreatIntelSetsPages(params,
// func(page *guardduty.ListThreatIntelSetsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *GuardDuty) ListThreatIntelSetsPages(input *ListThreatIntelSetsInput, fn func(*ListThreatIntelSetsOutput, bool) bool) error {
return c.ListThreatIntelSetsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListThreatIntelSetsPagesWithContext same as ListThreatIntelSetsPages 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 *GuardDuty) ListThreatIntelSetsPagesWithContext(ctx aws.Context, input *ListThreatIntelSetsInput, fn func(*ListThreatIntelSetsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListThreatIntelSetsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListThreatIntelSetsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListThreatIntelSetsOutput), !p.HasNextPage())
}
return p.Err()
}
const opStartMonitoringMembers = "StartMonitoringMembers"
// StartMonitoringMembersRequest generates a "aws/request.Request" representing the
// client's request for the StartMonitoringMembers operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 StartMonitoringMembers for more information on using the StartMonitoringMembers
// 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 StartMonitoringMembersRequest method.
// req, resp := client.StartMonitoringMembersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/StartMonitoringMembers
func (c *GuardDuty) StartMonitoringMembersRequest(input *StartMonitoringMembersInput) (req *request.Request, output *StartMonitoringMembersOutput) {
op := &request.Operation{
Name: opStartMonitoringMembers,
HTTPMethod: "POST",
HTTPPath: "/detector/{detectorId}/member/start",
}
if input == nil {
input = &StartMonitoringMembersInput{}
}
output = &StartMonitoringMembersOutput{}
req = c.newRequest(op, input, output)
return
}
// StartMonitoringMembers API operation for Amazon GuardDuty.
//
// Re-enables GuardDuty to monitor findings of the member accounts specified
// by the account IDs. A master GuardDuty account can run this command after
// disabling GuardDuty from monitoring these members' findings by running StopMonitoringMembers.
//
// 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 GuardDuty's
// API operation StartMonitoringMembers for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/StartMonitoringMembers
func (c *GuardDuty) StartMonitoringMembers(input *StartMonitoringMembersInput) (*StartMonitoringMembersOutput, error) {
req, out := c.StartMonitoringMembersRequest(input)
return out, req.Send()
}
// StartMonitoringMembersWithContext is the same as StartMonitoringMembers with the addition of
// the ability to pass a context and additional request options.
//
// See StartMonitoringMembers 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 *GuardDuty) StartMonitoringMembersWithContext(ctx aws.Context, input *StartMonitoringMembersInput, opts ...request.Option) (*StartMonitoringMembersOutput, error) {
req, out := c.StartMonitoringMembersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opStopMonitoringMembers = "StopMonitoringMembers"
// StopMonitoringMembersRequest generates a "aws/request.Request" representing the
// client's request for the StopMonitoringMembers operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 StopMonitoringMembers for more information on using the StopMonitoringMembers
// 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 StopMonitoringMembersRequest method.
// req, resp := client.StopMonitoringMembersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/StopMonitoringMembers
func (c *GuardDuty) StopMonitoringMembersRequest(input *StopMonitoringMembersInput) (req *request.Request, output *StopMonitoringMembersOutput) {
op := &request.Operation{
Name: opStopMonitoringMembers,
HTTPMethod: "POST",
HTTPPath: "/detector/{detectorId}/member/stop",
}
if input == nil {
input = &StopMonitoringMembersInput{}
}
output = &StopMonitoringMembersOutput{}
req = c.newRequest(op, input, output)
return
}
// StopMonitoringMembers API operation for Amazon GuardDuty.
//
// Disables GuardDuty from monitoring findings of the member accounts specified
// by the account IDs. After running this command, a master GuardDuty account
// can run StartMonitoringMembers to re-enable GuardDuty to monitor these members’
// 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 GuardDuty's
// API operation StopMonitoringMembers for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/StopMonitoringMembers
func (c *GuardDuty) StopMonitoringMembers(input *StopMonitoringMembersInput) (*StopMonitoringMembersOutput, error) {
req, out := c.StopMonitoringMembersRequest(input)
return out, req.Send()
}
// StopMonitoringMembersWithContext is the same as StopMonitoringMembers with the addition of
// the ability to pass a context and additional request options.
//
// See StopMonitoringMembers 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 *GuardDuty) StopMonitoringMembersWithContext(ctx aws.Context, input *StopMonitoringMembersInput, opts ...request.Option) (*StopMonitoringMembersOutput, error) {
req, out := c.StopMonitoringMembersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opTagResource = "TagResource"
// TagResourceRequest generates a "aws/request.Request" representing the
// client's request for the TagResource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 TagResource for more information on using the TagResource
// 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 TagResourceRequest method.
// req, resp := client.TagResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/TagResource
func (c *GuardDuty) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
op := &request.Operation{
Name: opTagResource,
HTTPMethod: "POST",
HTTPPath: "/tags/{resourceArn}",
}
if input == nil {
input = &TagResourceInput{}
}
output = &TagResourceOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// TagResource API operation for Amazon GuardDuty.
//
// Adds tags to a resource.
//
// 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 GuardDuty's
// API operation TagResource for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// Bad request exception object.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// Internal server error exception object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/TagResource
func (c *GuardDuty) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
req, out := c.TagResourceRequest(input)
return out, req.Send()
}
// TagResourceWithContext is the same as TagResource with the addition of
// the ability to pass a context and additional request options.
//
// See TagResource 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 *GuardDuty) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
req, out := c.TagResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUnarchiveFindings = "UnarchiveFindings"
// UnarchiveFindingsRequest generates a "aws/request.Request" representing the
// client's request for the UnarchiveFindings operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// 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 UnarchiveFindings for more information on using the UnarchiveFindings
// 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 h