There are more AWS SDK examples available in the AWS Doc SDK Examples
Use GetCelebrityInfo
with an AWS SDK or CLI
The following code examples show how to use GetCelebrityInfo
.
- .NET
-
- AWS SDK for .NET
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. using System; using System.Threading.Tasks; using Amazon.Rekognition; using Amazon.Rekognition.Model; /// <summary> /// Shows how to use Amazon Rekognition to retrieve information about the /// celebrity identified by the supplied celebrity Id. /// </summary> public class CelebrityInfo { public static async Task Main() { string celebId = "nnnnnnnn"; var rekognitionClient = new AmazonRekognitionClient(); var celebrityInfoRequest = new GetCelebrityInfoRequest { Id = celebId, }; Console.WriteLine($"Getting information for celebrity: {celebId}"); var celebrityInfoResponse = await rekognitionClient.GetCelebrityInfoAsync(celebrityInfoRequest); // Display celebrity information. Console.WriteLine($"celebrity name: {celebrityInfoResponse.Name}"); Console.WriteLine("Further information (if available):"); celebrityInfoResponse.Urls.ForEach(url => { Console.WriteLine(url); }); } }
-
For API details, see GetCelebrityInfo in AWS SDK for .NET API Reference.
-
- CLI
-
- AWS CLI
-
To get information about a celebrity
The following
get-celebrity-info
command displays information about the specified celebrity. Theid
parameter comes from a previous call torecognize-celebrities
.aws rekognition get-celebrity-info --id
nnnnnnn
Output:
{ "Name": "Celeb A", "Urls": [ "www.imdb.com/name/aaaaaaaaa" ] }
For more information, see Getting Information About a Celebrity in the Amazon Rekognition Developer Guide.
-
For API details, see GetCelebrityInfo
in AWS CLI Command Reference.
-