foundation_models
Creates, updates, deletes, gets or lists a foundation_models resource.
Overview
| Name | foundation_models |
| Type | Resource |
| Id | aws.bedrock.foundation_models |
Fields
The following fields are returned by SELECT queries:
- get_foundation_model
- list_foundation_models
| Name | Datatype | Description |
|---|---|---|
customizations_supported | array | The customization that the model supports. |
inference_types_supported | array | The inference types that the model supports. |
input_modalities | array | The input modalities that the model supports. |
model_arn | string | The 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_id | string | The 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_lifecycle | object | Contains details about whether a model version is available or deprecated |
model_name | string | The model name. (pattern: <code>.*</code>) |
output_modalities | array | The output modalities that the model supports. |
provider_name | string | The model's provider name. (pattern: <code>.*</code>) |
response_streaming_supported | boolean | Indicates whether the model supports streaming. |
| Name | Datatype | Description |
|---|---|---|
model_summaries | array | A list of Amazon Bedrock foundation models. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_foundation_model | select | model_identifier, region | Get details about a Amazon Bedrock foundation model. | |
list_foundation_models | select | region | byProvider, byCustomizationType, byOutputModality, byInferenceType | 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. |
create_foundation_model_agreement | insert | region, offerToken, modelId | Request a model access agreement for the specified model. | |
delete_foundation_model_agreement | delete | region | Delete 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.
| Name | Datatype | Description |
|---|---|---|
model_identifier | string | The model identifier. |
region | string | AWS region (default: us-east-1) |
byCustomizationType | string | Return models that support the customization type that you specify. For more information, see Custom models in the Amazon Bedrock User Guide. |
byInferenceType | string | Return models that support the inference type that you specify. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide. |
byOutputModality | string | Return models that support the output modality that you specify. |
byProvider | string | Return models belonging to the model provider that you specify. |
SELECT examples
- get_foundation_model
- list_foundation_models
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
;
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.
SELECT
model_summaries
FROM aws.bedrock.foundation_models
WHERE region = '{{ region }}' -- required
AND byProvider = '{{ byProvider }}'
AND byCustomizationType = '{{ byCustomizationType }}'
AND byOutputModality = '{{ byOutputModality }}'
AND byInferenceType = '{{ byInferenceType }}'
;
INSERT examples
- create_foundation_model_agreement
- Manifest
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
;
# Description fields are for documentation purposes
- name: foundation_models
props:
- name: region
value: "{{ region }}"
description: Required parameter for the foundation_models resource.
- name: offerToken
value: "{{ offerToken }}"
- name: modelId
value: "{{ modelId }}"
DELETE examples
- delete_foundation_model_agreement
Delete the model access agreement for the specified model.
DELETE FROM aws.bedrock.foundation_models
WHERE region = '{{ region }}' --required
;