diff --git a/specification/resources/apps/apps_create.yml b/specification/resources/apps/apps_create.yml index 6fb6e51e..9a2e90e5 100755 --- a/specification/resources/apps/apps_create.yml +++ b/specification/resources/apps/apps_create.yml @@ -34,6 +34,8 @@ requestBody: instance_size_slug: apps-s-1vcpu-0.5gb routes: - path: /api + egress: + type: DEDICATED_IP required: true responses: diff --git a/specification/resources/apps/models/app.yml b/specification/resources/apps/models/app.yml index 925b55a2..d08ab726 100755 --- a/specification/resources/apps/models/app.yml +++ b/specification/resources/apps/models/app.yml @@ -80,6 +80,12 @@ properties: allOf: - description: The deployment that the app is pinned to. - $ref: apps_deployment.yml + dedicated_ips: + readOnly: true + title: The dedicated egress IP addresses associated with the app. + type: array + items: + $ref: apps_dedicated_egress_ip.yml required: - spec type: object diff --git a/specification/resources/apps/models/app_egress_spec.yml b/specification/resources/apps/models/app_egress_spec.yml new file mode 100644 index 00000000..d2b7a8f7 --- /dev/null +++ b/specification/resources/apps/models/app_egress_spec.yml @@ -0,0 +1,5 @@ +type: object +description: Specification for app egress configurations. +properties: + type: + $ref: app_egress_type_spec.yml diff --git a/specification/resources/apps/models/app_egress_type_spec.yml b/specification/resources/apps/models/app_egress_type_spec.yml new file mode 100644 index 00000000..098b3149 --- /dev/null +++ b/specification/resources/apps/models/app_egress_type_spec.yml @@ -0,0 +1,7 @@ +title: The app egress type. +type: string +default: AUTOASSIGN +example: AUTOASSIGN +enum: + - AUTOASSIGN + - DEDICATED_IP diff --git a/specification/resources/apps/models/app_spec.yml b/specification/resources/apps/models/app_spec.yml index 7a322617..97675a63 100755 --- a/specification/resources/apps/models/app_spec.yml +++ b/specification/resources/apps/models/app_spec.yml @@ -74,5 +74,8 @@ properties: ingress: $ref: app_ingress_spec.yml + egress: + $ref: app_egress_spec.yml + required: - name diff --git a/specification/resources/apps/models/apps_dedicated_egress_ip.yml b/specification/resources/apps/models/apps_dedicated_egress_ip.yml new file mode 100755 index 00000000..3d9a96ca --- /dev/null +++ b/specification/resources/apps/models/apps_dedicated_egress_ip.yml @@ -0,0 +1,13 @@ +type: object +readOnly: true +properties: + ip: + title: The IP address of the dedicated egress IP. + type: string + example: 192.168.1.1 + id: + title: The ID of the dedicated egress IP. + type: string + example: 9e7bc2ac-205a-45d6-919c-e1ac5e73f962 + status: + $ref: apps_dedicated_egress_ip_status.yml diff --git a/specification/resources/apps/models/apps_dedicated_egress_ip_status.yml b/specification/resources/apps/models/apps_dedicated_egress_ip_status.yml new file mode 100755 index 00000000..23282bbb --- /dev/null +++ b/specification/resources/apps/models/apps_dedicated_egress_ip_status.yml @@ -0,0 +1,10 @@ +title: The status of the dedicated egress IP. +type: string +readOnly: true +default: UNKNOWN +enum: +- UNKNOWN +- ASSIGNING +- ASSIGNED +- REMOVED +example: ASSIGNED diff --git a/specification/resources/apps/responses/examples.yml b/specification/resources/apps/responses/examples.yml index c07632c5..94fdccfa 100644 --- a/specification/resources/apps/responses/examples.yml +++ b/specification/resources/apps/responses/examples.yml @@ -192,6 +192,13 @@ apps: name: configuration-alert started_at: '2023-01-30T22:15:46.278987808Z' status: SUCCESS + dedicated_ips: + - ip: 192.168.1.1 + id: c24d8f48-3bc4-49f5-8ca0-58e8164427ac + status: ASSIGNED + - ip: 192.168.1.2 + id: 4768fb15-2837-4dda-9be5-3951df4bc3d0 + status: ASSIGNED links: pages: {} meta: @@ -414,6 +421,13 @@ app: name: configuration-alert started_at: '0001-01-01T00:00:00' status: PENDING + dedicated_ips: + - ip: 192.168.1.1 + id: c24d8f48-3bc4-49f5-8ca0-58e8164427ac + status: ASSIGNED + - ip: 192.168.1.2 + id: 4768fb15-2837-4dda-9be5-3951df4bc3d0 + status: ASSIGNED deployments: