List supported cloud vendors and regions
client.cache.originCloudRegions.supportedRegions(OriginCloudRegionSupportedRegionsParams { zone_id } params, RequestOptionsoptions?): OriginCloudRegionSupportedRegionsResponse { obtained_codes, vendors }
GET/zones/{zone_id}/cache/origin_cloud_regions/supported_regions
Returns the cloud vendors and regions that are valid values for origin cloud region mappings. Each region includes the Tiered Cache upper-tier colocation codes that will be used for cache routing when a mapping targeting that region is active. Requires the zone to have Tiered Cache enabled.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
List supported cloud vendors and regions
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
const response = await client.cache.originCloudRegions.supportedRegions({
zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
});
console.log(response.obtained_codes);{
"errors": [],
"messages": [],
"result": {
"obtained_codes": true,
"vendors": {
"aws": [
{
"name": "us-east-1",
"upper_tier_colos": [
"IAD",
"EWR"
]
},
{
"name": "us-west-2",
"upper_tier_colos": [
"SEA"
]
}
],
"gcp": [
{
"name": "us-central1",
"upper_tier_colos": [
"ORD"
]
}
]
}
},
"success": true
}Returns Examples
{
"errors": [],
"messages": [],
"result": {
"obtained_codes": true,
"vendors": {
"aws": [
{
"name": "us-east-1",
"upper_tier_colos": [
"IAD",
"EWR"
]
},
{
"name": "us-west-2",
"upper_tier_colos": [
"SEA"
]
}
],
"gcp": [
{
"name": "us-central1",
"upper_tier_colos": [
"ORD"
]
}
]
}
},
"success": true
}