Class BedrockInvokeModelProps.Builder
java.lang.Object
software.amazon.awscdk.services.stepfunctions.tasks.BedrockInvokeModelProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<BedrockInvokeModelProps>
- Enclosing interface:
BedrockInvokeModelProps
@Stability(Stable)
public static final class BedrockInvokeModelProps.Builder
extends Object
implements software.amazon.jsii.Builder<BedrockInvokeModelProps>
A builder for
BedrockInvokeModelProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofBedrockInvokeModelProps.getAccept()
Sets the value ofAssignableStateOptions.getAssign()
Sets the value ofBedrockInvokeModelProps.getBody()
build()
Builds the configured instance.Sets the value ofStateBaseProps.getComment()
contentType
(String contentType) Deprecated.This property does not require configuration because the only acceptable value is 'application/json'.credentials
(Credentials credentials) Sets the value ofTaskStateBaseOptions.getCredentials()
Sets the value ofBedrockInvokeModelProps.getGuardrail()
Deprecated.use `heartbeatTimeout`heartbeatTimeout
(Timeout heartbeatTimeout) Sets the value ofTaskStateBaseOptions.getHeartbeatTimeout()
Sets the value ofBedrockInvokeModelProps.getInput()
Sets the value ofJsonPathCommonOptions.getInputPath()
integrationPattern
(IntegrationPattern integrationPattern) Sets the value ofTaskStateBaseOptions.getIntegrationPattern()
Sets the value ofBedrockInvokeModelProps.getModel()
output
(BedrockInvokeModelOutputProps output) Sets the value ofBedrockInvokeModelProps.getOutput()
outputPath
(String outputPath) Sets the value ofJsonPathCommonOptions.getOutputPath()
Sets the value ofJsonataCommonOptions.getOutputs()
queryLanguage
(QueryLanguage queryLanguage) Sets the value ofStateBaseProps.getQueryLanguage()
resultPath
(String resultPath) Sets the value ofTaskStateBaseProps.getResultPath()
resultSelector
(Map<String, ? extends Object> resultSelector) Sets the value ofTaskStateBaseProps.getResultSelector()
Sets the value ofStateBaseProps.getStateName()
taskTimeout
(Timeout taskTimeout) Sets the value ofTaskStateBaseOptions.getTaskTimeout()
Deprecated.use `taskTimeout`traceEnabled
(Boolean traceEnabled) Sets the value ofBedrockInvokeModelProps.getTraceEnabled()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
model
Sets the value ofBedrockInvokeModelProps.getModel()
- Parameters:
model
- The Bedrock model that the task will invoke. This parameter is required.- Returns:
this
-
accept
Sets the value ofBedrockInvokeModelProps.getAccept()
- Parameters:
accept
- The desired MIME type of the inference body in the response.- Returns:
this
-
body
Sets the value ofBedrockInvokeModelProps.getBody()
- Parameters:
body
- The input data for the Bedrock model invocation. The inference parameters contained in the body depend on the Bedrock model being used.The body must be in the format specified in the
contentType
field. For example, if the content type isapplication/json
, the body must be JSON formatted.The body must be up to 256 KB in size. For input data that exceeds 256 KB, use
input
instead to retrieve the input data from S3.You must specify either the
body
or theinput
field, but not both.- Returns:
this
-
contentType
@Stability(Deprecated) @Deprecated public BedrockInvokeModelProps.Builder contentType(String contentType) Deprecated.This property does not require configuration because the only acceptable value is 'application/json'.Sets the value ofBedrockInvokeModelProps.getContentType()
- Parameters:
contentType
- The MIME type of the input data in the request.- Returns:
this
-
guardrail
Sets the value ofBedrockInvokeModelProps.getGuardrail()
- Parameters:
guardrail
- The guardrail is applied to the invocation.- Returns:
this
-
input
Sets the value ofBedrockInvokeModelProps.getInput()
- Parameters:
input
- The source location to retrieve the input data from.- Returns:
this
-
output
@Stability(Stable) public BedrockInvokeModelProps.Builder output(BedrockInvokeModelOutputProps output) Sets the value ofBedrockInvokeModelProps.getOutput()
- Parameters:
output
- The destination location where the API response is written. If you specify this field, the API response body is replaced with a reference to the output location.- Returns:
this
-
traceEnabled
Sets the value ofBedrockInvokeModelProps.getTraceEnabled()
- Parameters:
traceEnabled
- Specifies whether to enable or disable the Bedrock trace.- Returns:
this
-
resultPath
Sets the value ofTaskStateBaseProps.getResultPath()
- Parameters:
resultPath
- JSONPath expression to indicate where to inject the state's output. May also be the special value JsonPath.DISCARD, which will cause the state's input to become its output.- Returns:
this
-
resultSelector
@Stability(Stable) public BedrockInvokeModelProps.Builder resultSelector(Map<String, ? extends Object> resultSelector) Sets the value ofTaskStateBaseProps.getResultSelector()
- Parameters:
resultSelector
- The JSON that will replace the state's raw result and become the effective result before ResultPath is applied. You can use ResultSelector to create a payload with values that are static or selected from the state's raw result.- Returns:
this
-
comment
Sets the value ofStateBaseProps.getComment()
- Parameters:
comment
- A comment describing this state.- Returns:
this
-
queryLanguage
@Stability(Stable) public BedrockInvokeModelProps.Builder queryLanguage(QueryLanguage queryLanguage) Sets the value ofStateBaseProps.getQueryLanguage()
- Parameters:
queryLanguage
- The name of the query language used by the state. If the state does not contain aqueryLanguage
field, then it will use the query language specified in the top-levelqueryLanguage
field.- Returns:
this
-
stateName
Sets the value ofStateBaseProps.getStateName()
- Parameters:
stateName
- Optional name for this state.- Returns:
this
-
credentials
Sets the value ofTaskStateBaseOptions.getCredentials()
- Parameters:
credentials
- Credentials for an IAM Role that the State Machine assumes for executing the task. This enables cross-account resource invocations.- Returns:
this
-
heartbeat
@Stability(Deprecated) @Deprecated public BedrockInvokeModelProps.Builder heartbeat(Duration heartbeat) Deprecated.use `heartbeatTimeout`Sets the value ofTaskStateBaseOptions.getHeartbeat()
- Parameters:
heartbeat
- Timeout for the heartbeat.- Returns:
this
-
heartbeatTimeout
@Stability(Stable) public BedrockInvokeModelProps.Builder heartbeatTimeout(Timeout heartbeatTimeout) Sets the value ofTaskStateBaseOptions.getHeartbeatTimeout()
- Parameters:
heartbeatTimeout
- Timeout for the heartbeat. [disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface- Returns:
this
-
integrationPattern
@Stability(Stable) public BedrockInvokeModelProps.Builder integrationPattern(IntegrationPattern integrationPattern) Sets the value ofTaskStateBaseOptions.getIntegrationPattern()
- Parameters:
integrationPattern
- AWS Step Functions integrates with services directly in the Amazon States Language. You can control these AWS services using service integration patterns.Depending on the AWS Service, the Service Integration Pattern availability will vary.
- Returns:
this
-
taskTimeout
Sets the value ofTaskStateBaseOptions.getTaskTimeout()
- Parameters:
taskTimeout
- Timeout for the task. [disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface- Returns:
this
-
timeout
Deprecated.use `taskTimeout`Sets the value ofTaskStateBaseOptions.getTimeout()
- Parameters:
timeout
- Timeout for the task.- Returns:
this
-
assign
@Stability(Stable) public BedrockInvokeModelProps.Builder assign(Map<String, ? extends Object> assign) Sets the value ofAssignableStateOptions.getAssign()
- Parameters:
assign
- Workflow variables to store in this step. Using workflow variables, you can store data in a step and retrieve that data in future steps.- Returns:
this
-
inputPath
Sets the value ofJsonPathCommonOptions.getInputPath()
- Parameters:
inputPath
- JSONPath expression to select part of the state to be the input to this state. May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}.- Returns:
this
-
outputPath
Sets the value ofJsonPathCommonOptions.getOutputPath()
- Parameters:
outputPath
- JSONPath expression to select part of the state to be the output to this state. May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}.- Returns:
this
-
outputs
Sets the value ofJsonataCommonOptions.getOutputs()
- Parameters:
outputs
- Used to specify and transform output from the state. When specified, the value overrides the state output default. The output field accepts any JSON value (object, array, string, number, boolean, null). Any string value, including those inside objects or arrays, will be evaluated as JSONata if surrounded by {% %} characters. Output also accepts a JSONata expression directly.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<BedrockInvokeModelProps>
- Returns:
- a new instance of
BedrockInvokeModelProps
- Throws:
NullPointerException
- if any required attribute was not provided
-