|
300 | 300 | }
|
301 | 301 | }
|
302 | 302 | }
|
| 303 | + }, |
| 304 | + "post": { |
| 305 | + "tags": [ |
| 306 | + "basins" |
| 307 | + ], |
| 308 | + "summary": "Create a basin.", |
| 309 | + "operationId": "create_basin", |
| 310 | + "requestBody": { |
| 311 | + "content": { |
| 312 | + "application/json": { |
| 313 | + "schema": { |
| 314 | + "$ref": "#/components/schemas/CreateBasinRequest" |
| 315 | + } |
| 316 | + } |
| 317 | + }, |
| 318 | + "required": true |
| 319 | + }, |
| 320 | + "responses": { |
| 321 | + "201": { |
| 322 | + "description": "", |
| 323 | + "content": { |
| 324 | + "application/json": { |
| 325 | + "schema": { |
| 326 | + "$ref": "#/components/schemas/BasinInfo" |
| 327 | + } |
| 328 | + } |
| 329 | + } |
| 330 | + }, |
| 331 | + "400": { |
| 332 | + "description": "", |
| 333 | + "content": { |
| 334 | + "application/json": { |
| 335 | + "schema": { |
| 336 | + "$ref": "#/components/schemas/ErrorResponse" |
| 337 | + } |
| 338 | + } |
| 339 | + } |
| 340 | + }, |
| 341 | + "401": { |
| 342 | + "description": "", |
| 343 | + "content": { |
| 344 | + "application/json": { |
| 345 | + "schema": { |
| 346 | + "$ref": "#/components/schemas/ErrorResponse" |
| 347 | + } |
| 348 | + } |
| 349 | + } |
| 350 | + }, |
| 351 | + "500": { |
| 352 | + "description": "", |
| 353 | + "content": { |
| 354 | + "application/json": { |
| 355 | + "schema": { |
| 356 | + "$ref": "#/components/schemas/ErrorResponse" |
| 357 | + } |
| 358 | + } |
| 359 | + } |
| 360 | + } |
| 361 | + } |
303 | 362 | }
|
304 | 363 | },
|
305 | 364 | "/basins/{basin}": {
|
|
373 | 432 | "summary": "Create or reconfigure a basin.",
|
374 | 433 | "operationId": "create_or_reconfigure_basin",
|
375 | 434 | "parameters": [
|
| 435 | + { |
| 436 | + "name": "s2-request-token", |
| 437 | + "in": "header", |
| 438 | + "description": "Provide a client request token header for idempotent retry behaviour.", |
| 439 | + "required": false, |
| 440 | + "schema": { |
| 441 | + "type": "string" |
| 442 | + } |
| 443 | + }, |
376 | 444 | {
|
377 | 445 | "name": "basin",
|
378 | 446 | "in": "path",
|
|
384 | 452 | "minimum": 8,
|
385 | 453 | "pattern": "^(?!-)[a-z0-9-]{8,48}(?<!-)$"
|
386 | 454 | }
|
387 |
| - }, |
388 |
| - { |
389 |
| - "name": "s2-request-token", |
390 |
| - "in": "header", |
391 |
| - "description": "Provide a client request token header for idempotent retry behaviour.", |
392 |
| - "required": false, |
393 |
| - "schema": { |
394 |
| - "type": "string" |
395 |
| - } |
396 | 455 | }
|
397 | 456 | ],
|
398 | 457 | "requestBody": {
|
399 | 458 | "content": {
|
400 | 459 | "application/json": {
|
401 | 460 | "schema": {
|
402 |
| - "$ref": "#/components/schemas/CreateBasinRequest" |
| 461 | + "oneOf": [ |
| 462 | + { |
| 463 | + "type": "null" |
| 464 | + }, |
| 465 | + { |
| 466 | + "$ref": "#/components/schemas/CreateOrReconfigureBasinRequest" |
| 467 | + } |
| 468 | + ] |
403 | 469 | }
|
404 | 470 | }
|
405 |
| - }, |
406 |
| - "required": true |
| 471 | + } |
407 | 472 | },
|
408 | 473 | "responses": {
|
409 | 474 | "201": {
|
|
676 | 741 | }
|
677 | 742 | }
|
678 | 743 | ]
|
| 744 | + }, |
| 745 | + "post": { |
| 746 | + "tags": [ |
| 747 | + "streams" |
| 748 | + ], |
| 749 | + "summary": "Create a stream.", |
| 750 | + "operationId": "create_stream", |
| 751 | + "requestBody": { |
| 752 | + "content": { |
| 753 | + "application/json": { |
| 754 | + "schema": { |
| 755 | + "$ref": "#/components/schemas/CreateStreamRequest" |
| 756 | + } |
| 757 | + } |
| 758 | + }, |
| 759 | + "required": true |
| 760 | + }, |
| 761 | + "responses": { |
| 762 | + "201": { |
| 763 | + "description": "", |
| 764 | + "content": { |
| 765 | + "application/json": { |
| 766 | + "schema": { |
| 767 | + "$ref": "#/components/schemas/StreamInfo" |
| 768 | + } |
| 769 | + } |
| 770 | + } |
| 771 | + }, |
| 772 | + "400": { |
| 773 | + "description": "", |
| 774 | + "content": { |
| 775 | + "application/json": { |
| 776 | + "schema": { |
| 777 | + "$ref": "#/components/schemas/ErrorResponse" |
| 778 | + } |
| 779 | + } |
| 780 | + } |
| 781 | + }, |
| 782 | + "401": { |
| 783 | + "description": "", |
| 784 | + "content": { |
| 785 | + "application/json": { |
| 786 | + "schema": { |
| 787 | + "$ref": "#/components/schemas/ErrorResponse" |
| 788 | + } |
| 789 | + } |
| 790 | + } |
| 791 | + }, |
| 792 | + "500": { |
| 793 | + "description": "", |
| 794 | + "content": { |
| 795 | + "application/json": { |
| 796 | + "schema": { |
| 797 | + "$ref": "#/components/schemas/ErrorResponse" |
| 798 | + } |
| 799 | + } |
| 800 | + } |
| 801 | + } |
| 802 | + }, |
| 803 | + "servers": [ |
| 804 | + { |
| 805 | + "url": "https://{basin}.b.aws.s2.dev/v1", |
| 806 | + "description": "Endpoint for the basin", |
| 807 | + "variables": { |
| 808 | + "basin": { |
| 809 | + "default": "", |
| 810 | + "description": "Basin name" |
| 811 | + } |
| 812 | + } |
| 813 | + } |
| 814 | + ] |
679 | 815 | }
|
680 | 816 | },
|
681 | 817 | "/streams/{stream}": {
|
|
751 | 887 | }
|
752 | 888 | ]
|
753 | 889 | },
|
754 |
| - "post": { |
| 890 | + "put": { |
755 | 891 | "tags": [
|
756 | 892 | "streams"
|
757 | 893 | ],
|
|
781 | 917 | "content": {
|
782 | 918 | "application/json": {
|
783 | 919 | "schema": {
|
784 |
| - "$ref": "#/components/schemas/StreamConfig" |
| 920 | + "oneOf": [ |
| 921 | + { |
| 922 | + "type": "null" |
| 923 | + }, |
| 924 | + { |
| 925 | + "$ref": "#/components/schemas/StreamConfig" |
| 926 | + } |
| 927 | + ] |
785 | 928 | }
|
786 | 929 | }
|
787 |
| - }, |
788 |
| - "required": true |
| 930 | + } |
789 | 931 | },
|
790 | 932 | "responses": {
|
791 | 933 | "201": {
|
|
1282 | 1424 | },
|
1283 | 1425 | "CreateBasinRequest": {
|
1284 | 1426 | "type": "object",
|
| 1427 | + "required": [ |
| 1428 | + "basin" |
| 1429 | + ], |
1285 | 1430 | "properties": {
|
| 1431 | + "basin": { |
| 1432 | + "type": "string", |
| 1433 | + "description": "Basin name." |
| 1434 | + }, |
1286 | 1435 | "config": {
|
1287 | 1436 | "oneOf": [
|
1288 | 1437 | {
|
|
1305 | 1454 | }
|
1306 | 1455 | }
|
1307 | 1456 | },
|
| 1457 | + "CreateOrReconfigureBasinRequest": { |
| 1458 | + "type": "object", |
| 1459 | + "properties": { |
| 1460 | + "config": { |
| 1461 | + "oneOf": [ |
| 1462 | + { |
| 1463 | + "type": "null" |
| 1464 | + }, |
| 1465 | + { |
| 1466 | + "$ref": "#/components/schemas/BasinConfig", |
| 1467 | + "description": "Basin configuration." |
| 1468 | + } |
| 1469 | + ] |
| 1470 | + }, |
| 1471 | + "scope": { |
| 1472 | + "oneOf": [ |
| 1473 | + { |
| 1474 | + "$ref": "#/components/schemas/BasinScope", |
| 1475 | + "description": "Basin scope." |
| 1476 | + } |
| 1477 | + ], |
| 1478 | + "default": "aws:us-east-1" |
| 1479 | + } |
| 1480 | + } |
| 1481 | + }, |
| 1482 | + "CreateStreamRequest": { |
| 1483 | + "type": "object", |
| 1484 | + "required": [ |
| 1485 | + "stream", |
| 1486 | + "timestamping" |
| 1487 | + ], |
| 1488 | + "properties": { |
| 1489 | + "retention_policy": { |
| 1490 | + "oneOf": [ |
| 1491 | + { |
| 1492 | + "type": "null" |
| 1493 | + }, |
| 1494 | + { |
| 1495 | + "$ref": "#/components/schemas/RetentionPolicy", |
| 1496 | + "description": "Retention policy for the stream.\nIf unspecified, the default is to retain records for 7 days." |
| 1497 | + } |
| 1498 | + ] |
| 1499 | + }, |
| 1500 | + "storage_class": { |
| 1501 | + "oneOf": [ |
| 1502 | + { |
| 1503 | + "type": "null" |
| 1504 | + }, |
| 1505 | + { |
| 1506 | + "$ref": "#/components/schemas/StorageClass", |
| 1507 | + "description": "Storage class for recent writes." |
| 1508 | + } |
| 1509 | + ] |
| 1510 | + }, |
| 1511 | + "stream": { |
| 1512 | + "type": "string", |
| 1513 | + "description": "Stream name." |
| 1514 | + }, |
| 1515 | + "timestamping": { |
| 1516 | + "$ref": "#/components/schemas/TimestampingConfig", |
| 1517 | + "description": "Timestamping behavior." |
| 1518 | + } |
| 1519 | + } |
| 1520 | + }, |
1308 | 1521 | "ErrorResponse": {
|
1309 | 1522 | "type": "object",
|
1310 | 1523 | "required": [
|
|
0 commit comments