BedrockClient.list_foundation_models
rboto-bedrock==0.4.0 · Service index · Types
Model summary (excerpt): Lists Amazon Bedrock foundation models that you can use. You can filter the results with the request parameters. For more information, see Foundation models in the Amazon Bedrock User Guide .
Install and imports
from rboto import BedrockClient
from rboto_bedrock.types import (
InferenceType,
ListFoundationModelsOutput,
ModelCustomization,
ModelModality,
)
Signature
async def list_foundation_models(
*,
by_provider: str | None = None,
by_customization_type: ModelCustomization | None = None,
by_output_modality: ModelModality | None = None,
by_inference_type: InferenceType | None = None,
project_identifier: str | None = None,
) -> ListFoundationModelsOutput: ...
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) |
|---|---|---|
by_provider |
No | Return models belonging to the model provider that you specify. |
by_customization_type |
No | Return models that support the customization type that you specify. For more information, see Custom models in the Amazon Bedrock User Guide . |
by_output_modality |
No | Return models that support the output modality that you specify. |
by_inference_type |
No | Return models that support the inference type that you specify. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide . |
project_identifier |
No | The ID or Amazon Resource Name (ARN) of a project. Amazon Bedrock uses the project's trusted access program participation when determining which models to return. The project must belong to your account in the same AWS Region and partition as the request. If you omit this parameter or specify default , Amazon Bedrock uses your account's participation, including organization inheritance. A... |
Output
ListFoundationModelsOutput.
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 |
|---|---|---|---|
model_summaries |
list[FoundationModelSummaryOutput] | None |
Always present | FoundationModelSummaryOutput |
| 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.
Related types
InferenceType, ListFoundationModelsOutput, ModelCustomization, ModelModality
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_bedrock.exceptions:
AccessDeniedError, InternalServerError, ThrottlingError, ValidationError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.
Example
Complete, type-checked service example. Replace its placeholders and configure credentials before running it.
import asyncio
from rboto import BedrockClient
async def main() -> None:
client = BedrockClient(region="us-east-1")
response = await client.list_foundation_models(by_output_modality="TEXT")
for model in response.model_summaries or []:
print(model.model_id, model.model_name)
if __name__ == "__main__":
asyncio.run(main())