Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Apr 22, 2024
1 parent 1e66658 commit ec56e67
Show file tree
Hide file tree
Showing 34 changed files with 387 additions and 592 deletions.
20 changes: 1 addition & 19 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4899,25 +4899,7 @@ Methods:
Types:

```python
from cloudflare.types.zero_trust import (
AccessRule,
AzureGroupRule,
CertificateRule,
CountryRule,
DomainRule,
EmailListRule,
EmailRule,
EveryoneRule,
ExternalEvaluationRule,
GitHubOrganizationRule,
GroupRule,
GSuiteGroupRule,
IPListRule,
IPRule,
OktaGroupRule,
SAMLGroupRule,
ServiceTokenRule,
)
from cloudflare.types.zero_trust import AccessRule, GroupRule
```

### Applications
Expand Down
30 changes: 0 additions & 30 deletions src/cloudflare/types/zero_trust/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,63 +5,33 @@
from .seat import Seat as Seat
from .device import Device as Device
from .tunnel import Tunnel as Tunnel
from .ip_rule import IPRule as IPRule
from .azure_ad import AzureAD as AzureAD
from .email_rule import EmailRule as EmailRule
from .group_rule import GroupRule as GroupRule
from .access_rule import AccessRule as AccessRule
from .domain_rule import DomainRule as DomainRule
from .percentiles import Percentiles as Percentiles
from .scim_config import ScimConfig as ScimConfig
from .country_rule import CountryRule as CountryRule
from .ip_list_rule import IPListRule as IPListRule
from .login_design import LoginDesign as LoginDesign
from .network_path import NetworkPath as NetworkPath
from .organization import Organization as Organization
from .tunnel_param import TunnelParam as TunnelParam
from .everyone_rule import EveryoneRule as EveryoneRule
from .ip_rule_param import IPRuleParam as IPRuleParam
from .email_list_rule import EmailListRule as EmailListRule
from .okta_group_rule import OktaGroupRule as OktaGroupRule
from .saml_group_rule import SAMLGroupRule as SAMLGroupRule
from .azure_group_rule import AzureGroupRule as AzureGroupRule
from .certificate_rule import CertificateRule as CertificateRule
from .email_rule_param import EmailRuleParam as EmailRuleParam
from .group_rule_param import GroupRuleParam as GroupRuleParam
from .seat_edit_params import SeatEditParams as SeatEditParams
from .access_rule_param import AccessRuleParam as AccessRuleParam
from .domain_rule_param import DomainRuleParam as DomainRuleParam
from .gsuite_group_rule import GSuiteGroupRule as GSuiteGroupRule
from .identity_provider import IdentityProvider as IdentityProvider
from .scim_config_param import ScimConfigParam as ScimConfigParam
from .country_rule_param import CountryRuleParam as CountryRuleParam
from .ip_list_rule_param import IPListRuleParam as IPListRuleParam
from .login_design_param import LoginDesignParam as LoginDesignParam
from .seat_edit_response import SeatEditResponse as SeatEditResponse
from .service_token_rule import ServiceTokenRule as ServiceTokenRule
from .tunnel_edit_params import TunnelEditParams as TunnelEditParams
from .tunnel_list_params import TunnelListParams as TunnelListParams
from .everyone_rule_param import EveryoneRuleParam as EveryoneRuleParam
from .generic_oauth_config import GenericOAuthConfig as GenericOAuthConfig
from .tunnel_create_params import TunnelCreateParams as TunnelCreateParams
from .tunnel_delete_params import TunnelDeleteParams as TunnelDeleteParams
from .email_list_rule_param import EmailListRuleParam as EmailListRuleParam
from .gateway_list_response import GatewayListResponse as GatewayListResponse
from .okta_group_rule_param import OktaGroupRuleParam as OktaGroupRuleParam
from .saml_group_rule_param import SAMLGroupRuleParam as SAMLGroupRuleParam
from .azure_group_rule_param import AzureGroupRuleParam as AzureGroupRuleParam
from .certificate_rule_param import CertificateRuleParam as CertificateRuleParam
from .identity_provider_type import IdentityProviderType as IdentityProviderType
from .gateway_create_response import GatewayCreateResponse as GatewayCreateResponse
from .gsuite_group_rule_param import GSuiteGroupRuleParam as GSuiteGroupRuleParam
from .external_evaluation_rule import ExternalEvaluationRule as ExternalEvaluationRule
from .github_organization_rule import GitHubOrganizationRule as GitHubOrganizationRule
from .service_token_rule_param import ServiceTokenRuleParam as ServiceTokenRuleParam
from .generic_oauth_config_param import GenericOAuthConfigParam as GenericOAuthConfigParam
from .organization_create_params import OrganizationCreateParams as OrganizationCreateParams
from .organization_update_params import OrganizationUpdateParams as OrganizationUpdateParams
from .external_evaluation_rule_param import ExternalEvaluationRuleParam as ExternalEvaluationRuleParam
from .github_organization_rule_param import GitHubOrganizationRuleParam as GitHubOrganizationRuleParam
from .identity_provider_create_params import IdentityProviderCreateParams as IdentityProviderCreateParams
from .identity_provider_list_response import IdentityProviderListResponse as IdentityProviderListResponse
from .identity_provider_update_params import IdentityProviderUpdateParams as IdentityProviderUpdateParams
Expand Down
222 changes: 192 additions & 30 deletions src/cloudflare/types/zero_trust/access_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,201 @@

from typing import Union

from .ip_rule import IPRule
from pydantic import Field as FieldInfo

from ..._models import BaseModel
from .email_rule import EmailRule
from .group_rule import GroupRule
from .domain_rule import DomainRule
from .country_rule import CountryRule
from .ip_list_rule import IPListRule
from .everyone_rule import EveryoneRule
from .email_list_rule import EmailListRule
from .okta_group_rule import OktaGroupRule
from .saml_group_rule import SAMLGroupRule
from .azure_group_rule import AzureGroupRule
from .certificate_rule import CertificateRule
from .gsuite_group_rule import GSuiteGroupRule
from .service_token_rule import ServiceTokenRule
from .external_evaluation_rule import ExternalEvaluationRule
from .github_organization_rule import GitHubOrganizationRule

__all__ = [
"AccessRule",
"AccessEmailRule",
"AccessEmailRuleEmail",
"AccessEmailListRule",
"AccessEmailListRuleEmailList",
"AccessDomainRule",
"AccessDomainRuleEmailDomain",
"AccessEveryoneRule",
"AccessIPRule",
"AccessIPRuleIP",
"AccessIPListRule",
"AccessIPListRuleIPList",
"AccessCertificateRule",
"AccessAzureGroupRule",
"AccessAzureGroupRuleAzureAD",
"AccessGitHubOrganizationRule",
"AccessGitHubOrganizationRuleGitHubOrganization",
"AccessGSuiteGroupRule",
"AccessGSuiteGroupRuleGSuite",
"AccessOktaGroupRule",
"AccessOktaGroupRuleOkta",
"AccessSAMLGroupRule",
"AccessSAMLGroupRuleSAML",
"AccessServiceTokenRule",
"AccessServiceTokenRuleServiceToken",
"AccessAnyValidServiceTokenRule",
"AccessExternalEvaluationRule",
"AccessExternalEvaluationRuleExternalEvaluation",
"AccessCountryRule",
"AccessCountryRuleGeo",
"AccessAuthenticationMethodRule",
"AccessAuthenticationMethodRuleAuthMethod",
"AccessDevicePostureRule",
"AccessDevicePostureRuleDevicePosture",
]


class AccessEmailRuleEmail(BaseModel):
email: str
"""The email of the user."""


class AccessEmailRule(BaseModel):
email: AccessEmailRuleEmail


class AccessEmailListRuleEmailList(BaseModel):
id: str
"""The ID of a previously created email list."""


class AccessEmailListRule(BaseModel):
email_list: AccessEmailListRuleEmailList


class AccessDomainRuleEmailDomain(BaseModel):
domain: str
"""The email domain to match."""


class AccessDomainRule(BaseModel):
email_domain: AccessDomainRuleEmailDomain


class AccessEveryoneRule(BaseModel):
everyone: object
"""An empty object which matches on all users."""


class AccessIPRuleIP(BaseModel):
ip: str
"""An IPv4 or IPv6 CIDR block."""


class AccessIPRule(BaseModel):
ip: AccessIPRuleIP


class AccessIPListRuleIPList(BaseModel):
id: str
"""The ID of a previously created IP list."""


class AccessIPListRule(BaseModel):
ip_list: AccessIPListRuleIPList


class AccessCertificateRule(BaseModel):
certificate: object


class AccessAzureGroupRuleAzureAD(BaseModel):
id: str
"""The ID of an Azure group."""

connection_id: str
"""The ID of your Azure identity provider."""


class AccessAzureGroupRule(BaseModel):
azure_ad: AccessAzureGroupRuleAzureAD = FieldInfo(alias="azureAD")


class AccessGitHubOrganizationRuleGitHubOrganization(BaseModel):
connection_id: str
"""The ID of your Github identity provider."""

name: str
"""The name of the organization."""


class AccessGitHubOrganizationRule(BaseModel):
github_organization: AccessGitHubOrganizationRuleGitHubOrganization = FieldInfo(alias="github-organization")


class AccessGSuiteGroupRuleGSuite(BaseModel):
connection_id: str
"""The ID of your Google Workspace identity provider."""

email: str
"""The email of the Google Workspace group."""


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."""

attribute_value: str
"""The SAML attribute value to look for."""


class AccessSAMLGroupRule(BaseModel):
saml: AccessSAMLGroupRuleSAML


class AccessServiceTokenRuleServiceToken(BaseModel):
token_id: str
"""The ID of a Service Token."""


class AccessServiceTokenRule(BaseModel):
service_token: AccessServiceTokenRuleServiceToken


class AccessAnyValidServiceTokenRule(BaseModel):
any_valid_service_token: object
"""An empty object which matches on all service tokens."""


class AccessExternalEvaluationRuleExternalEvaluation(BaseModel):
evaluate_url: str
"""The API endpoint containing your business logic."""

keys_url: str
"""
The API endpoint containing the key that Access uses to verify that the response
came from your API.
"""


class AccessExternalEvaluationRule(BaseModel):
external_evaluation: AccessExternalEvaluationRuleExternalEvaluation


class AccessCountryRuleGeo(BaseModel):
country_code: str
"""The country code that should be matched."""


class AccessCountryRule(BaseModel):
geo: AccessCountryRuleGeo


class AccessAuthenticationMethodRuleAuthMethod(BaseModel):
auth_method: str
"""
Expand All @@ -56,23 +218,23 @@ class AccessDevicePostureRule(BaseModel):


AccessRule = Union[
EmailRule,
EmailListRule,
DomainRule,
EveryoneRule,
IPRule,
IPListRule,
CertificateRule,
AccessEmailRule,
AccessEmailListRule,
AccessDomainRule,
AccessEveryoneRule,
AccessIPRule,
AccessIPListRule,
AccessCertificateRule,
GroupRule,
AzureGroupRule,
GitHubOrganizationRule,
GSuiteGroupRule,
OktaGroupRule,
SAMLGroupRule,
ServiceTokenRule,
AccessAzureGroupRule,
AccessGitHubOrganizationRule,
AccessGSuiteGroupRule,
AccessOktaGroupRule,
AccessSAMLGroupRule,
AccessServiceTokenRule,
AccessAnyValidServiceTokenRule,
ExternalEvaluationRule,
CountryRule,
AccessExternalEvaluationRule,
AccessCountryRule,
AccessAuthenticationMethodRule,
AccessDevicePostureRule,
]
Loading

0 comments on commit ec56e67

Please sign in to comment.