Class AwsPartition
- 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 Summary
Fields Modifier and Type Field Description static IdentifierDNS_SUFFIXstatic IdentifierDUAL_STACK_DNS_SUFFIXstatic java.lang.StringIDstatic IdentifierINFERREDstatic IdentifierNAMEstatic IdentifierSUPPORTS_DUAL_STACKstatic IdentifierSUPPORTS_FIPS
-
Constructor Summary
Constructors Constructor Description AwsPartition()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Valueevaluate(java.util.List<Value> arguments)Evaluate the arguments to a given function to compute a result.java.util.List<Type>getArguments()The arguments to this function.java.lang.StringgetId()The ID of this function.TypegetReturnType()The return type of this function definition.static FunctionofExpression(Expression expression)Constructs a function definition for resolving a string expression to a partition.
-
-
-
Field Detail
-
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
-
NAME
public static final Identifier NAME
-
DNS_SUFFIX
public static final Identifier DNS_SUFFIX
-
DUAL_STACK_DNS_SUFFIX
public static final Identifier DUAL_STACK_DNS_SUFFIX
-
SUPPORTS_FIPS
public static final Identifier SUPPORTS_FIPS
-
SUPPORTS_DUAL_STACK
public static final Identifier SUPPORTS_DUAL_STACK
-
INFERRED
public static final Identifier INFERRED
-
-
Method Detail
-
getId
public java.lang.String getId()
Description copied from class:FunctionDefinitionThe ID of this function.- Specified by:
getIdin classFunctionDefinition- Returns:
- The ID string
-
getArguments
public java.util.List<Type> getArguments()
Description copied from class:FunctionDefinitionThe arguments to this function.- Specified by:
getArgumentsin classFunctionDefinition- Returns:
- The function arguments
-
getReturnType
public Type getReturnType()
Description copied from class:FunctionDefinitionThe return type of this function definition.- Specified by:
getReturnTypein classFunctionDefinition- Returns:
- The function return type
-
evaluate
public Value evaluate(java.util.List<Value> arguments)
Description copied from class:FunctionDefinitionEvaluate the arguments to a given function to compute a result.- Specified by:
evaluatein classFunctionDefinition- 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.
-
-