list_guardrails
¶
list_guardrails(
*,
config_overrides: Optional[BedrockClientConfig] = None,
guardrail_identifier: Optional[GuardrailIdentifier] = None,
max_results: Optional[MaxResults] = None,
next_token: Optional[PaginationToken] = None,
) -> ListGuardrailsResponse
Lists details about all the guardrails in an account. To list the DRAFT version of all your guardrails, don't specify the guardrailIdentifier field. To list all versions of a guardrail, specify the ARN of the guardrail in the guardrailIdentifier field.
You can set the maximum number of results to return in a response in the maxResults field. If there are more results than the number you set, the response returns a nextToken that you can send in another ListGuardrails request to see the next batch of results.
Parameters:
-
guardrail_identifier(Optional[GuardrailIdentifier], default:None) –The unique identifier of the guardrail. This can be an ID or the ARN.
-
max_results(Optional[MaxResults], default:None) –The maximum number of results to return in the response.
-
next_token(Optional[PaginationToken], default:None) –If there are more results than were returned in the response, the response returns a
nextTokenthat you can send in anotherListGuardrailsrequest to see the next batch of results.
Raises:
-
AccessDeniedException–The request is denied because of missing access permissions.
-
InternalServerException–An internal server error occurred. Retry your request.
-
ResourceNotFoundException–The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
-
ThrottlingException–The number of requests exceeds the limit. Resubmit your request later.
-
ValidationException–Input validation failed. Check your request parameters and retry the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_bedrock/_services/bedrock.py
5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 | |