Skip to content

BedrockClient.list_guardrails

rboto-bedrock==0.4.0 · Service index · Types

Model summary (excerpt): 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,...

Install and imports

python -m pip install "rboto[bedrock]==0.4.0"
from rboto import BedrockClient
from rboto_bedrock.types import (
    ListGuardrailsOutput,
)

Signature

async def list_guardrails(
    *,
    guardrail_identifier: str | None = None,
    max_results: int | None = None,
    next_token: str | None = None,
) -> ListGuardrailsOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
guardrail_identifier No The unique identifier of the guardrail. This can be an ID or the ARN.
max_results No The maximum number of results to return in the response.
next_token No If there are more results than were returned in the response, the response returns a nextToken that you can send in another ListGuardrails request to see the next batch of results.

Output

ListGuardrailsOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
guardrails list[GuardrailSummaryOutput] Always present GuardrailSummaryOutput
next_token str | None Always present —

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

ListGuardrailsOutput

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

client.paginators.list_guardrails(...) accepts the same arguments and returns AsyncIterator[ListGuardrailsOutput]. Direct calls return one page. Pages preserve the Output representation above.

Input cursors: next_token. Page-size argument: max_results.

No output stream.

Errors

Import from rboto_bedrock.exceptions:

AccessDeniedError, InternalServerError, ResourceNotFoundError, ThrottlingError, ValidationError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model