getCelebrityInfo method

Future<GetCelebrityInfoResponse> getCelebrityInfo({
  1. required String id,
})

Gets the name and additional information about a celebrity based on his or her Amazon Rekognition ID. The additional information is returned as an array of URLs. If there is no additional information about the celebrity, this list is empty.

For more information, see Recognizing Celebrities in an Image in the Amazon Rekognition Developer Guide.

This operation requires permissions to perform the rekognition:GetCelebrityInfo action.

May throw InvalidParameterException. May throw AccessDeniedException. May throw InternalServerError. May throw ThrottlingException. May throw ProvisionedThroughputExceededException. May throw ResourceNotFoundException.

Parameter id : The ID for the celebrity. You get the celebrity ID from a call to the RecognizeCelebrities operation, which recognizes celebrities in an image.

Implementation

Future<GetCelebrityInfoResponse> getCelebrityInfo({
  required String id,
}) async {
  ArgumentError.checkNotNull(id, 'id');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'RekognitionService.GetCelebrityInfo'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Id': id,
    },
  );

  return GetCelebrityInfoResponse.fromJson(jsonResponse.body);
}