| 1 | { |
| 2 | "parameters": { |
| 3 | "Region": { |
| 4 | "type": "string", |
| 5 | "builtIn": "AWS::Region", |
| 6 | "required": true |
| 7 | }, |
| 8 | "PropertyOne": { |
| 9 | "type": "boolean" |
| 10 | }, |
| 11 | "PropertyTwo": { |
| 12 | "type": "string" |
| 13 | }, |
| 14 | "PropertyThree": { |
| 15 | "type": "boolean" |
| 16 | } |
| 17 | }, |
| 18 | "rules": [ |
| 19 | { |
| 20 | "documentation": "base rule", |
| 21 | "conditions": [ |
| 22 | { |
| 23 | "fn": "aws.partition", |
| 24 | "argv": [ |
| 25 | { |
| 26 | "ref": "Region" |
| 27 | } |
| 28 | ], |
| 29 | "assign": "PartResult" |
| 30 | } |
| 31 | ], |
| 32 | "rules": [ |
| 33 | { |
| 34 | "documentation": "the AWS partition", |
| 35 | "conditions": [ |
| 36 | { |
| 37 | "fn": "stringEquals", |
| 38 | "argv": [ |
| 39 | "aws", |
| 40 | { |
| 41 | "fn": "getAttr", |
| 42 | "argv": [ |
| 43 | { |
| 44 | "ref": "PartResult" |
| 45 | }, |
| 46 | "name" |
| 47 | ] |
| 48 | } |
| 49 | ] |
| 50 | } |
| 51 | ], |
| 52 | "endpoint": { |
| 53 | "url": "https://aws-partition.{Region}.{PartResult#dnsSuffix}", |
| 54 | "properties": { |
| 55 | "authSchemes": [ |
| 56 | { |
| 57 | "name": "sigv4", |
| 58 | "signingName": "serviceName", |
| 59 | "signingRegion": "{Region}" |
| 60 | } |
| 61 | ], |
| 62 | "meta": { |
| 63 | "baseSuffix": "{PartResult#dnsSuffix}", |
| 64 | "dualStackSuffix": "{PartResult#dualStackDnsSuffix}" |
| 65 | } |
| 66 | } |
| 67 | }, |
| 68 | "type": "endpoint" |
| 69 | }, |
| 70 | { |
| 71 | "documentation": "the other partitions", |
| 72 | "conditions": [], |
| 73 | "endpoint": { |
| 74 | "url": "https://{PartResult#name}.{Region}.{PartResult#dnsSuffix}", |
| 75 | "properties": { |
| 76 | "authSchemes": [ |
| 77 | { |
| 78 | "name": "sigv4", |
| 79 | "signingName": "serviceName", |
| 80 | "signingRegion": "{Region}" |
| 81 | } |
| 82 | ], |
| 83 | "meta": { |
| 84 | "baseSuffix": "{PartResult#dnsSuffix}", |
| 85 | "dualStackSuffix": "{PartResult#dualStackDnsSuffix}" |
| 86 | } |
| 87 | } |
| 88 | }, |
| 89 | "type": "endpoint" |
| 90 | }, |
| 91 | { |
| 92 | "conditions": [], |
| 93 | "error": "no rules matched", |
| 94 | "type": "error" |
| 95 | } |
| 96 | ], |
| 97 | "type": "tree" |
| 98 | } |
| 99 | ], |
| 100 | "version": "1.3" |
| 101 | } |