|
145 | 145 | "optimizer": { |
146 | 146 | "$ref": "#/components/schemas/Optimizer" |
147 | 147 | }, |
| 148 | + "redirects": { |
| 149 | + "$ref": "#/components/schemas/RedirectConfig" |
| 150 | + }, |
148 | 151 | "regions": { |
149 | 152 | "items": { |
150 | 153 | "$ref": "#/components/schemas/Region" |
|
232 | 235 | "optimizer": { |
233 | 236 | "$ref": "#/components/schemas/OptimizerPatch" |
234 | 237 | }, |
| 238 | + "redirects": { |
| 239 | + "$ref": "#/components/schemas/RedirectConfig" |
| 240 | + }, |
235 | 241 | "regions": { |
236 | 242 | "items": { |
237 | 243 | "$ref": "#/components/schemas/Region" |
|
314 | 320 | "optimizer": { |
315 | 321 | "$ref": "#/components/schemas/Optimizer" |
316 | 322 | }, |
| 323 | + "redirects": { |
| 324 | + "$ref": "#/components/schemas/RedirectConfig" |
| 325 | + }, |
317 | 326 | "regions": { |
318 | 327 | "description": "Define in which regions you would like your content to be cached.\n", |
319 | 328 | "items": { |
|
1221 | 1230 | ], |
1222 | 1231 | "type": "object" |
1223 | 1232 | }, |
| 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 | + }, |
1224 | 1263 | "Optimizer": { |
1225 | 1264 | "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", |
1226 | 1265 | "properties": { |
|
1372 | 1411 | ], |
1373 | 1412 | "type": "object" |
1374 | 1413 | }, |
| 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 | + }, |
1375 | 1478 | "Region": { |
1376 | 1479 | "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", |
1377 | 1480 | "enum": [ |
|
1403 | 1506 | "CUSTOM_DOMAIN_CNAME_MISSING", |
1404 | 1507 | "CUSTOM_DOMAIN_ALREADY_IN_USE", |
1405 | 1508 | "PUBLIC_BETA_QUOTA_REACHED", |
1406 | | - "LOG_SINK_INSTANCE_UNAVAILABLE" |
| 1509 | + "LOG_SINK_INSTANCE_UNAVAILABLE", |
| 1510 | + "EXTERNAL_QUOTA_REACHED" |
1407 | 1511 | ], |
1408 | 1512 | "minLength": 1, |
1409 | 1513 | "type": "string" |
|
0 commit comments