Show / Hide Table of Contents

Class BedrockInvokeModel

A Step Functions Task to invoke a model in Bedrock.

Inheritance
object
State
TaskStateBase
BedrockInvokeModel
Implements
IChainable
INextable
Inherited Members
TaskStateBase.AddCatch(IChainable, ICatchProps)
TaskStateBase.AddRetry(IRetryProps)
TaskStateBase.Metric(string, IMetricOptions)
TaskStateBase.MetricFailed(IMetricOptions)
TaskStateBase.MetricHeartbeatTimedOut(IMetricOptions)
TaskStateBase.MetricRunTime(IMetricOptions)
TaskStateBase.MetricScheduled(IMetricOptions)
TaskStateBase.MetricScheduleTime(IMetricOptions)
TaskStateBase.MetricStarted(IMetricOptions)
TaskStateBase.MetricSucceeded(IMetricOptions)
TaskStateBase.MetricTime(IMetricOptions)
TaskStateBase.MetricTimedOut(IMetricOptions)
TaskStateBase.Next(IChainable)
TaskStateBase.ToStateJson(QueryLanguage?)
TaskStateBase.WhenBoundToGraph(StateGraph)
TaskStateBase.EndStates
State.FilterNextables(State[])
State.FindReachableEndStates(State, IFindStateOptions)
State.FindReachableStates(State, IFindStateOptions)
State.PrefixStates(IConstruct, string)
State.AddBranch(StateGraph)
State.AddChoice(Condition, State, IChoiceTransitionOptions)
State.AddItemProcessor(StateGraph, IProcessorConfig)
State.AddIterator(StateGraph)
State.AddPrefix(string)
State.BindToGraph(StateGraph)
State.MakeDefault(State)
State.MakeNext(State)
State.RenderAssign(QueryLanguage?)
State.RenderBranches()
State.RenderChoices(QueryLanguage?)
State.RenderInputOutput()
State.RenderItemProcessor()
State.RenderIterator()
State.RenderNextEnd()
State.RenderQueryLanguage(QueryLanguage?)
State.RenderResultSelector()
State.RenderRetryCatch(QueryLanguage?)
State.ValidateState()
State.Branches
State.Id
State.StartState
State.StateId
State.Arguments
State.Assign
State.Comment
State.InputPath
State.OutputPath
State.Outputs
State.Parameters
State.QueryLanguage
State.ResultPath
State.ResultSelector
State.StateName
State.DefaultChoice
State.Iteration
State.Processor
State.ProcessorConfig
State.ProcessorMode
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class BedrockInvokeModel : TaskStateBase, IChainable, INextable
Syntax (vb)
Public Class BedrockInvokeModel Inherits TaskStateBase Implements IChainable, INextable
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Bedrock;


            var model = FoundationModel.FromFoundationModelId(this, "Model", FoundationModelIdentifier.AMAZON_TITAN_TEXT_G1_EXPRESS_V1);

            var task = new BedrockInvokeModel(this, "Prompt Model", new BedrockInvokeModelProps {
                Model = model,
                Body = TaskInput.FromObject(new Dictionary<string, object> {
                    { "inputText", "Generate a list of five first names." },
                    { "textGenerationConfig", new Dictionary<string, int> {
                        { "maxTokenCount", 100 },
                        { "temperature", 1 }
                    } }
                }),
                ResultSelector = new Dictionary<string, object> {
                    { "names", JsonPath.StringAt("$.Body.results[0].outputText") }
                }
            });

Synopsis

Constructors

BedrockInvokeModel(Construct, string, IBedrockInvokeModelProps)

A Step Functions Task to invoke a model in Bedrock.

Properties

TaskMetrics

A Step Functions Task to invoke a model in Bedrock.

TaskPolicies

A Step Functions Task to invoke a model in Bedrock.

Methods

JsonPath(Construct, string, IBedrockInvokeModelJsonPathProps)

A Step Functions Task using JSONPath to invoke a model in Bedrock.

Jsonata(Construct, string, IBedrockInvokeModelJsonataProps)

A Step Functions Task using JSONata to invoke a model in Bedrock.

Constructors

BedrockInvokeModel(Construct, string, IBedrockInvokeModelProps)

A Step Functions Task to invoke a model in Bedrock.

public BedrockInvokeModel(Construct scope, string id, IBedrockInvokeModelProps props)
Parameters
scope Construct
id string

Descriptive identifier for this chainable.

props IBedrockInvokeModelProps
Remarks

ExampleMetadata: infused

Properties

TaskMetrics

A Step Functions Task to invoke a model in Bedrock.

protected override ITaskMetricsConfig? TaskMetrics { get; }
Property Value

ITaskMetricsConfig

Overrides
TaskStateBase.TaskMetrics
Remarks

ExampleMetadata: infused

TaskPolicies

A Step Functions Task to invoke a model in Bedrock.

protected override PolicyStatement[]? TaskPolicies { get; }
Property Value

PolicyStatement[]

Overrides
TaskStateBase.TaskPolicies
Remarks

ExampleMetadata: infused

Methods

JsonPath(Construct, string, IBedrockInvokeModelJsonPathProps)

A Step Functions Task using JSONPath to invoke a model in Bedrock.

public static BedrockInvokeModel JsonPath(Construct scope, string id, IBedrockInvokeModelJsonPathProps props)
Parameters
scope Construct
id string
props IBedrockInvokeModelJsonPathProps
Returns

BedrockInvokeModel

Remarks

ExampleMetadata: infused

Jsonata(Construct, string, IBedrockInvokeModelJsonataProps)

A Step Functions Task using JSONata to invoke a model in Bedrock.

public static BedrockInvokeModel Jsonata(Construct scope, string id, IBedrockInvokeModelJsonataProps props)
Parameters
scope Construct
id string
props IBedrockInvokeModelJsonataProps
Returns

BedrockInvokeModel

Remarks

ExampleMetadata: infused

Implements

IChainable
INextable
Back to top Generated by DocFX