From c64aad7c5dcc085bf5945fce1b6fb3608f9109df Mon Sep 17 00:00:00 2001 From: bbiggerr Date: Mon, 21 Aug 2023 11:32:13 -0400 Subject: [PATCH 1/2] Added Region Availabilty endpoints --- openapi.yaml | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index a316a90fb..e78aafde6 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -17446,6 +17446,73 @@ paths: - lang: CLI source: > linode-cli regions view us-east + /regions/{regionId}/availability: + x-linode-cli-command: regions + parameters: + - name: regionId + in: path + description: ID of the Region to look up. + required: true + schema: + type: string + get: + tags: + - Regions + summary: Region Availability View + description: > + Returns availability data for a single Region. + operationId: getRegionAvailability + x-linode-cli-action: view-avail + responses: + '200': + description: A single Region object. + content: + application/json: + schema: + $ref: '#/components/schemas/RegionAvailability' + default: + $ref: '#/components/responses/ErrorResponse' + x-code-samples: + - lang: Shell + source: > + curl https://api.linode.com/v4/regions/us-east/availability + - lang: CLI + source: > + linode-cli regions view-avail us-east + /regions/availability: + x-linode-cli-command: regions + get: + tags: + - Regions + summary: Regions Availability List + description: | + Returns availability data for all Regions. + + Currently, this command returns availability of select premium and GPU plans for select regions. + operationId: getRegionsAvailability + x-linode-cli-action: list-avail + responses: + '200': + description: Returns a Region Availability object. + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PaginationEnvelope' + - properties: + data: + type: array + items: + $ref: '#/components/schemas/RegionAvailability' + default: + $ref: '#/components/responses/ErrorResponse' + x-code-samples: + - lang: Shell + source: > + curl https://api.linode.com/v4/regions/availability + - lang: CLI + source: > + linode-cli regions list-avail /support/tickets: x-linode-cli-command: tickets get: @@ -25297,6 +25364,22 @@ components: The IPv6 addresses for this region's DNS resolvers, separated by commas. example: "2001:0db8::,2001:0db8::1" readOnly: true + RegionAvailability: + type: object + description: Compute instance availability information by [Type](/docs/api/linode-types/) and [Region](/docs/api/regions/). + properties: + region: + type: string + example: us-east + description: The [Region](/docs/api/regions/) ID. + plan: + type: string + example: gpu-rtx6000-1.1 + description: The compute instance [Type](/docs/api/linode-types/) ID. + availability: + type: boolean + example: true + description: Whether the compute instance type is available in the region. RescueDevices: type: object properties: From fbadb9ad7e3e1f2ab81c8156e032ce90c15f9cac Mon Sep 17 00:00:00 2001 From: bbiggerr Date: Thu, 24 Aug 2023 15:33:11 -0400 Subject: [PATCH 2/2] availability -> available --- openapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi.yaml b/openapi.yaml index e78aafde6..3c5d82a24 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -25376,7 +25376,7 @@ components: type: string example: gpu-rtx6000-1.1 description: The compute instance [Type](/docs/api/linode-types/) ID. - availability: + available: type: boolean example: true description: Whether the compute instance type is available in the region.