Debian Codegraph @

crt/aws-c-sdkutils/tests/resources/valid-rules/parse-url.json

raw symbols SCIP
1 {
2 "version": "1.3",
3 "parameters": {
4 "Region": {
5 "type": "string",
6 "builtIn": "AWS::Region"
7 },
8 "Endpoint": {
9 "type": "string"
10 }
11 },
12 "rules": [
13 {
14 "documentation": "endpoint is set and is a valid URL",
15 "conditions": [
16 {
17 "fn": "isSet",
18 "argv": [
19 {
20 "ref": "Endpoint"
21 }
22 ]
23 },
24 {
25 "fn": "parseURL",
26 "argv": [
27 "{Endpoint}"
28 ],
29 "assign": "url"
30 }
31 ],
32 "rules": [
33 {
34 "conditions": [
35 {
36 "fn": "booleanEquals",
37 "argv": [
38 {
39 "fn": "getAttr",
40 "argv": [
41 {
42 "ref": "url"
43 },
44 "isIp"
45 ]
46 },
47 true
48 ]
49 }
50 ],
51 "endpoint": {
52 "url": "{url#scheme}://{url#authority}{url#normalizedPath}is-ip-addr"
53 },
54 "type": "endpoint"
55 },
56 {
57 "conditions": [
58 {
59 "fn": "stringEquals",
60 "argv": [
61 "{url#path}",
62 "/port"
63 ]
64 }
65 ],
66 "endpoint": {
67 "url": "{url#scheme}://{url#authority}/uri-with-port"
68 },
69 "type": "endpoint"
70 },
71 {
72 "conditions": [
73 {
74 "fn": "stringEquals",
75 "argv": [
76 "{url#normalizedPath}",
77 "/"
78 ]
79 }
80 ],
81 "endpoint": {
82 "url": "https://{url#scheme}-{url#authority}-nopath.example.com"
83 },
84 "type": "endpoint"
85 },
86 {
87 "conditions": [],
88 "endpoint": {
89 "url": "https://{url#scheme}-{url#authority}.example.com/path-is{url#path}"
90 },
91 "type": "endpoint"
92 }
93 ],
94 "type": "tree"
95 },
96 {
97 "error": "endpoint was invalid",
98 "conditions": [],
99 "type": "error"
100 }
101 ]
102 }