---
title: Cloud Workload Security
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[Zero Trust](https://developers.cloudflare.com/api/go/resources/zero_trust)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Cloud Workload Security

#### Cloud Workload SecurityBasic Auth Credentials

##### [List basic-auth credentials for an account](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/basic_auth_credentials/methods/list)

client.ZeroTrust.CWS.BasicAuthCredentials.List(ctx, params) (\*CursorPagination\[[BasicAuthCredential](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.basic_auth_credentials%20%3E%20(model)%20basic_auth_credential%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/cws/basic-auth-credentials

##### [Get a basic-auth credential by ID](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/basic_auth_credentials/methods/get)

client.ZeroTrust.CWS.BasicAuthCredentials.Get(ctx, credentialID, query) (\*[BasicAuthCredential](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.basic_auth_credentials%20%3E%20(model)%20basic_auth_credential%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/cws/basic-auth-credentials/{credential\_id}

##### [Create a basic-auth credential](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/basic_auth_credentials/methods/create)

client.ZeroTrust.CWS.BasicAuthCredentials.New(ctx, params) (\*[BasicAuthCredential](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.basic_auth_credentials%20%3E%20(model)%20basic_auth_credential%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/cws/basic-auth-credentials

##### [Delete a basic-auth credential](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/basic_auth_credentials/methods/delete)

client.ZeroTrust.CWS.BasicAuthCredentials.Delete(ctx, credentialID, body) (\*[CWSBasicAuthCredentialDeleteResponse](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.basic_auth_credentials%20%3E%20(model)%20CWSBasicAuthCredentialDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/cws/basic-auth-credentials/{credential\_id}

##### ModelsExpand Collapse

<details>

<summary>

type BasicAuthCredential struct{…}

</summary>

ID string

Server-assigned UUID

formatuuid

<a href="#(resource)%20zero_trust.cws.basic_auth_credentials%20%3E%20(model)%20basic_auth_credential%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

CreatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.basic_auth_credentials%20%3E%20(model)%20basic_auth_credential%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

UpdatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.basic_auth_credentials%20%3E%20(model)%20basic_auth_credential%20%3E%20(schema)%20%3E%20(property)%20updated_at">Link to this property</a>

Username string

Login presented by the client. Printable ASCII only, excluding space and colon (RFC 7617 forbids a colon in the user-id).

maxLength100

minLength1

<a href="#(resource)%20zero_trust.cws.basic_auth_credentials%20%3E%20(model)%20basic_auth_credential%20%3E%20(schema)%20%3E%20(property)%20username">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.cws.basic_auth_credentials%20%3E%20(model)%20basic_auth_credential%20%3E%20(schema)>)

#### Cloud Workload SecurityBasic Auth CredentialsSecrets

##### [List secrets for a basic-auth credential](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/basic_auth_credentials/subresources/secrets/methods/list)

client.ZeroTrust.CWS.BasicAuthCredentials.Secrets.List(ctx, credentialID, params) (\*CursorPagination\[[BasicAuthSecret](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.basic_auth_credentials.secrets%20%3E%20(model)%20basic_auth_secret%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/cws/basic-auth-credentials/{credential\_id}/secrets

##### [Get a basic-auth secret by ID](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/basic_auth_credentials/subresources/secrets/methods/get)

client.ZeroTrust.CWS.BasicAuthCredentials.Secrets.Get(ctx, credentialID, secretID, query) (\*[BasicAuthSecret](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.basic_auth_credentials.secrets%20%3E%20(model)%20basic_auth_secret%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/cws/basic-auth-credentials/{credential\_id}/secrets/{secret\_id}

##### [Add a secret to a basic-auth credential](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/basic_auth_credentials/subresources/secrets/methods/create)

client.ZeroTrust.CWS.BasicAuthCredentials.Secrets.New(ctx, credentialID, params) (\*[BasicAuthSecret](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.basic_auth_credentials.secrets%20%3E%20(model)%20basic_auth_secret%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/cws/basic-auth-credentials/{credential\_id}/secrets

##### [Delete a basic-auth secret](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/basic_auth_credentials/subresources/secrets/methods/delete)

client.ZeroTrust.CWS.BasicAuthCredentials.Secrets.Delete(ctx, credentialID, secretID, body) (\*[CWSBasicAuthCredentialSecretDeleteResponse](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.basic_auth_credentials.secrets%20%3E%20(model)%20CWSBasicAuthCredentialSecretDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/cws/basic-auth-credentials/{credential\_id}/secrets/{secret\_id}

##### ModelsExpand Collapse

<details>

<summary>

type BasicAuthSecret struct{…}

</summary>

ID string

Server-assigned UUID

formatuuid

<a href="#(resource)%20zero_trust.cws.basic_auth_credentials.secrets%20%3E%20(model)%20basic_auth_secret%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

CreatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.basic_auth_credentials.secrets%20%3E%20(model)%20basic_auth_secret%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

ExpiresAt TimeOptional

Optional RFC 3339 expiration time. Omit for no expiration.

formatdate-time

<a href="#(resource)%20zero_trust.cws.basic_auth_credentials.secrets%20%3E%20(model)%20basic_auth_secret%20%3E%20(schema)%20%3E%20(property)%20expires_at">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.cws.basic_auth_credentials.secrets%20%3E%20(model)%20basic_auth_secret%20%3E%20(schema)>)

#### Cloud Workload SecurityDeployments

##### [List deployments](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/deployments/methods/list)

client.ZeroTrust.CWS.Deployments.List(ctx, params) (\*CursorPagination\[[Deployment](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/cws/deployments

##### [Get a deployment by ID](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/deployments/methods/get)

client.ZeroTrust.CWS.Deployments.Get(ctx, deploymentID, query) (\*[Deployment](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/cws/deployments/{deployment\_id}

##### [Create a new deployment](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/deployments/methods/create)

client.ZeroTrust.CWS.Deployments.New(ctx, params) (\*[Deployment](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/cws/deployments

##### [Update a deployment](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/deployments/methods/update)

client.ZeroTrust.CWS.Deployments.Update(ctx, deploymentID, params) (\*[Deployment](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)>), error)

PUT/accounts/{account\_id}/cws/deployments/{deployment\_id}

##### [Delete a deployment](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/deployments/methods/delete)

client.ZeroTrust.CWS.Deployments.Delete(ctx, deploymentID, body) (\*[CWSDeploymentDeleteResponse](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20CWSDeploymentDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/cws/deployments/{deployment\_id}

##### ModelsExpand Collapse

<details>

<summary>

type Deployment struct{…}

</summary>

ID string

Server-assigned UUID

formatuuid

<a href="#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

BasicAuthCredentialIDs \[]string

IDs of basic-auth credentials attached to this deployment

<a href="#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)%20%3E%20(property)%20basic_auth_credential_ids">Link to this property</a>

CreatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

<details>

<summary>

DefaultMode DeploymentDefaultMode

Default traffic decision when no policy set matches

</summary>

One of the following:

const DeploymentDefaultModeAllow DeploymentDefaultMode = "ALLOW"

<a href="#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)%20%3E%20(property)%20default_mode%20%3E%20(member)%200">Link to this property</a>

const DeploymentDefaultModeBlock DeploymentDefaultMode = "BLOCK"

<a href="#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)%20%3E%20(property)%20default_mode%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)%20%3E%20(property)%20default_mode">Link to this property</a>

Name string

Human-readable name; unique per account

maxLength100

minLength1

<a href="#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

<details>

<summary>

OnErrorAction DeploymentOnErrorAction

Action applied when an enforcing policy has a runtime Rego error

</summary>

One of the following:

const DeploymentOnErrorActionBlock DeploymentOnErrorAction = "BLOCK"

<a href="#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)%20%3E%20(property)%20on_error_action%20%3E%20(member)%200">Link to this property</a>

const DeploymentOnErrorActionSkip DeploymentOnErrorAction = "SKIP"

<a href="#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)%20%3E%20(property)%20on_error_action%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)%20%3E%20(property)%20on_error_action">Link to this property</a>

PolicySetIDs \[]string

IDs of policy sets attached to this deployment

<a href="#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)%20%3E%20(property)%20policy_set_ids">Link to this property</a>

RegoRaiseError bool

Whether OPA builtin failures are raised as runtime evaluation errors

<a href="#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)%20%3E%20(property)%20rego_raise_error">Link to this property</a>

Tags map\[string, string]

Tags attached to this deployment

<a href="#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)%20%3E%20(property)%20tags">Link to this property</a>

UpdatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)%20%3E%20(property)%20updated_at">Link to this property</a>

Description stringOptional

Optional free-form description.

maxLength1024

<a href="#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

DomainACLID stringOptional

ID of the attached domain ACL. Omitted when none.

formatuuid

<a href="#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)%20%3E%20(property)%20domain_acl_id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.cws.deployments%20%3E%20(model)%20deployment%20%3E%20(schema)>)

#### Cloud Workload SecurityDomain ACLs

##### [List domain ACLs](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/domain_acls/methods/list)

client.ZeroTrust.CWS.DomainACLs.List(ctx, params) (\*CursorPagination\[[DomainACL](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.domain_acls%20%3E%20(model)%20domain_acl%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/cws/domain-acls

##### [Get a domain ACL by ID](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/domain_acls/methods/get)

client.ZeroTrust.CWS.DomainACLs.Get(ctx, domainACLID, query) (\*[DomainACL](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.domain_acls%20%3E%20(model)%20domain_acl%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/cws/domain-acls/{domain\_acl\_id}

##### [Create a new domain ACL](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/domain_acls/methods/create)

client.ZeroTrust.CWS.DomainACLs.New(ctx, params) (\*[DomainACL](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.domain_acls%20%3E%20(model)%20domain_acl%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/cws/domain-acls

##### [Update a domain ACL and replace its entries](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/domain_acls/methods/update)

client.ZeroTrust.CWS.DomainACLs.Update(ctx, domainACLID, params) (\*[DomainACL](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.domain_acls%20%3E%20(model)%20domain_acl%20%3E%20(schema)>), error)

PUT/accounts/{account\_id}/cws/domain-acls/{domain\_acl\_id}

##### [Delete a domain ACL](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/domain_acls/methods/delete)

client.ZeroTrust.CWS.DomainACLs.Delete(ctx, domainACLID, body) (\*[CWSDomainACLDeleteResponse](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.domain_acls%20%3E%20(model)%20CWSDomainACLDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/cws/domain-acls/{domain\_acl\_id}

##### ModelsExpand Collapse

<details>

<summary>

type DomainACL struct{…}

</summary>

ID string

Server-assigned UUID

formatuuid

<a href="#(resource)%20zero_trust.cws.domain_acls%20%3E%20(model)%20domain_acl%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

CreatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.domain_acls%20%3E%20(model)%20domain_acl%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

<details>

<summary>

DefaultAction DomainACLDefaultAction

Action applied when no entry matches the request domain

</summary>

One of the following:

const DomainACLDefaultActionAllow DomainACLDefaultAction = "ALLOW"

<a href="#(resource)%20zero_trust.cws.domain_acls%20%3E%20(model)%20domain_acl%20%3E%20(schema)%20%3E%20(property)%20default_action%20%3E%20(member)%200">Link to this property</a>

const DomainACLDefaultActionBlock DomainACLDefaultAction = "BLOCK"

<a href="#(resource)%20zero_trust.cws.domain_acls%20%3E%20(model)%20domain_acl%20%3E%20(schema)%20%3E%20(property)%20default_action%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.cws.domain_acls%20%3E%20(model)%20domain_acl%20%3E%20(schema)%20%3E%20(property)%20default_action">Link to this property</a>

<details>

<summary>

Entries \[]DomainACLEntry

Per-domain action overrides. Each domain appears at most once.

</summary>

<details>

<summary>

Action DomainACLEntriesAction

Per-domain decision overriding the parent ACL’s default\_action

</summary>

One of the following:

const DomainACLEntriesActionAllow DomainACLEntriesAction = "ALLOW"

<a href="#(resource)%20zero_trust.cws.domain_acls%20%3E%20(model)%20domain_acl%20%3E%20(schema)%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20action%20%3E%20(member)%200">Link to this property</a>

const DomainACLEntriesActionBlock DomainACLEntriesAction = "BLOCK"

<a href="#(resource)%20zero_trust.cws.domain_acls%20%3E%20(model)%20domain_acl%20%3E%20(schema)%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20action%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.cws.domain_acls%20%3E%20(model)%20domain_acl%20%3E%20(schema)%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20action">Link to this property</a>

Domain string

Hostname or domain pattern, capped at 255 UTF-8 bytes

maxLength255

minLength1

<a href="#(resource)%20zero_trust.cws.domain_acls%20%3E%20(model)%20domain_acl%20%3E%20(schema)%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20domain">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.cws.domain_acls%20%3E%20(model)%20domain_acl%20%3E%20(schema)%20%3E%20(property)%20entries">Link to this property</a>

Name string

Human-readable name; unique per account

maxLength100

minLength1

<a href="#(resource)%20zero_trust.cws.domain_acls%20%3E%20(model)%20domain_acl%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

UpdatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.domain_acls%20%3E%20(model)%20domain_acl%20%3E%20(schema)%20%3E%20(property)%20updated_at">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.cws.domain_acls%20%3E%20(model)%20domain_acl%20%3E%20(schema)>)

#### Cloud Workload SecurityPolicies

##### [List policies](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/policies/methods/list)

client.ZeroTrust.CWS.Policies.List(ctx, params) (\*CursorPagination\[[Policy](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.policies%20%3E%20(model)%20policy%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/cws/policies

##### [Get a policy by ID](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/policies/methods/get)

client.ZeroTrust.CWS.Policies.Get(ctx, policyID, query) (\*[Policy](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.policies%20%3E%20(model)%20policy%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/cws/policies/{policy\_id}

##### [Create a new policy](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/policies/methods/create)

client.ZeroTrust.CWS.Policies.New(ctx, params) (\*[Policy](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.policies%20%3E%20(model)%20policy%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/cws/policies

##### [Update a policy](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/policies/methods/update)

client.ZeroTrust.CWS.Policies.Update(ctx, policyID, params) (\*[Policy](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.policies%20%3E%20(model)%20policy%20%3E%20(schema)>), error)

PUT/accounts/{account\_id}/cws/policies/{policy\_id}

##### [Delete a policy](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/policies/methods/delete)

client.ZeroTrust.CWS.Policies.Delete(ctx, policyID, body) (\*[CWSPolicyDeleteResponse](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.policies%20%3E%20(model)%20CWSPolicyDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/cws/policies/{policy\_id}

##### ModelsExpand Collapse

<details>

<summary>

type Policy struct{…}

</summary>

ID string

Server-assigned UUID

formatuuid

<a href="#(resource)%20zero_trust.cws.policies%20%3E%20(model)%20policy%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

CreatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.policies%20%3E%20(model)%20policy%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

Entrypoint string

Non-function rule declared in rego\_source. Evaluation uses data.&lt;package\_path&gt;..

maxLength255

<a href="#(resource)%20zero_trust.cws.policies%20%3E%20(model)%20policy%20%3E%20(schema)%20%3E%20(property)%20entrypoint">Link to this property</a>

Filter string

Filter expression that determines whether this policy applies. Maximum 4096 UTF-8 bytes.

maxLength4096

minLength1

<a href="#(resource)%20zero_trust.cws.policies%20%3E%20(model)%20policy%20%3E%20(schema)%20%3E%20(property)%20filter">Link to this property</a>

Name string

Human-readable name; unique per account

maxLength100

minLength1

<a href="#(resource)%20zero_trust.cws.policies%20%3E%20(model)%20policy%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

PackagePath string

Dotted path derived from rego\_source. Begins with policy. and is unique per account.

maxLength1024

<a href="#(resource)%20zero_trust.cws.policies%20%3E%20(model)%20policy%20%3E%20(schema)%20%3E%20(property)%20package_path">Link to this property</a>

RegoSource string

Inline Rego source with a package beginning with “policy.” Maximum 16384 UTF-8 bytes.

maxLength16384

minLength1

<a href="#(resource)%20zero_trust.cws.policies%20%3E%20(model)%20policy%20%3E%20(schema)%20%3E%20(property)%20rego_source">Link to this property</a>

Tags map\[string, string]

Tags attached to this policy

<a href="#(resource)%20zero_trust.cws.policies%20%3E%20(model)%20policy%20%3E%20(schema)%20%3E%20(property)%20tags">Link to this property</a>

UpdatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.policies%20%3E%20(model)%20policy%20%3E%20(schema)%20%3E%20(property)%20updated_at">Link to this property</a>

Description stringOptional

Optional free-form description.

maxLength1024

<a href="#(resource)%20zero_trust.cws.policies%20%3E%20(model)%20policy%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.cws.policies%20%3E%20(model)%20policy%20%3E%20(schema)>)

#### Cloud Workload SecurityPolicy Sets

##### [List policy sets](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/policy_sets/methods/list)

client.ZeroTrust.CWS.PolicySets.List(ctx, params) (\*CursorPagination\[[PolicySet](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.policy_sets%20%3E%20(model)%20policy_set%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/cws/policy-sets

##### [Get a policy set by ID](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/policy_sets/methods/get)

client.ZeroTrust.CWS.PolicySets.Get(ctx, policySetID, query) (\*[PolicySet](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.policy_sets%20%3E%20(model)%20policy_set%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/cws/policy-sets/{policy\_set\_id}

##### [Create a new policy set](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/policy_sets/methods/create)

client.ZeroTrust.CWS.PolicySets.New(ctx, params) (\*[PolicySet](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.policy_sets%20%3E%20(model)%20policy_set%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/cws/policy-sets

##### [Update a policy set](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/policy_sets/methods/update)

client.ZeroTrust.CWS.PolicySets.Update(ctx, policySetID, params) (\*[PolicySet](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.policy_sets%20%3E%20(model)%20policy_set%20%3E%20(schema)>), error)

PUT/accounts/{account\_id}/cws/policy-sets/{policy\_set\_id}

##### [Delete a policy set](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/policy_sets/methods/delete)

client.ZeroTrust.CWS.PolicySets.Delete(ctx, policySetID, body) (\*[CWSPolicySetDeleteResponse](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.policy_sets%20%3E%20(model)%20CWSPolicySetDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/cws/policy-sets/{policy\_set\_id}

##### ModelsExpand Collapse

<details>

<summary>

type PolicySet struct{…}

</summary>

ID string

Server-assigned UUID

formatuuid

<a href="#(resource)%20zero_trust.cws.policy_sets%20%3E%20(model)%20policy_set%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

CreatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.policy_sets%20%3E%20(model)%20policy_set%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

ExcludeWorkloadIDs \[]string

IDs of workloads that exclude matching requests. Exclusions take precedence.

<a href="#(resource)%20zero_trust.cws.policy_sets%20%3E%20(model)%20policy_set%20%3E%20(schema)%20%3E%20(property)%20exclude_workload_ids">Link to this property</a>

IncludeWorkloadIDs \[]string

IDs of workloads that include matching requests. Empty includes all requests before exclusions.

<a href="#(resource)%20zero_trust.cws.policy_sets%20%3E%20(model)%20policy_set%20%3E%20(schema)%20%3E%20(property)%20include_workload_ids">Link to this property</a>

Name string

Human-readable name; unique per account

maxLength100

minLength1

<a href="#(resource)%20zero_trust.cws.policy_sets%20%3E%20(model)%20policy_set%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

<details>

<summary>

Policies \[]PolicySetPolicy

Member policies and their per-membership enforcement mode

</summary>

Enforce bool

Whether this policy should enforce when it matches. False keeps the policy attached for non-enforcing evaluation.

<a href="#(resource)%20zero_trust.cws.policy_sets%20%3E%20(model)%20policy_set%20%3E%20(schema)%20%3E%20(property)%20policies%20%3E%20(items)%20%3E%20(property)%20enforce">Link to this property</a>

PolicyID string

ID of the member policy

formatuuid

<a href="#(resource)%20zero_trust.cws.policy_sets%20%3E%20(model)%20policy_set%20%3E%20(schema)%20%3E%20(property)%20policies%20%3E%20(items)%20%3E%20(property)%20policy_id">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.cws.policy_sets%20%3E%20(model)%20policy_set%20%3E%20(schema)%20%3E%20(property)%20policies">Link to this property</a>

Tags map\[string, string]

Tags attached to this policy set

<a href="#(resource)%20zero_trust.cws.policy_sets%20%3E%20(model)%20policy_set%20%3E%20(schema)%20%3E%20(property)%20tags">Link to this property</a>

UpdatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.policy_sets%20%3E%20(model)%20policy_set%20%3E%20(schema)%20%3E%20(property)%20updated_at">Link to this property</a>

Description stringOptional

Optional free-form description.

maxLength1024

<a href="#(resource)%20zero_trust.cws.policy_sets%20%3E%20(model)%20policy_set%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.cws.policy_sets%20%3E%20(model)%20policy_set%20%3E%20(schema)>)

#### Cloud Workload SecurityRego Metadata

##### [List Rego metadata documents](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/rego_metadata/methods/list)

client.ZeroTrust.CWS.RegoMetadata.List(ctx, params) (\*CursorPagination\[[RegoMetadata](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.rego_metadata%20%3E%20(model)%20rego_metadata%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/cws/rego-metadata

##### [Get a rego metadata document by ID](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/rego_metadata/methods/get)

client.ZeroTrust.CWS.RegoMetadata.Get(ctx, regoMetadataID, query) (\*[RegoMetadata](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.rego_metadata%20%3E%20(model)%20rego_metadata%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/cws/rego-metadata/{rego\_metadata\_id}

##### [Create a new rego metadata document](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/rego_metadata/methods/create)

client.ZeroTrust.CWS.RegoMetadata.New(ctx, params) (\*[RegoMetadata](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.rego_metadata%20%3E%20(model)%20rego_metadata%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/cws/rego-metadata

##### [Update a rego metadata document](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/rego_metadata/methods/update)

client.ZeroTrust.CWS.RegoMetadata.Update(ctx, regoMetadataID, params) (\*[RegoMetadata](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.rego_metadata%20%3E%20(model)%20rego_metadata%20%3E%20(schema)>), error)

PUT/accounts/{account\_id}/cws/rego-metadata/{rego\_metadata\_id}

##### [Delete a rego metadata document](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/rego_metadata/methods/delete)

client.ZeroTrust.CWS.RegoMetadata.Delete(ctx, regoMetadataID, body) (\*[CWSRegoMetadataDeleteResponse](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.rego_metadata%20%3E%20(model)%20CWSRegoMetadataDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/cws/rego-metadata/{rego\_metadata\_id}

##### ModelsExpand Collapse

<details>

<summary>

type RegoMetadata struct{…}

</summary>

ID string

Server-assigned UUID

formatuuid

<a href="#(resource)%20zero_trust.cws.rego_metadata%20%3E%20(model)%20rego_metadata%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

CreatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.rego_metadata%20%3E%20(model)%20rego_metadata%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

Data unknown

<a href="#(resource)%20zero_trust.cws.rego_metadata%20%3E%20(model)%20rego_metadata%20%3E%20(schema)%20%3E%20(property)%20data">Link to this property</a>

ImportPath string

Unique Rego import path in the form metadata., with one alphanumeric or underscore segment. Reference it as data.&lt;import\_path&gt;.

maxLength255

minLength1

<a href="#(resource)%20zero_trust.cws.rego_metadata%20%3E%20(model)%20rego_metadata%20%3E%20(schema)%20%3E%20(property)%20import_path">Link to this property</a>

Name string

Human-readable name; unique per account

maxLength100

minLength1

<a href="#(resource)%20zero_trust.cws.rego_metadata%20%3E%20(model)%20rego_metadata%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

UpdatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.rego_metadata%20%3E%20(model)%20rego_metadata%20%3E%20(schema)%20%3E%20(property)%20updated_at">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.cws.rego_metadata%20%3E%20(model)%20rego_metadata%20%3E%20(schema)>)

#### Cloud Workload SecurityRego Modules

##### [List Rego modules](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/rego_modules/methods/list)

client.ZeroTrust.CWS.RegoModules.List(ctx, params) (\*CursorPagination\[[RegoModule](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.rego_modules%20%3E%20(model)%20rego_module%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/cws/rego-modules

##### [Get a Rego module by ID](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/rego_modules/methods/get)

client.ZeroTrust.CWS.RegoModules.Get(ctx, regoModuleID, query) (\*[RegoModule](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.rego_modules%20%3E%20(model)%20rego_module%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/cws/rego-modules/{rego\_module\_id}

##### [Create a new Rego module](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/rego_modules/methods/create)

client.ZeroTrust.CWS.RegoModules.New(ctx, params) (\*[RegoModule](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.rego_modules%20%3E%20(model)%20rego_module%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/cws/rego-modules

##### [Update a Rego module](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/rego_modules/methods/update)

client.ZeroTrust.CWS.RegoModules.Update(ctx, regoModuleID, params) (\*[RegoModule](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.rego_modules%20%3E%20(model)%20rego_module%20%3E%20(schema)>), error)

PUT/accounts/{account\_id}/cws/rego-modules/{rego\_module\_id}

##### [Delete a Rego module](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/rego_modules/methods/delete)

client.ZeroTrust.CWS.RegoModules.Delete(ctx, regoModuleID, body) (\*[CWSRegoModuleDeleteResponse](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.rego_modules%20%3E%20(model)%20CWSRegoModuleDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/cws/rego-modules/{rego\_module\_id}

##### ModelsExpand Collapse

<details>

<summary>

type RegoModule struct{…}

</summary>

ID string

Server-assigned UUID

formatuuid

<a href="#(resource)%20zero_trust.cws.rego_modules%20%3E%20(model)%20rego_module%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

CreatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.rego_modules%20%3E%20(model)%20rego_module%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

Name string

Human-readable name; unique per account

maxLength100

minLength1

<a href="#(resource)%20zero_trust.cws.rego_modules%20%3E%20(model)%20rego_module%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

PackagePath string

Dotted path derived from rego\_source. Begins with lib. and is unique per account.

maxLength1024

<a href="#(resource)%20zero_trust.cws.rego_modules%20%3E%20(model)%20rego_module%20%3E%20(schema)%20%3E%20(property)%20package_path">Link to this property</a>

RegoSource string

Library Rego source with a package beginning with “lib.” Maximum 16384 UTF-8 bytes.

maxLength16384

minLength1

<a href="#(resource)%20zero_trust.cws.rego_modules%20%3E%20(model)%20rego_module%20%3E%20(schema)%20%3E%20(property)%20rego_source">Link to this property</a>

UpdatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.rego_modules%20%3E%20(model)%20rego_module%20%3E%20(schema)%20%3E%20(property)%20updated_at">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.cws.rego_modules%20%3E%20(model)%20rego_module%20%3E%20(schema)>)

#### Cloud Workload SecurityTenant Structures

##### [List tenant structures for an account](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/tenant_structures/methods/list)

client.ZeroTrust.CWS.TenantStructures.List(ctx, params) (\*CursorPagination\[[TenantStructure](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.tenant_structures%20%3E%20(model)%20tenant_structure%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/cws/tenant-structures

##### [Get a tenant structure by ID](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/tenant_structures/methods/get)

client.ZeroTrust.CWS.TenantStructures.Get(ctx, structureID, query) (\*[TenantStructure](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.tenant_structures%20%3E%20(model)%20tenant_structure%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/cws/tenant-structures/{structure\_id}

##### [Create a tenant structure](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/tenant_structures/methods/create)

client.ZeroTrust.CWS.TenantStructures.New(ctx, params) (\*[TenantStructure](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.tenant_structures%20%3E%20(model)%20tenant_structure%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/cws/tenant-structures

##### [Update a tenant structure](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/tenant_structures/methods/update)

client.ZeroTrust.CWS.TenantStructures.Update(ctx, structureID, params) (\*[TenantStructure](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.tenant_structures%20%3E%20(model)%20tenant_structure%20%3E%20(schema)>), error)

PUT/accounts/{account\_id}/cws/tenant-structures/{structure\_id}

##### [Delete a tenant structure](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/tenant_structures/methods/delete)

client.ZeroTrust.CWS.TenantStructures.Delete(ctx, structureID, body) (\*[CWSTenantStructureDeleteResponse](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.tenant_structures%20%3E%20(model)%20CWSTenantStructureDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/cws/tenant-structures/{structure\_id}

##### ModelsExpand Collapse

<details>

<summary>

type TenantStructure struct{…}

</summary>

ID string

Server-assigned UUID

formatuuid

<a href="#(resource)%20zero_trust.cws.tenant_structures%20%3E%20(model)%20tenant_structure%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

Application TenantStructureApplication

Platform this structure models. Immutable after creation; determines valid node kinds and identifier formats.

</summary>

One of the following:

const TenantStructureApplicationAws TenantStructureApplication = "aws"

<a href="#(resource)%20zero_trust.cws.tenant_structures%20%3E%20(model)%20tenant_structure%20%3E%20(schema)%20%3E%20(property)%20application%20%3E%20(member)%200">Link to this property</a>

const TenantStructureApplicationCloudflare TenantStructureApplication = "cloudflare"

<a href="#(resource)%20zero_trust.cws.tenant_structures%20%3E%20(model)%20tenant_structure%20%3E%20(schema)%20%3E%20(property)%20application%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.cws.tenant_structures%20%3E%20(model)%20tenant_structure%20%3E%20(schema)%20%3E%20(property)%20application">Link to this property</a>

CreatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.tenant_structures%20%3E%20(model)%20tenant_structure%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

Name string

Human-readable name; unique per account

maxLength100

minLength1

<a href="#(resource)%20zero_trust.cws.tenant_structures%20%3E%20(model)%20tenant_structure%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

UpdatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.tenant_structures%20%3E%20(model)%20tenant_structure%20%3E%20(schema)%20%3E%20(property)%20updated_at">Link to this property</a>

ImportPath stringOptional

Optional unique Rego mount path in the form tenant... The application segment must match application; omitted when unmounted.

maxLength255

minLength1

<a href="#(resource)%20zero_trust.cws.tenant_structures%20%3E%20(model)%20tenant_structure%20%3E%20(schema)%20%3E%20(property)%20import_path">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.cws.tenant_structures%20%3E%20(model)%20tenant_structure%20%3E%20(schema)>)

#### Cloud Workload SecurityTenant StructuresNodes

##### [List nodes for a tenant structure](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/tenant_structures/subresources/nodes/methods/list)

client.ZeroTrust.CWS.TenantStructures.Nodes.List(ctx, structureID, params) (\*CursorPagination\[[TenantStructureNode](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.tenant_structures.nodes%20%3E%20(model)%20tenant_structure_node%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/cws/tenant-structures/{structure\_id}/nodes

##### [Get a tenant node by ID](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/tenant_structures/subresources/nodes/methods/get)

client.ZeroTrust.CWS.TenantStructures.Nodes.Get(ctx, structureID, nodeID, query) (\*[TenantStructureNode](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.tenant_structures.nodes%20%3E%20(model)%20tenant_structure_node%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/cws/tenant-structures/{structure\_id}/nodes/{node\_id}

##### [Add a node to a tenant structure](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/tenant_structures/subresources/nodes/methods/create)

client.ZeroTrust.CWS.TenantStructures.Nodes.New(ctx, structureID, params) (\*[TenantStructureNode](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.tenant_structures.nodes%20%3E%20(model)%20tenant_structure_node%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/cws/tenant-structures/{structure\_id}/nodes

##### [Update a tenant node](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/tenant_structures/subresources/nodes/methods/update)

client.ZeroTrust.CWS.TenantStructures.Nodes.Update(ctx, structureID, nodeID, params) (\*[TenantStructureNode](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.tenant_structures.nodes%20%3E%20(model)%20tenant_structure_node%20%3E%20(schema)>), error)

PUT/accounts/{account\_id}/cws/tenant-structures/{structure\_id}/nodes/{node\_id}

##### [Delete a tenant node](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/tenant_structures/subresources/nodes/methods/delete)

client.ZeroTrust.CWS.TenantStructures.Nodes.Delete(ctx, structureID, nodeID, body) (\*[CWSTenantStructureNodeDeleteResponse](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.tenant_structures.nodes%20%3E%20(model)%20CWSTenantStructureNodeDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/cws/tenant-structures/{structure\_id}/nodes/{node\_id}

##### [Apply a batch of tenant node mutations](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/tenant_structures/subresources/nodes/methods/batch)

client.ZeroTrust.CWS.TenantStructures.Nodes.Batch(ctx, structureID, params) (\*[CWSTenantStructureNodeBatchResponse](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.tenant_structures.nodes%20%3E%20(model)%20CWSTenantStructureNodeBatchResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/cws/tenant-structures/{structure\_id}/nodes/batch

##### ModelsExpand Collapse

<details>

<summary>

type TenantStructureNode struct{…}

</summary>

ID string

Server-assigned UUID

formatuuid

<a href="#(resource)%20zero_trust.cws.tenant_structures.nodes%20%3E%20(model)%20tenant_structure_node%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

CreatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.tenant_structures.nodes%20%3E%20(model)%20tenant_structure_node%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

NativeID string

Cloud-native identifier of this node, unique within the structure; the parent-reference target. Shape depends on the structure’s application. Immutable after create.

maxLength255

minLength1

<a href="#(resource)%20zero_trust.cws.tenant_structures.nodes%20%3E%20(model)%20tenant_structure_node%20%3E%20(schema)%20%3E%20(property)%20native_id">Link to this property</a>

NodeKind string

Position in the tree. Legal values depend on the structure’s application (aws: root/ou/account; cloudflare: org/account/zone). At most one root per structure. Immutable after create.

maxLength64

minLength1

<a href="#(resource)%20zero_trust.cws.tenant_structures.nodes%20%3E%20(model)%20tenant_structure_node%20%3E%20(schema)%20%3E%20(property)%20node_kind">Link to this property</a>

UpdatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.tenant_structures.nodes%20%3E%20(model)%20tenant_structure_node%20%3E%20(schema)%20%3E%20(property)%20updated_at">Link to this property</a>

Name stringOptional

Display name (e.g. an OU or account name), mutable. Optional; empty by default.

maxLength100

<a href="#(resource)%20zero_trust.cws.tenant_structures.nodes%20%3E%20(model)%20tenant_structure_node%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

Parent stringOptional

Native ID of this node’s parent. Required for non-root nodes and omitted for the root. The parent must be in the same structure and able to contain this node kind.

maxLength255

<a href="#(resource)%20zero_trust.cws.tenant_structures.nodes%20%3E%20(model)%20tenant_structure_node%20%3E%20(schema)%20%3E%20(property)%20parent">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.cws.tenant_structures.nodes%20%3E%20(model)%20tenant_structure_node%20%3E%20(schema)>)

#### Cloud Workload SecurityWorkloads

##### [List workloads](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/workloads/methods/list)

client.ZeroTrust.CWS.Workloads.List(ctx, params) (\*CursorPagination\[[Workload](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.workloads%20%3E%20(model)%20workload%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/cws/workloads

##### [Get a workload by ID](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/workloads/methods/get)

client.ZeroTrust.CWS.Workloads.Get(ctx, workloadID, query) (\*[Workload](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.workloads%20%3E%20(model)%20workload%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/cws/workloads/{workload\_id}

##### [Create a new workload](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/workloads/methods/create)

client.ZeroTrust.CWS.Workloads.New(ctx, params) (\*[Workload](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.workloads%20%3E%20(model)%20workload%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/cws/workloads

##### [Update a workload](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/workloads/methods/update)

client.ZeroTrust.CWS.Workloads.Update(ctx, workloadID, params) (\*[Workload](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.workloads%20%3E%20(model)%20workload%20%3E%20(schema)>), error)

PUT/accounts/{account\_id}/cws/workloads/{workload\_id}

##### [Delete a workload](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/cws/subresources/workloads/methods/delete)

client.ZeroTrust.CWS.Workloads.Delete(ctx, workloadID, body) (\*[CWSWorkloadDeleteResponse](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.cws.workloads%20%3E%20(model)%20CWSWorkloadDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/cws/workloads/{workload\_id}

##### ModelsExpand Collapse

<details>

<summary>

type Workload struct{…}

</summary>

ID string

Server-assigned UUID

formatuuid

<a href="#(resource)%20zero_trust.cws.workloads%20%3E%20(model)%20workload%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

CreatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.workloads%20%3E%20(model)%20workload%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

Filter string

Filter expression selecting the requests this workload matches. Maximum 4096 UTF-8 bytes.

maxLength4096

minLength1

<a href="#(resource)%20zero_trust.cws.workloads%20%3E%20(model)%20workload%20%3E%20(schema)%20%3E%20(property)%20filter">Link to this property</a>

Name string

Human-readable handle; unique per account.

maxLength100

minLength1

<a href="#(resource)%20zero_trust.cws.workloads%20%3E%20(model)%20workload%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

Tags map\[string, string]

Tags attached to this workload

<a href="#(resource)%20zero_trust.cws.workloads%20%3E%20(model)%20workload%20%3E%20(schema)%20%3E%20(property)%20tags">Link to this property</a>

UpdatedAt Time

formatdate-time

<a href="#(resource)%20zero_trust.cws.workloads%20%3E%20(model)%20workload%20%3E%20(schema)%20%3E%20(property)%20updated_at">Link to this property</a>

Description stringOptional

Optional free-form description.

maxLength1024

<a href="#(resource)%20zero_trust.cws.workloads%20%3E%20(model)%20workload%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.cws.workloads%20%3E%20(model)%20workload%20%3E%20(schema)>)