availabilityZonesGet
Get a list the supported availability zones.
A successful response will return a list with the supported availability zones. Zoned will be grouped by Regions.
/availability_zones
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/availability_zones"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AvailabilityZonesApi;
import java.io.File;
import java.util.*;
public class AvailabilityZonesApiExample {
public static void main(String[] args) {
AvailabilityZonesApi apiInstance = new AvailabilityZonesApi();
try {
array[AvailabilityZones] result = apiInstance.availabilityZonesGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AvailabilityZonesApi#availabilityZonesGet");
e.printStackTrace();
}
}
}
import io.swagger.client.api.AvailabilityZonesApi;
public class AvailabilityZonesApiExample {
public static void main(String[] args) {
AvailabilityZonesApi apiInstance = new AvailabilityZonesApi();
try {
array[AvailabilityZones] result = apiInstance.availabilityZonesGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AvailabilityZonesApi#availabilityZonesGet");
e.printStackTrace();
}
}
}
AvailabilityZonesApi *apiInstance = [[AvailabilityZonesApi alloc] init];
// Get a list the supported availability zones.
[apiInstance availabilityZonesGetWithCompletionHandler:
^(array[AvailabilityZones] output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var Sim2Api = require('sim2_api');
var api = new Sim2Api.AvailabilityZonesApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.availabilityZonesGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class availabilityZonesGetExample
{
public void main()
{
var apiInstance = new AvailabilityZonesApi();
try
{
// Get a list the supported availability zones.
array[AvailabilityZones] result = apiInstance.availabilityZonesGet();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AvailabilityZonesApi.availabilityZonesGet: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiAvailabilityZonesApi();
try {
$result = $api_instance->availabilityZonesGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AvailabilityZonesApi->availabilityZonesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AvailabilityZonesApi;
my $api_instance = WWW::SwaggerClient::AvailabilityZonesApi->new();
eval {
my $result = $api_instance->availabilityZonesGet();
print Dumper($result);
};
if ($@) {
warn "Exception when calling AvailabilityZonesApi->availabilityZonesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.AvailabilityZonesApi()
try:
# Get a list the supported availability zones.
api_response = api_instance.availability_zones_get()
pprint(api_response)
except ApiException as e:
print("Exception when calling AvailabilityZonesApi->availabilityZonesGet: %s\n" % e)
Parameters
Responses
Status: 201 - list of the availability zones
Status: 401 - Status unauthorized.
{"code":401,"message":"Unauthorized access."}
Status: 500 - An unexpected error occurred.
{"code":500,"message":"Operation X did something wrong during processing"}