|
27 | 27 | } |
28 | 28 | }, |
29 | 29 | "schemas": { |
| 30 | + "Acl": { |
| 31 | + "description": "A list of CIDR network addresses that are allowed to access the instance.", |
| 32 | + "items": { |
| 33 | + "example": "192.168.100.0/24", |
| 34 | + "format": "cidr", |
| 35 | + "type": "string" |
| 36 | + }, |
| 37 | + "maxItems": 50, |
| 38 | + "type": "array" |
| 39 | + }, |
30 | 40 | "CreateInstancePayload": { |
31 | 41 | "description": "Request a STACKIT Git instance to be created with these properties.", |
32 | 42 | "properties": { |
33 | 43 | "acl": { |
34 | | - "description": "Restricted ACL for instance access.", |
35 | | - "items": { |
36 | | - "type": "string" |
37 | | - }, |
38 | | - "maxItems": 5, |
39 | | - "type": "array" |
| 44 | + "$ref": "#/components/schemas/Acl" |
40 | 45 | }, |
41 | 46 | "flavor": { |
42 | 47 | "description": "Desired instance flavor. Must be one of the defined enum values", |
|
232 | 237 | "instances" |
233 | 238 | ] |
234 | 239 | }, |
| 240 | + "PatchOperation": { |
| 241 | + "description": "Request a STACKIT Git instance to be patch with these properties.", |
| 242 | + "properties": { |
| 243 | + "op": { |
| 244 | + "description": "The patch operation to perform.", |
| 245 | + "enum": [ |
| 246 | + "add", |
| 247 | + "remove" |
| 248 | + ], |
| 249 | + "type": "string" |
| 250 | + }, |
| 251 | + "path": { |
| 252 | + "description": "An RFC6901 JSON Pointer to the target location.", |
| 253 | + "example": "/acl", |
| 254 | + "type": "string" |
| 255 | + }, |
| 256 | + "value": { |
| 257 | + "description": "The value to be used for 'add' and 'remove' operations.", |
| 258 | + "example": "A new value", |
| 259 | + "type": "string" |
| 260 | + } |
| 261 | + }, |
| 262 | + "required": [ |
| 263 | + "op", |
| 264 | + "path" |
| 265 | + ], |
| 266 | + "type": "object" |
| 267 | + }, |
235 | 268 | "UUID": { |
236 | 269 | "description": "Universally Unique Identifier (UUID).", |
237 | 270 | "example": "d61a8564-c8dd-4ffb-bc15-143e7d0c85ed", |
|
588 | 621 | { |
589 | 622 | "$ref": "#/components/parameters/InstanceId" |
590 | 623 | } |
591 | | - ] |
| 624 | + ], |
| 625 | + "patch": { |
| 626 | + "description": "Patches the Instance.\n", |
| 627 | + "operationId": "PatchInstance", |
| 628 | + "requestBody": { |
| 629 | + "content": { |
| 630 | + "application/json-patch+json": { |
| 631 | + "schema": { |
| 632 | + "example": [ |
| 633 | + { |
| 634 | + "op": "remove", |
| 635 | + "path": "/acl", |
| 636 | + "value": "1.1.1.1/1" |
| 637 | + } |
| 638 | + ], |
| 639 | + "items": { |
| 640 | + "$ref": "#/components/schemas/PatchOperation" |
| 641 | + }, |
| 642 | + "type": "array" |
| 643 | + } |
| 644 | + } |
| 645 | + }, |
| 646 | + "required": true |
| 647 | + }, |
| 648 | + "responses": { |
| 649 | + "200": { |
| 650 | + "content": { |
| 651 | + "application/json": { |
| 652 | + "schema": { |
| 653 | + "$ref": "#/components/schemas/Instance" |
| 654 | + } |
| 655 | + } |
| 656 | + }, |
| 657 | + "description": "Instance updated." |
| 658 | + }, |
| 659 | + "202": { |
| 660 | + "description": "Instance was updated." |
| 661 | + }, |
| 662 | + "400": { |
| 663 | + "content": { |
| 664 | + "application/json": { |
| 665 | + "schema": { |
| 666 | + "$ref": "#/components/schemas/GenericErrorResponse" |
| 667 | + } |
| 668 | + } |
| 669 | + }, |
| 670 | + "description": "Bad Request." |
| 671 | + }, |
| 672 | + "401": { |
| 673 | + "content": { |
| 674 | + "application/json": { |
| 675 | + "schema": { |
| 676 | + "$ref": "#/components/schemas/UnauthorizedResponse" |
| 677 | + } |
| 678 | + } |
| 679 | + }, |
| 680 | + "description": "Unauthorized." |
| 681 | + }, |
| 682 | + "404": { |
| 683 | + "description": "Not found." |
| 684 | + }, |
| 685 | + "409": { |
| 686 | + "description": "Conflict." |
| 687 | + }, |
| 688 | + "500": { |
| 689 | + "content": { |
| 690 | + "application/json": { |
| 691 | + "schema": { |
| 692 | + "$ref": "#/components/schemas/GenericErrorResponse" |
| 693 | + } |
| 694 | + } |
| 695 | + }, |
| 696 | + "description": "Internal server error." |
| 697 | + } |
| 698 | + }, |
| 699 | + "summary": "Patch Instance.", |
| 700 | + "x-stackit-authorization": { |
| 701 | + "actions": [ |
| 702 | + "git.instance.update" |
| 703 | + ], |
| 704 | + "resource-id": "projectId", |
| 705 | + "resource-id-type": "dynamic", |
| 706 | + "resource-type": "project" |
| 707 | + } |
| 708 | + } |
592 | 709 | } |
593 | 710 | }, |
594 | 711 | "security": [ |
|
0 commit comments