createGraph method
Creates a new behavior graph for the calling account, and sets that account as the administrator account. This operation is called by the account that is enabling 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 administrator account for one behavior graph
within a Region. If the same account calls CreateGraph with
the same administrator account, it always returns the same behavior graph
ARN. It does not create a new behavior graph.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
Parameter tags :
The tags to assign to the new behavior graph. You can add up to 50 tags.
For each tag, you provide the tag key and the tag value. Each tag key can
contain up to 128 characters. Each tag value can contain up to 256
characters.
Implementation
Future<CreateGraphResponse> createGraph({
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/graph',
exceptionFnMap: _exceptionFns,
);
return CreateGraphResponse.fromJson(response);
}