Skip to content
Start here

List origin cloud region mappings

client.Cache.OriginCloudRegions.List(ctx, params) (*V4PagePaginationArray[OriginCloudRegion], error)
GET/zones/{zone_id}/origin/cloud_regions

Returns all IP-to-cloud-region mappings configured for the zone with pagination support. Each mapping tells Cloudflare which cloud vendor and region hosts the origin at that IP, enabling the edge to route via the nearest Tiered Cache upper-tier co-located with that cloud provider. Returns an empty array when no mappings exist.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
ParametersExpand Collapse
params OriginCloudRegionListParams
ZoneID param.Field[string]

Path param: Identifier.

maxLength32
Page param.Field[int64]Optional

Query param: Page number of paginated results.

minimum1
PerPage param.Field[int64]Optional

Query param: Number of items per page.

maximum100
minimum1
ReturnsExpand Collapse
type OriginCloudRegion struct{…}

A single origin IP-to-cloud-region mapping.

OriginIP string

The origin IP address (IPv4 or IPv6). Normalized to canonical form (RFC 5952 for IPv6).

Region string

Cloud vendor region identifier.

Vendor OriginCloudRegionVendor

Cloud vendor hosting the origin.

One of the following:
const OriginCloudRegionVendorAws OriginCloudRegionVendor = "aws"
const OriginCloudRegionVendorAzure OriginCloudRegionVendor = "azure"
const OriginCloudRegionVendorGcp OriginCloudRegionVendor = "gcp"
const OriginCloudRegionVendorOci OriginCloudRegionVendor = "oci"
ModifiedOn TimeOptional

Time this mapping was last modified.

formatdate-time

List origin cloud region mappings

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/cache"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  page, err := client.Cache.OriginCloudRegions.List(context.TODO(), cache.OriginCloudRegionListParams{
    ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "errors": [],
  "messages": [],
  "result": [],
  "result_info": {
    "count": 0,
    "page": 1,
    "per_page": 20,
    "total_count": 0,
    "total_pages": 0
  },
  "success": true
}
{
  "errors": [],
  "messages": [],
  "result": [
    {
      "modified_on": "2026-03-01T12:00:00Z",
      "origin_ip": "192.0.2.1",
      "region": "us-east-1",
      "vendor": "aws"
    },
    {
      "modified_on": "2026-03-01T12:30:00Z",
      "origin_ip": "2001:db8::1",
      "region": "us-central1",
      "vendor": "gcp"
    }
  ],
  "result_info": {
    "count": 2,
    "page": 1,
    "per_page": 20,
    "total_count": 2,
    "total_pages": 1
  },
  "success": true
}
{
  "errors": [
    {
      "code": 1146,
      "message": "invalid per_page parameter, must be between 1 and 100"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
Returns Examples
{
  "errors": [],
  "messages": [],
  "result": [],
  "result_info": {
    "count": 0,
    "page": 1,
    "per_page": 20,
    "total_count": 0,
    "total_pages": 0
  },
  "success": true
}
{
  "errors": [],
  "messages": [],
  "result": [
    {
      "modified_on": "2026-03-01T12:00:00Z",
      "origin_ip": "192.0.2.1",
      "region": "us-east-1",
      "vendor": "aws"
    },
    {
      "modified_on": "2026-03-01T12:30:00Z",
      "origin_ip": "2001:db8::1",
      "region": "us-central1",
      "vendor": "gcp"
    }
  ],
  "result_info": {
    "count": 2,
    "page": 1,
    "per_page": 20,
    "total_count": 2,
    "total_pages": 1
  },
  "success": true
}
{
  "errors": [
    {
      "code": 1146,
      "message": "invalid per_page parameter, must be between 1 and 100"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}