Skip to main content

foundation_models

Creates, updates, deletes, gets or lists a foundation_models resource.

Overview

Namefoundation_models
TypeResource
Idaws.bedrock.foundation_models

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
customizations_supportedarrayThe customization that the model supports.
inference_types_supportedarrayThe inference types that the model supports.
input_modalitiesarrayThe input modalities that the model supports.
model_arnstringThe model Amazon Resource Name (ARN). (pattern: <code>arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}::foundation-model/[a-z0-9-]{1,63}[.]{1}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}</code>)
model_idstringThe model identifier. (pattern: <code>[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}(/[a-z0-9]{12}|)</code>)
model_lifecycleobjectContains details about whether a model version is available or deprecated
model_namestringThe model name. (pattern: <code>.*</code>)
output_modalitiesarrayThe output modalities that the model supports.
provider_namestringThe model's provider name. (pattern: <code>.*</code>)
response_streaming_supportedbooleanIndicates whether the model supports streaming.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_foundation_modelselectmodel_identifier, regionGet details about a Amazon Bedrock foundation model.
list_foundation_modelsselectregionbyProvider, byCustomizationType, byOutputModality, byInferenceTypeLists 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.
create_foundation_model_agreementinsertregion, offerToken, modelIdRequest a model access agreement for the specified model.
delete_foundation_model_agreementdeleteregionDelete the model access agreement for the specified model.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
model_identifierstringThe model identifier.
regionstringAWS region (default: us-east-1)
byCustomizationTypestringReturn models that support the customization type that you specify. For more information, see Custom models in the Amazon Bedrock User Guide.
byInferenceTypestringReturn models that support the inference type that you specify. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
byOutputModalitystringReturn models that support the output modality that you specify.
byProviderstringReturn models belonging to the model provider that you specify.

SELECT examples

Get details about a Amazon Bedrock foundation model.

SELECT
customizations_supported,
inference_types_supported,
input_modalities,
model_arn,
model_id,
model_lifecycle,
model_name,
output_modalities,
provider_name,
response_streaming_supported
FROM aws.bedrock.foundation_models
WHERE model_identifier = '{{ model_identifier }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Request a model access agreement for the specified model.

INSERT INTO aws.bedrock.foundation_models (
offerToken,
modelId,
region
)
SELECT
'{{ offerToken }}' /* required */,
'{{ modelId }}' /* required */,
'{{ region }}'
RETURNING
model_id
;

DELETE examples

Delete the model access agreement for the specified model.

DELETE FROM aws.bedrock.foundation_models
WHERE region = '{{ region }}' --required
;