GetFoundationModelCommand

Get details about a Amazon Bedrock foundation model.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { BedrockClient, GetFoundationModelCommand } from "@aws-sdk/client-bedrock"; // ES Modules import
// const { BedrockClient, GetFoundationModelCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import
const client = new BedrockClient(config);
const input = { // GetFoundationModelRequest
  modelIdentifier: "STRING_VALUE", // required
};
const command = new GetFoundationModelCommand(input);
const response = await client.send(command);
// { // GetFoundationModelResponse
//   modelDetails: { // FoundationModelDetails
//     modelArn: "STRING_VALUE", // required
//     modelId: "STRING_VALUE", // required
//     modelName: "STRING_VALUE",
//     providerName: "STRING_VALUE",
//     inputModalities: [ // ModelModalityList
//       "TEXT" || "IMAGE" || "EMBEDDING",
//     ],
//     outputModalities: [
//       "TEXT" || "IMAGE" || "EMBEDDING",
//     ],
//     responseStreamingSupported: true || false,
//     customizationsSupported: [ // ModelCustomizationList
//       "FINE_TUNING" || "CONTINUED_PRE_TRAINING" || "DISTILLATION",
//     ],
//     inferenceTypesSupported: [ // InferenceTypeList
//       "ON_DEMAND" || "PROVISIONED",
//     ],
//     modelLifecycle: { // FoundationModelLifecycle
//       status: "ACTIVE" || "LEGACY", // required
//     },
//   },
// };

GetFoundationModelCommand Input

See GetFoundationModelCommandInput for more details

Parameter
Type
Description
modelIdentifier
Required
string | undefined

The model identifier.

GetFoundationModelCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
modelDetails
FoundationModelDetails | undefined

Information about the foundation model.

Throws

Name
Fault
Details
AccessDeniedException
client

The request is denied because of missing access permissions.

InternalServerException
server

An internal server error occurred. Retry your request.

ResourceNotFoundException
client

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

ThrottlingException
client

The number of requests exceeds the limit. Resubmit your request later.

ValidationException
client

Input validation failed. Check your request parameters and retry the request.

BedrockServiceException
Base exception class for all service exceptions from Bedrock service.