describeOrganizationConfiguration method

Future<DescribeOrganizationConfigurationResponse> describeOrganizationConfiguration({
  1. required String detectorId,
  2. int? maxResults,
  3. String? nextToken,
})

Returns information about the account selected as the delegated administrator for GuardDuty.

There might be regional differences because some data sources might not be available in all the Amazon Web Services Regions where GuardDuty is presently supported. For more information, see Regions and endpoints.

May throw BadRequestException. May throw InternalServerErrorException.

Parameter detectorId : The detector ID of the delegated administrator for which you need to retrieve the information.

To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.

Parameter maxResults : You can use this parameter to indicate the maximum number of items that you want in the response.

Parameter nextToken : You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the list action. For subsequent calls to the action, fill nextToken in the request with the value of NextToken from the previous response to continue listing data.

Implementation

Future<DescribeOrganizationConfigurationResponse>
    describeOrganizationConfiguration({
  required String detectorId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/detector/${Uri.encodeComponent(detectorId)}/admin',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DescribeOrganizationConfigurationResponse.fromJson(response);
}