1{ 2 "version": "1.3", 3 "parameters": { 4 "Region": { 5 "builtIn": "AWS::Region", 6 "required": true, 7 "documentation": "The AWS region used to dispatch the request.", 8 "type": "String" 9 }, 10 "UseDualStack": { 11 "builtIn": "AWS::UseDualStack", 12 "required": true, 13 "default": false, 14 "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", 15 "type": "Boolean" 16 }, 17 "UseFIPS": { 18 "builtIn": "AWS::UseFIPS", 19 "required": true, 20 "default": false, 21 "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.", 22 "type": "Boolean" 23 }, 24 "Endpoint": { 25 "builtIn": "SDK::Endpoint", 26 "required": false, 27 "documentation": "Override the endpoint used to send this request", 28 "type": "String" 29 } 30 }, 31 "rules": [ 32 { 33 "conditions": [ 34 { 35 "fn": "aws.partition", 36 "argv": [ 37 { 38 "ref": "Region" 39 } 40 ], 41 "assign": "PartitionResult" 42 } 43 ], 44 "type": "tree", 45 "rules": [ 46 { 47 "conditions": [ 48 { 49 "fn": "isSet", 50 "argv": [ 51 { 52 "ref": "Endpoint" 53 } 54 ] 55 }, 56 { 57 "fn": "parseURL", 58 "argv": [ 59 { 60 "ref": "Endpoint" 61 } 62 ], 63 "assign": "url" 64 } 65 ], 66 "type": "tree", 67 "rules": [ 68 { 69 "conditions": [ 70 { 71 "fn": "booleanEquals", 72 "argv": [ 73 { 74 "ref": "UseFIPS" 75 }, 76 true 77 ] 78 } 79 ], 80 "error": "Invalid Configuration: FIPS and custom endpoint are not supported", 81 "type": "error" 82 }, 83 { 84 "conditions": [], 85 "type": "tree", 86 "rules": [ 87 { 88 "conditions": [ 89 { 90 "fn": "booleanEquals", 91 "argv": [ 92 { 93 "ref": "UseDualStack" 94 }, 95 true 96 ] 97 } 98 ], 99 "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", 100 "type": "error" 101 }, 102 { 103 "conditions": [], 104 "endpoint": { 105 "url": { 106 "ref": "Endpoint" 107 }, 108 "properties": { 109 "authSchemes": [ 110 { 111 "name": "sigv4", 112 "signingRegion": "{Region}", 113 "signingName": "tostring" 114 } 115 ] 116 }, 117 "headers": {} 118 }, 119 "type": "endpoint" 120 } 121 ] 122 } 123 ] 124 }, 125 { 126 "conditions": [ 127 { 128 "fn": "booleanEquals", 129 "argv": [ 130 { 131 "ref": "UseFIPS" 132 }, 133 true 134 ] 135 }, 136 { 137 "fn": "booleanEquals", 138 "argv": [ 139 { 140 "ref": "UseDualStack" 141 }, 142 true 143 ] 144 } 145 ], 146 "type": "tree", 147 "rules": [ 148 { 149 "conditions": [ 150 { 151 "fn": "booleanEquals", 152 "argv": [ 153 true, 154 { 155 "fn": "getAttr", 156 "argv": [ 157 { 158 "ref": "PartitionResult" 159 }, 160 "supportsFIPS" 161 ] 162 } 163 ] 164 }, 165 { 166 "fn": "booleanEquals", 167 "argv": [ 168 true, 169 { 170 "fn": "getAttr", 171 "argv": [ 172 { 173 "ref": "PartitionResult" 174 }, 175 "supportsDualStack" 176 ] 177 } 178 ] 179 } 180 ], 181 "type": "tree", 182 "rules": [ 183 { 184 "conditions": [], 185 "endpoint": { 186 "url": "https://tostring-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", 187 "properties": { 188 "authSchemes": [ 189 { 190 "name": "sigv4", 191 "signingRegion": "{Region}", 192 "signingName": "tostring" 193 } 194 ] 195 }, 196 "headers": {} 197 }, 198 "type": "endpoint" 199 } 200 ] 201 }, 202 { 203 "conditions": [], 204 "error": "FIPS and DualStack are enabled, but this partition does not support one or both", 205 "type": "error" 206 } 207 ] 208 }, 209 { 210 "conditions": [ 211 { 212 "fn": "booleanEquals", 213 "argv": [ 214 { 215 "ref": "UseFIPS" 216 }, 217 true 218 ] 219 } 220 ], 221 "type": "tree", 222 "rules": [ 223 { 224 "conditions": [ 225 { 226 "fn": "booleanEquals", 227 "argv": [ 228 true, 229 { 230 "fn": "getAttr", 231 "argv": [ 232 { 233 "ref": "PartitionResult" 234 }, 235 "supportsFIPS" 236 ] 237 } 238 ] 239 } 240 ], 241 "type": "tree", 242 "rules": [ 243 { 244 "conditions": [], 245 "type": "tree", 246 "rules": [ 247 { 248 "conditions": [], 249 "endpoint": { 250 "url": "https://tostring-fips.{Region}.{PartitionResult#dnsSuffix}", 251 "properties": { 252 "authSchemes": [ 253 { 254 "name": "sigv4", 255 "signingRegion": "{Region}", 256 "signingName": "tostring" 257 } 258 ] 259 }, 260 "headers": {} 261 }, 262 "type": "endpoint" 263 } 264 ] 265 } 266 ] 267 }, 268 { 269 "conditions": [], 270 "error": "FIPS is enabled but this partition does not support FIPS", 271 "type": "error" 272 } 273 ] 274 }, 275 { 276 "conditions": [ 277 { 278 "fn": "booleanEquals", 279 "argv": [ 280 { 281 "ref": "UseDualStack" 282 }, 283 true 284 ] 285 } 286 ], 287 "type": "tree", 288 "rules": [ 289 { 290 "conditions": [ 291 { 292 "fn": "booleanEquals", 293 "argv": [ 294 true, 295 { 296 "fn": "getAttr", 297 "argv": [ 298 { 299 "ref": "PartitionResult" 300 }, 301 "supportsDualStack" 302 ] 303 } 304 ] 305 } 306 ], 307 "type": "tree", 308 "rules": [ 309 { 310 "conditions": [], 311 "endpoint": { 312 "url": "https://tostring.{Region}.{PartitionResult#dualStackDnsSuffix}", 313 "properties": { 314 "authSchemes": [ 315 { 316 "name": "sigv4", 317 "signingRegion": "{Region}", 318 "signingName": "tostring" 319 } 320 ] 321 }, 322 "headers": {} 323 }, 324 "type": "endpoint" 325 } 326 ] 327 }, 328 { 329 "conditions": [], 330 "error": "DualStack is enabled but this partition does not support DualStack", 331 "type": "error" 332 } 333 ] 334 }, 335 { 336 "conditions": [], 337 "endpoint": { 338 "url": "https://tostring.{Region}.{PartitionResult#dnsSuffix}", 339 "properties": { 340 "authSchemes": [ 341 { 342 "name": "sigv4", 343 "signingRegion": "{Region}", 344 "signingName": "tostring" 345 } 346 ] 347 }, 348 "headers": {} 349 }, 350 "type": "endpoint" 351 } 352 ] 353 } 354 ] 355}