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 |
GetRegions200ResponseDataInner GetRegion(ctx, apiVersion, regionId).Execute()
Get a region
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)
}
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 are passed through a pointer to a apiGetRegionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
GetRegions200ResponseDataInner
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]GetRegionsAvailability200ResponseAllOfDataInner GetRegionAvailability(ctx, apiVersion, regionId).Execute()
Get a region's availability
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)
}
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 are passed through a pointer to a apiGetRegionAvailabilityRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
[]GetRegionsAvailability200ResponseAllOfDataInner
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetRegions200Response GetRegions(ctx, apiVersion).Execute()
List regions
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)
}
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 are passed through a pointer to a apiGetRegionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetRegionsAvailability200Response GetRegionsAvailability(ctx, apiVersion).Execute()
List regions' availability
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)
}
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 are passed through a pointer to a apiGetRegionsAvailabilityRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
GetRegionsAvailability200Response
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]