Skip to content

Commit 43ed99f

Browse files
OAS Update
1 parent ff551d4 commit 43ed99f

File tree

1 file changed

+105
-1
lines changed

1 file changed

+105
-1
lines changed

services/cdn/v1/cdn.json

Lines changed: 105 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@
145145
"optimizer": {
146146
"$ref": "#/components/schemas/Optimizer"
147147
},
148+
"redirects": {
149+
"$ref": "#/components/schemas/RedirectConfig"
150+
},
148151
"regions": {
149152
"items": {
150153
"$ref": "#/components/schemas/Region"
@@ -232,6 +235,9 @@
232235
"optimizer": {
233236
"$ref": "#/components/schemas/OptimizerPatch"
234237
},
238+
"redirects": {
239+
"$ref": "#/components/schemas/RedirectConfig"
240+
},
235241
"regions": {
236242
"items": {
237243
"$ref": "#/components/schemas/Region"
@@ -314,6 +320,9 @@
314320
"optimizer": {
315321
"$ref": "#/components/schemas/Optimizer"
316322
},
323+
"redirects": {
324+
"$ref": "#/components/schemas/RedirectConfig"
325+
},
317326
"regions": {
318327
"description": "Define in which regions you would like your content to be cached.\n",
319328
"items": {
@@ -1221,6 +1230,36 @@
12211230
],
12221231
"type": "object"
12231232
},
1233+
"MatchCondition": {
1234+
"default": "ANY",
1235+
"description": "Defines how multiple matchers within this rule are combined (ALL, ANY, NONE). Defaults to ANY.",
1236+
"enum": [
1237+
"ANY",
1238+
"ALL",
1239+
"NONE"
1240+
],
1241+
"type": "string"
1242+
},
1243+
"Matcher": {
1244+
"description": "A matcher containing a list of string values to compare against the request path.",
1245+
"properties": {
1246+
"valueMatchCondition": {
1247+
"$ref": "#/components/schemas/MatchCondition"
1248+
},
1249+
"values": {
1250+
"description": "A list of glob patterns to match against the request path. At least one value is required. Examples: \"/shop/*\" or \"*/img/*\"",
1251+
"items": {
1252+
"type": "string"
1253+
},
1254+
"minItems": 1,
1255+
"type": "array"
1256+
}
1257+
},
1258+
"required": [
1259+
"values"
1260+
],
1261+
"type": "object"
1262+
},
12241263
"Optimizer": {
12251264
"description": "Optimizer is paid feature, a real-time on the fly image manipulation and optimization service that automatically optimizes your images for faster image delivery.\n",
12261265
"properties": {
@@ -1372,6 +1411,70 @@
13721411
],
13731412
"type": "object"
13741413
},
1414+
"RedirectConfig": {
1415+
"description": "A wrapper for a list of redirect rules that allows for redirect settings on a distribution.",
1416+
"properties": {
1417+
"rules": {
1418+
"description": "A list of redirect rules. The order of rules matters for evaluation.",
1419+
"items": {
1420+
"$ref": "#/components/schemas/RedirectRule"
1421+
},
1422+
"type": "array"
1423+
}
1424+
},
1425+
"type": "object"
1426+
},
1427+
"RedirectRule": {
1428+
"description": "A single redirect rule defining a source pattern and a target URL.",
1429+
"properties": {
1430+
"description": {
1431+
"description": "An optional description for the redirect rule.",
1432+
"type": "string"
1433+
},
1434+
"enabled": {
1435+
"default": true,
1436+
"description": "A toggle to enable or disable the redirect rule.",
1437+
"type": "boolean"
1438+
},
1439+
"matchers": {
1440+
"description": "A list of matchers that define when this rule should apply. At least one matcher is required.",
1441+
"items": {
1442+
"$ref": "#/components/schemas/Matcher"
1443+
},
1444+
"minItems": 1,
1445+
"type": "array"
1446+
},
1447+
"ruleMatchCondition": {
1448+
"$ref": "#/components/schemas/MatchCondition"
1449+
},
1450+
"statusCode": {
1451+
"description": "The HTTP status code for the redirect. Must be one of 301, 302, 303, 307, or 308.",
1452+
"enum": [
1453+
301,
1454+
302,
1455+
303,
1456+
307,
1457+
308
1458+
],
1459+
"format": "int32",
1460+
"maximum": 399,
1461+
"minimum": 300,
1462+
"type": "integer",
1463+
"x-go-type": "int32"
1464+
},
1465+
"targetUrl": {
1466+
"description": "The target URL to redirect to. Must be a valid URI.",
1467+
"format": "uri",
1468+
"type": "string"
1469+
}
1470+
},
1471+
"required": [
1472+
"targetUrl",
1473+
"statusCode",
1474+
"matchers"
1475+
],
1476+
"type": "object"
1477+
},
13751478
"Region": {
13761479
"description": "The following regions exist:\n- `EU` - Europe\n- `US` - United States / North America\n- `AF` - Africa\n- `SA` - South America\n- `ASIA` - Asia and Oceania\n",
13771480
"enum": [
@@ -1403,7 +1506,8 @@
14031506
"CUSTOM_DOMAIN_CNAME_MISSING",
14041507
"CUSTOM_DOMAIN_ALREADY_IN_USE",
14051508
"PUBLIC_BETA_QUOTA_REACHED",
1406-
"LOG_SINK_INSTANCE_UNAVAILABLE"
1509+
"LOG_SINK_INSTANCE_UNAVAILABLE",
1510+
"EXTERNAL_QUOTA_REACHED"
14071511
],
14081512
"minLength": 1,
14091513
"type": "string"

0 commit comments

Comments
 (0)