get Model
Data source for managing an AWS Bedrock Foundation Model.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = aws.bedrockfoundation.getModels({});
const testGetModel = test.then(test => aws.bedrockfoundation.getModel({
modelId: test.modelSummaries?.[0]?.modelId,
}));
Content copied to clipboard
import pulumi
import pulumi_aws as aws
test = aws.bedrockfoundation.get_models()
test_get_model = aws.bedrockfoundation.get_model(model_id=test.model_summaries[0].model_id)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = Aws.BedrockFoundation.GetModels.Invoke();
var testGetModel = Aws.BedrockFoundation.GetModel.Invoke(new()
{
ModelId = test.Apply(getModelsResult => getModelsResult.ModelSummaries[0]?.ModelId),
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bedrockfoundation"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
test, err := bedrockfoundation.GetModels(ctx, &bedrockfoundation.GetModelsArgs{}, nil)
if err != nil {
return err
}
_, err = bedrockfoundation.GetModel(ctx, &bedrockfoundation.GetModelArgs{
ModelId: test.ModelSummaries[0].ModelId,
}, nil)
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.bedrockfoundation.BedrockfoundationFunctions;
import com.pulumi.aws.bedrockfoundation.inputs.GetModelsArgs;
import com.pulumi.aws.bedrockfoundation.inputs.GetModelArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var test = BedrockfoundationFunctions.getModels(GetModelsArgs.builder()
.build());
final var testGetModel = BedrockfoundationFunctions.getModel(GetModelArgs.builder()
.modelId(test.modelSummaries()[0].modelId())
.build());
}
}
Content copied to clipboard
variables:
test:
fn::invoke:
function: aws:bedrockfoundation:getModels
arguments: {}
testGetModel:
fn::invoke:
function: aws:bedrockfoundation:getModel
arguments:
modelId: ${test.modelSummaries[0].modelId}
Content copied to clipboard
Return
A collection of values returned by getModel.
Parameters
argument
A collection of arguments for invoking getModel.
Return
A collection of values returned by getModel.
Parameters
model Id
Model identifier.
See also
Return
A collection of values returned by getModel.
Parameters
argument
Builder for com.pulumi.aws.bedrockfoundation.kotlin.inputs.GetModelPlainArgs.