Skip to content

Latest commit

 

History

History
125 lines (90 loc) · 4.77 KB

File metadata and controls

125 lines (90 loc) · 4.77 KB

cloudflare_dart.api.LoadBalancerRegionsApi

Load the API package

import 'package:cloudflare_dart/api.dart';

All URIs are relative to https://api.cloudflare.com/client/v4

Method HTTP request Description
loadBalancerRegionsGetRegion GET /accounts/{account_id}/load_balancers/regions/{region_id} Get Region
loadBalancerRegionsListRegions GET /accounts/{account_id}/load_balancers/regions List Regions

loadBalancerRegionsGetRegion

LoadBalancingComponentsSchemasSingleResponse loadBalancerRegionsGetRegion(regionId, accountId)

Get Region

Get a single region mapping.

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getLoadBalancerRegionsApi();
final LoadBalancingRegionCode regionId = ; // LoadBalancingRegionCode | 
final String accountId = accountId_example; // String | 

try {
    final response = api.loadBalancerRegionsGetRegion(regionId, accountId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling LoadBalancerRegionsApi->loadBalancerRegionsGetRegion: $e\n');
}

Parameters

Name Type Description Notes
regionId LoadBalancingRegionCode
accountId String

Return type

LoadBalancingComponentsSchemasSingleResponse

Authorization

api_key, api_token, api_email

HTTP request headers

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

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

loadBalancerRegionsListRegions

LoadBalancingRegionComponentsSchemasResponseCollection loadBalancerRegionsListRegions(accountId, subdivisionCode, subdivisionCodeA2, countryCodeA2)

List Regions

List all region mappings.

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getLoadBalancerRegionsApi();
final String accountId = accountId_example; // String | 
final String subdivisionCode = subdivisionCode_example; // String | 
final String subdivisionCodeA2 = subdivisionCodeA2_example; // String | 
final String countryCodeA2 = US; // String | 

try {
    final response = api.loadBalancerRegionsListRegions(accountId, subdivisionCode, subdivisionCodeA2, countryCodeA2);
    print(response);
} catch on DioException (e) {
    print('Exception when calling LoadBalancerRegionsApi->loadBalancerRegionsListRegions: $e\n');
}

Parameters

Name Type Description Notes
accountId String
subdivisionCode String [optional]
subdivisionCodeA2 String [optional]
countryCodeA2 String [optional]

Return type

LoadBalancingRegionComponentsSchemasResponseCollection

Authorization

api_key, api_token, api_email

HTTP request headers

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

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