or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

arn-parsing.mdauthentication-utilities.mdaws-built-ins.mdaws-rule-set-extension.mdindex.mdpartition-resolution.mds3-virtual-hosting.mdsmithy-traits.mdvalidation-components.md

aws-built-ins.mddocs/

0

# AWS Built-in Parameters

1

2

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.

3

4

## Capabilities

5

6

### Core AWS Parameters

7

8

#### Region Parameter

9

```java { .api }

10

/**

11

* Built-in parameter representing the AWS region used to dispatch requests

12

*/

13

public static final Parameter REGION = Parameter.builder()

14

.name("Region")

15

.type(ParameterType.STRING)

16

.builtIn("AWS::Region")

17

.documentation("The AWS region used to dispatch the request.")

18

.build();

19

```

20

21

#### Dual Stack Parameter

22

```java { .api }

23

/**

24

* Built-in parameter representing the DualStack parameter for SDKs

25

*/

26

public static final Parameter DUALSTACK = Parameter.builder()

27

.name("UseDualStack")

28

.type(ParameterType.BOOLEAN)

29

.builtIn("AWS::UseDualStack")

30

.documentation("When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.")

31

.required(true)

32

.defaultValue(Value.booleanValue(false))

33

.build();

34

```

35

36

#### FIPS Parameter

37

```java { .api }

38

/**

39

* Built-in parameter representing whether the endpoint must be FIPS-compliant

40

*/

41

public static final Parameter FIPS = Parameter.builder()

42

.name("UseFIPS")

43

.type(ParameterType.BOOLEAN)

44

.builtIn("AWS::UseFIPS")

45

.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.")

46

.required(true)

47

.defaultValue(Value.booleanValue(false))

48

.build();

49

```

50

51

### Authentication Parameters

52

53

#### Account ID Parameter

54

```java { .api }

55

/**

56

* Built-in parameter representing the AccountId

57

*/

58

public static final Parameter ACCOUNT_ID = Parameter.builder()

59

.name("AccountId")

60

.type(ParameterType.STRING)

61

.builtIn("AWS::Auth::AccountId")

62

.documentation("The AWS AccountId used for the request.")

63

.build();

64

```

65

66

#### Account ID Endpoint Mode Parameter

67

```java { .api }

68

/**

69

* Built-in parameter representing the AccountId Endpoint Mode

70

*/

71

public static final Parameter ACCOUNT_ID_ENDPOINT_MODE = Parameter.builder()

72

.name("AccountIdEndpointMode")

73

.type(ParameterType.STRING)

74

.builtIn("AWS::Auth::AccountIdEndpointMode")

75

.documentation("The AccountId Endpoint Mode.")

76

.build();

77

```

78

79

#### Credential Scope Parameter

80

```java { .api }

81

/**

82

* Built-in parameter representing the Credential Scope

83

*/

84

public static final Parameter CREDENTIAL_SCOPE = Parameter.builder()

85

.name("CredentialScope")

86

.type(ParameterType.STRING)

87

.builtIn("AWS::Auth::CredentialScope")

88

.documentation("The AWS Credential Scope used for the request.")

89

.build();

90

```

91

92

### S3-Specific Parameters

93

94

#### S3 Accelerate Parameter

95

```java { .api }

96

/**

97

* S3-specific parameter for acceleration. MUST only be used by S3 rules.

98

*/

99

public static final Parameter S3_ACCELERATE = Parameter.builder()

100

.type(ParameterType.BOOLEAN)

101

.name("Accelerate")

102

.builtIn("AWS::S3::Accelerate")

103

.required(true)

104

.defaultValue(Value.booleanValue(false))

105

.documentation("When true, use S3 Accelerate. NOTE: Not all regions support S3 accelerate.")

106

.build();

107

```

108

109

#### S3 Disable MRAP Parameter

110

```java { .api }

111

/**

112

* S3-specific parameter for disabling multi-region access points. MUST only be used by S3 rules.

113

*/

114

public static final Parameter S3_DISABLE_MRAP = Parameter.builder()

115

.type(ParameterType.BOOLEAN)

116

.name("DisableMultiRegionAccessPoints")

117

.builtIn("AWS::S3::DisableMultiRegionAccessPoints")

118

.required(true)

119

.defaultValue(Value.booleanValue(false))

120

.documentation("Whether multi-region access points (MRAP) should be disabled.")

121

.build();

122

```

123

124

#### S3 Force Path Style Parameter

125

```java { .api }

126

/**

127

* S3-specific parameter for path-style endpoints. MUST only be used by S3 rules.

128

*/

129

public static final Parameter S3_FORCE_PATH_STYLE = Parameter.builder()

130

.type(ParameterType.BOOLEAN)

131

.name("ForcePathStyle")

132

.builtIn("AWS::S3::ForcePathStyle")

133

.documentation("When true, force a path-style endpoint to be used where the bucket name is part of the path.")

134

.build();

135

```

136

137

#### S3 Use ARN Region Parameter

138

```java { .api }

139

/**

140

* S3-specific parameter for ARN region usage. MUST only be used by S3 rules.

141

*/

142

public static final Parameter S3_USE_ARN_REGION = Parameter.builder()

143

.type(ParameterType.BOOLEAN)

144

.name("UseArnRegion")

145

.builtIn("AWS::S3::UseArnRegion")

146

.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.")

147

.build();

148

```

149

150

#### S3 Use Global Endpoint Parameter

151

```java { .api }

152

/**

153

* S3-specific parameter for global endpoint usage. MUST only be used by S3 rules.

154

*/

155

public static final Parameter S3_USE_GLOBAL_ENDPOINT = Parameter.builder()

156

.type(ParameterType.BOOLEAN)

157

.name("UseGlobalEndpoint")

158

.builtIn("AWS::S3::UseGlobalEndpoint")

159

.required(true)

160

.defaultValue(Value.booleanValue(false))

161

.documentation("Whether the global endpoint should be used, rather then the regional endpoint for us-east-1.")

162

.build();

163

```

164

165

### S3 Control Parameters

166

167

#### S3 Control Use ARN Region Parameter

168

```java { .api }

169

/**

170

* S3Control-specific parameter for ARN region usage. MUST only be used by S3Control rules.

171

*/

172

public static final Parameter S3_CONTROL_USE_ARN_REGION = Parameter.builder()

173

.type(ParameterType.BOOLEAN)

174

.name("UseArnRegion")

175

.builtIn("AWS::S3Control::UseArnRegion")

176

.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.")

177

.build();

178

```

179

180

### STS Parameters

181

182

#### STS Use Global Endpoint Parameter

183

```java { .api }

184

/**

185

* STS-specific parameter for global endpoint usage. MUST only be used by STS rules.

186

*/

187

public static final Parameter STS_USE_GLOBAL_ENDPOINT = Parameter.builder()

188

.type(ParameterType.BOOLEAN)

189

.name("UseGlobalEndpoint")

190

.builtIn("AWS::STS::UseGlobalEndpoint")

191

.required(true)

192

.defaultValue(Value.booleanValue(false))

193

.documentation("Whether the global endpoint should be used, rather then the regional endpoint for us-east-1.")

194

.build();

195

```

196

197

**Usage Examples:**

198

199

```java

200

import software.amazon.smithy.rulesengine.language.syntax.parameters.Parameter;

201

import software.amazon.smithy.rulesengine.aws.language.functions.AwsBuiltIns;

202

203

// Access AWS built-in parameters

204

Parameter regionParam = AwsBuiltIns.REGION;

205

Parameter dualStackParam = AwsBuiltIns.DUALSTACK;

206

Parameter fipsParam = AwsBuiltIns.FIPS;

207

208

// These parameters are automatically available in endpoint rules

209

// when using the AwsRuleSetExtension

210

211

// Example parameter usage in rule expressions:

212

// - Built-in name: "AWS::Region"

213

// - Parameter name: "Region"

214

// - Type: STRING

215

// - Required: varies by parameter

216

```

217

218

## Parameter Categories

219

220

### Universal AWS Parameters

221

- `REGION` - AWS region for request routing

222

- `DUALSTACK` - Enable IPv4/IPv6 dual-stack endpoints

223

- `FIPS` - Require FIPS-compliant endpoints

224

225

### Authentication Parameters

226

- `ACCOUNT_ID` - AWS account identifier

227

- `ACCOUNT_ID_ENDPOINT_MODE` - Account-specific endpoint mode

228

- `CREDENTIAL_SCOPE` - Credential scoping information

229

230

### Service-Specific Parameters

231

- **S3**: Accelerate, MRAP, path-style, ARN region, global endpoint

232

- **S3 Control**: ARN region usage

233

- **STS**: Global endpoint preference

234

235

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