Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1450
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0530d6510c5b139af850d24a4f932d5139c8d321a955ffa101b0debafbd75465.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4dc0e42c684fd5bb1470f8d6251d3d4a5194297e87606215b60d9a6ba5a5f7eb.yml
4 changes: 0 additions & 4 deletions src/cloudflare/resources/zero_trust/gateway/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ def create(
"override",
"l4_override",
"egress",
"audit_ssh",
"resolve",
"quarantine",
],
Expand Down Expand Up @@ -186,7 +185,6 @@ def update(
"override",
"l4_override",
"egress",
"audit_ssh",
"resolve",
"quarantine",
],
Expand Down Expand Up @@ -490,7 +488,6 @@ async def create(
"override",
"l4_override",
"egress",
"audit_ssh",
"resolve",
"quarantine",
],
Expand Down Expand Up @@ -606,7 +603,6 @@ async def update(
"override",
"l4_override",
"egress",
"audit_ssh",
"resolve",
"quarantine",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ class CertificateActivateResponse(BaseModel):
id: Optional[str] = None
"""Certificate UUID tag."""

binding_status: Optional[Literal["pending_deployment", "active", "pending_deletion", "inactive"]] = None
binding_status: Optional[Literal["pending_deployment", "available", "pending_deletion", "inactive"]] = None
"""The deployment status of the certificate on Cloudflare's edge.
Certificates in the 'active' state may be used for Gateway TLS interception.
Certificates in the 'available' (previously called 'active') state may be used
for Gateway TLS interception.
"""

certificate: Optional[str] = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ class CertificateCreateResponse(BaseModel):
id: Optional[str] = None
"""Certificate UUID tag."""

binding_status: Optional[Literal["pending_deployment", "active", "pending_deletion", "inactive"]] = None
binding_status: Optional[Literal["pending_deployment", "available", "pending_deletion", "inactive"]] = None
"""The deployment status of the certificate on Cloudflare's edge.
Certificates in the 'active' state may be used for Gateway TLS interception.
Certificates in the 'available' (previously called 'active') state may be used
for Gateway TLS interception.
"""

certificate: Optional[str] = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ class CertificateDeactivateResponse(BaseModel):
id: Optional[str] = None
"""Certificate UUID tag."""

binding_status: Optional[Literal["pending_deployment", "active", "pending_deletion", "inactive"]] = None
binding_status: Optional[Literal["pending_deployment", "available", "pending_deletion", "inactive"]] = None
"""The deployment status of the certificate on Cloudflare's edge.
Certificates in the 'active' state may be used for Gateway TLS interception.
Certificates in the 'available' (previously called 'active') state may be used
for Gateway TLS interception.
"""

certificate: Optional[str] = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ class CertificateDeleteResponse(BaseModel):
id: Optional[str] = None
"""Certificate UUID tag."""

binding_status: Optional[Literal["pending_deployment", "active", "pending_deletion", "inactive"]] = None
binding_status: Optional[Literal["pending_deployment", "available", "pending_deletion", "inactive"]] = None
"""The deployment status of the certificate on Cloudflare's edge.
Certificates in the 'active' state may be used for Gateway TLS interception.
Certificates in the 'available' (previously called 'active') state may be used
for Gateway TLS interception.
"""

certificate: Optional[str] = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ class CertificateGetResponse(BaseModel):
id: Optional[str] = None
"""Certificate UUID tag."""

binding_status: Optional[Literal["pending_deployment", "active", "pending_deletion", "inactive"]] = None
binding_status: Optional[Literal["pending_deployment", "available", "pending_deletion", "inactive"]] = None
"""The deployment status of the certificate on Cloudflare's edge.
Certificates in the 'active' state may be used for Gateway TLS interception.
Certificates in the 'available' (previously called 'active') state may be used
for Gateway TLS interception.
"""

certificate: Optional[str] = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ class CertificateListResponse(BaseModel):
id: Optional[str] = None
"""Certificate UUID tag."""

binding_status: Optional[Literal["pending_deployment", "active", "pending_deletion", "inactive"]] = None
binding_status: Optional[Literal["pending_deployment", "available", "pending_deletion", "inactive"]] = None
"""The deployment status of the certificate on Cloudflare's edge.
Certificates in the 'active' state may be used for Gateway TLS interception.
Certificates in the 'available' (previously called 'active') state may be used
for Gateway TLS interception.
"""

certificate: Optional[str] = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class Certificate(BaseModel):
id: str
"""UUID of certificate to be used for interception.
Certificate must be active on the edge. A nil UUID will indicate the Cloudflare
Root CA should be used.
Certificate must be available (previously called 'active') on the edge. A nil
UUID will indicate the Cloudflare Root CA should be used.
"""


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class Certificate(TypedDict, total=False):
id: Required[str]
"""UUID of certificate to be used for interception.
Certificate must be active on the edge. A nil UUID will indicate the Cloudflare
Root CA should be used.
Certificate must be available (previously called 'active') on the edge. A nil
UUID will indicate the Cloudflare Root CA should be used.
"""


Expand Down
4 changes: 3 additions & 1 deletion src/cloudflare/types/zero_trust/gateway/gateway_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class Expiration(BaseModel):
Must be set in order to use the `reset_expiration` endpoint on this rule.
"""

expired: Optional[bool] = None
"""Whether the policy has expired."""


class GatewayRule(BaseModel):
id: Optional[str] = None
Expand All @@ -51,7 +54,6 @@ class GatewayRule(BaseModel):
"override",
"l4_override",
"egress",
"audit_ssh",
"resolve",
"quarantine",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class RuleCreateParams(TypedDict, total=False):
"override",
"l4_override",
"egress",
"audit_ssh",
"resolve",
"quarantine",
]
Expand Down Expand Up @@ -109,3 +108,6 @@ class Expiration(TypedDict, total=False):
Must be set in order to use the `reset_expiration` endpoint on this rule.
"""

expired: bool
"""Whether the policy has expired."""
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class RuleUpdateParams(TypedDict, total=False):
"override",
"l4_override",
"egress",
"audit_ssh",
"resolve",
"quarantine",
]
Expand Down Expand Up @@ -109,3 +108,6 @@ class Expiration(TypedDict, total=False):
Must be set in order to use the `reset_expiration` endpoint on this rule.
"""

expired: bool
"""Whether the policy has expired."""
4 changes: 4 additions & 0 deletions tests/api_resources/zero_trust/gateway/test_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
expiration={
"expires_at": parse_datetime("2014-01-01T05:20:20Z"),
"duration": 10,
"expired": False,
},
filters=["http"],
identity='any(identity.groups.name[*] in {"finance"})',
Expand Down Expand Up @@ -181,6 +182,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
expiration={
"expires_at": parse_datetime("2014-01-01T05:20:20Z"),
"duration": 10,
"expired": False,
},
filters=["http"],
identity='any(identity.groups.name[*] in {"finance"})',
Expand Down Expand Up @@ -515,6 +517,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
expiration={
"expires_at": parse_datetime("2014-01-01T05:20:20Z"),
"duration": 10,
"expired": False,
},
filters=["http"],
identity='any(identity.groups.name[*] in {"finance"})',
Expand Down Expand Up @@ -654,6 +657,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
expiration={
"expires_at": parse_datetime("2014-01-01T05:20:20Z"),
"duration": 10,
"expired": False,
},
filters=["http"],
identity='any(identity.groups.name[*] in {"finance"})',
Expand Down