Skip to content

Latest commit

 

History

History
298 lines (188 loc) · 8.61 KB

RegionsAPI.md

File metadata and controls

298 lines (188 loc) · 8.61 KB

\RegionsAPI

All URIs are relative to https://api.linode.com

Method HTTP request Description
GetRegion Get /{apiVersion}/regions/{regionId} Get a region
GetRegionAvailability Get /{apiVersion}/regions/{regionId}/availability Get a region's availability
GetRegions Get /{apiVersion}/regions List regions
GetRegionsAvailability Get /{apiVersion}/regions/availability List regions' availability

GetRegion

GetRegions200ResponseDataInner GetRegion(ctx, apiVersion, regionId).Execute()

Get a region

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	apiVersion := "apiVersion_example" // string | __Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta. (default to "v4")
	regionId := "regionId_example" // string | ID of the Region to look up.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.RegionsAPI.GetRegion(context.Background(), apiVersion, regionId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `RegionsAPI.GetRegion``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetRegion`: GetRegions200ResponseDataInner
	fmt.Fprintf(os.Stdout, "Response from `RegionsAPI.GetRegion`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
apiVersion string Enum Call either the `v4` URL, or `v4beta` for operations still in Beta. [default to "v4"]
regionId string ID of the Region to look up.

Other Parameters

Other parameters are passed through a pointer to a apiGetRegionRequest struct via the builder pattern

Name Type Description Notes

Return type

GetRegions200ResponseDataInner

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetRegionAvailability

[]GetRegionsAvailability200ResponseAllOfDataInner GetRegionAvailability(ctx, apiVersion, regionId).Execute()

Get a region's availability

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	apiVersion := "apiVersion_example" // string | __Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta. (default to "v4")
	regionId := "regionId_example" // string | ID of the Region to look up.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.RegionsAPI.GetRegionAvailability(context.Background(), apiVersion, regionId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `RegionsAPI.GetRegionAvailability``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetRegionAvailability`: []GetRegionsAvailability200ResponseAllOfDataInner
	fmt.Fprintf(os.Stdout, "Response from `RegionsAPI.GetRegionAvailability`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
apiVersion string Enum Call either the `v4` URL, or `v4beta` for operations still in Beta. [default to "v4"]
regionId string ID of the Region to look up.

Other Parameters

Other parameters are passed through a pointer to a apiGetRegionAvailabilityRequest struct via the builder pattern

Name Type Description Notes

Return type

[]GetRegionsAvailability200ResponseAllOfDataInner

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetRegions

GetRegions200Response GetRegions(ctx, apiVersion).Execute()

List regions

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	apiVersion := "apiVersion_example" // string | __Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta. (default to "v4")

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.RegionsAPI.GetRegions(context.Background(), apiVersion).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `RegionsAPI.GetRegions``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetRegions`: GetRegions200Response
	fmt.Fprintf(os.Stdout, "Response from `RegionsAPI.GetRegions`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
apiVersion string Enum Call either the `v4` URL, or `v4beta` for operations still in Beta. [default to "v4"]

Other Parameters

Other parameters are passed through a pointer to a apiGetRegionsRequest struct via the builder pattern

Name Type Description Notes

Return type

GetRegions200Response

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetRegionsAvailability

GetRegionsAvailability200Response GetRegionsAvailability(ctx, apiVersion).Execute()

List regions' availability

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	apiVersion := "apiVersion_example" // string | __Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta. (default to "v4")

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.RegionsAPI.GetRegionsAvailability(context.Background(), apiVersion).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `RegionsAPI.GetRegionsAvailability``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetRegionsAvailability`: GetRegionsAvailability200Response
	fmt.Fprintf(os.Stdout, "Response from `RegionsAPI.GetRegionsAvailability`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
apiVersion string Enum Call either the `v4` URL, or `v4beta` for operations still in Beta. [default to "v4"]

Other Parameters

Other parameters are passed through a pointer to a apiGetRegionsAvailabilityRequest struct via the builder pattern

Name Type Description Notes

Return type

GetRegionsAvailability200Response

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]