mirror of
https://github.com/cloudflare/cloudflare-python.git
synced 2026-01-17 07:10:37 +00:00
feat(api): enable iam resource, dns_firewall, secondary_dns, logpush datasources, queue consumer, registrar domains, stream (#1807)
This commit is contained in:
parent
15a7e54073
commit
7c1a5ed7c1
162 changed files with 3181 additions and 9648 deletions
306
api.md
306
api.md
|
|
@ -14,14 +14,10 @@ from cloudflare.types import (
|
|||
PaginationInfo,
|
||||
Permission,
|
||||
PermissionGrant,
|
||||
RatePlan,
|
||||
ResponseInfo,
|
||||
Result,
|
||||
Role,
|
||||
SortDirection,
|
||||
Subscription,
|
||||
SubscriptionComponent,
|
||||
SubscriptionZone,
|
||||
)
|
||||
```
|
||||
|
||||
|
|
@ -78,26 +74,6 @@ Methods:
|
|||
- <code title="get /accounts/{account_id}/roles">client.accounts.roles.<a href="./src/cloudflare/resources/accounts/roles.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/shared/role.py">SyncSinglePage[Role]</a></code>
|
||||
- <code title="get /accounts/{account_id}/roles/{role_id}">client.accounts.roles.<a href="./src/cloudflare/resources/accounts/roles.py">get</a>(role_id, \*, account_id) -> <a href="./src/cloudflare/types/accounts/role_get_response.py">object</a></code>
|
||||
|
||||
## Subscriptions
|
||||
|
||||
Types:
|
||||
|
||||
```python
|
||||
from cloudflare.types.accounts import (
|
||||
SubscriptionCreateResponse,
|
||||
SubscriptionUpdateResponse,
|
||||
SubscriptionDeleteResponse,
|
||||
SubscriptionGetResponse,
|
||||
)
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="post /accounts/{account_id}/subscriptions">client.accounts.subscriptions.<a href="./src/cloudflare/resources/accounts/subscriptions.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/accounts/subscription_create_params.py">params</a>) -> <a href="./src/cloudflare/types/accounts/subscription_create_response.py">SubscriptionCreateResponse</a></code>
|
||||
- <code title="put /accounts/{account_id}/subscriptions/{subscription_identifier}">client.accounts.subscriptions.<a href="./src/cloudflare/resources/accounts/subscriptions.py">update</a>(subscription_identifier, \*, account_id, \*\*<a href="src/cloudflare/types/accounts/subscription_update_params.py">params</a>) -> <a href="./src/cloudflare/types/accounts/subscription_update_response.py">SubscriptionUpdateResponse</a></code>
|
||||
- <code title="delete /accounts/{account_id}/subscriptions/{subscription_identifier}">client.accounts.subscriptions.<a href="./src/cloudflare/resources/accounts/subscriptions.py">delete</a>(subscription_identifier, \*, account_id) -> <a href="./src/cloudflare/types/accounts/subscription_delete_response.py">SubscriptionDeleteResponse</a></code>
|
||||
- <code title="get /accounts/{account_id}/subscriptions">client.accounts.subscriptions.<a href="./src/cloudflare/resources/accounts/subscriptions.py">get</a>(\*, account_id) -> <a href="./src/cloudflare/types/accounts/subscription_get_response.py">Optional</a></code>
|
||||
|
||||
# OriginCACertificates
|
||||
|
||||
Types:
|
||||
|
|
@ -227,6 +203,10 @@ Types:
|
|||
|
||||
```python
|
||||
from cloudflare.types.user import (
|
||||
RatePlan,
|
||||
Subscription,
|
||||
SubscriptionComponent,
|
||||
SubscriptionZone,
|
||||
SubscriptionUpdateResponse,
|
||||
SubscriptionDeleteResponse,
|
||||
SubscriptionGetResponse,
|
||||
|
|
@ -428,31 +408,6 @@ Methods:
|
|||
- <code title="put /zones/{identifier}/subscription">client.zones.subscriptions.<a href="./src/cloudflare/resources/zones/subscriptions.py">update</a>(identifier, \*\*<a href="src/cloudflare/types/zones/subscription_update_params.py">params</a>) -> <a href="./src/cloudflare/types/zones/subscription_update_response.py">SubscriptionUpdateResponse</a></code>
|
||||
- <code title="get /zones/{identifier}/subscription">client.zones.subscriptions.<a href="./src/cloudflare/resources/zones/subscriptions.py">get</a>(identifier) -> <a href="./src/cloudflare/types/zones/subscription_get_response.py">SubscriptionGetResponse</a></code>
|
||||
|
||||
## Plans
|
||||
|
||||
Types:
|
||||
|
||||
```python
|
||||
from cloudflare.types.zones import AvailableRatePlan
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="get /zones/{zone_id}/available_plans">client.zones.plans.<a href="./src/cloudflare/resources/zones/plans.py">list</a>(\*, zone_id) -> <a href="./src/cloudflare/types/zones/available_rate_plan.py">SyncSinglePage[AvailableRatePlan]</a></code>
|
||||
- <code title="get /zones/{zone_id}/available_plans/{plan_identifier}">client.zones.plans.<a href="./src/cloudflare/resources/zones/plans.py">get</a>(plan_identifier, \*, zone_id) -> <a href="./src/cloudflare/types/zones/available_rate_plan.py">AvailableRatePlan</a></code>
|
||||
|
||||
## RatePlans
|
||||
|
||||
Types:
|
||||
|
||||
```python
|
||||
from cloudflare.types.zones import RatePlanGetResponse
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="get /zones/{zone_id}/available_rate_plans">client.zones.rate_plans.<a href="./src/cloudflare/resources/zones/rate_plans.py">get</a>(\*, zone_id) -> <a href="./src/cloudflare/types/zones/rate_plan_get_response.py">Optional</a></code>
|
||||
|
||||
# LoadBalancers
|
||||
|
||||
Types:
|
||||
|
|
@ -843,6 +798,31 @@ Methods:
|
|||
- <code title="patch /zones/{zone_id}/argo/tiered_caching">client.argo.tiered_caching.<a href="./src/cloudflare/resources/argo/tiered_caching.py">edit</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/argo/tiered_caching_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/argo/tiered_caching_edit_response.py">Optional</a></code>
|
||||
- <code title="get /zones/{zone_id}/argo/tiered_caching">client.argo.tiered_caching.<a href="./src/cloudflare/resources/argo/tiered_caching.py">get</a>(\*, zone_id) -> <a href="./src/cloudflare/types/argo/tiered_caching_get_response.py">Optional</a></code>
|
||||
|
||||
# Plans
|
||||
|
||||
Types:
|
||||
|
||||
```python
|
||||
from cloudflare.types.plans import AvailableRatePlan
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="get /zones/{zone_id}/available_plans">client.plans.<a href="./src/cloudflare/resources/plans.py">list</a>(\*, zone_id) -> <a href="./src/cloudflare/types/plans/available_rate_plan.py">SyncSinglePage[AvailableRatePlan]</a></code>
|
||||
- <code title="get /zones/{zone_id}/available_plans/{plan_identifier}">client.plans.<a href="./src/cloudflare/resources/plans.py">get</a>(plan_identifier, \*, zone_id) -> <a href="./src/cloudflare/types/plans/available_rate_plan.py">AvailableRatePlan</a></code>
|
||||
|
||||
# RatePlans
|
||||
|
||||
Types:
|
||||
|
||||
```python
|
||||
from cloudflare.types.rate_plans import RatePlan, RatePlanGetResponse
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="get /zones/{zone_id}/available_rate_plans">client.rate_plans.<a href="./src/cloudflare/resources/rate_plans.py">get</a>(\*, zone_id) -> <a href="./src/cloudflare/types/rate_plans/rate_plan_get_response.py">Optional</a></code>
|
||||
|
||||
# CertificateAuthorities
|
||||
|
||||
## HostnameAssociations
|
||||
|
|
@ -1122,19 +1102,6 @@ Methods:
|
|||
|
||||
- <code title="get /accounts/{account_id}/dns_firewall/{dns_firewall_id}/dns_analytics/report/bytime">client.dns.firewall.analytics.reports.bytimes.<a href="./src/cloudflare/resources/dns/firewall/analytics/reports/bytimes.py">get</a>(dns_firewall_id, \*, account_id, \*\*<a href="src/cloudflare/types/dns/firewall/analytics/reports/bytime_get_params.py">params</a>) -> <a href="./src/cloudflare/types/dns/analytics/reports/by_time.py">Optional</a></code>
|
||||
|
||||
### ReverseDNS
|
||||
|
||||
Types:
|
||||
|
||||
```python
|
||||
from cloudflare.types.dns.firewall import ReverseDNSEditResponse, ReverseDNSGetResponse
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="patch /accounts/{account_id}/dns_firewall/{dns_firewall_id}/reverse_dns">client.dns.firewall.reverse_dns.<a href="./src/cloudflare/resources/dns/firewall/reverse_dns.py">edit</a>(dns_firewall_id, \*, account_id, \*\*<a href="src/cloudflare/types/dns/firewall/reverse_dns_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/dns/firewall/reverse_dns_edit_response.py">Optional</a></code>
|
||||
- <code title="get /accounts/{account_id}/dns_firewall/{dns_firewall_id}/reverse_dns">client.dns.firewall.reverse_dns.<a href="./src/cloudflare/resources/dns/firewall/reverse_dns.py">get</a>(dns_firewall_id, \*, account_id) -> <a href="./src/cloudflare/types/dns/firewall/reverse_dns_get_response.py">Optional</a></code>
|
||||
|
||||
# DNSSEC
|
||||
|
||||
Types:
|
||||
|
|
@ -2651,22 +2618,22 @@ Methods:
|
|||
|
||||
- <code title="get /zones/{zone_id}/api_gateway/user_schemas/{schema_id}/operations">client.api_gateway.user_schemas.operations.<a href="./src/cloudflare/resources/api_gateway/user_schemas/operations.py">list</a>(schema_id, \*, zone_id, \*\*<a href="src/cloudflare/types/api_gateway/user_schemas/operation_list_params.py">params</a>) -> <a href="./src/cloudflare/types/api_gateway/user_schemas/operation_list_response.py">SyncV4PagePaginationArray[OperationListResponse]</a></code>
|
||||
|
||||
# ManagedTransforms
|
||||
# ManagedHeaders
|
||||
|
||||
Types:
|
||||
|
||||
```python
|
||||
from cloudflare.types.managed_transforms import (
|
||||
from cloudflare.types.managed_headers import (
|
||||
RequestModel,
|
||||
ManagedTransformListResponse,
|
||||
ManagedTransformEditResponse,
|
||||
ManagedHeaderListResponse,
|
||||
ManagedHeaderEditResponse,
|
||||
)
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="get /zones/{zone_id}/managed_headers">client.managed_transforms.<a href="./src/cloudflare/resources/managed_transforms.py">list</a>(\*, zone_id) -> <a href="./src/cloudflare/types/managed_transforms/managed_transform_list_response.py">ManagedTransformListResponse</a></code>
|
||||
- <code title="patch /zones/{zone_id}/managed_headers">client.managed_transforms.<a href="./src/cloudflare/resources/managed_transforms.py">edit</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/managed_transforms/managed_transform_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/managed_transforms/managed_transform_edit_response.py">ManagedTransformEditResponse</a></code>
|
||||
- <code title="get /zones/{zone_id}/managed_headers">client.managed_headers.<a href="./src/cloudflare/resources/managed_headers.py">list</a>(\*, zone_id) -> <a href="./src/cloudflare/types/managed_headers/managed_header_list_response.py">ManagedHeaderListResponse</a></code>
|
||||
- <code title="patch /zones/{zone_id}/managed_headers">client.managed_headers.<a href="./src/cloudflare/resources/managed_headers.py">edit</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/managed_headers/managed_header_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/managed_headers/managed_header_edit_response.py">ManagedHeaderEditResponse</a></code>
|
||||
|
||||
# PageShield
|
||||
|
||||
|
|
@ -3743,47 +3710,6 @@ Methods:
|
|||
- <code title="patch /accounts/{account_id}/magic/connectors/{connector_id}">client.magic_transit.connectors.<a href="./src/cloudflare/resources/magic_transit/connectors.py">edit</a>(connector_id, \*, account_id, \*\*<a href="src/cloudflare/types/magic_transit/connector_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/magic_transit/connector_edit_response.py">ConnectorEditResponse</a></code>
|
||||
- <code title="get /accounts/{account_id}/magic/connectors/{connector_id}">client.magic_transit.connectors.<a href="./src/cloudflare/resources/magic_transit/connectors.py">get</a>(connector_id, \*, account_id) -> <a href="./src/cloudflare/types/magic_transit/connector_get_response.py">ConnectorGetResponse</a></code>
|
||||
|
||||
## PCAPs
|
||||
|
||||
Types:
|
||||
|
||||
```python
|
||||
from cloudflare.types.magic_transit import (
|
||||
PCAP,
|
||||
PCAPFilter,
|
||||
PCAPCreateResponse,
|
||||
PCAPListResponse,
|
||||
PCAPGetResponse,
|
||||
)
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="post /accounts/{account_id}/pcaps">client.magic_transit.pcaps.<a href="./src/cloudflare/resources/magic_transit/pcaps/pcaps.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/magic_transit/pcap_create_params.py">params</a>) -> <a href="./src/cloudflare/types/magic_transit/pcap_create_response.py">PCAPCreateResponse</a></code>
|
||||
- <code title="get /accounts/{account_id}/pcaps">client.magic_transit.pcaps.<a href="./src/cloudflare/resources/magic_transit/pcaps/pcaps.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/magic_transit/pcap_list_response.py">SyncSinglePage[PCAPListResponse]</a></code>
|
||||
- <code title="get /accounts/{account_id}/pcaps/{pcap_id}">client.magic_transit.pcaps.<a href="./src/cloudflare/resources/magic_transit/pcaps/pcaps.py">get</a>(pcap_id, \*, account_id) -> <a href="./src/cloudflare/types/magic_transit/pcap_get_response.py">PCAPGetResponse</a></code>
|
||||
|
||||
### Ownership
|
||||
|
||||
Types:
|
||||
|
||||
```python
|
||||
from cloudflare.types.magic_transit.pcaps import Ownership, OwnershipGetResponse
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="post /accounts/{account_id}/pcaps/ownership">client.magic_transit.pcaps.ownership.<a href="./src/cloudflare/resources/magic_transit/pcaps/ownership.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/magic_transit/pcaps/ownership_create_params.py">params</a>) -> <a href="./src/cloudflare/types/magic_transit/pcaps/ownership.py">Ownership</a></code>
|
||||
- <code title="delete /accounts/{account_id}/pcaps/ownership/{ownership_id}">client.magic_transit.pcaps.ownership.<a href="./src/cloudflare/resources/magic_transit/pcaps/ownership.py">delete</a>(ownership_id, \*, account_id) -> None</code>
|
||||
- <code title="get /accounts/{account_id}/pcaps/ownership">client.magic_transit.pcaps.ownership.<a href="./src/cloudflare/resources/magic_transit/pcaps/ownership.py">get</a>(\*, account_id) -> <a href="./src/cloudflare/types/magic_transit/pcaps/ownership_get_response.py">Optional</a></code>
|
||||
- <code title="post /accounts/{account_id}/pcaps/ownership/validate">client.magic_transit.pcaps.ownership.<a href="./src/cloudflare/resources/magic_transit/pcaps/ownership.py">validate</a>(\*, account_id, \*\*<a href="src/cloudflare/types/magic_transit/pcaps/ownership_validate_params.py">params</a>) -> <a href="./src/cloudflare/types/magic_transit/pcaps/ownership.py">Ownership</a></code>
|
||||
|
||||
### Download
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="get /accounts/{account_id}/pcaps/{pcap_id}/download">client.magic_transit.pcaps.download.<a href="./src/cloudflare/resources/magic_transit/pcaps/download.py">get</a>(pcap_id, \*, account_id) -> BinaryAPIResponse</code>
|
||||
|
||||
# MagicNetworkMonitoring
|
||||
|
||||
## Configs
|
||||
|
|
@ -3942,6 +3868,47 @@ Methods:
|
|||
- <code title="patch /accounts/{account_id}/pages/projects/{project_name}/domains/{domain_name}">client.pages.projects.domains.<a href="./src/cloudflare/resources/pages/projects/domains.py">edit</a>(domain_name, \*, account_id, project_name, \*\*<a href="src/cloudflare/types/pages/projects/domain_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/pages/projects/domain_edit_response.py">Optional</a></code>
|
||||
- <code title="get /accounts/{account_id}/pages/projects/{project_name}/domains/{domain_name}">client.pages.projects.domains.<a href="./src/cloudflare/resources/pages/projects/domains.py">get</a>(domain_name, \*, account_id, project_name) -> <a href="./src/cloudflare/types/pages/projects/domain_get_response.py">Optional</a></code>
|
||||
|
||||
# PCAPs
|
||||
|
||||
Types:
|
||||
|
||||
```python
|
||||
from cloudflare.types.pcaps import (
|
||||
PCAP,
|
||||
PCAPFilter,
|
||||
PCAPCreateResponse,
|
||||
PCAPListResponse,
|
||||
PCAPGetResponse,
|
||||
)
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="post /accounts/{account_id}/pcaps">client.pcaps.<a href="./src/cloudflare/resources/pcaps/pcaps.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/pcaps/pcap_create_params.py">params</a>) -> <a href="./src/cloudflare/types/pcaps/pcap_create_response.py">PCAPCreateResponse</a></code>
|
||||
- <code title="get /accounts/{account_id}/pcaps">client.pcaps.<a href="./src/cloudflare/resources/pcaps/pcaps.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/pcaps/pcap_list_response.py">SyncSinglePage[PCAPListResponse]</a></code>
|
||||
- <code title="get /accounts/{account_id}/pcaps/{pcap_id}">client.pcaps.<a href="./src/cloudflare/resources/pcaps/pcaps.py">get</a>(pcap_id, \*, account_id) -> <a href="./src/cloudflare/types/pcaps/pcap_get_response.py">PCAPGetResponse</a></code>
|
||||
|
||||
## Ownership
|
||||
|
||||
Types:
|
||||
|
||||
```python
|
||||
from cloudflare.types.pcaps import Ownership, OwnershipGetResponse
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="post /accounts/{account_id}/pcaps/ownership">client.pcaps.ownership.<a href="./src/cloudflare/resources/pcaps/ownership.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/pcaps/ownership_create_params.py">params</a>) -> <a href="./src/cloudflare/types/pcaps/ownership.py">Ownership</a></code>
|
||||
- <code title="delete /accounts/{account_id}/pcaps/ownership/{ownership_id}">client.pcaps.ownership.<a href="./src/cloudflare/resources/pcaps/ownership.py">delete</a>(ownership_id, \*, account_id) -> None</code>
|
||||
- <code title="get /accounts/{account_id}/pcaps/ownership">client.pcaps.ownership.<a href="./src/cloudflare/resources/pcaps/ownership.py">get</a>(\*, account_id) -> <a href="./src/cloudflare/types/pcaps/ownership_get_response.py">Optional</a></code>
|
||||
- <code title="post /accounts/{account_id}/pcaps/ownership/validate">client.pcaps.ownership.<a href="./src/cloudflare/resources/pcaps/ownership.py">validate</a>(\*, account_id, \*\*<a href="src/cloudflare/types/pcaps/ownership_validate_params.py">params</a>) -> <a href="./src/cloudflare/types/pcaps/ownership.py">Ownership</a></code>
|
||||
|
||||
## Download
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="get /accounts/{account_id}/pcaps/{pcap_id}/download">client.pcaps.download.<a href="./src/cloudflare/resources/pcaps/download.py">get</a>(pcap_id, \*, account_id) -> BinaryAPIResponse</code>
|
||||
|
||||
# Registrar
|
||||
|
||||
## Domains
|
||||
|
|
@ -4491,36 +4458,6 @@ Methods:
|
|||
- <code title="put /accounts/{account_id}/r2/buckets/{bucket_name}/domains/managed">client.r2.domains.managed.<a href="./src/cloudflare/resources/r2/domains/managed.py">update</a>(bucket_name, \*, account_id, \*\*<a href="src/cloudflare/types/r2/domains/managed_update_params.py">params</a>) -> <a href="./src/cloudflare/types/r2/domains/managed_update_response.py">ManagedUpdateResponse</a></code>
|
||||
- <code title="get /accounts/{account_id}/r2/buckets/{bucket_name}/domains/managed">client.r2.domains.managed.<a href="./src/cloudflare/resources/r2/domains/managed.py">list</a>(bucket_name, \*, account_id) -> <a href="./src/cloudflare/types/r2/domains/managed_list_response.py">ManagedListResponse</a></code>
|
||||
|
||||
## EventNotifications
|
||||
|
||||
### Configuration
|
||||
|
||||
Types:
|
||||
|
||||
```python
|
||||
from cloudflare.types.r2.event_notifications import ConfigurationGetResponse
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="get /accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration">client.r2.event_notifications.configuration.<a href="./src/cloudflare/resources/r2/event_notifications/configuration/configuration.py">get</a>(bucket_name, \*, account_id) -> <a href="./src/cloudflare/types/r2/event_notifications/configuration_get_response.py">ConfigurationGetResponse</a></code>
|
||||
|
||||
#### Queues
|
||||
|
||||
Types:
|
||||
|
||||
```python
|
||||
from cloudflare.types.r2.event_notifications.configuration import (
|
||||
QueueUpdateResponse,
|
||||
QueueDeleteResponse,
|
||||
)
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="put /accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration/queues/{queue_id}">client.r2.event_notifications.configuration.queues.<a href="./src/cloudflare/resources/r2/event_notifications/configuration/queues.py">update</a>(queue_id, \*, account_id, bucket_name, \*\*<a href="src/cloudflare/types/r2/event_notifications/configuration/queue_update_params.py">params</a>) -> <a href="./src/cloudflare/types/r2/event_notifications/configuration/queue_update_response.py">object</a></code>
|
||||
- <code title="delete /accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration/queues/{queue_id}">client.r2.event_notifications.configuration.queues.<a href="./src/cloudflare/resources/r2/event_notifications/configuration/queues.py">delete</a>(queue_id, \*, account_id, bucket_name) -> <a href="./src/cloudflare/types/r2/event_notifications/configuration/queue_delete_response.py">object</a></code>
|
||||
|
||||
# WARPConnector
|
||||
|
||||
Types:
|
||||
|
|
@ -4988,29 +4925,6 @@ from cloudflare.types.zero_trust import (
|
|||
)
|
||||
```
|
||||
|
||||
### Infrastructure
|
||||
|
||||
#### Targets
|
||||
|
||||
Types:
|
||||
|
||||
```python
|
||||
from cloudflare.types.zero_trust.access.infrastructure import (
|
||||
TargetCreateResponse,
|
||||
TargetUpdateResponse,
|
||||
TargetListResponse,
|
||||
TargetGetResponse,
|
||||
)
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="post /accounts/{account_id}/infrastructure/targets">client.zero_trust.access.infrastructure.targets.<a href="./src/cloudflare/resources/zero_trust/access/infrastructure/targets.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/access/infrastructure/target_create_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/access/infrastructure/target_create_response.py">Optional</a></code>
|
||||
- <code title="put /accounts/{account_id}/infrastructure/targets/{target_id}">client.zero_trust.access.infrastructure.targets.<a href="./src/cloudflare/resources/zero_trust/access/infrastructure/targets.py">update</a>(target_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/access/infrastructure/target_update_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/access/infrastructure/target_update_response.py">Optional</a></code>
|
||||
- <code title="get /accounts/{account_id}/infrastructure/targets">client.zero_trust.access.infrastructure.targets.<a href="./src/cloudflare/resources/zero_trust/access/infrastructure/targets.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/access/infrastructure/target_list_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/access/infrastructure/target_list_response.py">SyncV4PagePaginationArray[TargetListResponse]</a></code>
|
||||
- <code title="delete /accounts/{account_id}/infrastructure/targets/{target_id}">client.zero_trust.access.infrastructure.targets.<a href="./src/cloudflare/resources/zero_trust/access/infrastructure/targets.py">delete</a>(target_id, \*, account_id) -> None</code>
|
||||
- <code title="get /accounts/{account_id}/infrastructure/targets/{target_id}">client.zero_trust.access.infrastructure.targets.<a href="./src/cloudflare/resources/zero_trust/access/infrastructure/targets.py">get</a>(target_id, \*, account_id) -> <a href="./src/cloudflare/types/zero_trust/access/infrastructure/target_get_response.py">Optional</a></code>
|
||||
|
||||
### Applications
|
||||
|
||||
Types:
|
||||
|
|
@ -5374,7 +5288,7 @@ Types:
|
|||
|
||||
```python
|
||||
from cloudflare.types.zero_trust import (
|
||||
DigitalExperienceMonitor,
|
||||
DeviceExperienceMonitor,
|
||||
NetworkPath,
|
||||
NetworkPathResponse,
|
||||
Percentiles,
|
||||
|
|
@ -5447,13 +5361,9 @@ Methods:
|
|||
Types:
|
||||
|
||||
```python
|
||||
from cloudflare.types.zero_trust.dex import AggregateTimePeriod, Tests, TestListResponse
|
||||
from cloudflare.types.zero_trust.dex import AggregateTimePeriod, Tests
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="get /accounts/{account_id}/dex/tests/overview">client.zero_trust.dex.tests.<a href="./src/cloudflare/resources/zero_trust/dex/tests/tests.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/test_list_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dex/test_list_response.py">SyncV4PagePagination[TestListResponse]</a></code>
|
||||
|
||||
#### UniqueDevices
|
||||
|
||||
Types:
|
||||
|
|
@ -6082,24 +5992,24 @@ Methods:
|
|||
|
||||
- <code title="get /accounts/{account_id}/zt_risk_scoring/integrations/reference_id/{reference_id}">client.zero_trust.risk_scoring.integrations.references.<a href="./src/cloudflare/resources/zero_trust/risk_scoring/integrations/references.py">get</a>(reference_id, \*, account_id) -> <a href="./src/cloudflare/types/zero_trust/risk_scoring/integrations/reference_get_response.py">Optional</a></code>
|
||||
|
||||
# Turnstile
|
||||
# Challenges
|
||||
|
||||
## Widgets
|
||||
|
||||
Types:
|
||||
|
||||
```python
|
||||
from cloudflare.types.turnstile import Widget, WidgetDomain, WidgetListResponse
|
||||
from cloudflare.types.challenges import Widget, WidgetDomain, WidgetListResponse
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="post /accounts/{account_id}/challenges/widgets">client.turnstile.widgets.<a href="./src/cloudflare/resources/turnstile/widgets.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/turnstile/widget_create_params.py">params</a>) -> <a href="./src/cloudflare/types/turnstile/widget.py">Optional</a></code>
|
||||
- <code title="put /accounts/{account_id}/challenges/widgets/{sitekey}">client.turnstile.widgets.<a href="./src/cloudflare/resources/turnstile/widgets.py">update</a>(sitekey, \*, account_id, \*\*<a href="src/cloudflare/types/turnstile/widget_update_params.py">params</a>) -> <a href="./src/cloudflare/types/turnstile/widget.py">Optional</a></code>
|
||||
- <code title="get /accounts/{account_id}/challenges/widgets">client.turnstile.widgets.<a href="./src/cloudflare/resources/turnstile/widgets.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/turnstile/widget_list_params.py">params</a>) -> <a href="./src/cloudflare/types/turnstile/widget_list_response.py">SyncV4PagePaginationArray[WidgetListResponse]</a></code>
|
||||
- <code title="delete /accounts/{account_id}/challenges/widgets/{sitekey}">client.turnstile.widgets.<a href="./src/cloudflare/resources/turnstile/widgets.py">delete</a>(sitekey, \*, account_id) -> <a href="./src/cloudflare/types/turnstile/widget.py">Optional</a></code>
|
||||
- <code title="get /accounts/{account_id}/challenges/widgets/{sitekey}">client.turnstile.widgets.<a href="./src/cloudflare/resources/turnstile/widgets.py">get</a>(sitekey, \*, account_id) -> <a href="./src/cloudflare/types/turnstile/widget.py">Optional</a></code>
|
||||
- <code title="post /accounts/{account_id}/challenges/widgets/{sitekey}/rotate_secret">client.turnstile.widgets.<a href="./src/cloudflare/resources/turnstile/widgets.py">rotate_secret</a>(sitekey, \*, account_id, \*\*<a href="src/cloudflare/types/turnstile/widget_rotate_secret_params.py">params</a>) -> <a href="./src/cloudflare/types/turnstile/widget.py">Optional</a></code>
|
||||
- <code title="post /accounts/{account_id}/challenges/widgets">client.challenges.widgets.<a href="./src/cloudflare/resources/challenges/widgets.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/challenges/widget_create_params.py">params</a>) -> <a href="./src/cloudflare/types/challenges/widget.py">Optional</a></code>
|
||||
- <code title="put /accounts/{account_id}/challenges/widgets/{sitekey}">client.challenges.widgets.<a href="./src/cloudflare/resources/challenges/widgets.py">update</a>(sitekey, \*, account_id, \*\*<a href="src/cloudflare/types/challenges/widget_update_params.py">params</a>) -> <a href="./src/cloudflare/types/challenges/widget.py">Optional</a></code>
|
||||
- <code title="get /accounts/{account_id}/challenges/widgets">client.challenges.widgets.<a href="./src/cloudflare/resources/challenges/widgets.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/challenges/widget_list_params.py">params</a>) -> <a href="./src/cloudflare/types/challenges/widget_list_response.py">SyncV4PagePaginationArray[WidgetListResponse]</a></code>
|
||||
- <code title="delete /accounts/{account_id}/challenges/widgets/{sitekey}">client.challenges.widgets.<a href="./src/cloudflare/resources/challenges/widgets.py">delete</a>(sitekey, \*, account_id) -> <a href="./src/cloudflare/types/challenges/widget.py">Optional</a></code>
|
||||
- <code title="get /accounts/{account_id}/challenges/widgets/{sitekey}">client.challenges.widgets.<a href="./src/cloudflare/resources/challenges/widgets.py">get</a>(sitekey, \*, account_id) -> <a href="./src/cloudflare/types/challenges/widget.py">Optional</a></code>
|
||||
- <code title="post /accounts/{account_id}/challenges/widgets/{sitekey}/rotate_secret">client.challenges.widgets.<a href="./src/cloudflare/resources/challenges/widgets.py">rotate_secret</a>(sitekey, \*, account_id, \*\*<a href="src/cloudflare/types/challenges/widget_rotate_secret_params.py">params</a>) -> <a href="./src/cloudflare/types/challenges/widget.py">Optional</a></code>
|
||||
|
||||
# Hyperdrive
|
||||
|
||||
|
|
@ -6216,6 +6126,16 @@ Methods:
|
|||
|
||||
# URLScanner
|
||||
|
||||
Types:
|
||||
|
||||
```python
|
||||
from cloudflare.types.url_scanner import URLScannerScanResponse
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="get /accounts/{accountId}/urlscanner/scan">client.url_scanner.<a href="./src/cloudflare/resources/url_scanner/url_scanner.py">scan</a>(account_id, \*\*<a href="src/cloudflare/types/url_scanner/url_scanner_scan_params.py">params</a>) -> <a href="./src/cloudflare/types/url_scanner/url_scanner_scan_response.py">URLScannerScanResponse</a></code>
|
||||
|
||||
## Scans
|
||||
|
||||
Types:
|
||||
|
|
@ -6225,7 +6145,6 @@ from cloudflare.types.url_scanner import (
|
|||
URLScannerDomain,
|
||||
URLScannerTask,
|
||||
ScanCreateResponse,
|
||||
ScanListResponse,
|
||||
ScanGetResponse,
|
||||
ScanHarResponse,
|
||||
)
|
||||
|
|
@ -6234,7 +6153,6 @@ from cloudflare.types.url_scanner import (
|
|||
Methods:
|
||||
|
||||
- <code title="post /accounts/{accountId}/urlscanner/scan">client.url_scanner.scans.<a href="./src/cloudflare/resources/url_scanner/scans.py">create</a>(account_id, \*\*<a href="src/cloudflare/types/url_scanner/scan_create_params.py">params</a>) -> <a href="./src/cloudflare/types/url_scanner/scan_create_response.py">ScanCreateResponse</a></code>
|
||||
- <code title="get /accounts/{accountId}/urlscanner/scan">client.url_scanner.scans.<a href="./src/cloudflare/resources/url_scanner/scans.py">list</a>(account_id, \*\*<a href="src/cloudflare/types/url_scanner/scan_list_params.py">params</a>) -> <a href="./src/cloudflare/types/url_scanner/scan_list_response.py">ScanListResponse</a></code>
|
||||
- <code title="get /accounts/{accountId}/urlscanner/scan/{scanId}">client.url_scanner.scans.<a href="./src/cloudflare/resources/url_scanner/scans.py">get</a>(scan_id, \*, account_id, \*\*<a href="src/cloudflare/types/url_scanner/scan_get_params.py">params</a>) -> <a href="./src/cloudflare/types/url_scanner/scan_get_response.py">ScanGetResponse</a></code>
|
||||
- <code title="get /accounts/{accountId}/urlscanner/scan/{scanId}/har">client.url_scanner.scans.<a href="./src/cloudflare/resources/url_scanner/scans.py">har</a>(scan_id, \*, account_id) -> <a href="./src/cloudflare/types/url_scanner/scan_har_response.py">ScanHarResponse</a></code>
|
||||
- <code title="get /accounts/{accountId}/urlscanner/scan/{scanId}/screenshot">client.url_scanner.scans.<a href="./src/cloudflare/resources/url_scanner/scans.py">screenshot</a>(scan_id, \*, account_id, \*\*<a href="src/cloudflare/types/url_scanner/scan_screenshot_params.py">params</a>) -> BinaryAPIResponse</code>
|
||||
|
|
@ -7626,25 +7544,37 @@ Methods:
|
|||
- <code title="get /accounts/{account_identifier}/cloudforce-one/requests/priority/{priority_identifer}">client.cloudforce_one.requests.priority.<a href="./src/cloudflare/resources/cloudforce_one/requests/priority.py">get</a>(priority_identifer, \*, account_identifier) -> <a href="./src/cloudflare/types/cloudforce_one/item.py">Optional</a></code>
|
||||
- <code title="get /accounts/{account_identifier}/cloudforce-one/requests/priority/quota">client.cloudforce_one.requests.priority.<a href="./src/cloudflare/resources/cloudforce_one/requests/priority.py">quota</a>(account_identifier) -> <a href="./src/cloudflare/types/cloudforce_one/quota.py">Optional</a></code>
|
||||
|
||||
### Assets
|
||||
# EventNotifications
|
||||
|
||||
## R2
|
||||
|
||||
### Configuration
|
||||
|
||||
Types:
|
||||
|
||||
```python
|
||||
from cloudflare.types.cloudforce_one.requests import (
|
||||
AssetCreateResponse,
|
||||
AssetUpdateResponse,
|
||||
AssetDeleteResponse,
|
||||
AssetGetResponse,
|
||||
from cloudflare.types.event_notifications.r2 import ConfigurationGetResponse
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="get /accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration">client.event_notifications.r2.configuration.<a href="./src/cloudflare/resources/event_notifications/r2/configuration/configuration.py">get</a>(bucket_name, \*, account_id) -> <a href="./src/cloudflare/types/event_notifications/r2/configuration_get_response.py">ConfigurationGetResponse</a></code>
|
||||
|
||||
#### Queues
|
||||
|
||||
Types:
|
||||
|
||||
```python
|
||||
from cloudflare.types.event_notifications.r2.configuration import (
|
||||
QueueUpdateResponse,
|
||||
QueueDeleteResponse,
|
||||
)
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="post /accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}/asset">client.cloudforce_one.requests.assets.<a href="./src/cloudflare/resources/cloudforce_one/requests/assets.py">create</a>(request_identifier, \*, account_identifier, \*\*<a href="src/cloudflare/types/cloudforce_one/requests/asset_create_params.py">params</a>) -> <a href="./src/cloudflare/types/cloudforce_one/requests/asset_create_response.py">Optional</a></code>
|
||||
- <code title="put /accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}/asset/{asset_identifer}">client.cloudforce_one.requests.assets.<a href="./src/cloudflare/resources/cloudforce_one/requests/assets.py">update</a>(asset_identifer, \*, account_identifier, request_identifier, \*\*<a href="src/cloudflare/types/cloudforce_one/requests/asset_update_params.py">params</a>) -> <a href="./src/cloudflare/types/cloudforce_one/requests/asset_update_response.py">Optional</a></code>
|
||||
- <code title="delete /accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}/asset/{asset_identifer}">client.cloudforce_one.requests.assets.<a href="./src/cloudflare/resources/cloudforce_one/requests/assets.py">delete</a>(asset_identifer, \*, account_identifier, request_identifier) -> <a href="./src/cloudflare/types/cloudforce_one/requests/asset_delete_response.py">AssetDeleteResponse</a></code>
|
||||
- <code title="get /accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}/asset/{asset_identifer}">client.cloudforce_one.requests.assets.<a href="./src/cloudflare/resources/cloudforce_one/requests/assets.py">get</a>(asset_identifer, \*, account_identifier, request_identifier) -> <a href="./src/cloudflare/types/cloudforce_one/requests/asset_get_response.py">Optional</a></code>
|
||||
- <code title="put /accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration/queues/{queue_id}">client.event_notifications.r2.configuration.queues.<a href="./src/cloudflare/resources/event_notifications/r2/configuration/queues.py">update</a>(queue_id, \*, account_id, bucket_name, \*\*<a href="src/cloudflare/types/event_notifications/r2/configuration/queue_update_params.py">params</a>) -> <a href="./src/cloudflare/types/event_notifications/r2/configuration/queue_update_response.py">object</a></code>
|
||||
- <code title="delete /accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration/queues/{queue_id}">client.event_notifications.r2.configuration.queues.<a href="./src/cloudflare/resources/event_notifications/r2/configuration/queues.py">delete</a>(queue_id, \*, account_id, bucket_name) -> <a href="./src/cloudflare/types/event_notifications/r2/configuration/queue_delete_response.py">object</a></code>
|
||||
|
||||
# AIGateway
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -24,14 +24,6 @@ from .accounts import (
|
|||
AccountsResourceWithStreamingResponse,
|
||||
AsyncAccountsResourceWithStreamingResponse,
|
||||
)
|
||||
from .subscriptions import (
|
||||
SubscriptionsResource,
|
||||
AsyncSubscriptionsResource,
|
||||
SubscriptionsResourceWithRawResponse,
|
||||
AsyncSubscriptionsResourceWithRawResponse,
|
||||
SubscriptionsResourceWithStreamingResponse,
|
||||
AsyncSubscriptionsResourceWithStreamingResponse,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"MembersResource",
|
||||
|
|
@ -46,12 +38,6 @@ __all__ = [
|
|||
"AsyncRolesResourceWithRawResponse",
|
||||
"RolesResourceWithStreamingResponse",
|
||||
"AsyncRolesResourceWithStreamingResponse",
|
||||
"SubscriptionsResource",
|
||||
"AsyncSubscriptionsResource",
|
||||
"SubscriptionsResourceWithRawResponse",
|
||||
"AsyncSubscriptionsResourceWithRawResponse",
|
||||
"SubscriptionsResourceWithStreamingResponse",
|
||||
"AsyncSubscriptionsResourceWithStreamingResponse",
|
||||
"AccountsResource",
|
||||
"AsyncAccountsResource",
|
||||
"AccountsResourceWithRawResponse",
|
||||
|
|
|
|||
|
|
@ -38,14 +38,6 @@ from ..._response import (
|
|||
)
|
||||
from ..._wrappers import ResultWrapper
|
||||
from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
|
||||
from .subscriptions import (
|
||||
SubscriptionsResource,
|
||||
AsyncSubscriptionsResource,
|
||||
SubscriptionsResourceWithRawResponse,
|
||||
AsyncSubscriptionsResourceWithRawResponse,
|
||||
SubscriptionsResourceWithStreamingResponse,
|
||||
AsyncSubscriptionsResourceWithStreamingResponse,
|
||||
)
|
||||
from ..._base_client import AsyncPaginator, make_request_options
|
||||
from ...types.accounts import account_list_params, account_create_params, account_update_params
|
||||
from ...types.accounts.account import Account
|
||||
|
|
@ -63,10 +55,6 @@ class AccountsResource(SyncAPIResource):
|
|||
def roles(self) -> RolesResource:
|
||||
return RolesResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def subscriptions(self) -> SubscriptionsResource:
|
||||
return SubscriptionsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AccountsResourceWithRawResponse:
|
||||
"""
|
||||
|
|
@ -338,10 +326,6 @@ class AsyncAccountsResource(AsyncAPIResource):
|
|||
def roles(self) -> AsyncRolesResource:
|
||||
return AsyncRolesResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def subscriptions(self) -> AsyncSubscriptionsResource:
|
||||
return AsyncSubscriptionsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AsyncAccountsResourceWithRawResponse:
|
||||
"""
|
||||
|
|
@ -632,10 +616,6 @@ class AccountsResourceWithRawResponse:
|
|||
def roles(self) -> RolesResourceWithRawResponse:
|
||||
return RolesResourceWithRawResponse(self._accounts.roles)
|
||||
|
||||
@cached_property
|
||||
def subscriptions(self) -> SubscriptionsResourceWithRawResponse:
|
||||
return SubscriptionsResourceWithRawResponse(self._accounts.subscriptions)
|
||||
|
||||
|
||||
class AsyncAccountsResourceWithRawResponse:
|
||||
def __init__(self, accounts: AsyncAccountsResource) -> None:
|
||||
|
|
@ -665,10 +645,6 @@ class AsyncAccountsResourceWithRawResponse:
|
|||
def roles(self) -> AsyncRolesResourceWithRawResponse:
|
||||
return AsyncRolesResourceWithRawResponse(self._accounts.roles)
|
||||
|
||||
@cached_property
|
||||
def subscriptions(self) -> AsyncSubscriptionsResourceWithRawResponse:
|
||||
return AsyncSubscriptionsResourceWithRawResponse(self._accounts.subscriptions)
|
||||
|
||||
|
||||
class AccountsResourceWithStreamingResponse:
|
||||
def __init__(self, accounts: AccountsResource) -> None:
|
||||
|
|
@ -698,10 +674,6 @@ class AccountsResourceWithStreamingResponse:
|
|||
def roles(self) -> RolesResourceWithStreamingResponse:
|
||||
return RolesResourceWithStreamingResponse(self._accounts.roles)
|
||||
|
||||
@cached_property
|
||||
def subscriptions(self) -> SubscriptionsResourceWithStreamingResponse:
|
||||
return SubscriptionsResourceWithStreamingResponse(self._accounts.subscriptions)
|
||||
|
||||
|
||||
class AsyncAccountsResourceWithStreamingResponse:
|
||||
def __init__(self, accounts: AsyncAccountsResource) -> None:
|
||||
|
|
@ -730,7 +702,3 @@ class AsyncAccountsResourceWithStreamingResponse:
|
|||
@cached_property
|
||||
def roles(self) -> AsyncRolesResourceWithStreamingResponse:
|
||||
return AsyncRolesResourceWithStreamingResponse(self._accounts.roles)
|
||||
|
||||
@cached_property
|
||||
def subscriptions(self) -> AsyncSubscriptionsResourceWithStreamingResponse:
|
||||
return AsyncSubscriptionsResourceWithStreamingResponse(self._accounts.subscriptions)
|
||||
|
|
|
|||
|
|
@ -1,558 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Type, Optional, cast
|
||||
from typing_extensions import Literal
|
||||
|
||||
import httpx
|
||||
|
||||
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
||||
from ..._utils import (
|
||||
maybe_transform,
|
||||
async_maybe_transform,
|
||||
)
|
||||
from ..._compat import cached_property
|
||||
from ..._resource import SyncAPIResource, AsyncAPIResource
|
||||
from ..._response import (
|
||||
to_raw_response_wrapper,
|
||||
to_streamed_response_wrapper,
|
||||
async_to_raw_response_wrapper,
|
||||
async_to_streamed_response_wrapper,
|
||||
)
|
||||
from ..._wrappers import ResultWrapper
|
||||
from ..._base_client import make_request_options
|
||||
from ...types.accounts import subscription_create_params, subscription_update_params
|
||||
from ...types.shared_params.rate_plan import RatePlan
|
||||
from ...types.accounts.subscription_get_response import SubscriptionGetResponse
|
||||
from ...types.accounts.subscription_create_response import SubscriptionCreateResponse
|
||||
from ...types.accounts.subscription_delete_response import SubscriptionDeleteResponse
|
||||
from ...types.accounts.subscription_update_response import SubscriptionUpdateResponse
|
||||
|
||||
__all__ = ["SubscriptionsResource", "AsyncSubscriptionsResource"]
|
||||
|
||||
|
||||
class SubscriptionsResource(SyncAPIResource):
|
||||
@cached_property
|
||||
def with_raw_response(self) -> SubscriptionsResourceWithRawResponse:
|
||||
"""
|
||||
This property can be used as a prefix for any HTTP method call to return the
|
||||
the raw response object instead of the parsed content.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
|
||||
"""
|
||||
return SubscriptionsResourceWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> SubscriptionsResourceWithStreamingResponse:
|
||||
"""
|
||||
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
|
||||
"""
|
||||
return SubscriptionsResourceWithStreamingResponse(self)
|
||||
|
||||
def create(
|
||||
self,
|
||||
*,
|
||||
account_id: str,
|
||||
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | NotGiven = NOT_GIVEN,
|
||||
rate_plan: RatePlan | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> SubscriptionCreateResponse:
|
||||
"""
|
||||
Creates an account subscription.
|
||||
|
||||
Args:
|
||||
account_id: Identifier
|
||||
|
||||
frequency: How often the subscription is renewed automatically.
|
||||
|
||||
rate_plan: The rate plan applied to the subscription.
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
return cast(
|
||||
SubscriptionCreateResponse,
|
||||
self._post(
|
||||
f"/accounts/{account_id}/subscriptions",
|
||||
body=maybe_transform(
|
||||
{
|
||||
"frequency": frequency,
|
||||
"rate_plan": rate_plan,
|
||||
},
|
||||
subscription_create_params.SubscriptionCreateParams,
|
||||
),
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[SubscriptionCreateResponse]._unwrapper,
|
||||
),
|
||||
cast_to=cast(
|
||||
Any, ResultWrapper[SubscriptionCreateResponse]
|
||||
), # Union types cannot be passed in as arguments in the type system
|
||||
),
|
||||
)
|
||||
|
||||
def update(
|
||||
self,
|
||||
subscription_identifier: str,
|
||||
*,
|
||||
account_id: str,
|
||||
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | NotGiven = NOT_GIVEN,
|
||||
rate_plan: RatePlan | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> SubscriptionUpdateResponse:
|
||||
"""
|
||||
Updates an account subscription.
|
||||
|
||||
Args:
|
||||
account_id: Identifier
|
||||
|
||||
subscription_identifier: Subscription identifier tag.
|
||||
|
||||
frequency: How often the subscription is renewed automatically.
|
||||
|
||||
rate_plan: The rate plan applied to the subscription.
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
if not subscription_identifier:
|
||||
raise ValueError(
|
||||
f"Expected a non-empty value for `subscription_identifier` but received {subscription_identifier!r}"
|
||||
)
|
||||
return cast(
|
||||
SubscriptionUpdateResponse,
|
||||
self._put(
|
||||
f"/accounts/{account_id}/subscriptions/{subscription_identifier}",
|
||||
body=maybe_transform(
|
||||
{
|
||||
"frequency": frequency,
|
||||
"rate_plan": rate_plan,
|
||||
},
|
||||
subscription_update_params.SubscriptionUpdateParams,
|
||||
),
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[SubscriptionUpdateResponse]._unwrapper,
|
||||
),
|
||||
cast_to=cast(
|
||||
Any, ResultWrapper[SubscriptionUpdateResponse]
|
||||
), # Union types cannot be passed in as arguments in the type system
|
||||
),
|
||||
)
|
||||
|
||||
def delete(
|
||||
self,
|
||||
subscription_identifier: str,
|
||||
*,
|
||||
account_id: str,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> SubscriptionDeleteResponse:
|
||||
"""
|
||||
Deletes an account's subscription.
|
||||
|
||||
Args:
|
||||
account_id: Identifier
|
||||
|
||||
subscription_identifier: Subscription identifier tag.
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
if not subscription_identifier:
|
||||
raise ValueError(
|
||||
f"Expected a non-empty value for `subscription_identifier` but received {subscription_identifier!r}"
|
||||
)
|
||||
return self._delete(
|
||||
f"/accounts/{account_id}/subscriptions/{subscription_identifier}",
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[SubscriptionDeleteResponse]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[SubscriptionDeleteResponse], ResultWrapper[SubscriptionDeleteResponse]),
|
||||
)
|
||||
|
||||
def get(
|
||||
self,
|
||||
*,
|
||||
account_id: str,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> Optional[SubscriptionGetResponse]:
|
||||
"""
|
||||
Lists all of an account's subscriptions.
|
||||
|
||||
Args:
|
||||
account_id: Identifier
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
return self._get(
|
||||
f"/accounts/{account_id}/subscriptions",
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[Optional[SubscriptionGetResponse]]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[Optional[SubscriptionGetResponse]], ResultWrapper[SubscriptionGetResponse]),
|
||||
)
|
||||
|
||||
|
||||
class AsyncSubscriptionsResource(AsyncAPIResource):
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AsyncSubscriptionsResourceWithRawResponse:
|
||||
"""
|
||||
This property can be used as a prefix for any HTTP method call to return the
|
||||
the raw response object instead of the parsed content.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
|
||||
"""
|
||||
return AsyncSubscriptionsResourceWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> AsyncSubscriptionsResourceWithStreamingResponse:
|
||||
"""
|
||||
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
|
||||
"""
|
||||
return AsyncSubscriptionsResourceWithStreamingResponse(self)
|
||||
|
||||
async def create(
|
||||
self,
|
||||
*,
|
||||
account_id: str,
|
||||
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | NotGiven = NOT_GIVEN,
|
||||
rate_plan: RatePlan | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> SubscriptionCreateResponse:
|
||||
"""
|
||||
Creates an account subscription.
|
||||
|
||||
Args:
|
||||
account_id: Identifier
|
||||
|
||||
frequency: How often the subscription is renewed automatically.
|
||||
|
||||
rate_plan: The rate plan applied to the subscription.
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
return cast(
|
||||
SubscriptionCreateResponse,
|
||||
await self._post(
|
||||
f"/accounts/{account_id}/subscriptions",
|
||||
body=await async_maybe_transform(
|
||||
{
|
||||
"frequency": frequency,
|
||||
"rate_plan": rate_plan,
|
||||
},
|
||||
subscription_create_params.SubscriptionCreateParams,
|
||||
),
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[SubscriptionCreateResponse]._unwrapper,
|
||||
),
|
||||
cast_to=cast(
|
||||
Any, ResultWrapper[SubscriptionCreateResponse]
|
||||
), # Union types cannot be passed in as arguments in the type system
|
||||
),
|
||||
)
|
||||
|
||||
async def update(
|
||||
self,
|
||||
subscription_identifier: str,
|
||||
*,
|
||||
account_id: str,
|
||||
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | NotGiven = NOT_GIVEN,
|
||||
rate_plan: RatePlan | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> SubscriptionUpdateResponse:
|
||||
"""
|
||||
Updates an account subscription.
|
||||
|
||||
Args:
|
||||
account_id: Identifier
|
||||
|
||||
subscription_identifier: Subscription identifier tag.
|
||||
|
||||
frequency: How often the subscription is renewed automatically.
|
||||
|
||||
rate_plan: The rate plan applied to the subscription.
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
if not subscription_identifier:
|
||||
raise ValueError(
|
||||
f"Expected a non-empty value for `subscription_identifier` but received {subscription_identifier!r}"
|
||||
)
|
||||
return cast(
|
||||
SubscriptionUpdateResponse,
|
||||
await self._put(
|
||||
f"/accounts/{account_id}/subscriptions/{subscription_identifier}",
|
||||
body=await async_maybe_transform(
|
||||
{
|
||||
"frequency": frequency,
|
||||
"rate_plan": rate_plan,
|
||||
},
|
||||
subscription_update_params.SubscriptionUpdateParams,
|
||||
),
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[SubscriptionUpdateResponse]._unwrapper,
|
||||
),
|
||||
cast_to=cast(
|
||||
Any, ResultWrapper[SubscriptionUpdateResponse]
|
||||
), # Union types cannot be passed in as arguments in the type system
|
||||
),
|
||||
)
|
||||
|
||||
async def delete(
|
||||
self,
|
||||
subscription_identifier: str,
|
||||
*,
|
||||
account_id: str,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> SubscriptionDeleteResponse:
|
||||
"""
|
||||
Deletes an account's subscription.
|
||||
|
||||
Args:
|
||||
account_id: Identifier
|
||||
|
||||
subscription_identifier: Subscription identifier tag.
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
if not subscription_identifier:
|
||||
raise ValueError(
|
||||
f"Expected a non-empty value for `subscription_identifier` but received {subscription_identifier!r}"
|
||||
)
|
||||
return await self._delete(
|
||||
f"/accounts/{account_id}/subscriptions/{subscription_identifier}",
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[SubscriptionDeleteResponse]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[SubscriptionDeleteResponse], ResultWrapper[SubscriptionDeleteResponse]),
|
||||
)
|
||||
|
||||
async def get(
|
||||
self,
|
||||
*,
|
||||
account_id: str,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> Optional[SubscriptionGetResponse]:
|
||||
"""
|
||||
Lists all of an account's subscriptions.
|
||||
|
||||
Args:
|
||||
account_id: Identifier
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
return await self._get(
|
||||
f"/accounts/{account_id}/subscriptions",
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[Optional[SubscriptionGetResponse]]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[Optional[SubscriptionGetResponse]], ResultWrapper[SubscriptionGetResponse]),
|
||||
)
|
||||
|
||||
|
||||
class SubscriptionsResourceWithRawResponse:
|
||||
def __init__(self, subscriptions: SubscriptionsResource) -> None:
|
||||
self._subscriptions = subscriptions
|
||||
|
||||
self.create = to_raw_response_wrapper(
|
||||
subscriptions.create,
|
||||
)
|
||||
self.update = to_raw_response_wrapper(
|
||||
subscriptions.update,
|
||||
)
|
||||
self.delete = to_raw_response_wrapper(
|
||||
subscriptions.delete,
|
||||
)
|
||||
self.get = to_raw_response_wrapper(
|
||||
subscriptions.get,
|
||||
)
|
||||
|
||||
|
||||
class AsyncSubscriptionsResourceWithRawResponse:
|
||||
def __init__(self, subscriptions: AsyncSubscriptionsResource) -> None:
|
||||
self._subscriptions = subscriptions
|
||||
|
||||
self.create = async_to_raw_response_wrapper(
|
||||
subscriptions.create,
|
||||
)
|
||||
self.update = async_to_raw_response_wrapper(
|
||||
subscriptions.update,
|
||||
)
|
||||
self.delete = async_to_raw_response_wrapper(
|
||||
subscriptions.delete,
|
||||
)
|
||||
self.get = async_to_raw_response_wrapper(
|
||||
subscriptions.get,
|
||||
)
|
||||
|
||||
|
||||
class SubscriptionsResourceWithStreamingResponse:
|
||||
def __init__(self, subscriptions: SubscriptionsResource) -> None:
|
||||
self._subscriptions = subscriptions
|
||||
|
||||
self.create = to_streamed_response_wrapper(
|
||||
subscriptions.create,
|
||||
)
|
||||
self.update = to_streamed_response_wrapper(
|
||||
subscriptions.update,
|
||||
)
|
||||
self.delete = to_streamed_response_wrapper(
|
||||
subscriptions.delete,
|
||||
)
|
||||
self.get = to_streamed_response_wrapper(
|
||||
subscriptions.get,
|
||||
)
|
||||
|
||||
|
||||
class AsyncSubscriptionsResourceWithStreamingResponse:
|
||||
def __init__(self, subscriptions: AsyncSubscriptionsResource) -> None:
|
||||
self._subscriptions = subscriptions
|
||||
|
||||
self.create = async_to_streamed_response_wrapper(
|
||||
subscriptions.create,
|
||||
)
|
||||
self.update = async_to_streamed_response_wrapper(
|
||||
subscriptions.update,
|
||||
)
|
||||
self.delete = async_to_streamed_response_wrapper(
|
||||
subscriptions.delete,
|
||||
)
|
||||
self.get = async_to_streamed_response_wrapper(
|
||||
subscriptions.get,
|
||||
)
|
||||
|
|
@ -54,7 +54,7 @@ class LogsResource(SyncAPIResource):
|
|||
cached: bool | NotGiven = NOT_GIVEN,
|
||||
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
|
||||
end_date: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
||||
feedback: Literal[0, 1] | NotGiven = NOT_GIVEN,
|
||||
feedback: Literal[-1, 0, 1] | NotGiven = NOT_GIVEN,
|
||||
max_cost: float | NotGiven = NOT_GIVEN,
|
||||
max_duration: float | NotGiven = NOT_GIVEN,
|
||||
max_tokens_in: float | NotGiven = NOT_GIVEN,
|
||||
|
|
@ -176,7 +176,7 @@ class AsyncLogsResource(AsyncAPIResource):
|
|||
cached: bool | NotGiven = NOT_GIVEN,
|
||||
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
|
||||
end_date: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
||||
feedback: Literal[0, 1] | NotGiven = NOT_GIVEN,
|
||||
feedback: Literal[-1, 0, 1] | NotGiven = NOT_GIVEN,
|
||||
max_cost: float | NotGiven = NOT_GIVEN,
|
||||
max_duration: float | NotGiven = NOT_GIVEN,
|
||||
max_tokens_in: float | NotGiven = NOT_GIVEN,
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ from .widgets import (
|
|||
WidgetsResourceWithStreamingResponse,
|
||||
AsyncWidgetsResourceWithStreamingResponse,
|
||||
)
|
||||
from .turnstile import (
|
||||
TurnstileResource,
|
||||
AsyncTurnstileResource,
|
||||
TurnstileResourceWithRawResponse,
|
||||
AsyncTurnstileResourceWithRawResponse,
|
||||
TurnstileResourceWithStreamingResponse,
|
||||
AsyncTurnstileResourceWithStreamingResponse,
|
||||
from .challenges import (
|
||||
ChallengesResource,
|
||||
AsyncChallengesResource,
|
||||
ChallengesResourceWithRawResponse,
|
||||
AsyncChallengesResourceWithRawResponse,
|
||||
ChallengesResourceWithStreamingResponse,
|
||||
AsyncChallengesResourceWithStreamingResponse,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
|
|
@ -24,10 +24,10 @@ __all__ = [
|
|||
"AsyncWidgetsResourceWithRawResponse",
|
||||
"WidgetsResourceWithStreamingResponse",
|
||||
"AsyncWidgetsResourceWithStreamingResponse",
|
||||
"TurnstileResource",
|
||||
"AsyncTurnstileResource",
|
||||
"TurnstileResourceWithRawResponse",
|
||||
"AsyncTurnstileResourceWithRawResponse",
|
||||
"TurnstileResourceWithStreamingResponse",
|
||||
"AsyncTurnstileResourceWithStreamingResponse",
|
||||
"ChallengesResource",
|
||||
"AsyncChallengesResource",
|
||||
"ChallengesResourceWithRawResponse",
|
||||
"AsyncChallengesResourceWithRawResponse",
|
||||
"ChallengesResourceWithStreamingResponse",
|
||||
"AsyncChallengesResourceWithStreamingResponse",
|
||||
]
|
||||
|
|
@ -13,90 +13,90 @@ from .widgets import (
|
|||
from ..._compat import cached_property
|
||||
from ..._resource import SyncAPIResource, AsyncAPIResource
|
||||
|
||||
__all__ = ["TurnstileResource", "AsyncTurnstileResource"]
|
||||
__all__ = ["ChallengesResource", "AsyncChallengesResource"]
|
||||
|
||||
|
||||
class TurnstileResource(SyncAPIResource):
|
||||
class ChallengesResource(SyncAPIResource):
|
||||
@cached_property
|
||||
def widgets(self) -> WidgetsResource:
|
||||
return WidgetsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> TurnstileResourceWithRawResponse:
|
||||
def with_raw_response(self) -> ChallengesResourceWithRawResponse:
|
||||
"""
|
||||
This property can be used as a prefix for any HTTP method call to return the
|
||||
the raw response object instead of the parsed content.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
|
||||
"""
|
||||
return TurnstileResourceWithRawResponse(self)
|
||||
return ChallengesResourceWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> TurnstileResourceWithStreamingResponse:
|
||||
def with_streaming_response(self) -> ChallengesResourceWithStreamingResponse:
|
||||
"""
|
||||
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
|
||||
"""
|
||||
return TurnstileResourceWithStreamingResponse(self)
|
||||
return ChallengesResourceWithStreamingResponse(self)
|
||||
|
||||
|
||||
class AsyncTurnstileResource(AsyncAPIResource):
|
||||
class AsyncChallengesResource(AsyncAPIResource):
|
||||
@cached_property
|
||||
def widgets(self) -> AsyncWidgetsResource:
|
||||
return AsyncWidgetsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AsyncTurnstileResourceWithRawResponse:
|
||||
def with_raw_response(self) -> AsyncChallengesResourceWithRawResponse:
|
||||
"""
|
||||
This property can be used as a prefix for any HTTP method call to return the
|
||||
the raw response object instead of the parsed content.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
|
||||
"""
|
||||
return AsyncTurnstileResourceWithRawResponse(self)
|
||||
return AsyncChallengesResourceWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> AsyncTurnstileResourceWithStreamingResponse:
|
||||
def with_streaming_response(self) -> AsyncChallengesResourceWithStreamingResponse:
|
||||
"""
|
||||
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
|
||||
"""
|
||||
return AsyncTurnstileResourceWithStreamingResponse(self)
|
||||
return AsyncChallengesResourceWithStreamingResponse(self)
|
||||
|
||||
|
||||
class TurnstileResourceWithRawResponse:
|
||||
def __init__(self, turnstile: TurnstileResource) -> None:
|
||||
self._turnstile = turnstile
|
||||
class ChallengesResourceWithRawResponse:
|
||||
def __init__(self, challenges: ChallengesResource) -> None:
|
||||
self._challenges = challenges
|
||||
|
||||
@cached_property
|
||||
def widgets(self) -> WidgetsResourceWithRawResponse:
|
||||
return WidgetsResourceWithRawResponse(self._turnstile.widgets)
|
||||
return WidgetsResourceWithRawResponse(self._challenges.widgets)
|
||||
|
||||
|
||||
class AsyncTurnstileResourceWithRawResponse:
|
||||
def __init__(self, turnstile: AsyncTurnstileResource) -> None:
|
||||
self._turnstile = turnstile
|
||||
class AsyncChallengesResourceWithRawResponse:
|
||||
def __init__(self, challenges: AsyncChallengesResource) -> None:
|
||||
self._challenges = challenges
|
||||
|
||||
@cached_property
|
||||
def widgets(self) -> AsyncWidgetsResourceWithRawResponse:
|
||||
return AsyncWidgetsResourceWithRawResponse(self._turnstile.widgets)
|
||||
return AsyncWidgetsResourceWithRawResponse(self._challenges.widgets)
|
||||
|
||||
|
||||
class TurnstileResourceWithStreamingResponse:
|
||||
def __init__(self, turnstile: TurnstileResource) -> None:
|
||||
self._turnstile = turnstile
|
||||
class ChallengesResourceWithStreamingResponse:
|
||||
def __init__(self, challenges: ChallengesResource) -> None:
|
||||
self._challenges = challenges
|
||||
|
||||
@cached_property
|
||||
def widgets(self) -> WidgetsResourceWithStreamingResponse:
|
||||
return WidgetsResourceWithStreamingResponse(self._turnstile.widgets)
|
||||
return WidgetsResourceWithStreamingResponse(self._challenges.widgets)
|
||||
|
||||
|
||||
class AsyncTurnstileResourceWithStreamingResponse:
|
||||
def __init__(self, turnstile: AsyncTurnstileResource) -> None:
|
||||
self._turnstile = turnstile
|
||||
class AsyncChallengesResourceWithStreamingResponse:
|
||||
def __init__(self, challenges: AsyncChallengesResource) -> None:
|
||||
self._challenges = challenges
|
||||
|
||||
@cached_property
|
||||
def widgets(self) -> AsyncWidgetsResourceWithStreamingResponse:
|
||||
return AsyncWidgetsResourceWithStreamingResponse(self._turnstile.widgets)
|
||||
return AsyncWidgetsResourceWithStreamingResponse(self._challenges.widgets)
|
||||
|
|
@ -23,15 +23,15 @@ from ..._response import (
|
|||
from ..._wrappers import ResultWrapper
|
||||
from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
|
||||
from ..._base_client import AsyncPaginator, make_request_options
|
||||
from ...types.turnstile import (
|
||||
from ...types.challenges import (
|
||||
widget_list_params,
|
||||
widget_create_params,
|
||||
widget_update_params,
|
||||
widget_rotate_secret_params,
|
||||
)
|
||||
from ...types.turnstile.widget import Widget
|
||||
from ...types.turnstile.widget_domain import WidgetDomain
|
||||
from ...types.turnstile.widget_list_response import WidgetListResponse
|
||||
from ...types.challenges.widget import Widget
|
||||
from ...types.challenges.widget_domain import WidgetDomain
|
||||
from ...types.challenges.widget_list_response import WidgetListResponse
|
||||
|
||||
__all__ = ["WidgetsResource", "AsyncWidgetsResource"]
|
||||
|
||||
|
|
@ -1,13 +1,5 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from .assets import (
|
||||
AssetsResource,
|
||||
AsyncAssetsResource,
|
||||
AssetsResourceWithRawResponse,
|
||||
AsyncAssetsResourceWithRawResponse,
|
||||
AssetsResourceWithStreamingResponse,
|
||||
AsyncAssetsResourceWithStreamingResponse,
|
||||
)
|
||||
from .message import (
|
||||
MessageResource,
|
||||
AsyncMessageResource,
|
||||
|
|
@ -46,12 +38,6 @@ __all__ = [
|
|||
"AsyncPriorityResourceWithRawResponse",
|
||||
"PriorityResourceWithStreamingResponse",
|
||||
"AsyncPriorityResourceWithStreamingResponse",
|
||||
"AssetsResource",
|
||||
"AsyncAssetsResource",
|
||||
"AssetsResourceWithRawResponse",
|
||||
"AsyncAssetsResourceWithRawResponse",
|
||||
"AssetsResourceWithStreamingResponse",
|
||||
"AsyncAssetsResourceWithStreamingResponse",
|
||||
"RequestsResource",
|
||||
"AsyncRequestsResource",
|
||||
"RequestsResourceWithRawResponse",
|
||||
|
|
|
|||
|
|
@ -1,552 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Type, Optional, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
||||
from ...._utils import (
|
||||
maybe_transform,
|
||||
async_maybe_transform,
|
||||
)
|
||||
from ...._compat import cached_property
|
||||
from ...._resource import SyncAPIResource, AsyncAPIResource
|
||||
from ...._response import (
|
||||
to_raw_response_wrapper,
|
||||
to_streamed_response_wrapper,
|
||||
async_to_raw_response_wrapper,
|
||||
async_to_streamed_response_wrapper,
|
||||
)
|
||||
from ...._wrappers import ResultWrapper
|
||||
from ...._base_client import make_request_options
|
||||
from ....types.cloudforce_one.requests import asset_create_params, asset_update_params
|
||||
from ....types.cloudforce_one.requests.asset_get_response import AssetGetResponse
|
||||
from ....types.cloudforce_one.requests.asset_create_response import AssetCreateResponse
|
||||
from ....types.cloudforce_one.requests.asset_delete_response import AssetDeleteResponse
|
||||
from ....types.cloudforce_one.requests.asset_update_response import AssetUpdateResponse
|
||||
|
||||
__all__ = ["AssetsResource", "AsyncAssetsResource"]
|
||||
|
||||
|
||||
class AssetsResource(SyncAPIResource):
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AssetsResourceWithRawResponse:
|
||||
"""
|
||||
This property can be used as a prefix for any HTTP method call to return the
|
||||
the raw response object instead of the parsed content.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
|
||||
"""
|
||||
return AssetsResourceWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> AssetsResourceWithStreamingResponse:
|
||||
"""
|
||||
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
|
||||
"""
|
||||
return AssetsResourceWithStreamingResponse(self)
|
||||
|
||||
def create(
|
||||
self,
|
||||
request_identifier: str,
|
||||
*,
|
||||
account_identifier: str,
|
||||
page: int,
|
||||
per_page: int,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> Optional[AssetCreateResponse]:
|
||||
"""
|
||||
List Request Assets
|
||||
|
||||
Args:
|
||||
account_identifier: Identifier
|
||||
|
||||
request_identifier: UUID
|
||||
|
||||
page: Page number of results
|
||||
|
||||
per_page: Number of results per page
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_identifier:
|
||||
raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}")
|
||||
if not request_identifier:
|
||||
raise ValueError(f"Expected a non-empty value for `request_identifier` but received {request_identifier!r}")
|
||||
return self._post(
|
||||
f"/accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}/asset",
|
||||
body=maybe_transform(
|
||||
{
|
||||
"page": page,
|
||||
"per_page": per_page,
|
||||
},
|
||||
asset_create_params.AssetCreateParams,
|
||||
),
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[Optional[AssetCreateResponse]]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[Optional[AssetCreateResponse]], ResultWrapper[AssetCreateResponse]),
|
||||
)
|
||||
|
||||
def update(
|
||||
self,
|
||||
asset_identifer: str,
|
||||
*,
|
||||
account_identifier: str,
|
||||
request_identifier: str,
|
||||
source: str | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> Optional[AssetUpdateResponse]:
|
||||
"""
|
||||
Update a Request Asset
|
||||
|
||||
Args:
|
||||
account_identifier: Identifier
|
||||
|
||||
request_identifier: UUID
|
||||
|
||||
asset_identifer: UUID
|
||||
|
||||
source: Asset file to upload
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_identifier:
|
||||
raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}")
|
||||
if not request_identifier:
|
||||
raise ValueError(f"Expected a non-empty value for `request_identifier` but received {request_identifier!r}")
|
||||
if not asset_identifer:
|
||||
raise ValueError(f"Expected a non-empty value for `asset_identifer` but received {asset_identifer!r}")
|
||||
return self._put(
|
||||
f"/accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}/asset/{asset_identifer}",
|
||||
body=maybe_transform({"source": source}, asset_update_params.AssetUpdateParams),
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[Optional[AssetUpdateResponse]]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[Optional[AssetUpdateResponse]], ResultWrapper[AssetUpdateResponse]),
|
||||
)
|
||||
|
||||
def delete(
|
||||
self,
|
||||
asset_identifer: str,
|
||||
*,
|
||||
account_identifier: str,
|
||||
request_identifier: str,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> AssetDeleteResponse:
|
||||
"""
|
||||
Delete a Request Asset
|
||||
|
||||
Args:
|
||||
account_identifier: Identifier
|
||||
|
||||
request_identifier: UUID
|
||||
|
||||
asset_identifer: UUID
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_identifier:
|
||||
raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}")
|
||||
if not request_identifier:
|
||||
raise ValueError(f"Expected a non-empty value for `request_identifier` but received {request_identifier!r}")
|
||||
if not asset_identifer:
|
||||
raise ValueError(f"Expected a non-empty value for `asset_identifer` but received {asset_identifer!r}")
|
||||
return self._delete(
|
||||
f"/accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}/asset/{asset_identifer}",
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
||||
),
|
||||
cast_to=AssetDeleteResponse,
|
||||
)
|
||||
|
||||
def get(
|
||||
self,
|
||||
asset_identifer: str,
|
||||
*,
|
||||
account_identifier: str,
|
||||
request_identifier: str,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> Optional[AssetGetResponse]:
|
||||
"""
|
||||
Get a Request Asset
|
||||
|
||||
Args:
|
||||
account_identifier: Identifier
|
||||
|
||||
request_identifier: UUID
|
||||
|
||||
asset_identifer: UUID
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_identifier:
|
||||
raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}")
|
||||
if not request_identifier:
|
||||
raise ValueError(f"Expected a non-empty value for `request_identifier` but received {request_identifier!r}")
|
||||
if not asset_identifer:
|
||||
raise ValueError(f"Expected a non-empty value for `asset_identifer` but received {asset_identifer!r}")
|
||||
return self._get(
|
||||
f"/accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}/asset/{asset_identifer}",
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[Optional[AssetGetResponse]]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[Optional[AssetGetResponse]], ResultWrapper[AssetGetResponse]),
|
||||
)
|
||||
|
||||
|
||||
class AsyncAssetsResource(AsyncAPIResource):
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AsyncAssetsResourceWithRawResponse:
|
||||
"""
|
||||
This property can be used as a prefix for any HTTP method call to return the
|
||||
the raw response object instead of the parsed content.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
|
||||
"""
|
||||
return AsyncAssetsResourceWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> AsyncAssetsResourceWithStreamingResponse:
|
||||
"""
|
||||
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
|
||||
"""
|
||||
return AsyncAssetsResourceWithStreamingResponse(self)
|
||||
|
||||
async def create(
|
||||
self,
|
||||
request_identifier: str,
|
||||
*,
|
||||
account_identifier: str,
|
||||
page: int,
|
||||
per_page: int,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> Optional[AssetCreateResponse]:
|
||||
"""
|
||||
List Request Assets
|
||||
|
||||
Args:
|
||||
account_identifier: Identifier
|
||||
|
||||
request_identifier: UUID
|
||||
|
||||
page: Page number of results
|
||||
|
||||
per_page: Number of results per page
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_identifier:
|
||||
raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}")
|
||||
if not request_identifier:
|
||||
raise ValueError(f"Expected a non-empty value for `request_identifier` but received {request_identifier!r}")
|
||||
return await self._post(
|
||||
f"/accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}/asset",
|
||||
body=await async_maybe_transform(
|
||||
{
|
||||
"page": page,
|
||||
"per_page": per_page,
|
||||
},
|
||||
asset_create_params.AssetCreateParams,
|
||||
),
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[Optional[AssetCreateResponse]]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[Optional[AssetCreateResponse]], ResultWrapper[AssetCreateResponse]),
|
||||
)
|
||||
|
||||
async def update(
|
||||
self,
|
||||
asset_identifer: str,
|
||||
*,
|
||||
account_identifier: str,
|
||||
request_identifier: str,
|
||||
source: str | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> Optional[AssetUpdateResponse]:
|
||||
"""
|
||||
Update a Request Asset
|
||||
|
||||
Args:
|
||||
account_identifier: Identifier
|
||||
|
||||
request_identifier: UUID
|
||||
|
||||
asset_identifer: UUID
|
||||
|
||||
source: Asset file to upload
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_identifier:
|
||||
raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}")
|
||||
if not request_identifier:
|
||||
raise ValueError(f"Expected a non-empty value for `request_identifier` but received {request_identifier!r}")
|
||||
if not asset_identifer:
|
||||
raise ValueError(f"Expected a non-empty value for `asset_identifer` but received {asset_identifer!r}")
|
||||
return await self._put(
|
||||
f"/accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}/asset/{asset_identifer}",
|
||||
body=await async_maybe_transform({"source": source}, asset_update_params.AssetUpdateParams),
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[Optional[AssetUpdateResponse]]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[Optional[AssetUpdateResponse]], ResultWrapper[AssetUpdateResponse]),
|
||||
)
|
||||
|
||||
async def delete(
|
||||
self,
|
||||
asset_identifer: str,
|
||||
*,
|
||||
account_identifier: str,
|
||||
request_identifier: str,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> AssetDeleteResponse:
|
||||
"""
|
||||
Delete a Request Asset
|
||||
|
||||
Args:
|
||||
account_identifier: Identifier
|
||||
|
||||
request_identifier: UUID
|
||||
|
||||
asset_identifer: UUID
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_identifier:
|
||||
raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}")
|
||||
if not request_identifier:
|
||||
raise ValueError(f"Expected a non-empty value for `request_identifier` but received {request_identifier!r}")
|
||||
if not asset_identifer:
|
||||
raise ValueError(f"Expected a non-empty value for `asset_identifer` but received {asset_identifer!r}")
|
||||
return await self._delete(
|
||||
f"/accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}/asset/{asset_identifer}",
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
||||
),
|
||||
cast_to=AssetDeleteResponse,
|
||||
)
|
||||
|
||||
async def get(
|
||||
self,
|
||||
asset_identifer: str,
|
||||
*,
|
||||
account_identifier: str,
|
||||
request_identifier: str,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> Optional[AssetGetResponse]:
|
||||
"""
|
||||
Get a Request Asset
|
||||
|
||||
Args:
|
||||
account_identifier: Identifier
|
||||
|
||||
request_identifier: UUID
|
||||
|
||||
asset_identifer: UUID
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_identifier:
|
||||
raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}")
|
||||
if not request_identifier:
|
||||
raise ValueError(f"Expected a non-empty value for `request_identifier` but received {request_identifier!r}")
|
||||
if not asset_identifer:
|
||||
raise ValueError(f"Expected a non-empty value for `asset_identifer` but received {asset_identifer!r}")
|
||||
return await self._get(
|
||||
f"/accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}/asset/{asset_identifer}",
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[Optional[AssetGetResponse]]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[Optional[AssetGetResponse]], ResultWrapper[AssetGetResponse]),
|
||||
)
|
||||
|
||||
|
||||
class AssetsResourceWithRawResponse:
|
||||
def __init__(self, assets: AssetsResource) -> None:
|
||||
self._assets = assets
|
||||
|
||||
self.create = to_raw_response_wrapper(
|
||||
assets.create,
|
||||
)
|
||||
self.update = to_raw_response_wrapper(
|
||||
assets.update,
|
||||
)
|
||||
self.delete = to_raw_response_wrapper(
|
||||
assets.delete,
|
||||
)
|
||||
self.get = to_raw_response_wrapper(
|
||||
assets.get,
|
||||
)
|
||||
|
||||
|
||||
class AsyncAssetsResourceWithRawResponse:
|
||||
def __init__(self, assets: AsyncAssetsResource) -> None:
|
||||
self._assets = assets
|
||||
|
||||
self.create = async_to_raw_response_wrapper(
|
||||
assets.create,
|
||||
)
|
||||
self.update = async_to_raw_response_wrapper(
|
||||
assets.update,
|
||||
)
|
||||
self.delete = async_to_raw_response_wrapper(
|
||||
assets.delete,
|
||||
)
|
||||
self.get = async_to_raw_response_wrapper(
|
||||
assets.get,
|
||||
)
|
||||
|
||||
|
||||
class AssetsResourceWithStreamingResponse:
|
||||
def __init__(self, assets: AssetsResource) -> None:
|
||||
self._assets = assets
|
||||
|
||||
self.create = to_streamed_response_wrapper(
|
||||
assets.create,
|
||||
)
|
||||
self.update = to_streamed_response_wrapper(
|
||||
assets.update,
|
||||
)
|
||||
self.delete = to_streamed_response_wrapper(
|
||||
assets.delete,
|
||||
)
|
||||
self.get = to_streamed_response_wrapper(
|
||||
assets.get,
|
||||
)
|
||||
|
||||
|
||||
class AsyncAssetsResourceWithStreamingResponse:
|
||||
def __init__(self, assets: AsyncAssetsResource) -> None:
|
||||
self._assets = assets
|
||||
|
||||
self.create = async_to_streamed_response_wrapper(
|
||||
assets.create,
|
||||
)
|
||||
self.update = async_to_streamed_response_wrapper(
|
||||
assets.update,
|
||||
)
|
||||
self.delete = async_to_streamed_response_wrapper(
|
||||
assets.delete,
|
||||
)
|
||||
self.get = async_to_streamed_response_wrapper(
|
||||
assets.get,
|
||||
)
|
||||
|
|
@ -8,14 +8,6 @@ from typing_extensions import Literal
|
|||
|
||||
import httpx
|
||||
|
||||
from .assets import (
|
||||
AssetsResource,
|
||||
AsyncAssetsResource,
|
||||
AssetsResourceWithRawResponse,
|
||||
AsyncAssetsResourceWithRawResponse,
|
||||
AssetsResourceWithStreamingResponse,
|
||||
AsyncAssetsResourceWithStreamingResponse,
|
||||
)
|
||||
from .message import (
|
||||
MessageResource,
|
||||
AsyncMessageResource,
|
||||
|
|
@ -68,10 +60,6 @@ class RequestsResource(SyncAPIResource):
|
|||
def priority(self) -> PriorityResource:
|
||||
return PriorityResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def assets(self) -> AssetsResource:
|
||||
return AssetsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> RequestsResourceWithRawResponse:
|
||||
"""
|
||||
|
|
@ -522,10 +510,6 @@ class AsyncRequestsResource(AsyncAPIResource):
|
|||
def priority(self) -> AsyncPriorityResource:
|
||||
return AsyncPriorityResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def assets(self) -> AsyncAssetsResource:
|
||||
return AsyncAssetsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AsyncRequestsResourceWithRawResponse:
|
||||
"""
|
||||
|
|
@ -1004,10 +988,6 @@ class RequestsResourceWithRawResponse:
|
|||
def priority(self) -> PriorityResourceWithRawResponse:
|
||||
return PriorityResourceWithRawResponse(self._requests.priority)
|
||||
|
||||
@cached_property
|
||||
def assets(self) -> AssetsResourceWithRawResponse:
|
||||
return AssetsResourceWithRawResponse(self._requests.assets)
|
||||
|
||||
|
||||
class AsyncRequestsResourceWithRawResponse:
|
||||
def __init__(self, requests: AsyncRequestsResource) -> None:
|
||||
|
|
@ -1046,10 +1026,6 @@ class AsyncRequestsResourceWithRawResponse:
|
|||
def priority(self) -> AsyncPriorityResourceWithRawResponse:
|
||||
return AsyncPriorityResourceWithRawResponse(self._requests.priority)
|
||||
|
||||
@cached_property
|
||||
def assets(self) -> AsyncAssetsResourceWithRawResponse:
|
||||
return AsyncAssetsResourceWithRawResponse(self._requests.assets)
|
||||
|
||||
|
||||
class RequestsResourceWithStreamingResponse:
|
||||
def __init__(self, requests: RequestsResource) -> None:
|
||||
|
|
@ -1088,10 +1064,6 @@ class RequestsResourceWithStreamingResponse:
|
|||
def priority(self) -> PriorityResourceWithStreamingResponse:
|
||||
return PriorityResourceWithStreamingResponse(self._requests.priority)
|
||||
|
||||
@cached_property
|
||||
def assets(self) -> AssetsResourceWithStreamingResponse:
|
||||
return AssetsResourceWithStreamingResponse(self._requests.assets)
|
||||
|
||||
|
||||
class AsyncRequestsResourceWithStreamingResponse:
|
||||
def __init__(self, requests: AsyncRequestsResource) -> None:
|
||||
|
|
@ -1129,7 +1101,3 @@ class AsyncRequestsResourceWithStreamingResponse:
|
|||
@cached_property
|
||||
def priority(self) -> AsyncPriorityResourceWithStreamingResponse:
|
||||
return AsyncPriorityResourceWithStreamingResponse(self._requests.priority)
|
||||
|
||||
@cached_property
|
||||
def assets(self) -> AsyncAssetsResourceWithStreamingResponse:
|
||||
return AsyncAssetsResourceWithStreamingResponse(self._requests.assets)
|
||||
|
|
|
|||
|
|
@ -16,14 +16,6 @@ from .analytics import (
|
|||
AnalyticsResourceWithStreamingResponse,
|
||||
AsyncAnalyticsResourceWithStreamingResponse,
|
||||
)
|
||||
from .reverse_dns import (
|
||||
ReverseDNSResource,
|
||||
AsyncReverseDNSResource,
|
||||
ReverseDNSResourceWithRawResponse,
|
||||
AsyncReverseDNSResourceWithRawResponse,
|
||||
ReverseDNSResourceWithStreamingResponse,
|
||||
AsyncReverseDNSResourceWithStreamingResponse,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"AnalyticsResource",
|
||||
|
|
@ -32,12 +24,6 @@ __all__ = [
|
|||
"AsyncAnalyticsResourceWithRawResponse",
|
||||
"AnalyticsResourceWithStreamingResponse",
|
||||
"AsyncAnalyticsResourceWithStreamingResponse",
|
||||
"ReverseDNSResource",
|
||||
"AsyncReverseDNSResource",
|
||||
"ReverseDNSResourceWithRawResponse",
|
||||
"AsyncReverseDNSResourceWithRawResponse",
|
||||
"ReverseDNSResourceWithStreamingResponse",
|
||||
"AsyncReverseDNSResourceWithStreamingResponse",
|
||||
"FirewallResource",
|
||||
"AsyncFirewallResource",
|
||||
"FirewallResourceWithRawResponse",
|
||||
|
|
|
|||
|
|
@ -20,14 +20,6 @@ from .analytics import (
|
|||
AsyncAnalyticsResourceWithStreamingResponse,
|
||||
)
|
||||
from ...._compat import cached_property
|
||||
from .reverse_dns import (
|
||||
ReverseDNSResource,
|
||||
AsyncReverseDNSResource,
|
||||
ReverseDNSResourceWithRawResponse,
|
||||
AsyncReverseDNSResourceWithRawResponse,
|
||||
ReverseDNSResourceWithStreamingResponse,
|
||||
AsyncReverseDNSResourceWithStreamingResponse,
|
||||
)
|
||||
from ...._resource import SyncAPIResource, AsyncAPIResource
|
||||
from ...._response import (
|
||||
to_raw_response_wrapper,
|
||||
|
|
@ -56,10 +48,6 @@ class FirewallResource(SyncAPIResource):
|
|||
def analytics(self) -> AnalyticsResource:
|
||||
return AnalyticsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def reverse_dns(self) -> ReverseDNSResource:
|
||||
return ReverseDNSResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> FirewallResourceWithRawResponse:
|
||||
"""
|
||||
|
|
@ -408,10 +396,6 @@ class AsyncFirewallResource(AsyncAPIResource):
|
|||
def analytics(self) -> AsyncAnalyticsResource:
|
||||
return AsyncAnalyticsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def reverse_dns(self) -> AsyncReverseDNSResource:
|
||||
return AsyncReverseDNSResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AsyncFirewallResourceWithRawResponse:
|
||||
"""
|
||||
|
|
@ -779,10 +763,6 @@ class FirewallResourceWithRawResponse:
|
|||
def analytics(self) -> AnalyticsResourceWithRawResponse:
|
||||
return AnalyticsResourceWithRawResponse(self._firewall.analytics)
|
||||
|
||||
@cached_property
|
||||
def reverse_dns(self) -> ReverseDNSResourceWithRawResponse:
|
||||
return ReverseDNSResourceWithRawResponse(self._firewall.reverse_dns)
|
||||
|
||||
|
||||
class AsyncFirewallResourceWithRawResponse:
|
||||
def __init__(self, firewall: AsyncFirewallResource) -> None:
|
||||
|
|
@ -808,10 +788,6 @@ class AsyncFirewallResourceWithRawResponse:
|
|||
def analytics(self) -> AsyncAnalyticsResourceWithRawResponse:
|
||||
return AsyncAnalyticsResourceWithRawResponse(self._firewall.analytics)
|
||||
|
||||
@cached_property
|
||||
def reverse_dns(self) -> AsyncReverseDNSResourceWithRawResponse:
|
||||
return AsyncReverseDNSResourceWithRawResponse(self._firewall.reverse_dns)
|
||||
|
||||
|
||||
class FirewallResourceWithStreamingResponse:
|
||||
def __init__(self, firewall: FirewallResource) -> None:
|
||||
|
|
@ -837,10 +813,6 @@ class FirewallResourceWithStreamingResponse:
|
|||
def analytics(self) -> AnalyticsResourceWithStreamingResponse:
|
||||
return AnalyticsResourceWithStreamingResponse(self._firewall.analytics)
|
||||
|
||||
@cached_property
|
||||
def reverse_dns(self) -> ReverseDNSResourceWithStreamingResponse:
|
||||
return ReverseDNSResourceWithStreamingResponse(self._firewall.reverse_dns)
|
||||
|
||||
|
||||
class AsyncFirewallResourceWithStreamingResponse:
|
||||
def __init__(self, firewall: AsyncFirewallResource) -> None:
|
||||
|
|
@ -865,7 +837,3 @@ class AsyncFirewallResourceWithStreamingResponse:
|
|||
@cached_property
|
||||
def analytics(self) -> AsyncAnalyticsResourceWithStreamingResponse:
|
||||
return AsyncAnalyticsResourceWithStreamingResponse(self._firewall.analytics)
|
||||
|
||||
@cached_property
|
||||
def reverse_dns(self) -> AsyncReverseDNSResourceWithStreamingResponse:
|
||||
return AsyncReverseDNSResourceWithStreamingResponse(self._firewall.reverse_dns)
|
||||
|
|
|
|||
|
|
@ -1,302 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Dict, Type, Optional, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
||||
from ...._utils import (
|
||||
maybe_transform,
|
||||
async_maybe_transform,
|
||||
)
|
||||
from ...._compat import cached_property
|
||||
from ...._resource import SyncAPIResource, AsyncAPIResource
|
||||
from ...._response import (
|
||||
to_raw_response_wrapper,
|
||||
to_streamed_response_wrapper,
|
||||
async_to_raw_response_wrapper,
|
||||
async_to_streamed_response_wrapper,
|
||||
)
|
||||
from ...._wrappers import ResultWrapper
|
||||
from ...._base_client import make_request_options
|
||||
from ....types.dns.firewall import reverse_dns_edit_params
|
||||
from ....types.dns.firewall.reverse_dns_get_response import ReverseDNSGetResponse
|
||||
from ....types.dns.firewall.reverse_dns_edit_response import ReverseDNSEditResponse
|
||||
|
||||
__all__ = ["ReverseDNSResource", "AsyncReverseDNSResource"]
|
||||
|
||||
|
||||
class ReverseDNSResource(SyncAPIResource):
|
||||
@cached_property
|
||||
def with_raw_response(self) -> ReverseDNSResourceWithRawResponse:
|
||||
"""
|
||||
This property can be used as a prefix for any HTTP method call to return the
|
||||
the raw response object instead of the parsed content.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
|
||||
"""
|
||||
return ReverseDNSResourceWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> ReverseDNSResourceWithStreamingResponse:
|
||||
"""
|
||||
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
|
||||
"""
|
||||
return ReverseDNSResourceWithStreamingResponse(self)
|
||||
|
||||
def edit(
|
||||
self,
|
||||
dns_firewall_id: str,
|
||||
*,
|
||||
account_id: str,
|
||||
ptr: Dict[str, str] | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> Optional[ReverseDNSEditResponse]:
|
||||
"""
|
||||
Update reverse DNS configuration (PTR records) for a DNS Firewall cluster
|
||||
|
||||
Args:
|
||||
account_id: Identifier
|
||||
|
||||
dns_firewall_id: Identifier
|
||||
|
||||
ptr: Map of cluster IP addresses to PTR record contents
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
if not dns_firewall_id:
|
||||
raise ValueError(f"Expected a non-empty value for `dns_firewall_id` but received {dns_firewall_id!r}")
|
||||
return self._patch(
|
||||
f"/accounts/{account_id}/dns_firewall/{dns_firewall_id}/reverse_dns",
|
||||
body=maybe_transform({"ptr": ptr}, reverse_dns_edit_params.ReverseDNSEditParams),
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[Optional[ReverseDNSEditResponse]]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[Optional[ReverseDNSEditResponse]], ResultWrapper[ReverseDNSEditResponse]),
|
||||
)
|
||||
|
||||
def get(
|
||||
self,
|
||||
dns_firewall_id: str,
|
||||
*,
|
||||
account_id: str,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> Optional[ReverseDNSGetResponse]:
|
||||
"""
|
||||
Show reverse DNS configuration (PTR records) for a DNS Firewall cluster
|
||||
|
||||
Args:
|
||||
account_id: Identifier
|
||||
|
||||
dns_firewall_id: Identifier
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
if not dns_firewall_id:
|
||||
raise ValueError(f"Expected a non-empty value for `dns_firewall_id` but received {dns_firewall_id!r}")
|
||||
return self._get(
|
||||
f"/accounts/{account_id}/dns_firewall/{dns_firewall_id}/reverse_dns",
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[Optional[ReverseDNSGetResponse]]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[Optional[ReverseDNSGetResponse]], ResultWrapper[ReverseDNSGetResponse]),
|
||||
)
|
||||
|
||||
|
||||
class AsyncReverseDNSResource(AsyncAPIResource):
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AsyncReverseDNSResourceWithRawResponse:
|
||||
"""
|
||||
This property can be used as a prefix for any HTTP method call to return the
|
||||
the raw response object instead of the parsed content.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
|
||||
"""
|
||||
return AsyncReverseDNSResourceWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> AsyncReverseDNSResourceWithStreamingResponse:
|
||||
"""
|
||||
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
|
||||
"""
|
||||
return AsyncReverseDNSResourceWithStreamingResponse(self)
|
||||
|
||||
async def edit(
|
||||
self,
|
||||
dns_firewall_id: str,
|
||||
*,
|
||||
account_id: str,
|
||||
ptr: Dict[str, str] | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> Optional[ReverseDNSEditResponse]:
|
||||
"""
|
||||
Update reverse DNS configuration (PTR records) for a DNS Firewall cluster
|
||||
|
||||
Args:
|
||||
account_id: Identifier
|
||||
|
||||
dns_firewall_id: Identifier
|
||||
|
||||
ptr: Map of cluster IP addresses to PTR record contents
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
if not dns_firewall_id:
|
||||
raise ValueError(f"Expected a non-empty value for `dns_firewall_id` but received {dns_firewall_id!r}")
|
||||
return await self._patch(
|
||||
f"/accounts/{account_id}/dns_firewall/{dns_firewall_id}/reverse_dns",
|
||||
body=await async_maybe_transform({"ptr": ptr}, reverse_dns_edit_params.ReverseDNSEditParams),
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[Optional[ReverseDNSEditResponse]]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[Optional[ReverseDNSEditResponse]], ResultWrapper[ReverseDNSEditResponse]),
|
||||
)
|
||||
|
||||
async def get(
|
||||
self,
|
||||
dns_firewall_id: str,
|
||||
*,
|
||||
account_id: str,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> Optional[ReverseDNSGetResponse]:
|
||||
"""
|
||||
Show reverse DNS configuration (PTR records) for a DNS Firewall cluster
|
||||
|
||||
Args:
|
||||
account_id: Identifier
|
||||
|
||||
dns_firewall_id: Identifier
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
if not dns_firewall_id:
|
||||
raise ValueError(f"Expected a non-empty value for `dns_firewall_id` but received {dns_firewall_id!r}")
|
||||
return await self._get(
|
||||
f"/accounts/{account_id}/dns_firewall/{dns_firewall_id}/reverse_dns",
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[Optional[ReverseDNSGetResponse]]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[Optional[ReverseDNSGetResponse]], ResultWrapper[ReverseDNSGetResponse]),
|
||||
)
|
||||
|
||||
|
||||
class ReverseDNSResourceWithRawResponse:
|
||||
def __init__(self, reverse_dns: ReverseDNSResource) -> None:
|
||||
self._reverse_dns = reverse_dns
|
||||
|
||||
self.edit = to_raw_response_wrapper(
|
||||
reverse_dns.edit,
|
||||
)
|
||||
self.get = to_raw_response_wrapper(
|
||||
reverse_dns.get,
|
||||
)
|
||||
|
||||
|
||||
class AsyncReverseDNSResourceWithRawResponse:
|
||||
def __init__(self, reverse_dns: AsyncReverseDNSResource) -> None:
|
||||
self._reverse_dns = reverse_dns
|
||||
|
||||
self.edit = async_to_raw_response_wrapper(
|
||||
reverse_dns.edit,
|
||||
)
|
||||
self.get = async_to_raw_response_wrapper(
|
||||
reverse_dns.get,
|
||||
)
|
||||
|
||||
|
||||
class ReverseDNSResourceWithStreamingResponse:
|
||||
def __init__(self, reverse_dns: ReverseDNSResource) -> None:
|
||||
self._reverse_dns = reverse_dns
|
||||
|
||||
self.edit = to_streamed_response_wrapper(
|
||||
reverse_dns.edit,
|
||||
)
|
||||
self.get = to_streamed_response_wrapper(
|
||||
reverse_dns.get,
|
||||
)
|
||||
|
||||
|
||||
class AsyncReverseDNSResourceWithStreamingResponse:
|
||||
def __init__(self, reverse_dns: AsyncReverseDNSResource) -> None:
|
||||
self._reverse_dns = reverse_dns
|
||||
|
||||
self.edit = async_to_streamed_response_wrapper(
|
||||
reverse_dns.edit,
|
||||
)
|
||||
self.get = async_to_streamed_response_wrapper(
|
||||
reverse_dns.get,
|
||||
)
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from .configuration import (
|
||||
ConfigurationResource,
|
||||
AsyncConfigurationResource,
|
||||
ConfigurationResourceWithRawResponse,
|
||||
AsyncConfigurationResourceWithRawResponse,
|
||||
ConfigurationResourceWithStreamingResponse,
|
||||
AsyncConfigurationResourceWithStreamingResponse,
|
||||
from .r2 import (
|
||||
R2Resource,
|
||||
AsyncR2Resource,
|
||||
R2ResourceWithRawResponse,
|
||||
AsyncR2ResourceWithRawResponse,
|
||||
R2ResourceWithStreamingResponse,
|
||||
AsyncR2ResourceWithStreamingResponse,
|
||||
)
|
||||
from .event_notifications import (
|
||||
EventNotificationsResource,
|
||||
|
|
@ -18,12 +18,12 @@ from .event_notifications import (
|
|||
)
|
||||
|
||||
__all__ = [
|
||||
"ConfigurationResource",
|
||||
"AsyncConfigurationResource",
|
||||
"ConfigurationResourceWithRawResponse",
|
||||
"AsyncConfigurationResourceWithRawResponse",
|
||||
"ConfigurationResourceWithStreamingResponse",
|
||||
"AsyncConfigurationResourceWithStreamingResponse",
|
||||
"R2Resource",
|
||||
"AsyncR2Resource",
|
||||
"R2ResourceWithRawResponse",
|
||||
"AsyncR2ResourceWithRawResponse",
|
||||
"R2ResourceWithStreamingResponse",
|
||||
"AsyncR2ResourceWithStreamingResponse",
|
||||
"EventNotificationsResource",
|
||||
"AsyncEventNotificationsResource",
|
||||
"EventNotificationsResourceWithRawResponse",
|
||||
|
|
@ -2,25 +2,25 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from ...._compat import cached_property
|
||||
from ...._resource import SyncAPIResource, AsyncAPIResource
|
||||
from .configuration import (
|
||||
ConfigurationResource,
|
||||
AsyncConfigurationResource,
|
||||
ConfigurationResourceWithRawResponse,
|
||||
AsyncConfigurationResourceWithRawResponse,
|
||||
ConfigurationResourceWithStreamingResponse,
|
||||
AsyncConfigurationResourceWithStreamingResponse,
|
||||
from .r2 import (
|
||||
R2Resource,
|
||||
AsyncR2Resource,
|
||||
R2ResourceWithRawResponse,
|
||||
AsyncR2ResourceWithRawResponse,
|
||||
R2ResourceWithStreamingResponse,
|
||||
AsyncR2ResourceWithStreamingResponse,
|
||||
)
|
||||
from .configuration.configuration import ConfigurationResource, AsyncConfigurationResource
|
||||
from .r2.r2 import R2Resource, AsyncR2Resource
|
||||
from ..._compat import cached_property
|
||||
from ..._resource import SyncAPIResource, AsyncAPIResource
|
||||
|
||||
__all__ = ["EventNotificationsResource", "AsyncEventNotificationsResource"]
|
||||
|
||||
|
||||
class EventNotificationsResource(SyncAPIResource):
|
||||
@cached_property
|
||||
def configuration(self) -> ConfigurationResource:
|
||||
return ConfigurationResource(self._client)
|
||||
def r2(self) -> R2Resource:
|
||||
return R2Resource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> EventNotificationsResourceWithRawResponse:
|
||||
|
|
@ -44,8 +44,8 @@ class EventNotificationsResource(SyncAPIResource):
|
|||
|
||||
class AsyncEventNotificationsResource(AsyncAPIResource):
|
||||
@cached_property
|
||||
def configuration(self) -> AsyncConfigurationResource:
|
||||
return AsyncConfigurationResource(self._client)
|
||||
def r2(self) -> AsyncR2Resource:
|
||||
return AsyncR2Resource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AsyncEventNotificationsResourceWithRawResponse:
|
||||
|
|
@ -72,8 +72,8 @@ class EventNotificationsResourceWithRawResponse:
|
|||
self._event_notifications = event_notifications
|
||||
|
||||
@cached_property
|
||||
def configuration(self) -> ConfigurationResourceWithRawResponse:
|
||||
return ConfigurationResourceWithRawResponse(self._event_notifications.configuration)
|
||||
def r2(self) -> R2ResourceWithRawResponse:
|
||||
return R2ResourceWithRawResponse(self._event_notifications.r2)
|
||||
|
||||
|
||||
class AsyncEventNotificationsResourceWithRawResponse:
|
||||
|
|
@ -81,8 +81,8 @@ class AsyncEventNotificationsResourceWithRawResponse:
|
|||
self._event_notifications = event_notifications
|
||||
|
||||
@cached_property
|
||||
def configuration(self) -> AsyncConfigurationResourceWithRawResponse:
|
||||
return AsyncConfigurationResourceWithRawResponse(self._event_notifications.configuration)
|
||||
def r2(self) -> AsyncR2ResourceWithRawResponse:
|
||||
return AsyncR2ResourceWithRawResponse(self._event_notifications.r2)
|
||||
|
||||
|
||||
class EventNotificationsResourceWithStreamingResponse:
|
||||
|
|
@ -90,8 +90,8 @@ class EventNotificationsResourceWithStreamingResponse:
|
|||
self._event_notifications = event_notifications
|
||||
|
||||
@cached_property
|
||||
def configuration(self) -> ConfigurationResourceWithStreamingResponse:
|
||||
return ConfigurationResourceWithStreamingResponse(self._event_notifications.configuration)
|
||||
def r2(self) -> R2ResourceWithStreamingResponse:
|
||||
return R2ResourceWithStreamingResponse(self._event_notifications.r2)
|
||||
|
||||
|
||||
class AsyncEventNotificationsResourceWithStreamingResponse:
|
||||
|
|
@ -99,5 +99,5 @@ class AsyncEventNotificationsResourceWithStreamingResponse:
|
|||
self._event_notifications = event_notifications
|
||||
|
||||
@cached_property
|
||||
def configuration(self) -> AsyncConfigurationResourceWithStreamingResponse:
|
||||
return AsyncConfigurationResourceWithStreamingResponse(self._event_notifications.configuration)
|
||||
def r2(self) -> AsyncR2ResourceWithStreamingResponse:
|
||||
return AsyncR2ResourceWithStreamingResponse(self._event_notifications.r2)
|
||||
33
src/cloudflare/resources/event_notifications/r2/__init__.py
Normal file
33
src/cloudflare/resources/event_notifications/r2/__init__.py
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from .r2 import (
|
||||
R2Resource,
|
||||
AsyncR2Resource,
|
||||
R2ResourceWithRawResponse,
|
||||
AsyncR2ResourceWithRawResponse,
|
||||
R2ResourceWithStreamingResponse,
|
||||
AsyncR2ResourceWithStreamingResponse,
|
||||
)
|
||||
from .configuration import (
|
||||
ConfigurationResource,
|
||||
AsyncConfigurationResource,
|
||||
ConfigurationResourceWithRawResponse,
|
||||
AsyncConfigurationResourceWithRawResponse,
|
||||
ConfigurationResourceWithStreamingResponse,
|
||||
AsyncConfigurationResourceWithStreamingResponse,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"ConfigurationResource",
|
||||
"AsyncConfigurationResource",
|
||||
"ConfigurationResourceWithRawResponse",
|
||||
"AsyncConfigurationResourceWithRawResponse",
|
||||
"ConfigurationResourceWithStreamingResponse",
|
||||
"AsyncConfigurationResourceWithStreamingResponse",
|
||||
"R2Resource",
|
||||
"AsyncR2Resource",
|
||||
"R2ResourceWithRawResponse",
|
||||
"AsyncR2ResourceWithRawResponse",
|
||||
"R2ResourceWithStreamingResponse",
|
||||
"AsyncR2ResourceWithStreamingResponse",
|
||||
]
|
||||
|
|
@ -25,7 +25,7 @@ from ....._response import (
|
|||
)
|
||||
from ....._wrappers import ResultWrapper
|
||||
from ....._base_client import make_request_options
|
||||
from .....types.r2.event_notifications.configuration_get_response import ConfigurationGetResponse
|
||||
from .....types.event_notifications.r2.configuration_get_response import ConfigurationGetResponse
|
||||
|
||||
__all__ = ["ConfigurationResource", "AsyncConfigurationResource"]
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ from ....._response import (
|
|||
)
|
||||
from ....._wrappers import ResultWrapper
|
||||
from ....._base_client import make_request_options
|
||||
from .....types.r2.event_notifications.configuration import queue_update_params
|
||||
from .....types.event_notifications.r2.configuration import queue_update_params
|
||||
|
||||
__all__ = ["QueuesResource", "AsyncQueuesResource"]
|
||||
|
||||
103
src/cloudflare/resources/event_notifications/r2/r2.py
Normal file
103
src/cloudflare/resources/event_notifications/r2/r2.py
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from ...._compat import cached_property
|
||||
from ...._resource import SyncAPIResource, AsyncAPIResource
|
||||
from .configuration import (
|
||||
ConfigurationResource,
|
||||
AsyncConfigurationResource,
|
||||
ConfigurationResourceWithRawResponse,
|
||||
AsyncConfigurationResourceWithRawResponse,
|
||||
ConfigurationResourceWithStreamingResponse,
|
||||
AsyncConfigurationResourceWithStreamingResponse,
|
||||
)
|
||||
from .configuration.configuration import ConfigurationResource, AsyncConfigurationResource
|
||||
|
||||
__all__ = ["R2Resource", "AsyncR2Resource"]
|
||||
|
||||
|
||||
class R2Resource(SyncAPIResource):
|
||||
@cached_property
|
||||
def configuration(self) -> ConfigurationResource:
|
||||
return ConfigurationResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> R2ResourceWithRawResponse:
|
||||
"""
|
||||
This property can be used as a prefix for any HTTP method call to return the
|
||||
the raw response object instead of the parsed content.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
|
||||
"""
|
||||
return R2ResourceWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> R2ResourceWithStreamingResponse:
|
||||
"""
|
||||
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
|
||||
"""
|
||||
return R2ResourceWithStreamingResponse(self)
|
||||
|
||||
|
||||
class AsyncR2Resource(AsyncAPIResource):
|
||||
@cached_property
|
||||
def configuration(self) -> AsyncConfigurationResource:
|
||||
return AsyncConfigurationResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AsyncR2ResourceWithRawResponse:
|
||||
"""
|
||||
This property can be used as a prefix for any HTTP method call to return the
|
||||
the raw response object instead of the parsed content.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
|
||||
"""
|
||||
return AsyncR2ResourceWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> AsyncR2ResourceWithStreamingResponse:
|
||||
"""
|
||||
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
|
||||
"""
|
||||
return AsyncR2ResourceWithStreamingResponse(self)
|
||||
|
||||
|
||||
class R2ResourceWithRawResponse:
|
||||
def __init__(self, r2: R2Resource) -> None:
|
||||
self._r2 = r2
|
||||
|
||||
@cached_property
|
||||
def configuration(self) -> ConfigurationResourceWithRawResponse:
|
||||
return ConfigurationResourceWithRawResponse(self._r2.configuration)
|
||||
|
||||
|
||||
class AsyncR2ResourceWithRawResponse:
|
||||
def __init__(self, r2: AsyncR2Resource) -> None:
|
||||
self._r2 = r2
|
||||
|
||||
@cached_property
|
||||
def configuration(self) -> AsyncConfigurationResourceWithRawResponse:
|
||||
return AsyncConfigurationResourceWithRawResponse(self._r2.configuration)
|
||||
|
||||
|
||||
class R2ResourceWithStreamingResponse:
|
||||
def __init__(self, r2: R2Resource) -> None:
|
||||
self._r2 = r2
|
||||
|
||||
@cached_property
|
||||
def configuration(self) -> ConfigurationResourceWithStreamingResponse:
|
||||
return ConfigurationResourceWithStreamingResponse(self._r2.configuration)
|
||||
|
||||
|
||||
class AsyncR2ResourceWithStreamingResponse:
|
||||
def __init__(self, r2: AsyncR2Resource) -> None:
|
||||
self._r2 = r2
|
||||
|
||||
@cached_property
|
||||
def configuration(self) -> AsyncConfigurationResourceWithStreamingResponse:
|
||||
return AsyncConfigurationResourceWithStreamingResponse(self._r2.configuration)
|
||||
|
|
@ -8,14 +8,6 @@ from .apps import (
|
|||
AppsResourceWithStreamingResponse,
|
||||
AsyncAppsResourceWithStreamingResponse,
|
||||
)
|
||||
from .pcaps import (
|
||||
PCAPsResource,
|
||||
AsyncPCAPsResource,
|
||||
PCAPsResourceWithRawResponse,
|
||||
AsyncPCAPsResourceWithRawResponse,
|
||||
PCAPsResourceWithStreamingResponse,
|
||||
AsyncPCAPsResourceWithStreamingResponse,
|
||||
)
|
||||
from .sites import (
|
||||
SitesResource,
|
||||
AsyncSitesResource,
|
||||
|
|
@ -116,12 +108,6 @@ __all__ = [
|
|||
"AsyncConnectorsResourceWithRawResponse",
|
||||
"ConnectorsResourceWithStreamingResponse",
|
||||
"AsyncConnectorsResourceWithStreamingResponse",
|
||||
"PCAPsResource",
|
||||
"AsyncPCAPsResource",
|
||||
"PCAPsResourceWithRawResponse",
|
||||
"AsyncPCAPsResourceWithRawResponse",
|
||||
"PCAPsResourceWithStreamingResponse",
|
||||
"AsyncPCAPsResourceWithStreamingResponse",
|
||||
"MagicTransitResource",
|
||||
"AsyncMagicTransitResource",
|
||||
"MagicTransitResourceWithRawResponse",
|
||||
|
|
|
|||
|
|
@ -10,14 +10,6 @@ from .apps import (
|
|||
AppsResourceWithStreamingResponse,
|
||||
AsyncAppsResourceWithStreamingResponse,
|
||||
)
|
||||
from .pcaps import (
|
||||
PCAPsResource,
|
||||
AsyncPCAPsResource,
|
||||
PCAPsResourceWithRawResponse,
|
||||
AsyncPCAPsResourceWithRawResponse,
|
||||
PCAPsResourceWithStreamingResponse,
|
||||
AsyncPCAPsResourceWithStreamingResponse,
|
||||
)
|
||||
from .sites import (
|
||||
SitesResource,
|
||||
AsyncSitesResource,
|
||||
|
|
@ -52,7 +44,6 @@ from .gre_tunnels import (
|
|||
GRETunnelsResourceWithStreamingResponse,
|
||||
AsyncGRETunnelsResourceWithStreamingResponse,
|
||||
)
|
||||
from .pcaps.pcaps import PCAPsResource, AsyncPCAPsResource
|
||||
from .sites.sites import SitesResource, AsyncSitesResource
|
||||
from .ipsec_tunnels import (
|
||||
IPSECTunnelsResource,
|
||||
|
|
@ -103,10 +94,6 @@ class MagicTransitResource(SyncAPIResource):
|
|||
def connectors(self) -> ConnectorsResource:
|
||||
return ConnectorsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def pcaps(self) -> PCAPsResource:
|
||||
return PCAPsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> MagicTransitResourceWithRawResponse:
|
||||
"""
|
||||
|
|
@ -156,10 +143,6 @@ class AsyncMagicTransitResource(AsyncAPIResource):
|
|||
def connectors(self) -> AsyncConnectorsResource:
|
||||
return AsyncConnectorsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def pcaps(self) -> AsyncPCAPsResource:
|
||||
return AsyncPCAPsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AsyncMagicTransitResourceWithRawResponse:
|
||||
"""
|
||||
|
|
@ -212,10 +195,6 @@ class MagicTransitResourceWithRawResponse:
|
|||
def connectors(self) -> ConnectorsResourceWithRawResponse:
|
||||
return ConnectorsResourceWithRawResponse(self._magic_transit.connectors)
|
||||
|
||||
@cached_property
|
||||
def pcaps(self) -> PCAPsResourceWithRawResponse:
|
||||
return PCAPsResourceWithRawResponse(self._magic_transit.pcaps)
|
||||
|
||||
|
||||
class AsyncMagicTransitResourceWithRawResponse:
|
||||
def __init__(self, magic_transit: AsyncMagicTransitResource) -> None:
|
||||
|
|
@ -249,10 +228,6 @@ class AsyncMagicTransitResourceWithRawResponse:
|
|||
def connectors(self) -> AsyncConnectorsResourceWithRawResponse:
|
||||
return AsyncConnectorsResourceWithRawResponse(self._magic_transit.connectors)
|
||||
|
||||
@cached_property
|
||||
def pcaps(self) -> AsyncPCAPsResourceWithRawResponse:
|
||||
return AsyncPCAPsResourceWithRawResponse(self._magic_transit.pcaps)
|
||||
|
||||
|
||||
class MagicTransitResourceWithStreamingResponse:
|
||||
def __init__(self, magic_transit: MagicTransitResource) -> None:
|
||||
|
|
@ -286,10 +261,6 @@ class MagicTransitResourceWithStreamingResponse:
|
|||
def connectors(self) -> ConnectorsResourceWithStreamingResponse:
|
||||
return ConnectorsResourceWithStreamingResponse(self._magic_transit.connectors)
|
||||
|
||||
@cached_property
|
||||
def pcaps(self) -> PCAPsResourceWithStreamingResponse:
|
||||
return PCAPsResourceWithStreamingResponse(self._magic_transit.pcaps)
|
||||
|
||||
|
||||
class AsyncMagicTransitResourceWithStreamingResponse:
|
||||
def __init__(self, magic_transit: AsyncMagicTransitResource) -> None:
|
||||
|
|
@ -322,7 +293,3 @@ class AsyncMagicTransitResourceWithStreamingResponse:
|
|||
@cached_property
|
||||
def connectors(self) -> AsyncConnectorsResourceWithStreamingResponse:
|
||||
return AsyncConnectorsResourceWithStreamingResponse(self._magic_transit.connectors)
|
||||
|
||||
@cached_property
|
||||
def pcaps(self) -> AsyncPCAPsResourceWithStreamingResponse:
|
||||
return AsyncPCAPsResourceWithStreamingResponse(self._magic_transit.pcaps)
|
||||
|
|
|
|||
|
|
@ -20,33 +20,33 @@ from .._response import (
|
|||
async_to_streamed_response_wrapper,
|
||||
)
|
||||
from .._base_client import make_request_options
|
||||
from ..types.managed_transforms import managed_transform_edit_params
|
||||
from ..types.managed_transforms.request_model_param import RequestModelParam
|
||||
from ..types.managed_transforms.managed_transform_edit_response import ManagedTransformEditResponse
|
||||
from ..types.managed_transforms.managed_transform_list_response import ManagedTransformListResponse
|
||||
from ..types.managed_headers import managed_header_edit_params
|
||||
from ..types.managed_headers.request_model_param import RequestModelParam
|
||||
from ..types.managed_headers.managed_header_edit_response import ManagedHeaderEditResponse
|
||||
from ..types.managed_headers.managed_header_list_response import ManagedHeaderListResponse
|
||||
|
||||
__all__ = ["ManagedTransformsResource", "AsyncManagedTransformsResource"]
|
||||
__all__ = ["ManagedHeadersResource", "AsyncManagedHeadersResource"]
|
||||
|
||||
|
||||
class ManagedTransformsResource(SyncAPIResource):
|
||||
class ManagedHeadersResource(SyncAPIResource):
|
||||
@cached_property
|
||||
def with_raw_response(self) -> ManagedTransformsResourceWithRawResponse:
|
||||
def with_raw_response(self) -> ManagedHeadersResourceWithRawResponse:
|
||||
"""
|
||||
This property can be used as a prefix for any HTTP method call to return the
|
||||
the raw response object instead of the parsed content.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
|
||||
"""
|
||||
return ManagedTransformsResourceWithRawResponse(self)
|
||||
return ManagedHeadersResourceWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> ManagedTransformsResourceWithStreamingResponse:
|
||||
def with_streaming_response(self) -> ManagedHeadersResourceWithStreamingResponse:
|
||||
"""
|
||||
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
|
||||
"""
|
||||
return ManagedTransformsResourceWithStreamingResponse(self)
|
||||
return ManagedHeadersResourceWithStreamingResponse(self)
|
||||
|
||||
def list(
|
||||
self,
|
||||
|
|
@ -58,7 +58,7 @@ class ManagedTransformsResource(SyncAPIResource):
|
|||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> ManagedTransformListResponse:
|
||||
) -> ManagedHeaderListResponse:
|
||||
"""
|
||||
Fetches a list of all Managed Transforms.
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ class ManagedTransformsResource(SyncAPIResource):
|
|||
options=make_request_options(
|
||||
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
||||
),
|
||||
cast_to=ManagedTransformListResponse,
|
||||
cast_to=ManagedHeaderListResponse,
|
||||
)
|
||||
|
||||
def edit(
|
||||
|
|
@ -95,7 +95,7 @@ class ManagedTransformsResource(SyncAPIResource):
|
|||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> ManagedTransformEditResponse:
|
||||
) -> ManagedHeaderEditResponse:
|
||||
"""
|
||||
Updates the status of one or more Managed Transforms.
|
||||
|
||||
|
|
@ -119,34 +119,34 @@ class ManagedTransformsResource(SyncAPIResource):
|
|||
"managed_request_headers": managed_request_headers,
|
||||
"managed_response_headers": managed_response_headers,
|
||||
},
|
||||
managed_transform_edit_params.ManagedTransformEditParams,
|
||||
managed_header_edit_params.ManagedHeaderEditParams,
|
||||
),
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
||||
),
|
||||
cast_to=ManagedTransformEditResponse,
|
||||
cast_to=ManagedHeaderEditResponse,
|
||||
)
|
||||
|
||||
|
||||
class AsyncManagedTransformsResource(AsyncAPIResource):
|
||||
class AsyncManagedHeadersResource(AsyncAPIResource):
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AsyncManagedTransformsResourceWithRawResponse:
|
||||
def with_raw_response(self) -> AsyncManagedHeadersResourceWithRawResponse:
|
||||
"""
|
||||
This property can be used as a prefix for any HTTP method call to return the
|
||||
the raw response object instead of the parsed content.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
|
||||
"""
|
||||
return AsyncManagedTransformsResourceWithRawResponse(self)
|
||||
return AsyncManagedHeadersResourceWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> AsyncManagedTransformsResourceWithStreamingResponse:
|
||||
def with_streaming_response(self) -> AsyncManagedHeadersResourceWithStreamingResponse:
|
||||
"""
|
||||
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
|
||||
"""
|
||||
return AsyncManagedTransformsResourceWithStreamingResponse(self)
|
||||
return AsyncManagedHeadersResourceWithStreamingResponse(self)
|
||||
|
||||
async def list(
|
||||
self,
|
||||
|
|
@ -158,7 +158,7 @@ class AsyncManagedTransformsResource(AsyncAPIResource):
|
|||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> ManagedTransformListResponse:
|
||||
) -> ManagedHeaderListResponse:
|
||||
"""
|
||||
Fetches a list of all Managed Transforms.
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ class AsyncManagedTransformsResource(AsyncAPIResource):
|
|||
options=make_request_options(
|
||||
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
||||
),
|
||||
cast_to=ManagedTransformListResponse,
|
||||
cast_to=ManagedHeaderListResponse,
|
||||
)
|
||||
|
||||
async def edit(
|
||||
|
|
@ -195,7 +195,7 @@ class AsyncManagedTransformsResource(AsyncAPIResource):
|
|||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> ManagedTransformEditResponse:
|
||||
) -> ManagedHeaderEditResponse:
|
||||
"""
|
||||
Updates the status of one or more Managed Transforms.
|
||||
|
||||
|
|
@ -219,58 +219,58 @@ class AsyncManagedTransformsResource(AsyncAPIResource):
|
|||
"managed_request_headers": managed_request_headers,
|
||||
"managed_response_headers": managed_response_headers,
|
||||
},
|
||||
managed_transform_edit_params.ManagedTransformEditParams,
|
||||
managed_header_edit_params.ManagedHeaderEditParams,
|
||||
),
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
||||
),
|
||||
cast_to=ManagedTransformEditResponse,
|
||||
cast_to=ManagedHeaderEditResponse,
|
||||
)
|
||||
|
||||
|
||||
class ManagedTransformsResourceWithRawResponse:
|
||||
def __init__(self, managed_transforms: ManagedTransformsResource) -> None:
|
||||
self._managed_transforms = managed_transforms
|
||||
class ManagedHeadersResourceWithRawResponse:
|
||||
def __init__(self, managed_headers: ManagedHeadersResource) -> None:
|
||||
self._managed_headers = managed_headers
|
||||
|
||||
self.list = to_raw_response_wrapper(
|
||||
managed_transforms.list,
|
||||
managed_headers.list,
|
||||
)
|
||||
self.edit = to_raw_response_wrapper(
|
||||
managed_transforms.edit,
|
||||
managed_headers.edit,
|
||||
)
|
||||
|
||||
|
||||
class AsyncManagedTransformsResourceWithRawResponse:
|
||||
def __init__(self, managed_transforms: AsyncManagedTransformsResource) -> None:
|
||||
self._managed_transforms = managed_transforms
|
||||
class AsyncManagedHeadersResourceWithRawResponse:
|
||||
def __init__(self, managed_headers: AsyncManagedHeadersResource) -> None:
|
||||
self._managed_headers = managed_headers
|
||||
|
||||
self.list = async_to_raw_response_wrapper(
|
||||
managed_transforms.list,
|
||||
managed_headers.list,
|
||||
)
|
||||
self.edit = async_to_raw_response_wrapper(
|
||||
managed_transforms.edit,
|
||||
managed_headers.edit,
|
||||
)
|
||||
|
||||
|
||||
class ManagedTransformsResourceWithStreamingResponse:
|
||||
def __init__(self, managed_transforms: ManagedTransformsResource) -> None:
|
||||
self._managed_transforms = managed_transforms
|
||||
class ManagedHeadersResourceWithStreamingResponse:
|
||||
def __init__(self, managed_headers: ManagedHeadersResource) -> None:
|
||||
self._managed_headers = managed_headers
|
||||
|
||||
self.list = to_streamed_response_wrapper(
|
||||
managed_transforms.list,
|
||||
managed_headers.list,
|
||||
)
|
||||
self.edit = to_streamed_response_wrapper(
|
||||
managed_transforms.edit,
|
||||
managed_headers.edit,
|
||||
)
|
||||
|
||||
|
||||
class AsyncManagedTransformsResourceWithStreamingResponse:
|
||||
def __init__(self, managed_transforms: AsyncManagedTransformsResource) -> None:
|
||||
self._managed_transforms = managed_transforms
|
||||
class AsyncManagedHeadersResourceWithStreamingResponse:
|
||||
def __init__(self, managed_headers: AsyncManagedHeadersResource) -> None:
|
||||
self._managed_headers = managed_headers
|
||||
|
||||
self.list = async_to_streamed_response_wrapper(
|
||||
managed_transforms.list,
|
||||
managed_headers.list,
|
||||
)
|
||||
self.edit = async_to_streamed_response_wrapper(
|
||||
managed_transforms.edit,
|
||||
managed_headers.edit,
|
||||
)
|
||||
|
|
@ -4,10 +4,10 @@ from __future__ import annotations
|
|||
|
||||
import httpx
|
||||
|
||||
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
||||
from ...._compat import cached_property
|
||||
from ...._resource import SyncAPIResource, AsyncAPIResource
|
||||
from ...._response import (
|
||||
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
||||
from ..._compat import cached_property
|
||||
from ..._resource import SyncAPIResource, AsyncAPIResource
|
||||
from ..._response import (
|
||||
BinaryAPIResponse,
|
||||
AsyncBinaryAPIResponse,
|
||||
StreamedBinaryAPIResponse,
|
||||
|
|
@ -17,7 +17,7 @@ from ...._response import (
|
|||
async_to_custom_raw_response_wrapper,
|
||||
async_to_custom_streamed_response_wrapper,
|
||||
)
|
||||
from ...._base_client import make_request_options
|
||||
from ..._base_client import make_request_options
|
||||
|
||||
__all__ = ["DownloadResource", "AsyncDownloadResource"]
|
||||
|
||||
|
|
@ -6,24 +6,24 @@ from typing import Type, Optional, cast
|
|||
|
||||
import httpx
|
||||
|
||||
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
||||
from ...._utils import (
|
||||
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
||||
from ..._utils import (
|
||||
maybe_transform,
|
||||
async_maybe_transform,
|
||||
)
|
||||
from ...._compat import cached_property
|
||||
from ...._resource import SyncAPIResource, AsyncAPIResource
|
||||
from ...._response import (
|
||||
from ..._compat import cached_property
|
||||
from ..._resource import SyncAPIResource, AsyncAPIResource
|
||||
from ..._response import (
|
||||
to_raw_response_wrapper,
|
||||
to_streamed_response_wrapper,
|
||||
async_to_raw_response_wrapper,
|
||||
async_to_streamed_response_wrapper,
|
||||
)
|
||||
from ...._wrappers import ResultWrapper
|
||||
from ...._base_client import make_request_options
|
||||
from ....types.magic_transit.pcaps import ownership_create_params, ownership_validate_params
|
||||
from ....types.magic_transit.pcaps.ownership import Ownership
|
||||
from ....types.magic_transit.pcaps.ownership_get_response import OwnershipGetResponse
|
||||
from ..._wrappers import ResultWrapper
|
||||
from ...types.pcaps import ownership_create_params, ownership_validate_params
|
||||
from ..._base_client import make_request_options
|
||||
from ...types.pcaps.ownership import Ownership
|
||||
from ...types.pcaps.ownership_get_response import OwnershipGetResponse
|
||||
|
||||
__all__ = ["OwnershipResource", "AsyncOwnershipResource"]
|
||||
|
||||
|
|
@ -7,6 +7,12 @@ from typing_extensions import Literal, overload
|
|||
|
||||
import httpx
|
||||
|
||||
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
||||
from ..._utils import (
|
||||
required_args,
|
||||
maybe_transform,
|
||||
async_maybe_transform,
|
||||
)
|
||||
from .download import (
|
||||
DownloadResource,
|
||||
AsyncDownloadResource,
|
||||
|
|
@ -15,12 +21,7 @@ from .download import (
|
|||
DownloadResourceWithStreamingResponse,
|
||||
AsyncDownloadResourceWithStreamingResponse,
|
||||
)
|
||||
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
||||
from ...._utils import (
|
||||
required_args,
|
||||
maybe_transform,
|
||||
async_maybe_transform,
|
||||
)
|
||||
from ..._compat import cached_property
|
||||
from .ownership import (
|
||||
OwnershipResource,
|
||||
AsyncOwnershipResource,
|
||||
|
|
@ -29,22 +30,21 @@ from .ownership import (
|
|||
OwnershipResourceWithStreamingResponse,
|
||||
AsyncOwnershipResourceWithStreamingResponse,
|
||||
)
|
||||
from ...._compat import cached_property
|
||||
from ...._resource import SyncAPIResource, AsyncAPIResource
|
||||
from ...._response import (
|
||||
from ..._resource import SyncAPIResource, AsyncAPIResource
|
||||
from ..._response import (
|
||||
to_raw_response_wrapper,
|
||||
to_streamed_response_wrapper,
|
||||
async_to_raw_response_wrapper,
|
||||
async_to_streamed_response_wrapper,
|
||||
)
|
||||
from ...._wrappers import ResultWrapper
|
||||
from ....pagination import SyncSinglePage, AsyncSinglePage
|
||||
from ...._base_client import AsyncPaginator, make_request_options
|
||||
from ....types.magic_transit import pcap_create_params
|
||||
from ....types.magic_transit.pcap_filter_param import PCAPFilterParam
|
||||
from ....types.magic_transit.pcap_get_response import PCAPGetResponse
|
||||
from ....types.magic_transit.pcap_list_response import PCAPListResponse
|
||||
from ....types.magic_transit.pcap_create_response import PCAPCreateResponse
|
||||
from ..._wrappers import ResultWrapper
|
||||
from ...pagination import SyncSinglePage, AsyncSinglePage
|
||||
from ...types.pcaps import pcap_create_params
|
||||
from ..._base_client import AsyncPaginator, make_request_options
|
||||
from ...types.pcaps.pcap_filter_param import PCAPFilterParam
|
||||
from ...types.pcaps.pcap_get_response import PCAPGetResponse
|
||||
from ...types.pcaps.pcap_list_response import PCAPListResponse
|
||||
from ...types.pcaps.pcap_create_response import PCAPCreateResponse
|
||||
|
||||
__all__ = ["PCAPsResource", "AsyncPCAPsResource"]
|
||||
|
||||
|
|
@ -6,19 +6,19 @@ from typing import Type, cast
|
|||
|
||||
import httpx
|
||||
|
||||
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
||||
from ..._compat import cached_property
|
||||
from ..._resource import SyncAPIResource, AsyncAPIResource
|
||||
from ..._response import (
|
||||
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
||||
from .._compat import cached_property
|
||||
from .._resource import SyncAPIResource, AsyncAPIResource
|
||||
from .._response import (
|
||||
to_raw_response_wrapper,
|
||||
to_streamed_response_wrapper,
|
||||
async_to_raw_response_wrapper,
|
||||
async_to_streamed_response_wrapper,
|
||||
)
|
||||
from ..._wrappers import ResultWrapper
|
||||
from ...pagination import SyncSinglePage, AsyncSinglePage
|
||||
from ..._base_client import AsyncPaginator, make_request_options
|
||||
from ...types.zones.available_rate_plan import AvailableRatePlan
|
||||
from .._wrappers import ResultWrapper
|
||||
from ..pagination import SyncSinglePage, AsyncSinglePage
|
||||
from .._base_client import AsyncPaginator, make_request_options
|
||||
from ..types.plans.available_rate_plan import AvailableRatePlan
|
||||
|
||||
__all__ = ["PlansResource", "AsyncPlansResource"]
|
||||
|
||||
|
|
@ -32,14 +32,6 @@ from .domains import (
|
|||
DomainsResourceWithStreamingResponse,
|
||||
AsyncDomainsResourceWithStreamingResponse,
|
||||
)
|
||||
from .event_notifications import (
|
||||
EventNotificationsResource,
|
||||
AsyncEventNotificationsResource,
|
||||
EventNotificationsResourceWithRawResponse,
|
||||
AsyncEventNotificationsResourceWithRawResponse,
|
||||
EventNotificationsResourceWithStreamingResponse,
|
||||
AsyncEventNotificationsResourceWithStreamingResponse,
|
||||
)
|
||||
from .temporary_credentials import (
|
||||
TemporaryCredentialsResource,
|
||||
AsyncTemporaryCredentialsResource,
|
||||
|
|
@ -74,12 +66,6 @@ __all__ = [
|
|||
"AsyncDomainsResourceWithRawResponse",
|
||||
"DomainsResourceWithStreamingResponse",
|
||||
"AsyncDomainsResourceWithStreamingResponse",
|
||||
"EventNotificationsResource",
|
||||
"AsyncEventNotificationsResource",
|
||||
"EventNotificationsResourceWithRawResponse",
|
||||
"AsyncEventNotificationsResourceWithRawResponse",
|
||||
"EventNotificationsResourceWithStreamingResponse",
|
||||
"AsyncEventNotificationsResourceWithStreamingResponse",
|
||||
"R2Resource",
|
||||
"AsyncR2Resource",
|
||||
"R2ResourceWithRawResponse",
|
||||
|
|
|
|||
|
|
@ -29,14 +29,6 @@ from .domains import (
|
|||
from ..._compat import cached_property
|
||||
from ..._resource import SyncAPIResource, AsyncAPIResource
|
||||
from .domains.domains import DomainsResource, AsyncDomainsResource
|
||||
from .event_notifications import (
|
||||
EventNotificationsResource,
|
||||
AsyncEventNotificationsResource,
|
||||
EventNotificationsResourceWithRawResponse,
|
||||
AsyncEventNotificationsResourceWithRawResponse,
|
||||
EventNotificationsResourceWithStreamingResponse,
|
||||
AsyncEventNotificationsResourceWithStreamingResponse,
|
||||
)
|
||||
from .temporary_credentials import (
|
||||
TemporaryCredentialsResource,
|
||||
AsyncTemporaryCredentialsResource,
|
||||
|
|
@ -45,7 +37,6 @@ from .temporary_credentials import (
|
|||
TemporaryCredentialsResourceWithStreamingResponse,
|
||||
AsyncTemporaryCredentialsResourceWithStreamingResponse,
|
||||
)
|
||||
from .event_notifications.event_notifications import EventNotificationsResource, AsyncEventNotificationsResource
|
||||
|
||||
__all__ = ["R2Resource", "AsyncR2Resource"]
|
||||
|
||||
|
|
@ -67,10 +58,6 @@ class R2Resource(SyncAPIResource):
|
|||
def domains(self) -> DomainsResource:
|
||||
return DomainsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def event_notifications(self) -> EventNotificationsResource:
|
||||
return EventNotificationsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> R2ResourceWithRawResponse:
|
||||
"""
|
||||
|
|
@ -108,10 +95,6 @@ class AsyncR2Resource(AsyncAPIResource):
|
|||
def domains(self) -> AsyncDomainsResource:
|
||||
return AsyncDomainsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def event_notifications(self) -> AsyncEventNotificationsResource:
|
||||
return AsyncEventNotificationsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AsyncR2ResourceWithRawResponse:
|
||||
"""
|
||||
|
|
@ -152,10 +135,6 @@ class R2ResourceWithRawResponse:
|
|||
def domains(self) -> DomainsResourceWithRawResponse:
|
||||
return DomainsResourceWithRawResponse(self._r2.domains)
|
||||
|
||||
@cached_property
|
||||
def event_notifications(self) -> EventNotificationsResourceWithRawResponse:
|
||||
return EventNotificationsResourceWithRawResponse(self._r2.event_notifications)
|
||||
|
||||
|
||||
class AsyncR2ResourceWithRawResponse:
|
||||
def __init__(self, r2: AsyncR2Resource) -> None:
|
||||
|
|
@ -177,10 +156,6 @@ class AsyncR2ResourceWithRawResponse:
|
|||
def domains(self) -> AsyncDomainsResourceWithRawResponse:
|
||||
return AsyncDomainsResourceWithRawResponse(self._r2.domains)
|
||||
|
||||
@cached_property
|
||||
def event_notifications(self) -> AsyncEventNotificationsResourceWithRawResponse:
|
||||
return AsyncEventNotificationsResourceWithRawResponse(self._r2.event_notifications)
|
||||
|
||||
|
||||
class R2ResourceWithStreamingResponse:
|
||||
def __init__(self, r2: R2Resource) -> None:
|
||||
|
|
@ -202,10 +177,6 @@ class R2ResourceWithStreamingResponse:
|
|||
def domains(self) -> DomainsResourceWithStreamingResponse:
|
||||
return DomainsResourceWithStreamingResponse(self._r2.domains)
|
||||
|
||||
@cached_property
|
||||
def event_notifications(self) -> EventNotificationsResourceWithStreamingResponse:
|
||||
return EventNotificationsResourceWithStreamingResponse(self._r2.event_notifications)
|
||||
|
||||
|
||||
class AsyncR2ResourceWithStreamingResponse:
|
||||
def __init__(self, r2: AsyncR2Resource) -> None:
|
||||
|
|
@ -226,7 +197,3 @@ class AsyncR2ResourceWithStreamingResponse:
|
|||
@cached_property
|
||||
def domains(self) -> AsyncDomainsResourceWithStreamingResponse:
|
||||
return AsyncDomainsResourceWithStreamingResponse(self._r2.domains)
|
||||
|
||||
@cached_property
|
||||
def event_notifications(self) -> AsyncEventNotificationsResourceWithStreamingResponse:
|
||||
return AsyncEventNotificationsResourceWithStreamingResponse(self._r2.event_notifications)
|
||||
|
|
|
|||
|
|
@ -6,18 +6,18 @@ from typing import Type, Optional, cast
|
|||
|
||||
import httpx
|
||||
|
||||
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
||||
from ..._compat import cached_property
|
||||
from ..._resource import SyncAPIResource, AsyncAPIResource
|
||||
from ..._response import (
|
||||
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
||||
from .._compat import cached_property
|
||||
from .._resource import SyncAPIResource, AsyncAPIResource
|
||||
from .._response import (
|
||||
to_raw_response_wrapper,
|
||||
to_streamed_response_wrapper,
|
||||
async_to_raw_response_wrapper,
|
||||
async_to_streamed_response_wrapper,
|
||||
)
|
||||
from ..._wrappers import ResultWrapper
|
||||
from ..._base_client import make_request_options
|
||||
from ...types.zones.rate_plan_get_response import RatePlanGetResponse
|
||||
from .._wrappers import ResultWrapper
|
||||
from .._base_client import make_request_options
|
||||
from ..types.rate_plans.rate_plan_get_response import RatePlanGetResponse
|
||||
|
||||
__all__ = ["RatePlansResource", "AsyncRatePlansResource"]
|
||||
|
||||
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Dict, List, Type, Union, cast
|
||||
from datetime import datetime
|
||||
from typing import Dict, List, Type, cast
|
||||
from typing_extensions import Literal
|
||||
|
||||
import httpx
|
||||
|
|
@ -31,10 +30,9 @@ from ..._response import (
|
|||
)
|
||||
from ..._wrappers import ResultWrapper
|
||||
from ..._base_client import make_request_options
|
||||
from ...types.url_scanner import scan_get_params, scan_list_params, scan_create_params, scan_screenshot_params
|
||||
from ...types.url_scanner import scan_get_params, scan_create_params, scan_screenshot_params
|
||||
from ...types.url_scanner.scan_get_response import ScanGetResponse
|
||||
from ...types.url_scanner.scan_har_response import ScanHarResponse
|
||||
from ...types.url_scanner.scan_list_response import ScanListResponse
|
||||
from ...types.url_scanner.scan_create_response import ScanCreateResponse
|
||||
|
||||
__all__ = ["ScansResource", "AsyncScansResource"]
|
||||
|
|
@ -125,128 +123,6 @@ class ScansResource(SyncAPIResource):
|
|||
cast_to=cast(Type[ScanCreateResponse], ResultWrapper[ScanCreateResponse]),
|
||||
)
|
||||
|
||||
def list(
|
||||
self,
|
||||
account_id: str,
|
||||
*,
|
||||
account_scans: bool | NotGiven = NOT_GIVEN,
|
||||
asn: str | NotGiven = NOT_GIVEN,
|
||||
date_end: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
||||
date_start: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
||||
hash: str | NotGiven = NOT_GIVEN,
|
||||
hostname: str | NotGiven = NOT_GIVEN,
|
||||
ip: str | NotGiven = NOT_GIVEN,
|
||||
is_malicious: bool | NotGiven = NOT_GIVEN,
|
||||
limit: int | NotGiven = NOT_GIVEN,
|
||||
next_cursor: str | NotGiven = NOT_GIVEN,
|
||||
page_asn: str | NotGiven = NOT_GIVEN,
|
||||
page_hostname: str | NotGiven = NOT_GIVEN,
|
||||
page_ip: str | NotGiven = NOT_GIVEN,
|
||||
page_path: str | NotGiven = NOT_GIVEN,
|
||||
page_url: str | NotGiven = NOT_GIVEN,
|
||||
path: str | NotGiven = NOT_GIVEN,
|
||||
scan_id: str | NotGiven = NOT_GIVEN,
|
||||
url: str | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> ScanListResponse:
|
||||
"""
|
||||
Search scans by date and webpages' requests, including full URL (after
|
||||
redirects), hostname, and path. <br/> A successful scan will appear in search
|
||||
results a few minutes after finishing but may take much longer if the system in
|
||||
under load. By default, only successfully completed scans will appear in search
|
||||
results, unless searching by `scanId`. Please take into account that older scans
|
||||
may be removed from the search index at an unspecified time.
|
||||
|
||||
Args:
|
||||
account_id: Account Id.
|
||||
|
||||
account_scans: Return only scans created by account.
|
||||
|
||||
asn: Filter scans by Autonomous System Number (ASN) of _any_ request made by the
|
||||
webpage.
|
||||
|
||||
date_end: Filter scans requested before date (inclusive).
|
||||
|
||||
date_start: Filter scans requested after date (inclusive).
|
||||
|
||||
hash: Filter scans by hash of any html/js/css request made by the webpage.
|
||||
|
||||
hostname: Filter scans by hostname of _any_ request made by the webpage.
|
||||
|
||||
ip: Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage.
|
||||
|
||||
is_malicious: Filter scans by malicious verdict.
|
||||
|
||||
limit: Limit the number of objects in the response.
|
||||
|
||||
next_cursor: Pagination cursor to get the next set of results.
|
||||
|
||||
page_asn: Filter scans by main page Autonomous System Number (ASN).
|
||||
|
||||
page_hostname: Filter scans by main page hostname (domain of effective URL).
|
||||
|
||||
page_ip: Filter scans by main page IP address (IPv4 or IPv6).
|
||||
|
||||
page_path: Filter scans by exact match of effective URL path (also supports suffix search).
|
||||
|
||||
page_url: Filter scans by submitted or scanned URL
|
||||
|
||||
path: Filter scans by url path of _any_ request made by the webpage.
|
||||
|
||||
scan_id: Scan uuid
|
||||
|
||||
url: Filter scans by URL of _any_ request made by the webpage
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
return self._get(
|
||||
f"/accounts/{account_id}/urlscanner/scan",
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
query=maybe_transform(
|
||||
{
|
||||
"account_scans": account_scans,
|
||||
"asn": asn,
|
||||
"date_end": date_end,
|
||||
"date_start": date_start,
|
||||
"hash": hash,
|
||||
"hostname": hostname,
|
||||
"ip": ip,
|
||||
"is_malicious": is_malicious,
|
||||
"limit": limit,
|
||||
"next_cursor": next_cursor,
|
||||
"page_asn": page_asn,
|
||||
"page_hostname": page_hostname,
|
||||
"page_ip": page_ip,
|
||||
"page_path": page_path,
|
||||
"page_url": page_url,
|
||||
"path": path,
|
||||
"scan_id": scan_id,
|
||||
"url": url,
|
||||
},
|
||||
scan_list_params.ScanListParams,
|
||||
),
|
||||
post_parser=ResultWrapper[ScanListResponse]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[ScanListResponse], ResultWrapper[ScanListResponse]),
|
||||
)
|
||||
|
||||
def get(
|
||||
self,
|
||||
scan_id: str,
|
||||
|
|
@ -475,128 +351,6 @@ class AsyncScansResource(AsyncAPIResource):
|
|||
cast_to=cast(Type[ScanCreateResponse], ResultWrapper[ScanCreateResponse]),
|
||||
)
|
||||
|
||||
async def list(
|
||||
self,
|
||||
account_id: str,
|
||||
*,
|
||||
account_scans: bool | NotGiven = NOT_GIVEN,
|
||||
asn: str | NotGiven = NOT_GIVEN,
|
||||
date_end: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
||||
date_start: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
||||
hash: str | NotGiven = NOT_GIVEN,
|
||||
hostname: str | NotGiven = NOT_GIVEN,
|
||||
ip: str | NotGiven = NOT_GIVEN,
|
||||
is_malicious: bool | NotGiven = NOT_GIVEN,
|
||||
limit: int | NotGiven = NOT_GIVEN,
|
||||
next_cursor: str | NotGiven = NOT_GIVEN,
|
||||
page_asn: str | NotGiven = NOT_GIVEN,
|
||||
page_hostname: str | NotGiven = NOT_GIVEN,
|
||||
page_ip: str | NotGiven = NOT_GIVEN,
|
||||
page_path: str | NotGiven = NOT_GIVEN,
|
||||
page_url: str | NotGiven = NOT_GIVEN,
|
||||
path: str | NotGiven = NOT_GIVEN,
|
||||
scan_id: str | NotGiven = NOT_GIVEN,
|
||||
url: str | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> ScanListResponse:
|
||||
"""
|
||||
Search scans by date and webpages' requests, including full URL (after
|
||||
redirects), hostname, and path. <br/> A successful scan will appear in search
|
||||
results a few minutes after finishing but may take much longer if the system in
|
||||
under load. By default, only successfully completed scans will appear in search
|
||||
results, unless searching by `scanId`. Please take into account that older scans
|
||||
may be removed from the search index at an unspecified time.
|
||||
|
||||
Args:
|
||||
account_id: Account Id.
|
||||
|
||||
account_scans: Return only scans created by account.
|
||||
|
||||
asn: Filter scans by Autonomous System Number (ASN) of _any_ request made by the
|
||||
webpage.
|
||||
|
||||
date_end: Filter scans requested before date (inclusive).
|
||||
|
||||
date_start: Filter scans requested after date (inclusive).
|
||||
|
||||
hash: Filter scans by hash of any html/js/css request made by the webpage.
|
||||
|
||||
hostname: Filter scans by hostname of _any_ request made by the webpage.
|
||||
|
||||
ip: Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage.
|
||||
|
||||
is_malicious: Filter scans by malicious verdict.
|
||||
|
||||
limit: Limit the number of objects in the response.
|
||||
|
||||
next_cursor: Pagination cursor to get the next set of results.
|
||||
|
||||
page_asn: Filter scans by main page Autonomous System Number (ASN).
|
||||
|
||||
page_hostname: Filter scans by main page hostname (domain of effective URL).
|
||||
|
||||
page_ip: Filter scans by main page IP address (IPv4 or IPv6).
|
||||
|
||||
page_path: Filter scans by exact match of effective URL path (also supports suffix search).
|
||||
|
||||
page_url: Filter scans by submitted or scanned URL
|
||||
|
||||
path: Filter scans by url path of _any_ request made by the webpage.
|
||||
|
||||
scan_id: Scan uuid
|
||||
|
||||
url: Filter scans by URL of _any_ request made by the webpage
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
return await self._get(
|
||||
f"/accounts/{account_id}/urlscanner/scan",
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
query=await async_maybe_transform(
|
||||
{
|
||||
"account_scans": account_scans,
|
||||
"asn": asn,
|
||||
"date_end": date_end,
|
||||
"date_start": date_start,
|
||||
"hash": hash,
|
||||
"hostname": hostname,
|
||||
"ip": ip,
|
||||
"is_malicious": is_malicious,
|
||||
"limit": limit,
|
||||
"next_cursor": next_cursor,
|
||||
"page_asn": page_asn,
|
||||
"page_hostname": page_hostname,
|
||||
"page_ip": page_ip,
|
||||
"page_path": page_path,
|
||||
"page_url": page_url,
|
||||
"path": path,
|
||||
"scan_id": scan_id,
|
||||
"url": url,
|
||||
},
|
||||
scan_list_params.ScanListParams,
|
||||
),
|
||||
post_parser=ResultWrapper[ScanListResponse]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[ScanListResponse], ResultWrapper[ScanListResponse]),
|
||||
)
|
||||
|
||||
async def get(
|
||||
self,
|
||||
scan_id: str,
|
||||
|
|
@ -749,9 +503,6 @@ class ScansResourceWithRawResponse:
|
|||
self.create = to_raw_response_wrapper(
|
||||
scans.create,
|
||||
)
|
||||
self.list = to_raw_response_wrapper(
|
||||
scans.list,
|
||||
)
|
||||
self.get = to_raw_response_wrapper(
|
||||
scans.get,
|
||||
)
|
||||
|
|
@ -771,9 +522,6 @@ class AsyncScansResourceWithRawResponse:
|
|||
self.create = async_to_raw_response_wrapper(
|
||||
scans.create,
|
||||
)
|
||||
self.list = async_to_raw_response_wrapper(
|
||||
scans.list,
|
||||
)
|
||||
self.get = async_to_raw_response_wrapper(
|
||||
scans.get,
|
||||
)
|
||||
|
|
@ -793,9 +541,6 @@ class ScansResourceWithStreamingResponse:
|
|||
self.create = to_streamed_response_wrapper(
|
||||
scans.create,
|
||||
)
|
||||
self.list = to_streamed_response_wrapper(
|
||||
scans.list,
|
||||
)
|
||||
self.get = to_streamed_response_wrapper(
|
||||
scans.get,
|
||||
)
|
||||
|
|
@ -815,9 +560,6 @@ class AsyncScansResourceWithStreamingResponse:
|
|||
self.create = async_to_streamed_response_wrapper(
|
||||
scans.create,
|
||||
)
|
||||
self.list = async_to_streamed_response_wrapper(
|
||||
scans.list,
|
||||
)
|
||||
self.get = async_to_streamed_response_wrapper(
|
||||
scans.get,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Type, Union, cast
|
||||
from datetime import datetime
|
||||
|
||||
import httpx
|
||||
|
||||
from .scans import (
|
||||
ScansResource,
|
||||
AsyncScansResource,
|
||||
|
|
@ -10,8 +15,23 @@ from .scans import (
|
|||
ScansResourceWithStreamingResponse,
|
||||
AsyncScansResourceWithStreamingResponse,
|
||||
)
|
||||
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
||||
from ..._utils import (
|
||||
maybe_transform,
|
||||
async_maybe_transform,
|
||||
)
|
||||
from ..._compat import cached_property
|
||||
from ..._resource import SyncAPIResource, AsyncAPIResource
|
||||
from ..._response import (
|
||||
to_raw_response_wrapper,
|
||||
to_streamed_response_wrapper,
|
||||
async_to_raw_response_wrapper,
|
||||
async_to_streamed_response_wrapper,
|
||||
)
|
||||
from ..._wrappers import ResultWrapper
|
||||
from ..._base_client import make_request_options
|
||||
from ...types.url_scanner import url_scanner_scan_params
|
||||
from ...types.url_scanner.url_scanner_scan_response import URLScannerScanResponse
|
||||
|
||||
__all__ = ["URLScannerResource", "AsyncURLScannerResource"]
|
||||
|
||||
|
|
@ -40,6 +60,128 @@ class URLScannerResource(SyncAPIResource):
|
|||
"""
|
||||
return URLScannerResourceWithStreamingResponse(self)
|
||||
|
||||
def scan(
|
||||
self,
|
||||
account_id: str,
|
||||
*,
|
||||
account_scans: bool | NotGiven = NOT_GIVEN,
|
||||
asn: str | NotGiven = NOT_GIVEN,
|
||||
date_end: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
||||
date_start: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
||||
hash: str | NotGiven = NOT_GIVEN,
|
||||
hostname: str | NotGiven = NOT_GIVEN,
|
||||
ip: str | NotGiven = NOT_GIVEN,
|
||||
is_malicious: bool | NotGiven = NOT_GIVEN,
|
||||
limit: int | NotGiven = NOT_GIVEN,
|
||||
next_cursor: str | NotGiven = NOT_GIVEN,
|
||||
page_asn: str | NotGiven = NOT_GIVEN,
|
||||
page_hostname: str | NotGiven = NOT_GIVEN,
|
||||
page_ip: str | NotGiven = NOT_GIVEN,
|
||||
page_path: str | NotGiven = NOT_GIVEN,
|
||||
page_url: str | NotGiven = NOT_GIVEN,
|
||||
path: str | NotGiven = NOT_GIVEN,
|
||||
scan_id: str | NotGiven = NOT_GIVEN,
|
||||
url: str | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> URLScannerScanResponse:
|
||||
"""
|
||||
Search scans by date and webpages' requests, including full URL (after
|
||||
redirects), hostname, and path. <br/> A successful scan will appear in search
|
||||
results a few minutes after finishing but may take much longer if the system in
|
||||
under load. By default, only successfully completed scans will appear in search
|
||||
results, unless searching by `scanId`. Please take into account that older scans
|
||||
may be removed from the search index at an unspecified time.
|
||||
|
||||
Args:
|
||||
account_id: Account Id.
|
||||
|
||||
account_scans: Return only scans created by account.
|
||||
|
||||
asn: Filter scans by Autonomous System Number (ASN) of _any_ request made by the
|
||||
webpage.
|
||||
|
||||
date_end: Filter scans requested before date (inclusive).
|
||||
|
||||
date_start: Filter scans requested after date (inclusive).
|
||||
|
||||
hash: Filter scans by hash of any html/js/css request made by the webpage.
|
||||
|
||||
hostname: Filter scans by hostname of _any_ request made by the webpage.
|
||||
|
||||
ip: Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage.
|
||||
|
||||
is_malicious: Filter scans by malicious verdict.
|
||||
|
||||
limit: Limit the number of objects in the response.
|
||||
|
||||
next_cursor: Pagination cursor to get the next set of results.
|
||||
|
||||
page_asn: Filter scans by main page Autonomous System Number (ASN).
|
||||
|
||||
page_hostname: Filter scans by main page hostname (domain of effective URL).
|
||||
|
||||
page_ip: Filter scans by main page IP address (IPv4 or IPv6).
|
||||
|
||||
page_path: Filter scans by exact match of effective URL path (also supports suffix search).
|
||||
|
||||
page_url: Filter scans by submitted or scanned URL
|
||||
|
||||
path: Filter scans by url path of _any_ request made by the webpage.
|
||||
|
||||
scan_id: Scan uuid
|
||||
|
||||
url: Filter scans by URL of _any_ request made by the webpage
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
return self._get(
|
||||
f"/accounts/{account_id}/urlscanner/scan",
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
query=maybe_transform(
|
||||
{
|
||||
"account_scans": account_scans,
|
||||
"asn": asn,
|
||||
"date_end": date_end,
|
||||
"date_start": date_start,
|
||||
"hash": hash,
|
||||
"hostname": hostname,
|
||||
"ip": ip,
|
||||
"is_malicious": is_malicious,
|
||||
"limit": limit,
|
||||
"next_cursor": next_cursor,
|
||||
"page_asn": page_asn,
|
||||
"page_hostname": page_hostname,
|
||||
"page_ip": page_ip,
|
||||
"page_path": page_path,
|
||||
"page_url": page_url,
|
||||
"path": path,
|
||||
"scan_id": scan_id,
|
||||
"url": url,
|
||||
},
|
||||
url_scanner_scan_params.URLScannerScanParams,
|
||||
),
|
||||
post_parser=ResultWrapper[URLScannerScanResponse]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[URLScannerScanResponse], ResultWrapper[URLScannerScanResponse]),
|
||||
)
|
||||
|
||||
|
||||
class AsyncURLScannerResource(AsyncAPIResource):
|
||||
@cached_property
|
||||
|
|
@ -65,11 +207,137 @@ class AsyncURLScannerResource(AsyncAPIResource):
|
|||
"""
|
||||
return AsyncURLScannerResourceWithStreamingResponse(self)
|
||||
|
||||
async def scan(
|
||||
self,
|
||||
account_id: str,
|
||||
*,
|
||||
account_scans: bool | NotGiven = NOT_GIVEN,
|
||||
asn: str | NotGiven = NOT_GIVEN,
|
||||
date_end: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
||||
date_start: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
||||
hash: str | NotGiven = NOT_GIVEN,
|
||||
hostname: str | NotGiven = NOT_GIVEN,
|
||||
ip: str | NotGiven = NOT_GIVEN,
|
||||
is_malicious: bool | NotGiven = NOT_GIVEN,
|
||||
limit: int | NotGiven = NOT_GIVEN,
|
||||
next_cursor: str | NotGiven = NOT_GIVEN,
|
||||
page_asn: str | NotGiven = NOT_GIVEN,
|
||||
page_hostname: str | NotGiven = NOT_GIVEN,
|
||||
page_ip: str | NotGiven = NOT_GIVEN,
|
||||
page_path: str | NotGiven = NOT_GIVEN,
|
||||
page_url: str | NotGiven = NOT_GIVEN,
|
||||
path: str | NotGiven = NOT_GIVEN,
|
||||
scan_id: str | NotGiven = NOT_GIVEN,
|
||||
url: str | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> URLScannerScanResponse:
|
||||
"""
|
||||
Search scans by date and webpages' requests, including full URL (after
|
||||
redirects), hostname, and path. <br/> A successful scan will appear in search
|
||||
results a few minutes after finishing but may take much longer if the system in
|
||||
under load. By default, only successfully completed scans will appear in search
|
||||
results, unless searching by `scanId`. Please take into account that older scans
|
||||
may be removed from the search index at an unspecified time.
|
||||
|
||||
Args:
|
||||
account_id: Account Id.
|
||||
|
||||
account_scans: Return only scans created by account.
|
||||
|
||||
asn: Filter scans by Autonomous System Number (ASN) of _any_ request made by the
|
||||
webpage.
|
||||
|
||||
date_end: Filter scans requested before date (inclusive).
|
||||
|
||||
date_start: Filter scans requested after date (inclusive).
|
||||
|
||||
hash: Filter scans by hash of any html/js/css request made by the webpage.
|
||||
|
||||
hostname: Filter scans by hostname of _any_ request made by the webpage.
|
||||
|
||||
ip: Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage.
|
||||
|
||||
is_malicious: Filter scans by malicious verdict.
|
||||
|
||||
limit: Limit the number of objects in the response.
|
||||
|
||||
next_cursor: Pagination cursor to get the next set of results.
|
||||
|
||||
page_asn: Filter scans by main page Autonomous System Number (ASN).
|
||||
|
||||
page_hostname: Filter scans by main page hostname (domain of effective URL).
|
||||
|
||||
page_ip: Filter scans by main page IP address (IPv4 or IPv6).
|
||||
|
||||
page_path: Filter scans by exact match of effective URL path (also supports suffix search).
|
||||
|
||||
page_url: Filter scans by submitted or scanned URL
|
||||
|
||||
path: Filter scans by url path of _any_ request made by the webpage.
|
||||
|
||||
scan_id: Scan uuid
|
||||
|
||||
url: Filter scans by URL of _any_ request made by the webpage
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
return await self._get(
|
||||
f"/accounts/{account_id}/urlscanner/scan",
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
query=await async_maybe_transform(
|
||||
{
|
||||
"account_scans": account_scans,
|
||||
"asn": asn,
|
||||
"date_end": date_end,
|
||||
"date_start": date_start,
|
||||
"hash": hash,
|
||||
"hostname": hostname,
|
||||
"ip": ip,
|
||||
"is_malicious": is_malicious,
|
||||
"limit": limit,
|
||||
"next_cursor": next_cursor,
|
||||
"page_asn": page_asn,
|
||||
"page_hostname": page_hostname,
|
||||
"page_ip": page_ip,
|
||||
"page_path": page_path,
|
||||
"page_url": page_url,
|
||||
"path": path,
|
||||
"scan_id": scan_id,
|
||||
"url": url,
|
||||
},
|
||||
url_scanner_scan_params.URLScannerScanParams,
|
||||
),
|
||||
post_parser=ResultWrapper[URLScannerScanResponse]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[URLScannerScanResponse], ResultWrapper[URLScannerScanResponse]),
|
||||
)
|
||||
|
||||
|
||||
class URLScannerResourceWithRawResponse:
|
||||
def __init__(self, url_scanner: URLScannerResource) -> None:
|
||||
self._url_scanner = url_scanner
|
||||
|
||||
self.scan = to_raw_response_wrapper(
|
||||
url_scanner.scan,
|
||||
)
|
||||
|
||||
@cached_property
|
||||
def scans(self) -> ScansResourceWithRawResponse:
|
||||
return ScansResourceWithRawResponse(self._url_scanner.scans)
|
||||
|
|
@ -79,6 +347,10 @@ class AsyncURLScannerResourceWithRawResponse:
|
|||
def __init__(self, url_scanner: AsyncURLScannerResource) -> None:
|
||||
self._url_scanner = url_scanner
|
||||
|
||||
self.scan = async_to_raw_response_wrapper(
|
||||
url_scanner.scan,
|
||||
)
|
||||
|
||||
@cached_property
|
||||
def scans(self) -> AsyncScansResourceWithRawResponse:
|
||||
return AsyncScansResourceWithRawResponse(self._url_scanner.scans)
|
||||
|
|
@ -88,6 +360,10 @@ class URLScannerResourceWithStreamingResponse:
|
|||
def __init__(self, url_scanner: URLScannerResource) -> None:
|
||||
self._url_scanner = url_scanner
|
||||
|
||||
self.scan = to_streamed_response_wrapper(
|
||||
url_scanner.scan,
|
||||
)
|
||||
|
||||
@cached_property
|
||||
def scans(self) -> ScansResourceWithStreamingResponse:
|
||||
return ScansResourceWithStreamingResponse(self._url_scanner.scans)
|
||||
|
|
@ -97,6 +373,10 @@ class AsyncURLScannerResourceWithStreamingResponse:
|
|||
def __init__(self, url_scanner: AsyncURLScannerResource) -> None:
|
||||
self._url_scanner = url_scanner
|
||||
|
||||
self.scan = async_to_streamed_response_wrapper(
|
||||
url_scanner.scan,
|
||||
)
|
||||
|
||||
@cached_property
|
||||
def scans(self) -> AsyncScansResourceWithStreamingResponse:
|
||||
return AsyncScansResourceWithStreamingResponse(self._url_scanner.scans)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ from ..._response import (
|
|||
from ..._wrappers import ResultWrapper
|
||||
from ...types.user import subscription_update_params
|
||||
from ..._base_client import make_request_options
|
||||
from ...types.shared_params.rate_plan import RatePlan
|
||||
from ...types.user.rate_plan_param import RatePlanParam
|
||||
from ...types.user.subscription_get_response import SubscriptionGetResponse
|
||||
from ...types.user.subscription_delete_response import SubscriptionDeleteResponse
|
||||
from ...types.user.subscription_update_response import SubscriptionUpdateResponse
|
||||
|
|
@ -56,7 +56,7 @@ class SubscriptionsResource(SyncAPIResource):
|
|||
identifier: str,
|
||||
*,
|
||||
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | NotGiven = NOT_GIVEN,
|
||||
rate_plan: RatePlan | NotGiven = NOT_GIVEN,
|
||||
rate_plan: RatePlanParam | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
|
|
@ -192,7 +192,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
|
|||
identifier: str,
|
||||
*,
|
||||
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | NotGiven = NOT_GIVEN,
|
||||
rate_plan: RatePlan | NotGiven = NOT_GIVEN,
|
||||
rate_plan: RatePlanParam | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
|
|
|
|||
|
|
@ -88,14 +88,6 @@ from .custom_pages import (
|
|||
CustomPagesResourceWithStreamingResponse,
|
||||
AsyncCustomPagesResourceWithStreamingResponse,
|
||||
)
|
||||
from .infrastructure import (
|
||||
InfrastructureResource,
|
||||
AsyncInfrastructureResource,
|
||||
InfrastructureResourceWithRawResponse,
|
||||
AsyncInfrastructureResourceWithRawResponse,
|
||||
InfrastructureResourceWithStreamingResponse,
|
||||
AsyncInfrastructureResourceWithStreamingResponse,
|
||||
)
|
||||
from .service_tokens import (
|
||||
ServiceTokensResource,
|
||||
AsyncServiceTokensResource,
|
||||
|
|
@ -106,12 +98,6 @@ from .service_tokens import (
|
|||
)
|
||||
|
||||
__all__ = [
|
||||
"InfrastructureResource",
|
||||
"AsyncInfrastructureResource",
|
||||
"InfrastructureResourceWithRawResponse",
|
||||
"AsyncInfrastructureResourceWithRawResponse",
|
||||
"InfrastructureResourceWithStreamingResponse",
|
||||
"AsyncInfrastructureResourceWithStreamingResponse",
|
||||
"ApplicationsResource",
|
||||
"AsyncApplicationsResource",
|
||||
"ApplicationsResourceWithRawResponse",
|
||||
|
|
|
|||
|
|
@ -86,14 +86,6 @@ from .custom_pages import (
|
|||
CustomPagesResourceWithStreamingResponse,
|
||||
AsyncCustomPagesResourceWithStreamingResponse,
|
||||
)
|
||||
from .infrastructure import (
|
||||
InfrastructureResource,
|
||||
AsyncInfrastructureResource,
|
||||
InfrastructureResourceWithRawResponse,
|
||||
AsyncInfrastructureResourceWithRawResponse,
|
||||
InfrastructureResourceWithStreamingResponse,
|
||||
AsyncInfrastructureResourceWithStreamingResponse,
|
||||
)
|
||||
from .service_tokens import (
|
||||
ServiceTokensResource,
|
||||
AsyncServiceTokensResource,
|
||||
|
|
@ -104,16 +96,11 @@ from .service_tokens import (
|
|||
)
|
||||
from .applications.applications import ApplicationsResource, AsyncApplicationsResource
|
||||
from .certificates.certificates import CertificatesResource, AsyncCertificatesResource
|
||||
from .infrastructure.infrastructure import InfrastructureResource, AsyncInfrastructureResource
|
||||
|
||||
__all__ = ["AccessResource", "AsyncAccessResource"]
|
||||
|
||||
|
||||
class AccessResource(SyncAPIResource):
|
||||
@cached_property
|
||||
def infrastructure(self) -> InfrastructureResource:
|
||||
return InfrastructureResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def applications(self) -> ApplicationsResource:
|
||||
return ApplicationsResource(self._client)
|
||||
|
|
@ -179,10 +166,6 @@ class AccessResource(SyncAPIResource):
|
|||
|
||||
|
||||
class AsyncAccessResource(AsyncAPIResource):
|
||||
@cached_property
|
||||
def infrastructure(self) -> AsyncInfrastructureResource:
|
||||
return AsyncInfrastructureResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def applications(self) -> AsyncApplicationsResource:
|
||||
return AsyncApplicationsResource(self._client)
|
||||
|
|
@ -251,10 +234,6 @@ class AccessResourceWithRawResponse:
|
|||
def __init__(self, access: AccessResource) -> None:
|
||||
self._access = access
|
||||
|
||||
@cached_property
|
||||
def infrastructure(self) -> InfrastructureResourceWithRawResponse:
|
||||
return InfrastructureResourceWithRawResponse(self._access.infrastructure)
|
||||
|
||||
@cached_property
|
||||
def applications(self) -> ApplicationsResourceWithRawResponse:
|
||||
return ApplicationsResourceWithRawResponse(self._access.applications)
|
||||
|
|
@ -304,10 +283,6 @@ class AsyncAccessResourceWithRawResponse:
|
|||
def __init__(self, access: AsyncAccessResource) -> None:
|
||||
self._access = access
|
||||
|
||||
@cached_property
|
||||
def infrastructure(self) -> AsyncInfrastructureResourceWithRawResponse:
|
||||
return AsyncInfrastructureResourceWithRawResponse(self._access.infrastructure)
|
||||
|
||||
@cached_property
|
||||
def applications(self) -> AsyncApplicationsResourceWithRawResponse:
|
||||
return AsyncApplicationsResourceWithRawResponse(self._access.applications)
|
||||
|
|
@ -357,10 +332,6 @@ class AccessResourceWithStreamingResponse:
|
|||
def __init__(self, access: AccessResource) -> None:
|
||||
self._access = access
|
||||
|
||||
@cached_property
|
||||
def infrastructure(self) -> InfrastructureResourceWithStreamingResponse:
|
||||
return InfrastructureResourceWithStreamingResponse(self._access.infrastructure)
|
||||
|
||||
@cached_property
|
||||
def applications(self) -> ApplicationsResourceWithStreamingResponse:
|
||||
return ApplicationsResourceWithStreamingResponse(self._access.applications)
|
||||
|
|
@ -410,10 +381,6 @@ class AsyncAccessResourceWithStreamingResponse:
|
|||
def __init__(self, access: AsyncAccessResource) -> None:
|
||||
self._access = access
|
||||
|
||||
@cached_property
|
||||
def infrastructure(self) -> AsyncInfrastructureResourceWithStreamingResponse:
|
||||
return AsyncInfrastructureResourceWithStreamingResponse(self._access.infrastructure)
|
||||
|
||||
@cached_property
|
||||
def applications(self) -> AsyncApplicationsResourceWithStreamingResponse:
|
||||
return AsyncApplicationsResourceWithStreamingResponse(self._access.applications)
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from .targets import (
|
||||
TargetsResource,
|
||||
AsyncTargetsResource,
|
||||
TargetsResourceWithRawResponse,
|
||||
AsyncTargetsResourceWithRawResponse,
|
||||
TargetsResourceWithStreamingResponse,
|
||||
AsyncTargetsResourceWithStreamingResponse,
|
||||
)
|
||||
from .infrastructure import (
|
||||
InfrastructureResource,
|
||||
AsyncInfrastructureResource,
|
||||
InfrastructureResourceWithRawResponse,
|
||||
AsyncInfrastructureResourceWithRawResponse,
|
||||
InfrastructureResourceWithStreamingResponse,
|
||||
AsyncInfrastructureResourceWithStreamingResponse,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"TargetsResource",
|
||||
"AsyncTargetsResource",
|
||||
"TargetsResourceWithRawResponse",
|
||||
"AsyncTargetsResourceWithRawResponse",
|
||||
"TargetsResourceWithStreamingResponse",
|
||||
"AsyncTargetsResourceWithStreamingResponse",
|
||||
"InfrastructureResource",
|
||||
"AsyncInfrastructureResource",
|
||||
"InfrastructureResourceWithRawResponse",
|
||||
"AsyncInfrastructureResourceWithRawResponse",
|
||||
"InfrastructureResourceWithStreamingResponse",
|
||||
"AsyncInfrastructureResourceWithStreamingResponse",
|
||||
]
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from .targets import (
|
||||
TargetsResource,
|
||||
AsyncTargetsResource,
|
||||
TargetsResourceWithRawResponse,
|
||||
AsyncTargetsResourceWithRawResponse,
|
||||
TargetsResourceWithStreamingResponse,
|
||||
AsyncTargetsResourceWithStreamingResponse,
|
||||
)
|
||||
from ....._compat import cached_property
|
||||
from ....._resource import SyncAPIResource, AsyncAPIResource
|
||||
|
||||
__all__ = ["InfrastructureResource", "AsyncInfrastructureResource"]
|
||||
|
||||
|
||||
class InfrastructureResource(SyncAPIResource):
|
||||
@cached_property
|
||||
def targets(self) -> TargetsResource:
|
||||
return TargetsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> InfrastructureResourceWithRawResponse:
|
||||
"""
|
||||
This property can be used as a prefix for any HTTP method call to return the
|
||||
the raw response object instead of the parsed content.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
|
||||
"""
|
||||
return InfrastructureResourceWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> InfrastructureResourceWithStreamingResponse:
|
||||
"""
|
||||
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
|
||||
"""
|
||||
return InfrastructureResourceWithStreamingResponse(self)
|
||||
|
||||
|
||||
class AsyncInfrastructureResource(AsyncAPIResource):
|
||||
@cached_property
|
||||
def targets(self) -> AsyncTargetsResource:
|
||||
return AsyncTargetsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AsyncInfrastructureResourceWithRawResponse:
|
||||
"""
|
||||
This property can be used as a prefix for any HTTP method call to return the
|
||||
the raw response object instead of the parsed content.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
|
||||
"""
|
||||
return AsyncInfrastructureResourceWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> AsyncInfrastructureResourceWithStreamingResponse:
|
||||
"""
|
||||
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
|
||||
"""
|
||||
return AsyncInfrastructureResourceWithStreamingResponse(self)
|
||||
|
||||
|
||||
class InfrastructureResourceWithRawResponse:
|
||||
def __init__(self, infrastructure: InfrastructureResource) -> None:
|
||||
self._infrastructure = infrastructure
|
||||
|
||||
@cached_property
|
||||
def targets(self) -> TargetsResourceWithRawResponse:
|
||||
return TargetsResourceWithRawResponse(self._infrastructure.targets)
|
||||
|
||||
|
||||
class AsyncInfrastructureResourceWithRawResponse:
|
||||
def __init__(self, infrastructure: AsyncInfrastructureResource) -> None:
|
||||
self._infrastructure = infrastructure
|
||||
|
||||
@cached_property
|
||||
def targets(self) -> AsyncTargetsResourceWithRawResponse:
|
||||
return AsyncTargetsResourceWithRawResponse(self._infrastructure.targets)
|
||||
|
||||
|
||||
class InfrastructureResourceWithStreamingResponse:
|
||||
def __init__(self, infrastructure: InfrastructureResource) -> None:
|
||||
self._infrastructure = infrastructure
|
||||
|
||||
@cached_property
|
||||
def targets(self) -> TargetsResourceWithStreamingResponse:
|
||||
return TargetsResourceWithStreamingResponse(self._infrastructure.targets)
|
||||
|
||||
|
||||
class AsyncInfrastructureResourceWithStreamingResponse:
|
||||
def __init__(self, infrastructure: AsyncInfrastructureResource) -> None:
|
||||
self._infrastructure = infrastructure
|
||||
|
||||
@cached_property
|
||||
def targets(self) -> AsyncTargetsResourceWithStreamingResponse:
|
||||
return AsyncTargetsResourceWithStreamingResponse(self._infrastructure.targets)
|
||||
|
|
@ -1,714 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Type, Union, Optional, cast
|
||||
from datetime import datetime
|
||||
|
||||
import httpx
|
||||
|
||||
from ....._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
||||
from ....._utils import (
|
||||
maybe_transform,
|
||||
async_maybe_transform,
|
||||
)
|
||||
from ....._compat import cached_property
|
||||
from ....._resource import SyncAPIResource, AsyncAPIResource
|
||||
from ....._response import (
|
||||
to_raw_response_wrapper,
|
||||
to_streamed_response_wrapper,
|
||||
async_to_raw_response_wrapper,
|
||||
async_to_streamed_response_wrapper,
|
||||
)
|
||||
from ....._wrappers import ResultWrapper
|
||||
from .....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
|
||||
from ....._base_client import AsyncPaginator, make_request_options
|
||||
from .....types.zero_trust.access.infrastructure import target_list_params, target_create_params, target_update_params
|
||||
from .....types.zero_trust.access.infrastructure.target_get_response import TargetGetResponse
|
||||
from .....types.zero_trust.access.infrastructure.target_list_response import TargetListResponse
|
||||
from .....types.zero_trust.access.infrastructure.target_create_response import TargetCreateResponse
|
||||
from .....types.zero_trust.access.infrastructure.target_update_response import TargetUpdateResponse
|
||||
|
||||
__all__ = ["TargetsResource", "AsyncTargetsResource"]
|
||||
|
||||
|
||||
class TargetsResource(SyncAPIResource):
|
||||
@cached_property
|
||||
def with_raw_response(self) -> TargetsResourceWithRawResponse:
|
||||
"""
|
||||
This property can be used as a prefix for any HTTP method call to return the
|
||||
the raw response object instead of the parsed content.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
|
||||
"""
|
||||
return TargetsResourceWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> TargetsResourceWithStreamingResponse:
|
||||
"""
|
||||
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
|
||||
"""
|
||||
return TargetsResourceWithStreamingResponse(self)
|
||||
|
||||
def create(
|
||||
self,
|
||||
*,
|
||||
account_id: str,
|
||||
hostname: str,
|
||||
ip: target_create_params.IP,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> Optional[TargetCreateResponse]:
|
||||
"""
|
||||
Create new target
|
||||
|
||||
Args:
|
||||
account_id: Account identifier
|
||||
|
||||
hostname: A non-unique field that refers to a target. Case insensitive, maximum length of
|
||||
255 characters, supports the use of special characters dash and period, does not
|
||||
support spaces, and must start and end with an alphanumeric character.
|
||||
|
||||
ip: The IPv4/IPv6 address that identifies where to reach a target
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
return self._post(
|
||||
f"/accounts/{account_id}/infrastructure/targets",
|
||||
body=maybe_transform(
|
||||
{
|
||||
"hostname": hostname,
|
||||
"ip": ip,
|
||||
},
|
||||
target_create_params.TargetCreateParams,
|
||||
),
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[Optional[TargetCreateResponse]]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[Optional[TargetCreateResponse]], ResultWrapper[TargetCreateResponse]),
|
||||
)
|
||||
|
||||
def update(
|
||||
self,
|
||||
target_id: str,
|
||||
*,
|
||||
account_id: str,
|
||||
hostname: str,
|
||||
ip: target_update_params.IP,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> Optional[TargetUpdateResponse]:
|
||||
"""
|
||||
Update target
|
||||
|
||||
Args:
|
||||
account_id: Account identifier
|
||||
|
||||
target_id: Target identifier
|
||||
|
||||
hostname: A non-unique field that refers to a target. Case insensitive, maximum length of
|
||||
255 characters, supports the use of special characters dash and period, does not
|
||||
support spaces, and must start and end with an alphanumeric character.
|
||||
|
||||
ip: The IPv4/IPv6 address that identifies where to reach a target
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
if not target_id:
|
||||
raise ValueError(f"Expected a non-empty value for `target_id` but received {target_id!r}")
|
||||
return self._put(
|
||||
f"/accounts/{account_id}/infrastructure/targets/{target_id}",
|
||||
body=maybe_transform(
|
||||
{
|
||||
"hostname": hostname,
|
||||
"ip": ip,
|
||||
},
|
||||
target_update_params.TargetUpdateParams,
|
||||
),
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[Optional[TargetUpdateResponse]]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[Optional[TargetUpdateResponse]], ResultWrapper[TargetUpdateResponse]),
|
||||
)
|
||||
|
||||
def list(
|
||||
self,
|
||||
*,
|
||||
account_id: str,
|
||||
created_after: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
|
||||
hostname: Optional[str] | NotGiven = NOT_GIVEN,
|
||||
hostname_contains: Optional[str] | NotGiven = NOT_GIVEN,
|
||||
ip_v4: Optional[str] | NotGiven = NOT_GIVEN,
|
||||
ip_v6: Optional[str] | NotGiven = NOT_GIVEN,
|
||||
modified_after: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
|
||||
page: int | NotGiven = NOT_GIVEN,
|
||||
per_page: int | NotGiven = NOT_GIVEN,
|
||||
virtual_network_id: Optional[str] | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> SyncV4PagePaginationArray[TargetListResponse]:
|
||||
"""
|
||||
List all targets
|
||||
|
||||
Args:
|
||||
account_id: Account identifier
|
||||
|
||||
created_after: Date and time at which the target was created
|
||||
|
||||
hostname: Hostname of a target
|
||||
|
||||
hostname_contains: Partial match to the hostname of a target
|
||||
|
||||
ip_v4: IPv4 address of the target
|
||||
|
||||
ip_v6: IPv6 address of the target
|
||||
|
||||
modified_after: Date and time at which the target was modified
|
||||
|
||||
page: Current page in the response
|
||||
|
||||
per_page: Max amount of entries returned per page
|
||||
|
||||
virtual_network_id: Private virtual network identifier of the target
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
return self._get_api_list(
|
||||
f"/accounts/{account_id}/infrastructure/targets",
|
||||
page=SyncV4PagePaginationArray[TargetListResponse],
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
query=maybe_transform(
|
||||
{
|
||||
"created_after": created_after,
|
||||
"hostname": hostname,
|
||||
"hostname_contains": hostname_contains,
|
||||
"ip_v4": ip_v4,
|
||||
"ip_v6": ip_v6,
|
||||
"modified_after": modified_after,
|
||||
"page": page,
|
||||
"per_page": per_page,
|
||||
"virtual_network_id": virtual_network_id,
|
||||
},
|
||||
target_list_params.TargetListParams,
|
||||
),
|
||||
),
|
||||
model=TargetListResponse,
|
||||
)
|
||||
|
||||
def delete(
|
||||
self,
|
||||
target_id: str,
|
||||
*,
|
||||
account_id: str,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> None:
|
||||
"""
|
||||
Delete target
|
||||
|
||||
Args:
|
||||
account_id: Account identifier
|
||||
|
||||
target_id: Target identifier
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
if not target_id:
|
||||
raise ValueError(f"Expected a non-empty value for `target_id` but received {target_id!r}")
|
||||
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
||||
return self._delete(
|
||||
f"/accounts/{account_id}/infrastructure/targets/{target_id}",
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
||||
),
|
||||
cast_to=NoneType,
|
||||
)
|
||||
|
||||
def get(
|
||||
self,
|
||||
target_id: str,
|
||||
*,
|
||||
account_id: str,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> Optional[TargetGetResponse]:
|
||||
"""
|
||||
Get target
|
||||
|
||||
Args:
|
||||
account_id: Account identifier
|
||||
|
||||
target_id: Target identifier
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
if not target_id:
|
||||
raise ValueError(f"Expected a non-empty value for `target_id` but received {target_id!r}")
|
||||
return self._get(
|
||||
f"/accounts/{account_id}/infrastructure/targets/{target_id}",
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[Optional[TargetGetResponse]]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[Optional[TargetGetResponse]], ResultWrapper[TargetGetResponse]),
|
||||
)
|
||||
|
||||
|
||||
class AsyncTargetsResource(AsyncAPIResource):
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AsyncTargetsResourceWithRawResponse:
|
||||
"""
|
||||
This property can be used as a prefix for any HTTP method call to return the
|
||||
the raw response object instead of the parsed content.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
|
||||
"""
|
||||
return AsyncTargetsResourceWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> AsyncTargetsResourceWithStreamingResponse:
|
||||
"""
|
||||
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
||||
|
||||
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
|
||||
"""
|
||||
return AsyncTargetsResourceWithStreamingResponse(self)
|
||||
|
||||
async def create(
|
||||
self,
|
||||
*,
|
||||
account_id: str,
|
||||
hostname: str,
|
||||
ip: target_create_params.IP,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> Optional[TargetCreateResponse]:
|
||||
"""
|
||||
Create new target
|
||||
|
||||
Args:
|
||||
account_id: Account identifier
|
||||
|
||||
hostname: A non-unique field that refers to a target. Case insensitive, maximum length of
|
||||
255 characters, supports the use of special characters dash and period, does not
|
||||
support spaces, and must start and end with an alphanumeric character.
|
||||
|
||||
ip: The IPv4/IPv6 address that identifies where to reach a target
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
return await self._post(
|
||||
f"/accounts/{account_id}/infrastructure/targets",
|
||||
body=await async_maybe_transform(
|
||||
{
|
||||
"hostname": hostname,
|
||||
"ip": ip,
|
||||
},
|
||||
target_create_params.TargetCreateParams,
|
||||
),
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[Optional[TargetCreateResponse]]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[Optional[TargetCreateResponse]], ResultWrapper[TargetCreateResponse]),
|
||||
)
|
||||
|
||||
async def update(
|
||||
self,
|
||||
target_id: str,
|
||||
*,
|
||||
account_id: str,
|
||||
hostname: str,
|
||||
ip: target_update_params.IP,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> Optional[TargetUpdateResponse]:
|
||||
"""
|
||||
Update target
|
||||
|
||||
Args:
|
||||
account_id: Account identifier
|
||||
|
||||
target_id: Target identifier
|
||||
|
||||
hostname: A non-unique field that refers to a target. Case insensitive, maximum length of
|
||||
255 characters, supports the use of special characters dash and period, does not
|
||||
support spaces, and must start and end with an alphanumeric character.
|
||||
|
||||
ip: The IPv4/IPv6 address that identifies where to reach a target
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
if not target_id:
|
||||
raise ValueError(f"Expected a non-empty value for `target_id` but received {target_id!r}")
|
||||
return await self._put(
|
||||
f"/accounts/{account_id}/infrastructure/targets/{target_id}",
|
||||
body=await async_maybe_transform(
|
||||
{
|
||||
"hostname": hostname,
|
||||
"ip": ip,
|
||||
},
|
||||
target_update_params.TargetUpdateParams,
|
||||
),
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[Optional[TargetUpdateResponse]]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[Optional[TargetUpdateResponse]], ResultWrapper[TargetUpdateResponse]),
|
||||
)
|
||||
|
||||
def list(
|
||||
self,
|
||||
*,
|
||||
account_id: str,
|
||||
created_after: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
|
||||
hostname: Optional[str] | NotGiven = NOT_GIVEN,
|
||||
hostname_contains: Optional[str] | NotGiven = NOT_GIVEN,
|
||||
ip_v4: Optional[str] | NotGiven = NOT_GIVEN,
|
||||
ip_v6: Optional[str] | NotGiven = NOT_GIVEN,
|
||||
modified_after: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
|
||||
page: int | NotGiven = NOT_GIVEN,
|
||||
per_page: int | NotGiven = NOT_GIVEN,
|
||||
virtual_network_id: Optional[str] | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> AsyncPaginator[TargetListResponse, AsyncV4PagePaginationArray[TargetListResponse]]:
|
||||
"""
|
||||
List all targets
|
||||
|
||||
Args:
|
||||
account_id: Account identifier
|
||||
|
||||
created_after: Date and time at which the target was created
|
||||
|
||||
hostname: Hostname of a target
|
||||
|
||||
hostname_contains: Partial match to the hostname of a target
|
||||
|
||||
ip_v4: IPv4 address of the target
|
||||
|
||||
ip_v6: IPv6 address of the target
|
||||
|
||||
modified_after: Date and time at which the target was modified
|
||||
|
||||
page: Current page in the response
|
||||
|
||||
per_page: Max amount of entries returned per page
|
||||
|
||||
virtual_network_id: Private virtual network identifier of the target
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
return self._get_api_list(
|
||||
f"/accounts/{account_id}/infrastructure/targets",
|
||||
page=AsyncV4PagePaginationArray[TargetListResponse],
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
query=maybe_transform(
|
||||
{
|
||||
"created_after": created_after,
|
||||
"hostname": hostname,
|
||||
"hostname_contains": hostname_contains,
|
||||
"ip_v4": ip_v4,
|
||||
"ip_v6": ip_v6,
|
||||
"modified_after": modified_after,
|
||||
"page": page,
|
||||
"per_page": per_page,
|
||||
"virtual_network_id": virtual_network_id,
|
||||
},
|
||||
target_list_params.TargetListParams,
|
||||
),
|
||||
),
|
||||
model=TargetListResponse,
|
||||
)
|
||||
|
||||
async def delete(
|
||||
self,
|
||||
target_id: str,
|
||||
*,
|
||||
account_id: str,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> None:
|
||||
"""
|
||||
Delete target
|
||||
|
||||
Args:
|
||||
account_id: Account identifier
|
||||
|
||||
target_id: Target identifier
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
if not target_id:
|
||||
raise ValueError(f"Expected a non-empty value for `target_id` but received {target_id!r}")
|
||||
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
||||
return await self._delete(
|
||||
f"/accounts/{account_id}/infrastructure/targets/{target_id}",
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
||||
),
|
||||
cast_to=NoneType,
|
||||
)
|
||||
|
||||
async def get(
|
||||
self,
|
||||
target_id: str,
|
||||
*,
|
||||
account_id: str,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> Optional[TargetGetResponse]:
|
||||
"""
|
||||
Get target
|
||||
|
||||
Args:
|
||||
account_id: Account identifier
|
||||
|
||||
target_id: Target identifier
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
if not target_id:
|
||||
raise ValueError(f"Expected a non-empty value for `target_id` but received {target_id!r}")
|
||||
return await self._get(
|
||||
f"/accounts/{account_id}/infrastructure/targets/{target_id}",
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
post_parser=ResultWrapper[Optional[TargetGetResponse]]._unwrapper,
|
||||
),
|
||||
cast_to=cast(Type[Optional[TargetGetResponse]], ResultWrapper[TargetGetResponse]),
|
||||
)
|
||||
|
||||
|
||||
class TargetsResourceWithRawResponse:
|
||||
def __init__(self, targets: TargetsResource) -> None:
|
||||
self._targets = targets
|
||||
|
||||
self.create = to_raw_response_wrapper(
|
||||
targets.create,
|
||||
)
|
||||
self.update = to_raw_response_wrapper(
|
||||
targets.update,
|
||||
)
|
||||
self.list = to_raw_response_wrapper(
|
||||
targets.list,
|
||||
)
|
||||
self.delete = to_raw_response_wrapper(
|
||||
targets.delete,
|
||||
)
|
||||
self.get = to_raw_response_wrapper(
|
||||
targets.get,
|
||||
)
|
||||
|
||||
|
||||
class AsyncTargetsResourceWithRawResponse:
|
||||
def __init__(self, targets: AsyncTargetsResource) -> None:
|
||||
self._targets = targets
|
||||
|
||||
self.create = async_to_raw_response_wrapper(
|
||||
targets.create,
|
||||
)
|
||||
self.update = async_to_raw_response_wrapper(
|
||||
targets.update,
|
||||
)
|
||||
self.list = async_to_raw_response_wrapper(
|
||||
targets.list,
|
||||
)
|
||||
self.delete = async_to_raw_response_wrapper(
|
||||
targets.delete,
|
||||
)
|
||||
self.get = async_to_raw_response_wrapper(
|
||||
targets.get,
|
||||
)
|
||||
|
||||
|
||||
class TargetsResourceWithStreamingResponse:
|
||||
def __init__(self, targets: TargetsResource) -> None:
|
||||
self._targets = targets
|
||||
|
||||
self.create = to_streamed_response_wrapper(
|
||||
targets.create,
|
||||
)
|
||||
self.update = to_streamed_response_wrapper(
|
||||
targets.update,
|
||||
)
|
||||
self.list = to_streamed_response_wrapper(
|
||||
targets.list,
|
||||
)
|
||||
self.delete = to_streamed_response_wrapper(
|
||||
targets.delete,
|
||||
)
|
||||
self.get = to_streamed_response_wrapper(
|
||||
targets.get,
|
||||
)
|
||||
|
||||
|
||||
class AsyncTargetsResourceWithStreamingResponse:
|
||||
def __init__(self, targets: AsyncTargetsResource) -> None:
|
||||
self._targets = targets
|
||||
|
||||
self.create = async_to_streamed_response_wrapper(
|
||||
targets.create,
|
||||
)
|
||||
self.update = async_to_streamed_response_wrapper(
|
||||
targets.update,
|
||||
)
|
||||
self.list = async_to_streamed_response_wrapper(
|
||||
targets.list,
|
||||
)
|
||||
self.delete = async_to_streamed_response_wrapper(
|
||||
targets.delete,
|
||||
)
|
||||
self.get = async_to_streamed_response_wrapper(
|
||||
targets.get,
|
||||
)
|
||||
|
|
@ -2,21 +2,8 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import List
|
||||
|
||||
import httpx
|
||||
|
||||
from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
||||
from ....._utils import maybe_transform
|
||||
from ....._compat import cached_property
|
||||
from ....._resource import SyncAPIResource, AsyncAPIResource
|
||||
from ....._response import (
|
||||
to_raw_response_wrapper,
|
||||
to_streamed_response_wrapper,
|
||||
async_to_raw_response_wrapper,
|
||||
async_to_streamed_response_wrapper,
|
||||
)
|
||||
from .....pagination import SyncV4PagePagination, AsyncV4PagePagination
|
||||
from .unique_devices import (
|
||||
UniqueDevicesResource,
|
||||
AsyncUniqueDevicesResource,
|
||||
|
|
@ -25,9 +12,6 @@ from .unique_devices import (
|
|||
UniqueDevicesResourceWithStreamingResponse,
|
||||
AsyncUniqueDevicesResourceWithStreamingResponse,
|
||||
)
|
||||
from ....._base_client import AsyncPaginator, make_request_options
|
||||
from .....types.zero_trust.dex import test_list_params
|
||||
from .....types.zero_trust.dex.test_list_response import TestListResponse
|
||||
|
||||
__all__ = ["TestsResource", "AsyncTestsResource"]
|
||||
|
||||
|
|
@ -58,70 +42,6 @@ class TestsResource(SyncAPIResource):
|
|||
"""
|
||||
return TestsResourceWithStreamingResponse(self)
|
||||
|
||||
def list(
|
||||
self,
|
||||
*,
|
||||
account_id: str,
|
||||
colo: str | NotGiven = NOT_GIVEN,
|
||||
device_id: List[str] | NotGiven = NOT_GIVEN,
|
||||
page: float | NotGiven = NOT_GIVEN,
|
||||
per_page: float | NotGiven = NOT_GIVEN,
|
||||
test_name: str | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> SyncV4PagePagination[TestListResponse]:
|
||||
"""
|
||||
List DEX tests with overview metrics
|
||||
|
||||
Args:
|
||||
colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in
|
||||
combination with deviceId param.
|
||||
|
||||
device_id: Optionally filter result stats to a specific device(s). Cannot be used in
|
||||
combination with colo param.
|
||||
|
||||
page: Page number of paginated results
|
||||
|
||||
per_page: Number of items per page
|
||||
|
||||
test_name: Optionally filter results by test name
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
return self._get_api_list(
|
||||
f"/accounts/{account_id}/dex/tests/overview",
|
||||
page=SyncV4PagePagination[TestListResponse],
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
query=maybe_transform(
|
||||
{
|
||||
"colo": colo,
|
||||
"device_id": device_id,
|
||||
"page": page,
|
||||
"per_page": per_page,
|
||||
"test_name": test_name,
|
||||
},
|
||||
test_list_params.TestListParams,
|
||||
),
|
||||
),
|
||||
model=TestListResponse,
|
||||
)
|
||||
|
||||
|
||||
class AsyncTestsResource(AsyncAPIResource):
|
||||
@cached_property
|
||||
|
|
@ -147,70 +67,6 @@ class AsyncTestsResource(AsyncAPIResource):
|
|||
"""
|
||||
return AsyncTestsResourceWithStreamingResponse(self)
|
||||
|
||||
def list(
|
||||
self,
|
||||
*,
|
||||
account_id: str,
|
||||
colo: str | NotGiven = NOT_GIVEN,
|
||||
device_id: List[str] | NotGiven = NOT_GIVEN,
|
||||
page: float | NotGiven = NOT_GIVEN,
|
||||
per_page: float | NotGiven = NOT_GIVEN,
|
||||
test_name: str | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
extra_query: Query | None = None,
|
||||
extra_body: Body | None = None,
|
||||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
||||
) -> AsyncPaginator[TestListResponse, AsyncV4PagePagination[TestListResponse]]:
|
||||
"""
|
||||
List DEX tests with overview metrics
|
||||
|
||||
Args:
|
||||
colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in
|
||||
combination with deviceId param.
|
||||
|
||||
device_id: Optionally filter result stats to a specific device(s). Cannot be used in
|
||||
combination with colo param.
|
||||
|
||||
page: Page number of paginated results
|
||||
|
||||
per_page: Number of items per page
|
||||
|
||||
test_name: Optionally filter results by test name
|
||||
|
||||
extra_headers: Send extra headers
|
||||
|
||||
extra_query: Add additional query parameters to the request
|
||||
|
||||
extra_body: Add additional JSON properties to the request
|
||||
|
||||
timeout: Override the client-level default timeout for this request, in seconds
|
||||
"""
|
||||
if not account_id:
|
||||
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
|
||||
return self._get_api_list(
|
||||
f"/accounts/{account_id}/dex/tests/overview",
|
||||
page=AsyncV4PagePagination[TestListResponse],
|
||||
options=make_request_options(
|
||||
extra_headers=extra_headers,
|
||||
extra_query=extra_query,
|
||||
extra_body=extra_body,
|
||||
timeout=timeout,
|
||||
query=maybe_transform(
|
||||
{
|
||||
"colo": colo,
|
||||
"device_id": device_id,
|
||||
"page": page,
|
||||
"per_page": per_page,
|
||||
"test_name": test_name,
|
||||
},
|
||||
test_list_params.TestListParams,
|
||||
),
|
||||
),
|
||||
model=TestListResponse,
|
||||
)
|
||||
|
||||
|
||||
class TestsResourceWithRawResponse:
|
||||
__test__ = False
|
||||
|
|
@ -218,10 +74,6 @@ class TestsResourceWithRawResponse:
|
|||
def __init__(self, tests: TestsResource) -> None:
|
||||
self._tests = tests
|
||||
|
||||
self.list = to_raw_response_wrapper(
|
||||
tests.list,
|
||||
)
|
||||
|
||||
@cached_property
|
||||
def unique_devices(self) -> UniqueDevicesResourceWithRawResponse:
|
||||
return UniqueDevicesResourceWithRawResponse(self._tests.unique_devices)
|
||||
|
|
@ -231,10 +83,6 @@ class AsyncTestsResourceWithRawResponse:
|
|||
def __init__(self, tests: AsyncTestsResource) -> None:
|
||||
self._tests = tests
|
||||
|
||||
self.list = async_to_raw_response_wrapper(
|
||||
tests.list,
|
||||
)
|
||||
|
||||
@cached_property
|
||||
def unique_devices(self) -> AsyncUniqueDevicesResourceWithRawResponse:
|
||||
return AsyncUniqueDevicesResourceWithRawResponse(self._tests.unique_devices)
|
||||
|
|
@ -246,10 +94,6 @@ class TestsResourceWithStreamingResponse:
|
|||
def __init__(self, tests: TestsResource) -> None:
|
||||
self._tests = tests
|
||||
|
||||
self.list = to_streamed_response_wrapper(
|
||||
tests.list,
|
||||
)
|
||||
|
||||
@cached_property
|
||||
def unique_devices(self) -> UniqueDevicesResourceWithStreamingResponse:
|
||||
return UniqueDevicesResourceWithStreamingResponse(self._tests.unique_devices)
|
||||
|
|
@ -259,10 +103,6 @@ class AsyncTestsResourceWithStreamingResponse:
|
|||
def __init__(self, tests: AsyncTestsResource) -> None:
|
||||
self._tests = tests
|
||||
|
||||
self.list = async_to_streamed_response_wrapper(
|
||||
tests.list,
|
||||
)
|
||||
|
||||
@cached_property
|
||||
def unique_devices(self) -> AsyncUniqueDevicesResourceWithStreamingResponse:
|
||||
return AsyncUniqueDevicesResourceWithStreamingResponse(self._tests.unique_devices)
|
||||
|
|
|
|||
|
|
@ -8,14 +8,6 @@ from .holds import (
|
|||
HoldsResourceWithStreamingResponse,
|
||||
AsyncHoldsResourceWithStreamingResponse,
|
||||
)
|
||||
from .plans import (
|
||||
PlansResource,
|
||||
AsyncPlansResource,
|
||||
PlansResourceWithRawResponse,
|
||||
AsyncPlansResourceWithRawResponse,
|
||||
PlansResourceWithStreamingResponse,
|
||||
AsyncPlansResourceWithStreamingResponse,
|
||||
)
|
||||
from .zones import (
|
||||
ZonesResource,
|
||||
AsyncZonesResource,
|
||||
|
|
@ -32,14 +24,6 @@ from .settings import (
|
|||
SettingsResourceWithStreamingResponse,
|
||||
AsyncSettingsResourceWithStreamingResponse,
|
||||
)
|
||||
from .rate_plans import (
|
||||
RatePlansResource,
|
||||
AsyncRatePlansResource,
|
||||
RatePlansResourceWithRawResponse,
|
||||
AsyncRatePlansResourceWithRawResponse,
|
||||
RatePlansResourceWithStreamingResponse,
|
||||
AsyncRatePlansResourceWithStreamingResponse,
|
||||
)
|
||||
from .subscriptions import (
|
||||
SubscriptionsResource,
|
||||
AsyncSubscriptionsResource,
|
||||
|
|
@ -96,18 +80,6 @@ __all__ = [
|
|||
"AsyncSubscriptionsResourceWithRawResponse",
|
||||
"SubscriptionsResourceWithStreamingResponse",
|
||||
"AsyncSubscriptionsResourceWithStreamingResponse",
|
||||
"PlansResource",
|
||||
"AsyncPlansResource",
|
||||
"PlansResourceWithRawResponse",
|
||||
"AsyncPlansResourceWithRawResponse",
|
||||
"PlansResourceWithStreamingResponse",
|
||||
"AsyncPlansResourceWithStreamingResponse",
|
||||
"RatePlansResource",
|
||||
"AsyncRatePlansResource",
|
||||
"RatePlansResourceWithRawResponse",
|
||||
"AsyncRatePlansResourceWithRawResponse",
|
||||
"RatePlansResourceWithStreamingResponse",
|
||||
"AsyncRatePlansResourceWithStreamingResponse",
|
||||
"ZonesResource",
|
||||
"AsyncZonesResource",
|
||||
"ZonesResourceWithRawResponse",
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ from ..._response import (
|
|||
from ..._wrappers import ResultWrapper
|
||||
from ...types.zones import subscription_create_params, subscription_update_params
|
||||
from ..._base_client import make_request_options
|
||||
from ...types.shared_params.rate_plan import RatePlan
|
||||
from ...types.user.rate_plan_param import RatePlanParam
|
||||
from ...types.zones.subscription_get_response import SubscriptionGetResponse
|
||||
from ...types.zones.subscription_create_response import SubscriptionCreateResponse
|
||||
from ...types.zones.subscription_update_response import SubscriptionUpdateResponse
|
||||
|
|
@ -56,7 +56,7 @@ class SubscriptionsResource(SyncAPIResource):
|
|||
identifier: str,
|
||||
*,
|
||||
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | NotGiven = NOT_GIVEN,
|
||||
rate_plan: RatePlan | NotGiven = NOT_GIVEN,
|
||||
rate_plan: RatePlanParam | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
|
|
@ -113,7 +113,7 @@ class SubscriptionsResource(SyncAPIResource):
|
|||
identifier: str,
|
||||
*,
|
||||
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | NotGiven = NOT_GIVEN,
|
||||
rate_plan: RatePlan | NotGiven = NOT_GIVEN,
|
||||
rate_plan: RatePlanParam | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
|
|
@ -235,7 +235,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
|
|||
identifier: str,
|
||||
*,
|
||||
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | NotGiven = NOT_GIVEN,
|
||||
rate_plan: RatePlan | NotGiven = NOT_GIVEN,
|
||||
rate_plan: RatePlanParam | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
|
|
@ -292,7 +292,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
|
|||
identifier: str,
|
||||
*,
|
||||
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | NotGiven = NOT_GIVEN,
|
||||
rate_plan: RatePlan | NotGiven = NOT_GIVEN,
|
||||
rate_plan: RatePlanParam | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
# The extra values given here take precedence over values defined on the client or passed to this method.
|
||||
extra_headers: Headers | None = None,
|
||||
|
|
|
|||
|
|
@ -15,14 +15,6 @@ from .holds import (
|
|||
HoldsResourceWithStreamingResponse,
|
||||
AsyncHoldsResourceWithStreamingResponse,
|
||||
)
|
||||
from .plans import (
|
||||
PlansResource,
|
||||
AsyncPlansResource,
|
||||
PlansResourceWithRawResponse,
|
||||
AsyncPlansResourceWithRawResponse,
|
||||
PlansResourceWithStreamingResponse,
|
||||
AsyncPlansResourceWithStreamingResponse,
|
||||
)
|
||||
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
||||
from ..._utils import (
|
||||
maybe_transform,
|
||||
|
|
@ -37,14 +29,6 @@ from .settings import (
|
|||
AsyncSettingsResourceWithStreamingResponse,
|
||||
)
|
||||
from ..._compat import cached_property
|
||||
from .rate_plans import (
|
||||
RatePlansResource,
|
||||
AsyncRatePlansResource,
|
||||
RatePlansResourceWithRawResponse,
|
||||
AsyncRatePlansResourceWithRawResponse,
|
||||
RatePlansResourceWithStreamingResponse,
|
||||
AsyncRatePlansResourceWithStreamingResponse,
|
||||
)
|
||||
from ..._resource import SyncAPIResource, AsyncAPIResource
|
||||
from ..._response import (
|
||||
to_raw_response_wrapper,
|
||||
|
|
@ -108,14 +92,6 @@ class ZonesResource(SyncAPIResource):
|
|||
def subscriptions(self) -> SubscriptionsResource:
|
||||
return SubscriptionsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def plans(self) -> PlansResource:
|
||||
return PlansResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def rate_plans(self) -> RatePlansResource:
|
||||
return RatePlansResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> ZonesResourceWithRawResponse:
|
||||
"""
|
||||
|
|
@ -423,14 +399,6 @@ class AsyncZonesResource(AsyncAPIResource):
|
|||
def subscriptions(self) -> AsyncSubscriptionsResource:
|
||||
return AsyncSubscriptionsResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def plans(self) -> AsyncPlansResource:
|
||||
return AsyncPlansResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def rate_plans(self) -> AsyncRatePlansResource:
|
||||
return AsyncRatePlansResource(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AsyncZonesResourceWithRawResponse:
|
||||
"""
|
||||
|
|
@ -757,14 +725,6 @@ class ZonesResourceWithRawResponse:
|
|||
def subscriptions(self) -> SubscriptionsResourceWithRawResponse:
|
||||
return SubscriptionsResourceWithRawResponse(self._zones.subscriptions)
|
||||
|
||||
@cached_property
|
||||
def plans(self) -> PlansResourceWithRawResponse:
|
||||
return PlansResourceWithRawResponse(self._zones.plans)
|
||||
|
||||
@cached_property
|
||||
def rate_plans(self) -> RatePlansResourceWithRawResponse:
|
||||
return RatePlansResourceWithRawResponse(self._zones.rate_plans)
|
||||
|
||||
|
||||
class AsyncZonesResourceWithRawResponse:
|
||||
def __init__(self, zones: AsyncZonesResource) -> None:
|
||||
|
|
@ -806,14 +766,6 @@ class AsyncZonesResourceWithRawResponse:
|
|||
def subscriptions(self) -> AsyncSubscriptionsResourceWithRawResponse:
|
||||
return AsyncSubscriptionsResourceWithRawResponse(self._zones.subscriptions)
|
||||
|
||||
@cached_property
|
||||
def plans(self) -> AsyncPlansResourceWithRawResponse:
|
||||
return AsyncPlansResourceWithRawResponse(self._zones.plans)
|
||||
|
||||
@cached_property
|
||||
def rate_plans(self) -> AsyncRatePlansResourceWithRawResponse:
|
||||
return AsyncRatePlansResourceWithRawResponse(self._zones.rate_plans)
|
||||
|
||||
|
||||
class ZonesResourceWithStreamingResponse:
|
||||
def __init__(self, zones: ZonesResource) -> None:
|
||||
|
|
@ -855,14 +807,6 @@ class ZonesResourceWithStreamingResponse:
|
|||
def subscriptions(self) -> SubscriptionsResourceWithStreamingResponse:
|
||||
return SubscriptionsResourceWithStreamingResponse(self._zones.subscriptions)
|
||||
|
||||
@cached_property
|
||||
def plans(self) -> PlansResourceWithStreamingResponse:
|
||||
return PlansResourceWithStreamingResponse(self._zones.plans)
|
||||
|
||||
@cached_property
|
||||
def rate_plans(self) -> RatePlansResourceWithStreamingResponse:
|
||||
return RatePlansResourceWithStreamingResponse(self._zones.rate_plans)
|
||||
|
||||
|
||||
class AsyncZonesResourceWithStreamingResponse:
|
||||
def __init__(self, zones: AsyncZonesResource) -> None:
|
||||
|
|
@ -903,11 +847,3 @@ class AsyncZonesResourceWithStreamingResponse:
|
|||
@cached_property
|
||||
def subscriptions(self) -> AsyncSubscriptionsResourceWithStreamingResponse:
|
||||
return AsyncSubscriptionsResourceWithStreamingResponse(self._zones.subscriptions)
|
||||
|
||||
@cached_property
|
||||
def plans(self) -> AsyncPlansResourceWithStreamingResponse:
|
||||
return AsyncPlansResourceWithStreamingResponse(self._zones.plans)
|
||||
|
||||
@cached_property
|
||||
def rate_plans(self) -> AsyncRatePlansResourceWithStreamingResponse:
|
||||
return AsyncRatePlansResourceWithStreamingResponse(self._zones.rate_plans)
|
||||
|
|
|
|||
|
|
@ -8,19 +8,15 @@ from .shared import (
|
|||
Member as Member,
|
||||
Result as Result,
|
||||
AuditLog as AuditLog,
|
||||
RatePlan as RatePlan,
|
||||
ErrorData as ErrorData,
|
||||
Identifier as Identifier,
|
||||
Permission as Permission,
|
||||
ResponseInfo as ResponseInfo,
|
||||
Subscription as Subscription,
|
||||
CertificateCA as CertificateCA,
|
||||
SortDirection as SortDirection,
|
||||
PaginationInfo as PaginationInfo,
|
||||
PermissionGrant as PermissionGrant,
|
||||
CloudflareTunnel as CloudflareTunnel,
|
||||
SubscriptionZone as SubscriptionZone,
|
||||
LoadBalancerPreview as LoadBalancerPreview,
|
||||
SubscriptionComponent as SubscriptionComponent,
|
||||
CertificateRequestType as CertificateRequestType,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -16,9 +16,3 @@ from .member_create_response import MemberCreateResponse as MemberCreateResponse
|
|||
from .member_delete_response import MemberDeleteResponse as MemberDeleteResponse
|
||||
from .member_update_response import MemberUpdateResponse as MemberUpdateResponse
|
||||
from .account_delete_response import AccountDeleteResponse as AccountDeleteResponse
|
||||
from .subscription_get_response import SubscriptionGetResponse as SubscriptionGetResponse
|
||||
from .subscription_create_params import SubscriptionCreateParams as SubscriptionCreateParams
|
||||
from .subscription_update_params import SubscriptionUpdateParams as SubscriptionUpdateParams
|
||||
from .subscription_create_response import SubscriptionCreateResponse as SubscriptionCreateResponse
|
||||
from .subscription_delete_response import SubscriptionDeleteResponse as SubscriptionDeleteResponse
|
||||
from .subscription_update_response import SubscriptionUpdateResponse as SubscriptionUpdateResponse
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing_extensions import Literal, Required, TypedDict
|
||||
|
||||
from ..shared_params.rate_plan import RatePlan
|
||||
|
||||
__all__ = ["SubscriptionCreateParams"]
|
||||
|
||||
|
||||
class SubscriptionCreateParams(TypedDict, total=False):
|
||||
account_id: Required[str]
|
||||
"""Identifier"""
|
||||
|
||||
frequency: Literal["weekly", "monthly", "quarterly", "yearly"]
|
||||
"""How often the subscription is renewed automatically."""
|
||||
|
||||
rate_plan: RatePlan
|
||||
"""The rate plan applied to the subscription."""
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from typing import Union, Optional
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
__all__ = ["SubscriptionCreateResponse"]
|
||||
|
||||
SubscriptionCreateResponse: TypeAlias = Union[Optional[str], object]
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from ..._models import BaseModel
|
||||
|
||||
__all__ = ["SubscriptionDeleteResponse"]
|
||||
|
||||
|
||||
class SubscriptionDeleteResponse(BaseModel):
|
||||
subscription_id: Optional[str] = None
|
||||
"""Subscription identifier tag."""
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing_extensions import Literal, Required, TypedDict
|
||||
|
||||
from ..shared_params.rate_plan import RatePlan
|
||||
|
||||
__all__ = ["SubscriptionUpdateParams"]
|
||||
|
||||
|
||||
class SubscriptionUpdateParams(TypedDict, total=False):
|
||||
account_id: Required[str]
|
||||
"""Identifier"""
|
||||
|
||||
frequency: Literal["weekly", "monthly", "quarterly", "yearly"]
|
||||
"""How often the subscription is renewed automatically."""
|
||||
|
||||
rate_plan: RatePlan
|
||||
"""The rate plan applied to the subscription."""
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from typing import Union, Optional
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
__all__ = ["SubscriptionUpdateResponse"]
|
||||
|
||||
SubscriptionUpdateResponse: TypeAlias = Union[Optional[str], object]
|
||||
|
|
@ -20,7 +20,7 @@ class LogListParams(TypedDict, total=False):
|
|||
|
||||
end_date: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
|
||||
|
||||
feedback: Literal[0, 1]
|
||||
feedback: Literal[-1, 0, 1]
|
||||
|
||||
max_cost: float
|
||||
|
||||
|
|
|
|||
|
|
@ -5,14 +5,8 @@ from __future__ import annotations
|
|||
from .label import Label as Label
|
||||
from .message import Message as Message
|
||||
from .priority import Priority as Priority
|
||||
from .asset_get_response import AssetGetResponse as AssetGetResponse
|
||||
from .message_get_params import MessageGetParams as MessageGetParams
|
||||
from .asset_create_params import AssetCreateParams as AssetCreateParams
|
||||
from .asset_update_params import AssetUpdateParams as AssetUpdateParams
|
||||
from .message_get_response import MessageGetResponse as MessageGetResponse
|
||||
from .asset_create_response import AssetCreateResponse as AssetCreateResponse
|
||||
from .asset_delete_response import AssetDeleteResponse as AssetDeleteResponse
|
||||
from .asset_update_response import AssetUpdateResponse as AssetUpdateResponse
|
||||
from .message_create_params import MessageCreateParams as MessageCreateParams
|
||||
from .message_update_params import MessageUpdateParams as MessageUpdateParams
|
||||
from .priority_create_params import PriorityCreateParams as PriorityCreateParams
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing_extensions import Required, TypedDict
|
||||
|
||||
__all__ = ["AssetCreateParams"]
|
||||
|
||||
|
||||
class AssetCreateParams(TypedDict, total=False):
|
||||
account_identifier: Required[str]
|
||||
"""Identifier"""
|
||||
|
||||
page: Required[int]
|
||||
"""Page number of results"""
|
||||
|
||||
per_page: Required[int]
|
||||
"""Number of results per page"""
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from typing import List, Optional
|
||||
from datetime import datetime
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from ...._models import BaseModel
|
||||
|
||||
__all__ = ["AssetCreateResponse", "AssetCreateResponseItem"]
|
||||
|
||||
|
||||
class AssetCreateResponseItem(BaseModel):
|
||||
id: int
|
||||
"""Asset ID"""
|
||||
|
||||
name: str
|
||||
"""Asset name"""
|
||||
|
||||
created: Optional[datetime] = None
|
||||
"""Asset creation time"""
|
||||
|
||||
description: Optional[str] = None
|
||||
"""Asset description"""
|
||||
|
||||
file_type: Optional[str] = None
|
||||
"""Asset file type"""
|
||||
|
||||
|
||||
AssetCreateResponse: TypeAlias = List[AssetCreateResponseItem]
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from typing import List
|
||||
from typing_extensions import Literal
|
||||
|
||||
from ...._models import BaseModel
|
||||
from ...shared.response_info import ResponseInfo
|
||||
|
||||
__all__ = ["AssetDeleteResponse"]
|
||||
|
||||
|
||||
class AssetDeleteResponse(BaseModel):
|
||||
errors: List[ResponseInfo]
|
||||
|
||||
messages: List[ResponseInfo]
|
||||
|
||||
success: Literal[True]
|
||||
"""Whether the API call was successful"""
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from typing import List, Optional
|
||||
from datetime import datetime
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from ...._models import BaseModel
|
||||
|
||||
__all__ = ["AssetGetResponse", "AssetGetResponseItem"]
|
||||
|
||||
|
||||
class AssetGetResponseItem(BaseModel):
|
||||
id: int
|
||||
"""Asset ID"""
|
||||
|
||||
name: str
|
||||
"""Asset name"""
|
||||
|
||||
created: Optional[datetime] = None
|
||||
"""Asset creation time"""
|
||||
|
||||
description: Optional[str] = None
|
||||
"""Asset description"""
|
||||
|
||||
file_type: Optional[str] = None
|
||||
"""Asset file type"""
|
||||
|
||||
|
||||
AssetGetResponse: TypeAlias = List[AssetGetResponseItem]
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing_extensions import Required, TypedDict
|
||||
|
||||
__all__ = ["AssetUpdateParams"]
|
||||
|
||||
|
||||
class AssetUpdateParams(TypedDict, total=False):
|
||||
account_identifier: Required[str]
|
||||
"""Identifier"""
|
||||
|
||||
request_identifier: Required[str]
|
||||
"""UUID"""
|
||||
|
||||
source: str
|
||||
"""Asset file to upload"""
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from typing import Optional
|
||||
from datetime import datetime
|
||||
|
||||
from ...._models import BaseModel
|
||||
|
||||
__all__ = ["AssetUpdateResponse"]
|
||||
|
||||
|
||||
class AssetUpdateResponse(BaseModel):
|
||||
id: int
|
||||
"""Asset ID"""
|
||||
|
||||
name: str
|
||||
"""Asset name"""
|
||||
|
||||
created: Optional[datetime] = None
|
||||
"""Asset creation time"""
|
||||
|
||||
description: Optional[str] = None
|
||||
"""Asset description"""
|
||||
|
||||
file_type: Optional[str] = None
|
||||
"""Asset file type"""
|
||||
|
|
@ -3,6 +3,3 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .delta import Delta as Delta
|
||||
from .reverse_dns_edit_params import ReverseDNSEditParams as ReverseDNSEditParams
|
||||
from .reverse_dns_get_response import ReverseDNSGetResponse as ReverseDNSGetResponse
|
||||
from .reverse_dns_edit_response import ReverseDNSEditResponse as ReverseDNSEditResponse
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Dict
|
||||
from typing_extensions import Required, TypedDict
|
||||
|
||||
__all__ = ["ReverseDNSEditParams"]
|
||||
|
||||
|
||||
class ReverseDNSEditParams(TypedDict, total=False):
|
||||
account_id: Required[str]
|
||||
"""Identifier"""
|
||||
|
||||
ptr: Dict[str, str]
|
||||
"""Map of cluster IP addresses to PTR record contents"""
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from typing import Dict
|
||||
|
||||
from ...._models import BaseModel
|
||||
|
||||
__all__ = ["ReverseDNSEditResponse"]
|
||||
|
||||
|
||||
class ReverseDNSEditResponse(BaseModel):
|
||||
ptr: Dict[str, str]
|
||||
"""Map of cluster IP addresses to PTR record contents"""
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from typing import Dict
|
||||
|
||||
from ...._models import BaseModel
|
||||
|
||||
__all__ = ["ReverseDNSGetResponse"]
|
||||
|
||||
|
||||
class ReverseDNSGetResponse(BaseModel):
|
||||
ptr: Dict[str, str]
|
||||
"""Map of cluster IP addresses to PTR record contents"""
|
||||
3
src/cloudflare/types/event_notifications/__init__.py
Normal file
3
src/cloudflare/types/event_notifications/__init__.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from __future__ import annotations
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from typing import Dict, List, Optional
|
||||
from datetime import datetime
|
||||
|
||||
from .rules import Rules
|
||||
from ..._models import BaseModel
|
||||
|
|
@ -36,7 +37,7 @@ class LoadBalancer(BaseModel):
|
|||
default_pools.
|
||||
"""
|
||||
|
||||
created_on: Optional[str] = None
|
||||
created_on: Optional[datetime] = None
|
||||
|
||||
default_pools: Optional[List[DefaultPools]] = None
|
||||
"""A list of pool IDs ordered by their failover priority.
|
||||
|
|
@ -60,7 +61,7 @@ class LoadBalancer(BaseModel):
|
|||
See `steering_policy` to learn how steering is affected.
|
||||
"""
|
||||
|
||||
modified_on: Optional[str] = None
|
||||
modified_on: Optional[datetime] = None
|
||||
|
||||
name: Optional[str] = None
|
||||
"""The DNS hostname to associate with your Load Balancer.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from typing import Dict, List, Optional
|
||||
from datetime import datetime
|
||||
from typing_extensions import Literal
|
||||
|
||||
from ..._models import BaseModel
|
||||
|
|
@ -29,7 +30,7 @@ class Monitor(BaseModel):
|
|||
consecutive times.
|
||||
"""
|
||||
|
||||
created_on: Optional[str] = None
|
||||
created_on: Optional[datetime] = None
|
||||
|
||||
description: Optional[str] = None
|
||||
"""Object description."""
|
||||
|
|
@ -74,7 +75,7 @@ class Monitor(BaseModel):
|
|||
for TCP based health checks.
|
||||
"""
|
||||
|
||||
modified_on: Optional[str] = None
|
||||
modified_on: Optional[datetime] = None
|
||||
|
||||
path: Optional[str] = None
|
||||
"""The endpoint path you want to conduct a health check against.
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class Pool(BaseModel):
|
|||
Null means every Cloudflare data center.
|
||||
"""
|
||||
|
||||
created_on: Optional[str] = None
|
||||
created_on: Optional[datetime] = None
|
||||
|
||||
description: Optional[str] = None
|
||||
"""A human-readable description of the pool."""
|
||||
|
|
@ -63,7 +63,7 @@ class Pool(BaseModel):
|
|||
be marked unhealthy and will failover to the next available pool.
|
||||
"""
|
||||
|
||||
modified_on: Optional[str] = None
|
||||
modified_on: Optional[datetime] = None
|
||||
|
||||
monitor: Optional[str] = None
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -2,10 +2,8 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from .pcap import PCAP as PCAP
|
||||
from .site import Site as Site
|
||||
from .scope import Scope as Scope
|
||||
from .pcap_filter import PCAPFilter as PCAPFilter
|
||||
from .scope_param import ScopeParam as ScopeParam
|
||||
from .health_check import HealthCheck as HealthCheck
|
||||
from .psk_metadata import PSKMetadata as PSKMetadata
|
||||
|
|
@ -17,11 +15,7 @@ from .app_list_response import AppListResponse as AppListResponse
|
|||
from .app_update_params import AppUpdateParams as AppUpdateParams
|
||||
from .health_check_rate import HealthCheckRate as HealthCheckRate
|
||||
from .health_check_type import HealthCheckType as HealthCheckType
|
||||
from .pcap_filter_param import PCAPFilterParam as PCAPFilterParam
|
||||
from .pcap_get_response import PCAPGetResponse as PCAPGetResponse
|
||||
from .health_check_param import HealthCheckParam as HealthCheckParam
|
||||
from .pcap_create_params import PCAPCreateParams as PCAPCreateParams
|
||||
from .pcap_list_response import PCAPListResponse as PCAPListResponse
|
||||
from .route_get_response import RouteGetResponse as RouteGetResponse
|
||||
from .site_create_params import SiteCreateParams as SiteCreateParams
|
||||
from .site_update_params import SiteUpdateParams as SiteUpdateParams
|
||||
|
|
@ -32,7 +26,6 @@ from .route_create_params import RouteCreateParams as RouteCreateParams
|
|||
from .route_list_response import RouteListResponse as RouteListResponse
|
||||
from .route_update_params import RouteUpdateParams as RouteUpdateParams
|
||||
from .site_location_param import SiteLocationParam as SiteLocationParam
|
||||
from .pcap_create_response import PCAPCreateResponse as PCAPCreateResponse
|
||||
from .route_empty_response import RouteEmptyResponse as RouteEmptyResponse
|
||||
from .connector_edit_params import ConnectorEditParams as ConnectorEditParams
|
||||
from .route_create_response import RouteCreateResponse as RouteCreateResponse
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from .ownership import Ownership as Ownership
|
||||
from .ownership_get_response import OwnershipGetResponse as OwnershipGetResponse
|
||||
from .ownership_create_params import OwnershipCreateParams as OwnershipCreateParams
|
||||
from .ownership_validate_params import OwnershipValidateParams as OwnershipValidateParams
|
||||
9
src/cloudflare/types/managed_headers/__init__.py
Normal file
9
src/cloudflare/types/managed_headers/__init__.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from .request_model import RequestModel as RequestModel
|
||||
from .request_model_param import RequestModelParam as RequestModelParam
|
||||
from .managed_header_edit_params import ManagedHeaderEditParams as ManagedHeaderEditParams
|
||||
from .managed_header_edit_response import ManagedHeaderEditResponse as ManagedHeaderEditResponse
|
||||
from .managed_header_list_response import ManagedHeaderListResponse as ManagedHeaderListResponse
|
||||
|
|
@ -7,10 +7,10 @@ from typing_extensions import Required, TypedDict
|
|||
|
||||
from .request_model_param import RequestModelParam
|
||||
|
||||
__all__ = ["ManagedTransformEditParams"]
|
||||
__all__ = ["ManagedHeaderEditParams"]
|
||||
|
||||
|
||||
class ManagedTransformEditParams(TypedDict, total=False):
|
||||
class ManagedHeaderEditParams(TypedDict, total=False):
|
||||
zone_id: Required[str]
|
||||
"""Identifier"""
|
||||
|
||||
|
|
@ -4,7 +4,7 @@ from typing import List, Optional
|
|||
|
||||
from ..._models import BaseModel
|
||||
|
||||
__all__ = ["ManagedTransformEditResponse", "ManagedRequestHeader", "ManagedResponseHeader"]
|
||||
__all__ = ["ManagedHeaderEditResponse", "ManagedRequestHeader", "ManagedResponseHeader"]
|
||||
|
||||
|
||||
class ManagedRequestHeader(BaseModel):
|
||||
|
|
@ -29,7 +29,7 @@ class ManagedResponseHeader(BaseModel):
|
|||
"""When true, the Managed Transform is enabled."""
|
||||
|
||||
|
||||
class ManagedTransformEditResponse(BaseModel):
|
||||
class ManagedHeaderEditResponse(BaseModel):
|
||||
managed_request_headers: Optional[List[ManagedRequestHeader]] = None
|
||||
|
||||
managed_response_headers: Optional[List[ManagedResponseHeader]] = None
|
||||
|
|
@ -5,10 +5,10 @@ from typing import List, Optional
|
|||
from ..._models import BaseModel
|
||||
from .request_model import RequestModel
|
||||
|
||||
__all__ = ["ManagedTransformListResponse"]
|
||||
__all__ = ["ManagedHeaderListResponse"]
|
||||
|
||||
|
||||
class ManagedTransformListResponse(BaseModel):
|
||||
class ManagedHeaderListResponse(BaseModel):
|
||||
managed_request_headers: Optional[List[RequestModel]] = None
|
||||
|
||||
managed_response_headers: Optional[List[RequestModel]] = None
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from .request_model import RequestModel as RequestModel
|
||||
from .request_model_param import RequestModelParam as RequestModelParam
|
||||
from .managed_transform_edit_params import ManagedTransformEditParams as ManagedTransformEditParams
|
||||
from .managed_transform_edit_response import ManagedTransformEditResponse as ManagedTransformEditResponse
|
||||
from .managed_transform_list_response import ManagedTransformListResponse as ManagedTransformListResponse
|
||||
15
src/cloudflare/types/pcaps/__init__.py
Normal file
15
src/cloudflare/types/pcaps/__init__.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from .pcap import PCAP as PCAP
|
||||
from .ownership import Ownership as Ownership
|
||||
from .pcap_filter import PCAPFilter as PCAPFilter
|
||||
from .pcap_filter_param import PCAPFilterParam as PCAPFilterParam
|
||||
from .pcap_get_response import PCAPGetResponse as PCAPGetResponse
|
||||
from .pcap_create_params import PCAPCreateParams as PCAPCreateParams
|
||||
from .pcap_list_response import PCAPListResponse as PCAPListResponse
|
||||
from .pcap_create_response import PCAPCreateResponse as PCAPCreateResponse
|
||||
from .ownership_get_response import OwnershipGetResponse as OwnershipGetResponse
|
||||
from .ownership_create_params import OwnershipCreateParams as OwnershipCreateParams
|
||||
from .ownership_validate_params import OwnershipValidateParams as OwnershipValidateParams
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
from typing import Optional
|
||||
from typing_extensions import Literal
|
||||
|
||||
from ...._models import BaseModel
|
||||
from ..._models import BaseModel
|
||||
|
||||
__all__ = ["Ownership"]
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue