本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
檢視護欄版本的相關資訊
若要檢視有關護欄版本的資訊,請選取下列其中一個標籤,然後遵循指示的步驟:
- Console
-
檢視護欄版本的相關資訊
-
登入到 AWS Management Console 使用具有 Amazon 基岩許可的IAM角色,並在以下位置打開 Amazon 基岩控制台。https://console.aws.amazon.com/bedrock/
-
從左側導覽窗格中選擇「護欄」。然後,在「護欄」區段中選取護欄。
-
在「版本」區段中,選取要檢視其相關資訊的版本。
-
- API
-
若要取得護欄版本的相關資訊,請傳送GetGuardrail要求並包含護欄的 ID 和版本。如果您未指定版本,則回應會傳回該
DRAFT
版本的詳細資料。以下是請求格式:
GET /guardrails/
guardrailIdentifier
?guardrailVersion=guardrailVersion
HTTP/1.1以下是響應格式:
HTTP/1.1 200 Content-type: application/json { "blockedInputMessaging": "string", "blockedOutputsMessaging": "string", "contentPolicy": { "filters": [ { "inputStrength": "NONE | LOW | MEDIUM | HIGH", "outputStrength": "NONE | LOW | MEDIUM | HIGH", "type": "SEXUAL | VIOLENCE | HATE | INSULTS | MISCONDUCT | PROMPT_ATTACK" } ] }, "wordPolicy": { "words": [ { "text": "string" } ], "managedWordLists": [ { "type": "string" } ] }, "sensitiveInformationPolicy": { "piiEntities": [ { "type": "string", "action": "string" } ], "regexes": [ { "name": "string", "description": "string", "pattern": "string", "action": "string" } ] }, "createdAt": "string", "description": "string", "failureRecommendations": [ "string" ], "guardrailArn": "string", "guardrailId": "string", "kmsKeyArn": "string", "name": "string", "status": "string", "statusReasons": [ "string" ], "topicPolicy": { "topics": [ { "definition": "string", "examples": [ "string" ], "name": "string", "type": "DENY" } ] }, "updatedAt": "string", "version": "string" }
若要列出所有護欄的相關資訊,請傳送請求。ListGuardrails
以下是請求格式:
GET /guardrails?guardrailIdentifier=
guardrailIdentifier
&maxResults=maxResults
&nextToken=nextToken
HTTP/1.1-
若要列出所有護欄的
DRAFT
版本,請勿指定欄位guardrailIdentifier
。 -
若要列示護欄的所有版本,請在欄位ARN中指定護欄。
guardrailIdentifier
您可以在
maxResults
欄位中設定回應中傳回的結果數目上限。如果結果數目多於您設定的數目,回應會傳回您可以在另一個ListGuardrails
請求中傳送的nextToken
,如此即可查看下一批結果。以下是響應格式:
HTTP/1.1 200 Content-type: application/json { "guardrails": [ { "arn": "string", "createdAt": "string", "description": "string", "id": "string", "name": "string", "status": "string", "updatedAt": "string", "version": "string" } ], "nextToken": "string" }
-
建立護欄版本
刪除護欄版本