Update IP profile
zero_trust.devices.ip_profiles.update(strprofile_id, IPProfileUpdateParams**kwargs) -> IPProfile
PATCH/accounts/{account_id}/devices/ip-profiles/{profile_id}
Updates a WARP Device IP profile. Currently, only IPv4 Device subnets can be associated.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Accepted Permissions (at least one required)
Parameters
match: Optional[str]
The wirefilter expression to match registrations. Available values: “identity.name”, “identity.email”, “identity.groups.id”, “identity.groups.name”, “identity.groups.email”, “identity.saml_attributes”.
maxLength10000
Update IP profile
import os
from cloudflare import Cloudflare
client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted
)
ip_profile = client.zero_trust.devices.ip_profiles.update(
profile_id="profile_id",
account_id="account_id",
)
print(ip_profile.id){
"errors": [
{
"code": 0,
"message": "message"
}
],
"messages": [
{
"code": 0,
"message": "message"
}
],
"result": {
"id": "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
"created_at": "2025-02-14T13:17:00.123456789Z",
"description": "example comment",
"enabled": true,
"match": "identity.email == \"test@cloudflare.com\"",
"name": "IPv4 Cloudflare Source IPs",
"precedence": 100,
"subnet_id": "b70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
"updated_at": "2025-02-14T13:17:00.123456789Z"
},
"success": true
}Returns Examples
{
"errors": [
{
"code": 0,
"message": "message"
}
],
"messages": [
{
"code": 0,
"message": "message"
}
],
"result": {
"id": "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
"created_at": "2025-02-14T13:17:00.123456789Z",
"description": "example comment",
"enabled": true,
"match": "identity.email == \"test@cloudflare.com\"",
"name": "IPv4 Cloudflare Source IPs",
"precedence": 100,
"subnet_id": "b70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
"updated_at": "2025-02-14T13:17:00.123456789Z"
},
"success": true
}