Interface CreateFunctionRequest.Builder

  • 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 the FunctionTarget.Builder avoiding the need to create one manually via FunctionTarget.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to target(FunctionTarget).

      Parameters:
      target - a consumer that will call methods on FunctionTarget.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • requestExpression

      CreateFunctionRequest.Builder requestExpression(String 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

      CreateFunctionRequest.Builder responseExpression(String 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

      CreateFunctionRequest.Builder description(String 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

      CreateFunctionRequest.Builder eventBridgeDelivery(String 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 eventBridge field set to true. 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 has resultOmitted set to true in 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 eventBridge field. 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-level eventBridge field set to true. 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 has resultOmitted set to true in 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 eventBridge field. 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

      CreateFunctionRequest.Builder eventBridgeDelivery(EventBridgeDeliveryMode 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 eventBridge field set to true. 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 has resultOmitted set to true in 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 eventBridge field. 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-level eventBridge field set to true. 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 has resultOmitted set to true in 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 eventBridge field. 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.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      overrideConfiguration - The override configuration.
      Returns:
      This object for method chaining.
    • overrideConfiguration

      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      builderConsumer - A Consumer to which an empty AwsRequestOverrideConfiguration.Builder will be given.
      Returns:
      This object for method chaining.