設計図オペレーション CLI - Amazon Bedrock

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

設計図オペレーション CLI

このガイドでは、AWS Command Line Interface (CLI) for Amazon Bedrock Data Automation (BDA) を通じて利用できる設計図オペレーションについて説明します。

設計図の作成

設計図は、ドキュメント、イメージ、オーディオ、またはビデオファイルから抽出するデータの構造とプロパティを定義します。create-blueprint コマンドを使用して、新しいブループリントを定義します。

次のコマンドは、パスポートイメージからデータを抽出するようにカスタマイズされた新しい設計図を作成します。

[Syntax] (構文)

aws bedrock-data-automation create-blueprint \ --blueprint-name "passport-blueprint" \ --type "IMAGE" \ --blueprint-stage "DEVELOPMENT" \ --schema '{ "class": "Passport", "description": "Blueprint for processing passport images", "properties": { "passport_number": { "type": "string", "inferenceType": "explicit", "instruction": "The passport identification number" }, "full_name": { "type": "string", "inferenceType": "explicit", "instruction": "The full name of the passport holder" }, "expiration_date": { "type": "string", "inferenceType": "explicit", "instruction": "The passport expiration date" } } }'

完全なパラメータリファレンス

次の表は、 create-blueprint コマンドで使用可能なすべてのパラメータを示しています。

create-blueprint のパラメータ
[Parameter] (パラメータ) 必須 デフォルト [Description] (説明)
--blueprint-name あり 該当なし 設計図の名前
--type あり 該当なし コンテンツのタイプ (イメージ、ドキュメント、オーディオ、ビデオ)
--blueprint-stage なし LIVE 設計図のステージ (開発またはライブ)
--schema あり 該当なし ブループリント構造を定義する JSON スキーマ
--client-token なし 自動生成 リクエストべき等性の一意の識別子

ブループリント設定の表示

すべての設計図を一覧表示する

list-blueprints コマンドを使用して、アカウントに関連付けられているすべてのブループリントのリストを取得します。

[Syntax] (構文)

aws bedrock-data-automation list-blueprints

ブループリントの詳細を表示する

スキーマや設定など、特定のブループリントに関する詳細情報を表示するには、get-blueprint コマンドを使用します。

[Syntax] (構文)

aws bedrock-data-automation get-blueprint \ --blueprint-arn "Amazon Resource Name (ARN)"

特定のバージョンを検査する

バージョニングされたブループリントを使用する場合は、get-blueprint コマンドと --blueprint-version オプションを使用して、特定のバージョンを表示します。

[Syntax] (構文)

aws bedrock-data-automation get-blueprint \ --blueprint-arn "Amazon Resource Name (ARN)" \ --blueprint-version "version-number"

特定のステージを検査する

DEVELOPMENT ステージまたは LIVE ステージでブループリントを表示するには、以下を使用します。

aws bedrock-data-automation get-blueprint \ --blueprint-arn "Amazon Resource Name (ARN)" \ --blueprint-stage "LIVE"

設計図の仕様の編集

ブループリント設定の更新

既存のブループリントのスキーマまたはプロパティを変更するには、update-blueprint コマンドを使用します。

[Syntax] (構文)

aws bedrock-data-automation update-blueprint \ --blueprint-arn "Amazon Resource Name (ARN)" \ --schema '{ "class": "Passport", "description": "Updated blueprint for processing passport images", "properties": { "passport_number": { "type": "string", "inferenceType": "explicit", "instruction": "The passport identification number" }, "full_name": { "type": "string", "inferenceType": "explicit", "instruction": "The full name of the passport holder" }, "expiration_date": { "type": "string", "inferenceType": "explicit", "instruction": "The passport expiration date" } } }'

注: 設計図を更新するときは、変更しないフィールドであっても、完全なスキーマを指定する必要があります。

LIVE に昇格する

ブループリントを本番環境の DEVELOPMENT ステージから LIVE ステージに移動するには、update-blueprint コマンドと --blueprint-stage オプションを使用します。

[Syntax] (構文)

aws bedrock-data-automation update-blueprint \ --blueprint-arn "Amazon Resource Name (ARN)" \ --blueprint-stage "LIVE"

ブループリントのバージョニング

create-blueprint-version コマンドを使用して大幅な変更を行う前に、ブループリントの新しいバージョンを作成して現在の状態を維持します。

[Syntax] (構文)

aws bedrock-data-automation create-blueprint-version \ --blueprint-arn "Amazon Resource Name (ARN)"

設計図タグの管理

タグは、ユーザーが管理を簡素化するために設計図を整理および分類するのに役立ちます。

タグの追加

タグを追加して、メタデータをブループリントに適用します。

[Syntax] (構文)

aws bedrock-data-automation tag-resource \ --resource-arn "Amazon Resource Name (ARN)" \ --tags '{"Department":"Finance","Project":"PassportProcessing"}'

タグの削除

untag-resource コマンドを使用して、ブループリントから特定のタグを削除します。

[Syntax] (構文)

aws bedrock-data-automation untag-resource \ --resource-arn "Amazon Resource Name (ARN)" \ --tag-keys '["Department","Project"]'

タグの表示

list-tags-for-resource コマンドを使用して、ブループリントに関連付けられているすべてのタグを一覧表示します。

[Syntax] (構文)

aws bedrock-data-automation list-tags-for-resource \ --resource-arn "Amazon Resource Name (ARN)"

設計図の削除

設計図全体を削除する

delete-blueprint コマンドを使用して、ブループリントとそのすべてのバージョンを完全に削除します。

[Syntax] (構文)

aws bedrock-data-automation delete-blueprint \ --blueprint-arn "Amazon Resource Name (ARN)"

注意: このコマンドはブループリントを完全に削除し、復元できません。

重要: どのプロジェクトでも現在使用されているブループリントを削除することはできません。削除する前に、プロジェクトのカスタム出力設定でブループリントが参照されていないことを確認してください。