AI AWS Guardrails Policy 구성 참조
AI AWS Guardrails Policy 구성 참조 (AI AWS Guardrails Policy Configuration Reference)
이 문서는 AI AWS Guardrails Policy 플러그인의 구성 파라미터를 상세히 설명하는 참조 문서예요. AWS 인증 정보, 가드레일 ID, 텍스트 소스 선택, 응답 버퍼 크기, 프록시 설정 등을 어떻게 설정하는지 알려줘요. 각 필드의 타입, 기본값, 설명을 확인할 수 있어서 정책을 정확하게 구성하는 데 도움을 줘요.
출처: 문서
본문
{
"properties": {
"config": {
"type": "object",
"properties": {
"aws_secret_access_key": {
"type": "string",
"description": "The AWS secret access key to use for authentication",
"x-referenceable": true,
"x-encrypted": true
},
"log_blocked_content": {
"type": "boolean",
"description": "Whether to log prompts and responses that are blocked by the guardrail.",
"default": false
},
"guardrails_id": {
"type": "string",
"description": "The guardrail identifier used in the request to apply the guardrail."
},
"text_source": {
"type": "string",
"enum": [
"concatenate_all_content",
"concatenate_user_content",
"last_message"
],
"description": "Select where to pick the 'text' for the guardrail service request.",
"default": "concatenate_all_content"
},
"response_buffer_size": {
"type": "number",
"description": "The amount of bytes receiving from upstream to be buffered before sending to the guardrail service. This only applies to the response content guard.",
"default": 100
},
"proxy_config": {
"type": "object",
"properties": {
"https_proxy_port": {
"type": "integer",
"maximum": 65535,
"minimum": 0,
"description": "An integer representing a port number between 0 and 65535, inclusive."
},
"proxy_scheme": {
"type": "string",
"enum": [
"http"
],
"description": "The proxy scheme to use when connecting. Only `http` is supported.",
"default": "http"
},
"auth_username": {
"type": "string",
"description": "The username to authenticate with, if the forward proxy is protected by basic authentication.",
"x-referenceable": true
},
"auth_password": {
"type": "string",
"description": "The password to authenticate with, if the forward proxy is protected by basic authentication.",
"x-referenceable": true,
"x-encrypted": true
},
"no_proxy": {
"type": "string",
"description": "Comma-separated list of hosts that should not be proxied."
},
"http_proxy_host": {
"type": "string",
"description": "A string representing a host name, such as example.com."
},
"http_proxy_port": {
"type": "integer",
"maximum": 65535,
"minimum": 0,
"description": "An integer representing a port number between 0 and 65535, inclusive."
},
"https_proxy_host": {
"type": "string",
"description": "A string representing a host name, such as example.com."
}
}
},
"rejection_mode": {
"type": "string",
"enum": [
"none",
"stealth",
"verbose"
],
"description": "Controls block response format and status code. 'none' returns 400 with plain text block reason, 'stealth' 403 without details and 'verbose' returns 403 with rich JSON details. In streaming mode, the final SSE chunk includes finish_reason='blocked_by_guard' and 'verbose' will include a 'guardrail_result' metadata entry under 'data.choices[0]' in OpenAI format.",
"default": "none"
},
"aws_sts_endpoint_url": {
"type": "string",
"description": "Override the STS endpoint URL when assuming a different role"
},
"guardrails_version": {
"type": "string",
"description": "The guardrail version used in the request to apply the guardrail. Note that the value of this field must match the pattern `(([1-9][0-9]{0,7})|(DRAFT))` according to the AWS documentation https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ApplyGuardrail.html#API_runtime_ApplyGuardrail_RequestSyntax."
},
"guarding_mode": {
"type": "string",
"enum": [
"BOTH",
"INPUT",
"OUTPUT"
],
"description": "The guardrail mode to use for the request.",
"default": "INPUT"
},
"allow_masking": {
"type": "boolean",
"description": "Allow masking the request/response instead of blocking it. Streaming will be disabled if this is enabled.",
"default": false
},
"aws_region": {
"type": "string",
"description": "The AWS region to use for the Bedrock API"
},
"aws_access_key_id": {
"type": "string",
"description": "The AWS access key ID to use for authentication",
"x-referenceable": true,
"x-encrypted": true
},
"aws_assume_role_arn": {
"type": "string",
"description": "The target AWS IAM role ARN used to access the guardrails service"
},
"aws_role_session_name": {
"type": "string",
"description": "The identifier of the assumed role session"
},
"stop_on_error": {
"type": "boolean",
"description": "Stop processing if an error occurs.",
"default": true
},
"timeout": {
"type": "number",
"description": "Connection timeout with the guardrail service.",
"default": 10000
},
"ssl_verify": {
"type": "boolean",
"description": "Whether to verify the SSL certificate of the guardrail service endpoint.",
"default": true
},
"continue_on_detection": {
"type": "boolean",
"description": "If true, the guardrail will not block the request or response. Block data and details will still be visible via kong logs. You can expect this field to work coherently with `guarding_mode` parameter.",
"default": false
}
},
"required": [
"aws_region",
"guardrails_id",
"guardrails_version"
]
}
}
}
관련 리소스
더 알아보기 (Learn more)
- AI AWS Guardrails Policy를 사용하는 방법을 안내합니다 — Use the AI AWS Guardrails Policy