CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-software-amazon-smithy--smithy-aws-endpoints

AWS specific components for managing endpoints in Smithy

Overview
Eval results
Files

aws-built-ins.mddocs/

AWS Built-in Parameters

The AwsBuiltIns class provides AWS-specific built-in parameters for endpoint rules. These parameters enable AWS-aware endpoint resolution with configuration for regions, dual-stack, FIPS compliance, and service-specific settings.

Capabilities

Core AWS Parameters

Region Parameter

/**
 * Built-in parameter representing the AWS region used to dispatch requests
 */
public static final Parameter REGION = Parameter.builder()
    .name("Region")
    .type(ParameterType.STRING)
    .builtIn("AWS::Region")
    .documentation("The AWS region used to dispatch the request.")
    .build();

Dual Stack Parameter

/**
 * Built-in parameter representing the DualStack parameter for SDKs
 */
public static final Parameter DUALSTACK = Parameter.builder()
    .name("UseDualStack")
    .type(ParameterType.BOOLEAN)
    .builtIn("AWS::UseDualStack")
    .documentation("When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.")
    .required(true)
    .defaultValue(Value.booleanValue(false))
    .build();

FIPS Parameter

/**
 * Built-in parameter representing whether the endpoint must be FIPS-compliant
 */
public static final Parameter FIPS = Parameter.builder()
    .name("UseFIPS")
    .type(ParameterType.BOOLEAN)
    .builtIn("AWS::UseFIPS")
    .documentation("When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.")
    .required(true)
    .defaultValue(Value.booleanValue(false))
    .build();

Authentication Parameters

Account ID Parameter

/**
 * Built-in parameter representing the AccountId
 */
public static final Parameter ACCOUNT_ID = Parameter.builder()
    .name("AccountId")
    .type(ParameterType.STRING)
    .builtIn("AWS::Auth::AccountId")
    .documentation("The AWS AccountId used for the request.")
    .build();

Account ID Endpoint Mode Parameter

/**
 * Built-in parameter representing the AccountId Endpoint Mode
 */
public static final Parameter ACCOUNT_ID_ENDPOINT_MODE = Parameter.builder()
    .name("AccountIdEndpointMode")
    .type(ParameterType.STRING)
    .builtIn("AWS::Auth::AccountIdEndpointMode")
    .documentation("The AccountId Endpoint Mode.")
    .build();

Credential Scope Parameter

/**
 * Built-in parameter representing the Credential Scope
 */
public static final Parameter CREDENTIAL_SCOPE = Parameter.builder()
    .name("CredentialScope")
    .type(ParameterType.STRING)
    .builtIn("AWS::Auth::CredentialScope")
    .documentation("The AWS Credential Scope used for the request.")
    .build();

S3-Specific Parameters

S3 Accelerate Parameter

/**
 * S3-specific parameter for acceleration. MUST only be used by S3 rules.
 */
public static final Parameter S3_ACCELERATE = Parameter.builder()
    .type(ParameterType.BOOLEAN)
    .name("Accelerate")
    .builtIn("AWS::S3::Accelerate")
    .required(true)
    .defaultValue(Value.booleanValue(false))
    .documentation("When true, use S3 Accelerate. NOTE: Not all regions support S3 accelerate.")
    .build();

S3 Disable MRAP Parameter

/**
 * S3-specific parameter for disabling multi-region access points. MUST only be used by S3 rules.
 */
public static final Parameter S3_DISABLE_MRAP = Parameter.builder()
    .type(ParameterType.BOOLEAN)
    .name("DisableMultiRegionAccessPoints")
    .builtIn("AWS::S3::DisableMultiRegionAccessPoints")
    .required(true)
    .defaultValue(Value.booleanValue(false))
    .documentation("Whether multi-region access points (MRAP) should be disabled.")
    .build();

S3 Force Path Style Parameter

/**
 * S3-specific parameter for path-style endpoints. MUST only be used by S3 rules.
 */
public static final Parameter S3_FORCE_PATH_STYLE = Parameter.builder()
    .type(ParameterType.BOOLEAN)
    .name("ForcePathStyle")
    .builtIn("AWS::S3::ForcePathStyle")
    .documentation("When true, force a path-style endpoint to be used where the bucket name is part of the path.")
    .build();

S3 Use ARN Region Parameter

/**
 * S3-specific parameter for ARN region usage. MUST only be used by S3 rules.
 */
public static final Parameter S3_USE_ARN_REGION = Parameter.builder()
    .type(ParameterType.BOOLEAN)
    .name("UseArnRegion")
    .builtIn("AWS::S3::UseArnRegion")
    .documentation("When an Access Point ARN is provided and this flag is enabled, the SDK MUST use the ARN's region when constructing the endpoint instead of the client's configured region.")
    .build();

S3 Use Global Endpoint Parameter

/**
 * S3-specific parameter for global endpoint usage. MUST only be used by S3 rules.
 */
public static final Parameter S3_USE_GLOBAL_ENDPOINT = Parameter.builder()
    .type(ParameterType.BOOLEAN)
    .name("UseGlobalEndpoint")
    .builtIn("AWS::S3::UseGlobalEndpoint")
    .required(true)
    .defaultValue(Value.booleanValue(false))
    .documentation("Whether the global endpoint should be used, rather then the regional endpoint for us-east-1.")
    .build();

S3 Control Parameters

S3 Control Use ARN Region Parameter

/**
 * S3Control-specific parameter for ARN region usage. MUST only be used by S3Control rules.
 */
public static final Parameter S3_CONTROL_USE_ARN_REGION = Parameter.builder()
    .type(ParameterType.BOOLEAN)
    .name("UseArnRegion")
    .builtIn("AWS::S3Control::UseArnRegion")
    .documentation("When an Access Point ARN is provided and this flag is enabled, the SDK MUST use the ARN's region when constructing the endpoint instead of the client's configured region.")
    .build();

STS Parameters

STS Use Global Endpoint Parameter

/**
 * STS-specific parameter for global endpoint usage. MUST only be used by STS rules.
 */
public static final Parameter STS_USE_GLOBAL_ENDPOINT = Parameter.builder()
    .type(ParameterType.BOOLEAN)
    .name("UseGlobalEndpoint")
    .builtIn("AWS::STS::UseGlobalEndpoint")
    .required(true)
    .defaultValue(Value.booleanValue(false))
    .documentation("Whether the global endpoint should be used, rather then the regional endpoint for us-east-1.")
    .build();

Usage Examples:

import software.amazon.smithy.rulesengine.language.syntax.parameters.Parameter;
import software.amazon.smithy.rulesengine.aws.language.functions.AwsBuiltIns;

// Access AWS built-in parameters
Parameter regionParam = AwsBuiltIns.REGION;
Parameter dualStackParam = AwsBuiltIns.DUALSTACK;
Parameter fipsParam = AwsBuiltIns.FIPS;

// These parameters are automatically available in endpoint rules
// when using the AwsRuleSetExtension

// Example parameter usage in rule expressions:
// - Built-in name: "AWS::Region" 
// - Parameter name: "Region"
// - Type: STRING
// - Required: varies by parameter

Parameter Categories

Universal AWS Parameters

  • REGION - AWS region for request routing
  • DUALSTACK - Enable IPv4/IPv6 dual-stack endpoints
  • FIPS - Require FIPS-compliant endpoints

Authentication Parameters

  • ACCOUNT_ID - AWS account identifier
  • ACCOUNT_ID_ENDPOINT_MODE - Account-specific endpoint mode
  • CREDENTIAL_SCOPE - Credential scoping information

Service-Specific Parameters

  • S3: Accelerate, MRAP, path-style, ARN region, global endpoint
  • S3 Control: ARN region usage
  • STS: Global endpoint preference

All parameters include comprehensive documentation strings explaining their purpose and usage constraints.

Install with Tessl CLI

npx tessl i tessl/maven-software-amazon-smithy--smithy-aws-endpoints

docs

arn-parsing.md

authentication-utilities.md

aws-built-ins.md

aws-rule-set-extension.md

index.md

partition-resolution.md

s3-virtual-hosting.md

smithy-traits.md

validation-components.md

tile.json