UNPKG

24.4 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7interface Blob {}
8declare class Detective extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: Detective.Types.ClientConfiguration)
13 config: Config & Detective.Types.ClientConfiguration;
14 /**
15 * 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.
16 */
17 acceptInvitation(params: Detective.Types.AcceptInvitationRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
18 /**
19 * 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.
20 */
21 acceptInvitation(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
22 /**
23 * 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.
24 */
25 createGraph(callback?: (err: AWSError, data: Detective.Types.CreateGraphResponse) => void): Request<Detective.Types.CreateGraphResponse, AWSError>;
26 /**
27 * 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.
28 */
29 createMembers(params: Detective.Types.CreateMembersRequest, callback?: (err: AWSError, data: Detective.Types.CreateMembersResponse) => void): Request<Detective.Types.CreateMembersResponse, AWSError>;
30 /**
31 * 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.
32 */
33 createMembers(callback?: (err: AWSError, data: Detective.Types.CreateMembersResponse) => void): Request<Detective.Types.CreateMembersResponse, AWSError>;
34 /**
35 * 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.
36 */
37 deleteGraph(params: Detective.Types.DeleteGraphRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
38 /**
39 * 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.
40 */
41 deleteGraph(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
42 /**
43 * 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.
44 */
45 deleteMembers(params: Detective.Types.DeleteMembersRequest, callback?: (err: AWSError, data: Detective.Types.DeleteMembersResponse) => void): Request<Detective.Types.DeleteMembersResponse, AWSError>;
46 /**
47 * 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.
48 */
49 deleteMembers(callback?: (err: AWSError, data: Detective.Types.DeleteMembersResponse) => void): Request<Detective.Types.DeleteMembersResponse, AWSError>;
50 /**
51 * Removes the member account from the specified behavior graph. This operation can only be called by a member account that has the ENABLED status.
52 */
53 disassociateMembership(params: Detective.Types.DisassociateMembershipRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
54 /**
55 * Removes the member account from the specified behavior graph. This operation can only be called by a member account that has the ENABLED status.
56 */
57 disassociateMembership(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
58 /**
59 * Returns the membership details for specified member accounts for a behavior graph.
60 */
61 getMembers(params: Detective.Types.GetMembersRequest, callback?: (err: AWSError, data: Detective.Types.GetMembersResponse) => void): Request<Detective.Types.GetMembersResponse, AWSError>;
62 /**
63 * Returns the membership details for specified member accounts for a behavior graph.
64 */
65 getMembers(callback?: (err: AWSError, data: Detective.Types.GetMembersResponse) => void): Request<Detective.Types.GetMembersResponse, AWSError>;
66 /**
67 * 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.
68 */
69 listGraphs(params: Detective.Types.ListGraphsRequest, callback?: (err: AWSError, data: Detective.Types.ListGraphsResponse) => void): Request<Detective.Types.ListGraphsResponse, AWSError>;
70 /**
71 * 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.
72 */
73 listGraphs(callback?: (err: AWSError, data: Detective.Types.ListGraphsResponse) => void): Request<Detective.Types.ListGraphsResponse, AWSError>;
74 /**
75 * 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.
76 */
77 listInvitations(params: Detective.Types.ListInvitationsRequest, callback?: (err: AWSError, data: Detective.Types.ListInvitationsResponse) => void): Request<Detective.Types.ListInvitationsResponse, AWSError>;
78 /**
79 * 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.
80 */
81 listInvitations(callback?: (err: AWSError, data: Detective.Types.ListInvitationsResponse) => void): Request<Detective.Types.ListInvitationsResponse, AWSError>;
82 /**
83 * Retrieves the list of member accounts for a behavior graph. Does not return member accounts that were removed from the behavior graph.
84 */
85 listMembers(params: Detective.Types.ListMembersRequest, callback?: (err: AWSError, data: Detective.Types.ListMembersResponse) => void): Request<Detective.Types.ListMembersResponse, AWSError>;
86 /**
87 * Retrieves the list of member accounts for a behavior graph. Does not return member accounts that were removed from the behavior graph.
88 */
89 listMembers(callback?: (err: AWSError, data: Detective.Types.ListMembersResponse) => void): Request<Detective.Types.ListMembersResponse, AWSError>;
90 /**
91 * 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.
92 */
93 rejectInvitation(params: Detective.Types.RejectInvitationRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
94 /**
95 * 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.
96 */
97 rejectInvitation(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
98 /**
99 * 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.
100 */
101 startMonitoringMember(params: Detective.Types.StartMonitoringMemberRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
102 /**
103 * 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.
104 */
105 startMonitoringMember(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
106}
107declare namespace Detective {
108 export interface AcceptInvitationRequest {
109 /**
110 * 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.
111 */
112 GraphArn: GraphArn;
113 }
114 export interface Account {
115 /**
116 * The account identifier of the AWS account.
117 */
118 AccountId: AccountId;
119 /**
120 * The AWS account root user email address for the AWS account.
121 */
122 EmailAddress: EmailAddress;
123 }
124 export type AccountId = string;
125 export type AccountIdList = AccountId[];
126 export type AccountList = Account[];
127 export interface CreateGraphResponse {
128 /**
129 * The ARN of the new behavior graph.
130 */
131 GraphArn?: GraphArn;
132 }
133 export interface CreateMembersRequest {
134 /**
135 * The ARN of the behavior graph to invite the member accounts to contribute their data to.
136 */
137 GraphArn: GraphArn;
138 /**
139 * Customized message text to include in the invitation email message to the invited member accounts.
140 */
141 Message?: EmailMessage;
142 /**
143 * 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.
144 */
145 Accounts: AccountList;
146 }
147 export interface CreateMembersResponse {
148 /**
149 * 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.
150 */
151 Members?: MemberDetailList;
152 /**
153 * 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.
154 */
155 UnprocessedAccounts?: UnprocessedAccountList;
156 }
157 export interface DeleteGraphRequest {
158 /**
159 * The ARN of the behavior graph to disable.
160 */
161 GraphArn: GraphArn;
162 }
163 export interface DeleteMembersRequest {
164 /**
165 * The ARN of the behavior graph to delete members from.
166 */
167 GraphArn: GraphArn;
168 /**
169 * The list of AWS account identifiers for the member accounts to delete from the behavior graph.
170 */
171 AccountIds: AccountIdList;
172 }
173 export interface DeleteMembersResponse {
174 /**
175 * The list of AWS account identifiers for the member accounts that Detective successfully deleted from the behavior graph.
176 */
177 AccountIds?: AccountIdList;
178 /**
179 * 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.
180 */
181 UnprocessedAccounts?: UnprocessedAccountList;
182 }
183 export interface DisassociateMembershipRequest {
184 /**
185 * 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.
186 */
187 GraphArn: GraphArn;
188 }
189 export type EmailAddress = string;
190 export type EmailMessage = string;
191 export interface GetMembersRequest {
192 /**
193 * The ARN of the behavior graph for which to request the member details.
194 */
195 GraphArn: GraphArn;
196 /**
197 * 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.
198 */
199 AccountIds: AccountIdList;
200 }
201 export interface GetMembersResponse {
202 /**
203 * The member account details that Detective is returning in response to the request.
204 */
205 MemberDetails?: MemberDetailList;
206 /**
207 * 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.
208 */
209 UnprocessedAccounts?: UnprocessedAccountList;
210 }
211 export interface Graph {
212 /**
213 * The ARN of the behavior graph.
214 */
215 Arn?: GraphArn;
216 /**
217 * The date and time that the behavior graph was created. The value is in milliseconds since the epoch.
218 */
219 CreatedTime?: Timestamp;
220 }
221 export type GraphArn = string;
222 export type GraphList = Graph[];
223 export interface ListGraphsRequest {
224 /**
225 * 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.
226 */
227 NextToken?: PaginationToken;
228 /**
229 * 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.
230 */
231 MaxResults?: MemberResultsLimit;
232 }
233 export interface ListGraphsResponse {
234 /**
235 * A list of behavior graphs that the account is a master for.
236 */
237 GraphList?: GraphList;
238 /**
239 * 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.
240 */
241 NextToken?: PaginationToken;
242 }
243 export interface ListInvitationsRequest {
244 /**
245 * 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.
246 */
247 NextToken?: PaginationToken;
248 /**
249 * 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.
250 */
251 MaxResults?: MemberResultsLimit;
252 }
253 export interface ListInvitationsResponse {
254 /**
255 * The list of behavior graphs for which the member account has open or accepted invitations.
256 */
257 Invitations?: MemberDetailList;
258 /**
259 * 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.
260 */
261 NextToken?: PaginationToken;
262 }
263 export interface ListMembersRequest {
264 /**
265 * The ARN of the behavior graph for which to retrieve the list of member accounts.
266 */
267 GraphArn: GraphArn;
268 /**
269 * 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.
270 */
271 NextToken?: PaginationToken;
272 /**
273 * 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.
274 */
275 MaxResults?: MemberResultsLimit;
276 }
277 export interface ListMembersResponse {
278 /**
279 * 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.
280 */
281 MemberDetails?: MemberDetailList;
282 /**
283 * 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.
284 */
285 NextToken?: PaginationToken;
286 }
287 export interface MemberDetail {
288 /**
289 * The AWS account identifier for the member account.
290 */
291 AccountId?: AccountId;
292 /**
293 * The AWS account root user email address for the member account.
294 */
295 EmailAddress?: EmailAddress;
296 /**
297 * The ARN of the behavior graph that the member account was invited to.
298 */
299 GraphArn?: GraphArn;
300 /**
301 * The AWS account identifier of the master account for the behavior graph.
302 */
303 MasterId?: AccountId;
304 /**
305 * 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.
306 */
307 Status?: MemberStatus;
308 /**
309 * 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.
310 */
311 DisabledReason?: MemberDisabledReason;
312 /**
313 * The date and time that Detective sent the invitation to the member account. The value is in milliseconds since the epoch.
314 */
315 InvitedTime?: Timestamp;
316 /**
317 * The date and time that the member account was last updated. The value is in milliseconds since the epoch.
318 */
319 UpdatedTime?: Timestamp;
320 /**
321 * 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.
322 */
323 PercentOfGraphUtilization?: Percentage;
324 /**
325 * The date and time when the graph utilization percentage was last updated.
326 */
327 PercentOfGraphUtilizationUpdatedTime?: Timestamp;
328 }
329 export type MemberDetailList = MemberDetail[];
330 export type MemberDisabledReason = "VOLUME_TOO_HIGH"|"VOLUME_UNKNOWN"|string;
331 export type MemberResultsLimit = number;
332 export type MemberStatus = "INVITED"|"VERIFICATION_IN_PROGRESS"|"VERIFICATION_FAILED"|"ENABLED"|"ACCEPTED_BUT_DISABLED"|string;
333 export type PaginationToken = string;
334 export type Percentage = number;
335 export interface RejectInvitationRequest {
336 /**
337 * 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.
338 */
339 GraphArn: GraphArn;
340 }
341 export interface StartMonitoringMemberRequest {
342 /**
343 * The ARN of the behavior graph.
344 */
345 GraphArn: GraphArn;
346 /**
347 * 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.
348 */
349 AccountId: AccountId;
350 }
351 export type Timestamp = Date;
352 export interface UnprocessedAccount {
353 /**
354 * The AWS account identifier of the member account that was not processed.
355 */
356 AccountId?: AccountId;
357 /**
358 * The reason that the member account request could not be processed.
359 */
360 Reason?: UnprocessedReason;
361 }
362 export type UnprocessedAccountList = UnprocessedAccount[];
363 export type UnprocessedReason = string;
364 /**
365 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
366 */
367 export type apiVersion = "2018-10-26"|"latest"|string;
368 export interface ClientApiVersions {
369 /**
370 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
371 */
372 apiVersion?: apiVersion;
373 }
374 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
375 /**
376 * Contains interfaces for use with the Detective client.
377 */
378 export import Types = Detective;
379}
380export = Detective;