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