Skip to content

Commit 95d2889

Browse files
chore(api): update composite API spec
1 parent 461adac commit 95d2889

11 files changed

Lines changed: 1105 additions & 6 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 2273
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a6c352830d1270d0abb5bb983058ea21815e1bb7d2e163965335dcb0e706f057.yml
3-
openapi_spec_hash: 47ba059c643c2fa4d24ca81d3ce8ffc3
3+
openapi_spec_hash: b3e28b3635caf14765747dd14abcac1a
44
config_hash: 86a9b8037b215f0a9c5c69239f9c6cfd

src/cloudflare/resources/zero_trust/identity_providers/identity_providers.py

Lines changed: 230 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,60 @@ def create(
836836
"""
837837
...
838838

839+
@overload
840+
def create(
841+
self,
842+
*,
843+
config: identity_provider_create_params.AccessCloudflareConfig,
844+
name: str,
845+
type: IdentityProviderType,
846+
account_id: str | Omit = omit,
847+
zone_id: str | Omit = omit,
848+
saml_certificate_set_id: str | Omit = omit,
849+
scim_config: IdentityProviderSCIMConfigParam | Omit = omit,
850+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
851+
# The extra values given here take precedence over values defined on the client or passed to this method.
852+
extra_headers: Headers | None = None,
853+
extra_query: Query | None = None,
854+
extra_body: Body | None = None,
855+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
856+
) -> Optional[IdentityProvider]:
857+
"""
858+
Adds a new identity provider to Access.
859+
860+
Args:
861+
config: The configuration parameters for the identity provider. To view the required
862+
parameters for a specific provider, refer to our
863+
[developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
864+
865+
name: The name of the identity provider, shown to users on the login page.
866+
867+
type: The type of identity provider. To determine the value for a specific provider,
868+
refer to our
869+
[developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
870+
871+
account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
872+
873+
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
874+
875+
saml_certificate_set_id: The UID of the SAML encryption certificate set assigned to this Identity
876+
Provider. Only present for SAML identity providers with encryption configured.
877+
Create a certificate set via POST to
878+
`/identity_providers/{id}/saml_certificate`.
879+
880+
scim_config: The configuration settings for enabling a System for Cross-Domain Identity
881+
Management (SCIM) with the identity provider.
882+
883+
extra_headers: Send extra headers
884+
885+
extra_query: Add additional query parameters to the request
886+
887+
extra_body: Add additional JSON properties to the request
888+
889+
timeout: Override the client-level default timeout for this request, in seconds
890+
"""
891+
...
892+
839893
@required_args(["config", "name", "type"])
840894
def create(
841895
self,
@@ -850,7 +904,8 @@ def create(
850904
| identity_provider_create_params.AccessOneloginConfig
851905
| identity_provider_create_params.AccessPingoneConfig
852906
| identity_provider_create_params.AccessSAMLConfig
853-
| identity_provider_create_params.AccessOnetimepinConfig,
907+
| identity_provider_create_params.AccessOnetimepinConfig
908+
| identity_provider_create_params.AccessCloudflareConfig,
854909
name: str,
855910
type: IdentityProviderType,
856911
account_id: str | Omit = omit,
@@ -1705,6 +1760,63 @@ def update(
17051760
"""
17061761
...
17071762

1763+
@overload
1764+
def update(
1765+
self,
1766+
identity_provider_id: str,
1767+
*,
1768+
config: identity_provider_update_params.AccessCloudflareConfig,
1769+
name: str,
1770+
type: IdentityProviderType,
1771+
account_id: str | Omit = omit,
1772+
zone_id: str | Omit = omit,
1773+
saml_certificate_set_id: str | Omit = omit,
1774+
scim_config: IdentityProviderSCIMConfigParam | Omit = omit,
1775+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1776+
# The extra values given here take precedence over values defined on the client or passed to this method.
1777+
extra_headers: Headers | None = None,
1778+
extra_query: Query | None = None,
1779+
extra_body: Body | None = None,
1780+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
1781+
) -> Optional[IdentityProvider]:
1782+
"""
1783+
Updates a configured identity provider.
1784+
1785+
Args:
1786+
identity_provider_id: UUID.
1787+
1788+
config: The configuration parameters for the identity provider. To view the required
1789+
parameters for a specific provider, refer to our
1790+
[developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
1791+
1792+
name: The name of the identity provider, shown to users on the login page.
1793+
1794+
type: The type of identity provider. To determine the value for a specific provider,
1795+
refer to our
1796+
[developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
1797+
1798+
account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
1799+
1800+
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
1801+
1802+
saml_certificate_set_id: The UID of the SAML encryption certificate set assigned to this Identity
1803+
Provider. Only present for SAML identity providers with encryption configured.
1804+
Create a certificate set via POST to
1805+
`/identity_providers/{id}/saml_certificate`.
1806+
1807+
scim_config: The configuration settings for enabling a System for Cross-Domain Identity
1808+
Management (SCIM) with the identity provider.
1809+
1810+
extra_headers: Send extra headers
1811+
1812+
extra_query: Add additional query parameters to the request
1813+
1814+
extra_body: Add additional JSON properties to the request
1815+
1816+
timeout: Override the client-level default timeout for this request, in seconds
1817+
"""
1818+
...
1819+
17081820
@required_args(["config", "name", "type"])
17091821
def update(
17101822
self,
@@ -1720,7 +1832,8 @@ def update(
17201832
| identity_provider_update_params.AccessOneloginConfig
17211833
| identity_provider_update_params.AccessPingoneConfig
17221834
| identity_provider_update_params.AccessSAMLConfig
1723-
| identity_provider_update_params.AccessOnetimepinConfig,
1835+
| identity_provider_update_params.AccessOnetimepinConfig
1836+
| identity_provider_update_params.AccessCloudflareConfig,
17241837
name: str,
17251838
type: IdentityProviderType,
17261839
account_id: str | Omit = omit,
@@ -2776,6 +2889,60 @@ async def create(
27762889
"""
27772890
...
27782891

2892+
@overload
2893+
async def create(
2894+
self,
2895+
*,
2896+
config: identity_provider_create_params.AccessCloudflareConfig,
2897+
name: str,
2898+
type: IdentityProviderType,
2899+
account_id: str | Omit = omit,
2900+
zone_id: str | Omit = omit,
2901+
saml_certificate_set_id: str | Omit = omit,
2902+
scim_config: IdentityProviderSCIMConfigParam | Omit = omit,
2903+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
2904+
# The extra values given here take precedence over values defined on the client or passed to this method.
2905+
extra_headers: Headers | None = None,
2906+
extra_query: Query | None = None,
2907+
extra_body: Body | None = None,
2908+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
2909+
) -> Optional[IdentityProvider]:
2910+
"""
2911+
Adds a new identity provider to Access.
2912+
2913+
Args:
2914+
config: The configuration parameters for the identity provider. To view the required
2915+
parameters for a specific provider, refer to our
2916+
[developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
2917+
2918+
name: The name of the identity provider, shown to users on the login page.
2919+
2920+
type: The type of identity provider. To determine the value for a specific provider,
2921+
refer to our
2922+
[developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
2923+
2924+
account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
2925+
2926+
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
2927+
2928+
saml_certificate_set_id: The UID of the SAML encryption certificate set assigned to this Identity
2929+
Provider. Only present for SAML identity providers with encryption configured.
2930+
Create a certificate set via POST to
2931+
`/identity_providers/{id}/saml_certificate`.
2932+
2933+
scim_config: The configuration settings for enabling a System for Cross-Domain Identity
2934+
Management (SCIM) with the identity provider.
2935+
2936+
extra_headers: Send extra headers
2937+
2938+
extra_query: Add additional query parameters to the request
2939+
2940+
extra_body: Add additional JSON properties to the request
2941+
2942+
timeout: Override the client-level default timeout for this request, in seconds
2943+
"""
2944+
...
2945+
27792946
@required_args(["config", "name", "type"])
27802947
async def create(
27812948
self,
@@ -2790,7 +2957,8 @@ async def create(
27902957
| identity_provider_create_params.AccessOneloginConfig
27912958
| identity_provider_create_params.AccessPingoneConfig
27922959
| identity_provider_create_params.AccessSAMLConfig
2793-
| identity_provider_create_params.AccessOnetimepinConfig,
2960+
| identity_provider_create_params.AccessOnetimepinConfig
2961+
| identity_provider_create_params.AccessCloudflareConfig,
27942962
name: str,
27952963
type: IdentityProviderType,
27962964
account_id: str | Omit = omit,
@@ -3645,6 +3813,63 @@ async def update(
36453813
"""
36463814
...
36473815

3816+
@overload
3817+
async def update(
3818+
self,
3819+
identity_provider_id: str,
3820+
*,
3821+
config: identity_provider_update_params.AccessCloudflareConfig,
3822+
name: str,
3823+
type: IdentityProviderType,
3824+
account_id: str | Omit = omit,
3825+
zone_id: str | Omit = omit,
3826+
saml_certificate_set_id: str | Omit = omit,
3827+
scim_config: IdentityProviderSCIMConfigParam | Omit = omit,
3828+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
3829+
# The extra values given here take precedence over values defined on the client or passed to this method.
3830+
extra_headers: Headers | None = None,
3831+
extra_query: Query | None = None,
3832+
extra_body: Body | None = None,
3833+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
3834+
) -> Optional[IdentityProvider]:
3835+
"""
3836+
Updates a configured identity provider.
3837+
3838+
Args:
3839+
identity_provider_id: UUID.
3840+
3841+
config: The configuration parameters for the identity provider. To view the required
3842+
parameters for a specific provider, refer to our
3843+
[developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
3844+
3845+
name: The name of the identity provider, shown to users on the login page.
3846+
3847+
type: The type of identity provider. To determine the value for a specific provider,
3848+
refer to our
3849+
[developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
3850+
3851+
account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
3852+
3853+
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
3854+
3855+
saml_certificate_set_id: The UID of the SAML encryption certificate set assigned to this Identity
3856+
Provider. Only present for SAML identity providers with encryption configured.
3857+
Create a certificate set via POST to
3858+
`/identity_providers/{id}/saml_certificate`.
3859+
3860+
scim_config: The configuration settings for enabling a System for Cross-Domain Identity
3861+
Management (SCIM) with the identity provider.
3862+
3863+
extra_headers: Send extra headers
3864+
3865+
extra_query: Add additional query parameters to the request
3866+
3867+
extra_body: Add additional JSON properties to the request
3868+
3869+
timeout: Override the client-level default timeout for this request, in seconds
3870+
"""
3871+
...
3872+
36483873
@required_args(["config", "name", "type"])
36493874
async def update(
36503875
self,
@@ -3660,7 +3885,8 @@ async def update(
36603885
| identity_provider_update_params.AccessOneloginConfig
36613886
| identity_provider_update_params.AccessPingoneConfig
36623887
| identity_provider_update_params.AccessSAMLConfig
3663-
| identity_provider_update_params.AccessOnetimepinConfig,
3888+
| identity_provider_update_params.AccessOnetimepinConfig
3889+
| identity_provider_update_params.AccessCloudflareConfig,
36643890
name: str,
36653891
type: IdentityProviderType,
36663892
account_id: str | Omit = omit,

src/cloudflare/types/zero_trust/access/applications/access_rule.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import List, Union
3+
from typing import List, Union, Optional
44
from typing_extensions import Literal, TypeAlias
55

66
from .ip_rule import IPRule
@@ -38,6 +38,8 @@
3838
"AccessLinkedAppTokenRuleLinkedAppToken",
3939
"AccessUserRiskScoreRule",
4040
"AccessUserRiskScoreRuleUserRiskScore",
41+
"AccessCloudflareAccountMemberRule",
42+
"AccessCloudflareAccountMemberRuleCloudflareAccountMember",
4143
]
4244

4345

@@ -130,6 +132,20 @@ class AccessUserRiskScoreRule(BaseModel):
130132
user_risk_score: AccessUserRiskScoreRuleUserRiskScore
131133

132134

135+
class AccessCloudflareAccountMemberRuleCloudflareAccountMember(BaseModel):
136+
account_id: Optional[str] = None
137+
"""Identifier."""
138+
139+
140+
class AccessCloudflareAccountMemberRule(BaseModel):
141+
"""
142+
Matches users who are members of a specific Cloudflare account.
143+
Requires a Cloudflare identity provider.
144+
"""
145+
146+
cloudflare_account_member: AccessCloudflareAccountMemberRuleCloudflareAccountMember
147+
148+
133149
AccessRule: TypeAlias = Union[
134150
GroupRule,
135151
AnyValidServiceTokenRule,
@@ -156,4 +172,5 @@ class AccessUserRiskScoreRule(BaseModel):
156172
ServiceTokenRule,
157173
AccessLinkedAppTokenRule,
158174
AccessUserRiskScoreRule,
175+
AccessCloudflareAccountMemberRule,
159176
]

src/cloudflare/types/zero_trust/access/applications/access_rule_param.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
"AccessLinkedAppTokenRuleLinkedAppToken",
4040
"AccessUserRiskScoreRule",
4141
"AccessUserRiskScoreRuleUserRiskScore",
42+
"AccessCloudflareAccountMemberRule",
43+
"AccessCloudflareAccountMemberRuleCloudflareAccountMember",
4244
]
4345

4446

@@ -131,6 +133,20 @@ class AccessUserRiskScoreRule(TypedDict, total=False):
131133
user_risk_score: Required[AccessUserRiskScoreRuleUserRiskScore]
132134

133135

136+
class AccessCloudflareAccountMemberRuleCloudflareAccountMember(TypedDict, total=False):
137+
account_id: str
138+
"""Identifier."""
139+
140+
141+
class AccessCloudflareAccountMemberRule(TypedDict, total=False):
142+
"""
143+
Matches users who are members of a specific Cloudflare account.
144+
Requires a Cloudflare identity provider.
145+
"""
146+
147+
cloudflare_account_member: Required[AccessCloudflareAccountMemberRuleCloudflareAccountMember]
148+
149+
134150
AccessRuleParam: TypeAlias = Union[
135151
GroupRuleParam,
136152
AnyValidServiceTokenRuleParam,
@@ -157,4 +173,5 @@ class AccessUserRiskScoreRule(TypedDict, total=False):
157173
ServiceTokenRuleParam,
158174
AccessLinkedAppTokenRule,
159175
AccessUserRiskScoreRule,
176+
AccessCloudflareAccountMemberRule,
160177
]

0 commit comments

Comments
 (0)