detective – github.com/aws/aws-sdk-go-v2/service/detective Index | Files | Directories

package detective

import "github.com/aws/aws-sdk-go-v2/service/detective"

Package detective provides the API client, operations, and parameter types for 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).

Index

Constants

const ServiceAPIVersion = "2018-10-26"
const ServiceID = "Detective"

Functions

func NewDefaultEndpointResolver

func NewDefaultEndpointResolver() *internalendpoints.Resolver

NewDefaultEndpointResolver constructs a new service endpoint resolver

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.
	//
	// This member is required.
	GraphArn *string
}

type AcceptInvitationOutput

type AcceptInvitationOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type Client

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

Client provides the API client to make operations call for Amazon Detective.

func New

func New(options Options, optFns ...func(*Options)) *Client

New returns an initialized Client based on the functional options. Provide additional functional options to further configure the behavior of the client, such as changing the client's endpoint or adding custom middleware behavior.

func NewFromConfig

func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client

NewFromConfig returns a new client from the provided config.

func (*Client) AcceptInvitation

func (c *Client) AcceptInvitation(ctx context.Context, params *AcceptInvitationInput, optFns ...func(*Options)) (*AcceptInvitationOutput, error)

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.

func (*Client) CreateGraph

func (c *Client) CreateGraph(ctx context.Context, params *CreateGraphInput, optFns ...func(*Options)) (*CreateGraphOutput, error)

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.

func (*Client) CreateMembers

func (c *Client) CreateMembers(ctx context.Context, params *CreateMembersInput, optFns ...func(*Options)) (*CreateMembersOutput, error)

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.

func (*Client) DeleteGraph

func (c *Client) DeleteGraph(ctx context.Context, params *DeleteGraphInput, optFns ...func(*Options)) (*DeleteGraphOutput, error)

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.

func (*Client) DeleteMembers

func (c *Client) DeleteMembers(ctx context.Context, params *DeleteMembersInput, optFns ...func(*Options)) (*DeleteMembersOutput, error)

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.

func (*Client) DisassociateMembership

func (c *Client) DisassociateMembership(ctx context.Context, params *DisassociateMembershipInput, optFns ...func(*Options)) (*DisassociateMembershipOutput, error)

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

func (*Client) GetMembers

func (c *Client) GetMembers(ctx context.Context, params *GetMembersInput, optFns ...func(*Options)) (*GetMembersOutput, error)

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

func (*Client) ListGraphs

func (c *Client) ListGraphs(ctx context.Context, params *ListGraphsInput, optFns ...func(*Options)) (*ListGraphsOutput, error)

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.

func (*Client) ListInvitations

func (c *Client) ListInvitations(ctx context.Context, params *ListInvitationsInput, optFns ...func(*Options)) (*ListInvitationsOutput, error)

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.

func (*Client) ListMembers

func (c *Client) ListMembers(ctx context.Context, params *ListMembersInput, optFns ...func(*Options)) (*ListMembersOutput, error)

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

func (*Client) RejectInvitation

func (c *Client) RejectInvitation(ctx context.Context, params *RejectInvitationInput, optFns ...func(*Options)) (*RejectInvitationOutput, error)

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.

func (*Client) StartMonitoringMember

func (c *Client) StartMonitoringMember(ctx context.Context, params *StartMonitoringMemberInput, optFns ...func(*Options)) (*StartMonitoringMemberOutput, error)

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.

type CreateGraphInput

type CreateGraphInput struct {
}

type CreateGraphOutput

type CreateGraphOutput struct {

	// The ARN of the new behavior graph.
	GraphArn *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

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.
	//
	// This member is required.
	Accounts []types.Account

	// The ARN of the behavior graph to invite the member accounts to contribute their
	// data to.
	//
	// This member is required.
	GraphArn *string

	// Customized message text to include in the invitation email message to the
	// invited member accounts.
	Message *string
}

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 []types.MemberDetail

	// 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 []types.UnprocessedAccount

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DeleteGraphInput

type DeleteGraphInput struct {

	// The ARN of the behavior graph to disable.
	//
	// This member is required.
	GraphArn *string
}

type DeleteGraphOutput

type DeleteGraphOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DeleteMembersInput

type DeleteMembersInput struct {

	// The list of AWS account identifiers for the member accounts to delete from the
	// behavior graph.
	//
	// This member is required.
	AccountIds []string

	// The ARN of the behavior graph to delete members from.
	//
	// This member is required.
	GraphArn *string
}

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

	// 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 []types.UnprocessedAccount

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

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.
	//
	// This member is required.
	GraphArn *string
}

type DisassociateMembershipOutput

type DisassociateMembershipOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type EndpointResolver

type EndpointResolver interface {
	ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
}

EndpointResolver interface for resolving service endpoints.

func WithEndpointResolver

func WithEndpointResolver(awsResolver aws.EndpointResolver, fallbackResolver EndpointResolver) EndpointResolver

WithEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided fallbackResolver for resolution. awsResolver and fallbackResolver must not be nil

type EndpointResolverFunc

type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)

EndpointResolverFunc is a helper utility that wraps a function so it satisfies the EndpointResolver interface. This is useful when you want to add additional endpoint resolving logic, or stub out specific endpoints with custom values.

func (EndpointResolverFunc) ResolveEndpoint

func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error)

type EndpointResolverOptions

type EndpointResolverOptions = internalendpoints.Options

EndpointResolverOptions is the service endpoint resolver options

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.
	//
	// This member is required.
	AccountIds []string

	// The ARN of the behavior graph for which to request the member details.
	//
	// This member is required.
	GraphArn *string
}

type GetMembersOutput

type GetMembersOutput struct {

	// The member account details that Detective is returning in response to the
	// request.
	MemberDetails []types.MemberDetail

	// 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 []types.UnprocessedAccount

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type HTTPSignerV4

type HTTPSignerV4 interface {
	SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time) error
}

type ListGraphsAPIClient

type ListGraphsAPIClient interface {
	ListGraphs(context.Context, *ListGraphsInput, ...func(*Options)) (*ListGraphsOutput, error)
}

ListGraphsAPIClient is a client that implements the ListGraphs operation.

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 *int32

	// 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
}

type ListGraphsOutput

type ListGraphsOutput struct {

	// A list of behavior graphs that the account is a master for.
	GraphList []types.Graph

	// 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

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type ListGraphsPaginator

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

ListGraphsPaginator is a paginator for ListGraphs

func NewListGraphsPaginator

func NewListGraphsPaginator(client ListGraphsAPIClient, params *ListGraphsInput, optFns ...func(*ListGraphsPaginatorOptions)) *ListGraphsPaginator

NewListGraphsPaginator returns a new ListGraphsPaginator

func (*ListGraphsPaginator) HasMorePages

func (p *ListGraphsPaginator) HasMorePages() bool

HasMorePages returns a boolean indicating whether more pages are available

func (*ListGraphsPaginator) NextPage

func (p *ListGraphsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListGraphsOutput, error)

NextPage retrieves the next ListGraphs page.

type ListGraphsPaginatorOptions

type ListGraphsPaginatorOptions 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.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

ListGraphsPaginatorOptions is the paginator options for ListGraphs

type ListInvitationsAPIClient

type ListInvitationsAPIClient interface {
	ListInvitations(context.Context, *ListInvitationsInput, ...func(*Options)) (*ListInvitationsOutput, error)
}

ListInvitationsAPIClient is a client that implements the ListInvitations operation.

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 *int32

	// 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
}

type ListInvitationsOutput

type ListInvitationsOutput struct {

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

	// 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

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type ListInvitationsPaginator

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

ListInvitationsPaginator is a paginator for ListInvitations

func NewListInvitationsPaginator

func NewListInvitationsPaginator(client ListInvitationsAPIClient, params *ListInvitationsInput, optFns ...func(*ListInvitationsPaginatorOptions)) *ListInvitationsPaginator

NewListInvitationsPaginator returns a new ListInvitationsPaginator

func (*ListInvitationsPaginator) HasMorePages

func (p *ListInvitationsPaginator) HasMorePages() bool

HasMorePages returns a boolean indicating whether more pages are available

func (*ListInvitationsPaginator) NextPage

func (p *ListInvitationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListInvitationsOutput, error)

NextPage retrieves the next ListInvitations page.

type ListInvitationsPaginatorOptions

type ListInvitationsPaginatorOptions 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.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

ListInvitationsPaginatorOptions is the paginator options for ListInvitations

type ListMembersAPIClient

type ListMembersAPIClient interface {
	ListMembers(context.Context, *ListMembersInput, ...func(*Options)) (*ListMembersOutput, error)
}

ListMembersAPIClient is a client that implements the ListMembers operation.

type ListMembersInput

type ListMembersInput struct {

	// The ARN of the behavior graph for which to retrieve the list of member accounts.
	//
	// This member is required.
	GraphArn *string

	// 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 *int32

	// 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
}

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 []types.MemberDetail

	// 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

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type ListMembersPaginator

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

ListMembersPaginator is a paginator for ListMembers

func NewListMembersPaginator

func NewListMembersPaginator(client ListMembersAPIClient, params *ListMembersInput, optFns ...func(*ListMembersPaginatorOptions)) *ListMembersPaginator

NewListMembersPaginator returns a new ListMembersPaginator

func (*ListMembersPaginator) HasMorePages

func (p *ListMembersPaginator) HasMorePages() bool

HasMorePages returns a boolean indicating whether more pages are available

func (*ListMembersPaginator) NextPage

func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListMembersOutput, error)

NextPage retrieves the next ListMembers page.

type ListMembersPaginatorOptions

type ListMembersPaginatorOptions struct {
	// 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.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

ListMembersPaginatorOptions is the paginator options for ListMembers

type Options

type Options struct {
	// Set of options to modify how an operation is invoked. These apply to all
	// operations invoked for this client. Use functional options on operation call to
	// modify this list for per operation behavior.
	APIOptions []func(*middleware.Stack) error

	// Configures the events that will be sent to the configured logger.
	ClientLogMode aws.ClientLogMode

	// The credentials object to use when signing requests.
	Credentials aws.CredentialsProvider

	// The endpoint options to be used when attempting to resolve an endpoint.
	EndpointOptions EndpointResolverOptions

	// The service endpoint resolver.
	EndpointResolver EndpointResolver

	// Signature Version 4 (SigV4) Signer
	HTTPSignerV4 HTTPSignerV4

	// The logger writer interface to write logging messages to.
	Logger logging.Logger

	// The region to send requests to. (Required)
	Region string

	// Retryer guides how HTTP requests should be retried in case of recoverable
	// failures. When nil the API client will use a default retryer.
	Retryer retry.Retryer

	// The HTTP client to invoke API calls with. Defaults to client's default HTTP
	// implementation if nil.
	HTTPClient HTTPClient
}

func (Options) Copy

func (o Options) Copy() Options

Copy creates a clone where the APIOptions list is deep copied.

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.
	//
	// This member is required.
	GraphArn *string
}

type RejectInvitationOutput

type RejectInvitationOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type ResolveEndpoint

type ResolveEndpoint struct {
	Resolver EndpointResolver
	Options  EndpointResolverOptions
}

func (*ResolveEndpoint) HandleSerialize

func (*ResolveEndpoint) ID

func (*ResolveEndpoint) ID() string

type StartMonitoringMemberInput

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.
	//
	// This member is required.
	AccountId *string

	// The ARN of the behavior graph.
	//
	// This member is required.
	GraphArn *string
}

type StartMonitoringMemberOutput

type StartMonitoringMemberOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

Source Files

api_client.go api_op_AcceptInvitation.go api_op_CreateGraph.go api_op_CreateMembers.go api_op_DeleteGraph.go api_op_DeleteMembers.go api_op_DisassociateMembership.go api_op_GetMembers.go api_op_ListGraphs.go api_op_ListInvitations.go api_op_ListMembers.go api_op_RejectInvitation.go api_op_StartMonitoringMember.go deserializers.go doc.go endpoints.go serializers.go validators.go

Directories

PathSynopsis
internal
types
Version
v0.30.0
Published
Nov 30, 2020
Platform
js/wasm
Imports
27 packages
Last checked
1 week ago

Tools for package owners.