java.lang.Object
software.amazon.smithy.rulesengine.language.syntax.fn.FunctionDefinition
software.amazon.smithy.rulesengine.language.stdlib.AwsPartition

public final class AwsPartition extends FunctionDefinition
An AWS rule-set function for mapping a region string to a partition.
  • Field Details

  • Constructor Details

    • AwsPartition

      public AwsPartition()
  • Method Details

    • getId

      public String getId()
      Description copied from class: FunctionDefinition
      The ID of this function.
      Specified by:
      getId in class FunctionDefinition
      Returns:
      The ID string
    • getArguments

      public List<Type> getArguments()
      Description copied from class: FunctionDefinition
      The arguments to this function.
      Specified by:
      getArguments in class FunctionDefinition
      Returns:
      The function arguments
    • getReturnType

      public Type getReturnType()
      Description copied from class: FunctionDefinition
      The return type of this function definition.
      Specified by:
      getReturnType in class FunctionDefinition
      Returns:
      The function return type
    • evaluate

      public Value evaluate(List<Value> arguments)
      Description copied from class: FunctionDefinition
      Evaluate the arguments to a given function to compute a result.
      Specified by:
      evaluate in class FunctionDefinition
      Returns:
      The resulting value
    • ofExpression

      public static Function ofExpression(Expression expression)
      Constructs a function definition for resolving a string expression to a partition.
      Parameters:
      expression - expression to evaluate to a partition.
      Returns:
      the function representing the partition lookup.