diff --git a/api.md b/api.md index 8dc2e657aa6..25d03d137e5 100644 --- a/api.md +++ b/api.md @@ -4899,7 +4899,7 @@ Methods: Types: ```python -from cloudflare.types.zero_trust import AccessRule +from cloudflare.types.zero_trust import AccessRule, OktaGroupRule ``` ### Applications diff --git a/src/cloudflare/types/zero_trust/__init__.py b/src/cloudflare/types/zero_trust/__init__.py index 3564fcdeb66..764af352a97 100644 --- a/src/cloudflare/types/zero_trust/__init__.py +++ b/src/cloudflare/types/zero_trust/__init__.py @@ -13,6 +13,7 @@ from .network_path import NetworkPath as NetworkPath from .organization import Organization as Organization from .tunnel_param import TunnelParam as TunnelParam +from .okta_group_rule import OktaGroupRule as OktaGroupRule from .seat_edit_params import SeatEditParams as SeatEditParams from .access_rule_param import AccessRuleParam as AccessRuleParam from .identity_provider import IdentityProvider as IdentityProvider @@ -25,6 +26,7 @@ from .tunnel_create_params import TunnelCreateParams as TunnelCreateParams from .tunnel_delete_params import TunnelDeleteParams as TunnelDeleteParams from .gateway_list_response import GatewayListResponse as GatewayListResponse +from .okta_group_rule_param import OktaGroupRuleParam as OktaGroupRuleParam from .identity_provider_type import IdentityProviderType as IdentityProviderType from .gateway_create_response import GatewayCreateResponse as GatewayCreateResponse from .generic_oauth_config_param import GenericOAuthConfigParam as GenericOAuthConfigParam diff --git a/src/cloudflare/types/zero_trust/access_rule.py b/src/cloudflare/types/zero_trust/access_rule.py index 41631bd008d..3bdbd8c8294 100644 --- a/src/cloudflare/types/zero_trust/access_rule.py +++ b/src/cloudflare/types/zero_trust/access_rule.py @@ -5,6 +5,7 @@ from pydantic import Field as FieldInfo from ..._models import BaseModel +from .okta_group_rule import OktaGroupRule __all__ = [ "AccessRule", @@ -28,8 +29,6 @@ "AccessGitHubOrganizationRuleGitHubOrganization", "AccessGSuiteGroupRule", "AccessGSuiteGroupRuleGSuite", - "AccessOktaGroupRule", - "AccessOktaGroupRuleOkta", "AccessSAMLGroupRule", "AccessSAMLGroupRuleSAML", "AccessServiceTokenRule", @@ -145,18 +144,6 @@ class AccessGSuiteGroupRule(BaseModel): gsuite: AccessGSuiteGroupRuleGSuite -class AccessOktaGroupRuleOkta(BaseModel): - connection_id: str - """The ID of your Okta identity provider.""" - - email: str - """The email of the Okta group.""" - - -class AccessOktaGroupRule(BaseModel): - okta: AccessOktaGroupRuleOkta - - class AccessSAMLGroupRuleSAML(BaseModel): attribute_name: str """The name of the SAML attribute.""" @@ -239,7 +226,7 @@ class AccessDevicePostureRule(BaseModel): AccessAzureGroupRule, AccessGitHubOrganizationRule, AccessGSuiteGroupRule, - AccessOktaGroupRule, + OktaGroupRule, AccessSAMLGroupRule, AccessServiceTokenRule, AccessAnyValidServiceTokenRule, diff --git a/src/cloudflare/types/zero_trust/access_rule_param.py b/src/cloudflare/types/zero_trust/access_rule_param.py index 89d514c5f36..49dd3091579 100644 --- a/src/cloudflare/types/zero_trust/access_rule_param.py +++ b/src/cloudflare/types/zero_trust/access_rule_param.py @@ -6,6 +6,7 @@ from typing_extensions import Required, Annotated, TypedDict from ..._utils import PropertyInfo +from .okta_group_rule_param import OktaGroupRuleParam __all__ = [ "AccessRuleParam", @@ -29,8 +30,6 @@ "AccessGitHubOrganizationRuleGitHubOrganization", "AccessGSuiteGroupRule", "AccessGSuiteGroupRuleGSuite", - "AccessOktaGroupRule", - "AccessOktaGroupRuleOkta", "AccessSAMLGroupRule", "AccessSAMLGroupRuleSAML", "AccessServiceTokenRule", @@ -148,18 +147,6 @@ class AccessGSuiteGroupRule(TypedDict, total=False): gsuite: Required[AccessGSuiteGroupRuleGSuite] -class AccessOktaGroupRuleOkta(TypedDict, total=False): - connection_id: Required[str] - """The ID of your Okta identity provider.""" - - email: Required[str] - """The email of the Okta group.""" - - -class AccessOktaGroupRule(TypedDict, total=False): - okta: Required[AccessOktaGroupRuleOkta] - - class AccessSAMLGroupRuleSAML(TypedDict, total=False): attribute_name: Required[str] """The name of the SAML attribute.""" @@ -242,7 +229,7 @@ class AccessDevicePostureRule(TypedDict, total=False): AccessAzureGroupRule, AccessGitHubOrganizationRule, AccessGSuiteGroupRule, - AccessOktaGroupRule, + OktaGroupRuleParam, AccessSAMLGroupRule, AccessServiceTokenRule, AccessAnyValidServiceTokenRule, diff --git a/src/cloudflare/types/zero_trust/okta_group_rule.py b/src/cloudflare/types/zero_trust/okta_group_rule.py new file mode 100644 index 00000000000..1c9e66889d1 --- /dev/null +++ b/src/cloudflare/types/zero_trust/okta_group_rule.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from ..._models import BaseModel + +__all__ = ["OktaGroupRule", "Okta"] + + +class Okta(BaseModel): + connection_id: str + """The ID of your Okta identity provider.""" + + email: str + """The email of the Okta group.""" + + +class OktaGroupRule(BaseModel): + okta: Okta diff --git a/src/cloudflare/types/zero_trust/okta_group_rule_param.py b/src/cloudflare/types/zero_trust/okta_group_rule_param.py new file mode 100644 index 00000000000..34d48a81073 --- /dev/null +++ b/src/cloudflare/types/zero_trust/okta_group_rule_param.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["OktaGroupRuleParam", "Okta"] + + +class Okta(TypedDict, total=False): + connection_id: Required[str] + """The ID of your Okta identity provider.""" + + email: Required[str] + """The email of the Okta group.""" + + +class OktaGroupRuleParam(TypedDict, total=False): + okta: Required[Okta]