Interface CreateFunctionRequest.Builder
- All Superinterfaces:
AwsRequest.Builder,Buildable,CopyableBuilder<CreateFunctionRequest.Builder,,CreateFunctionRequest> ElementalInferenceRequest.Builder,SdkBuilder<CreateFunctionRequest.Builder,,CreateFunctionRequest> SdkPojo,SdkRequest.Builder
- Enclosing class:
CreateFunctionRequest
-
Method Summary
Modifier and TypeMethodDescriptiondescription(String description) The description of the function.eventBridgeDelivery(String eventBridgeDelivery) Specifies whether Elemental Inference also sends this function's results to Amazon EventBridge.eventBridgeDelivery(EventBridgeDeliveryMode eventBridgeDelivery) Specifies whether Elemental Inference also sends this function's results to Amazon EventBridge.A name for this function.overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.requestExpression(String requestExpression) The JSONata expression that builds the request.responseExpression(String responseExpression) The JSONata expression that selects what to store.The tags to associate with this function.default CreateFunctionRequest.Buildertarget(Consumer<FunctionTarget.Builder> target) The destination for the request that the function builds.target(FunctionTarget target) The destination for the request that the function builds.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfigurationMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.services.elementalinference.model.ElementalInferenceRequest.Builder
buildMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
name
A name for this function.
- Parameters:
name- A name for this function.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
target
The destination for the request that the function builds.
- Parameters:
target- The destination for the request that the function builds.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
target
The destination for the request that the function builds.
This is a convenience method that creates an instance of theFunctionTarget.Builderavoiding the need to create one manually viaFunctionTarget.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed totarget(FunctionTarget).- Parameters:
target- a consumer that will call methods onFunctionTarget.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
requestExpression
The JSONata expression that builds the request. Elemental Inference evaluates it against the media object of the feed, which holds the media and metadata that the function asked for. Maximum length: 5,120 characters.
When you save the function, Elemental Inference evaluates the expression against sample media and rejects it if the evaluation fails. For a Bedrock target, the result must be a JSON object; Elemental Inference doesn't check that the object is a valid request body for the model. The expression can reference at most one of media.transcript, media.contextual, and media.clip. For a passthrough target, it can't reference media.frames.
- Parameters:
requestExpression- The JSONata expression that builds the request. Elemental Inference evaluates it against the media object of the feed, which holds the media and metadata that the function asked for. Maximum length: 5,120 characters.When you save the function, Elemental Inference evaluates the expression against sample media and rejects it if the evaluation fails. For a Bedrock target, the result must be a JSON object; Elemental Inference doesn't check that the object is a valid request body for the model. The expression can reference at most one of media.transcript, media.contextual, and media.clip. For a passthrough target, it can't reference media.frames.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
responseExpression
The JSONata expression that selects what to store. Elemental Inference evaluates it against the result as its root: the model response for a Bedrock target, or the output of the request expression for a passthrough target. If a function has no response expression, Elemental Inference stores the entire result. Maximum length: 5,120 characters.
When you save the function, Elemental Inference checks that the expression is valid JSONata. For a passthrough target, it also evaluates the request and response expressions together against sample media, and rejects them if they produce no value.
- Parameters:
responseExpression- The JSONata expression that selects what to store. Elemental Inference evaluates it against the result as its root: the model response for a Bedrock target, or the output of the request expression for a passthrough target. If a function has no response expression, Elemental Inference stores the entire result. Maximum length: 5,120 characters.When you save the function, Elemental Inference checks that the expression is valid JSONata. For a passthrough target, it also evaluates the request and response expressions together against sample media, and rejects them if they produce no value.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
description
The description of the function. Maximum length: 1,024 characters.
- Parameters:
description- The description of the function. Maximum length: 1,024 characters.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
eventBridgeDelivery
Specifies whether Elemental Inference also sends this function's results to Amazon EventBridge. Elemental Inference sends a result only when the result is a JSON object with a top-level
eventBridgefield set totrue. It sends the result, unchanged, as a Function Metadata Generated event to the default event bus in your account, after the result is available from GetMetadata. If the result is larger than 64 KB, the event hasresultOmittedset totruein place of the result.Valid values:
-
ENABLED – Elemental Inference sends each marked result as an event.
-
DISABLED (default) – Elemental Inference doesn't send events.
For a Bedrock target, ENABLED requires a response expression, because the model response itself never has a top-level
eventBridgefield. A feed output that runs a function with ENABLED can't use a fixedInterval trigger shorter than 4 seconds.- Parameters:
eventBridgeDelivery- Specifies whether Elemental Inference also sends this function's results to Amazon EventBridge. Elemental Inference sends a result only when the result is a JSON object with a top-leveleventBridgefield set totrue. It sends the result, unchanged, as a Function Metadata Generated event to the default event bus in your account, after the result is available from GetMetadata. If the result is larger than 64 KB, the event hasresultOmittedset totruein place of the result.Valid values:
-
ENABLED – Elemental Inference sends each marked result as an event.
-
DISABLED (default) – Elemental Inference doesn't send events.
For a Bedrock target, ENABLED requires a response expression, because the model response itself never has a top-level
eventBridgefield. A feed output that runs a function with ENABLED can't use a fixedInterval trigger shorter than 4 seconds.-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
eventBridgeDelivery
Specifies whether Elemental Inference also sends this function's results to Amazon EventBridge. Elemental Inference sends a result only when the result is a JSON object with a top-level
eventBridgefield set totrue. It sends the result, unchanged, as a Function Metadata Generated event to the default event bus in your account, after the result is available from GetMetadata. If the result is larger than 64 KB, the event hasresultOmittedset totruein place of the result.Valid values:
-
ENABLED – Elemental Inference sends each marked result as an event.
-
DISABLED (default) – Elemental Inference doesn't send events.
For a Bedrock target, ENABLED requires a response expression, because the model response itself never has a top-level
eventBridgefield. A feed output that runs a function with ENABLED can't use a fixedInterval trigger shorter than 4 seconds.- Parameters:
eventBridgeDelivery- Specifies whether Elemental Inference also sends this function's results to Amazon EventBridge. Elemental Inference sends a result only when the result is a JSON object with a top-leveleventBridgefield set totrue. It sends the result, unchanged, as a Function Metadata Generated event to the default event bus in your account, after the result is available from GetMetadata. If the result is larger than 64 KB, the event hasresultOmittedset totruein place of the result.Valid values:
-
ENABLED – Elemental Inference sends each marked result as an event.
-
DISABLED (default) – Elemental Inference doesn't send events.
For a Bedrock target, ENABLED requires a response expression, because the model response itself never has a top-level
eventBridgefield. A feed output that runs a function with ENABLED can't use a fixedInterval trigger shorter than 4 seconds.-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
tags
The tags to associate with this function.
- Parameters:
tags- The tags to associate with this function.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
overrideConfiguration
CreateFunctionRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
overrideConfiguration- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
CreateFunctionRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
builderConsumer- AConsumerto which an emptyAwsRequestOverrideConfiguration.Builderwill be given.- Returns:
- This object for method chaining.
-