Patch Zero Trust account configuration
zero_trust.gateway.configurations.edit(ConfigurationEditParams**kwargs) -> ConfigurationEditResponse
PATCH/accounts/{account_id}/gateway/configuration
Update (PATCH) a single subcollection of settings such as antivirus, tls_decrypt, activity_log, block_page, browser_isolation, fips, body_scanning, or certificate without updating the entire configuration object. This endpoint returns an error if any settings collection lacks proper configuration.
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:
Patch Zero Trust account 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
)
response = client.zero_trust.gateway.configurations.edit(
account_id="699d98642c564d2e855e9661899b7252",
)
print(response.created_at){
"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": {
"created_at": "2014-01-01T05:20:00.12345Z",
"settings": {
"activity_log": {
"enabled": true
},
"antivirus": {
"enabled_download_phase": false,
"enabled_upload_phase": false,
"fail_closed": false,
"notification_settings": {
"enabled": true,
"include_context": true,
"msg": "msg",
"support_url": "support_url"
}
},
"block_page": {
"background_color": "background_color",
"enabled": true,
"footer_text": "--footer--",
"header_text": "--header--",
"include_context": true,
"logo_path": "https://logos.com/a.png",
"mailto_address": "admin@example.com",
"mailto_subject": "Blocked User Inquiry",
"mode": "",
"name": "Cloudflare",
"read_only": true,
"source_account": "source_account",
"suppress_footer": false,
"target_uri": "https://example.com",
"version": 1
},
"body_scanning": {
"inspection_mode": "deep"
},
"browser_isolation": {
"non_identity_enabled": true,
"url_browser_isolation_enabled": true
},
"certificate": {
"id": "d1b364c5-1311-466e-a194-f0e943e0799f"
},
"custom_certificate": {
"enabled": true,
"id": "d1b364c5-1311-466e-a194-f0e943e0799f",
"binding_status": "pending_deployment",
"updated_at": "2019-12-27T18:11:19.117Z"
},
"extended_email_matching": {
"enabled": true,
"read_only": true,
"source_account": "source_account",
"version": 1
},
"fips": {
"tls": true
},
"host_selector": {
"enabled": false
},
"inspection": {
"mode": "static"
},
"protocol_detection": {
"enabled": true
},
"sandbox": {
"enabled": true,
"fallback_action": "allow"
},
"tls_decrypt": {
"enabled": true
}
},
"updated_at": "2014-01-01T05:20:00.12345Z"
}
}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": {
"created_at": "2014-01-01T05:20:00.12345Z",
"settings": {
"activity_log": {
"enabled": true
},
"antivirus": {
"enabled_download_phase": false,
"enabled_upload_phase": false,
"fail_closed": false,
"notification_settings": {
"enabled": true,
"include_context": true,
"msg": "msg",
"support_url": "support_url"
}
},
"block_page": {
"background_color": "background_color",
"enabled": true,
"footer_text": "--footer--",
"header_text": "--header--",
"include_context": true,
"logo_path": "https://logos.com/a.png",
"mailto_address": "admin@example.com",
"mailto_subject": "Blocked User Inquiry",
"mode": "",
"name": "Cloudflare",
"read_only": true,
"source_account": "source_account",
"suppress_footer": false,
"target_uri": "https://example.com",
"version": 1
},
"body_scanning": {
"inspection_mode": "deep"
},
"browser_isolation": {
"non_identity_enabled": true,
"url_browser_isolation_enabled": true
},
"certificate": {
"id": "d1b364c5-1311-466e-a194-f0e943e0799f"
},
"custom_certificate": {
"enabled": true,
"id": "d1b364c5-1311-466e-a194-f0e943e0799f",
"binding_status": "pending_deployment",
"updated_at": "2019-12-27T18:11:19.117Z"
},
"extended_email_matching": {
"enabled": true,
"read_only": true,
"source_account": "source_account",
"version": 1
},
"fips": {
"tls": true
},
"host_selector": {
"enabled": false
},
"inspection": {
"mode": "static"
},
"protocol_detection": {
"enabled": true
},
"sandbox": {
"enabled": true,
"fallback_action": "allow"
},
"tls_decrypt": {
"enabled": true
}
},
"updated_at": "2014-01-01T05:20:00.12345Z"
}
}