detective

package
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2020 License: Apache-2.0 Imports: 9 Imported by: 12

Documentation

Overview

Package detective provides the client and types for making API requests to Amazon Detective.

Detective uses machine learning and purpose-built visualizations to help you analyze and investigate security issues across your Amazon Web Services (AWS) workloads. Detective automatically extracts time-based events such as login attempts, API calls, and network traffic from AWS CloudTrail and Amazon Virtual Private Cloud (Amazon VPC) flow logs. It also extracts findings detected by Amazon GuardDuty.

The Detective API primarily supports the creation and management of behavior graphs. A behavior graph contains the extracted data from a set of member accounts, and is created and managed by a master account.

Every behavior graph is specific to a Region. You can only use the API to manage graphs that belong to the Region that is associated with the currently selected endpoint.

A Detective master account can use the Detective API to do the following:

  • Enable and disable Detective. Enabling Detective creates a new behavior graph.

  • View the list of member accounts in a behavior graph.

  • Add member accounts to a behavior graph.

  • Remove member accounts from a behavior graph.

A member account can use the Detective API to do the following:

  • View the list of behavior graphs that they are invited to.

  • Accept an invitation to contribute to a behavior graph.

  • Decline an invitation to contribute to a behavior graph.

  • Remove their account from a behavior graph.

All API actions are logged as CloudTrail events. See Logging Detective API Calls with CloudTrail (https://docs.aws.amazon.com/detective/latest/adminguide/logging-using-cloudtrail.html).

See https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26 for more information on this service.

See detective package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/detective/

Using the Client

To use Amazon Detective with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.

See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/

See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

See the Amazon Detective client for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/detective/#New

Index

Constants

View Source
const (
	ServiceName = "Amazon Detective" // Service's name
	ServiceID   = "Detective"        // Service's identifier
	EndpointsID = "api.detective"    // Service's Endpoint identifier
)
View Source
const (

	// ErrCodeConflictException for service response error code
	// "ConflictException".
	//
	// The request attempted an invalid action.
	ErrCodeConflictException = "ConflictException"

	// ErrCodeInternalServerException for service response error code
	// "InternalServerException".
	//
	// The request was valid but failed because of a problem with the service.
	ErrCodeInternalServerException = "InternalServerException"

	// ErrCodeResourceNotFoundException for service response error code
	// "ResourceNotFoundException".
	//
	// The request refers to a nonexistent resource.
	ErrCodeResourceNotFoundException = "ResourceNotFoundException"

	// ErrCodeServiceQuotaExceededException for service response error code
	// "ServiceQuotaExceededException".
	//
	// This request cannot be completed for one of the following reasons.
	//
	//    * The request would cause the number of member accounts in the behavior
	//    graph to exceed the maximum allowed. A behavior graph cannot have more
	//    than 1000 member accounts.
	//
	//    * The request would cause the data rate for the behavior graph to exceed
	//    the maximum allowed.
	//
	//    * Detective is unable to verify the data rate for the member account.
	//    This is usually because the member account is not enrolled in Amazon GuardDuty.
	ErrCodeServiceQuotaExceededException = "ServiceQuotaExceededException"

	// ErrCodeValidationException for service response error code
	// "ValidationException".
	//
	// The request parameters are invalid.
	ErrCodeValidationException = "ValidationException"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptInvitationInput

type AcceptInvitationInput struct {

	// The ARN of the behavior graph that the member account is accepting the invitation
	// for.
	//
	// The member account status in the behavior graph must be INVITED.
	//
	// GraphArn is a required field
	GraphArn *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (AcceptInvitationInput) MarshalFields

func (s AcceptInvitationInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (AcceptInvitationInput) String

func (s AcceptInvitationInput) String() string

String returns the string representation

func (*AcceptInvitationInput) Validate

func (s *AcceptInvitationInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type AcceptInvitationOutput

type AcceptInvitationOutput struct {
	// contains filtered or unexported fields
}

func (AcceptInvitationOutput) MarshalFields

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (AcceptInvitationOutput) String

func (s AcceptInvitationOutput) String() string

String returns the string representation

type AcceptInvitationRequest

type AcceptInvitationRequest struct {
	*aws.Request
	Input *AcceptInvitationInput
	Copy  func(*AcceptInvitationInput) AcceptInvitationRequest
}

AcceptInvitationRequest is the request type for the AcceptInvitation API operation.

func (AcceptInvitationRequest) Send

Send marshals and sends the AcceptInvitation API request.

type AcceptInvitationResponse

type AcceptInvitationResponse struct {
	*AcceptInvitationOutput
	// contains filtered or unexported fields
}

AcceptInvitationResponse is the response type for the AcceptInvitation API operation.

func (*AcceptInvitationResponse) SDKResponseMetdata

func (r *AcceptInvitationResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the AcceptInvitation request.

type Account

type Account struct {

	// The account identifier of the AWS account.
	//
	// AccountId is a required field
	AccountId *string `min:"12" type:"string" required:"true"`

	// The AWS account root user email address for the AWS account.
	//
	// EmailAddress is a required field
	EmailAddress *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

An AWS account that is the master of or a member of a behavior graph.

func (Account) MarshalFields

func (s Account) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (Account) String

func (s Account) String() string

String returns the string representation

func (*Account) Validate

func (s *Account) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type Client

type Client struct {
	*aws.Client
}

Client provides the API operation methods for making requests to Amazon Detective. See this package's package overview docs for details on the service.

The client's methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

func New(config aws.Config) *Client

New creates a new instance of the client from the provided Config.

Example:

// Create a client from just a config.
svc := detective.New(myConfig)

func (*Client) AcceptInvitationRequest

func (c *Client) AcceptInvitationRequest(input *AcceptInvitationInput) AcceptInvitationRequest

AcceptInvitationRequest returns a request value for making API operation for Amazon Detective.

Accepts an invitation for the member account to contribute data to a behavior graph. This operation can only be called by an invited member account.

The request provides the ARN of behavior graph.

The member account status in the graph must be INVITED.

// Example sending a request using AcceptInvitationRequest.
req := client.AcceptInvitationRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/AcceptInvitation

func (*Client) CreateGraphRequest

func (c *Client) CreateGraphRequest(input *CreateGraphInput) CreateGraphRequest

CreateGraphRequest returns a request value for making API operation for Amazon Detective.

Creates a new behavior graph for the calling account, and sets that account as the master account. This operation is called by the account that is enabling Detective.

Before you try to enable Detective, make sure that your account has been enrolled in Amazon GuardDuty for at least 48 hours. If you do not meet this requirement, you cannot enable Detective. If you do meet the GuardDuty prerequisite, then when you make the request to enable Detective, it checks whether your data volume is within the Detective quota. If it exceeds the quota, then you cannot enable Detective.

The operation also enables Detective for the calling account in the currently selected Region. It returns the ARN of the new behavior graph.

CreateGraph triggers a process to create the corresponding data tables for the new behavior graph.

An account can only be the master account for one behavior graph within a Region. If the same account calls CreateGraph with the same master account, it always returns the same behavior graph ARN. It does not create a new behavior graph.

// Example sending a request using CreateGraphRequest.
req := client.CreateGraphRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/CreateGraph

func (*Client) CreateMembersRequest

func (c *Client) CreateMembersRequest(input *CreateMembersInput) CreateMembersRequest

CreateMembersRequest returns a request value for making API operation for Amazon Detective.

Sends a request to invite the specified AWS accounts to be member accounts in the behavior graph. This operation can only be called by the master account for a behavior graph.

CreateMembers verifies the accounts and then sends invitations to the verified accounts.

The request provides the behavior graph ARN and the list of accounts to invite.

The response separates the requested accounts into two lists:

  • The accounts that CreateMembers was able to start the verification for. This list includes member accounts that are being verified, that have passed verification and are being sent an invitation, and that have failed verification.

  • The accounts that CreateMembers was unable to process. This list includes accounts that were already invited to be member accounts in the behavior graph.

    // Example sending a request using CreateMembersRequest. req := client.CreateMembersRequest(params) resp, err := req.Send(context.TODO()) if err == nil { fmt.Println(resp) }

Please also see https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/CreateMembers

func (*Client) DeleteGraphRequest

func (c *Client) DeleteGraphRequest(input *DeleteGraphInput) DeleteGraphRequest

DeleteGraphRequest returns a request value for making API operation for Amazon Detective.

Disables the specified behavior graph and queues it to be deleted. This operation removes the graph from each member account's list of behavior graphs.

DeleteGraph can only be called by the master account for a behavior graph.

// Example sending a request using DeleteGraphRequest.
req := client.DeleteGraphRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/DeleteGraph

func (*Client) DeleteMembersRequest

func (c *Client) DeleteMembersRequest(input *DeleteMembersInput) DeleteMembersRequest

DeleteMembersRequest returns a request value for making API operation for Amazon Detective.

Deletes one or more member accounts from the master account behavior graph. This operation can only be called by a Detective master account. That account cannot use DeleteMembers to delete their own account from the behavior graph. To disable a behavior graph, the master account uses the DeleteGraph API method.

// Example sending a request using DeleteMembersRequest.
req := client.DeleteMembersRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/DeleteMembers

func (*Client) DisassociateMembershipRequest

func (c *Client) DisassociateMembershipRequest(input *DisassociateMembershipInput) DisassociateMembershipRequest

DisassociateMembershipRequest returns a request value for making API operation for Amazon Detective.

Removes the member account from the specified behavior graph. This operation can only be called by a member account that has the ENABLED status.

// Example sending a request using DisassociateMembershipRequest.
req := client.DisassociateMembershipRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/DisassociateMembership

func (*Client) GetMembersRequest

func (c *Client) GetMembersRequest(input *GetMembersInput) GetMembersRequest

GetMembersRequest returns a request value for making API operation for Amazon Detective.

Returns the membership details for specified member accounts for a behavior graph.

// Example sending a request using GetMembersRequest.
req := client.GetMembersRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/GetMembers

func (*Client) ListGraphsRequest

func (c *Client) ListGraphsRequest(input *ListGraphsInput) ListGraphsRequest

ListGraphsRequest returns a request value for making API operation for Amazon Detective.

Returns the list of behavior graphs that the calling account is a master of. This operation can only be called by a master account.

Because an account can currently only be the master of one behavior graph within a Region, the results always contain a single graph.

// Example sending a request using ListGraphsRequest.
req := client.ListGraphsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListGraphs

func (*Client) ListInvitationsRequest

func (c *Client) ListInvitationsRequest(input *ListInvitationsInput) ListInvitationsRequest

ListInvitationsRequest returns a request value for making API operation for Amazon Detective.

Retrieves the list of open and accepted behavior graph invitations for the member account. This operation can only be called by a member account.

Open invitations are invitations that the member account has not responded to.

The results do not include behavior graphs for which the member account declined the invitation. The results also do not include behavior graphs that the member account resigned from or was removed from.

// Example sending a request using ListInvitationsRequest.
req := client.ListInvitationsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListInvitations

func (*Client) ListMembersRequest

func (c *Client) ListMembersRequest(input *ListMembersInput) ListMembersRequest

ListMembersRequest returns a request value for making API operation for Amazon Detective.

Retrieves the list of member accounts for a behavior graph. Does not return member accounts that were removed from the behavior graph.

// Example sending a request using ListMembersRequest.
req := client.ListMembersRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListMembers

func (*Client) RejectInvitationRequest

func (c *Client) RejectInvitationRequest(input *RejectInvitationInput) RejectInvitationRequest

RejectInvitationRequest returns a request value for making API operation for Amazon Detective.

Rejects an invitation to contribute the account data to a behavior graph. This operation must be called by a member account that has the INVITED status.

// Example sending a request using RejectInvitationRequest.
req := client.RejectInvitationRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/RejectInvitation

func (*Client) StartMonitoringMemberRequest added in v0.21.0

func (c *Client) StartMonitoringMemberRequest(input *StartMonitoringMemberInput) StartMonitoringMemberRequest

StartMonitoringMemberRequest returns a request value for making API operation for Amazon Detective.

Sends a request to enable data ingest for a member account that has a status of ACCEPTED_BUT_DISABLED.

For valid member accounts, the status is updated as follows.

  • If Detective enabled the member account, then the new status is ENABLED.

  • If Detective cannot enable the member account, the status remains ACCEPTED_BUT_DISABLED.

    // Example sending a request using StartMonitoringMemberRequest. req := client.StartMonitoringMemberRequest(params) resp, err := req.Send(context.TODO()) if err == nil { fmt.Println(resp) }

Please also see https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/StartMonitoringMember

type CreateGraphInput

type CreateGraphInput struct {
	// contains filtered or unexported fields
}

func (CreateGraphInput) MarshalFields

func (s CreateGraphInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (CreateGraphInput) String

func (s CreateGraphInput) String() string

String returns the string representation

type CreateGraphOutput

type CreateGraphOutput struct {

	// The ARN of the new behavior graph.
	GraphArn *string `type:"string"`
	// contains filtered or unexported fields
}

func (CreateGraphOutput) MarshalFields

func (s CreateGraphOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (CreateGraphOutput) String

func (s CreateGraphOutput) String() string

String returns the string representation

type CreateGraphRequest

type CreateGraphRequest struct {
	*aws.Request
	Input *CreateGraphInput
	Copy  func(*CreateGraphInput) CreateGraphRequest
}

CreateGraphRequest is the request type for the CreateGraph API operation.

func (CreateGraphRequest) Send

Send marshals and sends the CreateGraph API request.

type CreateGraphResponse

type CreateGraphResponse struct {
	*CreateGraphOutput
	// contains filtered or unexported fields
}

CreateGraphResponse is the response type for the CreateGraph API operation.

func (*CreateGraphResponse) SDKResponseMetdata

func (r *CreateGraphResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the CreateGraph request.

type CreateMembersInput

type CreateMembersInput struct {

	// The list of AWS accounts to invite to become member accounts in the behavior
	// graph. For each invited account, the account list contains the account identifier
	// and the AWS account root user email address.
	//
	// Accounts is a required field
	Accounts []Account `min:"1" type:"list" required:"true"`

	// The ARN of the behavior graph to invite the member accounts to contribute
	// their data to.
	//
	// GraphArn is a required field
	GraphArn *string `type:"string" required:"true"`

	// Customized message text to include in the invitation email message to the
	// invited member accounts.
	Message *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (CreateMembersInput) MarshalFields

func (s CreateMembersInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (CreateMembersInput) String

func (s CreateMembersInput) String() string

String returns the string representation

func (*CreateMembersInput) Validate

func (s *CreateMembersInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CreateMembersOutput

type CreateMembersOutput struct {

	// The set of member account invitation requests that Detective was able to
	// process. This includes accounts that are being verified, that failed verification,
	// and that passed verification and are being sent an invitation.
	Members []MemberDetail `type:"list"`

	// The list of accounts for which Detective was unable to process the invitation
	// request. For each account, the list provides the reason why the request could
	// not be processed. The list includes accounts that are already member accounts
	// in the behavior graph.
	UnprocessedAccounts []UnprocessedAccount `type:"list"`
	// contains filtered or unexported fields
}

func (CreateMembersOutput) MarshalFields

func (s CreateMembersOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (CreateMembersOutput) String

func (s CreateMembersOutput) String() string

String returns the string representation

type CreateMembersRequest

type CreateMembersRequest struct {
	*aws.Request
	Input *CreateMembersInput
	Copy  func(*CreateMembersInput) CreateMembersRequest
}

CreateMembersRequest is the request type for the CreateMembers API operation.

func (CreateMembersRequest) Send

Send marshals and sends the CreateMembers API request.

type CreateMembersResponse

type CreateMembersResponse struct {
	*CreateMembersOutput
	// contains filtered or unexported fields
}

CreateMembersResponse is the response type for the CreateMembers API operation.

func (*CreateMembersResponse) SDKResponseMetdata

func (r *CreateMembersResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the CreateMembers request.

type DeleteGraphInput

type DeleteGraphInput struct {

	// The ARN of the behavior graph to disable.
	//
	// GraphArn is a required field
	GraphArn *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DeleteGraphInput) MarshalFields

func (s DeleteGraphInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DeleteGraphInput) String

func (s DeleteGraphInput) String() string

String returns the string representation

func (*DeleteGraphInput) Validate

func (s *DeleteGraphInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteGraphOutput

type DeleteGraphOutput struct {
	// contains filtered or unexported fields
}

func (DeleteGraphOutput) MarshalFields

func (s DeleteGraphOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DeleteGraphOutput) String

func (s DeleteGraphOutput) String() string

String returns the string representation

type DeleteGraphRequest

type DeleteGraphRequest struct {
	*aws.Request
	Input *DeleteGraphInput
	Copy  func(*DeleteGraphInput) DeleteGraphRequest
}

DeleteGraphRequest is the request type for the DeleteGraph API operation.

func (DeleteGraphRequest) Send

Send marshals and sends the DeleteGraph API request.

type DeleteGraphResponse

type DeleteGraphResponse struct {
	*DeleteGraphOutput
	// contains filtered or unexported fields
}

DeleteGraphResponse is the response type for the DeleteGraph API operation.

func (*DeleteGraphResponse) SDKResponseMetdata

func (r *DeleteGraphResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DeleteGraph request.

type DeleteMembersInput

type DeleteMembersInput struct {

	// The list of AWS account identifiers for the member accounts to delete from
	// the behavior graph.
	//
	// AccountIds is a required field
	AccountIds []string `min:"1" type:"list" required:"true"`

	// The ARN of the behavior graph to delete members from.
	//
	// GraphArn is a required field
	GraphArn *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DeleteMembersInput) MarshalFields

func (s DeleteMembersInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DeleteMembersInput) String

func (s DeleteMembersInput) String() string

String returns the string representation

func (*DeleteMembersInput) Validate

func (s *DeleteMembersInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteMembersOutput

type DeleteMembersOutput struct {

	// The list of AWS account identifiers for the member accounts that Detective
	// successfully deleted from the behavior graph.
	AccountIds []string `min:"1" type:"list"`

	// The list of member accounts that Detective was not able to delete from the
	// behavior graph. For each member account, provides the reason that the deletion
	// could not be processed.
	UnprocessedAccounts []UnprocessedAccount `type:"list"`
	// contains filtered or unexported fields
}

func (DeleteMembersOutput) MarshalFields

func (s DeleteMembersOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DeleteMembersOutput) String

func (s DeleteMembersOutput) String() string

String returns the string representation

type DeleteMembersRequest

type DeleteMembersRequest struct {
	*aws.Request
	Input *DeleteMembersInput
	Copy  func(*DeleteMembersInput) DeleteMembersRequest
}

DeleteMembersRequest is the request type for the DeleteMembers API operation.

func (DeleteMembersRequest) Send

Send marshals and sends the DeleteMembers API request.

type DeleteMembersResponse

type DeleteMembersResponse struct {
	*DeleteMembersOutput
	// contains filtered or unexported fields
}

DeleteMembersResponse is the response type for the DeleteMembers API operation.

func (*DeleteMembersResponse) SDKResponseMetdata

func (r *DeleteMembersResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DeleteMembers request.

type DisassociateMembershipInput

type DisassociateMembershipInput struct {

	// The ARN of the behavior graph to remove the member account from.
	//
	// The member account's member status in the behavior graph must be ENABLED.
	//
	// GraphArn is a required field
	GraphArn *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DisassociateMembershipInput) MarshalFields

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DisassociateMembershipInput) String

String returns the string representation

func (*DisassociateMembershipInput) Validate

func (s *DisassociateMembershipInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DisassociateMembershipOutput

type DisassociateMembershipOutput struct {
	// contains filtered or unexported fields
}

func (DisassociateMembershipOutput) MarshalFields

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DisassociateMembershipOutput) String

String returns the string representation

type DisassociateMembershipRequest

type DisassociateMembershipRequest struct {
	*aws.Request
	Input *DisassociateMembershipInput
	Copy  func(*DisassociateMembershipInput) DisassociateMembershipRequest
}

DisassociateMembershipRequest is the request type for the DisassociateMembership API operation.

func (DisassociateMembershipRequest) Send

Send marshals and sends the DisassociateMembership API request.

type DisassociateMembershipResponse

type DisassociateMembershipResponse struct {
	*DisassociateMembershipOutput
	// contains filtered or unexported fields
}

DisassociateMembershipResponse is the response type for the DisassociateMembership API operation.

func (*DisassociateMembershipResponse) SDKResponseMetdata

func (r *DisassociateMembershipResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DisassociateMembership request.

type GetMembersInput

type GetMembersInput struct {

	// The list of AWS account identifiers for the member account for which to return
	// member details.
	//
	// You cannot use GetMembers to retrieve information about member accounts that
	// were removed from the behavior graph.
	//
	// AccountIds is a required field
	AccountIds []string `min:"1" type:"list" required:"true"`

	// The ARN of the behavior graph for which to request the member details.
	//
	// GraphArn is a required field
	GraphArn *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (GetMembersInput) MarshalFields

func (s GetMembersInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (GetMembersInput) String

func (s GetMembersInput) String() string

String returns the string representation

func (*GetMembersInput) Validate

func (s *GetMembersInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetMembersOutput

type GetMembersOutput struct {

	// The member account details that Detective is returning in response to the
	// request.
	MemberDetails []MemberDetail `type:"list"`

	// The requested member accounts for which Detective was unable to return member
	// details.
	//
	// For each account, provides the reason why the request could not be processed.
	UnprocessedAccounts []UnprocessedAccount `type:"list"`
	// contains filtered or unexported fields
}

func (GetMembersOutput) MarshalFields

func (s GetMembersOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (GetMembersOutput) String

func (s GetMembersOutput) String() string

String returns the string representation

type GetMembersRequest

type GetMembersRequest struct {
	*aws.Request
	Input *GetMembersInput
	Copy  func(*GetMembersInput) GetMembersRequest
}

GetMembersRequest is the request type for the GetMembers API operation.

func (GetMembersRequest) Send

Send marshals and sends the GetMembers API request.

type GetMembersResponse

type GetMembersResponse struct {
	*GetMembersOutput
	// contains filtered or unexported fields
}

GetMembersResponse is the response type for the GetMembers API operation.

func (*GetMembersResponse) SDKResponseMetdata

func (r *GetMembersResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the GetMembers request.

type Graph

type Graph struct {

	// The ARN of the behavior graph.
	Arn *string `type:"string"`

	// The date and time that the behavior graph was created. The value is in milliseconds
	// since the epoch.
	CreatedTime *time.Time `type:"timestamp"`
	// contains filtered or unexported fields
}

A behavior graph in Detective.

func (Graph) MarshalFields

func (s Graph) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (Graph) String

func (s Graph) String() string

String returns the string representation

type ListGraphsInput

type ListGraphsInput struct {

	// The maximum number of graphs to return at a time. The total must be less
	// than the overall limit on the number of results to return, which is currently
	// 200.
	MaxResults *int64 `min:"1" type:"integer"`

	// For requests to get the next page of results, the pagination token that was
	// returned with the previous set of results. The initial request does not include
	// a pagination token.
	NextToken *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (ListGraphsInput) MarshalFields

func (s ListGraphsInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ListGraphsInput) String

func (s ListGraphsInput) String() string

String returns the string representation

func (*ListGraphsInput) Validate

func (s *ListGraphsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListGraphsOutput

type ListGraphsOutput struct {

	// A list of behavior graphs that the account is a master for.
	GraphList []Graph `type:"list"`

	// If there are more behavior graphs remaining in the results, then this is
	// the pagination token to use to request the next page of behavior graphs.
	NextToken *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (ListGraphsOutput) MarshalFields

func (s ListGraphsOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ListGraphsOutput) String

func (s ListGraphsOutput) String() string

String returns the string representation

type ListGraphsPaginator

type ListGraphsPaginator struct {
	aws.Pager
}

ListGraphsPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewListGraphsPaginator

func NewListGraphsPaginator(req ListGraphsRequest) ListGraphsPaginator

NewListGraphsRequestPaginator returns a paginator for ListGraphs. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

Note: This operation can generate multiple requests to a service.

// Example iterating over pages.
req := client.ListGraphsRequest(input)
p := detective.NewListGraphsRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*ListGraphsPaginator) CurrentPage

func (p *ListGraphsPaginator) CurrentPage() *ListGraphsOutput

type ListGraphsRequest

type ListGraphsRequest struct {
	*aws.Request
	Input *ListGraphsInput
	Copy  func(*ListGraphsInput) ListGraphsRequest
}

ListGraphsRequest is the request type for the ListGraphs API operation.

func (ListGraphsRequest) Send

Send marshals and sends the ListGraphs API request.

type ListGraphsResponse

type ListGraphsResponse struct {
	*ListGraphsOutput
	// contains filtered or unexported fields
}

ListGraphsResponse is the response type for the ListGraphs API operation.

func (*ListGraphsResponse) SDKResponseMetdata

func (r *ListGraphsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the ListGraphs request.

type ListInvitationsInput

type ListInvitationsInput struct {

	// The maximum number of behavior graph invitations to return in the response.
	// The total must be less than the overall limit on the number of results to
	// return, which is currently 200.
	MaxResults *int64 `min:"1" type:"integer"`

	// For requests to retrieve the next page of results, the pagination token that
	// was returned with the previous page of results. The initial request does
	// not include a pagination token.
	NextToken *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (ListInvitationsInput) MarshalFields

func (s ListInvitationsInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ListInvitationsInput) String

func (s ListInvitationsInput) String() string

String returns the string representation

func (*ListInvitationsInput) Validate

func (s *ListInvitationsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListInvitationsOutput

type ListInvitationsOutput struct {

	// The list of behavior graphs for which the member account has open or accepted
	// invitations.
	Invitations []MemberDetail `type:"list"`

	// If there are more behavior graphs remaining in the results, then this is
	// the pagination token to use to request the next page of behavior graphs.
	NextToken *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (ListInvitationsOutput) MarshalFields

func (s ListInvitationsOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ListInvitationsOutput) String

func (s ListInvitationsOutput) String() string

String returns the string representation

type ListInvitationsPaginator

type ListInvitationsPaginator struct {
	aws.Pager
}

ListInvitationsPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewListInvitationsPaginator

func NewListInvitationsPaginator(req ListInvitationsRequest) ListInvitationsPaginator

NewListInvitationsRequestPaginator returns a paginator for ListInvitations. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

Note: This operation can generate multiple requests to a service.

// Example iterating over pages.
req := client.ListInvitationsRequest(input)
p := detective.NewListInvitationsRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*ListInvitationsPaginator) CurrentPage

type ListInvitationsRequest

type ListInvitationsRequest struct {
	*aws.Request
	Input *ListInvitationsInput
	Copy  func(*ListInvitationsInput) ListInvitationsRequest
}

ListInvitationsRequest is the request type for the ListInvitations API operation.

func (ListInvitationsRequest) Send

Send marshals and sends the ListInvitations API request.

type ListInvitationsResponse

type ListInvitationsResponse struct {
	*ListInvitationsOutput
	// contains filtered or unexported fields
}

ListInvitationsResponse is the response type for the ListInvitations API operation.

func (*ListInvitationsResponse) SDKResponseMetdata

func (r *ListInvitationsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the ListInvitations request.

type ListMembersInput

type ListMembersInput struct {

	// The ARN of the behavior graph for which to retrieve the list of member accounts.
	//
	// GraphArn is a required field
	GraphArn *string `type:"string" required:"true"`

	// The maximum number of member accounts to include in the response. The total
	// must be less than the overall limit on the number of results to return, which
	// is currently 200.
	MaxResults *int64 `min:"1" type:"integer"`

	// For requests to retrieve the next page of member account results, the pagination
	// token that was returned with the previous page of results. The initial request
	// does not include a pagination token.
	NextToken *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (ListMembersInput) MarshalFields

func (s ListMembersInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ListMembersInput) String

func (s ListMembersInput) String() string

String returns the string representation

func (*ListMembersInput) Validate

func (s *ListMembersInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListMembersOutput

type ListMembersOutput struct {

	// The list of member accounts in the behavior graph.
	//
	// The results include member accounts that did not pass verification and member
	// accounts that have not yet accepted the invitation to the behavior graph.
	// The results do not include member accounts that were removed from the behavior
	// graph.
	MemberDetails []MemberDetail `type:"list"`

	// If there are more member accounts remaining in the results, then this is
	// the pagination token to use to request the next page of member accounts.
	NextToken *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (ListMembersOutput) MarshalFields

func (s ListMembersOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ListMembersOutput) String

func (s ListMembersOutput) String() string

String returns the string representation

type ListMembersPaginator

type ListMembersPaginator struct {
	aws.Pager
}

ListMembersPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewListMembersPaginator

func NewListMembersPaginator(req ListMembersRequest) ListMembersPaginator

NewListMembersRequestPaginator returns a paginator for ListMembers. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

Note: This operation can generate multiple requests to a service.

// Example iterating over pages.
req := client.ListMembersRequest(input)
p := detective.NewListMembersRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*ListMembersPaginator) CurrentPage

func (p *ListMembersPaginator) CurrentPage() *ListMembersOutput

type ListMembersRequest

type ListMembersRequest struct {
	*aws.Request
	Input *ListMembersInput
	Copy  func(*ListMembersInput) ListMembersRequest
}

ListMembersRequest is the request type for the ListMembers API operation.

func (ListMembersRequest) Send

Send marshals and sends the ListMembers API request.

type ListMembersResponse

type ListMembersResponse struct {
	*ListMembersOutput
	// contains filtered or unexported fields
}

ListMembersResponse is the response type for the ListMembers API operation.

func (*ListMembersResponse) SDKResponseMetdata

func (r *ListMembersResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the ListMembers request.

type MemberDetail

type MemberDetail struct {

	// The AWS account identifier for the member account.
	AccountId *string `min:"12" type:"string"`

	// For member accounts with a status of ACCEPTED_BUT_DISABLED, the reason that
	// the member account is not enabled.
	//
	// The reason can have one of the following values:
	//
	//    * VOLUME_TOO_HIGH - Indicates that adding the member account would cause
	//    the data volume for the behavior graph to be too high.
	//
	//    * VOLUME_UNKNOWN - Indicates that Detective is unable to verify the data
	//    volume for the member account. This is usually because the member account
	//    is not enrolled in Amazon GuardDuty.
	DisabledReason MemberDisabledReason `type:"string" enum:"true"`

	// The AWS account root user email address for the member account.
	EmailAddress *string `min:"1" type:"string"`

	// The ARN of the behavior graph that the member account was invited to.
	GraphArn *string `type:"string"`

	// The date and time that Detective sent the invitation to the member account.
	// The value is in milliseconds since the epoch.
	InvitedTime *time.Time `type:"timestamp"`

	// The AWS account identifier of the master account for the behavior graph.
	MasterId *string `min:"12" type:"string"`

	// The member account data volume as a percentage of the maximum allowed data
	// volume. 0 indicates 0 percent, and 100 indicates 100 percent.
	//
	// Note that this is not the percentage of the behavior graph data volume.
	//
	// For example, the data volume for the behavior graph is 80 GB per day. The
	// maximum data volume is 160 GB per day. If the data volume for the member
	// account is 40 GB per day, then PercentOfGraphUtilization is 25. It represents
	// 25% of the maximum allowed data volume.
	PercentOfGraphUtilization *float64 `type:"double"`

	// The date and time when the graph utilization percentage was last updated.
	PercentOfGraphUtilizationUpdatedTime *time.Time `type:"timestamp"`

	// The current membership status of the member account. The status can have
	// one of the following values:
	//
	//    * INVITED - Indicates that the member was sent an invitation but has not
	//    yet responded.
	//
	//    * VERIFICATION_IN_PROGRESS - Indicates that Detective is verifying that
	//    the account identifier and email address provided for the member account
	//    match. If they do match, then Detective sends the invitation. If the email
	//    address and account identifier don't match, then the member cannot be
	//    added to the behavior graph.
	//
	//    * VERIFICATION_FAILED - Indicates that the account and email address provided
	//    for the member account do not match, and Detective did not send an invitation
	//    to the account.
	//
	//    * ENABLED - Indicates that the member account accepted the invitation
	//    to contribute to the behavior graph.
	//
	//    * ACCEPTED_BUT_DISABLED - Indicates that the member account accepted the
	//    invitation but is prevented from contributing data to the behavior graph.
	//    DisabledReason provides the reason why the member account is not enabled.
	//
	// Member accounts that declined an invitation or that were removed from the
	// behavior graph are not included.
	Status MemberStatus `type:"string" enum:"true"`

	// The date and time that the member account was last updated. The value is
	// in milliseconds since the epoch.
	UpdatedTime *time.Time `type:"timestamp"`
	// contains filtered or unexported fields
}

Details about a member account that was invited to contribute to a behavior graph.

func (MemberDetail) MarshalFields

func (s MemberDetail) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (MemberDetail) String

func (s MemberDetail) String() string

String returns the string representation

type MemberDisabledReason added in v0.21.0

type MemberDisabledReason string
const (
	MemberDisabledReasonVolumeTooHigh MemberDisabledReason = "VOLUME_TOO_HIGH"
	MemberDisabledReasonVolumeUnknown MemberDisabledReason = "VOLUME_UNKNOWN"
)

Enum values for MemberDisabledReason

func (MemberDisabledReason) MarshalValue added in v0.21.0

func (enum MemberDisabledReason) MarshalValue() (string, error)

func (MemberDisabledReason) MarshalValueBuf added in v0.21.0

func (enum MemberDisabledReason) MarshalValueBuf(b []byte) ([]byte, error)

type MemberStatus

type MemberStatus string
const (
	MemberStatusInvited                MemberStatus = "INVITED"
	MemberStatusVerificationInProgress MemberStatus = "VERIFICATION_IN_PROGRESS"
	MemberStatusVerificationFailed     MemberStatus = "VERIFICATION_FAILED"
	MemberStatusEnabled                MemberStatus = "ENABLED"
	MemberStatusAcceptedButDisabled    MemberStatus = "ACCEPTED_BUT_DISABLED"
)

Enum values for MemberStatus

func (MemberStatus) MarshalValue

func (enum MemberStatus) MarshalValue() (string, error)

func (MemberStatus) MarshalValueBuf

func (enum MemberStatus) MarshalValueBuf(b []byte) ([]byte, error)

type RejectInvitationInput

type RejectInvitationInput struct {

	// The ARN of the behavior graph to reject the invitation to.
	//
	// The member account's current member status in the behavior graph must be
	// INVITED.
	//
	// GraphArn is a required field
	GraphArn *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (RejectInvitationInput) MarshalFields

func (s RejectInvitationInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (RejectInvitationInput) String

func (s RejectInvitationInput) String() string

String returns the string representation

func (*RejectInvitationInput) Validate

func (s *RejectInvitationInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type RejectInvitationOutput

type RejectInvitationOutput struct {
	// contains filtered or unexported fields
}

func (RejectInvitationOutput) MarshalFields

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (RejectInvitationOutput) String

func (s RejectInvitationOutput) String() string

String returns the string representation

type RejectInvitationRequest

type RejectInvitationRequest struct {
	*aws.Request
	Input *RejectInvitationInput
	Copy  func(*RejectInvitationInput) RejectInvitationRequest
}

RejectInvitationRequest is the request type for the RejectInvitation API operation.

func (RejectInvitationRequest) Send

Send marshals and sends the RejectInvitation API request.

type RejectInvitationResponse

type RejectInvitationResponse struct {
	*RejectInvitationOutput
	// contains filtered or unexported fields
}

RejectInvitationResponse is the response type for the RejectInvitation API operation.

func (*RejectInvitationResponse) SDKResponseMetdata

func (r *RejectInvitationResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the RejectInvitation request.

type StartMonitoringMemberInput added in v0.21.0

type StartMonitoringMemberInput struct {

	// The account ID of the member account to try to enable.
	//
	// The account must be an invited member account with a status of ACCEPTED_BUT_DISABLED.
	//
	// AccountId is a required field
	AccountId *string `min:"12" type:"string" required:"true"`

	// The ARN of the behavior graph.
	//
	// GraphArn is a required field
	GraphArn *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (StartMonitoringMemberInput) MarshalFields added in v0.21.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (StartMonitoringMemberInput) String added in v0.21.0

String returns the string representation

func (*StartMonitoringMemberInput) Validate added in v0.21.0

func (s *StartMonitoringMemberInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type StartMonitoringMemberOutput added in v0.21.0

type StartMonitoringMemberOutput struct {
	// contains filtered or unexported fields
}

func (StartMonitoringMemberOutput) MarshalFields added in v0.21.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (StartMonitoringMemberOutput) String added in v0.21.0

String returns the string representation

type StartMonitoringMemberRequest added in v0.21.0

type StartMonitoringMemberRequest struct {
	*aws.Request
	Input *StartMonitoringMemberInput
	Copy  func(*StartMonitoringMemberInput) StartMonitoringMemberRequest
}

StartMonitoringMemberRequest is the request type for the StartMonitoringMember API operation.

func (StartMonitoringMemberRequest) Send added in v0.21.0

Send marshals and sends the StartMonitoringMember API request.

type StartMonitoringMemberResponse added in v0.21.0

type StartMonitoringMemberResponse struct {
	*StartMonitoringMemberOutput
	// contains filtered or unexported fields
}

StartMonitoringMemberResponse is the response type for the StartMonitoringMember API operation.

func (*StartMonitoringMemberResponse) SDKResponseMetdata added in v0.21.0

func (r *StartMonitoringMemberResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the StartMonitoringMember request.

type UnprocessedAccount

type UnprocessedAccount struct {

	// The AWS account identifier of the member account that was not processed.
	AccountId *string `min:"12" type:"string"`

	// The reason that the member account request could not be processed.
	Reason *string `type:"string"`
	// contains filtered or unexported fields
}

A member account that was included in a request but for which the request could not be processed.

func (UnprocessedAccount) MarshalFields

func (s UnprocessedAccount) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (UnprocessedAccount) String

func (s UnprocessedAccount) String() string

String returns the string representation

Directories

Path Synopsis
Package detectiveiface provides an interface to enable mocking the Amazon Detective service client for testing your code.
Package detectiveiface provides an interface to enable mocking the Amazon Detective service client for testing your code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL