Skip to content
Start here

Update WARP Connector HA configuration

zero_trust.tunnels.warp_connector.configurations.update(strtunnel_id, ConfigurationUpdateParams**kwargs) -> ConfigurationUpdateResponse
PUT/accounts/{account_id}/warp_connector/{tunnel_id}/configurations

Adds or updates the high-availability configuration for a WARP Connector tunnel.

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
Accepted Permissions (at least one required)
Cloudflare One Connectors WriteCloudflare One Connector: WARP Write
ParametersExpand Collapse
account_id: str

Identifier.

maxLength32
tunnel_id: str

UUID of the tunnel.

formatuuid
maxLength36
ha_mode: Literal["none", "disabled", "aws", "local"]

High-availability mode for the WARP Connector tunnel. none means HA is enabled but no provider is configured yet (newly created tunnels default to this). disabled means HA is explicitly turned off. aws uses AWS ENI move for failover. local uses virtual IPs (VIPs) on the local interface.

One of the following:
"none"
"disabled"
"aws"
"local"
config: Optional[Config]

Provider-specific configuration. Required shape depends on ha_mode. For aws, must contain fnr_id. For local, must contain vips. For none and disabled, must be empty or omitted.

One of the following:
class ConfigTunnelMeshAwsConfig:
fnr_id: str

Floating Network Resource ID — the secondary ENI that is moved between nodes on failover.

class ConfigTunnelMeshLocalConfig:
vips: Iterable[ConfigTunnelMeshLocalConfigVip]

VIPs to assign on the CloudflareWARP interface.

address: str

Virtual IP address (IPv4 or IPv6).

vips_previous: Optional[Iterable[ConfigTunnelMeshLocalConfigVipsPrevious]]

VIPs to clean up on demotion or version drift.

address: str

Virtual IP address (IPv4 or IPv6).

object

Empty object for none/disabled modes.

ReturnsExpand Collapse
class ConfigurationUpdateResponse:
configuration_version: int

Monotonically increasing configuration version, incremented on each PUT.

created_at: datetime

Timestamp of when the resource was created.

formatdate-time
ha_mode: Literal["none", "disabled", "aws", "local"]

High-availability mode for the WARP Connector tunnel. none means HA is enabled but no provider is configured yet (newly created tunnels default to this). disabled means HA is explicitly turned off. aws uses AWS ENI move for failover. local uses virtual IPs (VIPs) on the local interface.

One of the following:
"none"
"disabled"
"aws"
"local"
tunnel_id: str

UUID of the tunnel.

formatuuid
maxLength36
config: Optional[Config]

Provider-specific configuration. Present for aws and local modes.

One of the following:
class ConfigTunnelMeshAwsConfig:
fnr_id: str

Floating Network Resource ID — the secondary ENI that is moved between nodes on failover.

class ConfigTunnelMeshLocalConfig:
vips: List[ConfigTunnelMeshLocalConfigVip]

VIPs to assign on the CloudflareWARP interface.

address: str

Virtual IP address (IPv4 or IPv6).

vips_previous: Optional[List[ConfigTunnelMeshLocalConfigVipsPrevious]]

VIPs to clean up on demotion or version drift.

address: str

Virtual IP address (IPv4 or IPv6).

updated_at: Optional[datetime]

Timestamp of the last update. Null if never updated.

formatdate-time

Update WARP Connector HA configuration

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
configuration = client.zero_trust.tunnels.warp_connector.configurations.update(
    tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
    ha_mode="aws",
)
print(configuration.tunnel_id)
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "configuration_version": 0,
    "created_at": "2021-01-25T18:22:34.317854Z",
    "ha_mode": "aws",
    "tunnel_id": "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
    "config": {
      "fnr_id": "eni-0123456789abcdef0"
    },
    "updated_at": "2021-01-25T18:22:34.317854Z"
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "configuration_version": 0,
    "created_at": "2021-01-25T18:22:34.317854Z",
    "ha_mode": "aws",
    "tunnel_id": "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
    "config": {
      "fnr_id": "eni-0123456789abcdef0"
    },
    "updated_at": "2021-01-25T18:22:34.317854Z"
  }
}