Configure via API
You can configure Cloud Connector rules using the Cloudflare API.
The API token used in API requests to manage Cloud Connector rules must have at least the following permission:
- Zone > Cloud Connector > Write
To obtain the complete endpoint, append the Cloud Connector endpoints listed below to the Cloudflare API base URL:
The {zone_id}
argument is the zone ID (a hexadecimal string). You can find this value in the Cloudflare dashboard.
The following table summarizes the available operations.
Operation | Verb + Endpoint |
---|---|
List Cloud Connector rules | GET zones/{zone_id}/cloud_connector/rules |
Create/update/delete Cloud Connector rules | PUT /zones/{zone_id}/cloud_connector/rules |
The following example returns a list of existing Cloud Connector rules:
The following example request will replace all existing Cloud Connector rules with a single rule:
The required body parameters for each rule are: expression
, provider
, and parameters.host
.
The provider
value must be one of the following: aws_s3
, azure_storage
, and gcp_storage
.