翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
以下のコード例は、CreateCollection
の使用方法を示しています。
詳細については、「コレクションを作成する」を参照してください。
- AWS SDK for .NET
-
注記
GitHub には、その他のリソースもあります。用例一覧を検索し、AWS コード例リポジトリ
での設定と実行の方法を確認してください。 using System; using System.Threading.Tasks; using Amazon.Rekognition; using Amazon.Rekognition.Model; /// <summary> /// Uses Amazon Rekognition to create a collection to which you can add /// faces using the IndexFaces operation. /// </summary> public class CreateCollection { public static async Task Main() { var rekognitionClient = new AmazonRekognitionClient(); string collectionId = "MyCollection"; Console.WriteLine("Creating collection: " + collectionId); var createCollectionRequest = new CreateCollectionRequest { CollectionId = collectionId, }; CreateCollectionResponse createCollectionResponse = await rekognitionClient.CreateCollectionAsync(createCollectionRequest); Console.WriteLine($"CollectionArn : {createCollectionResponse.CollectionArn}"); Console.WriteLine($"Status code : {createCollectionResponse.StatusCode}"); } }
-
API の詳細については、「AWS SDK for .NET API リファレンス」の「CreateCollection」を参照してください。
-
AWS SDK 開発者ガイドとコード例の完全なリストについては、「」を参照してくださいAWS SDK での Rekognition の使用。このトピックには、使用開始方法に関する情報と、以前の SDK バージョンの詳細も含まれています。