1{ 2 "testCases": [ 3 { 4 "documentation": "For region aws-global with FIPS disabled and DualStack disabled", 5 "expect": { 6 "endpoint": { 7 "properties": { 8 "authSchemes": [ 9 { 10 "name": "sigv4", 11 "signingName": "cloudfront", 12 "signingRegion": "us-east-1" 13 } 14 ] 15 }, 16 "url": "https://cloudfront.amazonaws.com" 17 } 18 }, 19 "params": { 20 "Region": "aws-global", 21 "UseFIPS": false, 22 "UseDualStack": false 23 } 24 }, 25 { 26 "documentation": "For region aws-global with FIPS enabled and DualStack disabled", 27 "expect": { 28 "endpoint": { 29 "properties": { 30 "authSchemes": [ 31 { 32 "name": "sigv4", 33 "signingName": "cloudfront", 34 "signingRegion": "us-east-1" 35 } 36 ] 37 }, 38 "url": "https://cloudfront-fips.amazonaws.com" 39 } 40 }, 41 "params": { 42 "Region": "aws-global", 43 "UseFIPS": true, 44 "UseDualStack": false 45 } 46 }, 47 { 48 "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", 49 "expect": { 50 "endpoint": { 51 "url": "https://cloudfront-fips.us-east-1.api.aws" 52 } 53 }, 54 "params": { 55 "Region": "us-east-1", 56 "UseFIPS": true, 57 "UseDualStack": true 58 } 59 }, 60 { 61 "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", 62 "expect": { 63 "endpoint": { 64 "properties": { 65 "authSchemes": [ 66 { 67 "name": "sigv4", 68 "signingName": "cloudfront", 69 "signingRegion": "us-east-1" 70 } 71 ] 72 }, 73 "url": "https://cloudfront-fips.amazonaws.com" 74 } 75 }, 76 "params": { 77 "Region": "us-east-1", 78 "UseFIPS": true, 79 "UseDualStack": false 80 } 81 }, 82 { 83 "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", 84 "expect": { 85 "endpoint": { 86 "url": "https://cloudfront.us-east-1.api.aws" 87 } 88 }, 89 "params": { 90 "Region": "us-east-1", 91 "UseFIPS": false, 92 "UseDualStack": true 93 } 94 }, 95 { 96 "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", 97 "expect": { 98 "endpoint": { 99 "properties": { 100 "authSchemes": [ 101 { 102 "name": "sigv4", 103 "signingName": "cloudfront", 104 "signingRegion": "us-east-1" 105 } 106 ] 107 }, 108 "url": "https://cloudfront.amazonaws.com" 109 } 110 }, 111 "params": { 112 "Region": "us-east-1", 113 "UseFIPS": false, 114 "UseDualStack": false 115 } 116 }, 117 { 118 "documentation": "For region aws-cn-global with FIPS disabled and DualStack disabled", 119 "expect": { 120 "endpoint": { 121 "properties": { 122 "authSchemes": [ 123 { 124 "name": "sigv4", 125 "signingName": "cloudfront", 126 "signingRegion": "cn-northwest-1" 127 } 128 ] 129 }, 130 "url": "https://cloudfront.cn-northwest-1.amazonaws.com.cn" 131 } 132 }, 133 "params": { 134 "Region": "aws-cn-global", 135 "UseFIPS": false, 136 "UseDualStack": false 137 } 138 }, 139 { 140 "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", 141 "expect": { 142 "endpoint": { 143 "url": "https://cloudfront-fips.cn-north-1.api.amazonwebservices.com.cn" 144 } 145 }, 146 "params": { 147 "Region": "cn-north-1", 148 "UseFIPS": true, 149 "UseDualStack": true 150 } 151 }, 152 { 153 "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", 154 "expect": { 155 "endpoint": { 156 "url": "https://cloudfront-fips.cn-north-1.amazonaws.com.cn" 157 } 158 }, 159 "params": { 160 "Region": "cn-north-1", 161 "UseFIPS": true, 162 "UseDualStack": false 163 } 164 }, 165 { 166 "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", 167 "expect": { 168 "endpoint": { 169 "url": "https://cloudfront.cn-north-1.api.amazonwebservices.com.cn" 170 } 171 }, 172 "params": { 173 "Region": "cn-north-1", 174 "UseFIPS": false, 175 "UseDualStack": true 176 } 177 }, 178 { 179 "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", 180 "expect": { 181 "endpoint": { 182 "properties": { 183 "authSchemes": [ 184 { 185 "name": "sigv4", 186 "signingName": "cloudfront", 187 "signingRegion": "cn-northwest-1" 188 } 189 ] 190 }, 191 "url": "https://cloudfront.cn-northwest-1.amazonaws.com.cn" 192 } 193 }, 194 "params": { 195 "Region": "cn-north-1", 196 "UseFIPS": false, 197 "UseDualStack": false 198 } 199 }, 200 { 201 "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", 202 "expect": { 203 "endpoint": { 204 "url": "https://cloudfront-fips.us-gov-east-1.api.aws" 205 } 206 }, 207 "params": { 208 "Region": "us-gov-east-1", 209 "UseFIPS": true, 210 "UseDualStack": true 211 } 212 }, 213 { 214 "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", 215 "expect": { 216 "endpoint": { 217 "url": "https://cloudfront-fips.us-gov-east-1.amazonaws.com" 218 } 219 }, 220 "params": { 221 "Region": "us-gov-east-1", 222 "UseFIPS": true, 223 "UseDualStack": false 224 } 225 }, 226 { 227 "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", 228 "expect": { 229 "endpoint": { 230 "url": "https://cloudfront.us-gov-east-1.api.aws" 231 } 232 }, 233 "params": { 234 "Region": "us-gov-east-1", 235 "UseFIPS": false, 236 "UseDualStack": true 237 } 238 }, 239 { 240 "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", 241 "expect": { 242 "endpoint": { 243 "url": "https://cloudfront.us-gov-east-1.amazonaws.com" 244 } 245 }, 246 "params": { 247 "Region": "us-gov-east-1", 248 "UseFIPS": false, 249 "UseDualStack": false 250 } 251 }, 252 { 253 "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", 254 "expect": { 255 "error": "FIPS and DualStack are enabled, but this partition does not support one or both" 256 }, 257 "params": { 258 "Region": "us-iso-east-1", 259 "UseFIPS": true, 260 "UseDualStack": true 261 } 262 }, 263 { 264 "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", 265 "expect": { 266 "endpoint": { 267 "url": "https://cloudfront-fips.us-iso-east-1.c2s.ic.gov" 268 } 269 }, 270 "params": { 271 "Region": "us-iso-east-1", 272 "UseFIPS": true, 273 "UseDualStack": false 274 } 275 }, 276 { 277 "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", 278 "expect": { 279 "error": "DualStack is enabled but this partition does not support DualStack" 280 }, 281 "params": { 282 "Region": "us-iso-east-1", 283 "UseFIPS": false, 284 "UseDualStack": true 285 } 286 }, 287 { 288 "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", 289 "expect": { 290 "endpoint": { 291 "url": "https://cloudfront.us-iso-east-1.c2s.ic.gov" 292 } 293 }, 294 "params": { 295 "Region": "us-iso-east-1", 296 "UseFIPS": false, 297 "UseDualStack": false 298 } 299 }, 300 { 301 "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", 302 "expect": { 303 "error": "FIPS and DualStack are enabled, but this partition does not support one or both" 304 }, 305 "params": { 306 "Region": "us-isob-east-1", 307 "UseFIPS": true, 308 "UseDualStack": true 309 } 310 }, 311 { 312 "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", 313 "expect": { 314 "endpoint": { 315 "url": "https://cloudfront-fips.us-isob-east-1.sc2s.sgov.gov" 316 } 317 }, 318 "params": { 319 "Region": "us-isob-east-1", 320 "UseFIPS": true, 321 "UseDualStack": false 322 } 323 }, 324 { 325 "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", 326 "expect": { 327 "error": "DualStack is enabled but this partition does not support DualStack" 328 }, 329 "params": { 330 "Region": "us-isob-east-1", 331 "UseFIPS": false, 332 "UseDualStack": true 333 } 334 }, 335 { 336 "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", 337 "expect": { 338 "endpoint": { 339 "url": "https://cloudfront.us-isob-east-1.sc2s.sgov.gov" 340 } 341 }, 342 "params": { 343 "Region": "us-isob-east-1", 344 "UseFIPS": false, 345 "UseDualStack": false 346 } 347 }, 348 { 349 "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", 350 "expect": { 351 "endpoint": { 352 "url": "https://example.com" 353 } 354 }, 355 "params": { 356 "Region": "us-east-1", 357 "UseFIPS": false, 358 "UseDualStack": false, 359 "Endpoint": "https://example.com" 360 } 361 }, 362 { 363 "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", 364 "expect": { 365 "endpoint": { 366 "url": "https://example.com" 367 } 368 }, 369 "params": { 370 "UseFIPS": false, 371 "UseDualStack": false, 372 "Endpoint": "https://example.com" 373 } 374 }, 375 { 376 "documentation": "For custom endpoint with fips enabled and dualstack disabled", 377 "expect": { 378 "error": "Invalid Configuration: FIPS and custom endpoint are not supported" 379 }, 380 "params": { 381 "Region": "us-east-1", 382 "UseFIPS": true, 383 "UseDualStack": false, 384 "Endpoint": "https://example.com" 385 } 386 }, 387 { 388 "documentation": "For custom endpoint with fips disabled and dualstack enabled", 389 "expect": { 390 "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" 391 }, 392 "params": { 393 "Region": "us-east-1", 394 "UseFIPS": false, 395 "UseDualStack": true, 396 "Endpoint": "https://example.com" 397 } 398 }, 399 { 400 "documentation": "Missing region", 401 "expect": { 402 "error": "Invalid Configuration: Missing Region" 403 } 404 } 405 ], 406 "version": "1.0" 407}