diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58fc28e9381..c07a6a74f27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,10 @@ on: - 'integrated/**' - 'stl-preview-head/**' - 'stl-preview-base/**' + pull_request: + branches-ignore: + - 'stl-preview-head/**' + - 'stl-preview-base/**' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -18,6 +22,7 @@ jobs: timeout-minutes: 10 name: lint runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@v4 @@ -35,10 +40,10 @@ jobs: - name: Run lints run: ./scripts/lint - upload: - if: github.repository == 'stainless-sdks/cloudflare-python' + build: + if: github.repository == 'stainless-sdks/cloudflare-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) timeout-minutes: 10 - name: upload + name: build permissions: contents: read id-token: write @@ -46,6 +51,20 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install Rye + run: | + curl -sSf https://rye.astral.sh/get | bash + echo "$HOME/.rye/shims" >> $GITHUB_PATH + env: + RYE_VERSION: '0.44.0' + RYE_INSTALL_OPTION: '--yes' + + - name: Install dependencies + run: rye sync --all-features + + - name: Run build + run: rye build + - name: Get GitHub OIDC Token id: github-oidc uses: actions/github-script@v6 @@ -63,6 +82,7 @@ jobs: timeout-minutes: 30 name: test runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@v4 @@ -84,7 +104,7 @@ jobs: timeout-minutes: 10 name: examples runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: github.repository == 'cloudflare/cloudflare-python' + if: github.repository == 'cloudflare/cloudflare-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) steps: - uses: actions/checkout@v4 diff --git a/.stats.yml b/.stats.yml index 590d127c2cb..831d7ee3a0d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b15b44e0efd207de48e7e74e742b0b4b190c74f12a941a1a0ef59a51656a5224.yml -openapi_spec_hash: 83243c9ee06f88d0fa91e9b185d8a42e -config_hash: 8601d43fd5ccaf9e3d08f26748a5a63a +configured_endpoints: 1761 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8099ae57ddc6576c2cc9b66bd3ad20b615dde48dcb6ea92a9045ac7125fa582c.yml +openapi_spec_hash: 15badddc13be4018560fec531e37cb74 +config_hash: 150f1595200b5d085e0c40682eb2010b diff --git a/README.md b/README.md index 755e3162353..821cf8d0340 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Cloudflare Python API library -[![PyPI version](https://img.shields.io/pypi/v/cloudflare.svg)](https://pypi.org/project/cloudflare/) +[![PyPI version]()](https://pypi.org/project/cloudflare/) The Cloudflare Python library provides convenient access to the Cloudflare REST API from any Python 3.8+ application. The library includes type definitions for all request params and response fields, @@ -70,6 +70,42 @@ asyncio.run(main()) Functionality between the synchronous and asynchronous clients is otherwise identical. +### With aiohttp + +By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend. + +You can enable this by installing `aiohttp`: + +```sh +# install from PyPI +pip install cloudflare[aiohttp] +``` + +Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`: + +```python +import os +import asyncio +from cloudflare import DefaultAioHttpClient +from cloudflare import AsyncCloudflare + + +async def main() -> None: + async with AsyncCloudflare( + api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted + http_client=DefaultAioHttpClient(), + ) as client: + zone = await client.zones.create( + account={"id": "023e105f4ecef8ad9ca31a8372d0c353"}, + name="example.com", + type="full", + ) + print(zone.id) + + +asyncio.run(main()) +``` + ## Using types Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like: @@ -244,7 +280,7 @@ client.with_options(max_retries=5).zones.get( ### Timeouts By default requests time out after 1 minute. You can configure this with a `timeout` option, -which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object: +which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object: ```python from cloudflare import Cloudflare diff --git a/api.md b/api.md index 04738525ed2..abba67ceadc 100644 --- a/api.md +++ b/api.md @@ -2570,15 +2570,9 @@ Methods: ### Metadata -Types: - -```python -from cloudflare.types.kv.namespaces import MetadataGetResponse -``` - Methods: -- client.kv.namespaces.metadata.get(key_name, \*, account_id, namespace_id) -> Optional[MetadataGetResponse] +- client.kv.namespaces.metadata.get(key_name, \*, account_id, namespace_id) -> object ### Values @@ -3377,8 +3371,8 @@ from cloudflare.types.brand_protection import ( Methods: -- client.brand_protection.submit(\*, account_id, \*\*params) -> Optional[Submit] -- client.brand_protection.url_info(\*, account_id, \*\*params) -> Optional[Info] +- client.brand_protection.submit(\*, account_id, \*\*params) -> Optional[Submit] +- client.brand_protection.url_info(\*, account_id, \*\*params) -> Optional[Info] # Diagnostics @@ -3929,8 +3923,10 @@ Types: ```python from cloudflare.types.magic_transit import ( + ConnectorCreateResponse, ConnectorUpdateResponse, ConnectorListResponse, + ConnectorDeleteResponse, ConnectorEditResponse, ConnectorGetResponse, ) @@ -3938,8 +3934,10 @@ from cloudflare.types.magic_transit import ( Methods: +- client.magic_transit.connectors.create(\*, account_id, \*\*params) -> ConnectorCreateResponse - client.magic_transit.connectors.update(connector_id, \*, account_id, \*\*params) -> ConnectorUpdateResponse - client.magic_transit.connectors.list(\*, account_id) -> SyncSinglePage[ConnectorListResponse] +- client.magic_transit.connectors.delete(connector_id, \*, account_id) -> ConnectorDeleteResponse - client.magic_transit.connectors.edit(connector_id, \*, account_id, \*\*params) -> ConnectorEditResponse - client.magic_transit.connectors.get(connector_id, \*, account_id) -> ConnectorGetResponse @@ -7280,6 +7278,44 @@ Methods: - client.radar.bgp.ips.timeseries(\*\*params) -> IPTimeseriesResponse +## Bots + +Types: + +```python +from cloudflare.types.radar import ( + BotListResponse, + BotGetResponse, + BotSummaryResponse, + BotTimeseriesResponse, + BotTimeseriesGroupsResponse, +) +``` + +Methods: + +- client.radar.bots.list(\*\*params) -> BotListResponse +- client.radar.bots.get(bot_slug, \*\*params) -> BotGetResponse +- client.radar.bots.summary(dimension, \*\*params) -> BotSummaryResponse +- client.radar.bots.timeseries(\*\*params) -> BotTimeseriesResponse +- client.radar.bots.timeseries_groups(dimension, \*\*params) -> BotTimeseriesGroupsResponse + +### WebCrawlers + +Types: + +```python +from cloudflare.types.radar.bots import ( + WebCrawlerSummaryResponse, + WebCrawlerTimeseriesGroupsResponse, +) +``` + +Methods: + +- client.radar.bots.web_crawlers.summary(dimension, \*\*params) -> WebCrawlerSummaryResponse +- client.radar.bots.web_crawlers.timeseries_groups(dimension, \*\*params) -> WebCrawlerTimeseriesGroupsResponse + ## Datasets Types: diff --git a/bin/check-release-environment b/bin/check-release-environment index b659e91535b..b845b0f4c96 100644 --- a/bin/check-release-environment +++ b/bin/check-release-environment @@ -3,7 +3,7 @@ errors=() if [ -z "${PYPI_TOKEN}" ]; then - errors+=("The CLOUDFLARE_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.") + errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.") fi lenErrors=${#errors[@]} diff --git a/pyproject.toml b/pyproject.toml index b1f6854f5f6..3806b408b06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,6 +37,8 @@ classifiers = [ Homepage = "https://github.com/cloudflare/cloudflare-python" Repository = "https://github.com/cloudflare/cloudflare-python" +[project.optional-dependencies] +aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.6"] [tool.rye] managed = true diff --git a/requirements-dev.lock b/requirements-dev.lock index d30c3e08170..0ce6f78d53b 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -10,6 +10,13 @@ # universal: false -e file:. +aiohappyeyeballs==2.6.1 + # via aiohttp +aiohttp==3.12.8 + # via cloudflare + # via httpx-aiohttp +aiosignal==1.3.2 + # via aiohttp annotated-types==0.6.0 # via pydantic anyio==4.4.0 @@ -17,6 +24,10 @@ anyio==4.4.0 # via httpx argcomplete==3.1.2 # via nox +async-timeout==5.0.1 + # via aiohttp +attrs==25.3.0 + # via aiohttp certifi==2023.7.22 # via httpcore # via httpx @@ -34,16 +45,23 @@ execnet==2.1.1 # via pytest-xdist filelock==3.12.4 # via virtualenv +frozenlist==1.6.2 + # via aiohttp + # via aiosignal h11==0.14.0 # via httpcore httpcore==1.0.2 # via httpx httpx==0.28.1 # via cloudflare + # via httpx-aiohttp # via respx +httpx-aiohttp==0.1.6 + # via cloudflare idna==3.4 # via anyio # via httpx + # via yarl importlib-metadata==7.0.0 iniconfig==2.0.0 # via pytest @@ -51,6 +69,9 @@ markdown-it-py==3.0.0 # via rich mdurl==0.1.2 # via markdown-it-py +multidict==6.4.4 + # via aiohttp + # via yarl mypy==1.14.1 mypy-extensions==1.0.0 # via mypy @@ -65,6 +86,9 @@ platformdirs==3.11.0 # via virtualenv pluggy==1.5.0 # via pytest +propcache==0.3.1 + # via aiohttp + # via yarl pydantic==2.10.3 # via cloudflare pydantic-core==2.27.1 @@ -98,11 +122,14 @@ tomli==2.0.2 typing-extensions==4.12.2 # via anyio # via cloudflare + # via multidict # via mypy # via pydantic # via pydantic-core # via pyright virtualenv==20.24.5 # via nox +yarl==1.20.0 + # via aiohttp zipp==3.17.0 # via importlib-metadata diff --git a/requirements.lock b/requirements.lock index 4752e59fd63..510fa9d9dc2 100644 --- a/requirements.lock +++ b/requirements.lock @@ -10,11 +10,22 @@ # universal: false -e file:. +aiohappyeyeballs==2.6.1 + # via aiohttp +aiohttp==3.12.8 + # via cloudflare + # via httpx-aiohttp +aiosignal==1.3.2 + # via aiohttp annotated-types==0.6.0 # via pydantic anyio==4.4.0 # via cloudflare # via httpx +async-timeout==5.0.1 + # via aiohttp +attrs==25.3.0 + # via aiohttp certifi==2023.7.22 # via httpcore # via httpx @@ -22,15 +33,28 @@ distro==1.8.0 # via cloudflare exceptiongroup==1.2.2 # via anyio +frozenlist==1.6.2 + # via aiohttp + # via aiosignal h11==0.14.0 # via httpcore httpcore==1.0.2 # via httpx httpx==0.28.1 # via cloudflare + # via httpx-aiohttp +httpx-aiohttp==0.1.6 + # via cloudflare idna==3.4 # via anyio # via httpx + # via yarl +multidict==6.4.4 + # via aiohttp + # via yarl +propcache==0.3.1 + # via aiohttp + # via yarl pydantic==2.10.3 # via cloudflare pydantic-core==2.27.1 @@ -41,5 +65,8 @@ sniffio==1.3.0 typing-extensions==4.12.2 # via anyio # via cloudflare + # via multidict # via pydantic # via pydantic-core +yarl==1.20.0 + # via aiohttp diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh index 6ba857e8d3b..fc6462eccf8 100755 --- a/scripts/utils/upload-artifact.sh +++ b/scripts/utils/upload-artifact.sh @@ -1,7 +1,9 @@ #!/usr/bin/env bash set -exuo pipefail -RESPONSE=$(curl -X POST "$URL" \ +FILENAME=$(basename dist/*.whl) + +RESPONSE=$(curl -X POST "$URL?filename=$FILENAME" \ -H "Authorization: Bearer $AUTH" \ -H "Content-Type: application/json") @@ -12,13 +14,13 @@ if [[ "$SIGNED_URL" == "null" ]]; then exit 1 fi -UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \ - -H "Content-Type: application/gzip" \ - --data-binary @- "$SIGNED_URL" 2>&1) +UPLOAD_RESPONSE=$(curl -v -X PUT \ + -H "Content-Type: binary/octet-stream" \ + --data-binary "@dist/$FILENAME" "$SIGNED_URL" 2>&1) if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then echo -e "\033[32mUploaded build to Stainless storage.\033[0m" - echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/cloudflare-python/$SHA'\033[0m" + echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/cloudflare-python/$SHA/$FILENAME'\033[0m" else echo -e "\033[31mFailed to upload artifact.\033[0m" exit 1 diff --git a/src/cloudflare/__init__.py b/src/cloudflare/__init__.py index 9ce8e45d0c0..9d76c218a03 100644 --- a/src/cloudflare/__init__.py +++ b/src/cloudflare/__init__.py @@ -36,7 +36,7 @@ UnprocessableEntityError, APIResponseValidationError, ) -from ._base_client import DefaultHttpxClient, DefaultAsyncHttpxClient +from ._base_client import DefaultHttpxClient, DefaultAioHttpClient, DefaultAsyncHttpxClient from ._utils._logs import setup_logging as _setup_logging __all__ = [ @@ -78,6 +78,7 @@ "DEFAULT_CONNECTION_LIMITS", "DefaultHttpxClient", "DefaultAsyncHttpxClient", + "DefaultAioHttpClient", ] if not _t.TYPE_CHECKING: diff --git a/src/cloudflare/_base_client.py b/src/cloudflare/_base_client.py index d6d981cb568..206b0b459d1 100644 --- a/src/cloudflare/_base_client.py +++ b/src/cloudflare/_base_client.py @@ -1331,6 +1331,24 @@ def __init__(self, **kwargs: Any) -> None: super().__init__(**kwargs) +try: + import httpx_aiohttp +except ImportError: + + class _DefaultAioHttpClient(httpx.AsyncClient): + def __init__(self, **_kwargs: Any) -> None: + raise RuntimeError("To use the aiohttp client you must have installed the package with the `aiohttp` extra") +else: + + class _DefaultAioHttpClient(httpx_aiohttp.HttpxAiohttpClient): # type: ignore + def __init__(self, **kwargs: Any) -> None: + kwargs.setdefault("timeout", DEFAULT_TIMEOUT) + kwargs.setdefault("limits", DEFAULT_CONNECTION_LIMITS) + kwargs.setdefault("follow_redirects", True) + + super().__init__(**kwargs) + + if TYPE_CHECKING: DefaultAsyncHttpxClient = httpx.AsyncClient """An alias to `httpx.AsyncClient` that provides the same defaults that this SDK @@ -1339,8 +1357,12 @@ def __init__(self, **kwargs: Any) -> None: This is useful because overriding the `http_client` with your own instance of `httpx.AsyncClient` will result in httpx's defaults being used, not ours. """ + + DefaultAioHttpClient = httpx.AsyncClient + """An alias to `httpx.AsyncClient` that changes the default HTTP transport to `aiohttp`.""" else: DefaultAsyncHttpxClient = _DefaultAsyncHttpxClient + DefaultAioHttpClient = _DefaultAioHttpClient class AsyncHttpxClientWrapper(DefaultAsyncHttpxClient): diff --git a/src/cloudflare/_client.py b/src/cloudflare/_client.py index 141eaf0be63..77031e103b3 100644 --- a/src/cloudflare/_client.py +++ b/src/cloudflare/_client.py @@ -170,7 +170,6 @@ from .resources.billing.billing import BillingResource, AsyncBillingResource from .resources.logpush.logpush import LogpushResource, AsyncLogpushResource from .resources.workers.workers import WorkersResource, AsyncWorkersResource - from .resources.brand_protection import BrandProtectionResource, AsyncBrandProtectionResource from .resources.accounts.accounts import AccountsResource, AsyncAccountsResource from .resources.alerting.alerting import AlertingResource, AsyncAlertingResource from .resources.firewall.firewall import FirewallResource, AsyncFirewallResource @@ -214,6 +213,7 @@ from .resources.durable_objects.durable_objects import DurableObjectsResource, AsyncDurableObjectsResource from .resources.request_tracers.request_tracers import RequestTracersResource, AsyncRequestTracersResource from .resources.security_center.security_center import SecurityCenterResource, AsyncSecurityCenterResource + from .resources.brand_protection.brand_protection import BrandProtectionResource, AsyncBrandProtectionResource from .resources.content_scanning.content_scanning import ContentScanningResource, AsyncContentScanningResource from .resources.custom_hostnames.custom_hostnames import CustomHostnamesResource, AsyncCustomHostnamesResource from .resources.resource_sharing.resource_sharing import ResourceSharingResource, AsyncResourceSharingResource diff --git a/src/cloudflare/resources/accounts/tokens/tokens.py b/src/cloudflare/resources/accounts/tokens/tokens.py index 4f50160a6df..d2f34383499 100644 --- a/src/cloudflare/resources/accounts/tokens/tokens.py +++ b/src/cloudflare/resources/accounts/tokens/tokens.py @@ -145,10 +145,10 @@ def update( account_id: str, name: str, policies: Iterable[TokenPolicy], - status: Literal["active", "disabled", "expired"], condition: token_update_params.Condition | NotGiven = NOT_GIVEN, expires_on: Union[str, datetime] | NotGiven = NOT_GIVEN, not_before: Union[str, datetime] | NotGiven = NOT_GIVEN, + status: Literal["active", "disabled", "expired"] | 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, @@ -168,13 +168,13 @@ def update( policies: List of access policies assigned to the token. - status: Status of the token. - expires_on: The expiration time on or after which the JWT MUST NOT be accepted for processing. not_before: The time before which the token MUST NOT be accepted for processing. + status: Status of the token. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -193,10 +193,10 @@ def update( { "name": name, "policies": policies, - "status": status, "condition": condition, "expires_on": expires_on, "not_before": not_before, + "status": status, }, token_update_params.TokenUpdateParams, ), @@ -492,10 +492,10 @@ async def update( account_id: str, name: str, policies: Iterable[TokenPolicy], - status: Literal["active", "disabled", "expired"], condition: token_update_params.Condition | NotGiven = NOT_GIVEN, expires_on: Union[str, datetime] | NotGiven = NOT_GIVEN, not_before: Union[str, datetime] | NotGiven = NOT_GIVEN, + status: Literal["active", "disabled", "expired"] | 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, @@ -515,13 +515,13 @@ async def update( policies: List of access policies assigned to the token. - status: Status of the token. - expires_on: The expiration time on or after which the JWT MUST NOT be accepted for processing. not_before: The time before which the token MUST NOT be accepted for processing. + status: Status of the token. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -540,10 +540,10 @@ async def update( { "name": name, "policies": policies, - "status": status, "condition": condition, "expires_on": expires_on, "not_before": not_before, + "status": status, }, token_update_params.TokenUpdateParams, ), diff --git a/src/cloudflare/resources/bot_management.py b/src/cloudflare/resources/bot_management.py index f3a541ea1f7..540928b30e3 100644 --- a/src/cloudflare/resources/bot_management.py +++ b/src/cloudflare/resources/bot_management.py @@ -51,7 +51,7 @@ def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, fight_mode: bool | NotGiven = NOT_GIVEN, @@ -128,7 +128,8 @@ def update( Args: zone_id: Identifier. - ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. + ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value + `only_on_ad_pages` is currently not available for Enterprise customers. crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze. @@ -152,7 +153,7 @@ def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, optimize_wordpress: bool | NotGiven = NOT_GIVEN, @@ -232,7 +233,8 @@ def update( Args: zone_id: Identifier. - ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. + ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value + `only_on_ad_pages` is currently not available for Enterprise customers. crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze. @@ -264,7 +266,7 @@ def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, optimize_wordpress: bool | NotGiven = NOT_GIVEN, @@ -345,7 +347,8 @@ def update( Args: zone_id: Identifier. - ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. + ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value + `only_on_ad_pages` is currently not available for Enterprise customers. crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze. @@ -379,7 +382,7 @@ def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, auto_update_model: bool | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, @@ -457,7 +460,8 @@ def update( Args: zone_id: Identifier. - ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. + ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value + `only_on_ad_pages` is currently not available for Enterprise customers. auto_update_model: Automatically update to the newest bot detection models created by Cloudflare as they are released. @@ -486,7 +490,7 @@ def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, fight_mode: bool | NotGiven = NOT_GIVEN, @@ -609,7 +613,7 @@ async def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, fight_mode: bool | NotGiven = NOT_GIVEN, @@ -686,7 +690,8 @@ async def update( Args: zone_id: Identifier. - ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. + ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value + `only_on_ad_pages` is currently not available for Enterprise customers. crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze. @@ -710,7 +715,7 @@ async def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, optimize_wordpress: bool | NotGiven = NOT_GIVEN, @@ -790,7 +795,8 @@ async def update( Args: zone_id: Identifier. - ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. + ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value + `only_on_ad_pages` is currently not available for Enterprise customers. crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze. @@ -822,7 +828,7 @@ async def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, optimize_wordpress: bool | NotGiven = NOT_GIVEN, @@ -903,7 +909,8 @@ async def update( Args: zone_id: Identifier. - ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. + ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value + `only_on_ad_pages` is currently not available for Enterprise customers. crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze. @@ -937,7 +944,7 @@ async def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, auto_update_model: bool | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, @@ -1015,7 +1022,8 @@ async def update( Args: zone_id: Identifier. - ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. + ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value + `only_on_ad_pages` is currently not available for Enterprise customers. auto_update_model: Automatically update to the newest bot detection models created by Cloudflare as they are released. @@ -1044,7 +1052,7 @@ async def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, fight_mode: bool | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/brand_protection/__init__.py b/src/cloudflare/resources/brand_protection/__init__.py new file mode 100644 index 00000000000..11906c084fe --- /dev/null +++ b/src/cloudflare/resources/brand_protection/__init__.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from .brand_protection import ( + BrandProtectionResource, + AsyncBrandProtectionResource, + BrandProtectionResourceWithRawResponse, + AsyncBrandProtectionResourceWithRawResponse, + BrandProtectionResourceWithStreamingResponse, + AsyncBrandProtectionResourceWithStreamingResponse, +) + +__all__ = [ + "BrandProtectionResource", + "AsyncBrandProtectionResource", + "BrandProtectionResourceWithRawResponse", + "AsyncBrandProtectionResourceWithRawResponse", + "BrandProtectionResourceWithStreamingResponse", + "AsyncBrandProtectionResourceWithStreamingResponse", +] diff --git a/src/cloudflare/resources/brand_protection.py b/src/cloudflare/resources/brand_protection/brand_protection.py similarity index 95% rename from src/cloudflare/resources/brand_protection.py rename to src/cloudflare/resources/brand_protection/brand_protection.py index 659ee0c7e7c..2f4981451a5 100644 --- a/src/cloudflare/resources/brand_protection.py +++ b/src/cloudflare/resources/brand_protection/brand_protection.py @@ -6,21 +6,21 @@ 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 ( +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.brand_protection import brand_protection_submit_params, brand_protection_url_info_params -from ..types.brand_protection.info import Info -from ..types.brand_protection.submit import Submit +from ..._wrappers import ResultWrapper +from ..._base_client import make_request_options +from ...types.brand_protection import brand_protection_submit_params, brand_protection_url_info_params +from ...types.brand_protection.info import Info +from ...types.brand_protection.submit import Submit __all__ = ["BrandProtectionResource", "AsyncBrandProtectionResource"] diff --git a/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py b/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py index a313c5426f1..1de42ea02f3 100644 --- a/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py +++ b/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py @@ -203,8 +203,6 @@ def create( self, *, path_account_id: str, - attacker: str, - attacker_country: str, category: str, date: Union[str, datetime], event: str, @@ -212,6 +210,8 @@ def create( raw: threat_event_create_params.Raw, tlp: str, body_account_id: float | NotGiven = NOT_GIVEN, + attacker: str | NotGiven = NOT_GIVEN, + attacker_country: str | NotGiven = NOT_GIVEN, dataset_id: str | NotGiven = NOT_GIVEN, indicator: str | NotGiven = NOT_GIVEN, tags: List[str] | NotGiven = NOT_GIVEN, @@ -247,8 +247,6 @@ def create( f"/accounts/{path_account_id}/cloudforce-one/events/create", body=maybe_transform( { - "attacker": attacker, - "attacker_country": attacker_country, "category": category, "date": date, "event": event, @@ -256,6 +254,8 @@ def create( "raw": raw, "tlp": tlp, "body_account_id": body_account_id, + "attacker": attacker, + "attacker_country": attacker_country, "dataset_id": dataset_id, "indicator": indicator, "tags": tags, @@ -419,7 +419,7 @@ def bulk_create( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=ThreatEventBulkCreateResponse, + cast_to=float, ) def edit( @@ -600,8 +600,6 @@ async def create( self, *, path_account_id: str, - attacker: str, - attacker_country: str, category: str, date: Union[str, datetime], event: str, @@ -609,6 +607,8 @@ async def create( raw: threat_event_create_params.Raw, tlp: str, body_account_id: float | NotGiven = NOT_GIVEN, + attacker: str | NotGiven = NOT_GIVEN, + attacker_country: str | NotGiven = NOT_GIVEN, dataset_id: str | NotGiven = NOT_GIVEN, indicator: str | NotGiven = NOT_GIVEN, tags: List[str] | NotGiven = NOT_GIVEN, @@ -644,8 +644,6 @@ async def create( f"/accounts/{path_account_id}/cloudforce-one/events/create", body=await async_maybe_transform( { - "attacker": attacker, - "attacker_country": attacker_country, "category": category, "date": date, "event": event, @@ -653,6 +651,8 @@ async def create( "raw": raw, "tlp": tlp, "body_account_id": body_account_id, + "attacker": attacker, + "attacker_country": attacker_country, "dataset_id": dataset_id, "indicator": indicator, "tags": tags, @@ -816,7 +816,7 @@ async def bulk_create( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=ThreatEventBulkCreateResponse, + cast_to=float, ) async def edit( diff --git a/src/cloudflare/resources/dns/records.py b/src/cloudflare/resources/dns/records.py index 7fe82213b8c..d45b2de1d78 100644 --- a/src/cloudflare/resources/dns/records.py +++ b/src/cloudflare/resources/dns/records.py @@ -69,13 +69,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.ARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -98,6 +98,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -112,10 +116,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -132,13 +132,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["AAAA"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.AAAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -161,6 +161,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -175,10 +179,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -195,13 +195,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CNAME"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -224,6 +224,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -238,10 +242,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -258,6 +258,7 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["MX"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, @@ -265,7 +266,6 @@ def create( proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.MXRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -288,6 +288,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -305,10 +309,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -325,13 +325,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NS"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.NSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -354,6 +354,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -368,10 +372,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -388,13 +388,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["OPENPGPKEY"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.DNSRecordsOpenpgpkeyRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -417,6 +417,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -431,10 +435,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -451,13 +451,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["PTR"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.PTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -480,6 +480,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -494,10 +498,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -514,13 +514,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TXT"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.TXTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -543,6 +543,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -562,10 +566,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -582,13 +582,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CAA"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.CAARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.CAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -611,6 +611,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -625,10 +629,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -645,13 +645,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CERT"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.CERTRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.CERTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -674,6 +674,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -688,10 +692,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -708,13 +708,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DNSKEY"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.DNSKEYRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.DNSKEYRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -737,6 +737,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -751,10 +755,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -771,13 +771,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DS"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.DSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.DSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -800,6 +800,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -814,10 +818,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -834,13 +834,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["HTTPS"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.HTTPSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.HTTPSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -863,6 +863,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -877,10 +881,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -897,13 +897,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["LOC"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.LOCRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.LOCRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -926,6 +926,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -940,10 +944,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -960,13 +960,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NAPTR"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.NAPTRRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.NAPTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -989,6 +989,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1003,10 +1007,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1023,13 +1023,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SMIMEA"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.SMIMEARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.SMIMEARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1052,6 +1052,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1066,10 +1070,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1086,13 +1086,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SRV"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.SRVRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.SRVRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1115,6 +1115,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1129,10 +1133,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1149,13 +1149,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SSHFP"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.SSHFPRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.SSHFPRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1178,6 +1178,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1192,10 +1196,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1212,13 +1212,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SVCB"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.SVCBRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.SVCBRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1241,6 +1241,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1255,10 +1259,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1275,13 +1275,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TLSA"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.TLSARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.TLSARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1304,6 +1304,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1318,10 +1322,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1338,6 +1338,7 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["URI"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.URIRecordData | NotGiven = NOT_GIVEN, @@ -1345,7 +1346,6 @@ def create( proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.URIRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1368,6 +1368,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1385,10 +1389,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1399,12 +1399,13 @@ def create( """ ... - @required_args(["zone_id", "name", "type"]) + @required_args(["zone_id", "name", "ttl", "type"]) def create( self, *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"] | Literal["AAAA"] | Literal["CNAME"] @@ -1433,7 +1434,6 @@ def create( | record_create_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | NotGiven = NOT_GIVEN, priority: float | NotGiven = NOT_GIVEN, data: record_create_params.CAARecordData | record_create_params.CERTRecordData @@ -1463,13 +1463,13 @@ def create( body=maybe_transform( { "name": name, + "ttl": ttl, "type": type, "comment": comment, "content": content, "proxied": proxied, "settings": settings, "tags": tags, - "ttl": ttl, "priority": priority, "data": data, }, @@ -1495,13 +1495,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.ARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1526,6 +1526,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1540,10 +1544,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1561,13 +1561,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["AAAA"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.AAAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1592,6 +1592,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1606,10 +1610,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1627,13 +1627,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CNAME"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1658,6 +1658,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1672,10 +1676,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1693,6 +1693,7 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["MX"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, @@ -1700,7 +1701,6 @@ def update( proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.MXRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1725,6 +1725,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1742,10 +1746,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1763,13 +1763,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NS"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.NSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1794,6 +1794,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1808,10 +1812,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1829,13 +1829,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["OPENPGPKEY"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.DNSRecordsOpenpgpkeyRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1860,6 +1860,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1874,10 +1878,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1895,13 +1895,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["PTR"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.PTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1926,6 +1926,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1940,10 +1944,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1961,13 +1961,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TXT"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.TXTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1992,6 +1992,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2011,10 +2015,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2032,13 +2032,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CAA"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.CAARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.CAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2063,6 +2063,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2077,10 +2081,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2098,13 +2098,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CERT"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.CERTRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.CERTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2129,6 +2129,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2143,10 +2147,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2164,13 +2164,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DNSKEY"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.DNSKEYRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.DNSKEYRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2195,6 +2195,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2209,10 +2213,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2230,13 +2230,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DS"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.DSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.DSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2261,6 +2261,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2275,10 +2279,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2296,13 +2296,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["HTTPS"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.HTTPSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.HTTPSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2327,6 +2327,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2341,10 +2345,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2362,13 +2362,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["LOC"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.LOCRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.LOCRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2393,6 +2393,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2407,10 +2411,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2428,13 +2428,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NAPTR"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.NAPTRRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.NAPTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2459,6 +2459,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2473,10 +2477,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2494,13 +2494,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SMIMEA"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.SMIMEARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.SMIMEARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2525,6 +2525,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2539,10 +2543,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2560,13 +2560,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SRV"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.SRVRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.SRVRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2591,6 +2591,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2605,10 +2609,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2626,13 +2626,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SSHFP"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.SSHFPRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.SSHFPRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2657,6 +2657,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2671,10 +2675,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2692,13 +2692,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SVCB"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.SVCBRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.SVCBRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2723,6 +2723,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2737,10 +2741,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2758,13 +2758,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TLSA"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.TLSARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.TLSARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2789,6 +2789,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2803,10 +2807,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2824,6 +2824,7 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["URI"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.URIRecordData | NotGiven = NOT_GIVEN, @@ -2831,7 +2832,6 @@ def update( proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.URIRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2856,6 +2856,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2873,10 +2877,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2887,13 +2887,14 @@ def update( """ ... - @required_args(["zone_id", "name", "type"]) + @required_args(["zone_id", "name", "ttl", "type"]) def update( self, dns_record_id: str, *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"] | Literal["AAAA"] | Literal["CNAME"] @@ -2922,7 +2923,6 @@ def update( | record_update_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | NotGiven = NOT_GIVEN, priority: float | NotGiven = NOT_GIVEN, data: record_update_params.CAARecordData | record_update_params.CERTRecordData @@ -2954,13 +2954,13 @@ def update( body=maybe_transform( { "name": name, + "ttl": ttl, "type": type, "comment": comment, "content": content, "proxied": proxied, "settings": settings, "tags": tags, - "ttl": ttl, "priority": priority, "data": data, }, @@ -3220,13 +3220,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.ARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3251,6 +3251,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3265,10 +3269,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3286,13 +3286,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["AAAA"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.AAAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3317,6 +3317,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3331,10 +3335,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3352,13 +3352,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CNAME"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3383,6 +3383,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3397,10 +3401,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3418,6 +3418,7 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["MX"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, @@ -3425,7 +3426,6 @@ def edit( proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.MXRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3450,6 +3450,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3467,10 +3471,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3488,13 +3488,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NS"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.NSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3519,6 +3519,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3533,10 +3537,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3554,13 +3554,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["OPENPGPKEY"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.DNSRecordsOpenpgpkeyRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3585,6 +3585,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3599,10 +3603,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3620,13 +3620,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["PTR"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.PTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3651,6 +3651,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3665,10 +3669,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3686,13 +3686,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TXT"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.TXTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3717,6 +3717,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3736,10 +3740,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3757,13 +3757,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CAA"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.CAARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.CAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3788,6 +3788,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3802,10 +3806,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3823,13 +3823,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CERT"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.CERTRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.CERTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3854,6 +3854,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3868,10 +3872,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3889,13 +3889,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DNSKEY"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.DNSKEYRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.DNSKEYRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3920,6 +3920,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3934,10 +3938,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3955,13 +3955,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DS"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.DSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.DSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3986,6 +3986,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4000,10 +4004,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4021,13 +4021,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["HTTPS"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.HTTPSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.HTTPSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4052,6 +4052,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4066,10 +4070,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4087,13 +4087,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["LOC"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.LOCRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.LOCRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4118,6 +4118,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4132,10 +4136,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4153,13 +4153,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NAPTR"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.NAPTRRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.NAPTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4184,6 +4184,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4198,10 +4202,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4219,13 +4219,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SMIMEA"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.SMIMEARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.SMIMEARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4250,6 +4250,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4264,10 +4268,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4285,13 +4285,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SRV"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.SRVRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.SRVRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4316,6 +4316,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4330,10 +4334,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4351,13 +4351,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SSHFP"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.SSHFPRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.SSHFPRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4382,6 +4382,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4396,10 +4400,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4417,13 +4417,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SVCB"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.SVCBRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.SVCBRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4448,6 +4448,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4462,10 +4466,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4483,13 +4483,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TLSA"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.TLSARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.TLSARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4514,6 +4514,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4528,10 +4532,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4549,6 +4549,7 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["URI"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.URIRecordData | NotGiven = NOT_GIVEN, @@ -4556,7 +4557,6 @@ def edit( proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.URIRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4581,6 +4581,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4598,10 +4602,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4612,13 +4612,14 @@ def edit( """ ... - @required_args(["zone_id", "name", "type"]) + @required_args(["zone_id", "name", "ttl", "type"]) def edit( self, dns_record_id: str, *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"] | Literal["AAAA"] | Literal["CNAME"] @@ -4645,7 +4646,6 @@ def edit( proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.ARecordSettings | record_edit_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | NotGiven = NOT_GIVEN, priority: float | NotGiven = NOT_GIVEN, data: record_edit_params.CAARecordData | record_edit_params.CERTRecordData @@ -4677,13 +4677,13 @@ def edit( body=maybe_transform( { "name": name, + "ttl": ttl, "type": type, "comment": comment, "content": content, "proxied": proxied, "settings": settings, "tags": tags, - "ttl": ttl, "priority": priority, "data": data, }, @@ -4931,13 +4931,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.ARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4960,6 +4960,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4974,10 +4978,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4994,13 +4994,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["AAAA"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.AAAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5023,6 +5023,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5037,10 +5041,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5057,13 +5057,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CNAME"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5086,6 +5086,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5100,10 +5104,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5120,6 +5120,7 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["MX"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, @@ -5127,7 +5128,6 @@ async def create( proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.MXRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5150,6 +5150,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5167,10 +5171,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5187,13 +5187,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NS"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.NSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5216,6 +5216,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5230,10 +5234,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5250,13 +5250,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["OPENPGPKEY"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.DNSRecordsOpenpgpkeyRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5279,6 +5279,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5293,10 +5297,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5313,13 +5313,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["PTR"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.PTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5342,6 +5342,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5356,10 +5360,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5376,13 +5376,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TXT"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.TXTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5405,6 +5405,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5424,10 +5428,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5444,13 +5444,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CAA"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.CAARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.CAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5473,6 +5473,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5487,10 +5491,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5507,13 +5507,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CERT"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.CERTRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.CERTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5536,6 +5536,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5550,10 +5554,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5570,13 +5570,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DNSKEY"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.DNSKEYRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.DNSKEYRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5599,6 +5599,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5613,10 +5617,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5633,13 +5633,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DS"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.DSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.DSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5662,6 +5662,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5676,10 +5680,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5696,13 +5696,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["HTTPS"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.HTTPSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.HTTPSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5725,6 +5725,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5739,10 +5743,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5759,13 +5759,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["LOC"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.LOCRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.LOCRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5788,6 +5788,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5802,10 +5806,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5822,13 +5822,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NAPTR"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.NAPTRRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.NAPTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5851,6 +5851,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5865,10 +5869,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5885,13 +5885,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SMIMEA"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.SMIMEARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.SMIMEARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5914,6 +5914,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5928,10 +5932,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5948,13 +5948,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SRV"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.SRVRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.SRVRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5977,6 +5977,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5991,10 +5995,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6011,13 +6011,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SSHFP"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.SSHFPRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.SSHFPRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6040,6 +6040,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6054,10 +6058,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6074,13 +6074,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SVCB"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.SVCBRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.SVCBRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6103,6 +6103,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6117,10 +6121,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6137,13 +6137,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TLSA"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.TLSARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.TLSARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6166,6 +6166,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6180,10 +6184,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6200,6 +6200,7 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["URI"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.URIRecordData | NotGiven = NOT_GIVEN, @@ -6207,7 +6208,6 @@ async def create( proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.URIRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6230,6 +6230,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6247,10 +6251,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6261,12 +6261,13 @@ async def create( """ ... - @required_args(["zone_id", "name", "type"]) + @required_args(["zone_id", "name", "ttl", "type"]) async def create( self, *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"] | Literal["AAAA"] | Literal["CNAME"] @@ -6295,7 +6296,6 @@ async def create( | record_create_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | NotGiven = NOT_GIVEN, priority: float | NotGiven = NOT_GIVEN, data: record_create_params.CAARecordData | record_create_params.CERTRecordData @@ -6325,13 +6325,13 @@ async def create( body=await async_maybe_transform( { "name": name, + "ttl": ttl, "type": type, "comment": comment, "content": content, "proxied": proxied, "settings": settings, "tags": tags, - "ttl": ttl, "priority": priority, "data": data, }, @@ -6357,13 +6357,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.ARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6388,6 +6388,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6402,10 +6406,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6423,13 +6423,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["AAAA"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.AAAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6454,6 +6454,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6468,10 +6472,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6489,13 +6489,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CNAME"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6520,6 +6520,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6534,10 +6538,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6555,6 +6555,7 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["MX"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, @@ -6562,7 +6563,6 @@ async def update( proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.MXRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6587,6 +6587,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6604,10 +6608,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6625,13 +6625,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NS"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.NSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6656,6 +6656,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6670,10 +6674,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6691,13 +6691,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["OPENPGPKEY"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.DNSRecordsOpenpgpkeyRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6722,6 +6722,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6736,10 +6740,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6757,13 +6757,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["PTR"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.PTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6788,6 +6788,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6802,10 +6806,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6823,13 +6823,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TXT"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.TXTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6854,6 +6854,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6873,10 +6877,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6894,13 +6894,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CAA"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.CAARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.CAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6925,6 +6925,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6939,10 +6943,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6960,13 +6960,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CERT"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.CERTRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.CERTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6991,6 +6991,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7005,10 +7009,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7026,13 +7026,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DNSKEY"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.DNSKEYRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.DNSKEYRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7057,6 +7057,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7071,10 +7075,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7092,13 +7092,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DS"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.DSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.DSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7123,6 +7123,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7137,10 +7141,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7158,13 +7158,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["HTTPS"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.HTTPSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.HTTPSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7189,6 +7189,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7203,10 +7207,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7224,13 +7224,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["LOC"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.LOCRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.LOCRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7255,6 +7255,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7269,10 +7273,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7290,13 +7290,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NAPTR"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.NAPTRRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.NAPTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7321,6 +7321,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7335,10 +7339,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7356,13 +7356,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SMIMEA"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.SMIMEARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.SMIMEARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7387,6 +7387,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7401,10 +7405,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7422,13 +7422,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SRV"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.SRVRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.SRVRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7453,6 +7453,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7467,10 +7471,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7488,13 +7488,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SSHFP"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.SSHFPRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.SSHFPRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7519,6 +7519,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7533,10 +7537,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7554,13 +7554,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SVCB"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.SVCBRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.SVCBRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7585,6 +7585,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7599,10 +7603,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7620,13 +7620,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TLSA"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.TLSARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.TLSARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7651,6 +7651,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7665,10 +7669,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7686,6 +7686,7 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["URI"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.URIRecordData | NotGiven = NOT_GIVEN, @@ -7693,7 +7694,6 @@ async def update( proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.URIRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7718,6 +7718,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7735,10 +7739,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7749,13 +7749,14 @@ async def update( """ ... - @required_args(["zone_id", "name", "type"]) + @required_args(["zone_id", "name", "ttl", "type"]) async def update( self, dns_record_id: str, *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"] | Literal["AAAA"] | Literal["CNAME"] @@ -7784,7 +7785,6 @@ async def update( | record_update_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | NotGiven = NOT_GIVEN, priority: float | NotGiven = NOT_GIVEN, data: record_update_params.CAARecordData | record_update_params.CERTRecordData @@ -7816,13 +7816,13 @@ async def update( body=await async_maybe_transform( { "name": name, + "ttl": ttl, "type": type, "comment": comment, "content": content, "proxied": proxied, "settings": settings, "tags": tags, - "ttl": ttl, "priority": priority, "data": data, }, @@ -8082,13 +8082,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.ARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8113,6 +8113,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8127,10 +8131,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8148,13 +8148,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["AAAA"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.AAAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8179,6 +8179,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8193,10 +8197,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8214,13 +8214,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CNAME"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8245,6 +8245,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8259,10 +8263,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8280,6 +8280,7 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["MX"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, @@ -8287,7 +8288,6 @@ async def edit( proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.MXRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8312,6 +8312,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8329,10 +8333,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8350,13 +8350,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NS"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.NSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8381,6 +8381,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8395,10 +8399,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8416,13 +8416,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["OPENPGPKEY"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.DNSRecordsOpenpgpkeyRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8447,6 +8447,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8461,10 +8465,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8482,13 +8482,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["PTR"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.PTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8513,6 +8513,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8527,10 +8531,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8548,13 +8548,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TXT"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.TXTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8579,6 +8579,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8598,10 +8602,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8619,13 +8619,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CAA"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.CAARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.CAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8650,6 +8650,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8664,10 +8668,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8685,13 +8685,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CERT"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.CERTRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.CERTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8716,6 +8716,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8730,10 +8734,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8751,13 +8751,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DNSKEY"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.DNSKEYRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.DNSKEYRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8782,6 +8782,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8796,10 +8800,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8817,13 +8817,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DS"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.DSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.DSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8848,6 +8848,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8862,10 +8866,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8883,13 +8883,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["HTTPS"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.HTTPSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.HTTPSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8914,6 +8914,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8928,10 +8932,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8949,13 +8949,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["LOC"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.LOCRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.LOCRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8980,6 +8980,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8994,10 +8998,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -9015,13 +9015,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NAPTR"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.NAPTRRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.NAPTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -9046,6 +9046,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -9060,10 +9064,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -9081,13 +9081,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SMIMEA"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.SMIMEARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.SMIMEARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -9112,6 +9112,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -9126,10 +9130,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -9147,13 +9147,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SRV"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.SRVRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.SRVRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -9178,6 +9178,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -9192,10 +9196,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -9213,13 +9213,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SSHFP"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.SSHFPRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.SSHFPRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -9244,6 +9244,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -9258,10 +9262,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -9279,13 +9279,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SVCB"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.SVCBRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.SVCBRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -9310,6 +9310,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -9324,10 +9328,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -9345,13 +9345,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TLSA"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.TLSARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.TLSARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -9376,6 +9376,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -9390,10 +9394,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -9411,6 +9411,7 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["URI"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.URIRecordData | NotGiven = NOT_GIVEN, @@ -9418,7 +9419,6 @@ async def edit( proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.URIRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -9443,6 +9443,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -9460,10 +9464,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -9474,13 +9474,14 @@ async def edit( """ ... - @required_args(["zone_id", "name", "type"]) + @required_args(["zone_id", "name", "ttl", "type"]) async def edit( self, dns_record_id: str, *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"] | Literal["AAAA"] | Literal["CNAME"] @@ -9507,7 +9508,6 @@ async def edit( proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.ARecordSettings | record_edit_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | NotGiven = NOT_GIVEN, priority: float | NotGiven = NOT_GIVEN, data: record_edit_params.CAARecordData | record_edit_params.CERTRecordData @@ -9539,13 +9539,13 @@ async def edit( body=await async_maybe_transform( { "name": name, + "ttl": ttl, "type": type, "comment": comment, "content": content, "proxied": proxied, "settings": settings, "tags": tags, - "ttl": ttl, "priority": priority, "data": data, }, diff --git a/src/cloudflare/resources/email_security/settings/domains.py b/src/cloudflare/resources/email_security/settings/domains.py index 2166d0607cd..a8596bc205f 100644 --- a/src/cloudflare/resources/email_security/settings/domains.py +++ b/src/cloudflare/resources/email_security/settings/domains.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Type, Optional, cast +from typing import List, Type, cast from typing_extensions import Literal import httpx @@ -214,7 +214,7 @@ def edit( account_id: str, ip_restrictions: List[str], allowed_delivery_modes: List[Literal["DIRECT", "BCC", "JOURNAL", "API", "RETRO_SCAN"]] | NotGiven = NOT_GIVEN, - domain: Optional[str] | NotGiven = NOT_GIVEN, + domain: str | NotGiven = NOT_GIVEN, drop_dispositions: List[ Literal[ "MALICIOUS", @@ -231,8 +231,8 @@ def edit( ] | NotGiven = NOT_GIVEN, folder: Literal["AllItems", "Inbox"] | NotGiven = NOT_GIVEN, - integration_id: Optional[str] | NotGiven = NOT_GIVEN, - lookback_hops: Optional[int] | NotGiven = NOT_GIVEN, + integration_id: str | NotGiven = NOT_GIVEN, + lookback_hops: int | NotGiven = NOT_GIVEN, require_tls_inbound: bool | NotGiven = NOT_GIVEN, require_tls_outbound: bool | NotGiven = NOT_GIVEN, transport: str | NotGiven = NOT_GIVEN, @@ -515,7 +515,7 @@ async def edit( account_id: str, ip_restrictions: List[str], allowed_delivery_modes: List[Literal["DIRECT", "BCC", "JOURNAL", "API", "RETRO_SCAN"]] | NotGiven = NOT_GIVEN, - domain: Optional[str] | NotGiven = NOT_GIVEN, + domain: str | NotGiven = NOT_GIVEN, drop_dispositions: List[ Literal[ "MALICIOUS", @@ -532,8 +532,8 @@ async def edit( ] | NotGiven = NOT_GIVEN, folder: Literal["AllItems", "Inbox"] | NotGiven = NOT_GIVEN, - integration_id: Optional[str] | NotGiven = NOT_GIVEN, - lookback_hops: Optional[int] | NotGiven = NOT_GIVEN, + integration_id: str | NotGiven = NOT_GIVEN, + lookback_hops: int | NotGiven = NOT_GIVEN, require_tls_inbound: bool | NotGiven = NOT_GIVEN, require_tls_outbound: bool | NotGiven = NOT_GIVEN, transport: str | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/email_security/settings/trusted_domains.py b/src/cloudflare/resources/email_security/settings/trusted_domains.py index 1f318a5ba1b..7300201b8ac 100644 --- a/src/cloudflare/resources/email_security/settings/trusted_domains.py +++ b/src/cloudflare/resources/email_security/settings/trusted_domains.py @@ -287,11 +287,11 @@ def edit( trusted_domain_id: int, *, account_id: str, - comments: Optional[str] | NotGiven = NOT_GIVEN, - is_recent: Optional[bool] | NotGiven = NOT_GIVEN, - is_regex: Optional[bool] | NotGiven = NOT_GIVEN, - is_similarity: Optional[bool] | NotGiven = NOT_GIVEN, - pattern: Optional[str] | NotGiven = NOT_GIVEN, + comments: str | NotGiven = NOT_GIVEN, + is_recent: bool | NotGiven = NOT_GIVEN, + is_regex: bool | NotGiven = NOT_GIVEN, + is_similarity: bool | NotGiven = NOT_GIVEN, + pattern: 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, @@ -641,11 +641,11 @@ async def edit( trusted_domain_id: int, *, account_id: str, - comments: Optional[str] | NotGiven = NOT_GIVEN, - is_recent: Optional[bool] | NotGiven = NOT_GIVEN, - is_regex: Optional[bool] | NotGiven = NOT_GIVEN, - is_similarity: Optional[bool] | NotGiven = NOT_GIVEN, - pattern: Optional[str] | NotGiven = NOT_GIVEN, + comments: str | NotGiven = NOT_GIVEN, + is_recent: bool | NotGiven = NOT_GIVEN, + is_regex: bool | NotGiven = NOT_GIVEN, + is_similarity: bool | NotGiven = NOT_GIVEN, + pattern: 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, diff --git a/src/cloudflare/resources/firewall/lockdowns.py b/src/cloudflare/resources/firewall/lockdowns.py index 1081d553f48..28f38881898 100644 --- a/src/cloudflare/resources/firewall/lockdowns.py +++ b/src/cloudflare/resources/firewall/lockdowns.py @@ -79,8 +79,8 @@ def create( entered URL will be escaped before use, which means you can only use simple wildcard patterns. - description: An informative summary of the rate limit. This value is sanitized and any tags - will be removed. + description: An informative summary of the rule. This value is sanitized and any tags will be + removed. paused: When true, indicates that the rule is currently paused. @@ -413,8 +413,8 @@ async def create( entered URL will be escaped before use, which means you can only use simple wildcard patterns. - description: An informative summary of the rate limit. This value is sanitized and any tags - will be removed. + description: An informative summary of the rule. This value is sanitized and any tags will be + removed. paused: When true, indicates that the rule is currently paused. diff --git a/src/cloudflare/resources/firewall/ua_rules.py b/src/cloudflare/resources/firewall/ua_rules.py index 5de9246f2c3..69989c1cb50 100644 --- a/src/cloudflare/resources/firewall/ua_rules.py +++ b/src/cloudflare/resources/firewall/ua_rules.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, cast +from typing import Type, cast from typing_extensions import Literal import httpx @@ -56,6 +56,8 @@ def create( zone_id: str, configuration: ua_rule_create_params.Configuration, mode: Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"], + description: str | NotGiven = NOT_GIVEN, + paused: bool | 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, @@ -71,6 +73,11 @@ def create( mode: The action to apply to a matched request. + description: An informative summary of the rule. This value is sanitized and any tags will be + removed. + + paused: When true, indicates that the rule is currently paused. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -81,28 +88,25 @@ def create( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return cast( - UARuleCreateResponse, - self._post( - f"/zones/{zone_id}/firewall/ua_rules", - body=maybe_transform( - { - "configuration": configuration, - "mode": mode, - }, - ua_rule_create_params.UARuleCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[UARuleCreateResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[UARuleCreateResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._post( + f"/zones/{zone_id}/firewall/ua_rules", + body=maybe_transform( + { + "configuration": configuration, + "mode": mode, + "description": description, + "paused": paused, + }, + ua_rule_create_params.UARuleCreateParams, ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[UARuleCreateResponse]._unwrapper, + ), + cast_to=cast(Type[UARuleCreateResponse], ResultWrapper[UARuleCreateResponse]), ) def update( @@ -112,6 +116,8 @@ def update( zone_id: str, configuration: ua_rule_update_params.Configuration, mode: Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"], + description: str | NotGiven = NOT_GIVEN, + paused: bool | 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, @@ -131,6 +137,11 @@ def update( mode: The action to apply to a matched request. + description: An informative summary of the rule. This value is sanitized and any tags will be + removed. + + paused: When true, indicates that the rule is currently paused. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -143,28 +154,25 @@ def update( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not ua_rule_id: raise ValueError(f"Expected a non-empty value for `ua_rule_id` but received {ua_rule_id!r}") - return cast( - UARuleUpdateResponse, - self._put( - f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}", - body=maybe_transform( - { - "configuration": configuration, - "mode": mode, - }, - ua_rule_update_params.UARuleUpdateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[UARuleUpdateResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[UARuleUpdateResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._put( + f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}", + body=maybe_transform( + { + "configuration": configuration, + "mode": mode, + "description": description, + "paused": paused, + }, + ua_rule_update_params.UARuleUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[UARuleUpdateResponse]._unwrapper, ), + cast_to=cast(Type[UARuleUpdateResponse], ResultWrapper[UARuleUpdateResponse]), ) def list( @@ -172,10 +180,10 @@ def list( *, zone_id: str, description: str | NotGiven = NOT_GIVEN, - description_search: str | NotGiven = NOT_GIVEN, page: float | NotGiven = NOT_GIVEN, + paused: bool | NotGiven = NOT_GIVEN, per_page: float | NotGiven = NOT_GIVEN, - ua_search: str | NotGiven = NOT_GIVEN, + user_agent: 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, @@ -193,14 +201,14 @@ def list( description: A string to search for in the description of existing rules. - description_search: A string to search for in the description of existing rules. - page: Page number of paginated results. + paused: When true, indicates that the rule is currently paused. + per_page: The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`. - ua_search: A string to search for in the user agent values of existing rules. + user_agent: A string to search for in the user agent values of existing rules. extra_headers: Send extra headers @@ -223,10 +231,10 @@ def list( query=maybe_transform( { "description": description, - "description_search": description_search, "page": page, + "paused": paused, "per_page": per_page, - "ua_search": ua_search, + "user_agent": user_agent, }, ua_rule_list_params.UARuleListParams, ), @@ -310,21 +318,16 @@ def get( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not ua_rule_id: raise ValueError(f"Expected a non-empty value for `ua_rule_id` but received {ua_rule_id!r}") - return cast( - UARuleGetResponse, - self._get( - f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[UARuleGetResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[UARuleGetResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._get( + f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[UARuleGetResponse]._unwrapper, ), + cast_to=cast(Type[UARuleGetResponse], ResultWrapper[UARuleGetResponse]), ) @@ -354,6 +357,8 @@ async def create( zone_id: str, configuration: ua_rule_create_params.Configuration, mode: Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"], + description: str | NotGiven = NOT_GIVEN, + paused: bool | 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, @@ -369,6 +374,11 @@ async def create( mode: The action to apply to a matched request. + description: An informative summary of the rule. This value is sanitized and any tags will be + removed. + + paused: When true, indicates that the rule is currently paused. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -379,28 +389,25 @@ async def create( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return cast( - UARuleCreateResponse, - await self._post( - f"/zones/{zone_id}/firewall/ua_rules", - body=await async_maybe_transform( - { - "configuration": configuration, - "mode": mode, - }, - ua_rule_create_params.UARuleCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[UARuleCreateResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[UARuleCreateResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._post( + f"/zones/{zone_id}/firewall/ua_rules", + body=await async_maybe_transform( + { + "configuration": configuration, + "mode": mode, + "description": description, + "paused": paused, + }, + ua_rule_create_params.UARuleCreateParams, ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[UARuleCreateResponse]._unwrapper, + ), + cast_to=cast(Type[UARuleCreateResponse], ResultWrapper[UARuleCreateResponse]), ) async def update( @@ -410,6 +417,8 @@ async def update( zone_id: str, configuration: ua_rule_update_params.Configuration, mode: Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"], + description: str | NotGiven = NOT_GIVEN, + paused: bool | 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, @@ -429,6 +438,11 @@ async def update( mode: The action to apply to a matched request. + description: An informative summary of the rule. This value is sanitized and any tags will be + removed. + + paused: When true, indicates that the rule is currently paused. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -441,28 +455,25 @@ async def update( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not ua_rule_id: raise ValueError(f"Expected a non-empty value for `ua_rule_id` but received {ua_rule_id!r}") - return cast( - UARuleUpdateResponse, - await self._put( - f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}", - body=await async_maybe_transform( - { - "configuration": configuration, - "mode": mode, - }, - ua_rule_update_params.UARuleUpdateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[UARuleUpdateResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[UARuleUpdateResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._put( + f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}", + body=await async_maybe_transform( + { + "configuration": configuration, + "mode": mode, + "description": description, + "paused": paused, + }, + ua_rule_update_params.UARuleUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[UARuleUpdateResponse]._unwrapper, ), + cast_to=cast(Type[UARuleUpdateResponse], ResultWrapper[UARuleUpdateResponse]), ) def list( @@ -470,10 +481,10 @@ def list( *, zone_id: str, description: str | NotGiven = NOT_GIVEN, - description_search: str | NotGiven = NOT_GIVEN, page: float | NotGiven = NOT_GIVEN, + paused: bool | NotGiven = NOT_GIVEN, per_page: float | NotGiven = NOT_GIVEN, - ua_search: str | NotGiven = NOT_GIVEN, + user_agent: 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, @@ -491,14 +502,14 @@ def list( description: A string to search for in the description of existing rules. - description_search: A string to search for in the description of existing rules. - page: Page number of paginated results. + paused: When true, indicates that the rule is currently paused. + per_page: The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`. - ua_search: A string to search for in the user agent values of existing rules. + user_agent: A string to search for in the user agent values of existing rules. extra_headers: Send extra headers @@ -521,10 +532,10 @@ def list( query=maybe_transform( { "description": description, - "description_search": description_search, "page": page, + "paused": paused, "per_page": per_page, - "ua_search": ua_search, + "user_agent": user_agent, }, ua_rule_list_params.UARuleListParams, ), @@ -608,21 +619,16 @@ async def get( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not ua_rule_id: raise ValueError(f"Expected a non-empty value for `ua_rule_id` but received {ua_rule_id!r}") - return cast( - UARuleGetResponse, - await self._get( - f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[UARuleGetResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[UARuleGetResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._get( + f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[UARuleGetResponse]._unwrapper, ), + cast_to=cast(Type[UARuleGetResponse], ResultWrapper[UARuleGetResponse]), ) diff --git a/src/cloudflare/resources/hyperdrive/configs.py b/src/cloudflare/resources/hyperdrive/configs.py index ba977432b3c..9376308d7bf 100644 --- a/src/cloudflare/resources/hyperdrive/configs.py +++ b/src/cloudflare/resources/hyperdrive/configs.py @@ -53,6 +53,7 @@ def create( origin: config_create_params.Origin, caching: config_create_params.Caching | NotGiven = NOT_GIVEN, mtls: config_create_params.MTLS | NotGiven = NOT_GIVEN, + origin_connection_limit: int | 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, @@ -66,6 +67,9 @@ def create( Args: account_id: Define configurations using a unique string identifier. + origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -84,6 +88,7 @@ def create( "origin": origin, "caching": caching, "mtls": mtls, + "origin_connection_limit": origin_connection_limit, }, config_create_params.ConfigCreateParams, ), @@ -106,6 +111,7 @@ def update( origin: config_update_params.Origin, caching: config_update_params.Caching | NotGiven = NOT_GIVEN, mtls: config_update_params.MTLS | NotGiven = NOT_GIVEN, + origin_connection_limit: int | 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, @@ -121,6 +127,9 @@ def update( hyperdrive_id: Define configurations using a unique string identifier. + origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -141,6 +150,7 @@ def update( "origin": origin, "caching": caching, "mtls": mtls, + "origin_connection_limit": origin_connection_limit, }, config_update_params.ConfigUpdateParams, ), @@ -243,6 +253,7 @@ def edit( mtls: config_edit_params.MTLS | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, origin: config_edit_params.Origin | NotGiven = NOT_GIVEN, + origin_connection_limit: int | 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, @@ -260,6 +271,9 @@ def edit( hyperdrive_id: Define configurations using a unique string identifier. + origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -280,6 +294,7 @@ def edit( "mtls": mtls, "name": name, "origin": origin, + "origin_connection_limit": origin_connection_limit, }, config_edit_params.ConfigEditParams, ), @@ -366,6 +381,7 @@ async def create( origin: config_create_params.Origin, caching: config_create_params.Caching | NotGiven = NOT_GIVEN, mtls: config_create_params.MTLS | NotGiven = NOT_GIVEN, + origin_connection_limit: int | 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, @@ -379,6 +395,9 @@ async def create( Args: account_id: Define configurations using a unique string identifier. + origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -397,6 +416,7 @@ async def create( "origin": origin, "caching": caching, "mtls": mtls, + "origin_connection_limit": origin_connection_limit, }, config_create_params.ConfigCreateParams, ), @@ -419,6 +439,7 @@ async def update( origin: config_update_params.Origin, caching: config_update_params.Caching | NotGiven = NOT_GIVEN, mtls: config_update_params.MTLS | NotGiven = NOT_GIVEN, + origin_connection_limit: int | 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, @@ -434,6 +455,9 @@ async def update( hyperdrive_id: Define configurations using a unique string identifier. + origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -454,6 +478,7 @@ async def update( "origin": origin, "caching": caching, "mtls": mtls, + "origin_connection_limit": origin_connection_limit, }, config_update_params.ConfigUpdateParams, ), @@ -556,6 +581,7 @@ async def edit( mtls: config_edit_params.MTLS | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, origin: config_edit_params.Origin | NotGiven = NOT_GIVEN, + origin_connection_limit: int | 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, @@ -573,6 +599,9 @@ async def edit( hyperdrive_id: Define configurations using a unique string identifier. + origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -593,6 +622,7 @@ async def edit( "mtls": mtls, "name": name, "origin": origin, + "origin_connection_limit": origin_connection_limit, }, config_edit_params.ConfigEditParams, ), diff --git a/src/cloudflare/resources/images/v1/v1.py b/src/cloudflare/resources/images/v1/v1.py index dda2c2061d3..8c8c30b70e6 100644 --- a/src/cloudflare/resources/images/v1/v1.py +++ b/src/cloudflare/resources/images/v1/v1.py @@ -3,7 +3,7 @@ from __future__ import annotations import typing_extensions -from typing import Any, Type, cast +from typing import Any, Type, Mapping, cast import httpx @@ -39,8 +39,8 @@ VariantsResourceWithStreamingResponse, AsyncVariantsResourceWithStreamingResponse, ) -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import maybe_transform, async_maybe_transform +from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes +from ...._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import ( @@ -100,7 +100,8 @@ def create( self, *, account_id: str, - file: object | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, + file: FileTypes | NotGiven = NOT_GIVEN, metadata: object | NotGiven = NOT_GIVEN, require_signed_urls: bool | NotGiven = NOT_GIVEN, url: str | NotGiven = NOT_GIVEN, @@ -119,6 +120,8 @@ def create( Args: account_id: Account identifier tag. + id: An optional custom unique identifier for your image. + file: An image binary data. Only needed when type is uploading a file. metadata: User modifiable key-value store. Can use used for keeping references to another @@ -139,21 +142,24 @@ def create( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + body = deepcopy_minimal( + { + "id": id, + "file": file, + "metadata": metadata, + "require_signed_urls": require_signed_urls, + "url": url, + } + ) + files = extract_files(cast(Mapping[str, object], body), paths=[["file"]]) # It should be noted that the actual Content-Type header that will be # sent to the server will contain a `boundary` parameter, e.g. # multipart/form-data; boundary=---abc-- extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._post( f"/accounts/{account_id}/images/v1", - body=maybe_transform( - { - "file": file, - "metadata": metadata, - "require_signed_urls": require_signed_urls, - "url": url, - }, - v1_create_params.V1CreateParams, - ), + body=maybe_transform(body, v1_create_params.V1CreateParams), + files=files, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -417,7 +423,8 @@ async def create( self, *, account_id: str, - file: object | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, + file: FileTypes | NotGiven = NOT_GIVEN, metadata: object | NotGiven = NOT_GIVEN, require_signed_urls: bool | NotGiven = NOT_GIVEN, url: str | NotGiven = NOT_GIVEN, @@ -436,6 +443,8 @@ async def create( Args: account_id: Account identifier tag. + id: An optional custom unique identifier for your image. + file: An image binary data. Only needed when type is uploading a file. metadata: User modifiable key-value store. Can use used for keeping references to another @@ -456,21 +465,24 @@ async def create( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + body = deepcopy_minimal( + { + "id": id, + "file": file, + "metadata": metadata, + "require_signed_urls": require_signed_urls, + "url": url, + } + ) + files = extract_files(cast(Mapping[str, object], body), paths=[["file"]]) # It should be noted that the actual Content-Type header that will be # sent to the server will contain a `boundary` parameter, e.g. # multipart/form-data; boundary=---abc-- extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._post( f"/accounts/{account_id}/images/v1", - body=await async_maybe_transform( - { - "file": file, - "metadata": metadata, - "require_signed_urls": require_signed_urls, - "url": url, - }, - v1_create_params.V1CreateParams, - ), + body=await async_maybe_transform(body, v1_create_params.V1CreateParams), + files=files, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/kv/namespaces/keys.py b/src/cloudflare/resources/kv/namespaces/keys.py index 6b5b71f0bb4..0b7d1e61b4d 100644 --- a/src/cloudflare/resources/kv/namespaces/keys.py +++ b/src/cloudflare/resources/kv/namespaces/keys.py @@ -69,7 +69,7 @@ def list( Lists a namespace's keys. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -78,11 +78,11 @@ def list( parameter. A valid value for the cursor can be obtained from the `cursors` object in the `result_info` structure. - limit: The number of keys to return. The cursor attribute may be used to iterate over - the next batch of keys if there are more than the limit. + limit: Limits the number of keys returned in the response. The cursor attribute may be + used to iterate over the next batch of keys if there are more than the limit. - prefix: A string prefix used to filter down which keys will be returned. Exact matches - and any key names that begin with the prefix will be returned. + prefix: Filters returned keys by a name prefix. Exact matches and any key names that + begin with the prefix will be returned. extra_headers: Send extra headers @@ -136,7 +136,7 @@ def bulk_delete( 10,000 keys to be removed. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -181,23 +181,22 @@ def bulk_get( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[KeyBulkGetResponse]: - """Get multiple KV pairs from the namespace. + """Retrieve up to 100 KV pairs from the namespace. - Body should contain keys to retrieve - at most 100. Keys must contain text-based values. If value is json, it can be - requested to return in JSON, instead of string. Metadata can be return if - withMetadata is true. + Keys must contain text-based + values. JSON values can optionally be parsed instead of being returned as a + string value. Metadata can be included if `withMetadata` is true. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. - keys: Array of keys to retrieve (maximum 100) + keys: Array of keys to retrieve (maximum of 100). - type: Whether to parse JSON values in the response + type: Whether to parse JSON values in the response. - with_metadata: Whether to include metadata in the response + with_metadata: Whether to include metadata in the response. extra_headers: Send extra headers @@ -260,7 +259,7 @@ def bulk_update( size must be 100 megabytes or less. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -329,7 +328,7 @@ def list( Lists a namespace's keys. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -338,11 +337,11 @@ def list( parameter. A valid value for the cursor can be obtained from the `cursors` object in the `result_info` structure. - limit: The number of keys to return. The cursor attribute may be used to iterate over - the next batch of keys if there are more than the limit. + limit: Limits the number of keys returned in the response. The cursor attribute may be + used to iterate over the next batch of keys if there are more than the limit. - prefix: A string prefix used to filter down which keys will be returned. Exact matches - and any key names that begin with the prefix will be returned. + prefix: Filters returned keys by a name prefix. Exact matches and any key names that + begin with the prefix will be returned. extra_headers: Send extra headers @@ -396,7 +395,7 @@ async def bulk_delete( 10,000 keys to be removed. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -441,23 +440,22 @@ async def bulk_get( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[KeyBulkGetResponse]: - """Get multiple KV pairs from the namespace. + """Retrieve up to 100 KV pairs from the namespace. - Body should contain keys to retrieve - at most 100. Keys must contain text-based values. If value is json, it can be - requested to return in JSON, instead of string. Metadata can be return if - withMetadata is true. + Keys must contain text-based + values. JSON values can optionally be parsed instead of being returned as a + string value. Metadata can be included if `withMetadata` is true. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. - keys: Array of keys to retrieve (maximum 100) + keys: Array of keys to retrieve (maximum of 100). - type: Whether to parse JSON values in the response + type: Whether to parse JSON values in the response. - with_metadata: Whether to include metadata in the response + with_metadata: Whether to include metadata in the response. extra_headers: Send extra headers @@ -520,7 +518,7 @@ async def bulk_update( size must be 100 megabytes or less. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. diff --git a/src/cloudflare/resources/kv/namespaces/metadata.py b/src/cloudflare/resources/kv/namespaces/metadata.py index fd5a0d2dad7..427734d81d1 100644 --- a/src/cloudflare/resources/kv/namespaces/metadata.py +++ b/src/cloudflare/resources/kv/namespaces/metadata.py @@ -17,7 +17,6 @@ ) from ...._wrappers import ResultWrapper from ...._base_client import make_request_options -from ....types.kv.namespaces.metadata_get_response import MetadataGetResponse __all__ = ["MetadataResource", "AsyncMetadataResource"] @@ -54,7 +53,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MetadataGetResponse]: + ) -> object: """Returns the metadata associated with the given key in the given namespace. Use @@ -62,7 +61,7 @@ def get( name. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -90,9 +89,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Optional[MetadataGetResponse]]._unwrapper, + post_parser=ResultWrapper[Optional[object]]._unwrapper, ), - cast_to=cast(Type[Optional[MetadataGetResponse]], ResultWrapper[MetadataGetResponse]), + cast_to=cast(Type[object], ResultWrapper[object]), ) @@ -128,7 +127,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MetadataGetResponse]: + ) -> object: """Returns the metadata associated with the given key in the given namespace. Use @@ -136,7 +135,7 @@ async def get( name. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -164,9 +163,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Optional[MetadataGetResponse]]._unwrapper, + post_parser=ResultWrapper[Optional[object]]._unwrapper, ), - cast_to=cast(Type[Optional[MetadataGetResponse]], ResultWrapper[MetadataGetResponse]), + cast_to=cast(Type[object], ResultWrapper[object]), ) diff --git a/src/cloudflare/resources/kv/namespaces/namespaces.py b/src/cloudflare/resources/kv/namespaces/namespaces.py index d033b2e28ab..d62c027d72b 100644 --- a/src/cloudflare/resources/kv/namespaces/namespaces.py +++ b/src/cloudflare/resources/kv/namespaces/namespaces.py @@ -111,7 +111,7 @@ def create( to be replaced. Args: - account_id: Identifier + account_id: Identifier. title: A human-readable string name for a Namespace. @@ -155,7 +155,7 @@ def update( Modifies a namespace's title. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -205,7 +205,7 @@ def list( Returns the namespaces owned by an account. Args: - account_id: Identifier + account_id: Identifier. direction: Direction to order namespaces. @@ -262,7 +262,7 @@ def delete( Deletes the namespace corresponding to the given ID. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -309,7 +309,7 @@ def bulk_delete( 10,000 keys to be removed. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -353,23 +353,22 @@ def bulk_get( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[NamespaceBulkGetResponse]: - """Get multiple KV pairs from the namespace. + """Retrieve up to 100 KV pairs from the namespace. - Body should contain keys to retrieve - at most 100. Keys must contain text-based values. If value is json, it can be - requested to return in JSON, instead of string. Metadata can be return if - withMetadata is true. + Keys must contain text-based + values. JSON values can optionally be parsed instead of being returned as a + string value. Metadata can be included if `withMetadata` is true. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. - keys: Array of keys to retrieve (maximum 100) + keys: Array of keys to retrieve (maximum of 100). - type: Whether to parse JSON values in the response + type: Whether to parse JSON values in the response. - with_metadata: Whether to include metadata in the response + with_metadata: Whether to include metadata in the response. extra_headers: Send extra headers @@ -431,7 +430,7 @@ def bulk_update( size must be 100 megabytes or less. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -476,7 +475,7 @@ def get( Get the namespace corresponding to the given ID. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -556,7 +555,7 @@ async def create( to be replaced. Args: - account_id: Identifier + account_id: Identifier. title: A human-readable string name for a Namespace. @@ -600,7 +599,7 @@ async def update( Modifies a namespace's title. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -650,7 +649,7 @@ def list( Returns the namespaces owned by an account. Args: - account_id: Identifier + account_id: Identifier. direction: Direction to order namespaces. @@ -707,7 +706,7 @@ async def delete( Deletes the namespace corresponding to the given ID. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -754,7 +753,7 @@ async def bulk_delete( 10,000 keys to be removed. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -798,23 +797,22 @@ async def bulk_get( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[NamespaceBulkGetResponse]: - """Get multiple KV pairs from the namespace. + """Retrieve up to 100 KV pairs from the namespace. - Body should contain keys to retrieve - at most 100. Keys must contain text-based values. If value is json, it can be - requested to return in JSON, instead of string. Metadata can be return if - withMetadata is true. + Keys must contain text-based + values. JSON values can optionally be parsed instead of being returned as a + string value. Metadata can be included if `withMetadata` is true. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. - keys: Array of keys to retrieve (maximum 100) + keys: Array of keys to retrieve (maximum of 100). - type: Whether to parse JSON values in the response + type: Whether to parse JSON values in the response. - with_metadata: Whether to include metadata in the response + with_metadata: Whether to include metadata in the response. extra_headers: Send extra headers @@ -876,7 +874,7 @@ async def bulk_update( size must be 100 megabytes or less. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -921,7 +919,7 @@ async def get( Get the namespace corresponding to the given ID. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. diff --git a/src/cloudflare/resources/kv/namespaces/values.py b/src/cloudflare/resources/kv/namespaces/values.py index 05e3e187510..34160c54f80 100644 --- a/src/cloudflare/resources/kv/namespaces/values.py +++ b/src/cloudflare/resources/kv/namespaces/values.py @@ -59,10 +59,10 @@ def update( *, account_id: str, namespace_id: str, - metadata: str, value: str, expiration: float | NotGiven = NOT_GIVEN, expiration_ttl: float | NotGiven = NOT_GIVEN, + metadata: object | 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, @@ -82,22 +82,19 @@ def update( `expiration` is ignored. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. key_name: A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL. - metadata: Arbitrary JSON to be associated with a key/value pair. - value: A byte sequence to be stored, up to 25 MiB in length. - expiration: The time, measured in number of seconds since the UNIX epoch, at which the key - should expire. + expiration: Expires the key at a certain time, measured in number of seconds since the UNIX + epoch. - expiration_ttl: The number of seconds for which the key should be visible before it expires. At - least 60. + expiration_ttl: Expires the key after a number of seconds. Must be at least 60. extra_headers: Send extra headers @@ -117,8 +114,8 @@ def update( f"/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}", body=maybe_transform( { - "metadata": metadata, "value": value, + "metadata": metadata, }, value_update_params.ValueUpdateParams, ), @@ -158,7 +155,7 @@ def delete( (for example, `:`, `!`, `%`) in the key name. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -213,7 +210,7 @@ def get( response header. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -270,10 +267,10 @@ async def update( *, account_id: str, namespace_id: str, - metadata: str, value: str, expiration: float | NotGiven = NOT_GIVEN, expiration_ttl: float | NotGiven = NOT_GIVEN, + metadata: object | 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, @@ -293,22 +290,19 @@ async def update( `expiration` is ignored. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. key_name: A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL. - metadata: Arbitrary JSON to be associated with a key/value pair. - value: A byte sequence to be stored, up to 25 MiB in length. - expiration: The time, measured in number of seconds since the UNIX epoch, at which the key - should expire. + expiration: Expires the key at a certain time, measured in number of seconds since the UNIX + epoch. - expiration_ttl: The number of seconds for which the key should be visible before it expires. At - least 60. + expiration_ttl: Expires the key after a number of seconds. Must be at least 60. extra_headers: Send extra headers @@ -328,8 +322,8 @@ async def update( f"/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}", body=await async_maybe_transform( { - "metadata": metadata, "value": value, + "metadata": metadata, }, value_update_params.ValueUpdateParams, ), @@ -369,7 +363,7 @@ async def delete( (for example, `:`, `!`, `%`) in the key name. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -424,7 +418,7 @@ async def get( response header. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. diff --git a/src/cloudflare/resources/logpush/jobs.py b/src/cloudflare/resources/logpush/jobs.py index fd6b3035775..213ab5db651 100644 --- a/src/cloudflare/resources/logpush/jobs.py +++ b/src/cloudflare/resources/logpush/jobs.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, Union, Optional, cast from typing_extensions import Literal import httpx @@ -86,11 +86,11 @@ def create( enabled: bool | NotGiven = NOT_GIVEN, filter: Optional[str] | NotGiven = NOT_GIVEN, frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, - kind: Literal["edge"] | NotGiven = NOT_GIVEN, + kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, - max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, - max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, - max_upload_records: Optional[int] | NotGiven = NOT_GIVEN, + max_upload_bytes: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_interval_seconds: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_records: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, ownership_challenge: str | NotGiven = NOT_GIVEN, @@ -128,8 +128,7 @@ def create( frequency to low sends logs in smaller quantities of larger files. kind: The kind parameter (optional) is used to differentiate between Logpush and Edge - Log Delivery jobs. Currently, Edge Log Delivery is only supported for the - `http_requests` dataset. + Log Delivery jobs (when supported by the dataset). logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from @@ -140,19 +139,17 @@ def create( max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch - size. This parameter is not available for jobs with `edge` as its kind. + size. max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in - shorter intervals than this. This parameter is only used for jobs with `edge` as - its kind. + shorter intervals than this. max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer - lines than this. This parameter is not available for jobs with `edge` as its - kind. + lines than this. name: Optional human readable job name. Not unique. Cloudflare suggests that you set this to a meaningful string, like the domain name, to make it easier to identify @@ -223,11 +220,11 @@ def update( enabled: bool | NotGiven = NOT_GIVEN, filter: Optional[str] | NotGiven = NOT_GIVEN, frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, - kind: Literal["edge"] | NotGiven = NOT_GIVEN, + kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, - max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, - max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, - max_upload_records: Optional[int] | NotGiven = NOT_GIVEN, + max_upload_bytes: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_interval_seconds: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_records: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, ownership_challenge: str | NotGiven = NOT_GIVEN, @@ -264,8 +261,7 @@ def update( frequency to low sends logs in smaller quantities of larger files. kind: The kind parameter (optional) is used to differentiate between Logpush and Edge - Log Delivery jobs. Currently, Edge Log Delivery is only supported for the - `http_requests` dataset. + Log Delivery jobs (when supported by the dataset). logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from @@ -276,19 +272,17 @@ def update( max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch - size. This parameter is not available for jobs with `edge` as its kind. + size. max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in - shorter intervals than this. This parameter is only used for jobs with `edge` as - its kind. + shorter intervals than this. max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer - lines than this. This parameter is not available for jobs with `edge` as its - kind. + lines than this. name: Optional human readable job name. Not unique. Cloudflare suggests that you set this to a meaningful string, like the domain name, to make it easier to identify @@ -566,11 +560,11 @@ async def create( enabled: bool | NotGiven = NOT_GIVEN, filter: Optional[str] | NotGiven = NOT_GIVEN, frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, - kind: Literal["edge"] | NotGiven = NOT_GIVEN, + kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, - max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, - max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, - max_upload_records: Optional[int] | NotGiven = NOT_GIVEN, + max_upload_bytes: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_interval_seconds: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_records: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, ownership_challenge: str | NotGiven = NOT_GIVEN, @@ -608,8 +602,7 @@ async def create( frequency to low sends logs in smaller quantities of larger files. kind: The kind parameter (optional) is used to differentiate between Logpush and Edge - Log Delivery jobs. Currently, Edge Log Delivery is only supported for the - `http_requests` dataset. + Log Delivery jobs (when supported by the dataset). logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from @@ -620,19 +613,17 @@ async def create( max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch - size. This parameter is not available for jobs with `edge` as its kind. + size. max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in - shorter intervals than this. This parameter is only used for jobs with `edge` as - its kind. + shorter intervals than this. max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer - lines than this. This parameter is not available for jobs with `edge` as its - kind. + lines than this. name: Optional human readable job name. Not unique. Cloudflare suggests that you set this to a meaningful string, like the domain name, to make it easier to identify @@ -703,11 +694,11 @@ async def update( enabled: bool | NotGiven = NOT_GIVEN, filter: Optional[str] | NotGiven = NOT_GIVEN, frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, - kind: Literal["edge"] | NotGiven = NOT_GIVEN, + kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, - max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, - max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, - max_upload_records: Optional[int] | NotGiven = NOT_GIVEN, + max_upload_bytes: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_interval_seconds: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_records: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, ownership_challenge: str | NotGiven = NOT_GIVEN, @@ -744,8 +735,7 @@ async def update( frequency to low sends logs in smaller quantities of larger files. kind: The kind parameter (optional) is used to differentiate between Logpush and Edge - Log Delivery jobs. Currently, Edge Log Delivery is only supported for the - `http_requests` dataset. + Log Delivery jobs (when supported by the dataset). logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from @@ -756,19 +746,17 @@ async def update( max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch - size. This parameter is not available for jobs with `edge` as its kind. + size. max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in - shorter intervals than this. This parameter is only used for jobs with `edge` as - its kind. + shorter intervals than this. max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer - lines than this. This parameter is not available for jobs with `edge` as its - kind. + lines than this. name: Optional human readable job name. Not unique. Cloudflare suggests that you set this to a meaningful string, like the domain name, to make it easier to identify diff --git a/src/cloudflare/resources/magic_transit/connectors/connectors.py b/src/cloudflare/resources/magic_transit/connectors/connectors.py index 0af23684c7b..c22d2084c31 100644 --- a/src/cloudflare/resources/magic_transit/connectors/connectors.py +++ b/src/cloudflare/resources/magic_transit/connectors/connectors.py @@ -35,10 +35,12 @@ SnapshotsResourceWithStreamingResponse, AsyncSnapshotsResourceWithStreamingResponse, ) -from ....types.magic_transit import connector_edit_params, connector_update_params +from ....types.magic_transit import connector_edit_params, connector_create_params, connector_update_params from ....types.magic_transit.connector_get_response import ConnectorGetResponse from ....types.magic_transit.connector_edit_response import ConnectorEditResponse from ....types.magic_transit.connector_list_response import ConnectorListResponse +from ....types.magic_transit.connector_create_response import ConnectorCreateResponse +from ....types.magic_transit.connector_delete_response import ConnectorDeleteResponse from ....types.magic_transit.connector_update_response import ConnectorUpdateResponse __all__ = ["ConnectorsResource", "AsyncConnectorsResource"] @@ -72,6 +74,62 @@ def with_streaming_response(self) -> ConnectorsResourceWithStreamingResponse: """ return ConnectorsResourceWithStreamingResponse(self) + def create( + self, + *, + account_id: str, + device: connector_create_params.Device, + activated: bool | NotGiven = NOT_GIVEN, + interrupt_window_duration_hours: float | NotGiven = NOT_GIVEN, + interrupt_window_hour_of_day: float | NotGiven = NOT_GIVEN, + notes: str | NotGiven = NOT_GIVEN, + timezone: 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, + ) -> ConnectorCreateResponse: + """ + Add a connector to your account + + Args: + account_id: Account 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._post( + f"/accounts/{account_id}/magic/connectors", + body=maybe_transform( + { + "device": device, + "activated": activated, + "interrupt_window_duration_hours": interrupt_window_duration_hours, + "interrupt_window_hour_of_day": interrupt_window_hour_of_day, + "notes": notes, + "timezone": timezone, + }, + connector_create_params.ConnectorCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ConnectorCreateResponse]._unwrapper, + ), + cast_to=cast(Type[ConnectorCreateResponse], ResultWrapper[ConnectorCreateResponse]), + ) + def update( self, connector_id: str, @@ -165,6 +223,48 @@ def list( model=ConnectorListResponse, ) + def delete( + self, + connector_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, + ) -> ConnectorDeleteResponse: + """ + Remove a connector from your account + + Args: + account_id: Account 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 connector_id: + raise ValueError(f"Expected a non-empty value for `connector_id` but received {connector_id!r}") + return self._delete( + f"/accounts/{account_id}/magic/connectors/{connector_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ConnectorDeleteResponse]._unwrapper, + ), + cast_to=cast(Type[ConnectorDeleteResponse], ResultWrapper[ConnectorDeleteResponse]), + ) + def edit( self, connector_id: str, @@ -183,7 +283,7 @@ def edit( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> ConnectorEditResponse: """ - Update Connector + Edit Connector to update specific properties Args: account_id: Account identifier @@ -293,6 +393,62 @@ def with_streaming_response(self) -> AsyncConnectorsResourceWithStreamingRespons """ return AsyncConnectorsResourceWithStreamingResponse(self) + async def create( + self, + *, + account_id: str, + device: connector_create_params.Device, + activated: bool | NotGiven = NOT_GIVEN, + interrupt_window_duration_hours: float | NotGiven = NOT_GIVEN, + interrupt_window_hour_of_day: float | NotGiven = NOT_GIVEN, + notes: str | NotGiven = NOT_GIVEN, + timezone: 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, + ) -> ConnectorCreateResponse: + """ + Add a connector to your account + + Args: + account_id: Account 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._post( + f"/accounts/{account_id}/magic/connectors", + body=await async_maybe_transform( + { + "device": device, + "activated": activated, + "interrupt_window_duration_hours": interrupt_window_duration_hours, + "interrupt_window_hour_of_day": interrupt_window_hour_of_day, + "notes": notes, + "timezone": timezone, + }, + connector_create_params.ConnectorCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ConnectorCreateResponse]._unwrapper, + ), + cast_to=cast(Type[ConnectorCreateResponse], ResultWrapper[ConnectorCreateResponse]), + ) + async def update( self, connector_id: str, @@ -386,6 +542,48 @@ def list( model=ConnectorListResponse, ) + async def delete( + self, + connector_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, + ) -> ConnectorDeleteResponse: + """ + Remove a connector from your account + + Args: + account_id: Account 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 connector_id: + raise ValueError(f"Expected a non-empty value for `connector_id` but received {connector_id!r}") + return await self._delete( + f"/accounts/{account_id}/magic/connectors/{connector_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ConnectorDeleteResponse]._unwrapper, + ), + cast_to=cast(Type[ConnectorDeleteResponse], ResultWrapper[ConnectorDeleteResponse]), + ) + async def edit( self, connector_id: str, @@ -404,7 +602,7 @@ async def edit( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> ConnectorEditResponse: """ - Update Connector + Edit Connector to update specific properties Args: account_id: Account identifier @@ -490,12 +688,18 @@ class ConnectorsResourceWithRawResponse: def __init__(self, connectors: ConnectorsResource) -> None: self._connectors = connectors + self.create = to_raw_response_wrapper( + connectors.create, + ) self.update = to_raw_response_wrapper( connectors.update, ) self.list = to_raw_response_wrapper( connectors.list, ) + self.delete = to_raw_response_wrapper( + connectors.delete, + ) self.edit = to_raw_response_wrapper( connectors.edit, ) @@ -516,12 +720,18 @@ class AsyncConnectorsResourceWithRawResponse: def __init__(self, connectors: AsyncConnectorsResource) -> None: self._connectors = connectors + self.create = async_to_raw_response_wrapper( + connectors.create, + ) self.update = async_to_raw_response_wrapper( connectors.update, ) self.list = async_to_raw_response_wrapper( connectors.list, ) + self.delete = async_to_raw_response_wrapper( + connectors.delete, + ) self.edit = async_to_raw_response_wrapper( connectors.edit, ) @@ -542,12 +752,18 @@ class ConnectorsResourceWithStreamingResponse: def __init__(self, connectors: ConnectorsResource) -> None: self._connectors = connectors + self.create = to_streamed_response_wrapper( + connectors.create, + ) self.update = to_streamed_response_wrapper( connectors.update, ) self.list = to_streamed_response_wrapper( connectors.list, ) + self.delete = to_streamed_response_wrapper( + connectors.delete, + ) self.edit = to_streamed_response_wrapper( connectors.edit, ) @@ -568,12 +784,18 @@ class AsyncConnectorsResourceWithStreamingResponse: def __init__(self, connectors: AsyncConnectorsResource) -> None: self._connectors = connectors + self.create = async_to_streamed_response_wrapper( + connectors.create, + ) self.update = async_to_streamed_response_wrapper( connectors.update, ) self.list = async_to_streamed_response_wrapper( connectors.list, ) + self.delete = async_to_streamed_response_wrapper( + connectors.delete, + ) self.edit = async_to_streamed_response_wrapper( connectors.edit, ) diff --git a/src/cloudflare/resources/radar/__init__.py b/src/cloudflare/resources/radar/__init__.py index 7be87145a2c..4b60e3b280e 100644 --- a/src/cloudflare/resources/radar/__init__.py +++ b/src/cloudflare/resources/radar/__init__.py @@ -24,6 +24,14 @@ DNSResourceWithStreamingResponse, AsyncDNSResourceWithStreamingResponse, ) +from .bots import ( + BotsResource, + AsyncBotsResource, + BotsResourceWithRawResponse, + AsyncBotsResourceWithRawResponse, + BotsResourceWithStreamingResponse, + AsyncBotsResourceWithStreamingResponse, +) from .http import ( HTTPResource, AsyncHTTPResource, @@ -180,6 +188,12 @@ "AsyncBGPResourceWithRawResponse", "BGPResourceWithStreamingResponse", "AsyncBGPResourceWithStreamingResponse", + "BotsResource", + "AsyncBotsResource", + "BotsResourceWithRawResponse", + "AsyncBotsResourceWithRawResponse", + "BotsResourceWithStreamingResponse", + "AsyncBotsResourceWithStreamingResponse", "DatasetsResource", "AsyncDatasetsResource", "DatasetsResourceWithRawResponse", diff --git a/src/cloudflare/resources/radar/bots/__init__.py b/src/cloudflare/resources/radar/bots/__init__.py new file mode 100644 index 00000000000..7d7fb66c90e --- /dev/null +++ b/src/cloudflare/resources/radar/bots/__init__.py @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from .bots import ( + BotsResource, + AsyncBotsResource, + BotsResourceWithRawResponse, + AsyncBotsResourceWithRawResponse, + BotsResourceWithStreamingResponse, + AsyncBotsResourceWithStreamingResponse, +) +from .web_crawlers import ( + WebCrawlersResource, + AsyncWebCrawlersResource, + WebCrawlersResourceWithRawResponse, + AsyncWebCrawlersResourceWithRawResponse, + WebCrawlersResourceWithStreamingResponse, + AsyncWebCrawlersResourceWithStreamingResponse, +) + +__all__ = [ + "WebCrawlersResource", + "AsyncWebCrawlersResource", + "WebCrawlersResourceWithRawResponse", + "AsyncWebCrawlersResourceWithRawResponse", + "WebCrawlersResourceWithStreamingResponse", + "AsyncWebCrawlersResourceWithStreamingResponse", + "BotsResource", + "AsyncBotsResource", + "BotsResourceWithRawResponse", + "AsyncBotsResourceWithRawResponse", + "BotsResourceWithStreamingResponse", + "AsyncBotsResourceWithStreamingResponse", +] diff --git a/src/cloudflare/resources/radar/bots/bots.py b/src/cloudflare/resources/radar/bots/bots.py new file mode 100644 index 00000000000..c20a17996aa --- /dev/null +++ b/src/cloudflare/resources/radar/bots/bots.py @@ -0,0 +1,1210 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Type, Union, cast +from datetime import datetime +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 .web_crawlers import ( + WebCrawlersResource, + AsyncWebCrawlersResource, + WebCrawlersResourceWithRawResponse, + AsyncWebCrawlersResourceWithRawResponse, + WebCrawlersResourceWithStreamingResponse, + AsyncWebCrawlersResourceWithStreamingResponse, +) +from ....types.radar import ( + bot_get_params, + bot_list_params, + bot_summary_params, + bot_timeseries_params, + bot_timeseries_groups_params, +) +from ...._base_client import make_request_options +from ....types.radar.bot_get_response import BotGetResponse +from ....types.radar.bot_list_response import BotListResponse +from ....types.radar.bot_summary_response import BotSummaryResponse +from ....types.radar.bot_timeseries_response import BotTimeseriesResponse +from ....types.radar.bot_timeseries_groups_response import BotTimeseriesGroupsResponse + +__all__ = ["BotsResource", "AsyncBotsResource"] + + +class BotsResource(SyncAPIResource): + @cached_property + def web_crawlers(self) -> WebCrawlersResource: + return WebCrawlersResource(self._client) + + @cached_property + def with_raw_response(self) -> BotsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + 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 BotsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> BotsResourceWithStreamingResponse: + """ + 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 BotsResourceWithStreamingResponse(self) + + def list( + self, + *, + bot_category: Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + | NotGiven = NOT_GIVEN, + bot_operator: str | NotGiven = NOT_GIVEN, + bot_verification_status: Literal["VERIFIED"] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + offset: int | 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, + ) -> BotListResponse: + """ + Retrieves a list of bots. + + Args: + bot_category: Filters results by bot category. + + bot_operator: Filters results by bot operator. + + bot_verification_status: Filters results by bot verification status. + + format: Format in which results will be returned. + + limit: Limits the number of objects returned in the response. + + offset: Skips the specified number of objects before fetching the results. + + 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 + """ + return self._get( + "/radar/bots", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "bot_category": bot_category, + "bot_operator": bot_operator, + "bot_verification_status": bot_verification_status, + "format": format, + "limit": limit, + "offset": offset, + }, + bot_list_params.BotListParams, + ), + post_parser=ResultWrapper[BotListResponse]._unwrapper, + ), + cast_to=cast(Type[BotListResponse], ResultWrapper[BotListResponse]), + ) + + def get( + self, + bot_slug: str, + *, + format: Literal["JSON", "CSV"] | 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, + ) -> BotGetResponse: + """ + Retrieves the requested bot information. + + Args: + bot_slug: Bot slug. + + format: Format in which results will be returned. + + 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 bot_slug: + raise ValueError(f"Expected a non-empty value for `bot_slug` but received {bot_slug!r}") + return self._get( + f"/radar/bots/{bot_slug}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform({"format": format}, bot_get_params.BotGetParams), + post_parser=ResultWrapper[BotGetResponse]._unwrapper, + ), + cast_to=cast(Type[BotGetResponse], ResultWrapper[BotGetResponse]), + ) + + def summary( + self, + dimension: Literal["BOT", "BOT_OPERATOR", "BOT_CATEGORY"], + *, + asn: List[str] | NotGiven = NOT_GIVEN, + bot: List[str] | NotGiven = NOT_GIVEN, + bot_category: List[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + ] + | NotGiven = NOT_GIVEN, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + bot_verification_status: List[Literal["VERIFIED"]] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[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, + ) -> BotSummaryResponse: + """ + Retrieves an aggregated summary of bots HTTP requests grouped by the specified + dimension. + + Args: + dimension: Specifies the attribute by which to group the results. + + asn: Filters results by Autonomous System. Specify one or more Autonomous System + Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from + results. For example, `-174, 3356` excludes results from AS174, but includes + results from AS3356. + + bot: Filters results by bot name. + + bot_category: Filters results by bot category. + + bot_operator: Filters results by bot operator. + + bot_verification_status: Filters results by bot verification status (Verified vs. Unverified). + + continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude continents from results. For example, `-EU,NA` + excludes results from EU, but includes results from NA. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + limit_per_group: Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + + location: Filters results by location. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude locations from results. For example, `-US,PT` + excludes results from the US, but includes results from PT. + + name: Array of names used to label the series in the response. + + 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 dimension: + raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}") + return self._get( + f"/radar/bots/summary/{dimension}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "asn": asn, + "bot": bot, + "bot_category": bot_category, + "bot_operator": bot_operator, + "bot_verification_status": bot_verification_status, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "limit_per_group": limit_per_group, + "location": location, + "name": name, + }, + bot_summary_params.BotSummaryParams, + ), + post_parser=ResultWrapper[BotSummaryResponse]._unwrapper, + ), + cast_to=cast(Type[BotSummaryResponse], ResultWrapper[BotSummaryResponse]), + ) + + def timeseries( + self, + *, + agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, + asn: List[str] | NotGiven = NOT_GIVEN, + bot: List[str] | NotGiven = NOT_GIVEN, + bot_category: List[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + ] + | NotGiven = NOT_GIVEN, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + bot_verification_status: List[Literal["VERIFIED"]] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[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, + ) -> BotTimeseriesResponse: + """ + Retrieves bots HTTP request volume over time. + + Args: + agg_interval: Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + + asn: Filters results by Autonomous System. Specify one or more Autonomous System + Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from + results. For example, `-174, 3356` excludes results from AS174, but includes + results from AS3356. + + bot: Filters results by bot name. + + bot_category: Filters results by bot category. + + bot_operator: Filters results by bot operator. + + bot_verification_status: Filters results by bot verification status (Verified vs. Unverified). + + continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude continents from results. For example, `-EU,NA` + excludes results from EU, but includes results from NA. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + location: Filters results by location. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude locations from results. For example, `-US,PT` + excludes results from the US, but includes results from PT. + + name: Array of names used to label the series in the response. + + 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 + """ + return self._get( + "/radar/bots/timeseries", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "agg_interval": agg_interval, + "asn": asn, + "bot": bot, + "bot_category": bot_category, + "bot_operator": bot_operator, + "bot_verification_status": bot_verification_status, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "location": location, + "name": name, + }, + bot_timeseries_params.BotTimeseriesParams, + ), + post_parser=ResultWrapper[BotTimeseriesResponse]._unwrapper, + ), + cast_to=cast(Type[BotTimeseriesResponse], ResultWrapper[BotTimeseriesResponse]), + ) + + def timeseries_groups( + self, + dimension: Literal["BOT", "BOT_OPERATOR", "BOT_CATEGORY"], + *, + agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, + asn: List[str] | NotGiven = NOT_GIVEN, + bot: List[str] | NotGiven = NOT_GIVEN, + bot_category: List[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + ] + | NotGiven = NOT_GIVEN, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + bot_verification_status: List[Literal["VERIFIED"]] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[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, + ) -> BotTimeseriesGroupsResponse: + """ + Retrieves the distribution of HTTP requests from bots, grouped by chosen the + specified dimension over time. + + Args: + dimension: Specifies the attribute by which to group the results. + + agg_interval: Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + + asn: Filters results by Autonomous System. Specify one or more Autonomous System + Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from + results. For example, `-174, 3356` excludes results from AS174, but includes + results from AS3356. + + bot: Filters results by bot name. + + bot_category: Filters results by bot category. + + bot_operator: Filters results by bot operator. + + bot_verification_status: Filters results by bot verification status (Verified vs. Unverified). + + continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude continents from results. For example, `-EU,NA` + excludes results from EU, but includes results from NA. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + limit_per_group: Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + + location: Filters results by location. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude locations from results. For example, `-US,PT` + excludes results from the US, but includes results from PT. + + name: Array of names used to label the series in the response. + + 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 dimension: + raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}") + return self._get( + f"/radar/bots/timeseries_groups/{dimension}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "agg_interval": agg_interval, + "asn": asn, + "bot": bot, + "bot_category": bot_category, + "bot_operator": bot_operator, + "bot_verification_status": bot_verification_status, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "limit_per_group": limit_per_group, + "location": location, + "name": name, + }, + bot_timeseries_groups_params.BotTimeseriesGroupsParams, + ), + post_parser=ResultWrapper[BotTimeseriesGroupsResponse]._unwrapper, + ), + cast_to=cast(Type[BotTimeseriesGroupsResponse], ResultWrapper[BotTimeseriesGroupsResponse]), + ) + + +class AsyncBotsResource(AsyncAPIResource): + @cached_property + def web_crawlers(self) -> AsyncWebCrawlersResource: + return AsyncWebCrawlersResource(self._client) + + @cached_property + def with_raw_response(self) -> AsyncBotsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + 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 AsyncBotsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncBotsResourceWithStreamingResponse: + """ + 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 AsyncBotsResourceWithStreamingResponse(self) + + async def list( + self, + *, + bot_category: Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + | NotGiven = NOT_GIVEN, + bot_operator: str | NotGiven = NOT_GIVEN, + bot_verification_status: Literal["VERIFIED"] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + offset: int | 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, + ) -> BotListResponse: + """ + Retrieves a list of bots. + + Args: + bot_category: Filters results by bot category. + + bot_operator: Filters results by bot operator. + + bot_verification_status: Filters results by bot verification status. + + format: Format in which results will be returned. + + limit: Limits the number of objects returned in the response. + + offset: Skips the specified number of objects before fetching the results. + + 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 + """ + return await self._get( + "/radar/bots", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "bot_category": bot_category, + "bot_operator": bot_operator, + "bot_verification_status": bot_verification_status, + "format": format, + "limit": limit, + "offset": offset, + }, + bot_list_params.BotListParams, + ), + post_parser=ResultWrapper[BotListResponse]._unwrapper, + ), + cast_to=cast(Type[BotListResponse], ResultWrapper[BotListResponse]), + ) + + async def get( + self, + bot_slug: str, + *, + format: Literal["JSON", "CSV"] | 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, + ) -> BotGetResponse: + """ + Retrieves the requested bot information. + + Args: + bot_slug: Bot slug. + + format: Format in which results will be returned. + + 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 bot_slug: + raise ValueError(f"Expected a non-empty value for `bot_slug` but received {bot_slug!r}") + return await self._get( + f"/radar/bots/{bot_slug}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform({"format": format}, bot_get_params.BotGetParams), + post_parser=ResultWrapper[BotGetResponse]._unwrapper, + ), + cast_to=cast(Type[BotGetResponse], ResultWrapper[BotGetResponse]), + ) + + async def summary( + self, + dimension: Literal["BOT", "BOT_OPERATOR", "BOT_CATEGORY"], + *, + asn: List[str] | NotGiven = NOT_GIVEN, + bot: List[str] | NotGiven = NOT_GIVEN, + bot_category: List[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + ] + | NotGiven = NOT_GIVEN, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + bot_verification_status: List[Literal["VERIFIED"]] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[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, + ) -> BotSummaryResponse: + """ + Retrieves an aggregated summary of bots HTTP requests grouped by the specified + dimension. + + Args: + dimension: Specifies the attribute by which to group the results. + + asn: Filters results by Autonomous System. Specify one or more Autonomous System + Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from + results. For example, `-174, 3356` excludes results from AS174, but includes + results from AS3356. + + bot: Filters results by bot name. + + bot_category: Filters results by bot category. + + bot_operator: Filters results by bot operator. + + bot_verification_status: Filters results by bot verification status (Verified vs. Unverified). + + continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude continents from results. For example, `-EU,NA` + excludes results from EU, but includes results from NA. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + limit_per_group: Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + + location: Filters results by location. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude locations from results. For example, `-US,PT` + excludes results from the US, but includes results from PT. + + name: Array of names used to label the series in the response. + + 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 dimension: + raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}") + return await self._get( + f"/radar/bots/summary/{dimension}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "asn": asn, + "bot": bot, + "bot_category": bot_category, + "bot_operator": bot_operator, + "bot_verification_status": bot_verification_status, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "limit_per_group": limit_per_group, + "location": location, + "name": name, + }, + bot_summary_params.BotSummaryParams, + ), + post_parser=ResultWrapper[BotSummaryResponse]._unwrapper, + ), + cast_to=cast(Type[BotSummaryResponse], ResultWrapper[BotSummaryResponse]), + ) + + async def timeseries( + self, + *, + agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, + asn: List[str] | NotGiven = NOT_GIVEN, + bot: List[str] | NotGiven = NOT_GIVEN, + bot_category: List[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + ] + | NotGiven = NOT_GIVEN, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + bot_verification_status: List[Literal["VERIFIED"]] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[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, + ) -> BotTimeseriesResponse: + """ + Retrieves bots HTTP request volume over time. + + Args: + agg_interval: Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + + asn: Filters results by Autonomous System. Specify one or more Autonomous System + Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from + results. For example, `-174, 3356` excludes results from AS174, but includes + results from AS3356. + + bot: Filters results by bot name. + + bot_category: Filters results by bot category. + + bot_operator: Filters results by bot operator. + + bot_verification_status: Filters results by bot verification status (Verified vs. Unverified). + + continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude continents from results. For example, `-EU,NA` + excludes results from EU, but includes results from NA. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + location: Filters results by location. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude locations from results. For example, `-US,PT` + excludes results from the US, but includes results from PT. + + name: Array of names used to label the series in the response. + + 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 + """ + return await self._get( + "/radar/bots/timeseries", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "agg_interval": agg_interval, + "asn": asn, + "bot": bot, + "bot_category": bot_category, + "bot_operator": bot_operator, + "bot_verification_status": bot_verification_status, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "location": location, + "name": name, + }, + bot_timeseries_params.BotTimeseriesParams, + ), + post_parser=ResultWrapper[BotTimeseriesResponse]._unwrapper, + ), + cast_to=cast(Type[BotTimeseriesResponse], ResultWrapper[BotTimeseriesResponse]), + ) + + async def timeseries_groups( + self, + dimension: Literal["BOT", "BOT_OPERATOR", "BOT_CATEGORY"], + *, + agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, + asn: List[str] | NotGiven = NOT_GIVEN, + bot: List[str] | NotGiven = NOT_GIVEN, + bot_category: List[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + ] + | NotGiven = NOT_GIVEN, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + bot_verification_status: List[Literal["VERIFIED"]] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[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, + ) -> BotTimeseriesGroupsResponse: + """ + Retrieves the distribution of HTTP requests from bots, grouped by chosen the + specified dimension over time. + + Args: + dimension: Specifies the attribute by which to group the results. + + agg_interval: Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + + asn: Filters results by Autonomous System. Specify one or more Autonomous System + Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from + results. For example, `-174, 3356` excludes results from AS174, but includes + results from AS3356. + + bot: Filters results by bot name. + + bot_category: Filters results by bot category. + + bot_operator: Filters results by bot operator. + + bot_verification_status: Filters results by bot verification status (Verified vs. Unverified). + + continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude continents from results. For example, `-EU,NA` + excludes results from EU, but includes results from NA. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + limit_per_group: Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + + location: Filters results by location. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude locations from results. For example, `-US,PT` + excludes results from the US, but includes results from PT. + + name: Array of names used to label the series in the response. + + 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 dimension: + raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}") + return await self._get( + f"/radar/bots/timeseries_groups/{dimension}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "agg_interval": agg_interval, + "asn": asn, + "bot": bot, + "bot_category": bot_category, + "bot_operator": bot_operator, + "bot_verification_status": bot_verification_status, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "limit_per_group": limit_per_group, + "location": location, + "name": name, + }, + bot_timeseries_groups_params.BotTimeseriesGroupsParams, + ), + post_parser=ResultWrapper[BotTimeseriesGroupsResponse]._unwrapper, + ), + cast_to=cast(Type[BotTimeseriesGroupsResponse], ResultWrapper[BotTimeseriesGroupsResponse]), + ) + + +class BotsResourceWithRawResponse: + def __init__(self, bots: BotsResource) -> None: + self._bots = bots + + self.list = to_raw_response_wrapper( + bots.list, + ) + self.get = to_raw_response_wrapper( + bots.get, + ) + self.summary = to_raw_response_wrapper( + bots.summary, + ) + self.timeseries = to_raw_response_wrapper( + bots.timeseries, + ) + self.timeseries_groups = to_raw_response_wrapper( + bots.timeseries_groups, + ) + + @cached_property + def web_crawlers(self) -> WebCrawlersResourceWithRawResponse: + return WebCrawlersResourceWithRawResponse(self._bots.web_crawlers) + + +class AsyncBotsResourceWithRawResponse: + def __init__(self, bots: AsyncBotsResource) -> None: + self._bots = bots + + self.list = async_to_raw_response_wrapper( + bots.list, + ) + self.get = async_to_raw_response_wrapper( + bots.get, + ) + self.summary = async_to_raw_response_wrapper( + bots.summary, + ) + self.timeseries = async_to_raw_response_wrapper( + bots.timeseries, + ) + self.timeseries_groups = async_to_raw_response_wrapper( + bots.timeseries_groups, + ) + + @cached_property + def web_crawlers(self) -> AsyncWebCrawlersResourceWithRawResponse: + return AsyncWebCrawlersResourceWithRawResponse(self._bots.web_crawlers) + + +class BotsResourceWithStreamingResponse: + def __init__(self, bots: BotsResource) -> None: + self._bots = bots + + self.list = to_streamed_response_wrapper( + bots.list, + ) + self.get = to_streamed_response_wrapper( + bots.get, + ) + self.summary = to_streamed_response_wrapper( + bots.summary, + ) + self.timeseries = to_streamed_response_wrapper( + bots.timeseries, + ) + self.timeseries_groups = to_streamed_response_wrapper( + bots.timeseries_groups, + ) + + @cached_property + def web_crawlers(self) -> WebCrawlersResourceWithStreamingResponse: + return WebCrawlersResourceWithStreamingResponse(self._bots.web_crawlers) + + +class AsyncBotsResourceWithStreamingResponse: + def __init__(self, bots: AsyncBotsResource) -> None: + self._bots = bots + + self.list = async_to_streamed_response_wrapper( + bots.list, + ) + self.get = async_to_streamed_response_wrapper( + bots.get, + ) + self.summary = async_to_streamed_response_wrapper( + bots.summary, + ) + self.timeseries = async_to_streamed_response_wrapper( + bots.timeseries, + ) + self.timeseries_groups = async_to_streamed_response_wrapper( + bots.timeseries_groups, + ) + + @cached_property + def web_crawlers(self) -> AsyncWebCrawlersResourceWithStreamingResponse: + return AsyncWebCrawlersResourceWithStreamingResponse(self._bots.web_crawlers) diff --git a/src/cloudflare/resources/radar/bots/web_crawlers.py b/src/cloudflare/resources/radar/bots/web_crawlers.py new file mode 100644 index 00000000000..4537233e160 --- /dev/null +++ b/src/cloudflare/resources/radar/bots/web_crawlers.py @@ -0,0 +1,437 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Type, Union, cast +from datetime import datetime +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.radar.bots import web_crawler_summary_params, web_crawler_timeseries_groups_params +from ....types.radar.bots.web_crawler_summary_response import WebCrawlerSummaryResponse +from ....types.radar.bots.web_crawler_timeseries_groups_response import WebCrawlerTimeseriesGroupsResponse + +__all__ = ["WebCrawlersResource", "AsyncWebCrawlersResource"] + + +class WebCrawlersResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> WebCrawlersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + 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 WebCrawlersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> WebCrawlersResourceWithStreamingResponse: + """ + 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 WebCrawlersResourceWithStreamingResponse(self) + + def summary( + self, + dimension: Literal["USER_AGENT", "REFERER", "CRAWL_REFER_RATIO"], + *, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, + name: List[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, + ) -> WebCrawlerSummaryResponse: + """ + Retrieves an aggregated summary of HTTP requests from crawlers, grouped by the + specified dimension. + + Args: + dimension: Specifies the attribute by which to group the results. + + bot_operator: Filters results by bot operator. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + limit_per_group: Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + + name: Array of names used to label the series in the response. + + 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 dimension: + raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}") + return self._get( + f"/radar/bots/crawlers/summary/{dimension}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "bot_operator": bot_operator, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "limit_per_group": limit_per_group, + "name": name, + }, + web_crawler_summary_params.WebCrawlerSummaryParams, + ), + post_parser=ResultWrapper[WebCrawlerSummaryResponse]._unwrapper, + ), + cast_to=cast(Type[WebCrawlerSummaryResponse], ResultWrapper[WebCrawlerSummaryResponse]), + ) + + def timeseries_groups( + self, + dimension: Literal["USER_AGENT", "REFERER", "CRAWL_REFER_RATIO"], + *, + agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, + name: List[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, + ) -> WebCrawlerTimeseriesGroupsResponse: + """ + Retrieves the distribution of HTTP requests from crawlers, grouped by chosen the + specified dimension over time. + + Args: + dimension: Specifies the attribute by which to group the results. + + agg_interval: Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + + bot_operator: Filters results by bot operator. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + limit_per_group: Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + + name: Array of names used to label the series in the response. + + 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 dimension: + raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}") + return self._get( + f"/radar/bots/crawlers/timeseries_groups/{dimension}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "agg_interval": agg_interval, + "bot_operator": bot_operator, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "limit_per_group": limit_per_group, + "name": name, + }, + web_crawler_timeseries_groups_params.WebCrawlerTimeseriesGroupsParams, + ), + post_parser=ResultWrapper[WebCrawlerTimeseriesGroupsResponse]._unwrapper, + ), + cast_to=cast(Type[WebCrawlerTimeseriesGroupsResponse], ResultWrapper[WebCrawlerTimeseriesGroupsResponse]), + ) + + +class AsyncWebCrawlersResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncWebCrawlersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + 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 AsyncWebCrawlersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncWebCrawlersResourceWithStreamingResponse: + """ + 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 AsyncWebCrawlersResourceWithStreamingResponse(self) + + async def summary( + self, + dimension: Literal["USER_AGENT", "REFERER", "CRAWL_REFER_RATIO"], + *, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, + name: List[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, + ) -> WebCrawlerSummaryResponse: + """ + Retrieves an aggregated summary of HTTP requests from crawlers, grouped by the + specified dimension. + + Args: + dimension: Specifies the attribute by which to group the results. + + bot_operator: Filters results by bot operator. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + limit_per_group: Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + + name: Array of names used to label the series in the response. + + 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 dimension: + raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}") + return await self._get( + f"/radar/bots/crawlers/summary/{dimension}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "bot_operator": bot_operator, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "limit_per_group": limit_per_group, + "name": name, + }, + web_crawler_summary_params.WebCrawlerSummaryParams, + ), + post_parser=ResultWrapper[WebCrawlerSummaryResponse]._unwrapper, + ), + cast_to=cast(Type[WebCrawlerSummaryResponse], ResultWrapper[WebCrawlerSummaryResponse]), + ) + + async def timeseries_groups( + self, + dimension: Literal["USER_AGENT", "REFERER", "CRAWL_REFER_RATIO"], + *, + agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, + name: List[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, + ) -> WebCrawlerTimeseriesGroupsResponse: + """ + Retrieves the distribution of HTTP requests from crawlers, grouped by chosen the + specified dimension over time. + + Args: + dimension: Specifies the attribute by which to group the results. + + agg_interval: Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + + bot_operator: Filters results by bot operator. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + limit_per_group: Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + + name: Array of names used to label the series in the response. + + 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 dimension: + raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}") + return await self._get( + f"/radar/bots/crawlers/timeseries_groups/{dimension}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "agg_interval": agg_interval, + "bot_operator": bot_operator, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "limit_per_group": limit_per_group, + "name": name, + }, + web_crawler_timeseries_groups_params.WebCrawlerTimeseriesGroupsParams, + ), + post_parser=ResultWrapper[WebCrawlerTimeseriesGroupsResponse]._unwrapper, + ), + cast_to=cast(Type[WebCrawlerTimeseriesGroupsResponse], ResultWrapper[WebCrawlerTimeseriesGroupsResponse]), + ) + + +class WebCrawlersResourceWithRawResponse: + def __init__(self, web_crawlers: WebCrawlersResource) -> None: + self._web_crawlers = web_crawlers + + self.summary = to_raw_response_wrapper( + web_crawlers.summary, + ) + self.timeseries_groups = to_raw_response_wrapper( + web_crawlers.timeseries_groups, + ) + + +class AsyncWebCrawlersResourceWithRawResponse: + def __init__(self, web_crawlers: AsyncWebCrawlersResource) -> None: + self._web_crawlers = web_crawlers + + self.summary = async_to_raw_response_wrapper( + web_crawlers.summary, + ) + self.timeseries_groups = async_to_raw_response_wrapper( + web_crawlers.timeseries_groups, + ) + + +class WebCrawlersResourceWithStreamingResponse: + def __init__(self, web_crawlers: WebCrawlersResource) -> None: + self._web_crawlers = web_crawlers + + self.summary = to_streamed_response_wrapper( + web_crawlers.summary, + ) + self.timeseries_groups = to_streamed_response_wrapper( + web_crawlers.timeseries_groups, + ) + + +class AsyncWebCrawlersResourceWithStreamingResponse: + def __init__(self, web_crawlers: AsyncWebCrawlersResource) -> None: + self._web_crawlers = web_crawlers + + self.summary = async_to_streamed_response_wrapper( + web_crawlers.summary, + ) + self.timeseries_groups = async_to_streamed_response_wrapper( + web_crawlers.timeseries_groups, + ) diff --git a/src/cloudflare/resources/radar/radar.py b/src/cloudflare/resources/radar/radar.py index 7242f18dd38..b0bc2fafe7e 100644 --- a/src/cloudflare/resources/radar/radar.py +++ b/src/cloudflare/resources/radar/radar.py @@ -43,6 +43,14 @@ AsyncDatasetsResourceWithStreamingResponse, ) from ..._compat import cached_property +from .bots.bots import ( + BotsResource, + AsyncBotsResource, + BotsResourceWithRawResponse, + AsyncBotsResourceWithRawResponse, + BotsResourceWithStreamingResponse, + AsyncBotsResourceWithStreamingResponse, +) from .http.http import ( HTTPResource, AsyncHTTPResource, @@ -173,6 +181,10 @@ def annotations(self) -> AnnotationsResource: def bgp(self) -> BGPResource: return BGPResource(self._client) + @cached_property + def bots(self) -> BotsResource: + return BotsResource(self._client) + @cached_property def datasets(self) -> DatasetsResource: return DatasetsResource(self._client) @@ -270,6 +282,10 @@ def annotations(self) -> AsyncAnnotationsResource: def bgp(self) -> AsyncBGPResource: return AsyncBGPResource(self._client) + @cached_property + def bots(self) -> AsyncBotsResource: + return AsyncBotsResource(self._client) + @cached_property def datasets(self) -> AsyncDatasetsResource: return AsyncDatasetsResource(self._client) @@ -370,6 +386,10 @@ def annotations(self) -> AnnotationsResourceWithRawResponse: def bgp(self) -> BGPResourceWithRawResponse: return BGPResourceWithRawResponse(self._radar.bgp) + @cached_property + def bots(self) -> BotsResourceWithRawResponse: + return BotsResourceWithRawResponse(self._radar.bots) + @cached_property def datasets(self) -> DatasetsResourceWithRawResponse: return DatasetsResourceWithRawResponse(self._radar.datasets) @@ -451,6 +471,10 @@ def annotations(self) -> AsyncAnnotationsResourceWithRawResponse: def bgp(self) -> AsyncBGPResourceWithRawResponse: return AsyncBGPResourceWithRawResponse(self._radar.bgp) + @cached_property + def bots(self) -> AsyncBotsResourceWithRawResponse: + return AsyncBotsResourceWithRawResponse(self._radar.bots) + @cached_property def datasets(self) -> AsyncDatasetsResourceWithRawResponse: return AsyncDatasetsResourceWithRawResponse(self._radar.datasets) @@ -532,6 +556,10 @@ def annotations(self) -> AnnotationsResourceWithStreamingResponse: def bgp(self) -> BGPResourceWithStreamingResponse: return BGPResourceWithStreamingResponse(self._radar.bgp) + @cached_property + def bots(self) -> BotsResourceWithStreamingResponse: + return BotsResourceWithStreamingResponse(self._radar.bots) + @cached_property def datasets(self) -> DatasetsResourceWithStreamingResponse: return DatasetsResourceWithStreamingResponse(self._radar.datasets) @@ -613,6 +641,10 @@ def annotations(self) -> AsyncAnnotationsResourceWithStreamingResponse: def bgp(self) -> AsyncBGPResourceWithStreamingResponse: return AsyncBGPResourceWithStreamingResponse(self._radar.bgp) + @cached_property + def bots(self) -> AsyncBotsResourceWithStreamingResponse: + return AsyncBotsResourceWithStreamingResponse(self._radar.bots) + @cached_property def datasets(self) -> AsyncDatasetsResourceWithStreamingResponse: return AsyncDatasetsResourceWithStreamingResponse(self._radar.datasets) diff --git a/src/cloudflare/resources/radar/search.py b/src/cloudflare/resources/radar/search.py index a1e32a7d272..629f5ad0215 100644 --- a/src/cloudflare/resources/radar/search.py +++ b/src/cloudflare/resources/radar/search.py @@ -49,9 +49,9 @@ def global_( self, *, query: str, - exclude: List[Literal["ASNS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, + exclude: List[Literal["ASNS", "BOTS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, - include: List[Literal["ASNS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, + include: List[Literal["ASNS", "BOTS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, limit_per_group: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -62,7 +62,7 @@ def global_( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SearchGlobalResponse: """ - Searches for locations, autonomous systems, and reports. + Searches for locations, autonomous systems, reports, and bots. Args: query: Search for locations, autonomous systems and reports. @@ -133,9 +133,9 @@ async def global_( self, *, query: str, - exclude: List[Literal["ASNS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, + exclude: List[Literal["ASNS", "BOTS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, - include: List[Literal["ASNS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, + include: List[Literal["ASNS", "BOTS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, limit_per_group: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -146,7 +146,7 @@ async def global_( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SearchGlobalResponse: """ - Searches for locations, autonomous systems, and reports. + Searches for locations, autonomous systems, reports, and bots. Args: query: Search for locations, autonomous systems and reports. diff --git a/src/cloudflare/resources/radar/verified_bots/top.py b/src/cloudflare/resources/radar/verified_bots/top.py index 1a56c1d62c9..a9363226ced 100644 --- a/src/cloudflare/resources/radar/verified_bots/top.py +++ b/src/cloudflare/resources/radar/verified_bots/top.py @@ -2,6 +2,7 @@ from __future__ import annotations +import typing_extensions from typing import List, Type, Union, cast from datetime import datetime from typing_extensions import Literal @@ -47,6 +48,9 @@ def with_streaming_response(self) -> TopResourceWithStreamingResponse: """ return TopResourceWithStreamingResponse(self) + @typing_extensions.deprecated( + "Use [Radar Bots API](https://developers.cloudflare.com/api/resources/radar/subresources/bots/) instead." + ) def bots( self, *, @@ -131,6 +135,9 @@ def bots( cast_to=cast(Type[TopBotsResponse], ResultWrapper[TopBotsResponse]), ) + @typing_extensions.deprecated( + "Use [Radar Bots API](https://developers.cloudflare.com/api/resources/radar/subresources/bots/) instead." + ) def categories( self, *, @@ -237,6 +244,9 @@ def with_streaming_response(self) -> AsyncTopResourceWithStreamingResponse: """ return AsyncTopResourceWithStreamingResponse(self) + @typing_extensions.deprecated( + "Use [Radar Bots API](https://developers.cloudflare.com/api/resources/radar/subresources/bots/) instead." + ) async def bots( self, *, @@ -321,6 +331,9 @@ async def bots( cast_to=cast(Type[TopBotsResponse], ResultWrapper[TopBotsResponse]), ) + @typing_extensions.deprecated( + "Use [Radar Bots API](https://developers.cloudflare.com/api/resources/radar/subresources/bots/) instead." + ) async def categories( self, *, @@ -411,11 +424,15 @@ class TopResourceWithRawResponse: def __init__(self, top: TopResource) -> None: self._top = top - self.bots = to_raw_response_wrapper( - top.bots, + self.bots = ( # pyright: ignore[reportDeprecated] + to_raw_response_wrapper( + top.bots # pyright: ignore[reportDeprecated], + ) ) - self.categories = to_raw_response_wrapper( - top.categories, + self.categories = ( # pyright: ignore[reportDeprecated] + to_raw_response_wrapper( + top.categories # pyright: ignore[reportDeprecated], + ) ) @@ -423,11 +440,15 @@ class AsyncTopResourceWithRawResponse: def __init__(self, top: AsyncTopResource) -> None: self._top = top - self.bots = async_to_raw_response_wrapper( - top.bots, + self.bots = ( # pyright: ignore[reportDeprecated] + async_to_raw_response_wrapper( + top.bots # pyright: ignore[reportDeprecated], + ) ) - self.categories = async_to_raw_response_wrapper( - top.categories, + self.categories = ( # pyright: ignore[reportDeprecated] + async_to_raw_response_wrapper( + top.categories # pyright: ignore[reportDeprecated], + ) ) @@ -435,11 +456,15 @@ class TopResourceWithStreamingResponse: def __init__(self, top: TopResource) -> None: self._top = top - self.bots = to_streamed_response_wrapper( - top.bots, + self.bots = ( # pyright: ignore[reportDeprecated] + to_streamed_response_wrapper( + top.bots # pyright: ignore[reportDeprecated], + ) ) - self.categories = to_streamed_response_wrapper( - top.categories, + self.categories = ( # pyright: ignore[reportDeprecated] + to_streamed_response_wrapper( + top.categories # pyright: ignore[reportDeprecated], + ) ) @@ -447,9 +472,13 @@ class AsyncTopResourceWithStreamingResponse: def __init__(self, top: AsyncTopResource) -> None: self._top = top - self.bots = async_to_streamed_response_wrapper( - top.bots, + self.bots = ( # pyright: ignore[reportDeprecated] + async_to_streamed_response_wrapper( + top.bots # pyright: ignore[reportDeprecated], + ) ) - self.categories = async_to_streamed_response_wrapper( - top.categories, + self.categories = ( # pyright: ignore[reportDeprecated] + async_to_streamed_response_wrapper( + top.categories # pyright: ignore[reportDeprecated], + ) ) diff --git a/src/cloudflare/resources/user/tokens/tokens.py b/src/cloudflare/resources/user/tokens/tokens.py index a3a10f41216..aeeb5b0c05d 100644 --- a/src/cloudflare/resources/user/tokens/tokens.py +++ b/src/cloudflare/resources/user/tokens/tokens.py @@ -139,10 +139,10 @@ def update( *, name: str, policies: Iterable[TokenPolicy], - status: Literal["active", "disabled", "expired"], condition: token_update_params.Condition | NotGiven = NOT_GIVEN, expires_on: Union[str, datetime] | NotGiven = NOT_GIVEN, not_before: Union[str, datetime] | NotGiven = NOT_GIVEN, + status: Literal["active", "disabled", "expired"] | 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, @@ -160,13 +160,13 @@ def update( policies: List of access policies assigned to the token. - status: Status of the token. - expires_on: The expiration time on or after which the JWT MUST NOT be accepted for processing. not_before: The time before which the token MUST NOT be accepted for processing. + status: Status of the token. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -183,10 +183,10 @@ def update( { "name": name, "policies": policies, - "status": status, "condition": condition, "expires_on": expires_on, "not_before": not_before, + "status": status, }, token_update_params.TokenUpdateParams, ), @@ -445,10 +445,10 @@ async def update( *, name: str, policies: Iterable[TokenPolicy], - status: Literal["active", "disabled", "expired"], condition: token_update_params.Condition | NotGiven = NOT_GIVEN, expires_on: Union[str, datetime] | NotGiven = NOT_GIVEN, not_before: Union[str, datetime] | NotGiven = NOT_GIVEN, + status: Literal["active", "disabled", "expired"] | 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, @@ -466,13 +466,13 @@ async def update( policies: List of access policies assigned to the token. - status: Status of the token. - expires_on: The expiration time on or after which the JWT MUST NOT be accepted for processing. not_before: The time before which the token MUST NOT be accepted for processing. + status: Status of the token. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -489,10 +489,10 @@ async def update( { "name": name, "policies": policies, - "status": status, "condition": condition, "expires_on": expires_on, "not_before": not_before, + "status": status, }, token_update_params.TokenUpdateParams, ), diff --git a/src/cloudflare/resources/zero_trust/devices/dex_tests.py b/src/cloudflare/resources/zero_trust/devices/dex_tests.py index 241e238dee1..aaf02a38266 100644 --- a/src/cloudflare/resources/zero_trust/devices/dex_tests.py +++ b/src/cloudflare/resources/zero_trust/devices/dex_tests.py @@ -204,7 +204,7 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncSinglePage[DEXTestListResponse]: """ - Fetch all DEX tests. + Fetch all DEX tests Args: extra_headers: Send extra headers @@ -488,7 +488,7 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[DEXTestListResponse, AsyncSinglePage[DEXTestListResponse]]: """ - Fetch all DEX tests. + Fetch all DEX tests Args: extra_headers: Send extra headers diff --git a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py index 62967f56cd0..7a1399e388c 100644 --- a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py +++ b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py @@ -30,7 +30,6 @@ from ....._base_client import AsyncPaginator, make_request_options from .....types.zero_trust.gateway import list_edit_params, list_list_params, list_create_params, list_update_params from .....types.zero_trust.gateway.gateway_list import GatewayList -from .....types.zero_trust.gateway.gateway_item_param import GatewayItemParam from .....types.zero_trust.gateway.list_create_response import ListCreateResponse __all__ = ["ListsResource", "AsyncListsResource"] @@ -67,7 +66,7 @@ def create( name: str, type: Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"], description: str | NotGiven = NOT_GIVEN, - items: Iterable[GatewayItemParam] | NotGiven = NOT_GIVEN, + items: Iterable[list_create_params.Item] | 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, @@ -85,7 +84,7 @@ def create( description: The description of the list. - items: The items in the list. + items: items to add to the list. extra_headers: Send extra headers @@ -125,7 +124,7 @@ def update( account_id: str, name: str, description: str | NotGiven = NOT_GIVEN, - items: Iterable[GatewayItemParam] | NotGiven = NOT_GIVEN, + items: Iterable[list_update_params.Item] | 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, @@ -145,7 +144,7 @@ def update( description: The description of the list. - items: The items in the list. + items: items to add to the list. extra_headers: Send extra headers @@ -391,7 +390,7 @@ async def create( name: str, type: Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"], description: str | NotGiven = NOT_GIVEN, - items: Iterable[GatewayItemParam] | NotGiven = NOT_GIVEN, + items: Iterable[list_create_params.Item] | 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, @@ -409,7 +408,7 @@ async def create( description: The description of the list. - items: The items in the list. + items: items to add to the list. extra_headers: Send extra headers @@ -449,7 +448,7 @@ async def update( account_id: str, name: str, description: str | NotGiven = NOT_GIVEN, - items: Iterable[GatewayItemParam] | NotGiven = NOT_GIVEN, + items: Iterable[list_update_params.Item] | 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, @@ -469,7 +468,7 @@ async def update( description: The description of the list. - items: The items in the list. + items: items to add to the list. extra_headers: Send extra headers diff --git a/src/cloudflare/types/accounts/token_update_params.py b/src/cloudflare/types/accounts/token_update_params.py index fe7ed0cf440..cb32132b32d 100644 --- a/src/cloudflare/types/accounts/token_update_params.py +++ b/src/cloudflare/types/accounts/token_update_params.py @@ -23,9 +23,6 @@ class TokenUpdateParams(TypedDict, total=False): policies: Required[Iterable[TokenPolicy]] """List of access policies assigned to the token.""" - status: Required[Literal["active", "disabled", "expired"]] - """Status of the token.""" - condition: Condition expires_on: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] @@ -37,6 +34,9 @@ class TokenUpdateParams(TypedDict, total=False): not_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """The time before which the token MUST NOT be accepted for processing.""" + status: Literal["active", "disabled", "expired"] + """Status of the token.""" + _ConditionRequestIPReservedKeywords = TypedDict( "_ConditionRequestIPReservedKeywords", diff --git a/src/cloudflare/types/bot_management/bot_fight_mode_configuration.py b/src/cloudflare/types/bot_management/bot_fight_mode_configuration.py index 1321d2b5f99..072d28c6a48 100644 --- a/src/cloudflare/types/bot_management/bot_fight_mode_configuration.py +++ b/src/cloudflare/types/bot_management/bot_fight_mode_configuration.py @@ -35,8 +35,12 @@ class StaleZoneConfiguration(BaseModel): class BotFightModeConfiguration(BaseModel): - ai_bots_protection: Optional[Literal["block", "disabled"]] = None - """Enable rule to block AI Scrapers and Crawlers.""" + ai_bots_protection: Optional[Literal["block", "disabled", "only_on_ad_pages"]] = None + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ crawler_protection: Optional[Literal["enabled", "disabled"]] = None """Enable rule to punish AI Scrapers and Crawlers via a link maze.""" diff --git a/src/cloudflare/types/bot_management/bot_fight_mode_configuration_param.py b/src/cloudflare/types/bot_management/bot_fight_mode_configuration_param.py index 4eb28780e1e..f74042c5799 100644 --- a/src/cloudflare/types/bot_management/bot_fight_mode_configuration_param.py +++ b/src/cloudflare/types/bot_management/bot_fight_mode_configuration_param.py @@ -8,8 +8,12 @@ class BotFightModeConfigurationParam(TypedDict, total=False): - ai_bots_protection: Literal["block", "disabled"] - """Enable rule to block AI Scrapers and Crawlers.""" + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ crawler_protection: Literal["enabled", "disabled"] """Enable rule to punish AI Scrapers and Crawlers via a link maze.""" diff --git a/src/cloudflare/types/bot_management/bot_management_update_params.py b/src/cloudflare/types/bot_management/bot_management_update_params.py index 447deb3c4c7..310a2d6515f 100644 --- a/src/cloudflare/types/bot_management/bot_management_update_params.py +++ b/src/cloudflare/types/bot_management/bot_management_update_params.py @@ -18,8 +18,12 @@ class BotFightModeConfiguration(TypedDict, total=False): zone_id: Required[str] """Identifier.""" - ai_bots_protection: Literal["block", "disabled"] - """Enable rule to block AI Scrapers and Crawlers.""" + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ crawler_protection: Literal["enabled", "disabled"] """Enable rule to punish AI Scrapers and Crawlers via a link maze.""" @@ -38,8 +42,12 @@ class SuperBotFightModeDefinitelyConfiguration(TypedDict, total=False): zone_id: Required[str] """Identifier.""" - ai_bots_protection: Literal["block", "disabled"] - """Enable rule to block AI Scrapers and Crawlers.""" + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ crawler_protection: Literal["enabled", "disabled"] """Enable rule to punish AI Scrapers and Crawlers via a link maze.""" @@ -71,8 +79,12 @@ class SuperBotFightModeLikelyConfiguration(TypedDict, total=False): zone_id: Required[str] """Identifier.""" - ai_bots_protection: Literal["block", "disabled"] - """Enable rule to block AI Scrapers and Crawlers.""" + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ crawler_protection: Literal["enabled", "disabled"] """Enable rule to punish AI Scrapers and Crawlers via a link maze.""" @@ -107,8 +119,12 @@ class SubscriptionConfiguration(TypedDict, total=False): zone_id: Required[str] """Identifier.""" - ai_bots_protection: Literal["block", "disabled"] - """Enable rule to block AI Scrapers and Crawlers.""" + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ auto_update_model: bool """ diff --git a/src/cloudflare/types/bot_management/subscription_configuration.py b/src/cloudflare/types/bot_management/subscription_configuration.py index 8a874700038..5aa253353c6 100644 --- a/src/cloudflare/types/bot_management/subscription_configuration.py +++ b/src/cloudflare/types/bot_management/subscription_configuration.py @@ -35,8 +35,12 @@ class StaleZoneConfiguration(BaseModel): class SubscriptionConfiguration(BaseModel): - ai_bots_protection: Optional[Literal["block", "disabled"]] = None - """Enable rule to block AI Scrapers and Crawlers.""" + ai_bots_protection: Optional[Literal["block", "disabled", "only_on_ad_pages"]] = None + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ auto_update_model: Optional[bool] = None """ diff --git a/src/cloudflare/types/bot_management/subscription_configuration_param.py b/src/cloudflare/types/bot_management/subscription_configuration_param.py index a58d9f30ac6..9a61562625e 100644 --- a/src/cloudflare/types/bot_management/subscription_configuration_param.py +++ b/src/cloudflare/types/bot_management/subscription_configuration_param.py @@ -8,8 +8,12 @@ class SubscriptionConfigurationParam(TypedDict, total=False): - ai_bots_protection: Literal["block", "disabled"] - """Enable rule to block AI Scrapers and Crawlers.""" + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ auto_update_model: bool """ diff --git a/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration.py b/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration.py index 63e9cbc33cf..23595091365 100644 --- a/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration.py +++ b/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration.py @@ -20,8 +20,12 @@ class StaleZoneConfiguration(BaseModel): class SuperBotFightModeDefinitelyConfiguration(BaseModel): - ai_bots_protection: Optional[Literal["block", "disabled"]] = None - """Enable rule to block AI Scrapers and Crawlers.""" + ai_bots_protection: Optional[Literal["block", "disabled", "only_on_ad_pages"]] = None + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ crawler_protection: Optional[Literal["enabled", "disabled"]] = None """Enable rule to punish AI Scrapers and Crawlers via a link maze.""" diff --git a/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration_param.py b/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration_param.py index d8b195afaf4..c04a33374e5 100644 --- a/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration_param.py +++ b/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration_param.py @@ -8,8 +8,12 @@ class SuperBotFightModeDefinitelyConfigurationParam(TypedDict, total=False): - ai_bots_protection: Literal["block", "disabled"] - """Enable rule to block AI Scrapers and Crawlers.""" + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ crawler_protection: Literal["enabled", "disabled"] """Enable rule to punish AI Scrapers and Crawlers via a link maze.""" diff --git a/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration.py b/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration.py index 1547b01318c..e3cf122345b 100644 --- a/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration.py +++ b/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration.py @@ -14,8 +14,12 @@ class StaleZoneConfiguration(BaseModel): class SuperBotFightModeLikelyConfiguration(BaseModel): - ai_bots_protection: Optional[Literal["block", "disabled"]] = None - """Enable rule to block AI Scrapers and Crawlers.""" + ai_bots_protection: Optional[Literal["block", "disabled", "only_on_ad_pages"]] = None + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ crawler_protection: Optional[Literal["enabled", "disabled"]] = None """Enable rule to punish AI Scrapers and Crawlers via a link maze.""" diff --git a/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration_param.py b/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration_param.py index 6cb2e09143d..ef00c4bc186 100644 --- a/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration_param.py +++ b/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration_param.py @@ -8,8 +8,12 @@ class SuperBotFightModeLikelyConfigurationParam(TypedDict, total=False): - ai_bots_protection: Literal["block", "disabled"] - """Enable rule to block AI Scrapers and Crawlers.""" + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ crawler_protection: Literal["enabled", "disabled"] """Enable rule to punish AI Scrapers and Crawlers via a link maze.""" diff --git a/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_params.py b/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_params.py index 366b219d1b6..816393ffb76 100644 --- a/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_params.py +++ b/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_params.py @@ -29,10 +29,6 @@ class DataRaw(TypedDict, total=False): class Data(TypedDict, total=False): - attacker: Required[str] - - attacker_country: Required[Annotated[str, PropertyInfo(alias="attackerCountry")]] - category: Required[str] date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]] @@ -47,6 +43,10 @@ class Data(TypedDict, total=False): account_id: Annotated[float, PropertyInfo(alias="accountId")] + attacker: str + + attacker_country: Annotated[str, PropertyInfo(alias="attackerCountry")] + dataset_id: Annotated[str, PropertyInfo(alias="datasetId")] indicator: str diff --git a/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_response.py b/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_response.py index 7d9273c9f24..e246309fd92 100644 --- a/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_response.py +++ b/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_response.py @@ -1,69 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional from typing_extensions import TypeAlias -from pydantic import Field as FieldInfo +__all__ = ["ThreatEventBulkCreateResponse"] -from ..._models import BaseModel - -__all__ = ["ThreatEventBulkCreateResponse", "ThreatEventBulkCreateResponseItem"] - - -class ThreatEventBulkCreateResponseItem(BaseModel): - id: float - - account_id: float = FieldInfo(alias="accountId") - - attacker: str - - attacker_country: str = FieldInfo(alias="attackerCountry") - - category: str - - category_id: float = FieldInfo(alias="categoryId") - - date: str - - event: str - - indicator: str - - indicator_type: str = FieldInfo(alias="indicatorType") - - indicator_type_id: float = FieldInfo(alias="indicatorTypeId") - - kill_chain: float = FieldInfo(alias="killChain") - - mitre_attack: List[str] = FieldInfo(alias="mitreAttack") - - num_referenced: float = FieldInfo(alias="numReferenced") - - num_references: float = FieldInfo(alias="numReferences") - - raw_id: str = FieldInfo(alias="rawId") - - referenced: List[str] - - referenced_ids: List[float] = FieldInfo(alias="referencedIds") - - references: List[str] - - references_ids: List[float] = FieldInfo(alias="referencesIds") - - tags: List[str] - - target_country: str = FieldInfo(alias="targetCountry") - - target_industry: str = FieldInfo(alias="targetIndustry") - - tlp: str - - uuid: str - - insight: Optional[str] = None - - releasability_id: Optional[str] = FieldInfo(alias="releasabilityId", default=None) - - -ThreatEventBulkCreateResponse: TypeAlias = List[ThreatEventBulkCreateResponseItem] +ThreatEventBulkCreateResponse: TypeAlias = float diff --git a/src/cloudflare/types/cloudforce_one/threat_event_create_params.py b/src/cloudflare/types/cloudforce_one/threat_event_create_params.py index 225d471ad0b..890a2252d93 100644 --- a/src/cloudflare/types/cloudforce_one/threat_event_create_params.py +++ b/src/cloudflare/types/cloudforce_one/threat_event_create_params.py @@ -15,10 +15,6 @@ class ThreatEventCreateParams(TypedDict, total=False): path_account_id: Required[Annotated[str, PropertyInfo(alias="account_id")]] """Account ID.""" - attacker: Required[str] - - attacker_country: Required[Annotated[str, PropertyInfo(alias="attackerCountry")]] - category: Required[str] date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]] @@ -33,6 +29,10 @@ class ThreatEventCreateParams(TypedDict, total=False): body_account_id: Annotated[float, PropertyInfo(alias="accountId")] + attacker: str + + attacker_country: Annotated[str, PropertyInfo(alias="attackerCountry")] + dataset_id: Annotated[str, PropertyInfo(alias="datasetId")] indicator: str diff --git a/src/cloudflare/types/cloudforce_one/threat_event_create_response.py b/src/cloudflare/types/cloudforce_one/threat_event_create_response.py index 4295255b079..4481584c481 100644 --- a/src/cloudflare/types/cloudforce_one/threat_event_create_response.py +++ b/src/cloudflare/types/cloudforce_one/threat_event_create_response.py @@ -20,8 +20,6 @@ class ThreatEventCreateResponse(BaseModel): category: str - category_id: float = FieldInfo(alias="categoryId") - date: str event: str diff --git a/src/cloudflare/types/cloudforce_one/threat_event_edit_response.py b/src/cloudflare/types/cloudforce_one/threat_event_edit_response.py index d231b5a963b..aea29555fc7 100644 --- a/src/cloudflare/types/cloudforce_one/threat_event_edit_response.py +++ b/src/cloudflare/types/cloudforce_one/threat_event_edit_response.py @@ -20,8 +20,6 @@ class ThreatEventEditResponse(BaseModel): category: str - category_id: float = FieldInfo(alias="categoryId") - date: str event: str diff --git a/src/cloudflare/types/cloudforce_one/threat_event_get_response.py b/src/cloudflare/types/cloudforce_one/threat_event_get_response.py index 93a44b230ec..7f78c9ea9e6 100644 --- a/src/cloudflare/types/cloudforce_one/threat_event_get_response.py +++ b/src/cloudflare/types/cloudforce_one/threat_event_get_response.py @@ -20,8 +20,6 @@ class ThreatEventGetResponse(BaseModel): category: str - category_id: float = FieldInfo(alias="categoryId") - date: str event: str diff --git a/src/cloudflare/types/cloudforce_one/threat_event_list_response.py b/src/cloudflare/types/cloudforce_one/threat_event_list_response.py index 4c7c2b691ad..111bbd14aae 100644 --- a/src/cloudflare/types/cloudforce_one/threat_event_list_response.py +++ b/src/cloudflare/types/cloudforce_one/threat_event_list_response.py @@ -21,8 +21,6 @@ class ThreatEventListResponseItem(BaseModel): category: str - category_id: float = FieldInfo(alias="categoryId") - date: str event: str diff --git a/src/cloudflare/types/dns/a_record.py b/src/cloudflare/types/dns/a_record.py index 2dd809edd25..13dcaacf6c3 100644 --- a/src/cloudflare/types/dns/a_record.py +++ b/src/cloudflare/types/dns/a_record.py @@ -32,6 +32,13 @@ class ARecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["A"] """Record type.""" @@ -55,10 +62,3 @@ class ARecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/a_record_param.py b/src/cloudflare/types/dns/a_record_param.py index 60ceae7a5eb..be295ee88e8 100644 --- a/src/cloudflare/types/dns/a_record_param.py +++ b/src/cloudflare/types/dns/a_record_param.py @@ -33,6 +33,13 @@ class ARecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["A"]] """Record type.""" @@ -56,10 +63,3 @@ class ARecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/aaaa_record.py b/src/cloudflare/types/dns/aaaa_record.py index ee1099da332..2522f83b058 100644 --- a/src/cloudflare/types/dns/aaaa_record.py +++ b/src/cloudflare/types/dns/aaaa_record.py @@ -32,6 +32,13 @@ class AAAARecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["AAAA"] """Record type.""" @@ -55,10 +62,3 @@ class AAAARecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/aaaa_record_param.py b/src/cloudflare/types/dns/aaaa_record_param.py index f9cea4e61a9..f7b9414c26d 100644 --- a/src/cloudflare/types/dns/aaaa_record_param.py +++ b/src/cloudflare/types/dns/aaaa_record_param.py @@ -33,6 +33,13 @@ class AAAARecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["AAAA"]] """Record type.""" @@ -56,10 +63,3 @@ class AAAARecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/batch_patch_param.py b/src/cloudflare/types/dns/batch_patch_param.py index ce96ef8edce..1e60a7fff8f 100644 --- a/src/cloudflare/types/dns/batch_patch_param.py +++ b/src/cloudflare/types/dns/batch_patch_param.py @@ -105,6 +105,13 @@ class OpenpgpkeyRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["OPENPGPKEY"]] """Record type.""" @@ -129,13 +136,6 @@ class OpenpgpkeyRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class PTRRecord(PTRRecordParam, total=False): id: Required[str] diff --git a/src/cloudflare/types/dns/batch_put_param.py b/src/cloudflare/types/dns/batch_put_param.py index b747c350cfe..a22924e1f0b 100644 --- a/src/cloudflare/types/dns/batch_put_param.py +++ b/src/cloudflare/types/dns/batch_put_param.py @@ -105,6 +105,13 @@ class OpenpgpkeyRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["OPENPGPKEY"]] """Record type.""" @@ -129,13 +136,6 @@ class OpenpgpkeyRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class PTRRecord(PTRRecordParam, total=False): id: Required[str] diff --git a/src/cloudflare/types/dns/caa_record.py b/src/cloudflare/types/dns/caa_record.py index 1ef5bd859c2..db8b2a63f5d 100644 --- a/src/cloudflare/types/dns/caa_record.py +++ b/src/cloudflare/types/dns/caa_record.py @@ -43,6 +43,13 @@ class CAARecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["CAA"] """Record type.""" @@ -69,10 +76,3 @@ class CAARecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/caa_record_param.py b/src/cloudflare/types/dns/caa_record_param.py index b93e29827b2..d0e824f7999 100644 --- a/src/cloudflare/types/dns/caa_record_param.py +++ b/src/cloudflare/types/dns/caa_record_param.py @@ -44,6 +44,13 @@ class CAARecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CAA"]] """Record type.""" @@ -67,10 +74,3 @@ class CAARecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/cert_record.py b/src/cloudflare/types/dns/cert_record.py index 65b16674b18..6067b815486 100644 --- a/src/cloudflare/types/dns/cert_record.py +++ b/src/cloudflare/types/dns/cert_record.py @@ -46,6 +46,13 @@ class CERTRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["CERT"] """Record type.""" @@ -72,10 +79,3 @@ class CERTRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/cert_record_param.py b/src/cloudflare/types/dns/cert_record_param.py index 45693c6dca0..c4daeaa730f 100644 --- a/src/cloudflare/types/dns/cert_record_param.py +++ b/src/cloudflare/types/dns/cert_record_param.py @@ -47,6 +47,13 @@ class CERTRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CERT"]] """Record type.""" @@ -70,10 +77,3 @@ class CERTRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/cname_record.py b/src/cloudflare/types/dns/cname_record.py index 127dda55f61..62a38a2d048 100644 --- a/src/cloudflare/types/dns/cname_record.py +++ b/src/cloudflare/types/dns/cname_record.py @@ -40,6 +40,13 @@ class CNAMERecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["CNAME"] """Record type.""" @@ -63,10 +70,3 @@ class CNAMERecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/cname_record_param.py b/src/cloudflare/types/dns/cname_record_param.py index 8802ee8312d..5219a5de954 100644 --- a/src/cloudflare/types/dns/cname_record_param.py +++ b/src/cloudflare/types/dns/cname_record_param.py @@ -41,6 +41,13 @@ class CNAMERecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CNAME"]] """Record type.""" @@ -64,10 +71,3 @@ class CNAMERecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/dnskey_record.py b/src/cloudflare/types/dns/dnskey_record.py index bcb7831cc97..9f60483fe31 100644 --- a/src/cloudflare/types/dns/dnskey_record.py +++ b/src/cloudflare/types/dns/dnskey_record.py @@ -46,6 +46,13 @@ class DNSKEYRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["DNSKEY"] """Record type.""" @@ -72,10 +79,3 @@ class DNSKEYRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/dnskey_record_param.py b/src/cloudflare/types/dns/dnskey_record_param.py index 9476e6ac47b..74a888e5f15 100644 --- a/src/cloudflare/types/dns/dnskey_record_param.py +++ b/src/cloudflare/types/dns/dnskey_record_param.py @@ -47,6 +47,13 @@ class DNSKEYRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["DNSKEY"]] """Record type.""" @@ -70,10 +77,3 @@ class DNSKEYRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/ds_record.py b/src/cloudflare/types/dns/ds_record.py index 3af34140392..94efd3137aa 100644 --- a/src/cloudflare/types/dns/ds_record.py +++ b/src/cloudflare/types/dns/ds_record.py @@ -46,6 +46,13 @@ class DSRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["DS"] """Record type.""" @@ -72,10 +79,3 @@ class DSRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/ds_record_param.py b/src/cloudflare/types/dns/ds_record_param.py index d696be3fa31..f50b033e0f1 100644 --- a/src/cloudflare/types/dns/ds_record_param.py +++ b/src/cloudflare/types/dns/ds_record_param.py @@ -47,6 +47,13 @@ class DSRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["DS"]] """Record type.""" @@ -70,10 +77,3 @@ class DSRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/https_record.py b/src/cloudflare/types/dns/https_record.py index 80b38c42901..d7cda11cfba 100644 --- a/src/cloudflare/types/dns/https_record.py +++ b/src/cloudflare/types/dns/https_record.py @@ -43,6 +43,13 @@ class HTTPSRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["HTTPS"] """Record type.""" @@ -69,10 +76,3 @@ class HTTPSRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/https_record_param.py b/src/cloudflare/types/dns/https_record_param.py index 5636ae61c23..aa4befa7c73 100644 --- a/src/cloudflare/types/dns/https_record_param.py +++ b/src/cloudflare/types/dns/https_record_param.py @@ -44,6 +44,13 @@ class HTTPSRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["HTTPS"]] """Record type.""" @@ -67,10 +74,3 @@ class HTTPSRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/loc_record.py b/src/cloudflare/types/dns/loc_record.py index e485095d218..a714377b683 100644 --- a/src/cloudflare/types/dns/loc_record.py +++ b/src/cloudflare/types/dns/loc_record.py @@ -70,6 +70,13 @@ class LOCRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["LOC"] """Record type.""" @@ -96,10 +103,3 @@ class LOCRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/loc_record_param.py b/src/cloudflare/types/dns/loc_record_param.py index 00cb4b5225f..8dec7099270 100644 --- a/src/cloudflare/types/dns/loc_record_param.py +++ b/src/cloudflare/types/dns/loc_record_param.py @@ -71,6 +71,13 @@ class LOCRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["LOC"]] """Record type.""" @@ -94,10 +101,3 @@ class LOCRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/mx_record.py b/src/cloudflare/types/dns/mx_record.py index a27e72470f9..dd26678ac5b 100644 --- a/src/cloudflare/types/dns/mx_record.py +++ b/src/cloudflare/types/dns/mx_record.py @@ -32,6 +32,13 @@ class MXRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["MX"] """Record type.""" @@ -61,10 +68,3 @@ class MXRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/mx_record_param.py b/src/cloudflare/types/dns/mx_record_param.py index e3e17499870..98c3b1fbd01 100644 --- a/src/cloudflare/types/dns/mx_record_param.py +++ b/src/cloudflare/types/dns/mx_record_param.py @@ -33,6 +33,13 @@ class MXRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["MX"]] """Record type.""" @@ -62,10 +69,3 @@ class MXRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/naptr_record.py b/src/cloudflare/types/dns/naptr_record.py index 1fe64354fac..b35ae50aa85 100644 --- a/src/cloudflare/types/dns/naptr_record.py +++ b/src/cloudflare/types/dns/naptr_record.py @@ -52,6 +52,13 @@ class NAPTRRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["NAPTR"] """Record type.""" @@ -78,10 +85,3 @@ class NAPTRRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/naptr_record_param.py b/src/cloudflare/types/dns/naptr_record_param.py index 906b491c288..7890bb5123a 100644 --- a/src/cloudflare/types/dns/naptr_record_param.py +++ b/src/cloudflare/types/dns/naptr_record_param.py @@ -53,6 +53,13 @@ class NAPTRRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["NAPTR"]] """Record type.""" @@ -76,10 +83,3 @@ class NAPTRRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/ns_record.py b/src/cloudflare/types/dns/ns_record.py index db4c0bce8f3..8331850a7de 100644 --- a/src/cloudflare/types/dns/ns_record.py +++ b/src/cloudflare/types/dns/ns_record.py @@ -32,6 +32,13 @@ class NSRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["NS"] """Record type.""" @@ -55,10 +62,3 @@ class NSRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/ns_record_param.py b/src/cloudflare/types/dns/ns_record_param.py index 8233112b1c8..84b238d47f5 100644 --- a/src/cloudflare/types/dns/ns_record_param.py +++ b/src/cloudflare/types/dns/ns_record_param.py @@ -33,6 +33,13 @@ class NSRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["NS"]] """Record type.""" @@ -56,10 +63,3 @@ class NSRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/ptr_record.py b/src/cloudflare/types/dns/ptr_record.py index ceafad5c9ad..55720adceb7 100644 --- a/src/cloudflare/types/dns/ptr_record.py +++ b/src/cloudflare/types/dns/ptr_record.py @@ -32,6 +32,13 @@ class PTRRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["PTR"] """Record type.""" @@ -55,10 +62,3 @@ class PTRRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/ptr_record_param.py b/src/cloudflare/types/dns/ptr_record_param.py index d5fbca6b7b7..fdb731e9a55 100644 --- a/src/cloudflare/types/dns/ptr_record_param.py +++ b/src/cloudflare/types/dns/ptr_record_param.py @@ -33,6 +33,13 @@ class PTRRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["PTR"]] """Record type.""" @@ -56,10 +63,3 @@ class PTRRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/record_batch_params.py b/src/cloudflare/types/dns/record_batch_params.py index 1bfa0dac5c2..03aac908b56 100644 --- a/src/cloudflare/types/dns/record_batch_params.py +++ b/src/cloudflare/types/dns/record_batch_params.py @@ -79,6 +79,13 @@ class PostDNSRecordsOpenpgpkeyRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["OPENPGPKEY"]] """Record type.""" @@ -103,13 +110,6 @@ class PostDNSRecordsOpenpgpkeyRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - Post: TypeAlias = Union[ ARecordParam, diff --git a/src/cloudflare/types/dns/record_create_params.py b/src/cloudflare/types/dns/record_create_params.py index 64648001011..b452260454a 100644 --- a/src/cloudflare/types/dns/record_create_params.py +++ b/src/cloudflare/types/dns/record_create_params.py @@ -75,6 +75,13 @@ class ARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["A"]] """Record type.""" @@ -99,13 +106,6 @@ class ARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class ARecordSettings(TypedDict, total=False): ipv4_only: bool @@ -132,6 +132,13 @@ class AAAARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["AAAA"]] """Record type.""" @@ -156,13 +163,6 @@ class AAAARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class AAAARecordSettings(TypedDict, total=False): ipv4_only: bool @@ -189,6 +189,13 @@ class CNAMERecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CNAME"]] """Record type.""" @@ -213,13 +220,6 @@ class CNAMERecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class CNAMERecordSettings(TypedDict, total=False): flatten_cname: bool @@ -254,6 +254,13 @@ class MXRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["MX"]] """Record type.""" @@ -284,13 +291,6 @@ class MXRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class MXRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -317,6 +317,13 @@ class NSRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["NS"]] """Record type.""" @@ -341,13 +348,6 @@ class NSRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class NSRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -374,6 +374,13 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["OPENPGPKEY"]] """Record type.""" @@ -398,13 +405,6 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class DNSRecordsOpenpgpkeyRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -431,6 +431,13 @@ class PTRRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["PTR"]] """Record type.""" @@ -455,13 +462,6 @@ class PTRRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class PTRRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -488,6 +488,13 @@ class TXTRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["TXT"]] """Record type.""" @@ -520,13 +527,6 @@ class TXTRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class TXTRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -553,6 +553,13 @@ class CAARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CAA"]] """Record type.""" @@ -577,13 +584,6 @@ class CAARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class CAARecordData(TypedDict, total=False): flags: float @@ -621,6 +621,13 @@ class CERTRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CERT"]] """Record type.""" @@ -645,13 +652,6 @@ class CERTRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class CERTRecordData(TypedDict, total=False): algorithm: float @@ -692,6 +692,13 @@ class DNSKEYRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["DNSKEY"]] """Record type.""" @@ -716,13 +723,6 @@ class DNSKEYRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class DNSKEYRecordData(TypedDict, total=False): algorithm: float @@ -763,6 +763,13 @@ class DSRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["DS"]] """Record type.""" @@ -787,13 +794,6 @@ class DSRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class DSRecordData(TypedDict, total=False): algorithm: float @@ -834,6 +834,13 @@ class HTTPSRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["HTTPS"]] """Record type.""" @@ -858,13 +865,6 @@ class HTTPSRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class HTTPSRecordData(TypedDict, total=False): priority: float @@ -902,6 +902,13 @@ class LOCRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["LOC"]] """Record type.""" @@ -926,13 +933,6 @@ class LOCRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class LOCRecordData(TypedDict, total=False): altitude: float @@ -997,6 +997,13 @@ class NAPTRRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["NAPTR"]] """Record type.""" @@ -1021,13 +1028,6 @@ class NAPTRRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class NAPTRRecordData(TypedDict, total=False): flags: str @@ -1074,6 +1074,13 @@ class SMIMEARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SMIMEA"]] """Record type.""" @@ -1098,13 +1105,6 @@ class SMIMEARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SMIMEARecordData(TypedDict, total=False): certificate: str @@ -1145,6 +1145,13 @@ class SRVRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SRV"]] """Record type.""" @@ -1169,13 +1176,6 @@ class SRVRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SRVRecordData(TypedDict, total=False): port: float @@ -1219,6 +1219,13 @@ class SSHFPRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SSHFP"]] """Record type.""" @@ -1243,13 +1250,6 @@ class SSHFPRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SSHFPRecordData(TypedDict, total=False): algorithm: float @@ -1287,6 +1287,13 @@ class SVCBRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SVCB"]] """Record type.""" @@ -1311,13 +1318,6 @@ class SVCBRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SVCBRecordData(TypedDict, total=False): priority: float @@ -1355,6 +1355,13 @@ class TLSARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["TLSA"]] """Record type.""" @@ -1379,13 +1386,6 @@ class TLSARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class TLSARecordData(TypedDict, total=False): certificate: str @@ -1426,6 +1426,13 @@ class URIRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["URI"]] """Record type.""" @@ -1456,13 +1463,6 @@ class URIRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class URIRecordData(TypedDict, total=False): target: str diff --git a/src/cloudflare/types/dns/record_edit_params.py b/src/cloudflare/types/dns/record_edit_params.py index 4fe64d7b17c..a1fbaf5c7fa 100644 --- a/src/cloudflare/types/dns/record_edit_params.py +++ b/src/cloudflare/types/dns/record_edit_params.py @@ -75,6 +75,13 @@ class ARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["A"]] """Record type.""" @@ -99,13 +106,6 @@ class ARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class ARecordSettings(TypedDict, total=False): ipv4_only: bool @@ -132,6 +132,13 @@ class AAAARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["AAAA"]] """Record type.""" @@ -156,13 +163,6 @@ class AAAARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class AAAARecordSettings(TypedDict, total=False): ipv4_only: bool @@ -189,6 +189,13 @@ class CNAMERecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CNAME"]] """Record type.""" @@ -213,13 +220,6 @@ class CNAMERecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class CNAMERecordSettings(TypedDict, total=False): flatten_cname: bool @@ -254,6 +254,13 @@ class MXRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["MX"]] """Record type.""" @@ -284,13 +291,6 @@ class MXRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class MXRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -317,6 +317,13 @@ class NSRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["NS"]] """Record type.""" @@ -341,13 +348,6 @@ class NSRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class NSRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -374,6 +374,13 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["OPENPGPKEY"]] """Record type.""" @@ -398,13 +405,6 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class DNSRecordsOpenpgpkeyRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -431,6 +431,13 @@ class PTRRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["PTR"]] """Record type.""" @@ -455,13 +462,6 @@ class PTRRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class PTRRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -488,6 +488,13 @@ class TXTRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["TXT"]] """Record type.""" @@ -520,13 +527,6 @@ class TXTRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class TXTRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -553,6 +553,13 @@ class CAARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CAA"]] """Record type.""" @@ -577,13 +584,6 @@ class CAARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class CAARecordData(TypedDict, total=False): flags: float @@ -621,6 +621,13 @@ class CERTRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CERT"]] """Record type.""" @@ -645,13 +652,6 @@ class CERTRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class CERTRecordData(TypedDict, total=False): algorithm: float @@ -692,6 +692,13 @@ class DNSKEYRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["DNSKEY"]] """Record type.""" @@ -716,13 +723,6 @@ class DNSKEYRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class DNSKEYRecordData(TypedDict, total=False): algorithm: float @@ -763,6 +763,13 @@ class DSRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["DS"]] """Record type.""" @@ -787,13 +794,6 @@ class DSRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class DSRecordData(TypedDict, total=False): algorithm: float @@ -834,6 +834,13 @@ class HTTPSRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["HTTPS"]] """Record type.""" @@ -858,13 +865,6 @@ class HTTPSRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class HTTPSRecordData(TypedDict, total=False): priority: float @@ -902,6 +902,13 @@ class LOCRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["LOC"]] """Record type.""" @@ -926,13 +933,6 @@ class LOCRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class LOCRecordData(TypedDict, total=False): altitude: float @@ -997,6 +997,13 @@ class NAPTRRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["NAPTR"]] """Record type.""" @@ -1021,13 +1028,6 @@ class NAPTRRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class NAPTRRecordData(TypedDict, total=False): flags: str @@ -1074,6 +1074,13 @@ class SMIMEARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SMIMEA"]] """Record type.""" @@ -1098,13 +1105,6 @@ class SMIMEARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SMIMEARecordData(TypedDict, total=False): certificate: str @@ -1145,6 +1145,13 @@ class SRVRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SRV"]] """Record type.""" @@ -1169,13 +1176,6 @@ class SRVRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SRVRecordData(TypedDict, total=False): port: float @@ -1219,6 +1219,13 @@ class SSHFPRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SSHFP"]] """Record type.""" @@ -1243,13 +1250,6 @@ class SSHFPRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SSHFPRecordData(TypedDict, total=False): algorithm: float @@ -1287,6 +1287,13 @@ class SVCBRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SVCB"]] """Record type.""" @@ -1311,13 +1318,6 @@ class SVCBRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SVCBRecordData(TypedDict, total=False): priority: float @@ -1355,6 +1355,13 @@ class TLSARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["TLSA"]] """Record type.""" @@ -1379,13 +1386,6 @@ class TLSARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class TLSARecordData(TypedDict, total=False): certificate: str @@ -1426,6 +1426,13 @@ class URIRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["URI"]] """Record type.""" @@ -1456,13 +1463,6 @@ class URIRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class URIRecordData(TypedDict, total=False): target: str diff --git a/src/cloudflare/types/dns/record_update_params.py b/src/cloudflare/types/dns/record_update_params.py index 3420e186d33..c89e4dd6efd 100644 --- a/src/cloudflare/types/dns/record_update_params.py +++ b/src/cloudflare/types/dns/record_update_params.py @@ -75,6 +75,13 @@ class ARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["A"]] """Record type.""" @@ -99,13 +106,6 @@ class ARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class ARecordSettings(TypedDict, total=False): ipv4_only: bool @@ -132,6 +132,13 @@ class AAAARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["AAAA"]] """Record type.""" @@ -156,13 +163,6 @@ class AAAARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class AAAARecordSettings(TypedDict, total=False): ipv4_only: bool @@ -189,6 +189,13 @@ class CNAMERecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CNAME"]] """Record type.""" @@ -213,13 +220,6 @@ class CNAMERecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class CNAMERecordSettings(TypedDict, total=False): flatten_cname: bool @@ -254,6 +254,13 @@ class MXRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["MX"]] """Record type.""" @@ -284,13 +291,6 @@ class MXRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class MXRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -317,6 +317,13 @@ class NSRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["NS"]] """Record type.""" @@ -341,13 +348,6 @@ class NSRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class NSRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -374,6 +374,13 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["OPENPGPKEY"]] """Record type.""" @@ -398,13 +405,6 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class DNSRecordsOpenpgpkeyRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -431,6 +431,13 @@ class PTRRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["PTR"]] """Record type.""" @@ -455,13 +462,6 @@ class PTRRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class PTRRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -488,6 +488,13 @@ class TXTRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["TXT"]] """Record type.""" @@ -520,13 +527,6 @@ class TXTRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class TXTRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -553,6 +553,13 @@ class CAARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CAA"]] """Record type.""" @@ -577,13 +584,6 @@ class CAARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class CAARecordData(TypedDict, total=False): flags: float @@ -621,6 +621,13 @@ class CERTRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CERT"]] """Record type.""" @@ -645,13 +652,6 @@ class CERTRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class CERTRecordData(TypedDict, total=False): algorithm: float @@ -692,6 +692,13 @@ class DNSKEYRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["DNSKEY"]] """Record type.""" @@ -716,13 +723,6 @@ class DNSKEYRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class DNSKEYRecordData(TypedDict, total=False): algorithm: float @@ -763,6 +763,13 @@ class DSRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["DS"]] """Record type.""" @@ -787,13 +794,6 @@ class DSRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class DSRecordData(TypedDict, total=False): algorithm: float @@ -834,6 +834,13 @@ class HTTPSRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["HTTPS"]] """Record type.""" @@ -858,13 +865,6 @@ class HTTPSRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class HTTPSRecordData(TypedDict, total=False): priority: float @@ -902,6 +902,13 @@ class LOCRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["LOC"]] """Record type.""" @@ -926,13 +933,6 @@ class LOCRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class LOCRecordData(TypedDict, total=False): altitude: float @@ -997,6 +997,13 @@ class NAPTRRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["NAPTR"]] """Record type.""" @@ -1021,13 +1028,6 @@ class NAPTRRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class NAPTRRecordData(TypedDict, total=False): flags: str @@ -1074,6 +1074,13 @@ class SMIMEARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SMIMEA"]] """Record type.""" @@ -1098,13 +1105,6 @@ class SMIMEARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SMIMEARecordData(TypedDict, total=False): certificate: str @@ -1145,6 +1145,13 @@ class SRVRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SRV"]] """Record type.""" @@ -1169,13 +1176,6 @@ class SRVRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SRVRecordData(TypedDict, total=False): port: float @@ -1219,6 +1219,13 @@ class SSHFPRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SSHFP"]] """Record type.""" @@ -1243,13 +1250,6 @@ class SSHFPRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SSHFPRecordData(TypedDict, total=False): algorithm: float @@ -1287,6 +1287,13 @@ class SVCBRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SVCB"]] """Record type.""" @@ -1311,13 +1318,6 @@ class SVCBRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SVCBRecordData(TypedDict, total=False): priority: float @@ -1355,6 +1355,13 @@ class TLSARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["TLSA"]] """Record type.""" @@ -1379,13 +1386,6 @@ class TLSARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class TLSARecordData(TypedDict, total=False): certificate: str @@ -1426,6 +1426,13 @@ class URIRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["URI"]] """Record type.""" @@ -1456,13 +1463,6 @@ class URIRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class URIRecordData(TypedDict, total=False): target: str diff --git a/src/cloudflare/types/dns/smimea_record.py b/src/cloudflare/types/dns/smimea_record.py index 36809d36e62..4b36fac03e8 100644 --- a/src/cloudflare/types/dns/smimea_record.py +++ b/src/cloudflare/types/dns/smimea_record.py @@ -46,6 +46,13 @@ class SMIMEARecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["SMIMEA"] """Record type.""" @@ -72,10 +79,3 @@ class SMIMEARecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/smimea_record_param.py b/src/cloudflare/types/dns/smimea_record_param.py index 88563331e7c..13cf50183c7 100644 --- a/src/cloudflare/types/dns/smimea_record_param.py +++ b/src/cloudflare/types/dns/smimea_record_param.py @@ -47,6 +47,13 @@ class SMIMEARecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SMIMEA"]] """Record type.""" @@ -70,10 +77,3 @@ class SMIMEARecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/srv_record.py b/src/cloudflare/types/dns/srv_record.py index c6af1db2cdb..13d5335ff63 100644 --- a/src/cloudflare/types/dns/srv_record.py +++ b/src/cloudflare/types/dns/srv_record.py @@ -49,6 +49,13 @@ class SRVRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["SRV"] """Record type.""" @@ -78,10 +85,3 @@ class SRVRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/srv_record_param.py b/src/cloudflare/types/dns/srv_record_param.py index 26661a4d488..0f1720dff42 100644 --- a/src/cloudflare/types/dns/srv_record_param.py +++ b/src/cloudflare/types/dns/srv_record_param.py @@ -50,6 +50,13 @@ class SRVRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SRV"]] """Record type.""" @@ -73,10 +80,3 @@ class SRVRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/sshfp_record.py b/src/cloudflare/types/dns/sshfp_record.py index 34eebe100af..a782b0fd0e7 100644 --- a/src/cloudflare/types/dns/sshfp_record.py +++ b/src/cloudflare/types/dns/sshfp_record.py @@ -43,6 +43,13 @@ class SSHFPRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["SSHFP"] """Record type.""" @@ -69,10 +76,3 @@ class SSHFPRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/sshfp_record_param.py b/src/cloudflare/types/dns/sshfp_record_param.py index 55300dd798c..f3eedcd2c71 100644 --- a/src/cloudflare/types/dns/sshfp_record_param.py +++ b/src/cloudflare/types/dns/sshfp_record_param.py @@ -44,6 +44,13 @@ class SSHFPRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SSHFP"]] """Record type.""" @@ -67,10 +74,3 @@ class SSHFPRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/svcb_record.py b/src/cloudflare/types/dns/svcb_record.py index 2047b8b3a6e..65512c5a265 100644 --- a/src/cloudflare/types/dns/svcb_record.py +++ b/src/cloudflare/types/dns/svcb_record.py @@ -43,6 +43,13 @@ class SVCBRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["SVCB"] """Record type.""" @@ -69,10 +76,3 @@ class SVCBRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/svcb_record_param.py b/src/cloudflare/types/dns/svcb_record_param.py index df50717f966..e0813ddaeac 100644 --- a/src/cloudflare/types/dns/svcb_record_param.py +++ b/src/cloudflare/types/dns/svcb_record_param.py @@ -44,6 +44,13 @@ class SVCBRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SVCB"]] """Record type.""" @@ -67,10 +74,3 @@ class SVCBRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/tlsa_record.py b/src/cloudflare/types/dns/tlsa_record.py index d6e349d2002..b2b49eed3b7 100644 --- a/src/cloudflare/types/dns/tlsa_record.py +++ b/src/cloudflare/types/dns/tlsa_record.py @@ -46,6 +46,13 @@ class TLSARecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["TLSA"] """Record type.""" @@ -72,10 +79,3 @@ class TLSARecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/tlsa_record_param.py b/src/cloudflare/types/dns/tlsa_record_param.py index 2a0d3c80d73..b77b7e5c0bc 100644 --- a/src/cloudflare/types/dns/tlsa_record_param.py +++ b/src/cloudflare/types/dns/tlsa_record_param.py @@ -47,6 +47,13 @@ class TLSARecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["TLSA"]] """Record type.""" @@ -70,10 +77,3 @@ class TLSARecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/txt_record.py b/src/cloudflare/types/dns/txt_record.py index e55205570da..97a556c49f1 100644 --- a/src/cloudflare/types/dns/txt_record.py +++ b/src/cloudflare/types/dns/txt_record.py @@ -32,6 +32,13 @@ class TXTRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["TXT"] """Record type.""" @@ -63,10 +70,3 @@ class TXTRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/txt_record_param.py b/src/cloudflare/types/dns/txt_record_param.py index 877cba3a547..54320f7874c 100644 --- a/src/cloudflare/types/dns/txt_record_param.py +++ b/src/cloudflare/types/dns/txt_record_param.py @@ -33,6 +33,13 @@ class TXTRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["TXT"]] """Record type.""" @@ -64,10 +71,3 @@ class TXTRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/uri_record.py b/src/cloudflare/types/dns/uri_record.py index deb5ec91ebb..12cf4a19589 100644 --- a/src/cloudflare/types/dns/uri_record.py +++ b/src/cloudflare/types/dns/uri_record.py @@ -40,6 +40,13 @@ class URIRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["URI"] """Record type.""" @@ -72,10 +79,3 @@ class URIRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/uri_record_param.py b/src/cloudflare/types/dns/uri_record_param.py index eff1a6684b8..c0c2b3a47bf 100644 --- a/src/cloudflare/types/dns/uri_record_param.py +++ b/src/cloudflare/types/dns/uri_record_param.py @@ -41,6 +41,13 @@ class URIRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["URI"]] """Record type.""" @@ -70,10 +77,3 @@ class URIRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/email_security/investigate_get_response.py b/src/cloudflare/types/email_security/investigate_get_response.py index 2e5495bcc9c..d0bb1ee5a9c 100644 --- a/src/cloudflare/types/email_security/investigate_get_response.py +++ b/src/cloudflare/types/email_security/investigate_get_response.py @@ -11,6 +11,8 @@ class Properties(BaseModel): + allowlisted_pattern_type: Optional[str] = None + whitelisted_pattern_type: Optional[str] = None diff --git a/src/cloudflare/types/email_security/investigate_list_response.py b/src/cloudflare/types/email_security/investigate_list_response.py index 580f118a42f..045fef68549 100644 --- a/src/cloudflare/types/email_security/investigate_list_response.py +++ b/src/cloudflare/types/email_security/investigate_list_response.py @@ -11,6 +11,8 @@ class Properties(BaseModel): + allowlisted_pattern_type: Optional[str] = None + whitelisted_pattern_type: Optional[str] = None diff --git a/src/cloudflare/types/email_security/settings/domain_edit_params.py b/src/cloudflare/types/email_security/settings/domain_edit_params.py index 594a3d7d98c..c0799ec62ed 100644 --- a/src/cloudflare/types/email_security/settings/domain_edit_params.py +++ b/src/cloudflare/types/email_security/settings/domain_edit_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Optional +from typing import List from typing_extensions import Literal, Required, TypedDict __all__ = ["DomainEditParams"] @@ -16,7 +16,7 @@ class DomainEditParams(TypedDict, total=False): allowed_delivery_modes: List[Literal["DIRECT", "BCC", "JOURNAL", "API", "RETRO_SCAN"]] - domain: Optional[str] + domain: str drop_dispositions: List[ Literal[ @@ -35,9 +35,9 @@ class DomainEditParams(TypedDict, total=False): folder: Literal["AllItems", "Inbox"] - integration_id: Optional[str] + integration_id: str - lookback_hops: Optional[int] + lookback_hops: int require_tls_inbound: bool diff --git a/src/cloudflare/types/email_security/settings/trusted_domain_edit_params.py b/src/cloudflare/types/email_security/settings/trusted_domain_edit_params.py index 0dcdda7c0ef..90d1acfc7c0 100644 --- a/src/cloudflare/types/email_security/settings/trusted_domain_edit_params.py +++ b/src/cloudflare/types/email_security/settings/trusted_domain_edit_params.py @@ -2,7 +2,6 @@ from __future__ import annotations -from typing import Optional from typing_extensions import Required, TypedDict __all__ = ["TrustedDomainEditParams"] @@ -12,20 +11,20 @@ class TrustedDomainEditParams(TypedDict, total=False): account_id: Required[str] """Account Identifier""" - comments: Optional[str] + comments: str - is_recent: Optional[bool] + is_recent: bool """ Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition. """ - is_regex: Optional[bool] + is_regex: bool - is_similarity: Optional[bool] + is_similarity: bool """ Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition. """ - pattern: Optional[str] + pattern: str diff --git a/src/cloudflare/types/firewall/lockdown_create_params.py b/src/cloudflare/types/firewall/lockdown_create_params.py index 7a8edc23ab5..40da506f5fb 100644 --- a/src/cloudflare/types/firewall/lockdown_create_params.py +++ b/src/cloudflare/types/firewall/lockdown_create_params.py @@ -30,7 +30,7 @@ class LockdownCreateParams(TypedDict, total=False): """ description: str - """An informative summary of the rate limit. + """An informative summary of the rule. This value is sanitized and any tags will be removed. """ diff --git a/src/cloudflare/types/firewall/ua_rule_create_params.py b/src/cloudflare/types/firewall/ua_rule_create_params.py index 63ae7961c1f..01e49728041 100644 --- a/src/cloudflare/types/firewall/ua_rule_create_params.py +++ b/src/cloudflare/types/firewall/ua_rule_create_params.py @@ -16,6 +16,15 @@ class UARuleCreateParams(TypedDict, total=False): mode: Required[Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"]] """The action to apply to a matched request.""" + description: str + """An informative summary of the rule. + + This value is sanitized and any tags will be removed. + """ + + paused: bool + """When true, indicates that the rule is currently paused.""" + class Configuration(TypedDict, total=False): target: Literal["ua"] diff --git a/src/cloudflare/types/firewall/ua_rule_create_response.py b/src/cloudflare/types/firewall/ua_rule_create_response.py index bb2d6671967..83b176379ac 100644 --- a/src/cloudflare/types/firewall/ua_rule_create_response.py +++ b/src/cloudflare/types/firewall/ua_rule_create_response.py @@ -1,8 +1,39 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional -from typing_extensions import TypeAlias +from typing import Optional +from typing_extensions import Literal -__all__ = ["UARuleCreateResponse"] +from ..._models import BaseModel -UARuleCreateResponse: TypeAlias = Union[Optional[str], Optional[object]] +__all__ = ["UARuleCreateResponse", "Configuration"] + + +class Configuration(BaseModel): + target: Optional[str] = None + """The configuration target for this rule. + + You must set the target to `ua` for User Agent Blocking rules. + """ + + value: Optional[str] = None + """The exact user agent string to match. + + This value will be compared to the received `User-Agent` HTTP header value. + """ + + +class UARuleCreateResponse(BaseModel): + id: Optional[str] = None + """The unique identifier of the User Agent Blocking rule.""" + + configuration: Optional[Configuration] = None + """The configuration object for the current rule.""" + + description: Optional[str] = None + """An informative summary of the rule.""" + + mode: Optional[Literal["block", "challenge", "js_challenge", "managed_challenge"]] = None + """The action to apply to a matched request.""" + + paused: Optional[bool] = None + """When true, indicates that the rule is currently paused.""" diff --git a/src/cloudflare/types/firewall/ua_rule_delete_response.py b/src/cloudflare/types/firewall/ua_rule_delete_response.py index 0d7cbd7d69d..2ded475139d 100644 --- a/src/cloudflare/types/firewall/ua_rule_delete_response.py +++ b/src/cloudflare/types/firewall/ua_rule_delete_response.py @@ -1,12 +1,39 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional +from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["UARuleDeleteResponse"] +__all__ = ["UARuleDeleteResponse", "Configuration"] + + +class Configuration(BaseModel): + target: Optional[str] = None + """The configuration target for this rule. + + You must set the target to `ua` for User Agent Blocking rules. + """ + + value: Optional[str] = None + """The exact user agent string to match. + + This value will be compared to the received `User-Agent` HTTP header value. + """ class UARuleDeleteResponse(BaseModel): id: Optional[str] = None """The unique identifier of the User Agent Blocking rule.""" + + configuration: Optional[Configuration] = None + """The configuration object for the current rule.""" + + description: Optional[str] = None + """An informative summary of the rule.""" + + mode: Optional[Literal["block", "challenge", "js_challenge", "managed_challenge"]] = None + """The action to apply to a matched request.""" + + paused: Optional[bool] = None + """When true, indicates that the rule is currently paused.""" diff --git a/src/cloudflare/types/firewall/ua_rule_get_response.py b/src/cloudflare/types/firewall/ua_rule_get_response.py index 10613bd3d5b..ef98656691d 100644 --- a/src/cloudflare/types/firewall/ua_rule_get_response.py +++ b/src/cloudflare/types/firewall/ua_rule_get_response.py @@ -1,8 +1,39 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional -from typing_extensions import TypeAlias +from typing import Optional +from typing_extensions import Literal -__all__ = ["UARuleGetResponse"] +from ..._models import BaseModel -UARuleGetResponse: TypeAlias = Union[Optional[str], Optional[object]] +__all__ = ["UARuleGetResponse", "Configuration"] + + +class Configuration(BaseModel): + target: Optional[str] = None + """The configuration target for this rule. + + You must set the target to `ua` for User Agent Blocking rules. + """ + + value: Optional[str] = None + """The exact user agent string to match. + + This value will be compared to the received `User-Agent` HTTP header value. + """ + + +class UARuleGetResponse(BaseModel): + id: Optional[str] = None + """The unique identifier of the User Agent Blocking rule.""" + + configuration: Optional[Configuration] = None + """The configuration object for the current rule.""" + + description: Optional[str] = None + """An informative summary of the rule.""" + + mode: Optional[Literal["block", "challenge", "js_challenge", "managed_challenge"]] = None + """The action to apply to a matched request.""" + + paused: Optional[bool] = None + """When true, indicates that the rule is currently paused.""" diff --git a/src/cloudflare/types/firewall/ua_rule_list_params.py b/src/cloudflare/types/firewall/ua_rule_list_params.py index cc342a98c48..c40c8bd6cde 100644 --- a/src/cloudflare/types/firewall/ua_rule_list_params.py +++ b/src/cloudflare/types/firewall/ua_rule_list_params.py @@ -14,12 +14,12 @@ class UARuleListParams(TypedDict, total=False): description: str """A string to search for in the description of existing rules.""" - description_search: str - """A string to search for in the description of existing rules.""" - page: float """Page number of paginated results.""" + paused: bool + """When true, indicates that the rule is currently paused.""" + per_page: float """The maximum number of results per page. @@ -27,5 +27,5 @@ class UARuleListParams(TypedDict, total=False): or `20`. """ - ua_search: str + user_agent: str """A string to search for in the user agent values of existing rules.""" diff --git a/src/cloudflare/types/firewall/ua_rule_update_params.py b/src/cloudflare/types/firewall/ua_rule_update_params.py index 95d526a5c3a..eb27661492d 100644 --- a/src/cloudflare/types/firewall/ua_rule_update_params.py +++ b/src/cloudflare/types/firewall/ua_rule_update_params.py @@ -24,6 +24,15 @@ class UARuleUpdateParams(TypedDict, total=False): mode: Required[Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"]] """The action to apply to a matched request.""" + description: str + """An informative summary of the rule. + + This value is sanitized and any tags will be removed. + """ + + paused: bool + """When true, indicates that the rule is currently paused.""" + Configuration: TypeAlias = Union[ AccessRuleIPConfigurationParam, diff --git a/src/cloudflare/types/firewall/ua_rule_update_response.py b/src/cloudflare/types/firewall/ua_rule_update_response.py index 4dc4d0ae168..6576f69965c 100644 --- a/src/cloudflare/types/firewall/ua_rule_update_response.py +++ b/src/cloudflare/types/firewall/ua_rule_update_response.py @@ -1,8 +1,39 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional -from typing_extensions import TypeAlias +from typing import Optional +from typing_extensions import Literal -__all__ = ["UARuleUpdateResponse"] +from ..._models import BaseModel -UARuleUpdateResponse: TypeAlias = Union[Optional[str], Optional[object]] +__all__ = ["UARuleUpdateResponse", "Configuration"] + + +class Configuration(BaseModel): + target: Optional[str] = None + """The configuration target for this rule. + + You must set the target to `ua` for User Agent Blocking rules. + """ + + value: Optional[str] = None + """The exact user agent string to match. + + This value will be compared to the received `User-Agent` HTTP header value. + """ + + +class UARuleUpdateResponse(BaseModel): + id: Optional[str] = None + """The unique identifier of the User Agent Blocking rule.""" + + configuration: Optional[Configuration] = None + """The configuration object for the current rule.""" + + description: Optional[str] = None + """An informative summary of the rule.""" + + mode: Optional[Literal["block", "challenge", "js_challenge", "managed_challenge"]] = None + """The action to apply to a matched request.""" + + paused: Optional[bool] = None + """When true, indicates that the rule is currently paused.""" diff --git a/src/cloudflare/types/firewall/waf/override.py b/src/cloudflare/types/firewall/waf/override.py index a758b89d18b..2a1312ee4ec 100644 --- a/src/cloudflare/types/firewall/waf/override.py +++ b/src/cloudflare/types/firewall/waf/override.py @@ -27,7 +27,7 @@ class Override(BaseModel): """ paused: Optional[bool] = None - """When true, indicates that the WAF package is currently paused.""" + """When true, indicates that the rule is currently paused.""" priority: Optional[float] = None """ diff --git a/src/cloudflare/types/hyperdrive/config_create_params.py b/src/cloudflare/types/hyperdrive/config_create_params.py index 9a753acdd76..50a65a5af56 100644 --- a/src/cloudflare/types/hyperdrive/config_create_params.py +++ b/src/cloudflare/types/hyperdrive/config_create_params.py @@ -29,6 +29,12 @@ class ConfigCreateParams(TypedDict, total=False): mtls: MTLS + origin_connection_limit: int + """ + The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + """ + class OriginPublicDatabase(TypedDict, total=False): database: Required[str] diff --git a/src/cloudflare/types/hyperdrive/config_edit_params.py b/src/cloudflare/types/hyperdrive/config_edit_params.py index e1d9887063d..8adba3c4f7c 100644 --- a/src/cloudflare/types/hyperdrive/config_edit_params.py +++ b/src/cloudflare/types/hyperdrive/config_edit_params.py @@ -30,6 +30,12 @@ class ConfigEditParams(TypedDict, total=False): origin: Origin + origin_connection_limit: int + """ + The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + """ + class CachingHyperdriveHyperdriveCachingCommon(TypedDict, total=False): disabled: bool diff --git a/src/cloudflare/types/hyperdrive/config_update_params.py b/src/cloudflare/types/hyperdrive/config_update_params.py index c9e8b668194..9e22c66ee81 100644 --- a/src/cloudflare/types/hyperdrive/config_update_params.py +++ b/src/cloudflare/types/hyperdrive/config_update_params.py @@ -29,6 +29,12 @@ class ConfigUpdateParams(TypedDict, total=False): mtls: MTLS + origin_connection_limit: int + """ + The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + """ + class OriginPublicDatabase(TypedDict, total=False): database: Required[str] diff --git a/src/cloudflare/types/hyperdrive/hyperdrive.py b/src/cloudflare/types/hyperdrive/hyperdrive.py index d9ea0507b3d..033b05a5249 100644 --- a/src/cloudflare/types/hyperdrive/hyperdrive.py +++ b/src/cloudflare/types/hyperdrive/hyperdrive.py @@ -111,3 +111,9 @@ class Hyperdrive(BaseModel): """Defines the last modified time of the Hyperdrive configuration.""" mtls: Optional[MTLS] = None + + origin_connection_limit: Optional[int] = None + """ + The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + """ diff --git a/src/cloudflare/types/images/v1_create_params.py b/src/cloudflare/types/images/v1_create_params.py index ede7cddf3e8..d5f63555521 100644 --- a/src/cloudflare/types/images/v1_create_params.py +++ b/src/cloudflare/types/images/v1_create_params.py @@ -4,6 +4,7 @@ from typing_extensions import Required, Annotated, TypedDict +from ..._types import FileTypes from ..._utils import PropertyInfo __all__ = ["V1CreateParams"] @@ -13,7 +14,10 @@ class V1CreateParams(TypedDict, total=False): account_id: Required[str] """Account identifier tag.""" - file: object + id: str + """An optional custom unique identifier for your image.""" + + file: FileTypes """An image binary data. Only needed when type is uploading a file.""" metadata: object diff --git a/src/cloudflare/types/kv/namespace_bulk_delete_params.py b/src/cloudflare/types/kv/namespace_bulk_delete_params.py index 1de9c109a16..48b7416598a 100644 --- a/src/cloudflare/types/kv/namespace_bulk_delete_params.py +++ b/src/cloudflare/types/kv/namespace_bulk_delete_params.py @@ -10,6 +10,6 @@ class NamespaceBulkDeleteParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" body: Required[List[str]] diff --git a/src/cloudflare/types/kv/namespace_bulk_delete_response.py b/src/cloudflare/types/kv/namespace_bulk_delete_response.py index 5cf86953b96..0c3592c90d5 100644 --- a/src/cloudflare/types/kv/namespace_bulk_delete_response.py +++ b/src/cloudflare/types/kv/namespace_bulk_delete_response.py @@ -9,7 +9,7 @@ class NamespaceBulkDeleteResponse(BaseModel): successful_key_count: Optional[float] = None - """Number of keys successfully updated""" + """Number of keys successfully updated.""" unsuccessful_keys: Optional[List[str]] = None """Name of the keys that failed to be fully updated. They should be retried.""" diff --git a/src/cloudflare/types/kv/namespace_bulk_get_params.py b/src/cloudflare/types/kv/namespace_bulk_get_params.py index 9f49de2a982..6b9964e2592 100644 --- a/src/cloudflare/types/kv/namespace_bulk_get_params.py +++ b/src/cloudflare/types/kv/namespace_bulk_get_params.py @@ -12,13 +12,13 @@ class NamespaceBulkGetParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" keys: Required[List[str]] - """Array of keys to retrieve (maximum 100)""" + """Array of keys to retrieve (maximum of 100).""" type: Literal["text", "json"] - """Whether to parse JSON values in the response""" + """Whether to parse JSON values in the response.""" with_metadata: Annotated[bool, PropertyInfo(alias="withMetadata")] - """Whether to include metadata in the response""" + """Whether to include metadata in the response.""" diff --git a/src/cloudflare/types/kv/namespace_bulk_get_response.py b/src/cloudflare/types/kv/namespace_bulk_get_response.py index 8a590e1caa2..e43c7fe848c 100644 --- a/src/cloudflare/types/kv/namespace_bulk_get_response.py +++ b/src/cloudflare/types/kv/namespace_bulk_get_response.py @@ -15,26 +15,24 @@ class WorkersKVBulkGetResult(BaseModel): values: Optional[Dict[str, Union[str, float, bool, Dict[str, object]]]] = None - """Requested keys are paired with their values in an object""" + """Requested keys are paired with their values in an object.""" class WorkersKVBulkGetResultWithMetadataValues(BaseModel): - metadata: Optional[Dict[str, object]] = None - """The metadata associated with the key""" + metadata: object - value: Union[str, float, bool, Dict[str, object]] - """The value associated with the key""" + value: object expiration: Optional[float] = None """ - The time, measured in number of seconds since the UNIX epoch, at which the key - should expire. + Expires the key at a certain time, measured in number of seconds since the UNIX + epoch. """ class WorkersKVBulkGetResultWithMetadata(BaseModel): values: Optional[Dict[str, Optional[WorkersKVBulkGetResultWithMetadataValues]]] = None - """Requested keys are paired with their values and metadata in an object""" + """Requested keys are paired with their values and metadata in an object.""" NamespaceBulkGetResponse: TypeAlias = Union[WorkersKVBulkGetResult, WorkersKVBulkGetResultWithMetadata, None] diff --git a/src/cloudflare/types/kv/namespace_bulk_update_params.py b/src/cloudflare/types/kv/namespace_bulk_update_params.py index e1ce68a86b6..f5b480bf42f 100644 --- a/src/cloudflare/types/kv/namespace_bulk_update_params.py +++ b/src/cloudflare/types/kv/namespace_bulk_update_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Dict, Iterable +from typing import Iterable from typing_extensions import Required, TypedDict __all__ = ["NamespaceBulkUpdateParams", "Body"] @@ -10,40 +10,36 @@ class NamespaceBulkUpdateParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" body: Required[Iterable[Body]] class Body(TypedDict, total=False): - base64: bool - """Whether or not the server should base64 decode the value before storing it. + key: Required[str] + """A key's name. - Useful for writing values that wouldn't otherwise be valid JSON strings, such as - images. + The name may be at most 512 bytes. All printable, non-whitespace characters are + valid. """ - expiration: float + value: Required[str] + """A UTF-8 encoded string to be stored, up to 25 MiB in length.""" + + base64: bool """ - The time, measured in number of seconds since the UNIX epoch, at which the key - should expire. + Indicates whether or not the server should base64 decode the value before + storing it. Useful for writing values that wouldn't otherwise be valid JSON + strings, such as images. """ - expiration_ttl: float - """The number of seconds for which the key should be visible before it expires. - - At least 60. + expiration: float """ - - key: str - """A key's name. - - The name may be at most 512 bytes. All printable, non-whitespace characters are - valid. + Expires the key at a certain time, measured in number of seconds since the UNIX + epoch. """ - metadata: Dict[str, object] - """Arbitrary JSON that is associated with a key.""" + expiration_ttl: float + """Expires the key after a number of seconds. Must be at least 60.""" - value: str - """A UTF-8 encoded string to be stored, up to 25 MiB in length.""" + metadata: object diff --git a/src/cloudflare/types/kv/namespace_bulk_update_response.py b/src/cloudflare/types/kv/namespace_bulk_update_response.py index 6076c1444f5..3b67c223d81 100644 --- a/src/cloudflare/types/kv/namespace_bulk_update_response.py +++ b/src/cloudflare/types/kv/namespace_bulk_update_response.py @@ -9,7 +9,7 @@ class NamespaceBulkUpdateResponse(BaseModel): successful_key_count: Optional[float] = None - """Number of keys successfully updated""" + """Number of keys successfully updated.""" unsuccessful_keys: Optional[List[str]] = None """Name of the keys that failed to be fully updated. They should be retried.""" diff --git a/src/cloudflare/types/kv/namespace_create_params.py b/src/cloudflare/types/kv/namespace_create_params.py index 876990c7603..85397033b26 100644 --- a/src/cloudflare/types/kv/namespace_create_params.py +++ b/src/cloudflare/types/kv/namespace_create_params.py @@ -9,7 +9,7 @@ class NamespaceCreateParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" title: Required[str] """A human-readable string name for a Namespace.""" diff --git a/src/cloudflare/types/kv/namespace_list_params.py b/src/cloudflare/types/kv/namespace_list_params.py index 2c832c88595..8c217e6fef4 100644 --- a/src/cloudflare/types/kv/namespace_list_params.py +++ b/src/cloudflare/types/kv/namespace_list_params.py @@ -9,7 +9,7 @@ class NamespaceListParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" direction: Literal["asc", "desc"] """Direction to order namespaces.""" diff --git a/src/cloudflare/types/kv/namespace_update_params.py b/src/cloudflare/types/kv/namespace_update_params.py index 531377b614b..71f317ca4e4 100644 --- a/src/cloudflare/types/kv/namespace_update_params.py +++ b/src/cloudflare/types/kv/namespace_update_params.py @@ -9,7 +9,7 @@ class NamespaceUpdateParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" title: Required[str] """A human-readable string name for a Namespace.""" diff --git a/src/cloudflare/types/kv/namespaces/__init__.py b/src/cloudflare/types/kv/namespaces/__init__.py index 48f776acf2e..34b5eaa0716 100644 --- a/src/cloudflare/types/kv/namespaces/__init__.py +++ b/src/cloudflare/types/kv/namespaces/__init__.py @@ -7,7 +7,6 @@ from .key_bulk_get_params import KeyBulkGetParams as KeyBulkGetParams from .value_update_params import ValueUpdateParams as ValueUpdateParams from .key_bulk_get_response import KeyBulkGetResponse as KeyBulkGetResponse -from .metadata_get_response import MetadataGetResponse as MetadataGetResponse from .value_delete_response import ValueDeleteResponse as ValueDeleteResponse from .value_update_response import ValueUpdateResponse as ValueUpdateResponse from .key_bulk_delete_params import KeyBulkDeleteParams as KeyBulkDeleteParams diff --git a/src/cloudflare/types/kv/namespaces/key.py b/src/cloudflare/types/kv/namespaces/key.py index 5b48057e954..35cfefbf3f8 100644 --- a/src/cloudflare/types/kv/namespaces/key.py +++ b/src/cloudflare/types/kv/namespaces/key.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, Optional +from typing import Optional from ...._models import BaseModel @@ -21,5 +21,4 @@ class Key(BaseModel): will expire. This property is omitted for keys that will not expire. """ - metadata: Optional[Dict[str, object]] = None - """Arbitrary JSON that is associated with a key.""" + metadata: Optional[object] = None diff --git a/src/cloudflare/types/kv/namespaces/key_bulk_delete_params.py b/src/cloudflare/types/kv/namespaces/key_bulk_delete_params.py index 37cb14a66f5..7aa53a77075 100644 --- a/src/cloudflare/types/kv/namespaces/key_bulk_delete_params.py +++ b/src/cloudflare/types/kv/namespaces/key_bulk_delete_params.py @@ -10,6 +10,6 @@ class KeyBulkDeleteParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" body: Required[List[str]] diff --git a/src/cloudflare/types/kv/namespaces/key_bulk_delete_response.py b/src/cloudflare/types/kv/namespaces/key_bulk_delete_response.py index 39e93931ddd..d533940c000 100644 --- a/src/cloudflare/types/kv/namespaces/key_bulk_delete_response.py +++ b/src/cloudflare/types/kv/namespaces/key_bulk_delete_response.py @@ -9,7 +9,7 @@ class KeyBulkDeleteResponse(BaseModel): successful_key_count: Optional[float] = None - """Number of keys successfully updated""" + """Number of keys successfully updated.""" unsuccessful_keys: Optional[List[str]] = None """Name of the keys that failed to be fully updated. They should be retried.""" diff --git a/src/cloudflare/types/kv/namespaces/key_bulk_get_params.py b/src/cloudflare/types/kv/namespaces/key_bulk_get_params.py index aa64e6454fd..d7e0801fa6d 100644 --- a/src/cloudflare/types/kv/namespaces/key_bulk_get_params.py +++ b/src/cloudflare/types/kv/namespaces/key_bulk_get_params.py @@ -12,13 +12,13 @@ class KeyBulkGetParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" keys: Required[List[str]] - """Array of keys to retrieve (maximum 100)""" + """Array of keys to retrieve (maximum of 100).""" type: Literal["text", "json"] - """Whether to parse JSON values in the response""" + """Whether to parse JSON values in the response.""" with_metadata: Annotated[bool, PropertyInfo(alias="withMetadata")] - """Whether to include metadata in the response""" + """Whether to include metadata in the response.""" diff --git a/src/cloudflare/types/kv/namespaces/key_bulk_get_response.py b/src/cloudflare/types/kv/namespaces/key_bulk_get_response.py index f4b93663728..f4901591f7e 100644 --- a/src/cloudflare/types/kv/namespaces/key_bulk_get_response.py +++ b/src/cloudflare/types/kv/namespaces/key_bulk_get_response.py @@ -15,26 +15,24 @@ class WorkersKVBulkGetResult(BaseModel): values: Optional[Dict[str, Union[str, float, bool, Dict[str, object]]]] = None - """Requested keys are paired with their values in an object""" + """Requested keys are paired with their values in an object.""" class WorkersKVBulkGetResultWithMetadataValues(BaseModel): - metadata: Optional[Dict[str, object]] = None - """The metadata associated with the key""" + metadata: object - value: Union[str, float, bool, Dict[str, object]] - """The value associated with the key""" + value: object expiration: Optional[float] = None """ - The time, measured in number of seconds since the UNIX epoch, at which the key - should expire. + Expires the key at a certain time, measured in number of seconds since the UNIX + epoch. """ class WorkersKVBulkGetResultWithMetadata(BaseModel): values: Optional[Dict[str, Optional[WorkersKVBulkGetResultWithMetadataValues]]] = None - """Requested keys are paired with their values and metadata in an object""" + """Requested keys are paired with their values and metadata in an object.""" KeyBulkGetResponse: TypeAlias = Union[WorkersKVBulkGetResult, WorkersKVBulkGetResultWithMetadata, None] diff --git a/src/cloudflare/types/kv/namespaces/key_bulk_update_params.py b/src/cloudflare/types/kv/namespaces/key_bulk_update_params.py index 4e03451367a..1786cf98ad1 100644 --- a/src/cloudflare/types/kv/namespaces/key_bulk_update_params.py +++ b/src/cloudflare/types/kv/namespaces/key_bulk_update_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Dict, Iterable +from typing import Iterable from typing_extensions import Required, TypedDict __all__ = ["KeyBulkUpdateParams", "Body"] @@ -10,40 +10,36 @@ class KeyBulkUpdateParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" body: Required[Iterable[Body]] class Body(TypedDict, total=False): - base64: bool - """Whether or not the server should base64 decode the value before storing it. + key: Required[str] + """A key's name. - Useful for writing values that wouldn't otherwise be valid JSON strings, such as - images. + The name may be at most 512 bytes. All printable, non-whitespace characters are + valid. """ - expiration: float + value: Required[str] + """A UTF-8 encoded string to be stored, up to 25 MiB in length.""" + + base64: bool """ - The time, measured in number of seconds since the UNIX epoch, at which the key - should expire. + Indicates whether or not the server should base64 decode the value before + storing it. Useful for writing values that wouldn't otherwise be valid JSON + strings, such as images. """ - expiration_ttl: float - """The number of seconds for which the key should be visible before it expires. - - At least 60. + expiration: float """ - - key: str - """A key's name. - - The name may be at most 512 bytes. All printable, non-whitespace characters are - valid. + Expires the key at a certain time, measured in number of seconds since the UNIX + epoch. """ - metadata: Dict[str, object] - """Arbitrary JSON that is associated with a key.""" + expiration_ttl: float + """Expires the key after a number of seconds. Must be at least 60.""" - value: str - """A UTF-8 encoded string to be stored, up to 25 MiB in length.""" + metadata: object diff --git a/src/cloudflare/types/kv/namespaces/key_bulk_update_response.py b/src/cloudflare/types/kv/namespaces/key_bulk_update_response.py index abe3b5b5794..1a13f4265c0 100644 --- a/src/cloudflare/types/kv/namespaces/key_bulk_update_response.py +++ b/src/cloudflare/types/kv/namespaces/key_bulk_update_response.py @@ -9,7 +9,7 @@ class KeyBulkUpdateResponse(BaseModel): successful_key_count: Optional[float] = None - """Number of keys successfully updated""" + """Number of keys successfully updated.""" unsuccessful_keys: Optional[List[str]] = None """Name of the keys that failed to be fully updated. They should be retried.""" diff --git a/src/cloudflare/types/kv/namespaces/key_list_params.py b/src/cloudflare/types/kv/namespaces/key_list_params.py index 230b7b1986e..804e1ee1c56 100644 --- a/src/cloudflare/types/kv/namespaces/key_list_params.py +++ b/src/cloudflare/types/kv/namespaces/key_list_params.py @@ -9,7 +9,7 @@ class KeyListParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" cursor: str """ @@ -20,14 +20,14 @@ class KeyListParams(TypedDict, total=False): """ limit: float - """The number of keys to return. + """Limits the number of keys returned in the response. The cursor attribute may be used to iterate over the next batch of keys if there are more than the limit. """ prefix: str - """A string prefix used to filter down which keys will be returned. + """Filters returned keys by a name prefix. Exact matches and any key names that begin with the prefix will be returned. """ diff --git a/src/cloudflare/types/kv/namespaces/metadata_get_response.py b/src/cloudflare/types/kv/namespaces/metadata_get_response.py deleted file mode 100644 index 74bf2b5c93e..00000000000 --- a/src/cloudflare/types/kv/namespaces/metadata_get_response.py +++ /dev/null @@ -1,8 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Dict -from typing_extensions import TypeAlias - -__all__ = ["MetadataGetResponse"] - -MetadataGetResponse: TypeAlias = Dict[str, object] diff --git a/src/cloudflare/types/kv/namespaces/value_update_params.py b/src/cloudflare/types/kv/namespaces/value_update_params.py index 67d59ae19aa..97e720132fd 100644 --- a/src/cloudflare/types/kv/namespaces/value_update_params.py +++ b/src/cloudflare/types/kv/namespaces/value_update_params.py @@ -9,25 +9,21 @@ class ValueUpdateParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" namespace_id: Required[str] """Namespace identifier tag.""" - metadata: Required[str] - """Arbitrary JSON to be associated with a key/value pair.""" - value: Required[str] """A byte sequence to be stored, up to 25 MiB in length.""" expiration: float """ - The time, measured in number of seconds since the UNIX epoch, at which the key - should expire. + Expires the key at a certain time, measured in number of seconds since the UNIX + epoch. """ expiration_ttl: float - """The number of seconds for which the key should be visible before it expires. + """Expires the key after a number of seconds. Must be at least 60.""" - At least 60. - """ + metadata: object diff --git a/src/cloudflare/types/logpush/job_create_params.py b/src/cloudflare/types/logpush/job_create_params.py index f886d78e9be..29757863a77 100644 --- a/src/cloudflare/types/logpush/job_create_params.py +++ b/src/cloudflare/types/logpush/job_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Optional +from typing import Union, Optional from typing_extensions import Literal, Required, TypedDict from .output_options_param import OutputOptionsParam @@ -77,11 +77,10 @@ class JobCreateParams(TypedDict, total=False): in smaller quantities of larger files. """ - kind: Literal["edge"] + kind: Literal["", "edge"] """ The kind parameter (optional) is used to differentiate between Logpush and Edge - Log Delivery jobs. Currently, Edge Log Delivery is only supported for the - `http_requests` dataset. + Log Delivery jobs (when supported by the dataset). """ logpull_options: Optional[str] @@ -93,31 +92,28 @@ class JobCreateParams(TypedDict, total=False): keep on making this call for you, setting start and end times appropriately. """ - max_upload_bytes: Optional[int] + max_upload_bytes: Union[Literal[0], object, None] """The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much - smaller than this batch size. This parameter is not available for jobs with - `edge` as its kind. + smaller than this batch size. """ - max_upload_interval_seconds: Optional[int] + max_upload_interval_seconds: Union[Literal[0], object, None] """The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means - that log files may be sent in shorter intervals than this. This parameter is - only used for jobs with `edge` as its kind. + that log files may be sent in shorter intervals than this. """ - max_upload_records: Optional[int] + max_upload_records: Union[Literal[0], object, None] """The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means - that log files may contain many fewer lines than this. This parameter is not - available for jobs with `edge` as its kind. + that log files may contain many fewer lines than this. """ name: Optional[str] diff --git a/src/cloudflare/types/logpush/job_update_params.py b/src/cloudflare/types/logpush/job_update_params.py index d651e2dda90..4f3357c76f1 100644 --- a/src/cloudflare/types/logpush/job_update_params.py +++ b/src/cloudflare/types/logpush/job_update_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Optional +from typing import Union, Optional from typing_extensions import Literal, TypedDict from .output_options_param import OutputOptionsParam @@ -43,11 +43,10 @@ class JobUpdateParams(TypedDict, total=False): in smaller quantities of larger files. """ - kind: Literal["edge"] + kind: Literal["", "edge"] """ The kind parameter (optional) is used to differentiate between Logpush and Edge - Log Delivery jobs. Currently, Edge Log Delivery is only supported for the - `http_requests` dataset. + Log Delivery jobs (when supported by the dataset). """ logpull_options: Optional[str] @@ -59,31 +58,28 @@ class JobUpdateParams(TypedDict, total=False): keep on making this call for you, setting start and end times appropriately. """ - max_upload_bytes: Optional[int] + max_upload_bytes: Union[Literal[0], object, None] """The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much - smaller than this batch size. This parameter is not available for jobs with - `edge` as its kind. + smaller than this batch size. """ - max_upload_interval_seconds: Optional[int] + max_upload_interval_seconds: Union[Literal[0], object, None] """The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means - that log files may be sent in shorter intervals than this. This parameter is - only used for jobs with `edge` as its kind. + that log files may be sent in shorter intervals than this. """ - max_upload_records: Optional[int] + max_upload_records: Union[Literal[0], object, None] """The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means - that log files may contain many fewer lines than this. This parameter is not - available for jobs with `edge` as its kind. + that log files may contain many fewer lines than this. """ name: Optional[str] diff --git a/src/cloudflare/types/logpush/logpush_job.py b/src/cloudflare/types/logpush/logpush_job.py index e6c5006b0dc..b89bb376d8b 100644 --- a/src/cloudflare/types/logpush/logpush_job.py +++ b/src/cloudflare/types/logpush/logpush_job.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import Union, Optional from datetime import datetime from typing_extensions import Literal @@ -75,11 +75,10 @@ class LogpushJob(BaseModel): in smaller quantities of larger files. """ - kind: Optional[Literal["edge"]] = None + kind: Optional[Literal["", "edge"]] = None """ The kind parameter (optional) is used to differentiate between Logpush and Edge - Log Delivery jobs. Currently, Edge Log Delivery is only supported for the - `http_requests` dataset. + Log Delivery jobs (when supported by the dataset). """ last_complete: Optional[datetime] = None @@ -108,31 +107,28 @@ class LogpushJob(BaseModel): keep on making this call for you, setting start and end times appropriately. """ - max_upload_bytes: Optional[int] = None + max_upload_bytes: Union[Literal[0], object, None] = None """The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much - smaller than this batch size. This parameter is not available for jobs with - `edge` as its kind. + smaller than this batch size. """ - max_upload_interval_seconds: Optional[int] = None + max_upload_interval_seconds: Union[Literal[0], object, None] = None """The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means - that log files may be sent in shorter intervals than this. This parameter is - only used for jobs with `edge` as its kind. + that log files may be sent in shorter intervals than this. """ - max_upload_records: Optional[int] = None + max_upload_records: Union[Literal[0], object, None] = None """The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means - that log files may contain many fewer lines than this. This parameter is not - available for jobs with `edge` as its kind. + that log files may contain many fewer lines than this. """ name: Optional[str] = None diff --git a/src/cloudflare/types/magic_transit/__init__.py b/src/cloudflare/types/magic_transit/__init__.py index 4bca98d1cde..700b72f955b 100644 --- a/src/cloudflare/types/magic_transit/__init__.py +++ b/src/cloudflare/types/magic_transit/__init__.py @@ -41,6 +41,7 @@ from .route_delete_response import RouteDeleteResponse as RouteDeleteResponse from .route_update_response import RouteUpdateResponse as RouteUpdateResponse from .connector_get_response import ConnectorGetResponse as ConnectorGetResponse +from .connector_create_params import ConnectorCreateParams as ConnectorCreateParams from .connector_edit_response import ConnectorEditResponse as ConnectorEditResponse from .connector_list_response import ConnectorListResponse as ConnectorListResponse from .connector_update_params import ConnectorUpdateParams as ConnectorUpdateParams @@ -49,6 +50,8 @@ from .gre_tunnel_list_response import GRETunnelListResponse as GRETunnelListResponse from .gre_tunnel_update_params import GRETunnelUpdateParams as GRETunnelUpdateParams from .route_bulk_update_params import RouteBulkUpdateParams as RouteBulkUpdateParams +from .connector_create_response import ConnectorCreateResponse as ConnectorCreateResponse +from .connector_delete_response import ConnectorDeleteResponse as ConnectorDeleteResponse from .connector_update_response import ConnectorUpdateResponse as ConnectorUpdateResponse from .ipsec_tunnel_get_response import IPSECTunnelGetResponse as IPSECTunnelGetResponse from .gre_tunnel_create_response import GRETunnelCreateResponse as GRETunnelCreateResponse diff --git a/src/cloudflare/types/magic_transit/connector_create_params.py b/src/cloudflare/types/magic_transit/connector_create_params.py new file mode 100644 index 00000000000..3325692038f --- /dev/null +++ b/src/cloudflare/types/magic_transit/connector_create_params.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["ConnectorCreateParams", "Device"] + + +class ConnectorCreateParams(TypedDict, total=False): + account_id: Required[str] + """Account identifier""" + + device: Required[Device] + + activated: bool + + interrupt_window_duration_hours: float + + interrupt_window_hour_of_day: float + + notes: str + + timezone: str + + +class Device(TypedDict, total=False): + id: str + + serial_number: str diff --git a/src/cloudflare/types/magic_transit/connector_create_response.py b/src/cloudflare/types/magic_transit/connector_create_response.py new file mode 100644 index 00000000000..02edf9b3370 --- /dev/null +++ b/src/cloudflare/types/magic_transit/connector_create_response.py @@ -0,0 +1,35 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["ConnectorCreateResponse", "Device"] + + +class Device(BaseModel): + id: str + + serial_number: Optional[str] = None + + +class ConnectorCreateResponse(BaseModel): + id: str + + activated: bool + + interrupt_window_duration_hours: float + + interrupt_window_hour_of_day: float + + last_updated: str + + notes: str + + timezone: str + + device: Optional[Device] = None + + last_heartbeat: Optional[str] = None + + last_seen_version: Optional[str] = None diff --git a/src/cloudflare/types/magic_transit/connector_delete_response.py b/src/cloudflare/types/magic_transit/connector_delete_response.py new file mode 100644 index 00000000000..7b07e28c483 --- /dev/null +++ b/src/cloudflare/types/magic_transit/connector_delete_response.py @@ -0,0 +1,35 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["ConnectorDeleteResponse", "Device"] + + +class Device(BaseModel): + id: str + + serial_number: Optional[str] = None + + +class ConnectorDeleteResponse(BaseModel): + id: str + + activated: bool + + interrupt_window_duration_hours: float + + interrupt_window_hour_of_day: float + + last_updated: str + + notes: str + + timezone: str + + device: Optional[Device] = None + + last_heartbeat: Optional[str] = None + + last_seen_version: Optional[str] = None diff --git a/src/cloudflare/types/radar/__init__.py b/src/cloudflare/types/radar/__init__.py index d2ee6584473..6f15952230b 100644 --- a/src/cloudflare/types/radar/__init__.py +++ b/src/cloudflare/types/radar/__init__.py @@ -2,16 +2,23 @@ from __future__ import annotations +from .bot_get_params import BotGetParams as BotGetParams +from .bot_list_params import BotListParams as BotListParams +from .bot_get_response import BotGetResponse as BotGetResponse +from .bot_list_response import BotListResponse as BotListResponse from .entity_get_params import EntityGetParams as EntityGetParams +from .bot_summary_params import BotSummaryParams as BotSummaryParams from .radar_email_series import RadarEmailSeries as RadarEmailSeries from .ranking_top_params import RankingTopParams as RankingTopParams from .dataset_list_params import DatasetListParams as DatasetListParams from .entity_get_response import EntityGetResponse as EntityGetResponse from .radar_email_summary import RadarEmailSummary as RadarEmailSummary +from .bot_summary_response import BotSummaryResponse as BotSummaryResponse from .dataset_get_response import DatasetGetResponse as DatasetGetResponse from .ranking_top_response import RankingTopResponse as RankingTopResponse from .search_global_params import SearchGlobalParams as SearchGlobalParams from .bgp_timeseries_params import BGPTimeseriesParams as BGPTimeseriesParams +from .bot_timeseries_params import BotTimeseriesParams as BotTimeseriesParams from .dataset_list_response import DatasetListResponse as DatasetListResponse from .dns_timeseries_params import DNSTimeseriesParams as DNSTimeseriesParams from .annotation_list_params import AnnotationListParams as AnnotationListParams @@ -20,6 +27,7 @@ from .search_global_response import SearchGlobalResponse as SearchGlobalResponse from .as112_timeseries_params import AS112TimeseriesParams as AS112TimeseriesParams from .bgp_timeseries_response import BGPTimeseriesResponse as BGPTimeseriesResponse +from .bot_timeseries_response import BotTimeseriesResponse as BotTimeseriesResponse from .dataset_download_params import DatasetDownloadParams as DatasetDownloadParams from .dns_timeseries_response import DNSTimeseriesResponse as DNSTimeseriesResponse from .annotation_list_response import AnnotationListResponse as AnnotationListResponse @@ -30,7 +38,9 @@ from .netflow_timeseries_params import NetflowTimeseriesParams as NetflowTimeseriesParams from .traffic_anomaly_get_params import TrafficAnomalyGetParams as TrafficAnomalyGetParams from .netflow_timeseries_response import NetflowTimeseriesResponse as NetflowTimeseriesResponse +from .bot_timeseries_groups_params import BotTimeseriesGroupsParams as BotTimeseriesGroupsParams from .traffic_anomaly_get_response import TrafficAnomalyGetResponse as TrafficAnomalyGetResponse +from .bot_timeseries_groups_response import BotTimeseriesGroupsResponse as BotTimeseriesGroupsResponse from .ranking_timeseries_groups_params import RankingTimeseriesGroupsParams as RankingTimeseriesGroupsParams from .tcp_resets_timeout_summary_params import TCPResetsTimeoutSummaryParams as TCPResetsTimeoutSummaryParams from .ranking_timeseries_groups_response import RankingTimeseriesGroupsResponse as RankingTimeseriesGroupsResponse diff --git a/src/cloudflare/types/radar/as112_timeseries_response.py b/src/cloudflare/types/radar/as112_timeseries_response.py index ed23b66b45f..46a96f7dd7e 100644 --- a/src/cloudflare/types/radar/as112_timeseries_response.py +++ b/src/cloudflare/types/radar/as112_timeseries_response.py @@ -7,7 +7,7 @@ from pydantic import Field as FieldInfo from ..._models import BaseModel -from .as112_timeseries_response import UnnamedTypeWithobjectParent1UnnamedTypeWithobjectParent1Item +from .as112_timeseries_response import UnnamedTypeWithobjectParent2UnnamedTypeWithobjectParent2Item __all__ = [ "AS112TimeseriesResponse", @@ -102,4 +102,4 @@ class AS112TimeseriesResponse(BaseModel): # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent1UnnamedTypeWithobjectParent1Item: ... + def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent2UnnamedTypeWithobjectParent2Item: ... diff --git a/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py b/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py index 18b51a6a0d4..d689c8fbc51 100644 --- a/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py +++ b/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py @@ -7,7 +7,7 @@ from pydantic import Field as FieldInfo from ...._models import BaseModel -from .layer3_timeseries_response import UnnamedTypeWithobjectParent2UnnamedTypeWithobjectParent2Item +from .layer3_timeseries_response import UnnamedTypeWithobjectParent3UnnamedTypeWithobjectParent3Item __all__ = [ "Layer3TimeseriesResponse", @@ -102,4 +102,4 @@ class Layer3TimeseriesResponse(BaseModel): # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent2UnnamedTypeWithobjectParent2Item: ... + def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent3UnnamedTypeWithobjectParent3Item: ... diff --git a/src/cloudflare/types/radar/bot_get_params.py b/src/cloudflare/types/radar/bot_get_params.py new file mode 100644 index 00000000000..85b78dcff72 --- /dev/null +++ b/src/cloudflare/types/radar/bot_get_params.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, TypedDict + +__all__ = ["BotGetParams"] + + +class BotGetParams(TypedDict, total=False): + format: Literal["JSON", "CSV"] + """Format in which results will be returned.""" diff --git a/src/cloudflare/types/radar/bot_get_response.py b/src/cloudflare/types/radar/bot_get_response.py new file mode 100644 index 00000000000..4aeeb0b82c6 --- /dev/null +++ b/src/cloudflare/types/radar/bot_get_response.py @@ -0,0 +1,37 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel + +__all__ = ["BotGetResponse", "Bot"] + + +class Bot(BaseModel): + category: str + """The category of the bot.""" + + description: str + """A summary for the bot (e.g., purpose).""" + + name: str + """The name of the bot.""" + + operator: str + """The organization that owns and operates the bot.""" + + operator_url: str = FieldInfo(alias="operatorUrl") + """The link to the bot documentation.""" + + slug: str + """A kebab-case identifier derived from the bot name.""" + + user_agent_patterns: List[str] = FieldInfo(alias="userAgentPatterns") + + user_agents: List[str] = FieldInfo(alias="userAgents") + + +class BotGetResponse(BaseModel): + bot: Bot diff --git a/src/cloudflare/types/radar/bot_list_params.py b/src/cloudflare/types/radar/bot_list_params.py new file mode 100644 index 00000000000..5f24b188b0d --- /dev/null +++ b/src/cloudflare/types/radar/bot_list_params.py @@ -0,0 +1,49 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["BotListParams"] + + +class BotListParams(TypedDict, total=False): + bot_category: Annotated[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ], + PropertyInfo(alias="botCategory"), + ] + """Filters results by bot category.""" + + bot_operator: Annotated[str, PropertyInfo(alias="botOperator")] + """Filters results by bot operator.""" + + bot_verification_status: Annotated[Literal["VERIFIED"], PropertyInfo(alias="botVerificationStatus")] + """Filters results by bot verification status.""" + + format: Literal["JSON", "CSV"] + """Format in which results will be returned.""" + + limit: int + """Limits the number of objects returned in the response.""" + + offset: int + """Skips the specified number of objects before fetching the results.""" diff --git a/src/cloudflare/types/radar/bot_list_response.py b/src/cloudflare/types/radar/bot_list_response.py new file mode 100644 index 00000000000..66e1fdb72d9 --- /dev/null +++ b/src/cloudflare/types/radar/bot_list_response.py @@ -0,0 +1,28 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List + +from ..._models import BaseModel + +__all__ = ["BotListResponse", "Bot"] + + +class Bot(BaseModel): + category: str + """The category of the bot.""" + + description: str + """A summary for the bot (e.g., purpose).""" + + name: str + """The name of the bot.""" + + operator: str + """The organization that owns and operates the bot.""" + + slug: str + """A kebab-case identifier derived from the bot name.""" + + +class BotListResponse(BaseModel): + bots: List[Bot] diff --git a/src/cloudflare/types/radar/bot_summary_params.py b/src/cloudflare/types/radar/bot_summary_params.py new file mode 100644 index 00000000000..f8a439351d2 --- /dev/null +++ b/src/cloudflare/types/radar/bot_summary_params.py @@ -0,0 +1,98 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["BotSummaryParams"] + + +class BotSummaryParams(TypedDict, total=False): + asn: List[str] + """Filters results by Autonomous System. + + Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. + Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes + results from AS174, but includes results from AS3356. + """ + + bot: List[str] + """Filters results by bot name.""" + + bot_category: Annotated[ + List[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + ], + PropertyInfo(alias="botCategory"), + ] + """Filters results by bot category.""" + + bot_operator: Annotated[List[str], PropertyInfo(alias="botOperator")] + """Filters results by bot operator.""" + + bot_verification_status: Annotated[List[Literal["VERIFIED"]], PropertyInfo(alias="botVerificationStatus")] + """Filters results by bot verification status (Verified vs. Unverified).""" + + continent: List[str] + """Filters results by continent. + + Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude + continents from results. For example, `-EU,NA` excludes results from EU, but + includes results from NA. + """ + + date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] + """End of the date range (inclusive).""" + + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] + """Filters results by date range. + + For example, use `7d` and `7dcontrol` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + """ + + date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")] + """Start of the date range.""" + + format: Literal["JSON", "CSV"] + """Format in which results will be returned.""" + + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + """ + + location: List[str] + """Filters results by location. + + Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude + locations from results. For example, `-US,PT` excludes results from the US, but + includes results from PT. + """ + + name: List[str] + """Array of names used to label the series in the response.""" diff --git a/src/cloudflare/types/radar/bot_summary_response.py b/src/cloudflare/types/radar/bot_summary_response.py new file mode 100644 index 00000000000..a3d33a4143a --- /dev/null +++ b/src/cloudflare/types/radar/bot_summary_response.py @@ -0,0 +1,91 @@ +# 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 pydantic import Field as FieldInfo + +from ..._models import BaseModel + +__all__ = [ + "BotSummaryResponse", + "Meta", + "MetaConfidenceInfo", + "MetaConfidenceInfoAnnotation", + "MetaDateRange", + "MetaUnit", +] + + +class MetaConfidenceInfoAnnotation(BaseModel): + data_source: str = FieldInfo(alias="dataSource") + + description: str + + end_date: datetime = FieldInfo(alias="endDate") + + event_type: str = FieldInfo(alias="eventType") + + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") + """Whether event is a single point in time or a time range.""" + + linked_url: str = FieldInfo(alias="linkedUrl") + + start_date: datetime = FieldInfo(alias="startDate") + + +class MetaConfidenceInfo(BaseModel): + annotations: List[MetaConfidenceInfoAnnotation] + + level: int + """Provides an indication of how much confidence Cloudflare has in the data.""" + + +class MetaDateRange(BaseModel): + end_time: datetime = FieldInfo(alias="endTime") + """Adjusted end of date range.""" + + start_time: datetime = FieldInfo(alias="startTime") + """Adjusted start of date range.""" + + +class MetaUnit(BaseModel): + name: str + + value: str + + +class Meta(BaseModel): + confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + + date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") + + last_updated: datetime = FieldInfo(alias="lastUpdated") + """Timestamp of the last dataset update.""" + + normalization: Literal[ + "PERCENTAGE", + "MIN0_MAX", + "MIN_MAX", + "RAW_VALUES", + "PERCENTAGE_CHANGE", + "ROLLING_AVERAGE", + "OVERLAPPED_PERCENTAGE", + "RATIO", + ] + """Normalization method applied to the results. + + Refer to + [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). + """ + + units: List[MetaUnit] + """Measurement units for the results.""" + + +class BotSummaryResponse(BaseModel): + meta: Meta + """Metadata for the results.""" + + summary_0: Dict[str, str] diff --git a/src/cloudflare/types/radar/bot_timeseries_groups_params.py b/src/cloudflare/types/radar/bot_timeseries_groups_params.py new file mode 100644 index 00000000000..efab8a5c95b --- /dev/null +++ b/src/cloudflare/types/radar/bot_timeseries_groups_params.py @@ -0,0 +1,105 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["BotTimeseriesGroupsParams"] + + +class BotTimeseriesGroupsParams(TypedDict, total=False): + agg_interval: Annotated[Literal["15m", "1h", "1d", "1w"], PropertyInfo(alias="aggInterval")] + """Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + """ + + asn: List[str] + """Filters results by Autonomous System. + + Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. + Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes + results from AS174, but includes results from AS3356. + """ + + bot: List[str] + """Filters results by bot name.""" + + bot_category: Annotated[ + List[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + ], + PropertyInfo(alias="botCategory"), + ] + """Filters results by bot category.""" + + bot_operator: Annotated[List[str], PropertyInfo(alias="botOperator")] + """Filters results by bot operator.""" + + bot_verification_status: Annotated[List[Literal["VERIFIED"]], PropertyInfo(alias="botVerificationStatus")] + """Filters results by bot verification status (Verified vs. Unverified).""" + + continent: List[str] + """Filters results by continent. + + Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude + continents from results. For example, `-EU,NA` excludes results from EU, but + includes results from NA. + """ + + date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] + """End of the date range (inclusive).""" + + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] + """Filters results by date range. + + For example, use `7d` and `7dcontrol` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + """ + + date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")] + """Start of the date range.""" + + format: Literal["JSON", "CSV"] + """Format in which results will be returned.""" + + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + """ + + location: List[str] + """Filters results by location. + + Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude + locations from results. For example, `-US,PT` excludes results from the US, but + includes results from PT. + """ + + name: List[str] + """Array of names used to label the series in the response.""" diff --git a/src/cloudflare/types/radar/bot_timeseries_groups_response.py b/src/cloudflare/types/radar/bot_timeseries_groups_response.py new file mode 100644 index 00000000000..5a2913f66a9 --- /dev/null +++ b/src/cloudflare/types/radar/bot_timeseries_groups_response.py @@ -0,0 +1,111 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, List +from datetime import datetime +from typing_extensions import Literal + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel + +__all__ = [ + "BotTimeseriesGroupsResponse", + "Meta", + "MetaConfidenceInfo", + "MetaConfidenceInfoAnnotation", + "MetaDateRange", + "MetaUnit", + "Serie0", +] + + +class MetaConfidenceInfoAnnotation(BaseModel): + data_source: str = FieldInfo(alias="dataSource") + + description: str + + end_date: datetime = FieldInfo(alias="endDate") + + event_type: str = FieldInfo(alias="eventType") + + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") + """Whether event is a single point in time or a time range.""" + + linked_url: str = FieldInfo(alias="linkedUrl") + + start_date: datetime = FieldInfo(alias="startDate") + + +class MetaConfidenceInfo(BaseModel): + annotations: List[MetaConfidenceInfoAnnotation] + + level: int + """Provides an indication of how much confidence Cloudflare has in the data.""" + + +class MetaDateRange(BaseModel): + end_time: datetime = FieldInfo(alias="endTime") + """Adjusted end of date range.""" + + start_time: datetime = FieldInfo(alias="startTime") + """Adjusted start of date range.""" + + +class MetaUnit(BaseModel): + name: str + + value: str + + +class Meta(BaseModel): + agg_interval: Literal["FIFTEEN_MINUTES", "ONE_HOUR", "ONE_DAY", "ONE_WEEK", "ONE_MONTH"] = FieldInfo( + alias="aggInterval" + ) + """Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + """ + + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") + + date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") + + last_updated: datetime = FieldInfo(alias="lastUpdated") + """Timestamp of the last dataset update.""" + + normalization: Literal[ + "PERCENTAGE", + "MIN0_MAX", + "MIN_MAX", + "RAW_VALUES", + "PERCENTAGE_CHANGE", + "ROLLING_AVERAGE", + "OVERLAPPED_PERCENTAGE", + "RATIO", + ] + """Normalization method applied to the results. + + Refer to + [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). + """ + + units: List[MetaUnit] + """Measurement units for the results.""" + + +class Serie0(BaseModel): + timestamps: List[datetime] + + if TYPE_CHECKING: + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> List[str]: ... + + +class BotTimeseriesGroupsResponse(BaseModel): + meta: Meta + """Metadata for the results.""" + + serie_0: Serie0 diff --git a/src/cloudflare/types/radar/bot_timeseries_params.py b/src/cloudflare/types/radar/bot_timeseries_params.py new file mode 100644 index 00000000000..9541c960fd7 --- /dev/null +++ b/src/cloudflare/types/radar/bot_timeseries_params.py @@ -0,0 +1,98 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["BotTimeseriesParams"] + + +class BotTimeseriesParams(TypedDict, total=False): + agg_interval: Annotated[Literal["15m", "1h", "1d", "1w"], PropertyInfo(alias="aggInterval")] + """Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + """ + + asn: List[str] + """Filters results by Autonomous System. + + Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. + Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes + results from AS174, but includes results from AS3356. + """ + + bot: List[str] + """Filters results by bot name.""" + + bot_category: Annotated[ + List[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + ], + PropertyInfo(alias="botCategory"), + ] + """Filters results by bot category.""" + + bot_operator: Annotated[List[str], PropertyInfo(alias="botOperator")] + """Filters results by bot operator.""" + + bot_verification_status: Annotated[List[Literal["VERIFIED"]], PropertyInfo(alias="botVerificationStatus")] + """Filters results by bot verification status (Verified vs. Unverified).""" + + continent: List[str] + """Filters results by continent. + + Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude + continents from results. For example, `-EU,NA` excludes results from EU, but + includes results from NA. + """ + + date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] + """End of the date range (inclusive).""" + + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] + """Filters results by date range. + + For example, use `7d` and `7dcontrol` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + """ + + date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")] + """Start of the date range.""" + + format: Literal["JSON", "CSV"] + """Format in which results will be returned.""" + + location: List[str] + """Filters results by location. + + Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude + locations from results. For example, `-US,PT` excludes results from the US, but + includes results from PT. + """ + + name: List[str] + """Array of names used to label the series in the response.""" diff --git a/src/cloudflare/types/radar/bot_timeseries_response.py b/src/cloudflare/types/radar/bot_timeseries_response.py new file mode 100644 index 00000000000..f08aadea698 --- /dev/null +++ b/src/cloudflare/types/radar/bot_timeseries_response.py @@ -0,0 +1,105 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, List +from datetime import datetime +from typing_extensions import Literal + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel +from .bot_timeseries_response import UnnamedTypeWithobjectParent0UnnamedTypeWithobjectParent0Item + +__all__ = [ + "BotTimeseriesResponse", + "Meta", + "MetaConfidenceInfo", + "MetaConfidenceInfoAnnotation", + "MetaDateRange", + "MetaUnit", +] + + +class MetaConfidenceInfoAnnotation(BaseModel): + data_source: str = FieldInfo(alias="dataSource") + + description: str + + end_date: datetime = FieldInfo(alias="endDate") + + event_type: str = FieldInfo(alias="eventType") + + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") + """Whether event is a single point in time or a time range.""" + + linked_url: str = FieldInfo(alias="linkedUrl") + + start_date: datetime = FieldInfo(alias="startDate") + + +class MetaConfidenceInfo(BaseModel): + annotations: List[MetaConfidenceInfoAnnotation] + + level: int + """Provides an indication of how much confidence Cloudflare has in the data.""" + + +class MetaDateRange(BaseModel): + end_time: datetime = FieldInfo(alias="endTime") + """Adjusted end of date range.""" + + start_time: datetime = FieldInfo(alias="startTime") + """Adjusted start of date range.""" + + +class MetaUnit(BaseModel): + name: str + + value: str + + +class Meta(BaseModel): + agg_interval: Literal["FIFTEEN_MINUTES", "ONE_HOUR", "ONE_DAY", "ONE_WEEK", "ONE_MONTH"] = FieldInfo( + alias="aggInterval" + ) + """Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + """ + + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") + + date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") + + last_updated: datetime = FieldInfo(alias="lastUpdated") + """Timestamp of the last dataset update.""" + + normalization: Literal[ + "PERCENTAGE", + "MIN0_MAX", + "MIN_MAX", + "RAW_VALUES", + "PERCENTAGE_CHANGE", + "ROLLING_AVERAGE", + "OVERLAPPED_PERCENTAGE", + "RATIO", + ] + """Normalization method applied to the results. + + Refer to + [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). + """ + + units: List[MetaUnit] + """Measurement units for the results.""" + + +class BotTimeseriesResponse(BaseModel): + meta: Meta + """Metadata for the results.""" + + if TYPE_CHECKING: + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent0UnnamedTypeWithobjectParent0Item: ... diff --git a/src/cloudflare/types/radar/bots/__init__.py b/src/cloudflare/types/radar/bots/__init__.py new file mode 100644 index 00000000000..4dd0e4c99e7 --- /dev/null +++ b/src/cloudflare/types/radar/bots/__init__.py @@ -0,0 +1,10 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from .web_crawler_summary_params import WebCrawlerSummaryParams as WebCrawlerSummaryParams +from .web_crawler_summary_response import WebCrawlerSummaryResponse as WebCrawlerSummaryResponse +from .web_crawler_timeseries_groups_params import WebCrawlerTimeseriesGroupsParams as WebCrawlerTimeseriesGroupsParams +from .web_crawler_timeseries_groups_response import ( + WebCrawlerTimeseriesGroupsResponse as WebCrawlerTimeseriesGroupsResponse, +) diff --git a/src/cloudflare/types/radar/bots/web_crawler_summary_params.py b/src/cloudflare/types/radar/bots/web_crawler_summary_params.py new file mode 100644 index 00000000000..2fb3190cc07 --- /dev/null +++ b/src/cloudflare/types/radar/bots/web_crawler_summary_params.py @@ -0,0 +1,43 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict + +from ...._utils import PropertyInfo + +__all__ = ["WebCrawlerSummaryParams"] + + +class WebCrawlerSummaryParams(TypedDict, total=False): + bot_operator: Annotated[List[str], PropertyInfo(alias="botOperator")] + """Filters results by bot operator.""" + + date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] + """End of the date range (inclusive).""" + + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] + """Filters results by date range. + + For example, use `7d` and `7dcontrol` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + """ + + date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")] + """Start of the date range.""" + + format: Literal["JSON", "CSV"] + """Format in which results will be returned.""" + + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + """ + + name: List[str] + """Array of names used to label the series in the response.""" diff --git a/src/cloudflare/types/radar/bots/web_crawler_summary_response.py b/src/cloudflare/types/radar/bots/web_crawler_summary_response.py new file mode 100644 index 00000000000..5076d68d8b3 --- /dev/null +++ b/src/cloudflare/types/radar/bots/web_crawler_summary_response.py @@ -0,0 +1,91 @@ +# 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 pydantic import Field as FieldInfo + +from ...._models import BaseModel + +__all__ = [ + "WebCrawlerSummaryResponse", + "Meta", + "MetaConfidenceInfo", + "MetaConfidenceInfoAnnotation", + "MetaDateRange", + "MetaUnit", +] + + +class MetaConfidenceInfoAnnotation(BaseModel): + data_source: str = FieldInfo(alias="dataSource") + + description: str + + end_date: datetime = FieldInfo(alias="endDate") + + event_type: str = FieldInfo(alias="eventType") + + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") + """Whether event is a single point in time or a time range.""" + + linked_url: str = FieldInfo(alias="linkedUrl") + + start_date: datetime = FieldInfo(alias="startDate") + + +class MetaConfidenceInfo(BaseModel): + annotations: List[MetaConfidenceInfoAnnotation] + + level: int + """Provides an indication of how much confidence Cloudflare has in the data.""" + + +class MetaDateRange(BaseModel): + end_time: datetime = FieldInfo(alias="endTime") + """Adjusted end of date range.""" + + start_time: datetime = FieldInfo(alias="startTime") + """Adjusted start of date range.""" + + +class MetaUnit(BaseModel): + name: str + + value: str + + +class Meta(BaseModel): + confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + + date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") + + last_updated: datetime = FieldInfo(alias="lastUpdated") + """Timestamp of the last dataset update.""" + + normalization: Literal[ + "PERCENTAGE", + "MIN0_MAX", + "MIN_MAX", + "RAW_VALUES", + "PERCENTAGE_CHANGE", + "ROLLING_AVERAGE", + "OVERLAPPED_PERCENTAGE", + "RATIO", + ] + """Normalization method applied to the results. + + Refer to + [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). + """ + + units: List[MetaUnit] + """Measurement units for the results.""" + + +class WebCrawlerSummaryResponse(BaseModel): + meta: Meta + """Metadata for the results.""" + + summary_0: Dict[str, str] diff --git a/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_params.py b/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_params.py new file mode 100644 index 00000000000..fe3831f14cd --- /dev/null +++ b/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_params.py @@ -0,0 +1,50 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict + +from ...._utils import PropertyInfo + +__all__ = ["WebCrawlerTimeseriesGroupsParams"] + + +class WebCrawlerTimeseriesGroupsParams(TypedDict, total=False): + agg_interval: Annotated[Literal["15m", "1h", "1d", "1w"], PropertyInfo(alias="aggInterval")] + """Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + """ + + bot_operator: Annotated[List[str], PropertyInfo(alias="botOperator")] + """Filters results by bot operator.""" + + date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] + """End of the date range (inclusive).""" + + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] + """Filters results by date range. + + For example, use `7d` and `7dcontrol` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + """ + + date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")] + """Start of the date range.""" + + format: Literal["JSON", "CSV"] + """Format in which results will be returned.""" + + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + """ + + name: List[str] + """Array of names used to label the series in the response.""" diff --git a/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_response.py b/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_response.py new file mode 100644 index 00000000000..b7a819d8282 --- /dev/null +++ b/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_response.py @@ -0,0 +1,111 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, List +from datetime import datetime +from typing_extensions import Literal + +from pydantic import Field as FieldInfo + +from ...._models import BaseModel + +__all__ = [ + "WebCrawlerTimeseriesGroupsResponse", + "Meta", + "MetaConfidenceInfo", + "MetaConfidenceInfoAnnotation", + "MetaDateRange", + "MetaUnit", + "Serie0", +] + + +class MetaConfidenceInfoAnnotation(BaseModel): + data_source: str = FieldInfo(alias="dataSource") + + description: str + + end_date: datetime = FieldInfo(alias="endDate") + + event_type: str = FieldInfo(alias="eventType") + + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") + """Whether event is a single point in time or a time range.""" + + linked_url: str = FieldInfo(alias="linkedUrl") + + start_date: datetime = FieldInfo(alias="startDate") + + +class MetaConfidenceInfo(BaseModel): + annotations: List[MetaConfidenceInfoAnnotation] + + level: int + """Provides an indication of how much confidence Cloudflare has in the data.""" + + +class MetaDateRange(BaseModel): + end_time: datetime = FieldInfo(alias="endTime") + """Adjusted end of date range.""" + + start_time: datetime = FieldInfo(alias="startTime") + """Adjusted start of date range.""" + + +class MetaUnit(BaseModel): + name: str + + value: str + + +class Meta(BaseModel): + agg_interval: Literal["FIFTEEN_MINUTES", "ONE_HOUR", "ONE_DAY", "ONE_WEEK", "ONE_MONTH"] = FieldInfo( + alias="aggInterval" + ) + """Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + """ + + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") + + date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") + + last_updated: datetime = FieldInfo(alias="lastUpdated") + """Timestamp of the last dataset update.""" + + normalization: Literal[ + "PERCENTAGE", + "MIN0_MAX", + "MIN_MAX", + "RAW_VALUES", + "PERCENTAGE_CHANGE", + "ROLLING_AVERAGE", + "OVERLAPPED_PERCENTAGE", + "RATIO", + ] + """Normalization method applied to the results. + + Refer to + [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). + """ + + units: List[MetaUnit] + """Measurement units for the results.""" + + +class Serie0(BaseModel): + timestamps: List[datetime] + + if TYPE_CHECKING: + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> List[str]: ... + + +class WebCrawlerTimeseriesGroupsResponse(BaseModel): + meta: Meta + """Metadata for the results.""" + + serie_0: Serie0 diff --git a/src/cloudflare/types/radar/dns_timeseries_response.py b/src/cloudflare/types/radar/dns_timeseries_response.py index 64f06be307e..7c58dd700fd 100644 --- a/src/cloudflare/types/radar/dns_timeseries_response.py +++ b/src/cloudflare/types/radar/dns_timeseries_response.py @@ -7,7 +7,7 @@ from pydantic import Field as FieldInfo from ..._models import BaseModel -from .dns_timeseries_response import UnnamedTypeWithobjectParent0UnnamedTypeWithobjectParent0Item +from .dns_timeseries_response import UnnamedTypeWithobjectParent1UnnamedTypeWithobjectParent1Item __all__ = [ "DNSTimeseriesResponse", @@ -102,4 +102,4 @@ class DNSTimeseriesResponse(BaseModel): # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent0UnnamedTypeWithobjectParent0Item: ... + def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent1UnnamedTypeWithobjectParent1Item: ... diff --git a/src/cloudflare/types/radar/entities/asn_get_response.py b/src/cloudflare/types/radar/entities/asn_get_response.py index 211edb79618..91682548ba1 100644 --- a/src/cloudflare/types/radar/entities/asn_get_response.py +++ b/src/cloudflare/types/radar/entities/asn_get_response.py @@ -60,9 +60,6 @@ class ASN(BaseModel): aka: Optional[str] = None - name_long: Optional[str] = FieldInfo(alias="nameLong", default=None) - """Deprecated field. Please use 'aka'.""" - class ASNGetResponse(BaseModel): asn: ASN diff --git a/src/cloudflare/types/radar/entities/asn_ip_response.py b/src/cloudflare/types/radar/entities/asn_ip_response.py index 9cf0df4ecb7..6a26dc3d92c 100644 --- a/src/cloudflare/types/radar/entities/asn_ip_response.py +++ b/src/cloudflare/types/radar/entities/asn_ip_response.py @@ -58,9 +58,6 @@ class ASN(BaseModel): aka: Optional[str] = None - name_long: Optional[str] = FieldInfo(alias="nameLong", default=None) - """Deprecated field. Please use 'aka'.""" - class ASNIPResponse(BaseModel): asn: ASN diff --git a/src/cloudflare/types/radar/entities/asn_list_response.py b/src/cloudflare/types/radar/entities/asn_list_response.py index 8ab3d93b80b..9a6d5b811ca 100644 --- a/src/cloudflare/types/radar/entities/asn_list_response.py +++ b/src/cloudflare/types/radar/entities/asn_list_response.py @@ -20,9 +20,6 @@ class ASN(BaseModel): aka: Optional[str] = None - name_long: Optional[str] = FieldInfo(alias="nameLong", default=None) - """Deprecated field. Please use 'aka'.""" - org_name: Optional[str] = FieldInfo(alias="orgName", default=None) website: Optional[str] = None diff --git a/src/cloudflare/types/radar/http_timeseries_response.py b/src/cloudflare/types/radar/http_timeseries_response.py index a756b7bdeca..2d5c7494112 100644 --- a/src/cloudflare/types/radar/http_timeseries_response.py +++ b/src/cloudflare/types/radar/http_timeseries_response.py @@ -7,7 +7,7 @@ from pydantic import Field as FieldInfo from ..._models import BaseModel -from .http_timeseries_response import UnnamedTypeWithobjectParent3UnnamedTypeWithobjectParent3Item +from .http_timeseries_response import UnnamedTypeWithobjectParent4UnnamedTypeWithobjectParent4Item __all__ = [ "HTTPTimeseriesResponse", @@ -102,4 +102,4 @@ class HTTPTimeseriesResponse(BaseModel): # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent3UnnamedTypeWithobjectParent3Item: ... + def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent4UnnamedTypeWithobjectParent4Item: ... diff --git a/src/cloudflare/types/radar/search_global_params.py b/src/cloudflare/types/radar/search_global_params.py index e0b1c49791a..2c6cc534162 100644 --- a/src/cloudflare/types/radar/search_global_params.py +++ b/src/cloudflare/types/radar/search_global_params.py @@ -14,13 +14,13 @@ class SearchGlobalParams(TypedDict, total=False): query: Required[str] """Search for locations, autonomous systems and reports.""" - exclude: List[Literal["ASNS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] + exclude: List[Literal["ASNS", "BOTS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] """Search types excluded from results.""" format: Literal["JSON", "CSV"] """Format in which results will be returned.""" - include: List[Literal["ASNS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] + include: List[Literal["ASNS", "BOTS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] """Search types included in results.""" limit: int diff --git a/src/cloudflare/types/rate_limits/rate_limit.py b/src/cloudflare/types/rate_limits/rate_limit.py index 24cc1540a32..301fed3c9e5 100644 --- a/src/cloudflare/types/rate_limits/rate_limit.py +++ b/src/cloudflare/types/rate_limits/rate_limit.py @@ -123,7 +123,7 @@ class RateLimit(BaseModel): """ description: Optional[str] = None - """An informative summary of the rate limit. + """An informative summary of the rule. This value is sanitized and any tags will be removed. """ diff --git a/src/cloudflare/types/rate_limits/rate_limit_delete_response.py b/src/cloudflare/types/rate_limits/rate_limit_delete_response.py index 077f6303106..c2901e3cb71 100644 --- a/src/cloudflare/types/rate_limits/rate_limit_delete_response.py +++ b/src/cloudflare/types/rate_limits/rate_limit_delete_response.py @@ -132,7 +132,7 @@ class RateLimitDeleteResponse(BaseModel): """ description: Optional[str] = None - """An informative summary of the rate limit. + """An informative summary of the rule. This value is sanitized and any tags will be removed. """ diff --git a/src/cloudflare/types/shared/token_policy.py b/src/cloudflare/types/shared/token_policy.py index 778cb891f5d..6674df67455 100644 --- a/src/cloudflare/types/shared/token_policy.py +++ b/src/cloudflare/types/shared/token_policy.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List, Union, Optional from typing_extensions import Literal from ..._models import BaseModel @@ -35,5 +35,5 @@ class TokenPolicy(BaseModel): permission_groups: List[PermissionGroup] """A set of permission groups that are specified to the policy.""" - resources: Dict[str, str] + resources: Dict[str, Union[str, Dict[str, str]]] """A list of resource names that the policy applies to.""" diff --git a/src/cloudflare/types/shared_params/token_policy.py b/src/cloudflare/types/shared_params/token_policy.py index e2a11eec39a..d1f663c2d40 100644 --- a/src/cloudflare/types/shared_params/token_policy.py +++ b/src/cloudflare/types/shared_params/token_policy.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Dict, Iterable +from typing import Dict, Union, Iterable from typing_extensions import Literal, Required, TypedDict __all__ = ["TokenPolicy", "PermissionGroup", "PermissionGroupMeta"] @@ -29,5 +29,5 @@ class TokenPolicy(TypedDict, total=False): permission_groups: Required[Iterable[PermissionGroup]] """A set of permission groups that are specified to the policy.""" - resources: Required[Dict[str, str]] + resources: Required[Dict[str, Union[str, Dict[str, str]]]] """A list of resource names that the policy applies to.""" diff --git a/src/cloudflare/types/user/token_update_params.py b/src/cloudflare/types/user/token_update_params.py index 6df123fcec8..3f0f4df84b3 100644 --- a/src/cloudflare/types/user/token_update_params.py +++ b/src/cloudflare/types/user/token_update_params.py @@ -20,9 +20,6 @@ class TokenUpdateParams(TypedDict, total=False): policies: Required[Iterable[TokenPolicy]] """List of access policies assigned to the token.""" - status: Required[Literal["active", "disabled", "expired"]] - """Status of the token.""" - condition: Condition expires_on: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] @@ -34,6 +31,9 @@ class TokenUpdateParams(TypedDict, total=False): not_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """The time before which the token MUST NOT be accepted for processing.""" + status: Literal["active", "disabled", "expired"] + """Status of the token.""" + _ConditionRequestIPReservedKeywords = TypedDict( "_ConditionRequestIPReservedKeywords", diff --git a/src/cloudflare/types/workers/script_update_params.py b/src/cloudflare/types/workers/script_update_params.py index b34cacf091f..0e0f6448f72 100644 --- a/src/cloudflare/types/workers/script_update_params.py +++ b/src/cloudflare/types/workers/script_update_params.py @@ -78,7 +78,7 @@ class MetadataAssetsConfig(TypedDict, total=False): is no Worker script. """ - run_worker_first: List[str] + run_worker_first: Union[List[str], bool] """Contains a list path rules to control routing to either the Worker or assets. Glob (\\**) and negative (!) rules are supported. Rules must start with either '/' @@ -86,6 +86,13 @@ class MetadataAssetsConfig(TypedDict, total=False): have higher precedence than non-negative rules. """ + serve_directly: bool + """ + When true and the incoming request matches an asset, that will be served instead + of invoking the Worker script. When false, requests will always invoke the + Worker script. + """ + class MetadataAssets(TypedDict, total=False): config: MetadataAssetsConfig diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py index 64b5d00a594..3fc25ca73fd 100644 --- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py +++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py @@ -81,7 +81,7 @@ class MetadataAssetsConfig(TypedDict, total=False): is no Worker script. """ - run_worker_first: List[str] + run_worker_first: Union[List[str], bool] """Contains a list path rules to control routing to either the Worker or assets. Glob (\\**) and negative (!) rules are supported. Rules must start with either '/' @@ -89,6 +89,13 @@ class MetadataAssetsConfig(TypedDict, total=False): have higher precedence than non-negative rules. """ + serve_directly: bool + """ + When true and the incoming request matches an asset, that will be served instead + of invoking the Worker script. When false, requests will always invoke the + Worker script. + """ + class MetadataAssets(TypedDict, total=False): config: MetadataAssetsConfig diff --git a/src/cloudflare/types/zero_trust/dlp/entry_get_response.py b/src/cloudflare/types/zero_trust/dlp/entry_get_response.py index 7fb2662045d..47f7328cf22 100644 --- a/src/cloudflare/types/zero_trust/dlp/entry_get_response.py +++ b/src/cloudflare/types/zero_trust/dlp/entry_get_response.py @@ -14,7 +14,7 @@ "PredefinedEntryConfidence", "IntegrationEntry", "ExactDataEntry", - "DocumentTemplateEntry", + "DocumentFingerprintEntry", "WordListEntry", ] @@ -100,7 +100,7 @@ class ExactDataEntry(BaseModel): updated_at: datetime -class DocumentTemplateEntry(BaseModel): +class DocumentFingerprintEntry(BaseModel): id: str created_at: datetime @@ -109,7 +109,7 @@ class DocumentTemplateEntry(BaseModel): name: str - type: Literal["document_template"] + type: Literal["document_fingerprint"] updated_at: datetime @@ -133,5 +133,5 @@ class WordListEntry(BaseModel): EntryGetResponse: TypeAlias = Union[ - CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentTemplateEntry, WordListEntry + CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentFingerprintEntry, WordListEntry ] diff --git a/src/cloudflare/types/zero_trust/dlp/entry_list_response.py b/src/cloudflare/types/zero_trust/dlp/entry_list_response.py index 1da2b70ca38..bb10fdb09b3 100644 --- a/src/cloudflare/types/zero_trust/dlp/entry_list_response.py +++ b/src/cloudflare/types/zero_trust/dlp/entry_list_response.py @@ -14,7 +14,7 @@ "PredefinedEntryConfidence", "IntegrationEntry", "ExactDataEntry", - "DocumentTemplateEntry", + "DocumentFingerprintEntry", "WordListEntry", ] @@ -100,7 +100,7 @@ class ExactDataEntry(BaseModel): updated_at: datetime -class DocumentTemplateEntry(BaseModel): +class DocumentFingerprintEntry(BaseModel): id: str created_at: datetime @@ -109,7 +109,7 @@ class DocumentTemplateEntry(BaseModel): name: str - type: Literal["document_template"] + type: Literal["document_fingerprint"] updated_at: datetime @@ -133,5 +133,5 @@ class WordListEntry(BaseModel): EntryListResponse: TypeAlias = Union[ - CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentTemplateEntry, WordListEntry + CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentFingerprintEntry, WordListEntry ] diff --git a/src/cloudflare/types/zero_trust/dlp/entry_update_response.py b/src/cloudflare/types/zero_trust/dlp/entry_update_response.py index dcece8b3638..12b5fd242e0 100644 --- a/src/cloudflare/types/zero_trust/dlp/entry_update_response.py +++ b/src/cloudflare/types/zero_trust/dlp/entry_update_response.py @@ -14,7 +14,7 @@ "PredefinedEntryConfidence", "IntegrationEntry", "ExactDataEntry", - "DocumentTemplateEntry", + "DocumentFingerprintEntry", "WordListEntry", ] @@ -100,7 +100,7 @@ class ExactDataEntry(BaseModel): updated_at: datetime -class DocumentTemplateEntry(BaseModel): +class DocumentFingerprintEntry(BaseModel): id: str created_at: datetime @@ -109,7 +109,7 @@ class DocumentTemplateEntry(BaseModel): name: str - type: Literal["document_template"] + type: Literal["document_fingerprint"] updated_at: datetime @@ -133,5 +133,5 @@ class WordListEntry(BaseModel): EntryUpdateResponse: TypeAlias = Union[ - CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentTemplateEntry, WordListEntry + CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentFingerprintEntry, WordListEntry ] diff --git a/src/cloudflare/types/zero_trust/dlp/profile.py b/src/cloudflare/types/zero_trust/dlp/profile.py index b1042788f99..6afc94992f3 100644 --- a/src/cloudflare/types/zero_trust/dlp/profile.py +++ b/src/cloudflare/types/zero_trust/dlp/profile.py @@ -18,7 +18,7 @@ "CustomProfileEntryPredefinedEntryConfidence", "CustomProfileEntryIntegrationEntry", "CustomProfileEntryExactDataEntry", - "CustomProfileEntryDocumentTemplateEntry", + "CustomProfileEntryDocumentFingerprintEntry", "CustomProfileEntryWordListEntry", "PredefinedProfile", "PredefinedProfileEntry", @@ -27,7 +27,7 @@ "PredefinedProfileEntryPredefinedEntryConfidence", "PredefinedProfileEntryIntegrationEntry", "PredefinedProfileEntryExactDataEntry", - "PredefinedProfileEntryDocumentTemplateEntry", + "PredefinedProfileEntryDocumentFingerprintEntry", "PredefinedProfileEntryWordListEntry", "IntegrationProfile", "IntegrationProfileEntry", @@ -36,7 +36,7 @@ "IntegrationProfileEntryPredefinedEntryConfidence", "IntegrationProfileEntryIntegrationEntry", "IntegrationProfileEntryExactDataEntry", - "IntegrationProfileEntryDocumentTemplateEntry", + "IntegrationProfileEntryDocumentFingerprintEntry", "IntegrationProfileEntryWordListEntry", ] @@ -122,7 +122,7 @@ class CustomProfileEntryExactDataEntry(BaseModel): updated_at: datetime -class CustomProfileEntryDocumentTemplateEntry(BaseModel): +class CustomProfileEntryDocumentFingerprintEntry(BaseModel): id: str created_at: datetime @@ -131,7 +131,7 @@ class CustomProfileEntryDocumentTemplateEntry(BaseModel): name: str - type: Literal["document_template"] + type: Literal["document_fingerprint"] updated_at: datetime @@ -159,7 +159,7 @@ class CustomProfileEntryWordListEntry(BaseModel): CustomProfileEntryPredefinedEntry, CustomProfileEntryIntegrationEntry, CustomProfileEntryExactDataEntry, - CustomProfileEntryDocumentTemplateEntry, + CustomProfileEntryDocumentFingerprintEntry, CustomProfileEntryWordListEntry, ] @@ -281,7 +281,7 @@ class PredefinedProfileEntryExactDataEntry(BaseModel): updated_at: datetime -class PredefinedProfileEntryDocumentTemplateEntry(BaseModel): +class PredefinedProfileEntryDocumentFingerprintEntry(BaseModel): id: str created_at: datetime @@ -290,7 +290,7 @@ class PredefinedProfileEntryDocumentTemplateEntry(BaseModel): name: str - type: Literal["document_template"] + type: Literal["document_fingerprint"] updated_at: datetime @@ -318,7 +318,7 @@ class PredefinedProfileEntryWordListEntry(BaseModel): PredefinedProfileEntryPredefinedEntry, PredefinedProfileEntryIntegrationEntry, PredefinedProfileEntryExactDataEntry, - PredefinedProfileEntryDocumentTemplateEntry, + PredefinedProfileEntryDocumentFingerprintEntry, PredefinedProfileEntryWordListEntry, ] @@ -433,7 +433,7 @@ class IntegrationProfileEntryExactDataEntry(BaseModel): updated_at: datetime -class IntegrationProfileEntryDocumentTemplateEntry(BaseModel): +class IntegrationProfileEntryDocumentFingerprintEntry(BaseModel): id: str created_at: datetime @@ -442,7 +442,7 @@ class IntegrationProfileEntryDocumentTemplateEntry(BaseModel): name: str - type: Literal["document_template"] + type: Literal["document_fingerprint"] updated_at: datetime @@ -470,7 +470,7 @@ class IntegrationProfileEntryWordListEntry(BaseModel): IntegrationProfileEntryPredefinedEntry, IntegrationProfileEntryIntegrationEntry, IntegrationProfileEntryExactDataEntry, - IntegrationProfileEntryDocumentTemplateEntry, + IntegrationProfileEntryDocumentFingerprintEntry, IntegrationProfileEntryWordListEntry, ] diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_params.py b/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_params.py index 09dfda22c00..139192a7574 100644 --- a/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_params.py +++ b/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_params.py @@ -18,6 +18,7 @@ "SharedEntryPredefined", "SharedEntryIntegration", "SharedEntryExactData", + "SharedEntryUnionMember4", ] @@ -105,4 +106,14 @@ class SharedEntryExactData(TypedDict, total=False): entry_type: Required[Literal["exact_data"]] -SharedEntry: TypeAlias = Union[SharedEntryCustom, SharedEntryPredefined, SharedEntryIntegration, SharedEntryExactData] +class SharedEntryUnionMember4(TypedDict, total=False): + enabled: Required[bool] + + entry_id: Required[str] + + entry_type: Required[Literal["document_fingerprint"]] + + +SharedEntry: TypeAlias = Union[ + SharedEntryCustom, SharedEntryPredefined, SharedEntryIntegration, SharedEntryExactData, SharedEntryUnionMember4 +] diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/custom_update_params.py b/src/cloudflare/types/zero_trust/dlp/profiles/custom_update_params.py index 9bfb604a4b2..466eb7569ae 100644 --- a/src/cloudflare/types/zero_trust/dlp/profiles/custom_update_params.py +++ b/src/cloudflare/types/zero_trust/dlp/profiles/custom_update_params.py @@ -17,6 +17,7 @@ "SharedEntryPredefined", "SharedEntryIntegration", "SharedEntryExactData", + "SharedEntryUnionMember3", ] @@ -97,4 +98,14 @@ class SharedEntryExactData(TypedDict, total=False): entry_type: Required[Literal["exact_data"]] -SharedEntry: TypeAlias = Union[SharedEntryPredefined, SharedEntryIntegration, SharedEntryExactData] +class SharedEntryUnionMember3(TypedDict, total=False): + enabled: Required[bool] + + entry_id: Required[str] + + entry_type: Required[Literal["document_fingerprint"]] + + +SharedEntry: TypeAlias = Union[ + SharedEntryPredefined, SharedEntryIntegration, SharedEntryExactData, SharedEntryUnionMember3 +] diff --git a/src/cloudflare/types/zero_trust/gateway/__init__.py b/src/cloudflare/types/zero_trust/gateway/__init__.py index 3493d5e0603..17c93d1d9b4 100644 --- a/src/cloudflare/types/zero_trust/gateway/__init__.py +++ b/src/cloudflare/types/zero_trust/gateway/__init__.py @@ -31,7 +31,6 @@ from .list_list_params import ListListParams as ListListParams from .doh_endpoint_param import DOHEndpointParam as DOHEndpointParam from .dot_endpoint_param import DOTEndpointParam as DOTEndpointParam -from .gateway_item_param import GatewayItemParam as GatewayItemParam from .ipv6_network_param import IPV6NetworkParam as IPV6NetworkParam from .list_create_params import ListCreateParams as ListCreateParams from .list_update_params import ListUpdateParams as ListUpdateParams diff --git a/src/cloudflare/types/zero_trust/gateway/block_page_settings.py b/src/cloudflare/types/zero_trust/gateway/block_page_settings.py index 2b587764cff..de40b9268d4 100644 --- a/src/cloudflare/types/zero_trust/gateway/block_page_settings.py +++ b/src/cloudflare/types/zero_trust/gateway/block_page_settings.py @@ -50,6 +50,15 @@ class BlockPageSettings(BaseModel): name: Optional[str] = None """If mode is customized_block_page: block page title.""" + read_only: Optional[bool] = None + """ + This setting was shared via the Orgs API and cannot be edited by the current + account + """ + + source_account: Optional[str] = None + """Account tag of account that shared this setting""" + suppress_footer: Optional[bool] = None """ If mode is customized_block_page: suppress detailed info at the bottom of the diff --git a/src/cloudflare/types/zero_trust/gateway/extended_email_matching.py b/src/cloudflare/types/zero_trust/gateway/extended_email_matching.py index ff34962235c..28425d6c1d6 100644 --- a/src/cloudflare/types/zero_trust/gateway/extended_email_matching.py +++ b/src/cloudflare/types/zero_trust/gateway/extended_email_matching.py @@ -13,3 +13,12 @@ class ExtendedEmailMatching(BaseModel): modifiers) used as criteria in Firewall policies. """ + + read_only: Optional[bool] = None + """ + This setting was shared via the Orgs API and cannot be edited by the current + account + """ + + source_account: Optional[str] = None + """Account tag of account that shared this setting""" diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py index 33632f6afc7..147a995e673 100644 --- a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py +++ b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py @@ -3,8 +3,6 @@ from typing import Optional from typing_extensions import Literal -from pydantic import Field as FieldInfo - from ...._models import BaseModel from .tls_settings import TLSSettings from .fips_settings import FipsSettings @@ -17,12 +15,7 @@ from .browser_isolation_settings import BrowserIsolationSettings from .custom_certificate_settings import CustomCertificateSettings -__all__ = ["GatewayConfigurationSettings", "AppControlSettings", "Certificate", "HostSelector", "Sandbox"] - - -class AppControlSettings(BaseModel): - enabled: Optional[bool] = None - """Enable App Control""" +__all__ = ["GatewayConfigurationSettings", "Certificate", "HostSelector", "Sandbox"] class Certificate(BaseModel): @@ -54,9 +47,6 @@ class GatewayConfigurationSettings(BaseModel): antivirus: Optional[AntiVirusSettings] = None """Anti-virus settings.""" - app_control_settings: Optional[AppControlSettings] = FieldInfo(alias="app-control-settings", default=None) - """Setting to enable App Control""" - block_page: Optional[BlockPageSettings] = None """Block page layout settings.""" diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py index b3d391ed319..3e9c6571c5a 100644 --- a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py +++ b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py @@ -3,9 +3,8 @@ from __future__ import annotations from typing import Optional -from typing_extensions import Literal, Required, Annotated, TypedDict +from typing_extensions import Literal, Required, TypedDict -from ...._utils import PropertyInfo from .tls_settings_param import TLSSettingsParam from .fips_settings_param import FipsSettingsParam from .protocol_detection_param import ProtocolDetectionParam @@ -17,12 +16,7 @@ from .browser_isolation_settings_param import BrowserIsolationSettingsParam from .custom_certificate_settings_param import CustomCertificateSettingsParam -__all__ = ["GatewayConfigurationSettingsParam", "AppControlSettings", "Certificate", "HostSelector", "Sandbox"] - - -class AppControlSettings(TypedDict, total=False): - enabled: bool - """Enable App Control""" +__all__ = ["GatewayConfigurationSettingsParam", "Certificate", "HostSelector", "Sandbox"] class Certificate(TypedDict, total=False): @@ -54,9 +48,6 @@ class GatewayConfigurationSettingsParam(TypedDict, total=False): antivirus: Optional[AntiVirusSettingsParam] """Anti-virus settings.""" - app_control_settings: Annotated[Optional[AppControlSettings], PropertyInfo(alias="app-control-settings")] - """Setting to enable App Control""" - block_page: Optional[BlockPageSettingsParam] """Block page layout settings.""" diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py b/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py deleted file mode 100644 index e1f175cf254..00000000000 --- a/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import TypedDict - -__all__ = ["GatewayItemParam"] - - -class GatewayItemParam(TypedDict, total=False): - description: str - """The description of the list item, if present""" - - value: str - """The value of the item in a list.""" diff --git a/src/cloudflare/types/zero_trust/gateway/list_create_params.py b/src/cloudflare/types/zero_trust/gateway/list_create_params.py index c1d48ff069c..08477c82c71 100644 --- a/src/cloudflare/types/zero_trust/gateway/list_create_params.py +++ b/src/cloudflare/types/zero_trust/gateway/list_create_params.py @@ -5,9 +5,7 @@ from typing import Iterable from typing_extensions import Literal, Required, TypedDict -from .gateway_item_param import GatewayItemParam - -__all__ = ["ListCreateParams"] +__all__ = ["ListCreateParams", "Item"] class ListCreateParams(TypedDict, total=False): @@ -22,5 +20,13 @@ class ListCreateParams(TypedDict, total=False): description: str """The description of the list.""" - items: Iterable[GatewayItemParam] - """The items in the list.""" + items: Iterable[Item] + """items to add to the list.""" + + +class Item(TypedDict, total=False): + description: str + """The description of the list item, if present""" + + value: str + """The value of the item in a list.""" diff --git a/src/cloudflare/types/zero_trust/gateway/list_update_params.py b/src/cloudflare/types/zero_trust/gateway/list_update_params.py index d02a3f2a256..b6aed84e8fd 100644 --- a/src/cloudflare/types/zero_trust/gateway/list_update_params.py +++ b/src/cloudflare/types/zero_trust/gateway/list_update_params.py @@ -5,9 +5,7 @@ from typing import Iterable from typing_extensions import Required, TypedDict -from .gateway_item_param import GatewayItemParam - -__all__ = ["ListUpdateParams"] +__all__ = ["ListUpdateParams", "Item"] class ListUpdateParams(TypedDict, total=False): @@ -19,5 +17,13 @@ class ListUpdateParams(TypedDict, total=False): description: str """The description of the list.""" - items: Iterable[GatewayItemParam] - """The items in the list.""" + items: Iterable[Item] + """items to add to the list.""" + + +class Item(TypedDict, total=False): + description: str + """The description of the list item, if present""" + + value: str + """The value of the item in a list.""" diff --git a/tests/api_resources/accounts/logs/test_audit.py b/tests/api_resources/accounts/logs/test_audit.py index 492d0ca3521..3cb3c774a1d 100644 --- a/tests/api_resources/accounts/logs/test_audit.py +++ b/tests/api_resources/accounts/logs/test_audit.py @@ -105,7 +105,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAudit: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO:investigate broken test") @parametrize diff --git a/tests/api_resources/accounts/test_members.py b/tests/api_resources/accounts/test_members.py index f35d0e13841..7a280726d61 100644 --- a/tests/api_resources/accounts/test_members.py +++ b/tests/api_resources/accounts/test_members.py @@ -508,7 +508,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMembers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="HTTP 422 error from prism") @parametrize diff --git a/tests/api_resources/accounts/test_roles.py b/tests/api_resources/accounts/test_roles.py index 6a97d8c4b31..b6f6aa04a0d 100644 --- a/tests/api_resources/accounts/test_roles.py +++ b/tests/api_resources/accounts/test_roles.py @@ -115,7 +115,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRoles: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/accounts/test_subscriptions.py b/tests/api_resources/accounts/test_subscriptions.py index b09e6c11610..1ef48e9a3c3 100644 --- a/tests/api_resources/accounts/test_subscriptions.py +++ b/tests/api_resources/accounts/test_subscriptions.py @@ -232,7 +232,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSubscriptions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/accounts/test_tokens.py b/tests/api_resources/accounts/test_tokens.py index 6b17512734d..a936ded5e33 100644 --- a/tests/api_resources/accounts/test_tokens.py +++ b/tests/api_resources/accounts/test_tokens.py @@ -37,10 +37,7 @@ def test_method_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -71,10 +68,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], condition={ @@ -101,10 +95,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -127,10 +118,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) as response: @@ -156,10 +144,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -178,13 +163,9 @@ def test_method_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) assert_matches_type(Optional[Token], token, path=["response"]) @@ -214,13 +195,9 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", condition={ "request_ip": { "in": ["123.123.123.0/24", "2606:4700::/32"], @@ -229,6 +206,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, expires_on=parse_datetime("2020-01-01T00:00:00Z"), not_before=parse_datetime("2018-07-01T05:20:00Z"), + status="active", ) assert_matches_type(Optional[Token], token, path=["response"]) @@ -246,13 +224,9 @@ def test_raw_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) assert response.is_closed is True @@ -274,13 +248,9 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -305,13 +275,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `token_id` but received ''"): @@ -326,13 +292,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -536,7 +498,9 @@ def test_path_params_verify(self, client: Cloudflare) -> None: class TestAsyncTokens: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize @@ -551,10 +515,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -585,10 +546,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], condition={ @@ -615,10 +573,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -641,10 +596,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) as response: @@ -670,10 +622,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -692,13 +641,9 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) assert_matches_type(Optional[Token], token, path=["response"]) @@ -728,13 +673,9 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", condition={ "request_ip": { "in": ["123.123.123.0/24", "2606:4700::/32"], @@ -743,6 +684,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, expires_on=parse_datetime("2020-01-01T00:00:00Z"), not_before=parse_datetime("2018-07-01T05:20:00Z"), + status="active", ) assert_matches_type(Optional[Token], token, path=["response"]) @@ -760,13 +702,9 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) assert response.is_closed is True @@ -788,13 +726,9 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -819,13 +753,9 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `token_id` but received ''"): @@ -840,13 +770,9 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) @pytest.mark.skip(reason="TODO: investigate broken test") diff --git a/tests/api_resources/accounts/tokens/test_permission_groups.py b/tests/api_resources/accounts/tokens/test_permission_groups.py index bd764c44569..e8398ef2527 100644 --- a/tests/api_resources/accounts/tokens/test_permission_groups.py +++ b/tests/api_resources/accounts/tokens/test_permission_groups.py @@ -104,7 +104,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPermissionGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/accounts/tokens/test_value.py b/tests/api_resources/accounts/tokens/test_value.py index 00a709c212b..c04ad23d1c6 100644 --- a/tests/api_resources/accounts/tokens/test_value.py +++ b/tests/api_resources/accounts/tokens/test_value.py @@ -75,7 +75,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: class TestAsyncValue: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/acm/test_total_tls.py b/tests/api_resources/acm/test_total_tls.py index cf7af173e5f..f627910b593 100644 --- a/tests/api_resources/acm/test_total_tls.py +++ b/tests/api_resources/acm/test_total_tls.py @@ -111,7 +111,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTotalTLS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/address_maps/test_accounts.py b/tests/api_resources/addressing/address_maps/test_accounts.py index 3bb5dc17626..8a8a2efbacc 100644 --- a/tests/api_resources/addressing/address_maps/test_accounts.py +++ b/tests/api_resources/addressing/address_maps/test_accounts.py @@ -120,7 +120,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncAccounts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/address_maps/test_ips.py b/tests/api_resources/addressing/address_maps/test_ips.py index 63221153f3a..ee94225fd61 100644 --- a/tests/api_resources/addressing/address_maps/test_ips.py +++ b/tests/api_resources/addressing/address_maps/test_ips.py @@ -145,7 +145,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncIPs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/address_maps/test_zones.py b/tests/api_resources/addressing/address_maps/test_zones.py index f0fe5d2d2bb..978b3f76428 100644 --- a/tests/api_resources/addressing/address_maps/test_zones.py +++ b/tests/api_resources/addressing/address_maps/test_zones.py @@ -145,7 +145,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncZones: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/prefixes/test_advertisement_status.py b/tests/api_resources/addressing/prefixes/test_advertisement_status.py index 23ecde2d395..4bc11f6f6b1 100644 --- a/tests/api_resources/addressing/prefixes/test_advertisement_status.py +++ b/tests/api_resources/addressing/prefixes/test_advertisement_status.py @@ -135,7 +135,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAdvertisementStatus: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py b/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py index c66ff1c56f0..f28e4f15ae9 100644 --- a/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py +++ b/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py @@ -257,7 +257,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBGPPrefixes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/prefixes/test_delegations.py b/tests/api_resources/addressing/prefixes/test_delegations.py index 83ec07279cc..a819531b501 100644 --- a/tests/api_resources/addressing/prefixes/test_delegations.py +++ b/tests/api_resources/addressing/prefixes/test_delegations.py @@ -186,7 +186,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncDelegations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/prefixes/test_service_bindings.py b/tests/api_resources/addressing/prefixes/test_service_bindings.py index 98156802f9c..45a766105ab 100644 --- a/tests/api_resources/addressing/prefixes/test_service_bindings.py +++ b/tests/api_resources/addressing/prefixes/test_service_bindings.py @@ -249,7 +249,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncServiceBindings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/regional_hostnames/test_regions.py b/tests/api_resources/addressing/regional_hostnames/test_regions.py index 5d23799e1bf..e06d39e8cf3 100644 --- a/tests/api_resources/addressing/regional_hostnames/test_regions.py +++ b/tests/api_resources/addressing/regional_hostnames/test_regions.py @@ -58,7 +58,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncRegions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/test_address_maps.py b/tests/api_resources/addressing/test_address_maps.py index ed645091db9..c9a93e4d048 100644 --- a/tests/api_resources/addressing/test_address_maps.py +++ b/tests/api_resources/addressing/test_address_maps.py @@ -272,7 +272,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAddressMaps: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/test_loa_documents.py b/tests/api_resources/addressing/test_loa_documents.py index 6cfbe04f072..91a32806d0c 100644 --- a/tests/api_resources/addressing/test_loa_documents.py +++ b/tests/api_resources/addressing/test_loa_documents.py @@ -151,7 +151,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLOADocuments: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/addressing/test_prefixes.py b/tests/api_resources/addressing/test_prefixes.py index 955b4eaa157..6cfbeaba785 100644 --- a/tests/api_resources/addressing/test_prefixes.py +++ b/tests/api_resources/addressing/test_prefixes.py @@ -257,7 +257,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPrefixes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/test_regional_hostnames.py b/tests/api_resources/addressing/test_regional_hostnames.py index 1db9c1e02ea..db65a605ffc 100644 --- a/tests/api_resources/addressing/test_regional_hostnames.py +++ b/tests/api_resources/addressing/test_regional_hostnames.py @@ -269,7 +269,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRegionalHostnames: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/test_services.py b/tests/api_resources/addressing/test_services.py index 8d51e635ff9..35ad7f029ae 100644 --- a/tests/api_resources/addressing/test_services.py +++ b/tests/api_resources/addressing/test_services.py @@ -58,7 +58,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncServices: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai/finetunes/test_assets.py b/tests/api_resources/ai/finetunes/test_assets.py index 1a692800031..015f0a5c02d 100644 --- a/tests/api_resources/ai/finetunes/test_assets.py +++ b/tests/api_resources/ai/finetunes/test_assets.py @@ -77,7 +77,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncAssets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai/finetunes/test_public.py b/tests/api_resources/ai/finetunes/test_public.py index cc5f2b658c4..8c4e13933ce 100644 --- a/tests/api_resources/ai/finetunes/test_public.py +++ b/tests/api_resources/ai/finetunes/test_public.py @@ -68,7 +68,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncPublic: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai/models/test_schema.py b/tests/api_resources/ai/models/test_schema.py index c2592b98979..ff54c76b027 100644 --- a/tests/api_resources/ai/models/test_schema.py +++ b/tests/api_resources/ai/models/test_schema.py @@ -60,7 +60,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSchema: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai/test_authors.py b/tests/api_resources/ai/test_authors.py index 16cdb1d7750..4997cb94973 100644 --- a/tests/api_resources/ai/test_authors.py +++ b/tests/api_resources/ai/test_authors.py @@ -57,7 +57,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAuthors: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai/test_finetunes.py b/tests/api_resources/ai/test_finetunes.py index e01ec841666..74e1b6f8fa2 100644 --- a/tests/api_resources/ai/test_finetunes.py +++ b/tests/api_resources/ai/test_finetunes.py @@ -114,7 +114,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncFinetunes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai/test_models.py b/tests/api_resources/ai/test_models.py index 56897b9a250..6905cbb257c 100644 --- a/tests/api_resources/ai/test_models.py +++ b/tests/api_resources/ai/test_models.py @@ -71,7 +71,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncModels: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai/test_tasks.py b/tests/api_resources/ai/test_tasks.py index 4383e0af353..b0a6dea5ef5 100644 --- a/tests/api_resources/ai/test_tasks.py +++ b/tests/api_resources/ai/test_tasks.py @@ -57,7 +57,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncTasks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai_gateway/test_datasets.py b/tests/api_resources/ai_gateway/test_datasets.py index dc7ab2a74c5..88b9820ab6a 100644 --- a/tests/api_resources/ai_gateway/test_datasets.py +++ b/tests/api_resources/ai_gateway/test_datasets.py @@ -414,7 +414,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDatasets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai_gateway/test_evaluation_types.py b/tests/api_resources/ai_gateway/test_evaluation_types.py index d03554b8df8..64b7cca833a 100644 --- a/tests/api_resources/ai_gateway/test_evaluation_types.py +++ b/tests/api_resources/ai_gateway/test_evaluation_types.py @@ -71,7 +71,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncEvaluationTypes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai_gateway/test_evaluations.py b/tests/api_resources/ai_gateway/test_evaluations.py index 444549e3cef..0ae12b69d6b 100644 --- a/tests/api_resources/ai_gateway/test_evaluations.py +++ b/tests/api_resources/ai_gateway/test_evaluations.py @@ -269,7 +269,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEvaluations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai_gateway/test_logs.py b/tests/api_resources/ai_gateway/test_logs.py index 4be76ce1282..734f4a528d9 100644 --- a/tests/api_resources/ai_gateway/test_logs.py +++ b/tests/api_resources/ai_gateway/test_logs.py @@ -433,7 +433,9 @@ def test_path_params_response(self, client: Cloudflare) -> None: class TestAsyncLogs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai_gateway/test_urls.py b/tests/api_resources/ai_gateway/test_urls.py index 3fa5620cbdd..5dc57869a81 100644 --- a/tests/api_resources/ai_gateway/test_urls.py +++ b/tests/api_resources/ai_gateway/test_urls.py @@ -78,7 +78,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncURLs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/alerting/destinations/test_eligible.py b/tests/api_resources/alerting/destinations/test_eligible.py index ee7c9caff3e..84d19adcb16 100644 --- a/tests/api_resources/alerting/destinations/test_eligible.py +++ b/tests/api_resources/alerting/destinations/test_eligible.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEligible: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/alerting/destinations/test_pagerduty.py b/tests/api_resources/alerting/destinations/test_pagerduty.py index 2201b9943e0..0df4266e854 100644 --- a/tests/api_resources/alerting/destinations/test_pagerduty.py +++ b/tests/api_resources/alerting/destinations/test_pagerduty.py @@ -211,7 +211,9 @@ def test_path_params_link(self, client: Cloudflare) -> None: class TestAsyncPagerduty: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip( reason="prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4285" diff --git a/tests/api_resources/alerting/destinations/test_webhooks.py b/tests/api_resources/alerting/destinations/test_webhooks.py index ea816e0bdbf..af2fefa83c1 100644 --- a/tests/api_resources/alerting/destinations/test_webhooks.py +++ b/tests/api_resources/alerting/destinations/test_webhooks.py @@ -326,7 +326,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWebhooks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip( reason="prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4291" diff --git a/tests/api_resources/alerting/test_available_alerts.py b/tests/api_resources/alerting/test_available_alerts.py index 253ff803cdf..0836a669443 100644 --- a/tests/api_resources/alerting/test_available_alerts.py +++ b/tests/api_resources/alerting/test_available_alerts.py @@ -57,7 +57,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAvailableAlerts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/alerting/test_history.py b/tests/api_resources/alerting/test_history.py index 43ef79ac5c3..912513472c3 100644 --- a/tests/api_resources/alerting/test_history.py +++ b/tests/api_resources/alerting/test_history.py @@ -70,7 +70,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncHistory: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/alerting/test_policies.py b/tests/api_resources/alerting/test_policies.py index adad9227350..9ed3edd4cf6 100644 --- a/tests/api_resources/alerting/test_policies.py +++ b/tests/api_resources/alerting/test_policies.py @@ -426,7 +426,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPolicies: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip( reason="prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4274" diff --git a/tests/api_resources/api_gateway/discovery/test_operations.py b/tests/api_resources/api_gateway/discovery/test_operations.py index a696f2b3018..48149bb3a16 100644 --- a/tests/api_resources/api_gateway/discovery/test_operations.py +++ b/tests/api_resources/api_gateway/discovery/test_operations.py @@ -190,7 +190,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncOperations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/expression_template/test_fallthrough.py b/tests/api_resources/api_gateway/expression_template/test_fallthrough.py index 5dfac36140d..5db06ad8f6e 100644 --- a/tests/api_resources/api_gateway/expression_template/test_fallthrough.py +++ b/tests/api_resources/api_gateway/expression_template/test_fallthrough.py @@ -61,7 +61,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncFallthrough: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/operations/test_schema_validation.py b/tests/api_resources/api_gateway/operations/test_schema_validation.py index 21c19d6c184..2f06a4d9a44 100644 --- a/tests/api_resources/api_gateway/operations/test_schema_validation.py +++ b/tests/api_resources/api_gateway/operations/test_schema_validation.py @@ -182,7 +182,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSchemaValidation: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/settings/test_schema_validation.py b/tests/api_resources/api_gateway/settings/test_schema_validation.py index 2441b86a24c..deb95100ec4 100644 --- a/tests/api_resources/api_gateway/settings/test_schema_validation.py +++ b/tests/api_resources/api_gateway/settings/test_schema_validation.py @@ -157,7 +157,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSchemaValidation: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/test_configurations.py b/tests/api_resources/api_gateway/test_configurations.py index 13bdbc85420..0dcffd886a9 100644 --- a/tests/api_resources/api_gateway/test_configurations.py +++ b/tests/api_resources/api_gateway/test_configurations.py @@ -130,7 +130,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfigurations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/test_discovery.py b/tests/api_resources/api_gateway/test_discovery.py index f41ab529266..94be7e36cd8 100644 --- a/tests/api_resources/api_gateway/test_discovery.py +++ b/tests/api_resources/api_gateway/test_discovery.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDiscovery: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/test_operations.py b/tests/api_resources/api_gateway/test_operations.py index 37151f2ed30..aab5d1b4997 100644 --- a/tests/api_resources/api_gateway/test_operations.py +++ b/tests/api_resources/api_gateway/test_operations.py @@ -339,7 +339,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOperations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/test_schemas.py b/tests/api_resources/api_gateway/test_schemas.py index 5c2542b4cb5..df03ab73a6a 100644 --- a/tests/api_resources/api_gateway/test_schemas.py +++ b/tests/api_resources/api_gateway/test_schemas.py @@ -66,7 +66,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncSchemas: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/test_user_schemas.py b/tests/api_resources/api_gateway/test_user_schemas.py index 9ebdf9e6b15..c81163c3318 100644 --- a/tests/api_resources/api_gateway/test_user_schemas.py +++ b/tests/api_resources/api_gateway/test_user_schemas.py @@ -292,7 +292,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncUserSchemas: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/user_schemas/test_hosts.py b/tests/api_resources/api_gateway/user_schemas/test_hosts.py index 6b9b80c5228..ec06d6f17ea 100644 --- a/tests/api_resources/api_gateway/user_schemas/test_hosts.py +++ b/tests/api_resources/api_gateway/user_schemas/test_hosts.py @@ -67,7 +67,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncHosts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/user_schemas/test_operations.py b/tests/api_resources/api_gateway/user_schemas/test_operations.py index 64234507893..6aa3e821042 100644 --- a/tests/api_resources/api_gateway/user_schemas/test_operations.py +++ b/tests/api_resources/api_gateway/user_schemas/test_operations.py @@ -83,7 +83,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncOperations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/argo/test_smart_routing.py b/tests/api_resources/argo/test_smart_routing.py index 8622689044d..b568bb4fbb1 100644 --- a/tests/api_resources/argo/test_smart_routing.py +++ b/tests/api_resources/argo/test_smart_routing.py @@ -99,7 +99,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSmartRouting: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/argo/test_tiered_caching.py b/tests/api_resources/argo/test_tiered_caching.py index d91060caa7b..9055eebb8b8 100644 --- a/tests/api_resources/argo/test_tiered_caching.py +++ b/tests/api_resources/argo/test_tiered_caching.py @@ -99,7 +99,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTieredCaching: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/billing/test_profiles.py b/tests/api_resources/billing/test_profiles.py index b30605d06b8..faf0afcb458 100644 --- a/tests/api_resources/billing/test_profiles.py +++ b/tests/api_resources/billing/test_profiles.py @@ -64,7 +64,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncProfiles: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/botnet_feed/configs/test_asn.py b/tests/api_resources/botnet_feed/configs/test_asn.py index 98199e322e8..7a026bc4696 100755 --- a/tests/api_resources/botnet_feed/configs/test_asn.py +++ b/tests/api_resources/botnet_feed/configs/test_asn.py @@ -99,7 +99,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncASN: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/botnet_feed/test_asn.py b/tests/api_resources/botnet_feed/test_asn.py index 14b998cdfab..89f402069b3 100755 --- a/tests/api_resources/botnet_feed/test_asn.py +++ b/tests/api_resources/botnet_feed/test_asn.py @@ -113,7 +113,9 @@ def test_path_params_full_report(self, client: Cloudflare) -> None: class TestAsyncASN: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_day_report(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/brand_protection/__init__.py b/tests/api_resources/brand_protection/__init__.py new file mode 100644 index 00000000000..fd8019a9a1a --- /dev/null +++ b/tests/api_resources/brand_protection/__init__.py @@ -0,0 +1 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/tests/api_resources/browser_rendering/test_content.py b/tests/api_resources/browser_rendering/test_content.py index 92582a45829..e713bd7dd95 100644 --- a/tests/api_resources/browser_rendering/test_content.py +++ b/tests/api_resources/browser_rendering/test_content.py @@ -133,7 +133,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncContent: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/browser_rendering/test_json.py b/tests/api_resources/browser_rendering/test_json.py index d65aa816256..b019c0a2098 100644 --- a/tests/api_resources/browser_rendering/test_json.py +++ b/tests/api_resources/browser_rendering/test_json.py @@ -139,7 +139,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncJson: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/browser_rendering/test_links.py b/tests/api_resources/browser_rendering/test_links.py index 954d14a7ec2..d3aaa1672cb 100644 --- a/tests/api_resources/browser_rendering/test_links.py +++ b/tests/api_resources/browser_rendering/test_links.py @@ -135,7 +135,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncLinks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/browser_rendering/test_markdown.py b/tests/api_resources/browser_rendering/test_markdown.py index a00e86a19d3..24845a74bfc 100644 --- a/tests/api_resources/browser_rendering/test_markdown.py +++ b/tests/api_resources/browser_rendering/test_markdown.py @@ -133,7 +133,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncMarkdown: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/browser_rendering/test_pdf.py b/tests/api_resources/browser_rendering/test_pdf.py index cb09073d496..511b92e71f1 100644 --- a/tests/api_resources/browser_rendering/test_pdf.py +++ b/tests/api_resources/browser_rendering/test_pdf.py @@ -165,7 +165,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncPDF: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize @pytest.mark.respx(base_url=base_url) diff --git a/tests/api_resources/browser_rendering/test_scrape.py b/tests/api_resources/browser_rendering/test_scrape.py index 4dd89c8e1ac..ef8925884e4 100644 --- a/tests/api_resources/browser_rendering/test_scrape.py +++ b/tests/api_resources/browser_rendering/test_scrape.py @@ -139,7 +139,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncScrape: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/browser_rendering/test_screenshot.py b/tests/api_resources/browser_rendering/test_screenshot.py index d44ec38de09..c106782ee00 100644 --- a/tests/api_resources/browser_rendering/test_screenshot.py +++ b/tests/api_resources/browser_rendering/test_screenshot.py @@ -153,7 +153,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncScreenshot: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/browser_rendering/test_snapshot.py b/tests/api_resources/browser_rendering/test_snapshot.py index c72f57f5ef9..bcf5ec2b521 100644 --- a/tests/api_resources/browser_rendering/test_snapshot.py +++ b/tests/api_resources/browser_rendering/test_snapshot.py @@ -150,7 +150,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncSnapshot: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cache/test_cache_reserve.py b/tests/api_resources/cache/test_cache_reserve.py index 1d125319b6f..abbb074d4e9 100644 --- a/tests/api_resources/cache/test_cache_reserve.py +++ b/tests/api_resources/cache/test_cache_reserve.py @@ -184,7 +184,9 @@ def test_path_params_status(self, client: Cloudflare) -> None: class TestAsyncCacheReserve: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_clear(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cache/test_regional_tiered_cache.py b/tests/api_resources/cache/test_regional_tiered_cache.py index 98deff2adf5..2b78a788e2e 100644 --- a/tests/api_resources/cache/test_regional_tiered_cache.py +++ b/tests/api_resources/cache/test_regional_tiered_cache.py @@ -102,7 +102,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRegionalTieredCache: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cache/test_smart_tiered_cache.py b/tests/api_resources/cache/test_smart_tiered_cache.py index 4502fff107d..3457741e5fe 100644 --- a/tests/api_resources/cache/test_smart_tiered_cache.py +++ b/tests/api_resources/cache/test_smart_tiered_cache.py @@ -141,7 +141,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSmartTieredCache: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cache/test_variants.py b/tests/api_resources/cache/test_variants.py index 9cb7356c449..5ddaebb439f 100644 --- a/tests/api_resources/cache/test_variants.py +++ b/tests/api_resources/cache/test_variants.py @@ -166,7 +166,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVariants: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/calls/test_sfu.py b/tests/api_resources/calls/test_sfu.py index 624095f5bb3..5a4bc4ca177 100644 --- a/tests/api_resources/calls/test_sfu.py +++ b/tests/api_resources/calls/test_sfu.py @@ -285,7 +285,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSFU: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize diff --git a/tests/api_resources/calls/test_turn.py b/tests/api_resources/calls/test_turn.py index 58454ab1bdf..34e3ca6e167 100644 --- a/tests/api_resources/calls/test_turn.py +++ b/tests/api_resources/calls/test_turn.py @@ -285,7 +285,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTURN: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize diff --git a/tests/api_resources/certificate_authorities/test_hostname_associations.py b/tests/api_resources/certificate_authorities/test_hostname_associations.py index b8429f7df84..7f4088bae55 100644 --- a/tests/api_resources/certificate_authorities/test_hostname_associations.py +++ b/tests/api_resources/certificate_authorities/test_hostname_associations.py @@ -115,7 +115,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHostnameAssociations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cloud_connector/test_rules.py b/tests/api_resources/cloud_connector/test_rules.py index 255f82ba344..d80f63bdf9f 100644 --- a/tests/api_resources/cloud_connector/test_rules.py +++ b/tests/api_resources/cloud_connector/test_rules.py @@ -113,7 +113,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cloudforce_one/requests/test_assets.py b/tests/api_resources/cloudforce_one/requests/test_assets.py index e25f0eb419d..e2d5c2f8fae 100644 --- a/tests/api_resources/cloudforce_one/requests/test_assets.py +++ b/tests/api_resources/cloudforce_one/requests/test_assets.py @@ -273,7 +273,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAssets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cloudforce_one/requests/test_message.py b/tests/api_resources/cloudforce_one/requests/test_message.py index c4d7049a561..36273480abe 100644 --- a/tests/api_resources/cloudforce_one/requests/test_message.py +++ b/tests/api_resources/cloudforce_one/requests/test_message.py @@ -269,7 +269,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMessage: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cloudforce_one/requests/test_priority.py b/tests/api_resources/cloudforce_one/requests/test_priority.py index 9a915c85dc4..66bd879a97e 100644 --- a/tests/api_resources/cloudforce_one/requests/test_priority.py +++ b/tests/api_resources/cloudforce_one/requests/test_priority.py @@ -279,7 +279,9 @@ def test_path_params_quota(self, client: Cloudflare) -> None: class TestAsyncPriority: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cloudforce_one/scans/test_config.py b/tests/api_resources/cloudforce_one/scans/test_config.py index 532ae366d26..86680ee87c9 100644 --- a/tests/api_resources/cloudforce_one/scans/test_config.py +++ b/tests/api_resources/cloudforce_one/scans/test_config.py @@ -221,7 +221,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncConfig: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cloudforce_one/scans/test_results.py b/tests/api_resources/cloudforce_one/scans/test_results.py index 0ac885288f3..8f385538a2c 100644 --- a/tests/api_resources/cloudforce_one/scans/test_results.py +++ b/tests/api_resources/cloudforce_one/scans/test_results.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncResults: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cloudforce_one/test_requests.py b/tests/api_resources/cloudforce_one/test_requests.py index cf8f3df2da9..e4da0a26eed 100644 --- a/tests/api_resources/cloudforce_one/test_requests.py +++ b/tests/api_resources/cloudforce_one/test_requests.py @@ -412,7 +412,9 @@ def test_path_params_types(self, client: Cloudflare) -> None: class TestAsyncRequests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cloudforce_one/test_threat_events.py b/tests/api_resources/cloudforce_one/test_threat_events.py index 3a48d8f5a58..d8b54907ec4 100644 --- a/tests/api_resources/cloudforce_one/test_threat_events.py +++ b/tests/api_resources/cloudforce_one/test_threat_events.py @@ -30,8 +30,6 @@ class TestThreatEvents: def test_method_create(self, client: Cloudflare) -> None: threat_event = client.cloudforce_one.threat_events.create( path_account_id="account_id", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -46,8 +44,6 @@ def test_method_create(self, client: Cloudflare) -> None: def test_method_create_with_all_params(self, client: Cloudflare) -> None: threat_event = client.cloudforce_one.threat_events.create( path_account_id="account_id", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -59,6 +55,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, tlp="amber", body_account_id=123456, + attacker="Flying Yeti", + attacker_country="CN", dataset_id="durableObjectName", indicator="domain.com", tags=["malware"], @@ -72,8 +70,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_create(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.with_raw_response.create( path_account_id="account_id", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -92,8 +88,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: def test_streaming_response_create(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.with_streaming_response.create( path_account_id="account_id", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -115,8 +109,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_account_id` but received ''"): client.cloudforce_one.threat_events.with_raw_response.create( path_account_id="", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -247,8 +239,6 @@ def test_method_bulk_create(self, client: Cloudflare) -> None: account_id="account_id", data=[ { - "attacker": "Flying Yeti", - "attacker_country": "CN", "category": "Domain Resolution", "date": parse_datetime("2022-04-01T00:00:00Z"), "event": "An attacker registered the domain domain.com", @@ -268,8 +258,6 @@ def test_raw_response_bulk_create(self, client: Cloudflare) -> None: account_id="account_id", data=[ { - "attacker": "Flying Yeti", - "attacker_country": "CN", "category": "Domain Resolution", "date": parse_datetime("2022-04-01T00:00:00Z"), "event": "An attacker registered the domain domain.com", @@ -293,8 +281,6 @@ def test_streaming_response_bulk_create(self, client: Cloudflare) -> None: account_id="account_id", data=[ { - "attacker": "Flying Yeti", - "attacker_country": "CN", "category": "Domain Resolution", "date": parse_datetime("2022-04-01T00:00:00Z"), "event": "An attacker registered the domain domain.com", @@ -321,8 +307,6 @@ def test_path_params_bulk_create(self, client: Cloudflare) -> None: account_id="", data=[ { - "attacker": "Flying Yeti", - "attacker_country": "CN", "category": "Domain Resolution", "date": parse_datetime("2022-04-01T00:00:00Z"), "event": "An attacker registered the domain domain.com", @@ -459,15 +443,15 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncThreatEvents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: threat_event = await async_client.cloudforce_one.threat_events.create( path_account_id="account_id", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -482,8 +466,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: threat_event = await async_client.cloudforce_one.threat_events.create( path_account_id="account_id", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -495,6 +477,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, tlp="amber", body_account_id=123456, + attacker="Flying Yeti", + attacker_country="CN", dataset_id="durableObjectName", indicator="domain.com", tags=["malware"], @@ -508,8 +492,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.with_raw_response.create( path_account_id="account_id", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -528,8 +510,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.with_streaming_response.create( path_account_id="account_id", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -551,8 +531,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_account_id` but received ''"): await async_client.cloudforce_one.threat_events.with_raw_response.create( path_account_id="", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -683,8 +661,6 @@ async def test_method_bulk_create(self, async_client: AsyncCloudflare) -> None: account_id="account_id", data=[ { - "attacker": "Flying Yeti", - "attacker_country": "CN", "category": "Domain Resolution", "date": parse_datetime("2022-04-01T00:00:00Z"), "event": "An attacker registered the domain domain.com", @@ -704,8 +680,6 @@ async def test_raw_response_bulk_create(self, async_client: AsyncCloudflare) -> account_id="account_id", data=[ { - "attacker": "Flying Yeti", - "attacker_country": "CN", "category": "Domain Resolution", "date": parse_datetime("2022-04-01T00:00:00Z"), "event": "An attacker registered the domain domain.com", @@ -729,8 +703,6 @@ async def test_streaming_response_bulk_create(self, async_client: AsyncCloudflar account_id="account_id", data=[ { - "attacker": "Flying Yeti", - "attacker_country": "CN", "category": "Domain Resolution", "date": parse_datetime("2022-04-01T00:00:00Z"), "event": "An attacker registered the domain domain.com", @@ -757,8 +729,6 @@ async def test_path_params_bulk_create(self, async_client: AsyncCloudflare) -> N account_id="", data=[ { - "attacker": "Flying Yeti", - "attacker_country": "CN", "category": "Domain Resolution", "date": parse_datetime("2022-04-01T00:00:00Z"), "event": "An attacker registered the domain domain.com", diff --git a/tests/api_resources/cloudforce_one/threat_events/datasets/test_health.py b/tests/api_resources/cloudforce_one/threat_events/datasets/test_health.py index 4351d3e7fe2..f95e9fa4950 100644 --- a/tests/api_resources/cloudforce_one/threat_events/datasets/test_health.py +++ b/tests/api_resources/cloudforce_one/threat_events/datasets/test_health.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHealth: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cloudforce_one/threat_events/test_attackers.py b/tests/api_resources/cloudforce_one/threat_events/test_attackers.py index 2b780d97b65..9c37a9ff13f 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_attackers.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_attackers.py @@ -61,7 +61,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAttackers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_categories.py b/tests/api_resources/cloudforce_one/threat_events/test_categories.py index 983168b5bdf..f94a5dbd909 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_categories.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_categories.py @@ -298,7 +298,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCategories: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_countries.py b/tests/api_resources/cloudforce_one/threat_events/test_countries.py index 948f95a73a0..706c0925c45 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_countries.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_countries.py @@ -61,7 +61,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncCountries: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_crons.py b/tests/api_resources/cloudforce_one/threat_events/test_crons.py index 7ba6a371d53..9bacfe1395e 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_crons.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_crons.py @@ -103,7 +103,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncCrons: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_datasets.py b/tests/api_resources/cloudforce_one/threat_events/test_datasets.py index 06e97ba80c1..f1ae4d436cd 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_datasets.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_datasets.py @@ -295,7 +295,9 @@ def test_path_params_raw(self, client: Cloudflare) -> None: class TestAsyncDatasets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_event_tags.py b/tests/api_resources/cloudforce_one/threat_events/test_event_tags.py index 6c5a0829c6f..0ea6e662e1a 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_event_tags.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_event_tags.py @@ -131,7 +131,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncEventTags: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_indicator_types.py b/tests/api_resources/cloudforce_one/threat_events/test_indicator_types.py index 27f277dfd80..85c45bc3763 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_indicator_types.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_indicator_types.py @@ -61,7 +61,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncIndicatorTypes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_insights.py b/tests/api_resources/cloudforce_one/threat_events/test_insights.py index 2e8442fa611..a3c3cbd8184 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_insights.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_insights.py @@ -279,7 +279,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncInsights: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_raw.py b/tests/api_resources/cloudforce_one/threat_events/test_raw.py index b854f2753fa..b56d85ba3b8 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_raw.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_raw.py @@ -160,7 +160,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRaw: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_relate.py b/tests/api_resources/cloudforce_one/threat_events/test_relate.py index 42bf9925c6d..f9a8447e117 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_relate.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_relate.py @@ -71,7 +71,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncRelate: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_tags.py b/tests/api_resources/cloudforce_one/threat_events/test_tags.py index 9fd56ab430b..bf505654fe1 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_tags.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_tags.py @@ -65,7 +65,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncTags: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_target_industries.py b/tests/api_resources/cloudforce_one/threat_events/test_target_industries.py index ffdc0a02b83..e08db1e9305 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_target_industries.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_target_industries.py @@ -61,7 +61,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncTargetIndustries: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/content_scanning/test_payloads.py b/tests/api_resources/content_scanning/test_payloads.py index 3c3be9c5537..3c24ad530e0 100644 --- a/tests/api_resources/content_scanning/test_payloads.py +++ b/tests/api_resources/content_scanning/test_payloads.py @@ -152,7 +152,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncPayloads: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/content_scanning/test_settings.py b/tests/api_resources/content_scanning/test_settings.py index f8f169b2766..61236f71476 100644 --- a/tests/api_resources/content_scanning/test_settings.py +++ b/tests/api_resources/content_scanning/test_settings.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/custom_certificates/test_prioritize.py b/tests/api_resources/custom_certificates/test_prioritize.py index dec90b6f83c..1ee27704925 100644 --- a/tests/api_resources/custom_certificates/test_prioritize.py +++ b/tests/api_resources/custom_certificates/test_prioritize.py @@ -62,7 +62,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: class TestAsyncPrioritize: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/custom_hostnames/certificate_pack/test_certificates.py b/tests/api_resources/custom_hostnames/certificate_pack/test_certificates.py index bbe43fce774..9ceb3582c3f 100644 --- a/tests/api_resources/custom_hostnames/certificate_pack/test_certificates.py +++ b/tests/api_resources/custom_hostnames/certificate_pack/test_certificates.py @@ -184,7 +184,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncCertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/custom_hostnames/test_fallback_origin.py b/tests/api_resources/custom_hostnames/test_fallback_origin.py index 06e7260f852..4e0e1a70a62 100644 --- a/tests/api_resources/custom_hostnames/test_fallback_origin.py +++ b/tests/api_resources/custom_hostnames/test_fallback_origin.py @@ -141,7 +141,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFallbackOrigin: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/d1/test_database.py b/tests/api_resources/d1/test_database.py index f97b3c45e5d..288b342469c 100644 --- a/tests/api_resources/d1/test_database.py +++ b/tests/api_resources/d1/test_database.py @@ -705,7 +705,9 @@ def test_path_params_raw(self, client: Cloudflare) -> None: class TestAsyncDatabase: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/diagnostics/test_traceroutes.py b/tests/api_resources/diagnostics/test_traceroutes.py index d71849dd539..9ad32223c09 100644 --- a/tests/api_resources/diagnostics/test_traceroutes.py +++ b/tests/api_resources/diagnostics/test_traceroutes.py @@ -78,7 +78,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncTraceroutes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns/analytics/reports/test_bytimes.py b/tests/api_resources/dns/analytics/reports/test_bytimes.py index 73408198645..419f0d4670f 100644 --- a/tests/api_resources/dns/analytics/reports/test_bytimes.py +++ b/tests/api_resources/dns/analytics/reports/test_bytimes.py @@ -73,7 +73,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBytimes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns/analytics/test_reports.py b/tests/api_resources/dns/analytics/test_reports.py index 89dae97959c..d3c918a2868 100644 --- a/tests/api_resources/dns/analytics/test_reports.py +++ b/tests/api_resources/dns/analytics/test_reports.py @@ -72,7 +72,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncReports: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns/settings/account/test_views.py b/tests/api_resources/dns/settings/account/test_views.py index 59ea8910398..0d76207ae4f 100644 --- a/tests/api_resources/dns/settings/account/test_views.py +++ b/tests/api_resources/dns/settings/account/test_views.py @@ -284,7 +284,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncViews: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns/settings/test_account.py b/tests/api_resources/dns/settings/test_account.py index fed6b4a9444..b449a943640 100644 --- a/tests/api_resources/dns/settings/test_account.py +++ b/tests/api_resources/dns/settings/test_account.py @@ -130,7 +130,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAccount: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="HTTP 422 from prism") @parametrize diff --git a/tests/api_resources/dns/settings/test_zone.py b/tests/api_resources/dns/settings/test_zone.py index b67c99535e4..432b4c9fb62 100644 --- a/tests/api_resources/dns/settings/test_zone.py +++ b/tests/api_resources/dns/settings/test_zone.py @@ -131,7 +131,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncZone: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="HTTP 422 from prism") @parametrize diff --git a/tests/api_resources/dns/test_dnssec.py b/tests/api_resources/dns/test_dnssec.py index 3e174c314d6..e37b7a54f70 100644 --- a/tests/api_resources/dns/test_dnssec.py +++ b/tests/api_resources/dns/test_dnssec.py @@ -144,7 +144,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDNSSEC: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns/test_records.py b/tests/api_resources/dns/test_records.py index 19f3b30479b..e91b3631255 100644 --- a/tests/api_resources/dns/test_records.py +++ b/tests/api_resources/dns/test_records.py @@ -30,6 +30,7 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -40,6 +41,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", comment="Domain verification record", content="198.51.100.4", @@ -49,7 +51,6 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -59,6 +60,7 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -73,6 +75,7 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) as response: assert not response.is_closed @@ -90,6 +93,7 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="A", ) @@ -99,6 +103,7 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -109,6 +114,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", comment="Domain verification record", content="2400:cb00:2049::1", @@ -118,7 +124,6 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -128,6 +133,7 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -142,6 +148,7 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) as response: assert not response.is_closed @@ -159,6 +166,7 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="AAAA", ) @@ -168,6 +176,7 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -178,6 +187,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", comment="Domain verification record", content="content", @@ -188,7 +198,6 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -198,6 +207,7 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -212,6 +222,7 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) as response: assert not response.is_closed @@ -229,6 +240,7 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="CNAME", ) @@ -238,6 +250,7 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -248,6 +261,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", comment="Domain verification record", content="mx.example.com", @@ -258,7 +272,6 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -268,6 +281,7 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -282,6 +296,7 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) as response: assert not response.is_closed @@ -299,6 +314,7 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="MX", ) @@ -308,6 +324,7 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -318,6 +335,7 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", comment="Domain verification record", content="ns1.example.com", @@ -327,7 +345,6 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -337,6 +354,7 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -351,6 +369,7 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) as response: assert not response.is_closed @@ -368,6 +387,7 @@ def test_path_params_create_overload_5(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="NS", ) @@ -377,6 +397,7 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -387,6 +408,7 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", comment="Domain verification record", content="content", @@ -396,7 +418,6 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -406,6 +427,7 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -420,6 +442,7 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) as response: assert not response.is_closed @@ -437,6 +460,7 @@ def test_path_params_create_overload_6(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -446,6 +470,7 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -456,6 +481,7 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", comment="Domain verification record", content="example.com", @@ -465,7 +491,6 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -475,6 +500,7 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -489,6 +515,7 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) as response: assert not response.is_closed @@ -506,6 +533,7 @@ def test_path_params_create_overload_7(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="PTR", ) @@ -515,6 +543,7 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -525,6 +554,7 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", comment="Domain verification record", content='"v=spf1 include:example.com -all"', @@ -534,7 +564,6 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -544,6 +573,7 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -558,6 +588,7 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) as response: assert not response.is_closed @@ -575,6 +606,7 @@ def test_path_params_create_overload_8(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="TXT", ) @@ -584,6 +616,7 @@ def test_method_create_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -594,6 +627,7 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", comment="Domain verification record", data={ @@ -607,7 +641,6 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -617,6 +650,7 @@ def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -631,6 +665,7 @@ def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) as response: assert not response.is_closed @@ -648,6 +683,7 @@ def test_path_params_create_overload_9(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="CAA", ) @@ -657,6 +693,7 @@ def test_method_create_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -667,6 +704,7 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", comment="Domain verification record", data={ @@ -681,7 +719,6 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -691,6 +728,7 @@ def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -705,6 +743,7 @@ def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) as response: assert not response.is_closed @@ -722,6 +761,7 @@ def test_path_params_create_overload_10(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="CERT", ) @@ -731,6 +771,7 @@ def test_method_create_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -741,6 +782,7 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", comment="Domain verification record", data={ @@ -755,7 +797,6 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -765,6 +806,7 @@ def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -779,6 +821,7 @@ def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) as response: assert not response.is_closed @@ -796,6 +839,7 @@ def test_path_params_create_overload_11(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -805,6 +849,7 @@ def test_method_create_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -815,6 +860,7 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", comment="Domain verification record", data={ @@ -829,7 +875,6 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -839,6 +884,7 @@ def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -853,6 +899,7 @@ def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) as response: assert not response.is_closed @@ -870,6 +917,7 @@ def test_path_params_create_overload_12(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="DS", ) @@ -879,6 +927,7 @@ def test_method_create_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -889,6 +938,7 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", comment="Domain verification record", data={ @@ -902,7 +952,6 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -912,6 +961,7 @@ def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -926,6 +976,7 @@ def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) as response: assert not response.is_closed @@ -943,6 +994,7 @@ def test_path_params_create_overload_13(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="HTTPS", ) @@ -952,6 +1004,7 @@ def test_method_create_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -962,6 +1015,7 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", comment="Domain verification record", data={ @@ -984,7 +1038,6 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -994,6 +1047,7 @@ def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -1008,6 +1062,7 @@ def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) as response: assert not response.is_closed @@ -1025,6 +1080,7 @@ def test_path_params_create_overload_14(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="LOC", ) @@ -1034,6 +1090,7 @@ def test_method_create_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1044,6 +1101,7 @@ def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", comment="Domain verification record", data={ @@ -1060,7 +1118,6 @@ def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1070,6 +1127,7 @@ def test_raw_response_create_overload_15(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -1084,6 +1142,7 @@ def test_streaming_response_create_overload_15(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) as response: assert not response.is_closed @@ -1101,6 +1160,7 @@ def test_path_params_create_overload_15(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="NAPTR", ) @@ -1110,6 +1170,7 @@ def test_method_create_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1120,6 +1181,7 @@ def test_method_create_with_all_params_overload_16(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", comment="Domain verification record", data={ @@ -1134,7 +1196,6 @@ def test_method_create_with_all_params_overload_16(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1144,6 +1205,7 @@ def test_raw_response_create_overload_16(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -1158,6 +1220,7 @@ def test_streaming_response_create_overload_16(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) as response: assert not response.is_closed @@ -1175,6 +1238,7 @@ def test_path_params_create_overload_16(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -1184,6 +1248,7 @@ def test_method_create_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1194,6 +1259,7 @@ def test_method_create_with_all_params_overload_17(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", comment="Domain verification record", data={ @@ -1208,7 +1274,6 @@ def test_method_create_with_all_params_overload_17(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1218,6 +1283,7 @@ def test_raw_response_create_overload_17(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -1232,6 +1298,7 @@ def test_streaming_response_create_overload_17(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) as response: assert not response.is_closed @@ -1249,6 +1316,7 @@ def test_path_params_create_overload_17(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="SRV", ) @@ -1258,6 +1326,7 @@ def test_method_create_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1268,6 +1337,7 @@ def test_method_create_with_all_params_overload_18(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", comment="Domain verification record", data={ @@ -1281,7 +1351,6 @@ def test_method_create_with_all_params_overload_18(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1291,6 +1360,7 @@ def test_raw_response_create_overload_18(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -1305,6 +1375,7 @@ def test_streaming_response_create_overload_18(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) as response: assert not response.is_closed @@ -1322,6 +1393,7 @@ def test_path_params_create_overload_18(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="SSHFP", ) @@ -1331,6 +1403,7 @@ def test_method_create_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1341,6 +1414,7 @@ def test_method_create_with_all_params_overload_19(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", comment="Domain verification record", data={ @@ -1354,7 +1428,6 @@ def test_method_create_with_all_params_overload_19(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1364,6 +1437,7 @@ def test_raw_response_create_overload_19(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -1378,6 +1452,7 @@ def test_streaming_response_create_overload_19(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) as response: assert not response.is_closed @@ -1395,6 +1470,7 @@ def test_path_params_create_overload_19(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="SVCB", ) @@ -1404,6 +1480,7 @@ def test_method_create_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1414,6 +1491,7 @@ def test_method_create_with_all_params_overload_20(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", comment="Domain verification record", data={ @@ -1428,7 +1506,6 @@ def test_method_create_with_all_params_overload_20(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1438,6 +1515,7 @@ def test_raw_response_create_overload_20(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -1452,6 +1530,7 @@ def test_streaming_response_create_overload_20(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) as response: assert not response.is_closed @@ -1469,6 +1548,7 @@ def test_path_params_create_overload_20(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="TLSA", ) @@ -1478,6 +1558,7 @@ def test_method_create_overload_21(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1488,6 +1569,7 @@ def test_method_create_with_all_params_overload_21(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", comment="Domain verification record", data={ @@ -1501,7 +1583,6 @@ def test_method_create_with_all_params_overload_21(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1511,6 +1592,7 @@ def test_raw_response_create_overload_21(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) @@ -1525,6 +1607,7 @@ def test_streaming_response_create_overload_21(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) as response: assert not response.is_closed @@ -1542,6 +1625,7 @@ def test_path_params_create_overload_21(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="URI", ) @@ -1552,6 +1636,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1563,6 +1648,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", comment="Domain verification record", content="198.51.100.4", @@ -1572,7 +1658,6 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1583,6 +1668,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -1598,6 +1684,7 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) as response: assert not response.is_closed @@ -1616,6 +1703,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="A", ) @@ -1624,6 +1712,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -1634,6 +1723,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1645,6 +1735,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", comment="Domain verification record", content="2400:cb00:2049::1", @@ -1654,7 +1745,6 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1665,6 +1755,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -1680,6 +1771,7 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) as response: assert not response.is_closed @@ -1698,6 +1790,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="AAAA", ) @@ -1706,6 +1799,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -1716,6 +1810,7 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1727,6 +1822,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", comment="Domain verification record", content="content", @@ -1737,7 +1833,6 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1748,6 +1843,7 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -1763,6 +1859,7 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) as response: assert not response.is_closed @@ -1781,6 +1878,7 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CNAME", ) @@ -1789,6 +1887,7 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -1799,6 +1898,7 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1810,6 +1910,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", comment="Domain verification record", content="mx.example.com", @@ -1820,7 +1921,6 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1831,6 +1931,7 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -1846,6 +1947,7 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) as response: assert not response.is_closed @@ -1864,6 +1966,7 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="MX", ) @@ -1872,6 +1975,7 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -1882,6 +1986,7 @@ def test_method_update_overload_5(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1893,6 +1998,7 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", comment="Domain verification record", content="ns1.example.com", @@ -1902,7 +2008,6 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1913,6 +2018,7 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -1928,6 +2034,7 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) as response: assert not response.is_closed @@ -1946,6 +2053,7 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="NS", ) @@ -1954,6 +2062,7 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -1964,6 +2073,7 @@ def test_method_update_overload_6(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1975,6 +2085,7 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", comment="Domain verification record", content="content", @@ -1984,7 +2095,6 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1995,6 +2105,7 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -2010,6 +2121,7 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) as response: assert not response.is_closed @@ -2028,6 +2140,7 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -2036,6 +2149,7 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -2046,6 +2160,7 @@ def test_method_update_overload_7(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2057,6 +2172,7 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", comment="Domain verification record", content="example.com", @@ -2066,7 +2182,6 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2077,6 +2192,7 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -2092,6 +2208,7 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) as response: assert not response.is_closed @@ -2110,6 +2227,7 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="PTR", ) @@ -2118,6 +2236,7 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -2128,6 +2247,7 @@ def test_method_update_overload_8(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2139,6 +2259,7 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", comment="Domain verification record", content='"v=spf1 include:example.com -all"', @@ -2148,7 +2269,6 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2159,6 +2279,7 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -2174,6 +2295,7 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) as response: assert not response.is_closed @@ -2192,6 +2314,7 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="TXT", ) @@ -2200,6 +2323,7 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -2210,6 +2334,7 @@ def test_method_update_overload_9(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2221,6 +2346,7 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", comment="Domain verification record", data={ @@ -2234,7 +2360,6 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2245,6 +2370,7 @@ def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -2260,6 +2386,7 @@ def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) as response: assert not response.is_closed @@ -2278,6 +2405,7 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CAA", ) @@ -2286,6 +2414,7 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -2296,6 +2425,7 @@ def test_method_update_overload_10(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2307,6 +2437,7 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", comment="Domain verification record", data={ @@ -2321,7 +2452,6 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2332,6 +2462,7 @@ def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -2347,6 +2478,7 @@ def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) as response: assert not response.is_closed @@ -2365,6 +2497,7 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CERT", ) @@ -2373,6 +2506,7 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -2383,6 +2517,7 @@ def test_method_update_overload_11(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2394,6 +2529,7 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", comment="Domain verification record", data={ @@ -2408,7 +2544,6 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2419,6 +2554,7 @@ def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -2434,6 +2570,7 @@ def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) as response: assert not response.is_closed @@ -2452,6 +2589,7 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -2460,6 +2598,7 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -2470,6 +2609,7 @@ def test_method_update_overload_12(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2481,6 +2621,7 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", comment="Domain verification record", data={ @@ -2495,7 +2636,6 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2506,6 +2646,7 @@ def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -2521,6 +2662,7 @@ def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) as response: assert not response.is_closed @@ -2539,6 +2681,7 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="DS", ) @@ -2547,6 +2690,7 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -2557,6 +2701,7 @@ def test_method_update_overload_13(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2568,6 +2713,7 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", comment="Domain verification record", data={ @@ -2581,7 +2727,6 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2592,6 +2737,7 @@ def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -2607,6 +2753,7 @@ def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) as response: assert not response.is_closed @@ -2625,6 +2772,7 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="HTTPS", ) @@ -2633,6 +2781,7 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -2643,6 +2792,7 @@ def test_method_update_overload_14(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2654,6 +2804,7 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", comment="Domain verification record", data={ @@ -2676,7 +2827,6 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2687,6 +2837,7 @@ def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -2702,6 +2853,7 @@ def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) as response: assert not response.is_closed @@ -2720,6 +2872,7 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="LOC", ) @@ -2728,6 +2881,7 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -2738,6 +2892,7 @@ def test_method_update_overload_15(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2749,6 +2904,7 @@ def test_method_update_with_all_params_overload_15(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", comment="Domain verification record", data={ @@ -2765,7 +2921,6 @@ def test_method_update_with_all_params_overload_15(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2776,6 +2931,7 @@ def test_raw_response_update_overload_15(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -2791,6 +2947,7 @@ def test_streaming_response_update_overload_15(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) as response: assert not response.is_closed @@ -2809,6 +2966,7 @@ def test_path_params_update_overload_15(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="NAPTR", ) @@ -2817,6 +2975,7 @@ def test_path_params_update_overload_15(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -2827,6 +2986,7 @@ def test_method_update_overload_16(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2838,6 +2998,7 @@ def test_method_update_with_all_params_overload_16(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", comment="Domain verification record", data={ @@ -2852,7 +3013,6 @@ def test_method_update_with_all_params_overload_16(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2863,6 +3023,7 @@ def test_raw_response_update_overload_16(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -2878,6 +3039,7 @@ def test_streaming_response_update_overload_16(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) as response: assert not response.is_closed @@ -2896,6 +3058,7 @@ def test_path_params_update_overload_16(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -2904,6 +3067,7 @@ def test_path_params_update_overload_16(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -2914,6 +3078,7 @@ def test_method_update_overload_17(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2925,6 +3090,7 @@ def test_method_update_with_all_params_overload_17(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", comment="Domain verification record", data={ @@ -2939,7 +3105,6 @@ def test_method_update_with_all_params_overload_17(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2950,6 +3115,7 @@ def test_raw_response_update_overload_17(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -2965,6 +3131,7 @@ def test_streaming_response_update_overload_17(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) as response: assert not response.is_closed @@ -2983,6 +3150,7 @@ def test_path_params_update_overload_17(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SRV", ) @@ -2991,6 +3159,7 @@ def test_path_params_update_overload_17(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -3001,6 +3170,7 @@ def test_method_update_overload_18(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3012,6 +3182,7 @@ def test_method_update_with_all_params_overload_18(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", comment="Domain verification record", data={ @@ -3025,7 +3196,6 @@ def test_method_update_with_all_params_overload_18(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3036,6 +3206,7 @@ def test_raw_response_update_overload_18(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -3051,6 +3222,7 @@ def test_streaming_response_update_overload_18(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) as response: assert not response.is_closed @@ -3069,6 +3241,7 @@ def test_path_params_update_overload_18(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SSHFP", ) @@ -3077,6 +3250,7 @@ def test_path_params_update_overload_18(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -3087,6 +3261,7 @@ def test_method_update_overload_19(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3098,6 +3273,7 @@ def test_method_update_with_all_params_overload_19(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", comment="Domain verification record", data={ @@ -3111,7 +3287,6 @@ def test_method_update_with_all_params_overload_19(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3122,6 +3297,7 @@ def test_raw_response_update_overload_19(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -3137,6 +3313,7 @@ def test_streaming_response_update_overload_19(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) as response: assert not response.is_closed @@ -3155,6 +3332,7 @@ def test_path_params_update_overload_19(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SVCB", ) @@ -3163,6 +3341,7 @@ def test_path_params_update_overload_19(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -3173,6 +3352,7 @@ def test_method_update_overload_20(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3184,6 +3364,7 @@ def test_method_update_with_all_params_overload_20(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", comment="Domain verification record", data={ @@ -3198,7 +3379,6 @@ def test_method_update_with_all_params_overload_20(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3209,6 +3389,7 @@ def test_raw_response_update_overload_20(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -3224,6 +3405,7 @@ def test_streaming_response_update_overload_20(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) as response: assert not response.is_closed @@ -3242,6 +3424,7 @@ def test_path_params_update_overload_20(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="TLSA", ) @@ -3250,6 +3433,7 @@ def test_path_params_update_overload_20(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -3260,6 +3444,7 @@ def test_method_update_overload_21(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3271,6 +3456,7 @@ def test_method_update_with_all_params_overload_21(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", comment="Domain verification record", data={ @@ -3284,7 +3470,6 @@ def test_method_update_with_all_params_overload_21(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3295,6 +3480,7 @@ def test_raw_response_update_overload_21(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) @@ -3310,6 +3496,7 @@ def test_streaming_response_update_overload_21(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) as response: assert not response.is_closed @@ -3328,6 +3515,7 @@ def test_path_params_update_overload_21(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="URI", ) @@ -3336,6 +3524,7 @@ def test_path_params_update_overload_21(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) @@ -3491,6 +3680,7 @@ def test_method_batch_with_all_params(self, client: Cloudflare) -> None: patches=[ { "name": "example.com", + "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", @@ -3500,13 +3690,13 @@ def test_method_batch_with_all_params(self, client: Cloudflare) -> None: "ipv6_only": True, }, "tags": ["owner:dns-team"], - "ttl": 3600, "id": "023e105f4ecef8ad9ca31a8372d0c353", } ], posts=[ { "name": "example.com", + "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", @@ -3516,12 +3706,12 @@ def test_method_batch_with_all_params(self, client: Cloudflare) -> None: "ipv6_only": True, }, "tags": ["owner:dns-team"], - "ttl": 3600, } ], puts=[ { "name": "example.com", + "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", @@ -3531,7 +3721,6 @@ def test_method_batch_with_all_params(self, client: Cloudflare) -> None: "ipv6_only": True, }, "tags": ["owner:dns-team"], - "ttl": 3600, "id": "023e105f4ecef8ad9ca31a8372d0c353", } ], @@ -3579,6 +3768,7 @@ def test_method_edit_overload_1(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3590,6 +3780,7 @@ def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> Non dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", comment="Domain verification record", content="198.51.100.4", @@ -3599,7 +3790,6 @@ def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> Non "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3610,6 +3800,7 @@ def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -3625,6 +3816,7 @@ def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) as response: assert not response.is_closed @@ -3643,6 +3835,7 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="A", ) @@ -3651,6 +3844,7 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -3661,6 +3855,7 @@ def test_method_edit_overload_2(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3672,6 +3867,7 @@ def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> Non dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", comment="Domain verification record", content="2400:cb00:2049::1", @@ -3681,7 +3877,6 @@ def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> Non "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3692,6 +3887,7 @@ def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -3707,6 +3903,7 @@ def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) as response: assert not response.is_closed @@ -3725,6 +3922,7 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="AAAA", ) @@ -3733,6 +3931,7 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -3743,6 +3942,7 @@ def test_method_edit_overload_3(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3754,6 +3954,7 @@ def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> Non dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", comment="Domain verification record", content="content", @@ -3764,7 +3965,6 @@ def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> Non "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3775,6 +3975,7 @@ def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -3790,6 +3991,7 @@ def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) as response: assert not response.is_closed @@ -3808,6 +4010,7 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CNAME", ) @@ -3816,6 +4019,7 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -3826,6 +4030,7 @@ def test_method_edit_overload_4(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3837,6 +4042,7 @@ def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> Non dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", comment="Domain verification record", content="mx.example.com", @@ -3847,7 +4053,6 @@ def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> Non "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3858,6 +4063,7 @@ def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -3873,6 +4079,7 @@ def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) as response: assert not response.is_closed @@ -3891,6 +4098,7 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="MX", ) @@ -3899,6 +4107,7 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -3909,6 +4118,7 @@ def test_method_edit_overload_5(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3920,6 +4130,7 @@ def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> Non dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", comment="Domain verification record", content="ns1.example.com", @@ -3929,7 +4140,6 @@ def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> Non "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3940,6 +4150,7 @@ def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -3955,6 +4166,7 @@ def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) as response: assert not response.is_closed @@ -3973,6 +4185,7 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="NS", ) @@ -3981,6 +4194,7 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -3991,6 +4205,7 @@ def test_method_edit_overload_6(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4002,6 +4217,7 @@ def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> Non dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", comment="Domain verification record", content="content", @@ -4011,7 +4227,6 @@ def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> Non "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4022,6 +4237,7 @@ def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -4037,6 +4253,7 @@ def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) as response: assert not response.is_closed @@ -4055,6 +4272,7 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -4063,6 +4281,7 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -4073,6 +4292,7 @@ def test_method_edit_overload_7(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4084,6 +4304,7 @@ def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> Non dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", comment="Domain verification record", content="example.com", @@ -4093,7 +4314,6 @@ def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> Non "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4104,6 +4324,7 @@ def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -4119,6 +4340,7 @@ def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) as response: assert not response.is_closed @@ -4137,6 +4359,7 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="PTR", ) @@ -4145,6 +4368,7 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -4155,6 +4379,7 @@ def test_method_edit_overload_8(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4166,6 +4391,7 @@ def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> Non dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", comment="Domain verification record", content='"v=spf1 include:example.com -all"', @@ -4175,7 +4401,6 @@ def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> Non "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4186,6 +4411,7 @@ def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -4201,6 +4427,7 @@ def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) as response: assert not response.is_closed @@ -4219,6 +4446,7 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="TXT", ) @@ -4227,6 +4455,7 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -4237,6 +4466,7 @@ def test_method_edit_overload_9(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4248,6 +4478,7 @@ def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> Non dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", comment="Domain verification record", data={ @@ -4261,7 +4492,6 @@ def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> Non "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4272,6 +4502,7 @@ def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -4287,6 +4518,7 @@ def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) as response: assert not response.is_closed @@ -4305,6 +4537,7 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CAA", ) @@ -4313,6 +4546,7 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -4323,6 +4557,7 @@ def test_method_edit_overload_10(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4334,6 +4569,7 @@ def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", comment="Domain verification record", data={ @@ -4348,7 +4584,6 @@ def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4359,6 +4594,7 @@ def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -4374,6 +4610,7 @@ def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) as response: assert not response.is_closed @@ -4392,6 +4629,7 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CERT", ) @@ -4400,6 +4638,7 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -4410,6 +4649,7 @@ def test_method_edit_overload_11(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4421,6 +4661,7 @@ def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", comment="Domain verification record", data={ @@ -4435,7 +4676,6 @@ def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4446,6 +4686,7 @@ def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -4461,6 +4702,7 @@ def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) as response: assert not response.is_closed @@ -4479,6 +4721,7 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -4487,6 +4730,7 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -4497,6 +4741,7 @@ def test_method_edit_overload_12(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4508,6 +4753,7 @@ def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", comment="Domain verification record", data={ @@ -4522,7 +4768,6 @@ def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4533,6 +4778,7 @@ def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -4548,6 +4794,7 @@ def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) as response: assert not response.is_closed @@ -4566,6 +4813,7 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="DS", ) @@ -4574,6 +4822,7 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -4584,6 +4833,7 @@ def test_method_edit_overload_13(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4595,6 +4845,7 @@ def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", comment="Domain verification record", data={ @@ -4608,7 +4859,6 @@ def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4619,6 +4869,7 @@ def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -4634,6 +4885,7 @@ def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) as response: assert not response.is_closed @@ -4652,6 +4904,7 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="HTTPS", ) @@ -4660,6 +4913,7 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -4670,6 +4924,7 @@ def test_method_edit_overload_14(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4681,6 +4936,7 @@ def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", comment="Domain verification record", data={ @@ -4703,7 +4959,6 @@ def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4714,6 +4969,7 @@ def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -4729,6 +4985,7 @@ def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) as response: assert not response.is_closed @@ -4747,6 +5004,7 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="LOC", ) @@ -4755,6 +5013,7 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -4765,6 +5024,7 @@ def test_method_edit_overload_15(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4776,6 +5036,7 @@ def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", comment="Domain verification record", data={ @@ -4792,7 +5053,6 @@ def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4803,6 +5063,7 @@ def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -4818,6 +5079,7 @@ def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) as response: assert not response.is_closed @@ -4836,6 +5098,7 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="NAPTR", ) @@ -4844,6 +5107,7 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -4854,6 +5118,7 @@ def test_method_edit_overload_16(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4865,6 +5130,7 @@ def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", comment="Domain verification record", data={ @@ -4879,7 +5145,6 @@ def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4890,6 +5155,7 @@ def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -4905,6 +5171,7 @@ def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) as response: assert not response.is_closed @@ -4923,6 +5190,7 @@ def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -4931,6 +5199,7 @@ def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -4941,6 +5210,7 @@ def test_method_edit_overload_17(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4952,6 +5222,7 @@ def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", comment="Domain verification record", data={ @@ -4966,7 +5237,6 @@ def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4977,6 +5247,7 @@ def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -4992,6 +5263,7 @@ def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) as response: assert not response.is_closed @@ -5010,6 +5282,7 @@ def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SRV", ) @@ -5018,6 +5291,7 @@ def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -5028,6 +5302,7 @@ def test_method_edit_overload_18(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5039,6 +5314,7 @@ def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", comment="Domain verification record", data={ @@ -5052,7 +5328,6 @@ def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5063,6 +5338,7 @@ def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -5078,6 +5354,7 @@ def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) as response: assert not response.is_closed @@ -5096,6 +5373,7 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SSHFP", ) @@ -5104,6 +5382,7 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -5114,6 +5393,7 @@ def test_method_edit_overload_19(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5125,6 +5405,7 @@ def test_method_edit_with_all_params_overload_19(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", comment="Domain verification record", data={ @@ -5138,7 +5419,6 @@ def test_method_edit_with_all_params_overload_19(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5149,6 +5429,7 @@ def test_raw_response_edit_overload_19(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -5164,6 +5445,7 @@ def test_streaming_response_edit_overload_19(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) as response: assert not response.is_closed @@ -5182,6 +5464,7 @@ def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SVCB", ) @@ -5190,6 +5473,7 @@ def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -5200,6 +5484,7 @@ def test_method_edit_overload_20(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5211,6 +5496,7 @@ def test_method_edit_with_all_params_overload_20(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", comment="Domain verification record", data={ @@ -5225,7 +5511,6 @@ def test_method_edit_with_all_params_overload_20(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5236,6 +5521,7 @@ def test_raw_response_edit_overload_20(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -5251,6 +5537,7 @@ def test_streaming_response_edit_overload_20(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) as response: assert not response.is_closed @@ -5269,6 +5556,7 @@ def test_path_params_edit_overload_20(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="TLSA", ) @@ -5277,6 +5565,7 @@ def test_path_params_edit_overload_20(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -5287,6 +5576,7 @@ def test_method_edit_overload_21(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5298,6 +5588,7 @@ def test_method_edit_with_all_params_overload_21(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", comment="Domain verification record", data={ @@ -5311,7 +5602,6 @@ def test_method_edit_with_all_params_overload_21(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5322,6 +5612,7 @@ def test_raw_response_edit_overload_21(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) @@ -5337,6 +5628,7 @@ def test_streaming_response_edit_overload_21(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) as response: assert not response.is_closed @@ -5355,6 +5647,7 @@ def test_path_params_edit_overload_21(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="URI", ) @@ -5363,6 +5656,7 @@ def test_path_params_edit_overload_21(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) @@ -5556,7 +5850,9 @@ def test_path_params_scan(self, client: Cloudflare) -> None: class TestAsyncRecords: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize @@ -5564,6 +5860,7 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5574,6 +5871,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", comment="Domain verification record", content="198.51.100.4", @@ -5583,7 +5881,6 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5593,6 +5890,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -5607,6 +5905,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) as response: assert not response.is_closed @@ -5624,6 +5923,7 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="A", ) @@ -5633,6 +5933,7 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5643,6 +5944,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", comment="Domain verification record", content="2400:cb00:2049::1", @@ -5652,7 +5954,6 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5662,6 +5963,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -5676,6 +5978,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) as response: assert not response.is_closed @@ -5693,6 +5996,7 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="AAAA", ) @@ -5702,6 +6006,7 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5712,6 +6017,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", comment="Domain verification record", content="content", @@ -5722,7 +6028,6 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5732,6 +6037,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -5746,6 +6052,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) as response: assert not response.is_closed @@ -5763,6 +6070,7 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="CNAME", ) @@ -5772,6 +6080,7 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5782,6 +6091,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", comment="Domain verification record", content="mx.example.com", @@ -5792,7 +6102,6 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5802,6 +6111,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -5816,6 +6126,7 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) as response: assert not response.is_closed @@ -5833,6 +6144,7 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="MX", ) @@ -5842,6 +6154,7 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5852,6 +6165,7 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", comment="Domain verification record", content="ns1.example.com", @@ -5861,7 +6175,6 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5871,6 +6184,7 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -5885,6 +6199,7 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) as response: assert not response.is_closed @@ -5902,6 +6217,7 @@ async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="NS", ) @@ -5911,6 +6227,7 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5921,6 +6238,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", comment="Domain verification record", content="content", @@ -5930,7 +6248,6 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5940,6 +6257,7 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -5954,6 +6272,7 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) as response: assert not response.is_closed @@ -5971,6 +6290,7 @@ async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -5980,6 +6300,7 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5990,6 +6311,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", comment="Domain verification record", content="example.com", @@ -5999,7 +6321,6 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6009,6 +6330,7 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -6023,6 +6345,7 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) as response: assert not response.is_closed @@ -6040,6 +6363,7 @@ async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="PTR", ) @@ -6049,6 +6373,7 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6059,6 +6384,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", comment="Domain verification record", content='"v=spf1 include:example.com -all"', @@ -6068,7 +6394,6 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6078,6 +6403,7 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -6092,6 +6418,7 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) as response: assert not response.is_closed @@ -6109,6 +6436,7 @@ async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="TXT", ) @@ -6118,6 +6446,7 @@ async def test_method_create_overload_9(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6128,6 +6457,7 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", comment="Domain verification record", data={ @@ -6141,7 +6471,6 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6151,6 +6480,7 @@ async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflar response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -6165,6 +6495,7 @@ async def test_streaming_response_create_overload_9(self, async_client: AsyncClo async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) as response: assert not response.is_closed @@ -6182,6 +6513,7 @@ async def test_path_params_create_overload_9(self, async_client: AsyncCloudflare await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="CAA", ) @@ -6191,6 +6523,7 @@ async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6201,6 +6534,7 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", comment="Domain verification record", data={ @@ -6215,7 +6549,6 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6225,6 +6558,7 @@ async def test_raw_response_create_overload_10(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -6239,6 +6573,7 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) as response: assert not response.is_closed @@ -6256,6 +6591,7 @@ async def test_path_params_create_overload_10(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="CERT", ) @@ -6265,6 +6601,7 @@ async def test_method_create_overload_11(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6275,6 +6612,7 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", comment="Domain verification record", data={ @@ -6289,7 +6627,6 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6299,6 +6636,7 @@ async def test_raw_response_create_overload_11(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -6313,6 +6651,7 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) as response: assert not response.is_closed @@ -6330,6 +6669,7 @@ async def test_path_params_create_overload_11(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -6339,6 +6679,7 @@ async def test_method_create_overload_12(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6349,6 +6690,7 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", comment="Domain verification record", data={ @@ -6363,7 +6705,6 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6373,6 +6714,7 @@ async def test_raw_response_create_overload_12(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -6387,6 +6729,7 @@ async def test_streaming_response_create_overload_12(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) as response: assert not response.is_closed @@ -6404,6 +6747,7 @@ async def test_path_params_create_overload_12(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="DS", ) @@ -6413,6 +6757,7 @@ async def test_method_create_overload_13(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6423,6 +6768,7 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", comment="Domain verification record", data={ @@ -6436,7 +6782,6 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6446,6 +6791,7 @@ async def test_raw_response_create_overload_13(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -6460,6 +6806,7 @@ async def test_streaming_response_create_overload_13(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) as response: assert not response.is_closed @@ -6477,6 +6824,7 @@ async def test_path_params_create_overload_13(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="HTTPS", ) @@ -6486,6 +6834,7 @@ async def test_method_create_overload_14(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6496,6 +6845,7 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", comment="Domain verification record", data={ @@ -6518,7 +6868,6 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6528,6 +6877,7 @@ async def test_raw_response_create_overload_14(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -6542,6 +6892,7 @@ async def test_streaming_response_create_overload_14(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) as response: assert not response.is_closed @@ -6559,6 +6910,7 @@ async def test_path_params_create_overload_14(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="LOC", ) @@ -6568,6 +6920,7 @@ async def test_method_create_overload_15(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6578,6 +6931,7 @@ async def test_method_create_with_all_params_overload_15(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", comment="Domain verification record", data={ @@ -6594,7 +6948,6 @@ async def test_method_create_with_all_params_overload_15(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6604,6 +6957,7 @@ async def test_raw_response_create_overload_15(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -6618,6 +6972,7 @@ async def test_streaming_response_create_overload_15(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) as response: assert not response.is_closed @@ -6635,6 +6990,7 @@ async def test_path_params_create_overload_15(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="NAPTR", ) @@ -6644,6 +7000,7 @@ async def test_method_create_overload_16(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6654,6 +7011,7 @@ async def test_method_create_with_all_params_overload_16(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", comment="Domain verification record", data={ @@ -6668,7 +7026,6 @@ async def test_method_create_with_all_params_overload_16(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6678,6 +7035,7 @@ async def test_raw_response_create_overload_16(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -6692,6 +7050,7 @@ async def test_streaming_response_create_overload_16(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) as response: assert not response.is_closed @@ -6709,6 +7068,7 @@ async def test_path_params_create_overload_16(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -6718,6 +7078,7 @@ async def test_method_create_overload_17(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6728,6 +7089,7 @@ async def test_method_create_with_all_params_overload_17(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", comment="Domain verification record", data={ @@ -6742,7 +7104,6 @@ async def test_method_create_with_all_params_overload_17(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6752,6 +7113,7 @@ async def test_raw_response_create_overload_17(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -6766,6 +7128,7 @@ async def test_streaming_response_create_overload_17(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) as response: assert not response.is_closed @@ -6783,6 +7146,7 @@ async def test_path_params_create_overload_17(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="SRV", ) @@ -6792,6 +7156,7 @@ async def test_method_create_overload_18(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6802,6 +7167,7 @@ async def test_method_create_with_all_params_overload_18(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", comment="Domain verification record", data={ @@ -6815,7 +7181,6 @@ async def test_method_create_with_all_params_overload_18(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6825,6 +7190,7 @@ async def test_raw_response_create_overload_18(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -6839,6 +7205,7 @@ async def test_streaming_response_create_overload_18(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) as response: assert not response.is_closed @@ -6856,6 +7223,7 @@ async def test_path_params_create_overload_18(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="SSHFP", ) @@ -6865,6 +7233,7 @@ async def test_method_create_overload_19(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6875,6 +7244,7 @@ async def test_method_create_with_all_params_overload_19(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", comment="Domain verification record", data={ @@ -6888,7 +7258,6 @@ async def test_method_create_with_all_params_overload_19(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6898,6 +7267,7 @@ async def test_raw_response_create_overload_19(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -6912,6 +7282,7 @@ async def test_streaming_response_create_overload_19(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) as response: assert not response.is_closed @@ -6929,6 +7300,7 @@ async def test_path_params_create_overload_19(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="SVCB", ) @@ -6938,6 +7310,7 @@ async def test_method_create_overload_20(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6948,6 +7321,7 @@ async def test_method_create_with_all_params_overload_20(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", comment="Domain verification record", data={ @@ -6962,7 +7336,6 @@ async def test_method_create_with_all_params_overload_20(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6972,6 +7345,7 @@ async def test_raw_response_create_overload_20(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -6986,6 +7360,7 @@ async def test_streaming_response_create_overload_20(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) as response: assert not response.is_closed @@ -7003,6 +7378,7 @@ async def test_path_params_create_overload_20(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="TLSA", ) @@ -7012,6 +7388,7 @@ async def test_method_create_overload_21(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7022,6 +7399,7 @@ async def test_method_create_with_all_params_overload_21(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", comment="Domain verification record", data={ @@ -7035,7 +7413,6 @@ async def test_method_create_with_all_params_overload_21(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7045,6 +7422,7 @@ async def test_raw_response_create_overload_21(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) @@ -7059,6 +7437,7 @@ async def test_streaming_response_create_overload_21(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) as response: assert not response.is_closed @@ -7076,6 +7455,7 @@ async def test_path_params_create_overload_21(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="URI", ) @@ -7086,6 +7466,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7097,6 +7478,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", comment="Domain verification record", content="198.51.100.4", @@ -7106,7 +7488,6 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7117,6 +7498,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -7132,6 +7514,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) as response: assert not response.is_closed @@ -7150,6 +7533,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="A", ) @@ -7158,6 +7542,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -7168,6 +7553,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7179,6 +7565,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", comment="Domain verification record", content="2400:cb00:2049::1", @@ -7188,7 +7575,6 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7199,6 +7585,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -7214,6 +7601,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) as response: assert not response.is_closed @@ -7232,6 +7620,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="AAAA", ) @@ -7240,6 +7629,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -7250,6 +7640,7 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7261,6 +7652,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", comment="Domain verification record", content="content", @@ -7271,7 +7663,6 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7282,6 +7673,7 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -7297,6 +7689,7 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) as response: assert not response.is_closed @@ -7315,6 +7708,7 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CNAME", ) @@ -7323,6 +7717,7 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -7333,6 +7728,7 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7344,6 +7740,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", comment="Domain verification record", content="mx.example.com", @@ -7354,7 +7751,6 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7365,6 +7761,7 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -7380,6 +7777,7 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) as response: assert not response.is_closed @@ -7398,6 +7796,7 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="MX", ) @@ -7406,6 +7805,7 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -7416,6 +7816,7 @@ async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7427,6 +7828,7 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", comment="Domain verification record", content="ns1.example.com", @@ -7436,7 +7838,6 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7447,6 +7848,7 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -7462,6 +7864,7 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) as response: assert not response.is_closed @@ -7480,6 +7883,7 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="NS", ) @@ -7488,6 +7892,7 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -7498,6 +7903,7 @@ async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7509,6 +7915,7 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", comment="Domain verification record", content="content", @@ -7518,7 +7925,6 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7529,6 +7935,7 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -7544,6 +7951,7 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) as response: assert not response.is_closed @@ -7562,6 +7970,7 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -7570,6 +7979,7 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -7580,6 +7990,7 @@ async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7591,6 +8002,7 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", comment="Domain verification record", content="example.com", @@ -7600,7 +8012,6 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7611,6 +8022,7 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -7626,6 +8038,7 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) as response: assert not response.is_closed @@ -7644,6 +8057,7 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="PTR", ) @@ -7652,6 +8066,7 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -7662,6 +8077,7 @@ async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7673,6 +8089,7 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", comment="Domain verification record", content='"v=spf1 include:example.com -all"', @@ -7682,7 +8099,6 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7693,6 +8109,7 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -7708,6 +8125,7 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) as response: assert not response.is_closed @@ -7726,6 +8144,7 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="TXT", ) @@ -7734,6 +8153,7 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -7744,6 +8164,7 @@ async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7755,6 +8176,7 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", comment="Domain verification record", data={ @@ -7768,7 +8190,6 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7779,6 +8200,7 @@ async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -7794,6 +8216,7 @@ async def test_streaming_response_update_overload_9(self, async_client: AsyncClo dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) as response: assert not response.is_closed @@ -7812,6 +8235,7 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CAA", ) @@ -7820,6 +8244,7 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -7830,6 +8255,7 @@ async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7841,6 +8267,7 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", comment="Domain verification record", data={ @@ -7855,7 +8282,6 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7866,6 +8292,7 @@ async def test_raw_response_update_overload_10(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -7881,6 +8308,7 @@ async def test_streaming_response_update_overload_10(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) as response: assert not response.is_closed @@ -7899,6 +8327,7 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CERT", ) @@ -7907,6 +8336,7 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -7917,6 +8347,7 @@ async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7928,6 +8359,7 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", comment="Domain verification record", data={ @@ -7942,7 +8374,6 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7953,6 +8384,7 @@ async def test_raw_response_update_overload_11(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -7968,6 +8400,7 @@ async def test_streaming_response_update_overload_11(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) as response: assert not response.is_closed @@ -7986,6 +8419,7 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -7994,6 +8428,7 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -8004,6 +8439,7 @@ async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8015,6 +8451,7 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", comment="Domain verification record", data={ @@ -8029,7 +8466,6 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8040,6 +8476,7 @@ async def test_raw_response_update_overload_12(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -8055,6 +8492,7 @@ async def test_streaming_response_update_overload_12(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) as response: assert not response.is_closed @@ -8073,6 +8511,7 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="DS", ) @@ -8081,6 +8520,7 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -8091,6 +8531,7 @@ async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8102,6 +8543,7 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", comment="Domain verification record", data={ @@ -8115,7 +8557,6 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8126,6 +8567,7 @@ async def test_raw_response_update_overload_13(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -8141,6 +8583,7 @@ async def test_streaming_response_update_overload_13(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) as response: assert not response.is_closed @@ -8159,6 +8602,7 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="HTTPS", ) @@ -8167,6 +8611,7 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -8177,6 +8622,7 @@ async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8188,6 +8634,7 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", comment="Domain verification record", data={ @@ -8210,7 +8657,6 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8221,6 +8667,7 @@ async def test_raw_response_update_overload_14(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -8236,6 +8683,7 @@ async def test_streaming_response_update_overload_14(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) as response: assert not response.is_closed @@ -8254,6 +8702,7 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="LOC", ) @@ -8262,6 +8711,7 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -8272,6 +8722,7 @@ async def test_method_update_overload_15(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8283,6 +8734,7 @@ async def test_method_update_with_all_params_overload_15(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", comment="Domain verification record", data={ @@ -8299,7 +8751,6 @@ async def test_method_update_with_all_params_overload_15(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8310,6 +8761,7 @@ async def test_raw_response_update_overload_15(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -8325,6 +8777,7 @@ async def test_streaming_response_update_overload_15(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) as response: assert not response.is_closed @@ -8343,6 +8796,7 @@ async def test_path_params_update_overload_15(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="NAPTR", ) @@ -8351,6 +8805,7 @@ async def test_path_params_update_overload_15(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -8361,6 +8816,7 @@ async def test_method_update_overload_16(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8372,6 +8828,7 @@ async def test_method_update_with_all_params_overload_16(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", comment="Domain verification record", data={ @@ -8386,7 +8843,6 @@ async def test_method_update_with_all_params_overload_16(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8397,6 +8853,7 @@ async def test_raw_response_update_overload_16(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -8412,6 +8869,7 @@ async def test_streaming_response_update_overload_16(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) as response: assert not response.is_closed @@ -8430,6 +8888,7 @@ async def test_path_params_update_overload_16(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -8438,6 +8897,7 @@ async def test_path_params_update_overload_16(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -8448,6 +8908,7 @@ async def test_method_update_overload_17(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8459,6 +8920,7 @@ async def test_method_update_with_all_params_overload_17(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", comment="Domain verification record", data={ @@ -8473,7 +8935,6 @@ async def test_method_update_with_all_params_overload_17(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8484,6 +8945,7 @@ async def test_raw_response_update_overload_17(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -8499,6 +8961,7 @@ async def test_streaming_response_update_overload_17(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) as response: assert not response.is_closed @@ -8517,6 +8980,7 @@ async def test_path_params_update_overload_17(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SRV", ) @@ -8525,6 +8989,7 @@ async def test_path_params_update_overload_17(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -8535,6 +9000,7 @@ async def test_method_update_overload_18(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8546,6 +9012,7 @@ async def test_method_update_with_all_params_overload_18(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", comment="Domain verification record", data={ @@ -8559,7 +9026,6 @@ async def test_method_update_with_all_params_overload_18(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8570,6 +9036,7 @@ async def test_raw_response_update_overload_18(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -8585,6 +9052,7 @@ async def test_streaming_response_update_overload_18(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) as response: assert not response.is_closed @@ -8603,6 +9071,7 @@ async def test_path_params_update_overload_18(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SSHFP", ) @@ -8611,6 +9080,7 @@ async def test_path_params_update_overload_18(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -8621,6 +9091,7 @@ async def test_method_update_overload_19(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8632,6 +9103,7 @@ async def test_method_update_with_all_params_overload_19(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", comment="Domain verification record", data={ @@ -8645,7 +9117,6 @@ async def test_method_update_with_all_params_overload_19(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8656,6 +9127,7 @@ async def test_raw_response_update_overload_19(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -8671,6 +9143,7 @@ async def test_streaming_response_update_overload_19(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) as response: assert not response.is_closed @@ -8689,6 +9162,7 @@ async def test_path_params_update_overload_19(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SVCB", ) @@ -8697,6 +9171,7 @@ async def test_path_params_update_overload_19(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -8707,6 +9182,7 @@ async def test_method_update_overload_20(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8718,6 +9194,7 @@ async def test_method_update_with_all_params_overload_20(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", comment="Domain verification record", data={ @@ -8732,7 +9209,6 @@ async def test_method_update_with_all_params_overload_20(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8743,6 +9219,7 @@ async def test_raw_response_update_overload_20(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -8758,6 +9235,7 @@ async def test_streaming_response_update_overload_20(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) as response: assert not response.is_closed @@ -8776,6 +9254,7 @@ async def test_path_params_update_overload_20(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="TLSA", ) @@ -8784,6 +9263,7 @@ async def test_path_params_update_overload_20(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -8794,6 +9274,7 @@ async def test_method_update_overload_21(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8805,6 +9286,7 @@ async def test_method_update_with_all_params_overload_21(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", comment="Domain verification record", data={ @@ -8818,7 +9300,6 @@ async def test_method_update_with_all_params_overload_21(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8829,6 +9310,7 @@ async def test_raw_response_update_overload_21(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) @@ -8844,6 +9326,7 @@ async def test_streaming_response_update_overload_21(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) as response: assert not response.is_closed @@ -8862,6 +9345,7 @@ async def test_path_params_update_overload_21(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="URI", ) @@ -8870,6 +9354,7 @@ async def test_path_params_update_overload_21(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) @@ -9025,6 +9510,7 @@ async def test_method_batch_with_all_params(self, async_client: AsyncCloudflare) patches=[ { "name": "example.com", + "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", @@ -9034,13 +9520,13 @@ async def test_method_batch_with_all_params(self, async_client: AsyncCloudflare) "ipv6_only": True, }, "tags": ["owner:dns-team"], - "ttl": 3600, "id": "023e105f4ecef8ad9ca31a8372d0c353", } ], posts=[ { "name": "example.com", + "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", @@ -9050,12 +9536,12 @@ async def test_method_batch_with_all_params(self, async_client: AsyncCloudflare) "ipv6_only": True, }, "tags": ["owner:dns-team"], - "ttl": 3600, } ], puts=[ { "name": "example.com", + "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", @@ -9065,7 +9551,6 @@ async def test_method_batch_with_all_params(self, async_client: AsyncCloudflare) "ipv6_only": True, }, "tags": ["owner:dns-team"], - "ttl": 3600, "id": "023e105f4ecef8ad9ca31a8372d0c353", } ], @@ -9113,6 +9598,7 @@ async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9124,6 +9610,7 @@ async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncC dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", comment="Domain verification record", content="198.51.100.4", @@ -9133,7 +9620,6 @@ async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncC "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9144,6 +9630,7 @@ async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -9159,6 +9646,7 @@ async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloud dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) as response: assert not response.is_closed @@ -9177,6 +9665,7 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="A", ) @@ -9185,6 +9674,7 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -9195,6 +9685,7 @@ async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9206,6 +9697,7 @@ async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncC dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", comment="Domain verification record", content="2400:cb00:2049::1", @@ -9215,7 +9707,6 @@ async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncC "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9226,6 +9717,7 @@ async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -9241,6 +9733,7 @@ async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloud dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) as response: assert not response.is_closed @@ -9259,6 +9752,7 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="AAAA", ) @@ -9267,6 +9761,7 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -9277,6 +9772,7 @@ async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9288,6 +9784,7 @@ async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncC dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", comment="Domain verification record", content="content", @@ -9298,7 +9795,6 @@ async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncC "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9309,6 +9805,7 @@ async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -9324,6 +9821,7 @@ async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloud dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) as response: assert not response.is_closed @@ -9342,6 +9840,7 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CNAME", ) @@ -9350,6 +9849,7 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -9360,6 +9860,7 @@ async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9371,6 +9872,7 @@ async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncC dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", comment="Domain verification record", content="mx.example.com", @@ -9381,7 +9883,6 @@ async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncC "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9392,6 +9893,7 @@ async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -9407,6 +9909,7 @@ async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloud dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) as response: assert not response.is_closed @@ -9425,6 +9928,7 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="MX", ) @@ -9433,6 +9937,7 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -9443,6 +9948,7 @@ async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9454,6 +9960,7 @@ async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncC dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", comment="Domain verification record", content="ns1.example.com", @@ -9463,7 +9970,6 @@ async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncC "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9474,6 +9980,7 @@ async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -9489,6 +9996,7 @@ async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloud dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) as response: assert not response.is_closed @@ -9507,6 +10015,7 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="NS", ) @@ -9515,6 +10024,7 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -9525,6 +10035,7 @@ async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9536,6 +10047,7 @@ async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncC dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", comment="Domain verification record", content="content", @@ -9545,7 +10057,6 @@ async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncC "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9556,6 +10067,7 @@ async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -9571,6 +10083,7 @@ async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloud dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) as response: assert not response.is_closed @@ -9589,6 +10102,7 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -9597,6 +10111,7 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -9607,6 +10122,7 @@ async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9618,6 +10134,7 @@ async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncC dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", comment="Domain verification record", content="example.com", @@ -9627,7 +10144,6 @@ async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncC "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9638,6 +10154,7 @@ async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -9653,6 +10170,7 @@ async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloud dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) as response: assert not response.is_closed @@ -9671,6 +10189,7 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="PTR", ) @@ -9679,6 +10198,7 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -9689,6 +10209,7 @@ async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9700,6 +10221,7 @@ async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncC dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", comment="Domain verification record", content='"v=spf1 include:example.com -all"', @@ -9709,7 +10231,6 @@ async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncC "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9720,6 +10241,7 @@ async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -9735,6 +10257,7 @@ async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloud dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) as response: assert not response.is_closed @@ -9753,6 +10276,7 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="TXT", ) @@ -9761,6 +10285,7 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -9771,6 +10296,7 @@ async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9782,6 +10308,7 @@ async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncC dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", comment="Domain verification record", data={ @@ -9795,7 +10322,6 @@ async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncC "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9806,6 +10332,7 @@ async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -9821,6 +10348,7 @@ async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloud dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) as response: assert not response.is_closed @@ -9839,6 +10367,7 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CAA", ) @@ -9847,6 +10376,7 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -9857,6 +10387,7 @@ async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9868,6 +10399,7 @@ async def test_method_edit_with_all_params_overload_10(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", comment="Domain verification record", data={ @@ -9882,7 +10414,6 @@ async def test_method_edit_with_all_params_overload_10(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9893,6 +10424,7 @@ async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -9908,6 +10440,7 @@ async def test_streaming_response_edit_overload_10(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) as response: assert not response.is_closed @@ -9926,6 +10459,7 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CERT", ) @@ -9934,6 +10468,7 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -9944,6 +10479,7 @@ async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9955,6 +10491,7 @@ async def test_method_edit_with_all_params_overload_11(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", comment="Domain verification record", data={ @@ -9969,7 +10506,6 @@ async def test_method_edit_with_all_params_overload_11(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9980,6 +10516,7 @@ async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -9995,6 +10532,7 @@ async def test_streaming_response_edit_overload_11(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) as response: assert not response.is_closed @@ -10013,6 +10551,7 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -10021,6 +10560,7 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -10031,6 +10571,7 @@ async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10042,6 +10583,7 @@ async def test_method_edit_with_all_params_overload_12(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", comment="Domain verification record", data={ @@ -10056,7 +10598,6 @@ async def test_method_edit_with_all_params_overload_12(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10067,6 +10608,7 @@ async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -10082,6 +10624,7 @@ async def test_streaming_response_edit_overload_12(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) as response: assert not response.is_closed @@ -10100,6 +10643,7 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="DS", ) @@ -10108,6 +10652,7 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -10118,6 +10663,7 @@ async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10129,6 +10675,7 @@ async def test_method_edit_with_all_params_overload_13(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", comment="Domain verification record", data={ @@ -10142,7 +10689,6 @@ async def test_method_edit_with_all_params_overload_13(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10153,6 +10699,7 @@ async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -10168,6 +10715,7 @@ async def test_streaming_response_edit_overload_13(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) as response: assert not response.is_closed @@ -10186,6 +10734,7 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="HTTPS", ) @@ -10194,6 +10743,7 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -10204,6 +10754,7 @@ async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10215,6 +10766,7 @@ async def test_method_edit_with_all_params_overload_14(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", comment="Domain verification record", data={ @@ -10237,7 +10789,6 @@ async def test_method_edit_with_all_params_overload_14(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10248,6 +10799,7 @@ async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -10263,6 +10815,7 @@ async def test_streaming_response_edit_overload_14(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) as response: assert not response.is_closed @@ -10281,6 +10834,7 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="LOC", ) @@ -10289,6 +10843,7 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -10299,6 +10854,7 @@ async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10310,6 +10866,7 @@ async def test_method_edit_with_all_params_overload_15(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", comment="Domain verification record", data={ @@ -10326,7 +10883,6 @@ async def test_method_edit_with_all_params_overload_15(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10337,6 +10893,7 @@ async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -10352,6 +10909,7 @@ async def test_streaming_response_edit_overload_15(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) as response: assert not response.is_closed @@ -10370,6 +10928,7 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="NAPTR", ) @@ -10378,6 +10937,7 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -10388,6 +10948,7 @@ async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10399,6 +10960,7 @@ async def test_method_edit_with_all_params_overload_16(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", comment="Domain verification record", data={ @@ -10413,7 +10975,6 @@ async def test_method_edit_with_all_params_overload_16(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10424,6 +10985,7 @@ async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -10439,6 +11001,7 @@ async def test_streaming_response_edit_overload_16(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) as response: assert not response.is_closed @@ -10457,6 +11020,7 @@ async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -10465,6 +11029,7 @@ async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -10475,6 +11040,7 @@ async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10486,6 +11052,7 @@ async def test_method_edit_with_all_params_overload_17(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", comment="Domain verification record", data={ @@ -10500,7 +11067,6 @@ async def test_method_edit_with_all_params_overload_17(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10511,6 +11077,7 @@ async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -10526,6 +11093,7 @@ async def test_streaming_response_edit_overload_17(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) as response: assert not response.is_closed @@ -10544,6 +11112,7 @@ async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SRV", ) @@ -10552,6 +11121,7 @@ async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -10562,6 +11132,7 @@ async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10573,6 +11144,7 @@ async def test_method_edit_with_all_params_overload_18(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", comment="Domain verification record", data={ @@ -10586,7 +11158,6 @@ async def test_method_edit_with_all_params_overload_18(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10597,6 +11168,7 @@ async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -10612,6 +11184,7 @@ async def test_streaming_response_edit_overload_18(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) as response: assert not response.is_closed @@ -10630,6 +11203,7 @@ async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SSHFP", ) @@ -10638,6 +11212,7 @@ async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -10648,6 +11223,7 @@ async def test_method_edit_overload_19(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10659,6 +11235,7 @@ async def test_method_edit_with_all_params_overload_19(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", comment="Domain verification record", data={ @@ -10672,7 +11249,6 @@ async def test_method_edit_with_all_params_overload_19(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10683,6 +11259,7 @@ async def test_raw_response_edit_overload_19(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -10698,6 +11275,7 @@ async def test_streaming_response_edit_overload_19(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) as response: assert not response.is_closed @@ -10716,6 +11294,7 @@ async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SVCB", ) @@ -10724,6 +11303,7 @@ async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -10734,6 +11314,7 @@ async def test_method_edit_overload_20(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10745,6 +11326,7 @@ async def test_method_edit_with_all_params_overload_20(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", comment="Domain verification record", data={ @@ -10759,7 +11341,6 @@ async def test_method_edit_with_all_params_overload_20(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10770,6 +11351,7 @@ async def test_raw_response_edit_overload_20(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -10785,6 +11367,7 @@ async def test_streaming_response_edit_overload_20(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) as response: assert not response.is_closed @@ -10803,6 +11386,7 @@ async def test_path_params_edit_overload_20(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="TLSA", ) @@ -10811,6 +11395,7 @@ async def test_path_params_edit_overload_20(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -10821,6 +11406,7 @@ async def test_method_edit_overload_21(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10832,6 +11418,7 @@ async def test_method_edit_with_all_params_overload_21(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", comment="Domain verification record", data={ @@ -10845,7 +11432,6 @@ async def test_method_edit_with_all_params_overload_21(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10856,6 +11442,7 @@ async def test_raw_response_edit_overload_21(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) @@ -10871,6 +11458,7 @@ async def test_streaming_response_edit_overload_21(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) as response: assert not response.is_closed @@ -10889,6 +11477,7 @@ async def test_path_params_edit_overload_21(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="URI", ) @@ -10897,6 +11486,7 @@ async def test_path_params_edit_overload_21(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) diff --git a/tests/api_resources/dns/zone_transfers/outgoing/test_status.py b/tests/api_resources/dns/zone_transfers/outgoing/test_status.py index 1c00b9b98c3..ac11f1743d2 100644 --- a/tests/api_resources/dns/zone_transfers/outgoing/test_status.py +++ b/tests/api_resources/dns/zone_transfers/outgoing/test_status.py @@ -56,7 +56,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncStatus: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns/zone_transfers/test_acls.py b/tests/api_resources/dns/zone_transfers/test_acls.py index 1d786773233..17a8ce6984f 100644 --- a/tests/api_resources/dns/zone_transfers/test_acls.py +++ b/tests/api_resources/dns/zone_transfers/test_acls.py @@ -262,7 +262,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncACLs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/dns/zone_transfers/test_force_axfr.py b/tests/api_resources/dns/zone_transfers/test_force_axfr.py index 3451f908b0c..1041d8749e6 100644 --- a/tests/api_resources/dns/zone_transfers/test_force_axfr.py +++ b/tests/api_resources/dns/zone_transfers/test_force_axfr.py @@ -60,7 +60,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncForceAXFR: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns/zone_transfers/test_incoming.py b/tests/api_resources/dns/zone_transfers/test_incoming.py index ad925e0d893..c9f7894ced1 100644 --- a/tests/api_resources/dns/zone_transfers/test_incoming.py +++ b/tests/api_resources/dns/zone_transfers/test_incoming.py @@ -200,7 +200,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIncoming: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns/zone_transfers/test_outgoing.py b/tests/api_resources/dns/zone_transfers/test_outgoing.py index 5ae0b28a13d..15137462121 100644 --- a/tests/api_resources/dns/zone_transfers/test_outgoing.py +++ b/tests/api_resources/dns/zone_transfers/test_outgoing.py @@ -318,7 +318,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOutgoing: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns/zone_transfers/test_peers.py b/tests/api_resources/dns/zone_transfers/test_peers.py index f81fec733d6..39e2a5e3254 100644 --- a/tests/api_resources/dns/zone_transfers/test_peers.py +++ b/tests/api_resources/dns/zone_transfers/test_peers.py @@ -266,7 +266,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPeers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/dns/zone_transfers/test_tsigs.py b/tests/api_resources/dns/zone_transfers/test_tsigs.py index d3e541d2518..93277f99e97 100644 --- a/tests/api_resources/dns/zone_transfers/test_tsigs.py +++ b/tests/api_resources/dns/zone_transfers/test_tsigs.py @@ -267,7 +267,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTSIGs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns_firewall/analytics/reports/test_bytimes.py b/tests/api_resources/dns_firewall/analytics/reports/test_bytimes.py index c40bb24466f..c80b22034cd 100644 --- a/tests/api_resources/dns_firewall/analytics/reports/test_bytimes.py +++ b/tests/api_resources/dns_firewall/analytics/reports/test_bytimes.py @@ -84,7 +84,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBytimes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns_firewall/analytics/test_reports.py b/tests/api_resources/dns_firewall/analytics/test_reports.py index cc06eb81017..38fe3e6fec2 100644 --- a/tests/api_resources/dns_firewall/analytics/test_reports.py +++ b/tests/api_resources/dns_firewall/analytics/test_reports.py @@ -83,7 +83,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncReports: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns_firewall/test_reverse_dns.py b/tests/api_resources/dns_firewall/test_reverse_dns.py index 8ddeaf9f7b0..ba9cca0909a 100644 --- a/tests/api_resources/dns_firewall/test_reverse_dns.py +++ b/tests/api_resources/dns_firewall/test_reverse_dns.py @@ -124,7 +124,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncReverseDNS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/durable_objects/namespaces/test_objects.py b/tests/api_resources/durable_objects/namespaces/test_objects.py index 9e703603fcc..b073fb6fdbc 100644 --- a/tests/api_resources/durable_objects/namespaces/test_objects.py +++ b/tests/api_resources/durable_objects/namespaces/test_objects.py @@ -78,7 +78,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncObjects: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/durable_objects/test_namespaces.py b/tests/api_resources/durable_objects/test_namespaces.py index db836e379cd..630473d6b31 100644 --- a/tests/api_resources/durable_objects/test_namespaces.py +++ b/tests/api_resources/durable_objects/test_namespaces.py @@ -58,7 +58,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncNamespaces: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_routing/rules/test_catch_alls.py b/tests/api_resources/email_routing/rules/test_catch_alls.py index 04d1d15c98f..3f6d0df00de 100644 --- a/tests/api_resources/email_routing/rules/test_catch_alls.py +++ b/tests/api_resources/email_routing/rules/test_catch_alls.py @@ -119,7 +119,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCatchAlls: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_routing/test_addresses.py b/tests/api_resources/email_routing/test_addresses.py index 1530cf79f90..2299afe4b1c 100644 --- a/tests/api_resources/email_routing/test_addresses.py +++ b/tests/api_resources/email_routing/test_addresses.py @@ -211,7 +211,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAddresses: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_routing/test_dns.py b/tests/api_resources/email_routing/test_dns.py index e5c819d83c6..3bfbc5c7270 100644 --- a/tests/api_resources/email_routing/test_dns.py +++ b/tests/api_resources/email_routing/test_dns.py @@ -196,7 +196,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDNS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_routing/test_rules.py b/tests/api_resources/email_routing/test_rules.py index 19652d53d62..33b96b74828 100644 --- a/tests/api_resources/email_routing/test_rules.py +++ b/tests/api_resources/email_routing/test_rules.py @@ -315,7 +315,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/investigate/test_detections.py b/tests/api_resources/email_security/investigate/test_detections.py index 0efb7939121..b9a5059538d 100644 --- a/tests/api_resources/email_security/investigate/test_detections.py +++ b/tests/api_resources/email_security/investigate/test_detections.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDetections: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/investigate/test_move.py b/tests/api_resources/email_security/investigate/test_move.py index 27096f30850..6a00103c4fa 100644 --- a/tests/api_resources/email_security/investigate/test_move.py +++ b/tests/api_resources/email_security/investigate/test_move.py @@ -122,7 +122,9 @@ def test_path_params_bulk(self, client: Cloudflare) -> None: class TestAsyncMove: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/investigate/test_preview.py b/tests/api_resources/email_security/investigate/test_preview.py index 90c38b7e703..18e710732bb 100644 --- a/tests/api_resources/email_security/investigate/test_preview.py +++ b/tests/api_resources/email_security/investigate/test_preview.py @@ -109,7 +109,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPreview: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/investigate/test_raw.py b/tests/api_resources/email_security/investigate/test_raw.py index d7e214dc7fd..204fbb63f6b 100644 --- a/tests/api_resources/email_security/investigate/test_raw.py +++ b/tests/api_resources/email_security/investigate/test_raw.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRaw: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/investigate/test_reclassify.py b/tests/api_resources/email_security/investigate/test_reclassify.py index 8fce2184e02..c7f2fa32108 100644 --- a/tests/api_resources/email_security/investigate/test_reclassify.py +++ b/tests/api_resources/email_security/investigate/test_reclassify.py @@ -81,7 +81,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncReclassify: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/investigate/test_release.py b/tests/api_resources/email_security/investigate/test_release.py index 2b437e713c9..44430b8c827 100644 --- a/tests/api_resources/email_security/investigate/test_release.py +++ b/tests/api_resources/email_security/investigate/test_release.py @@ -62,7 +62,9 @@ def test_path_params_bulk(self, client: Cloudflare) -> None: class TestAsyncRelease: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_bulk(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/investigate/test_trace.py b/tests/api_resources/email_security/investigate/test_trace.py index c01f3515dc4..f3ad42bcaea 100644 --- a/tests/api_resources/email_security/investigate/test_trace.py +++ b/tests/api_resources/email_security/investigate/test_trace.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTrace: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/settings/test_allow_policies.py b/tests/api_resources/email_security/settings/test_allow_policies.py index dd2afd7b539..3a15809cae5 100644 --- a/tests/api_resources/email_security/settings/test_allow_policies.py +++ b/tests/api_resources/email_security/settings/test_allow_policies.py @@ -310,7 +310,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAllowPolicies: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/settings/test_block_senders.py b/tests/api_resources/email_security/settings/test_block_senders.py index e6bb0a56223..b511da8331a 100644 --- a/tests/api_resources/email_security/settings/test_block_senders.py +++ b/tests/api_resources/email_security/settings/test_block_senders.py @@ -276,7 +276,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBlockSenders: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/settings/test_domains.py b/tests/api_resources/email_security/settings/test_domains.py index ef51bd8c036..7a475619f7b 100644 --- a/tests/api_resources/email_security/settings/test_domains.py +++ b/tests/api_resources/email_security/settings/test_domains.py @@ -265,7 +265,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomains: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/settings/test_impersonation_registry.py b/tests/api_resources/email_security/settings/test_impersonation_registry.py index 166def7dd1e..0d484d1724d 100644 --- a/tests/api_resources/email_security/settings/test_impersonation_registry.py +++ b/tests/api_resources/email_security/settings/test_impersonation_registry.py @@ -272,7 +272,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncImpersonationRegistry: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/settings/test_trusted_domains.py b/tests/api_resources/email_security/settings/test_trusted_domains.py index 33d602bb1a4..3829968416e 100644 --- a/tests/api_resources/email_security/settings/test_trusted_domains.py +++ b/tests/api_resources/email_security/settings/test_trusted_domains.py @@ -362,7 +362,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTrustedDomains: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate HTTP 422 errors on test suite") @parametrize diff --git a/tests/api_resources/email_security/test_investigate.py b/tests/api_resources/email_security/test_investigate.py index f0a6ec41d9b..59882722fad 100644 --- a/tests/api_resources/email_security/test_investigate.py +++ b/tests/api_resources/email_security/test_investigate.py @@ -129,7 +129,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncInvestigate: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/test_submissions.py b/tests/api_resources/email_security/test_submissions.py index c626455eab3..36209780b72 100644 --- a/tests/api_resources/email_security/test_submissions.py +++ b/tests/api_resources/email_security/test_submissions.py @@ -76,7 +76,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncSubmissions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/firewall/test_access_rules.py b/tests/api_resources/firewall/test_access_rules.py index 2be8b9f05f8..a44b3cddb69 100644 --- a/tests/api_resources/firewall/test_access_rules.py +++ b/tests/api_resources/firewall/test_access_rules.py @@ -382,7 +382,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAccessRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/firewall/test_lockdowns.py b/tests/api_resources/firewall/test_lockdowns.py index a304575e3a2..eb9320ca771 100644 --- a/tests/api_resources/firewall/test_lockdowns.py +++ b/tests/api_resources/firewall/test_lockdowns.py @@ -306,7 +306,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLockdowns: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/firewall/test_rules.py b/tests/api_resources/firewall/test_rules.py index cba8ae1268b..311ee64e156 100644 --- a/tests/api_resources/firewall/test_rules.py +++ b/tests/api_resources/firewall/test_rules.py @@ -565,7 +565,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/firewall/test_ua_rules.py b/tests/api_resources/firewall/test_ua_rules.py index 7a968549f5d..269d7e2662b 100644 --- a/tests/api_resources/firewall/test_ua_rules.py +++ b/tests/api_resources/firewall/test_ua_rules.py @@ -44,6 +44,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "value": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)", }, mode="challenge", + description="Prevent multiple login failures to mitigate brute force attacks", + paused=False, ) assert_matches_type(UARuleCreateResponse, ua_rule, path=["response"]) @@ -109,6 +111,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "value": "198.51.100.4", }, mode="challenge", + description="Prevent multiple login failures to mitigate brute force attacks", + paused=False, ) assert_matches_type(UARuleUpdateResponse, ua_rule, path=["response"]) @@ -175,10 +179,10 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", description="abusive", - description_search="abusive", page=1, + paused=False, per_page=1, - ua_search="Safari", + user_agent="Safari", ) assert_matches_type(SyncV4PagePaginationArray[UARuleListResponse], ua_rule, path=["response"]) @@ -311,7 +315,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncUARules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize @@ -333,6 +339,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "value": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)", }, mode="challenge", + description="Prevent multiple login failures to mitigate brute force attacks", + paused=False, ) assert_matches_type(UARuleCreateResponse, ua_rule, path=["response"]) @@ -398,6 +406,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "value": "198.51.100.4", }, mode="challenge", + description="Prevent multiple login failures to mitigate brute force attacks", + paused=False, ) assert_matches_type(UARuleUpdateResponse, ua_rule, path=["response"]) @@ -464,10 +474,10 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ua_rule = await async_client.firewall.ua_rules.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", description="abusive", - description_search="abusive", page=1, + paused=False, per_page=1, - ua_search="Safari", + user_agent="Safari", ) assert_matches_type(AsyncV4PagePaginationArray[UARuleListResponse], ua_rule, path=["response"]) diff --git a/tests/api_resources/firewall/waf/packages/test_groups.py b/tests/api_resources/firewall/waf/packages/test_groups.py index 9e79fed3de5..3bdf259db3a 100644 --- a/tests/api_resources/firewall/waf/packages/test_groups.py +++ b/tests/api_resources/firewall/waf/packages/test_groups.py @@ -239,7 +239,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/firewall/waf/packages/test_rules.py b/tests/api_resources/firewall/waf/packages/test_rules.py index 097f991f703..97927be6a8d 100644 --- a/tests/api_resources/firewall/waf/packages/test_rules.py +++ b/tests/api_resources/firewall/waf/packages/test_rules.py @@ -240,7 +240,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/firewall/waf/test_overrides.py b/tests/api_resources/firewall/waf/test_overrides.py index 20c829e4c6f..81f3f471190 100644 --- a/tests/api_resources/firewall/waf/test_overrides.py +++ b/tests/api_resources/firewall/waf/test_overrides.py @@ -334,7 +334,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOverrides: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/firewall/waf/test_packages.py b/tests/api_resources/firewall/waf/test_packages.py index 63ba5f49982..c79d6229958 100644 --- a/tests/api_resources/firewall/waf/test_packages.py +++ b/tests/api_resources/firewall/waf/test_packages.py @@ -138,7 +138,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPackages: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/healthchecks/test_previews.py b/tests/api_resources/healthchecks/test_previews.py index 8377cb4f89d..a58c84df9b8 100644 --- a/tests/api_resources/healthchecks/test_previews.py +++ b/tests/api_resources/healthchecks/test_previews.py @@ -199,7 +199,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPreviews: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/hostnames/settings/test_tls.py b/tests/api_resources/hostnames/settings/test_tls.py index 434d65687c6..09b8b27b4f8 100644 --- a/tests/api_resources/hostnames/settings/test_tls.py +++ b/tests/api_resources/hostnames/settings/test_tls.py @@ -177,7 +177,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTLS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/hyperdrive/test_configs.py b/tests/api_resources/hyperdrive/test_configs.py index ae88048ece8..cbd44624bd7 100644 --- a/tests/api_resources/hyperdrive/test_configs.py +++ b/tests/api_resources/hyperdrive/test_configs.py @@ -55,6 +55,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "mtls_certificate_id": "00000000-0000-0000-0000-0000000000", "sslmode": "verify-full", }, + origin_connection_limit=60, ) assert_matches_type(Hyperdrive, config, path=["response"]) @@ -158,6 +159,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "mtls_certificate_id": "00000000-0000-0000-0000-0000000000", "sslmode": "verify-full", }, + origin_connection_limit=60, ) assert_matches_type(Hyperdrive, config, path=["response"]) @@ -353,6 +355,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "scheme": "postgres", "user": "postgres", }, + origin_connection_limit=60, ) assert_matches_type(Hyperdrive, config, path=["response"]) @@ -449,7 +452,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfigs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize @@ -488,6 +493,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "mtls_certificate_id": "00000000-0000-0000-0000-0000000000", "sslmode": "verify-full", }, + origin_connection_limit=60, ) assert_matches_type(Hyperdrive, config, path=["response"]) @@ -591,6 +597,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "mtls_certificate_id": "00000000-0000-0000-0000-0000000000", "sslmode": "verify-full", }, + origin_connection_limit=60, ) assert_matches_type(Hyperdrive, config, path=["response"]) @@ -786,6 +793,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "scheme": "postgres", "user": "postgres", }, + origin_connection_limit=60, ) assert_matches_type(Hyperdrive, config, path=["response"]) diff --git a/tests/api_resources/iam/test_permission_groups.py b/tests/api_resources/iam/test_permission_groups.py index 8d4a01aba8b..415565c7243 100644 --- a/tests/api_resources/iam/test_permission_groups.py +++ b/tests/api_resources/iam/test_permission_groups.py @@ -120,7 +120,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPermissionGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/iam/test_resource_groups.py b/tests/api_resources/iam/test_resource_groups.py index b334eec946e..1cd159e9a69 100644 --- a/tests/api_resources/iam/test_resource_groups.py +++ b/tests/api_resources/iam/test_resource_groups.py @@ -290,7 +290,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncResourceGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/iam/test_user_groups.py b/tests/api_resources/iam/test_user_groups.py index 869b1b5a1ae..f3fd0402f8a 100644 --- a/tests/api_resources/iam/test_user_groups.py +++ b/tests/api_resources/iam/test_user_groups.py @@ -323,7 +323,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncUserGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/iam/user_groups/test_members.py b/tests/api_resources/iam/user_groups/test_members.py index b5b8cf68485..603db00d3d0 100644 --- a/tests/api_resources/iam/user_groups/test_members.py +++ b/tests/api_resources/iam/user_groups/test_members.py @@ -249,7 +249,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncMembers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/images/test_v1.py b/tests/api_resources/images/test_v1.py index ba5252f9de0..ef5f5fb4905 100644 --- a/tests/api_resources/images/test_v1.py +++ b/tests/api_resources/images/test_v1.py @@ -37,7 +37,8 @@ def test_method_create(self, client: Cloudflare) -> None: def test_method_create_with_all_params(self, client: Cloudflare) -> None: v1 = client.images.v1.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", - file={}, + id="id", + file=b"raw file contents", metadata={}, require_signed_urls=True, url="https://example.com/path/to/logo.png", @@ -288,7 +289,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncV1: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize @@ -303,7 +306,8 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: v1 = await async_client.images.v1.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", - file={}, + id="id", + file=b"raw file contents", metadata={}, require_signed_urls=True, url="https://example.com/path/to/logo.png", diff --git a/tests/api_resources/images/test_v2.py b/tests/api_resources/images/test_v2.py index d668ca234a8..fb62181f81d 100644 --- a/tests/api_resources/images/test_v2.py +++ b/tests/api_resources/images/test_v2.py @@ -67,7 +67,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncV2: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/images/v1/test_blobs.py b/tests/api_resources/images/v1/test_blobs.py index 2d3a89dbc0b..316785c842d 100644 --- a/tests/api_resources/images/v1/test_blobs.py +++ b/tests/api_resources/images/v1/test_blobs.py @@ -91,7 +91,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBlobs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize @pytest.mark.respx(base_url=base_url) diff --git a/tests/api_resources/images/v1/test_keys.py b/tests/api_resources/images/v1/test_keys.py index ef6122e1816..edad6ebcb43 100644 --- a/tests/api_resources/images/v1/test_keys.py +++ b/tests/api_resources/images/v1/test_keys.py @@ -153,7 +153,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncKeys: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/images/v1/test_stats.py b/tests/api_resources/images/v1/test_stats.py index ba44e332bc2..0c355f2fd23 100644 --- a/tests/api_resources/images/v1/test_stats.py +++ b/tests/api_resources/images/v1/test_stats.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncStats: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/images/v1/test_variants.py b/tests/api_resources/images/v1/test_variants.py index 0b88368b362..05d13a9d6c7 100644 --- a/tests/api_resources/images/v1/test_variants.py +++ b/tests/api_resources/images/v1/test_variants.py @@ -333,7 +333,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVariants: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/images/v2/test_direct_uploads.py b/tests/api_resources/images/v2/test_direct_uploads.py index 88a6299905f..fb031cd38e4 100644 --- a/tests/api_resources/images/v2/test_direct_uploads.py +++ b/tests/api_resources/images/v2/test_direct_uploads.py @@ -74,7 +74,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncDirectUploads: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/intel/asn/test_subnets.py b/tests/api_resources/intel/asn/test_subnets.py index 116eb6f482b..f6b27a86ca8 100644 --- a/tests/api_resources/intel/asn/test_subnets.py +++ b/tests/api_resources/intel/asn/test_subnets.py @@ -61,7 +61,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSubnets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/attack_surface_report/test_issue_types.py b/tests/api_resources/intel/attack_surface_report/test_issue_types.py index b51bdf0886d..01b9bf416fb 100644 --- a/tests/api_resources/intel/attack_surface_report/test_issue_types.py +++ b/tests/api_resources/intel/attack_surface_report/test_issue_types.py @@ -58,7 +58,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIssueTypes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/attack_surface_report/test_issues.py b/tests/api_resources/intel/attack_surface_report/test_issues.py index 23f555d5eab..985ca4c1d6c 100644 --- a/tests/api_resources/intel/attack_surface_report/test_issues.py +++ b/tests/api_resources/intel/attack_surface_report/test_issues.py @@ -346,7 +346,9 @@ def test_path_params_type(self, client: Cloudflare) -> None: class TestAsyncIssues: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/domains/test_bulks.py b/tests/api_resources/intel/domains/test_bulks.py index 8255f15b2c4..8a1c0480f60 100644 --- a/tests/api_resources/intel/domains/test_bulks.py +++ b/tests/api_resources/intel/domains/test_bulks.py @@ -65,7 +65,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBulks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/indicator_feeds/test_downloads.py b/tests/api_resources/intel/indicator_feeds/test_downloads.py index 98d6659f931..5c04a02c060 100644 --- a/tests/api_resources/intel/indicator_feeds/test_downloads.py +++ b/tests/api_resources/intel/indicator_feeds/test_downloads.py @@ -61,7 +61,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDownloads: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/indicator_feeds/test_permissions.py b/tests/api_resources/intel/indicator_feeds/test_permissions.py index 3b06e3c0d14..4b5ec188fd9 100644 --- a/tests/api_resources/intel/indicator_feeds/test_permissions.py +++ b/tests/api_resources/intel/indicator_feeds/test_permissions.py @@ -155,7 +155,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncPermissions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/indicator_feeds/test_snapshots.py b/tests/api_resources/intel/indicator_feeds/test_snapshots.py index 5b7f91a523b..ed91b7eb9ea 100644 --- a/tests/api_resources/intel/indicator_feeds/test_snapshots.py +++ b/tests/api_resources/intel/indicator_feeds/test_snapshots.py @@ -75,7 +75,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: class TestAsyncSnapshots: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/intel/test_asn.py b/tests/api_resources/intel/test_asn.py index 1b9016472fe..16911e7242a 100644 --- a/tests/api_resources/intel/test_asn.py +++ b/tests/api_resources/intel/test_asn.py @@ -61,7 +61,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncASN: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/test_dns.py b/tests/api_resources/intel/test_dns.py index dc6785b5f83..a0e513e9464 100644 --- a/tests/api_resources/intel/test_dns.py +++ b/tests/api_resources/intel/test_dns.py @@ -73,7 +73,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncDNS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/test_domain_history.py b/tests/api_resources/intel/test_domain_history.py index 75926dc919d..e958709d7ca 100644 --- a/tests/api_resources/intel/test_domain_history.py +++ b/tests/api_resources/intel/test_domain_history.py @@ -65,7 +65,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomainHistory: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/test_domains.py b/tests/api_resources/intel/test_domains.py index 9a897bf7904..1915f55b790 100644 --- a/tests/api_resources/intel/test_domains.py +++ b/tests/api_resources/intel/test_domains.py @@ -65,7 +65,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomains: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/test_indicator_feeds.py b/tests/api_resources/intel/test_indicator_feeds.py index 6d8258dcf45..c3d7ce21af7 100644 --- a/tests/api_resources/intel/test_indicator_feeds.py +++ b/tests/api_resources/intel/test_indicator_feeds.py @@ -249,7 +249,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIndicatorFeeds: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/test_ip_lists.py b/tests/api_resources/intel/test_ip_lists.py index 01befdba45c..85a09ac9e4f 100644 --- a/tests/api_resources/intel/test_ip_lists.py +++ b/tests/api_resources/intel/test_ip_lists.py @@ -58,7 +58,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIPLists: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/test_ips.py b/tests/api_resources/intel/test_ips.py index 4f39c996906..8ebd90426c0 100644 --- a/tests/api_resources/intel/test_ips.py +++ b/tests/api_resources/intel/test_ips.py @@ -66,7 +66,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIPs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/test_miscategorizations.py b/tests/api_resources/intel/test_miscategorizations.py index 5fa3ec58751..549b9fa76eb 100644 --- a/tests/api_resources/intel/test_miscategorizations.py +++ b/tests/api_resources/intel/test_miscategorizations.py @@ -71,7 +71,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncMiscategorizations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/test_sinkholes.py b/tests/api_resources/intel/test_sinkholes.py index 5e9b3dda069..ff8bbde79c8 100644 --- a/tests/api_resources/intel/test_sinkholes.py +++ b/tests/api_resources/intel/test_sinkholes.py @@ -58,7 +58,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncSinkholes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/test_whois.py b/tests/api_resources/intel/test_whois.py index 97c8efbf7a2..2bd6d6f9801 100644 --- a/tests/api_resources/intel/test_whois.py +++ b/tests/api_resources/intel/test_whois.py @@ -65,7 +65,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWhois: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/kv/namespaces/test_keys.py b/tests/api_resources/kv/namespaces/test_keys.py index 351613f0bfb..578cd37251e 100644 --- a/tests/api_resources/kv/namespaces/test_keys.py +++ b/tests/api_resources/kv/namespaces/test_keys.py @@ -219,7 +219,12 @@ def test_method_bulk_update(self, client: Cloudflare) -> None: key = client.kv.namespaces.keys.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) assert_matches_type(Optional[KeyBulkUpdateResponse], key, path=["response"]) @@ -230,7 +235,12 @@ def test_raw_response_bulk_update(self, client: Cloudflare) -> None: response = client.kv.namespaces.keys.with_raw_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) assert response.is_closed is True @@ -244,7 +254,12 @@ def test_streaming_response_bulk_update(self, client: Cloudflare) -> None: with client.kv.namespaces.keys.with_streaming_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -261,19 +276,31 @@ def test_path_params_bulk_update(self, client: Cloudflare) -> None: client.kv.namespaces.keys.with_raw_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.keys.with_raw_response.bulk_update( namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) class TestAsyncKeys: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: @@ -469,7 +496,12 @@ async def test_method_bulk_update(self, async_client: AsyncCloudflare) -> None: key = await async_client.kv.namespaces.keys.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) assert_matches_type(Optional[KeyBulkUpdateResponse], key, path=["response"]) @@ -480,7 +512,12 @@ async def test_raw_response_bulk_update(self, async_client: AsyncCloudflare) -> response = await async_client.kv.namespaces.keys.with_raw_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) assert response.is_closed is True @@ -494,7 +531,12 @@ async def test_streaming_response_bulk_update(self, async_client: AsyncCloudflar async with async_client.kv.namespaces.keys.with_streaming_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -511,12 +553,22 @@ async def test_path_params_bulk_update(self, async_client: AsyncCloudflare) -> N await async_client.kv.namespaces.keys.with_raw_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.keys.with_raw_response.bulk_update( namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) diff --git a/tests/api_resources/kv/namespaces/test_metadata.py b/tests/api_resources/kv/namespaces/test_metadata.py index e6e56f6f06a..a53c0f4cee9 100644 --- a/tests/api_resources/kv/namespaces/test_metadata.py +++ b/tests/api_resources/kv/namespaces/test_metadata.py @@ -3,13 +3,12 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.kv.namespaces import MetadataGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +23,7 @@ def test_method_get(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) - assert_matches_type(Optional[MetadataGetResponse], metadata, path=["response"]) + assert_matches_type(object, metadata, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: @@ -37,7 +36,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" metadata = response.parse() - assert_matches_type(Optional[MetadataGetResponse], metadata, path=["response"]) + assert_matches_type(object, metadata, path=["response"]) @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: @@ -50,7 +49,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" metadata = response.parse() - assert_matches_type(Optional[MetadataGetResponse], metadata, path=["response"]) + assert_matches_type(object, metadata, path=["response"]) assert cast(Any, response.is_closed) is True @@ -79,7 +78,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMetadata: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: @@ -88,7 +89,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) - assert_matches_type(Optional[MetadataGetResponse], metadata, path=["response"]) + assert_matches_type(object, metadata, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @@ -101,7 +102,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" metadata = await response.parse() - assert_matches_type(Optional[MetadataGetResponse], metadata, path=["response"]) + assert_matches_type(object, metadata, path=["response"]) @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: @@ -114,7 +115,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" metadata = await response.parse() - assert_matches_type(Optional[MetadataGetResponse], metadata, path=["response"]) + assert_matches_type(object, metadata, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/kv/namespaces/test_values.py b/tests/api_resources/kv/namespaces/test_values.py index fbf0e7a0dd5..0f4bf679af3 100644 --- a/tests/api_resources/kv/namespaces/test_values.py +++ b/tests/api_resources/kv/namespaces/test_values.py @@ -32,7 +32,6 @@ def test_method_update(self, client: Cloudflare) -> None: key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) assert_matches_type(Optional[ValueUpdateResponse], value, path=["response"]) @@ -44,10 +43,10 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", expiration=1578435000, expiration_ttl=300, + metadata={"someMetadataKey": "someMetadataValue"}, ) assert_matches_type(Optional[ValueUpdateResponse], value, path=["response"]) @@ -58,7 +57,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) @@ -74,7 +72,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) as response: assert not response.is_closed @@ -93,7 +90,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) @@ -102,7 +98,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) @@ -111,7 +106,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) @@ -259,7 +253,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncValues: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize @@ -268,7 +264,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) assert_matches_type(Optional[ValueUpdateResponse], value, path=["response"]) @@ -280,10 +275,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", expiration=1578435000, expiration_ttl=300, + metadata={"someMetadataKey": "someMetadataValue"}, ) assert_matches_type(Optional[ValueUpdateResponse], value, path=["response"]) @@ -294,7 +289,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) @@ -310,7 +304,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) as response: assert not response.is_closed @@ -329,7 +322,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) @@ -338,7 +330,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) @@ -347,7 +338,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) diff --git a/tests/api_resources/kv/test_namespaces.py b/tests/api_resources/kv/test_namespaces.py index df5a97c8a2d..42dd154ab91 100644 --- a/tests/api_resources/kv/test_namespaces.py +++ b/tests/api_resources/kv/test_namespaces.py @@ -338,7 +338,12 @@ def test_method_bulk_update(self, client: Cloudflare) -> None: namespace = client.kv.namespaces.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) assert_matches_type(Optional[NamespaceBulkUpdateResponse], namespace, path=["response"]) @@ -347,7 +352,12 @@ def test_raw_response_bulk_update(self, client: Cloudflare) -> None: response = client.kv.namespaces.with_raw_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) assert response.is_closed is True @@ -360,7 +370,12 @@ def test_streaming_response_bulk_update(self, client: Cloudflare) -> None: with client.kv.namespaces.with_streaming_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -376,14 +391,24 @@ def test_path_params_bulk_update(self, client: Cloudflare) -> None: client.kv.namespaces.with_raw_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.with_raw_response.bulk_update( namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) @parametrize @@ -436,7 +461,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncNamespaces: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: @@ -752,7 +779,12 @@ async def test_method_bulk_update(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.kv.namespaces.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) assert_matches_type(Optional[NamespaceBulkUpdateResponse], namespace, path=["response"]) @@ -761,7 +793,12 @@ async def test_raw_response_bulk_update(self, async_client: AsyncCloudflare) -> response = await async_client.kv.namespaces.with_raw_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) assert response.is_closed is True @@ -774,7 +811,12 @@ async def test_streaming_response_bulk_update(self, async_client: AsyncCloudflar async with async_client.kv.namespaces.with_streaming_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -790,14 +832,24 @@ async def test_path_params_bulk_update(self, async_client: AsyncCloudflare) -> N await async_client.kv.namespaces.with_raw_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.with_raw_response.bulk_update( namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) @parametrize diff --git a/tests/api_resources/leaked_credential_checks/test_detections.py b/tests/api_resources/leaked_credential_checks/test_detections.py index c74c2b245cc..63fccbbb2c4 100644 --- a/tests/api_resources/leaked_credential_checks/test_detections.py +++ b/tests/api_resources/leaked_credential_checks/test_detections.py @@ -215,7 +215,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncDetections: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/load_balancers/monitors/test_previews.py b/tests/api_resources/load_balancers/monitors/test_previews.py index 18c3eaee3ee..25aba3a816a 100644 --- a/tests/api_resources/load_balancers/monitors/test_previews.py +++ b/tests/api_resources/load_balancers/monitors/test_previews.py @@ -94,7 +94,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncPreviews: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/load_balancers/monitors/test_references.py b/tests/api_resources/load_balancers/monitors/test_references.py index ba9680e3bc1..11f3553bf4b 100644 --- a/tests/api_resources/load_balancers/monitors/test_references.py +++ b/tests/api_resources/load_balancers/monitors/test_references.py @@ -68,7 +68,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncReferences: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/load_balancers/pools/test_health.py b/tests/api_resources/load_balancers/pools/test_health.py index 19c16cd8d44..132196347d6 100644 --- a/tests/api_resources/load_balancers/pools/test_health.py +++ b/tests/api_resources/load_balancers/pools/test_health.py @@ -142,7 +142,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHealth: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/load_balancers/pools/test_references.py b/tests/api_resources/load_balancers/pools/test_references.py index 117c8a62c26..33509c209d5 100644 --- a/tests/api_resources/load_balancers/pools/test_references.py +++ b/tests/api_resources/load_balancers/pools/test_references.py @@ -68,7 +68,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncReferences: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/load_balancers/test_monitors.py b/tests/api_resources/load_balancers/test_monitors.py index a52ea29fbff..8f6468e4245 100644 --- a/tests/api_resources/load_balancers/test_monitors.py +++ b/tests/api_resources/load_balancers/test_monitors.py @@ -371,7 +371,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMonitors: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/load_balancers/test_pools.py b/tests/api_resources/load_balancers/test_pools.py index 0b014d136c1..8b31995802d 100644 --- a/tests/api_resources/load_balancers/test_pools.py +++ b/tests/api_resources/load_balancers/test_pools.py @@ -496,7 +496,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPools: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/load_balancers/test_previews.py b/tests/api_resources/load_balancers/test_previews.py index 281f21e0600..12b9ed13602 100644 --- a/tests/api_resources/load_balancers/test_previews.py +++ b/tests/api_resources/load_balancers/test_previews.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPreviews: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/load_balancers/test_regions.py b/tests/api_resources/load_balancers/test_regions.py index 6e689dc253b..eb825e082cd 100644 --- a/tests/api_resources/load_balancers/test_regions.py +++ b/tests/api_resources/load_balancers/test_regions.py @@ -109,7 +109,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRegions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/load_balancers/test_searches.py b/tests/api_resources/load_balancers/test_searches.py index bcd3e6d6397..7b6ed9ddf7c 100644 --- a/tests/api_resources/load_balancers/test_searches.py +++ b/tests/api_resources/load_balancers/test_searches.py @@ -74,7 +74,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncSearches: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/logpush/datasets/test_fields.py b/tests/api_resources/logpush/datasets/test_fields.py index 728edcd12c2..f9e929d6f7f 100644 --- a/tests/api_resources/logpush/datasets/test_fields.py +++ b/tests/api_resources/logpush/datasets/test_fields.py @@ -79,7 +79,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFields: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/logpush/datasets/test_jobs.py b/tests/api_resources/logpush/datasets/test_jobs.py index 8392e96d1b8..54f7c233e8f 100644 --- a/tests/api_resources/logpush/datasets/test_jobs.py +++ b/tests/api_resources/logpush/datasets/test_jobs.py @@ -81,7 +81,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncJobs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/logpush/test_edge.py b/tests/api_resources/logpush/test_edge.py index c110064ecf9..49a554ba2f0 100644 --- a/tests/api_resources/logpush/test_edge.py +++ b/tests/api_resources/logpush/test_edge.py @@ -106,7 +106,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEdge: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/logpush/test_jobs.py b/tests/api_resources/logpush/test_jobs.py index a5c39a87498..862caad9f98 100644 --- a/tests/api_resources/logpush/test_jobs.py +++ b/tests/api_resources/logpush/test_jobs.py @@ -33,28 +33,28 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="account_id", - dataset="http_requests", + dataset="gateway_dns", enabled=False, filter='{"where":{"and":[{"key":"ClientRequestPath","operator":"contains","value":"/static"},{"key":"ClientRequestHost","operator":"eq","value":"example.com"}]}}', frequency="high", - kind="edge", + kind="", logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", max_upload_bytes=5000000, max_upload_interval_seconds=30, max_upload_records=1000, name="example.com", output_options={ - "batch_prefix": "batch_prefix", - "batch_suffix": "batch_suffix", - "cve_2021_44228": True, - "field_delimiter": "field_delimiter", - "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"], + "batch_prefix": "", + "batch_suffix": "", + "cve_2021_44228": False, + "field_delimiter": ",", + "field_names": ["Datetime", "DstIP", "SrcIP"], "output_type": "ndjson", - "record_delimiter": "record_delimiter", - "record_prefix": "record_prefix", - "record_suffix": "record_suffix", + "record_delimiter": "", + "record_prefix": "{", + "record_suffix": "}\n", "record_template": "record_template", - "sample_rate": 0, + "sample_rate": 1, "timestamp_format": "unixnano", }, ownership_challenge="00000000000000000000", @@ -123,24 +123,24 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: enabled=False, filter='{"where":{"and":[{"key":"ClientRequestPath","operator":"contains","value":"/static"},{"key":"ClientRequestHost","operator":"eq","value":"example.com"}]}}', frequency="high", - kind="edge", + kind="", logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", max_upload_bytes=5000000, max_upload_interval_seconds=30, max_upload_records=1000, name="example.com", output_options={ - "batch_prefix": "batch_prefix", - "batch_suffix": "batch_suffix", - "cve_2021_44228": True, - "field_delimiter": "field_delimiter", - "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"], + "batch_prefix": "", + "batch_suffix": "", + "cve_2021_44228": False, + "field_delimiter": ",", + "field_names": ["Datetime", "DstIP", "SrcIP"], "output_type": "ndjson", - "record_delimiter": "record_delimiter", - "record_prefix": "record_prefix", - "record_suffix": "record_suffix", + "record_delimiter": "", + "record_prefix": "{", + "record_suffix": "}\n", "record_template": "record_template", - "sample_rate": 0, + "sample_rate": 1, "timestamp_format": "unixnano", }, ownership_challenge="00000000000000000000", @@ -369,7 +369,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncJobs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize @@ -386,28 +388,28 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare job = await async_client.logpush.jobs.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="account_id", - dataset="http_requests", + dataset="gateway_dns", enabled=False, filter='{"where":{"and":[{"key":"ClientRequestPath","operator":"contains","value":"/static"},{"key":"ClientRequestHost","operator":"eq","value":"example.com"}]}}', frequency="high", - kind="edge", + kind="", logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", max_upload_bytes=5000000, max_upload_interval_seconds=30, max_upload_records=1000, name="example.com", output_options={ - "batch_prefix": "batch_prefix", - "batch_suffix": "batch_suffix", - "cve_2021_44228": True, - "field_delimiter": "field_delimiter", - "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"], + "batch_prefix": "", + "batch_suffix": "", + "cve_2021_44228": False, + "field_delimiter": ",", + "field_names": ["Datetime", "DstIP", "SrcIP"], "output_type": "ndjson", - "record_delimiter": "record_delimiter", - "record_prefix": "record_prefix", - "record_suffix": "record_suffix", + "record_delimiter": "", + "record_prefix": "{", + "record_suffix": "}\n", "record_template": "record_template", - "sample_rate": 0, + "sample_rate": 1, "timestamp_format": "unixnano", }, ownership_challenge="00000000000000000000", @@ -476,24 +478,24 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare enabled=False, filter='{"where":{"and":[{"key":"ClientRequestPath","operator":"contains","value":"/static"},{"key":"ClientRequestHost","operator":"eq","value":"example.com"}]}}', frequency="high", - kind="edge", + kind="", logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", max_upload_bytes=5000000, max_upload_interval_seconds=30, max_upload_records=1000, name="example.com", output_options={ - "batch_prefix": "batch_prefix", - "batch_suffix": "batch_suffix", - "cve_2021_44228": True, - "field_delimiter": "field_delimiter", - "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"], + "batch_prefix": "", + "batch_suffix": "", + "cve_2021_44228": False, + "field_delimiter": ",", + "field_names": ["Datetime", "DstIP", "SrcIP"], "output_type": "ndjson", - "record_delimiter": "record_delimiter", - "record_prefix": "record_prefix", - "record_suffix": "record_suffix", + "record_delimiter": "", + "record_prefix": "{", + "record_suffix": "}\n", "record_template": "record_template", - "sample_rate": 0, + "sample_rate": 1, "timestamp_format": "unixnano", }, ownership_challenge="00000000000000000000", diff --git a/tests/api_resources/logpush/test_ownership.py b/tests/api_resources/logpush/test_ownership.py index 4ad4830713f..18096fdc424 100644 --- a/tests/api_resources/logpush/test_ownership.py +++ b/tests/api_resources/logpush/test_ownership.py @@ -150,7 +150,9 @@ def test_path_params_validate(self, client: Cloudflare) -> None: class TestAsyncOwnership: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/logpush/test_validate.py b/tests/api_resources/logpush/test_validate.py index 1912c05f201..8ecf8701fc8 100644 --- a/tests/api_resources/logpush/test_validate.py +++ b/tests/api_resources/logpush/test_validate.py @@ -206,7 +206,9 @@ def test_path_params_origin(self, client: Cloudflare) -> None: class TestAsyncValidate: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/logs/control/cmb/test_config.py b/tests/api_resources/logs/control/cmb/test_config.py index e58378c937e..e745ff9be6b 100644 --- a/tests/api_resources/logs/control/cmb/test_config.py +++ b/tests/api_resources/logs/control/cmb/test_config.py @@ -142,7 +142,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfig: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/logs/control/test_retention.py b/tests/api_resources/logs/control/test_retention.py index 1f321941bb8..8177450dcf5 100644 --- a/tests/api_resources/logs/control/test_retention.py +++ b/tests/api_resources/logs/control/test_retention.py @@ -103,7 +103,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRetention: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/logs/received/test_fields.py b/tests/api_resources/logs/received/test_fields.py index 8705e75e0e9..473a5baf341 100644 --- a/tests/api_resources/logs/received/test_fields.py +++ b/tests/api_resources/logs/received/test_fields.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFields: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/logs/test_rayid.py b/tests/api_resources/logs/test_rayid.py index b891b658a90..bcd572c49c1 100644 --- a/tests/api_resources/logs/test_rayid.py +++ b/tests/api_resources/logs/test_rayid.py @@ -77,7 +77,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRayID: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/logs/test_received.py b/tests/api_resources/logs/test_received.py index 088eb9ad2fa..f8c8795c20c 100644 --- a/tests/api_resources/logs/test_received.py +++ b/tests/api_resources/logs/test_received.py @@ -74,7 +74,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncReceived: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_cloud_networking/catalog_syncs/test_prebuilt_policies.py b/tests/api_resources/magic_cloud_networking/catalog_syncs/test_prebuilt_policies.py index e1be4de8e18..9159a726003 100644 --- a/tests/api_resources/magic_cloud_networking/catalog_syncs/test_prebuilt_policies.py +++ b/tests/api_resources/magic_cloud_networking/catalog_syncs/test_prebuilt_policies.py @@ -68,7 +68,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncPrebuiltPolicies: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_cloud_networking/on_ramps/test_address_spaces.py b/tests/api_resources/magic_cloud_networking/on_ramps/test_address_spaces.py index 42e21b1d632..4813fc1dc17 100644 --- a/tests/api_resources/magic_cloud_networking/on_ramps/test_address_spaces.py +++ b/tests/api_resources/magic_cloud_networking/on_ramps/test_address_spaces.py @@ -145,7 +145,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncAddressSpaces: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_cloud_networking/test_catalog_syncs.py b/tests/api_resources/magic_cloud_networking/test_catalog_syncs.py index 350a49f7a71..71e9deec8ed 100644 --- a/tests/api_resources/magic_cloud_networking/test_catalog_syncs.py +++ b/tests/api_resources/magic_cloud_networking/test_catalog_syncs.py @@ -401,7 +401,9 @@ def test_path_params_refresh(self, client: Cloudflare) -> None: class TestAsyncCatalogSyncs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_cloud_networking/test_cloud_integrations.py b/tests/api_resources/magic_cloud_networking/test_cloud_integrations.py index deef57f6415..d03faca3b56 100644 --- a/tests/api_resources/magic_cloud_networking/test_cloud_integrations.py +++ b/tests/api_resources/magic_cloud_networking/test_cloud_integrations.py @@ -510,7 +510,9 @@ def test_path_params_initial_setup(self, client: Cloudflare) -> None: class TestAsyncCloudIntegrations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_cloud_networking/test_on_ramps.py b/tests/api_resources/magic_cloud_networking/test_on_ramps.py index b47c6990c3a..4706a5bcde6 100644 --- a/tests/api_resources/magic_cloud_networking/test_on_ramps.py +++ b/tests/api_resources/magic_cloud_networking/test_on_ramps.py @@ -576,7 +576,9 @@ def test_path_params_plan(self, client: Cloudflare) -> None: class TestAsyncOnRamps: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_cloud_networking/test_resources.py b/tests/api_resources/magic_cloud_networking/test_resources.py index d591ba5c7f0..8275125681e 100644 --- a/tests/api_resources/magic_cloud_networking/test_resources.py +++ b/tests/api_resources/magic_cloud_networking/test_resources.py @@ -267,7 +267,9 @@ def test_path_params_policy_preview(self, client: Cloudflare) -> None: class TestAsyncResources: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_network_monitoring/configs/test_full.py b/tests/api_resources/magic_network_monitoring/configs/test_full.py index fa2d1efd518..9233a8c1c40 100644 --- a/tests/api_resources/magic_network_monitoring/configs/test_full.py +++ b/tests/api_resources/magic_network_monitoring/configs/test_full.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFull: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py b/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py index 46761c021c6..c9415da5b36 100644 --- a/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py +++ b/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py @@ -72,7 +72,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncAdvertisements: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_network_monitoring/test_configs.py b/tests/api_resources/magic_network_monitoring/test_configs.py index 5cd11d231e0..aa21987216c 100644 --- a/tests/api_resources/magic_network_monitoring/test_configs.py +++ b/tests/api_resources/magic_network_monitoring/test_configs.py @@ -278,7 +278,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfigs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_network_monitoring/test_rules.py b/tests/api_resources/magic_network_monitoring/test_rules.py index 1f5cbdf0ea3..862586ea078 100644 --- a/tests/api_resources/magic_network_monitoring/test_rules.py +++ b/tests/api_resources/magic_network_monitoring/test_rules.py @@ -342,7 +342,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_network_monitoring/vpc_flows/test_tokens.py b/tests/api_resources/magic_network_monitoring/vpc_flows/test_tokens.py index 01a029b3b62..3d876e6c8bf 100644 --- a/tests/api_resources/magic_network_monitoring/vpc_flows/test_tokens.py +++ b/tests/api_resources/magic_network_monitoring/vpc_flows/test_tokens.py @@ -56,7 +56,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncTokens: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/connectors/events/test_latest.py b/tests/api_resources/magic_transit/connectors/events/test_latest.py index fb297d3841a..04679973ea3 100644 --- a/tests/api_resources/magic_transit/connectors/events/test_latest.py +++ b/tests/api_resources/magic_transit/connectors/events/test_latest.py @@ -67,7 +67,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncLatest: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/connectors/snapshots/test_latest.py b/tests/api_resources/magic_transit/connectors/snapshots/test_latest.py index 2a812ac20c2..639138ca157 100644 --- a/tests/api_resources/magic_transit/connectors/snapshots/test_latest.py +++ b/tests/api_resources/magic_transit/connectors/snapshots/test_latest.py @@ -67,7 +67,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncLatest: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/connectors/test_events.py b/tests/api_resources/magic_transit/connectors/test_events.py index 65d54d4764d..500f22e5d76 100644 --- a/tests/api_resources/magic_transit/connectors/test_events.py +++ b/tests/api_resources/magic_transit/connectors/test_events.py @@ -147,7 +147,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEvents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/connectors/test_snapshots.py b/tests/api_resources/magic_transit/connectors/test_snapshots.py index 46a4ffa8148..f820c3d86f3 100644 --- a/tests/api_resources/magic_transit/connectors/test_snapshots.py +++ b/tests/api_resources/magic_transit/connectors/test_snapshots.py @@ -142,7 +142,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSnapshots: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/pcaps/test_download.py b/tests/api_resources/magic_transit/pcaps/test_download.py index 5ab97be2429..de43411bbd3 100644 --- a/tests/api_resources/magic_transit/pcaps/test_download.py +++ b/tests/api_resources/magic_transit/pcaps/test_download.py @@ -91,7 +91,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDownload: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize @pytest.mark.respx(base_url=base_url) diff --git a/tests/api_resources/magic_transit/pcaps/test_ownership.py b/tests/api_resources/magic_transit/pcaps/test_ownership.py index 7a7d3ea89ec..dcc99b592ff 100644 --- a/tests/api_resources/magic_transit/pcaps/test_ownership.py +++ b/tests/api_resources/magic_transit/pcaps/test_ownership.py @@ -194,7 +194,9 @@ def test_path_params_validate(self, client: Cloudflare) -> None: class TestAsyncOwnership: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/sites/test_acls.py b/tests/api_resources/magic_transit/sites/test_acls.py index d6c31f71bc6..1e98e853d29 100644 --- a/tests/api_resources/magic_transit/sites/test_acls.py +++ b/tests/api_resources/magic_transit/sites/test_acls.py @@ -456,7 +456,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncACLs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/sites/test_lans.py b/tests/api_resources/magic_transit/sites/test_lans.py index 2fc412afa6e..8eeced417a8 100644 --- a/tests/api_resources/magic_transit/sites/test_lans.py +++ b/tests/api_resources/magic_transit/sites/test_lans.py @@ -471,7 +471,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLANs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/sites/test_wans.py b/tests/api_resources/magic_transit/sites/test_wans.py index b8e91efc2dc..98217a3396c 100644 --- a/tests/api_resources/magic_transit/sites/test_wans.py +++ b/tests/api_resources/magic_transit/sites/test_wans.py @@ -416,7 +416,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWANs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/test_apps.py b/tests/api_resources/magic_transit/test_apps.py index 185b0f31251..bfa9adeceb6 100644 --- a/tests/api_resources/magic_transit/test_apps.py +++ b/tests/api_resources/magic_transit/test_apps.py @@ -346,7 +346,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncApps: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip( reason="prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9360388260/job/25765690361?pr=482#step:5:7212" diff --git a/tests/api_resources/magic_transit/test_cf_interconnects.py b/tests/api_resources/magic_transit/test_cf_interconnects.py index 91c10afd3aa..87f22b8bf4a 100644 --- a/tests/api_resources/magic_transit/test_cf_interconnects.py +++ b/tests/api_resources/magic_transit/test_cf_interconnects.py @@ -255,7 +255,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCfInterconnects: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/magic_transit/test_connectors.py b/tests/api_resources/magic_transit/test_connectors.py index 75506734f5e..f87ed4dfdbd 100644 --- a/tests/api_resources/magic_transit/test_connectors.py +++ b/tests/api_resources/magic_transit/test_connectors.py @@ -14,6 +14,8 @@ ConnectorGetResponse, ConnectorEditResponse, ConnectorListResponse, + ConnectorCreateResponse, + ConnectorDeleteResponse, ConnectorUpdateResponse, ) @@ -23,6 +25,64 @@ class TestConnectors: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @parametrize + def test_method_create(self, client: Cloudflare) -> None: + connector = client.magic_transit.connectors.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + device={}, + ) + assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Cloudflare) -> None: + connector = client.magic_transit.connectors.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + device={ + "id": "id", + "serial_number": "serial_number", + }, + activated=True, + interrupt_window_duration_hours=0, + interrupt_window_hour_of_day=0, + notes="notes", + timezone="timezone", + ) + assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Cloudflare) -> None: + response = client.magic_transit.connectors.with_raw_response.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + device={}, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + connector = response.parse() + assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Cloudflare) -> None: + with client.magic_transit.connectors.with_streaming_response.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + device={}, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + connector = response.parse() + assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_create(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.magic_transit.connectors.with_raw_response.create( + account_id="", + device={}, + ) + @parametrize def test_method_update(self, client: Cloudflare) -> None: connector = client.magic_transit.connectors.update( @@ -122,6 +182,54 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) + @parametrize + def test_method_delete(self, client: Cloudflare) -> None: + connector = client.magic_transit.connectors.delete( + connector_id="connector_id", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(ConnectorDeleteResponse, connector, path=["response"]) + + @parametrize + def test_raw_response_delete(self, client: Cloudflare) -> None: + response = client.magic_transit.connectors.with_raw_response.delete( + connector_id="connector_id", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + connector = response.parse() + assert_matches_type(ConnectorDeleteResponse, connector, path=["response"]) + + @parametrize + def test_streaming_response_delete(self, client: Cloudflare) -> None: + with client.magic_transit.connectors.with_streaming_response.delete( + connector_id="connector_id", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + connector = response.parse() + assert_matches_type(ConnectorDeleteResponse, connector, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_delete(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.magic_transit.connectors.with_raw_response.delete( + connector_id="connector_id", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): + client.magic_transit.connectors.with_raw_response.delete( + connector_id="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + @parametrize def test_method_edit(self, client: Cloudflare) -> None: connector = client.magic_transit.connectors.edit( @@ -233,7 +341,67 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConnectors: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @parametrize + async def test_method_create(self, async_client: AsyncCloudflare) -> None: + connector = await async_client.magic_transit.connectors.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + device={}, + ) + assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: + connector = await async_client.magic_transit.connectors.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + device={ + "id": "id", + "serial_number": "serial_number", + }, + activated=True, + interrupt_window_duration_hours=0, + interrupt_window_hour_of_day=0, + notes="notes", + timezone="timezone", + ) + assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.connectors.with_raw_response.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + device={}, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + connector = await response.parse() + assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.connectors.with_streaming_response.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + device={}, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + connector = await response.parse() + assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.magic_transit.connectors.with_raw_response.create( + account_id="", + device={}, + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: @@ -334,6 +502,54 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) + @parametrize + async def test_method_delete(self, async_client: AsyncCloudflare) -> None: + connector = await async_client.magic_transit.connectors.delete( + connector_id="connector_id", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(ConnectorDeleteResponse, connector, path=["response"]) + + @parametrize + async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.connectors.with_raw_response.delete( + connector_id="connector_id", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + connector = await response.parse() + assert_matches_type(ConnectorDeleteResponse, connector, path=["response"]) + + @parametrize + async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.connectors.with_streaming_response.delete( + connector_id="connector_id", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + connector = await response.parse() + assert_matches_type(ConnectorDeleteResponse, connector, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.magic_transit.connectors.with_raw_response.delete( + connector_id="connector_id", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): + await async_client.magic_transit.connectors.with_raw_response.delete( + connector_id="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: connector = await async_client.magic_transit.connectors.edit( diff --git a/tests/api_resources/magic_transit/test_gre_tunnels.py b/tests/api_resources/magic_transit/test_gre_tunnels.py index 03eee2584f0..f69ed6bbd92 100644 --- a/tests/api_resources/magic_transit/test_gre_tunnels.py +++ b/tests/api_resources/magic_transit/test_gre_tunnels.py @@ -419,7 +419,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncGRETunnels: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/magic_transit/test_ipsec_tunnels.py b/tests/api_resources/magic_transit/test_ipsec_tunnels.py index 96121a2b033..d6a61d6b300 100644 --- a/tests/api_resources/magic_transit/test_ipsec_tunnels.py +++ b/tests/api_resources/magic_transit/test_ipsec_tunnels.py @@ -459,7 +459,9 @@ def test_path_params_psk_generate(self, client: Cloudflare) -> None: class TestAsyncIPSECTunnels: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/test_pcaps.py b/tests/api_resources/magic_transit/test_pcaps.py index 6c7d57154cc..17a6cb661d4 100644 --- a/tests/api_resources/magic_transit/test_pcaps.py +++ b/tests/api_resources/magic_transit/test_pcaps.py @@ -311,7 +311,9 @@ def test_path_params_stop(self, client: Cloudflare) -> None: class TestAsyncPCAPs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/test_routes.py b/tests/api_resources/magic_transit/test_routes.py index 81af5a39088..9524a986da2 100644 --- a/tests/api_resources/magic_transit/test_routes.py +++ b/tests/api_resources/magic_transit/test_routes.py @@ -420,7 +420,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRoutes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/magic_transit/test_sites.py b/tests/api_resources/magic_transit/test_sites.py index 406ca9f52a9..27c50c24f7f 100644 --- a/tests/api_resources/magic_transit/test_sites.py +++ b/tests/api_resources/magic_transit/test_sites.py @@ -359,7 +359,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSites: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/mtls_certificates/test_associations.py b/tests/api_resources/mtls_certificates/test_associations.py index 6f11e303c01..ce2192b2694 100644 --- a/tests/api_resources/mtls_certificates/test_associations.py +++ b/tests/api_resources/mtls_certificates/test_associations.py @@ -68,7 +68,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAssociations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/network_interconnects/test_cnis.py b/tests/api_resources/network_interconnects/test_cnis.py index a5ae1785ded..a2d7d5044f1 100644 --- a/tests/api_resources/network_interconnects/test_cnis.py +++ b/tests/api_resources/network_interconnects/test_cnis.py @@ -375,7 +375,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCNIs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/network_interconnects/test_interconnects.py b/tests/api_resources/network_interconnects/test_interconnects.py index 79d4f5ec681..ff267d7864b 100644 --- a/tests/api_resources/network_interconnects/test_interconnects.py +++ b/tests/api_resources/network_interconnects/test_interconnects.py @@ -380,7 +380,9 @@ def test_path_params_status(self, client: Cloudflare) -> None: class TestAsyncInterconnects: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/network_interconnects/test_settings.py b/tests/api_resources/network_interconnects/test_settings.py index d5151d269f7..144eb7b2f92 100644 --- a/tests/api_resources/network_interconnects/test_settings.py +++ b/tests/api_resources/network_interconnects/test_settings.py @@ -103,7 +103,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/network_interconnects/test_slots.py b/tests/api_resources/network_interconnects/test_slots.py index 6e7b507d51c..b57afef6ce5 100644 --- a/tests/api_resources/network_interconnects/test_slots.py +++ b/tests/api_resources/network_interconnects/test_slots.py @@ -118,7 +118,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSlots: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py b/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py index 0e2ef562a10..7e804a45b46 100644 --- a/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py +++ b/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py @@ -205,7 +205,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/origin_tls_client_auth/test_hostnames.py b/tests/api_resources/origin_tls_client_auth/test_hostnames.py index 37839d99139..caded780ceb 100644 --- a/tests/api_resources/origin_tls_client_auth/test_hostnames.py +++ b/tests/api_resources/origin_tls_client_auth/test_hostnames.py @@ -113,7 +113,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHostnames: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/origin_tls_client_auth/test_settings.py b/tests/api_resources/origin_tls_client_auth/test_settings.py index fc30faf30eb..03cf5a4bc0e 100644 --- a/tests/api_resources/origin_tls_client_auth/test_settings.py +++ b/tests/api_resources/origin_tls_client_auth/test_settings.py @@ -99,7 +99,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/page_shield/test_connections.py b/tests/api_resources/page_shield/test_connections.py index 1af65b2ef8f..ea61c20c164 100644 --- a/tests/api_resources/page_shield/test_connections.py +++ b/tests/api_resources/page_shield/test_connections.py @@ -125,7 +125,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConnections: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/page_shield/test_cookies.py b/tests/api_resources/page_shield/test_cookies.py index d3008ff641a..4c3ee43d562 100644 --- a/tests/api_resources/page_shield/test_cookies.py +++ b/tests/api_resources/page_shield/test_cookies.py @@ -127,7 +127,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCookies: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/page_shield/test_policies.py b/tests/api_resources/page_shield/test_policies.py index 375863ad9b6..a62663f6b51 100644 --- a/tests/api_resources/page_shield/test_policies.py +++ b/tests/api_resources/page_shield/test_policies.py @@ -278,7 +278,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPolicies: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/page_shield/test_scripts.py b/tests/api_resources/page_shield/test_scripts.py index f8a9077bccf..af2706f5f45 100644 --- a/tests/api_resources/page_shield/test_scripts.py +++ b/tests/api_resources/page_shield/test_scripts.py @@ -126,7 +126,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncScripts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/pages/projects/deployments/history/test_logs.py b/tests/api_resources/pages/projects/deployments/history/test_logs.py index db7215a143b..54642c4a269 100644 --- a/tests/api_resources/pages/projects/deployments/history/test_logs.py +++ b/tests/api_resources/pages/projects/deployments/history/test_logs.py @@ -79,7 +79,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLogs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/pages/projects/test_deployments.py b/tests/api_resources/pages/projects/test_deployments.py index 7c9203aa0c3..5d4451d14e8 100644 --- a/tests/api_resources/pages/projects/test_deployments.py +++ b/tests/api_resources/pages/projects/test_deployments.py @@ -391,7 +391,9 @@ def test_path_params_rollback(self, client: Cloudflare) -> None: class TestAsyncDeployments: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/pages/projects/test_domains.py b/tests/api_resources/pages/projects/test_domains.py index 24f58204f4a..3725b40f8b8 100644 --- a/tests/api_resources/pages/projects/test_domains.py +++ b/tests/api_resources/pages/projects/test_domains.py @@ -316,7 +316,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomains: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/pages/test_projects.py b/tests/api_resources/pages/test_projects.py index f4e1ef5989d..f6f4158b237 100644 --- a/tests/api_resources/pages/test_projects.py +++ b/tests/api_resources/pages/test_projects.py @@ -495,7 +495,9 @@ def test_path_params_purge_build_cache(self, client: Cloudflare) -> None: class TestAsyncProjects: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/queues/test_consumers.py b/tests/api_resources/queues/test_consumers.py index 088cbc4a814..b047b208198 100644 --- a/tests/api_resources/queues/test_consumers.py +++ b/tests/api_resources/queues/test_consumers.py @@ -414,7 +414,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConsumers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/queues/test_messages.py b/tests/api_resources/queues/test_messages.py index 48a8880f39a..f53b6239ae1 100644 --- a/tests/api_resources/queues/test_messages.py +++ b/tests/api_resources/queues/test_messages.py @@ -331,7 +331,9 @@ def test_path_params_push_overload_2(self, client: Cloudflare) -> None: class TestAsyncMessages: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_ack(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/queues/test_purge.py b/tests/api_resources/queues/test_purge.py index f246fe06841..3148148bfb7 100644 --- a/tests/api_resources/queues/test_purge.py +++ b/tests/api_resources/queues/test_purge.py @@ -124,7 +124,9 @@ def test_path_params_status(self, client: Cloudflare) -> None: class TestAsyncPurge: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_start(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/r2/buckets/domains/test_custom.py b/tests/api_resources/r2/buckets/domains/test_custom.py index c93c6691c11..b9b36f64a20 100644 --- a/tests/api_resources/r2/buckets/domains/test_custom.py +++ b/tests/api_resources/r2/buckets/domains/test_custom.py @@ -395,7 +395,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustom: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/r2/buckets/domains/test_managed.py b/tests/api_resources/r2/buckets/domains/test_managed.py index 2d574c1b72a..416c742d2ed 100644 --- a/tests/api_resources/r2/buckets/domains/test_managed.py +++ b/tests/api_resources/r2/buckets/domains/test_managed.py @@ -149,7 +149,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncManaged: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/r2/buckets/test_cors.py b/tests/api_resources/r2/buckets/test_cors.py index 4c978af07d5..0864698edc4 100644 --- a/tests/api_resources/r2/buckets/test_cors.py +++ b/tests/api_resources/r2/buckets/test_cors.py @@ -217,7 +217,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCORS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/r2/buckets/test_event_notifications.py b/tests/api_resources/r2/buckets/test_event_notifications.py index e3df821f3f2..07495b047e0 100644 --- a/tests/api_resources/r2/buckets/test_event_notifications.py +++ b/tests/api_resources/r2/buckets/test_event_notifications.py @@ -317,7 +317,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEventNotifications: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize diff --git a/tests/api_resources/r2/buckets/test_lifecycle.py b/tests/api_resources/r2/buckets/test_lifecycle.py index f377344330f..d366fb30c4b 100644 --- a/tests/api_resources/r2/buckets/test_lifecycle.py +++ b/tests/api_resources/r2/buckets/test_lifecycle.py @@ -171,7 +171,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLifecycle: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/r2/buckets/test_locks.py b/tests/api_resources/r2/buckets/test_locks.py index 5921965821f..2debc63606e 100644 --- a/tests/api_resources/r2/buckets/test_locks.py +++ b/tests/api_resources/r2/buckets/test_locks.py @@ -154,7 +154,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLocks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize diff --git a/tests/api_resources/r2/buckets/test_metrics.py b/tests/api_resources/r2/buckets/test_metrics.py index fde55e0bb0e..974564e0fc8 100644 --- a/tests/api_resources/r2/buckets/test_metrics.py +++ b/tests/api_resources/r2/buckets/test_metrics.py @@ -61,7 +61,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncMetrics: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize diff --git a/tests/api_resources/r2/buckets/test_sippy.py b/tests/api_resources/r2/buckets/test_sippy.py index 6e67aca418d..b7b43b3b788 100644 --- a/tests/api_resources/r2/buckets/test_sippy.py +++ b/tests/api_resources/r2/buckets/test_sippy.py @@ -290,7 +290,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSippy: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/r2/super_slurper/jobs/test_logs.py b/tests/api_resources/r2/super_slurper/jobs/test_logs.py index c1766d0953d..847b27f546d 100644 --- a/tests/api_resources/r2/super_slurper/jobs/test_logs.py +++ b/tests/api_resources/r2/super_slurper/jobs/test_logs.py @@ -78,7 +78,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncLogs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/r2/super_slurper/test_connectivity_precheck.py b/tests/api_resources/r2/super_slurper/test_connectivity_precheck.py index c3f1403cc88..6583f5a6cee 100644 --- a/tests/api_resources/r2/super_slurper/test_connectivity_precheck.py +++ b/tests/api_resources/r2/super_slurper/test_connectivity_precheck.py @@ -229,7 +229,9 @@ def test_path_params_target(self, client: Cloudflare) -> None: class TestAsyncConnectivityPrecheck: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_source_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/r2/super_slurper/test_jobs.py b/tests/api_resources/r2/super_slurper/test_jobs.py index 4f7f9107ee8..e5976ec5fc2 100644 --- a/tests/api_resources/r2/super_slurper/test_jobs.py +++ b/tests/api_resources/r2/super_slurper/test_jobs.py @@ -414,7 +414,9 @@ def test_path_params_resume(self, client: Cloudflare) -> None: class TestAsyncJobs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/r2/test_buckets.py b/tests/api_resources/r2/test_buckets.py index b9c2dfdc7b3..733506878c5 100644 --- a/tests/api_resources/r2/test_buckets.py +++ b/tests/api_resources/r2/test_buckets.py @@ -326,7 +326,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBuckets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/r2/test_temporary_credentials.py b/tests/api_resources/r2/test_temporary_credentials.py index aa2d0981d16..71d2caa82f8 100644 --- a/tests/api_resources/r2/test_temporary_credentials.py +++ b/tests/api_resources/r2/test_temporary_credentials.py @@ -91,7 +91,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncTemporaryCredentials: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/radar/ai/bots/test_summary.py b/tests/api_resources/radar/ai/bots/test_summary.py index 90e08cd591d..902d2d89a9e 100644 --- a/tests/api_resources/radar/ai/bots/test_summary.py +++ b/tests/api_resources/radar/ai/bots/test_summary.py @@ -60,7 +60,9 @@ def test_streaming_response_user_agent(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_user_agent(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/ai/inference/test_summary.py b/tests/api_resources/radar/ai/inference/test_summary.py index 353a568f366..39dadb81d00 100644 --- a/tests/api_resources/radar/ai/inference/test_summary.py +++ b/tests/api_resources/radar/ai/inference/test_summary.py @@ -97,7 +97,9 @@ def test_streaming_response_task(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_model(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/ai/inference/timeseries_groups/test_summary.py b/tests/api_resources/radar/ai/inference/timeseries_groups/test_summary.py index 1a3c0affb15..844a159826c 100644 --- a/tests/api_resources/radar/ai/inference/timeseries_groups/test_summary.py +++ b/tests/api_resources/radar/ai/inference/timeseries_groups/test_summary.py @@ -99,7 +99,9 @@ def test_streaming_response_task(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_model(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/ai/test_timeseries_groups.py b/tests/api_resources/radar/ai/test_timeseries_groups.py index 59c16b41561..8f0749ca7c5 100644 --- a/tests/api_resources/radar/ai/test_timeseries_groups.py +++ b/tests/api_resources/radar/ai/test_timeseries_groups.py @@ -61,7 +61,9 @@ def test_streaming_response_user_agent(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_user_agent(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/ai/test_to_markdown.py b/tests/api_resources/radar/ai/test_to_markdown.py index 6dd6f07410a..c968cbca64d 100644 --- a/tests/api_resources/radar/ai/test_to_markdown.py +++ b/tests/api_resources/radar/ai/test_to_markdown.py @@ -71,7 +71,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncToMarkdown: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate prism error for invalid security scheme used") @parametrize diff --git a/tests/api_resources/radar/annotations/test_outages.py b/tests/api_resources/radar/annotations/test_outages.py index f249d7e3c89..c1cdb759a86 100644 --- a/tests/api_resources/radar/annotations/test_outages.py +++ b/tests/api_resources/radar/annotations/test_outages.py @@ -98,7 +98,9 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None: class TestAsyncOutages: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/as112/test_summary.py b/tests/api_resources/radar/as112/test_summary.py index 3d71c52ebae..6557815c13b 100644 --- a/tests/api_resources/radar/as112/test_summary.py +++ b/tests/api_resources/radar/as112/test_summary.py @@ -272,7 +272,9 @@ def test_streaming_response_response_codes(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_dnssec(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/as112/test_timeseries_groups.py b/tests/api_resources/radar/as112/test_timeseries_groups.py index c428285efdf..563610398f4 100644 --- a/tests/api_resources/radar/as112/test_timeseries_groups.py +++ b/tests/api_resources/radar/as112/test_timeseries_groups.py @@ -278,7 +278,9 @@ def test_streaming_response_response_codes(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_dnssec(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/as112/test_top.py b/tests/api_resources/radar/as112/test_top.py index 9d7f4f2d626..a99a57baac1 100644 --- a/tests/api_resources/radar/as112/test_top.py +++ b/tests/api_resources/radar/as112/test_top.py @@ -202,7 +202,9 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None: class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_dnssec(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/layer3/test_summary.py b/tests/api_resources/radar/attacks/layer3/test_summary.py index a488256e75c..7dea5d0b754 100644 --- a/tests/api_resources/radar/attacks/layer3/test_summary.py +++ b/tests/api_resources/radar/attacks/layer3/test_summary.py @@ -316,7 +316,9 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_bitrate(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py b/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py index a6dfc1a6d56..96416cc6c73 100644 --- a/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py +++ b/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py @@ -330,7 +330,9 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_bitrate(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/layer3/test_top.py b/tests/api_resources/radar/attacks/layer3/test_top.py index a2ba4039c5b..f2d259447fa 100644 --- a/tests/api_resources/radar/attacks/layer3/test_top.py +++ b/tests/api_resources/radar/attacks/layer3/test_top.py @@ -165,7 +165,9 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None: class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_attacks(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/layer3/top/test_locations.py b/tests/api_resources/radar/attacks/layer3/top/test_locations.py index fc0424a2a6b..8c84eb28cc7 100644 --- a/tests/api_resources/radar/attacks/layer3/top/test_locations.py +++ b/tests/api_resources/radar/attacks/layer3/top/test_locations.py @@ -105,7 +105,9 @@ def test_streaming_response_target(self, client: Cloudflare) -> None: class TestAsyncLocations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_origin(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/layer7/test_summary.py b/tests/api_resources/radar/attacks/layer7/test_summary.py index ee33af513ca..e7fb747af1b 100644 --- a/tests/api_resources/radar/attacks/layer7/test_summary.py +++ b/tests/api_resources/radar/attacks/layer7/test_summary.py @@ -330,7 +330,9 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_http_method(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py b/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py index 7192af1ea24..4f306059ea1 100644 --- a/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py +++ b/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py @@ -344,7 +344,9 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_http_method(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/layer7/test_top.py b/tests/api_resources/radar/attacks/layer7/test_top.py index 0b9bdd624b2..8d94572dd0d 100644 --- a/tests/api_resources/radar/attacks/layer7/test_top.py +++ b/tests/api_resources/radar/attacks/layer7/test_top.py @@ -171,7 +171,9 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None: class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_attacks(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/layer7/top/test_ases.py b/tests/api_resources/radar/attacks/layer7/top/test_ases.py index 355e8d958f3..d5fc7fad28a 100644 --- a/tests/api_resources/radar/attacks/layer7/top/test_ases.py +++ b/tests/api_resources/radar/attacks/layer7/top/test_ases.py @@ -63,7 +63,9 @@ def test_streaming_response_origin(self, client: Cloudflare) -> None: class TestAsyncAses: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_origin(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/layer7/top/test_locations.py b/tests/api_resources/radar/attacks/layer7/top/test_locations.py index e316dabe10d..0beda3534c5 100644 --- a/tests/api_resources/radar/attacks/layer7/top/test_locations.py +++ b/tests/api_resources/radar/attacks/layer7/top/test_locations.py @@ -105,7 +105,9 @@ def test_streaming_response_target(self, client: Cloudflare) -> None: class TestAsyncLocations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_origin(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/test_layer3.py b/tests/api_resources/radar/attacks/test_layer3.py index 0d2c720472e..182fc628ecc 100644 --- a/tests/api_resources/radar/attacks/test_layer3.py +++ b/tests/api_resources/radar/attacks/test_layer3.py @@ -65,7 +65,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncLayer3: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/test_layer7.py b/tests/api_resources/radar/attacks/test_layer7.py index 7a43a414b3f..66db2e280df 100644 --- a/tests/api_resources/radar/attacks/test_layer7.py +++ b/tests/api_resources/radar/attacks/test_layer7.py @@ -65,7 +65,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncLayer7: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/bgp/hijacks/test_events.py b/tests/api_resources/radar/bgp/hijacks/test_events.py index 52439d479ae..eb17a28d7a5 100644 --- a/tests/api_resources/radar/bgp/hijacks/test_events.py +++ b/tests/api_resources/radar/bgp/hijacks/test_events.py @@ -68,7 +68,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncEvents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/bgp/leaks/test_events.py b/tests/api_resources/radar/bgp/leaks/test_events.py index d3e22882b2a..470dc98987b 100644 --- a/tests/api_resources/radar/bgp/leaks/test_events.py +++ b/tests/api_resources/radar/bgp/leaks/test_events.py @@ -64,7 +64,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncEvents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/bgp/test_ips.py b/tests/api_resources/radar/bgp/test_ips.py index 27272ae08e2..8a852f8528c 100644 --- a/tests/api_resources/radar/bgp/test_ips.py +++ b/tests/api_resources/radar/bgp/test_ips.py @@ -60,7 +60,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncIPs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/bgp/test_routes.py b/tests/api_resources/radar/bgp/test_routes.py index 34ee276782a..aa7b276d153 100644 --- a/tests/api_resources/radar/bgp/test_routes.py +++ b/tests/api_resources/radar/bgp/test_routes.py @@ -199,7 +199,9 @@ def test_streaming_response_stats(self, client: Cloudflare) -> None: class TestAsyncRoutes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_ases(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/bgp/test_top.py b/tests/api_resources/radar/bgp/test_top.py index afd90a9fc0d..1880ce7d0a2 100644 --- a/tests/api_resources/radar/bgp/test_top.py +++ b/tests/api_resources/radar/bgp/test_top.py @@ -59,7 +59,9 @@ def test_streaming_response_prefixes(self, client: Cloudflare) -> None: class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_prefixes(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/bgp/top/test_ases.py b/tests/api_resources/radar/bgp/top/test_ases.py index 261cfd82941..2bc97e0df99 100644 --- a/tests/api_resources/radar/bgp/top/test_ases.py +++ b/tests/api_resources/radar/bgp/top/test_ases.py @@ -94,7 +94,9 @@ def test_streaming_response_prefixes(self, client: Cloudflare) -> None: class TestAsyncAses: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/bots/__init__.py b/tests/api_resources/radar/bots/__init__.py new file mode 100644 index 00000000000..fd8019a9a1a --- /dev/null +++ b/tests/api_resources/radar/bots/__init__.py @@ -0,0 +1 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/tests/api_resources/radar/bots/test_web_crawlers.py b/tests/api_resources/radar/bots/test_web_crawlers.py new file mode 100644 index 00000000000..4aee2bae6e8 --- /dev/null +++ b/tests/api_resources/radar/bots/test_web_crawlers.py @@ -0,0 +1,210 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type +from cloudflare._utils import parse_datetime +from cloudflare.types.radar.bots import ( + WebCrawlerSummaryResponse, + WebCrawlerTimeseriesGroupsResponse, +) + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestWebCrawlers: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_summary(self, client: Cloudflare) -> None: + web_crawler = client.radar.bots.web_crawlers.summary( + dimension="USER_AGENT", + ) + assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"]) + + @parametrize + def test_method_summary_with_all_params(self, client: Cloudflare) -> None: + web_crawler = client.radar.bots.web_crawlers.summary( + dimension="USER_AGENT", + bot_operator=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit_per_group=10, + name=["main_series"], + ) + assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"]) + + @parametrize + def test_raw_response_summary(self, client: Cloudflare) -> None: + response = client.radar.bots.web_crawlers.with_raw_response.summary( + dimension="USER_AGENT", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + web_crawler = response.parse() + assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"]) + + @parametrize + def test_streaming_response_summary(self, client: Cloudflare) -> None: + with client.radar.bots.web_crawlers.with_streaming_response.summary( + dimension="USER_AGENT", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + web_crawler = response.parse() + assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_timeseries_groups(self, client: Cloudflare) -> None: + web_crawler = client.radar.bots.web_crawlers.timeseries_groups( + dimension="USER_AGENT", + ) + assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"]) + + @parametrize + def test_method_timeseries_groups_with_all_params(self, client: Cloudflare) -> None: + web_crawler = client.radar.bots.web_crawlers.timeseries_groups( + dimension="USER_AGENT", + agg_interval="1h", + bot_operator=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit_per_group=10, + name=["main_series"], + ) + assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"]) + + @parametrize + def test_raw_response_timeseries_groups(self, client: Cloudflare) -> None: + response = client.radar.bots.web_crawlers.with_raw_response.timeseries_groups( + dimension="USER_AGENT", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + web_crawler = response.parse() + assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"]) + + @parametrize + def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None: + with client.radar.bots.web_crawlers.with_streaming_response.timeseries_groups( + dimension="USER_AGENT", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + web_crawler = response.parse() + assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncWebCrawlers: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @parametrize + async def test_method_summary(self, async_client: AsyncCloudflare) -> None: + web_crawler = await async_client.radar.bots.web_crawlers.summary( + dimension="USER_AGENT", + ) + assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"]) + + @parametrize + async def test_method_summary_with_all_params(self, async_client: AsyncCloudflare) -> None: + web_crawler = await async_client.radar.bots.web_crawlers.summary( + dimension="USER_AGENT", + bot_operator=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit_per_group=10, + name=["main_series"], + ) + assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"]) + + @parametrize + async def test_raw_response_summary(self, async_client: AsyncCloudflare) -> None: + response = await async_client.radar.bots.web_crawlers.with_raw_response.summary( + dimension="USER_AGENT", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + web_crawler = await response.parse() + assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"]) + + @parametrize + async def test_streaming_response_summary(self, async_client: AsyncCloudflare) -> None: + async with async_client.radar.bots.web_crawlers.with_streaming_response.summary( + dimension="USER_AGENT", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + web_crawler = await response.parse() + assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_timeseries_groups(self, async_client: AsyncCloudflare) -> None: + web_crawler = await async_client.radar.bots.web_crawlers.timeseries_groups( + dimension="USER_AGENT", + ) + assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"]) + + @parametrize + async def test_method_timeseries_groups_with_all_params(self, async_client: AsyncCloudflare) -> None: + web_crawler = await async_client.radar.bots.web_crawlers.timeseries_groups( + dimension="USER_AGENT", + agg_interval="1h", + bot_operator=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit_per_group=10, + name=["main_series"], + ) + assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"]) + + @parametrize + async def test_raw_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None: + response = await async_client.radar.bots.web_crawlers.with_raw_response.timeseries_groups( + dimension="USER_AGENT", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + web_crawler = await response.parse() + assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"]) + + @parametrize + async def test_streaming_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None: + async with async_client.radar.bots.web_crawlers.with_streaming_response.timeseries_groups( + dimension="USER_AGENT", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + web_crawler = await response.parse() + assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/radar/dns/test_summary.py b/tests/api_resources/radar/dns/test_summary.py index 33f17227c95..38000e34bec 100644 --- a/tests/api_resources/radar/dns/test_summary.py +++ b/tests/api_resources/radar/dns/test_summary.py @@ -470,7 +470,9 @@ def test_streaming_response_response_ttl(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_cache_hit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/dns/test_timeseries_groups.py b/tests/api_resources/radar/dns/test_timeseries_groups.py index 4e8475c2340..56cf538cbae 100644 --- a/tests/api_resources/radar/dns/test_timeseries_groups.py +++ b/tests/api_resources/radar/dns/test_timeseries_groups.py @@ -480,7 +480,9 @@ def test_streaming_response_response_ttl(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_cache_hit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/dns/test_top.py b/tests/api_resources/radar/dns/test_top.py index 6d6eb3b42b4..91998856274 100644 --- a/tests/api_resources/radar/dns/test_top.py +++ b/tests/api_resources/radar/dns/test_top.py @@ -102,7 +102,9 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None: class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_ases(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/email/routing/test_summary.py b/tests/api_resources/radar/email/routing/test_summary.py index 64bbf2de1d2..5d8a9f81409 100644 --- a/tests/api_resources/radar/email/routing/test_summary.py +++ b/tests/api_resources/radar/email/routing/test_summary.py @@ -273,7 +273,9 @@ def test_streaming_response_spf(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_arc(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/email/routing/test_timeseries_groups.py b/tests/api_resources/radar/email/routing/test_timeseries_groups.py index 338ae22cd84..e2f211a97df 100644 --- a/tests/api_resources/radar/email/routing/test_timeseries_groups.py +++ b/tests/api_resources/radar/email/routing/test_timeseries_groups.py @@ -279,7 +279,9 @@ def test_streaming_response_spf(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_arc(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/email/security/test_summary.py b/tests/api_resources/radar/email/security/test_summary.py index 51820e1bd4e..05d733875f4 100644 --- a/tests/api_resources/radar/email/security/test_summary.py +++ b/tests/api_resources/radar/email/security/test_summary.py @@ -394,7 +394,9 @@ def test_streaming_response_tls_version(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_arc(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/email/security/test_timeseries_groups.py b/tests/api_resources/radar/email/security/test_timeseries_groups.py index 59dfb88fc3a..c7ea6db44ee 100644 --- a/tests/api_resources/radar/email/security/test_timeseries_groups.py +++ b/tests/api_resources/radar/email/security/test_timeseries_groups.py @@ -403,7 +403,9 @@ def test_streaming_response_tls_version(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_arc(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/email/security/top/test_tlds.py b/tests/api_resources/radar/email/security/top/test_tlds.py index 0633c38550e..b4a4c9d5e51 100644 --- a/tests/api_resources/radar/email/security/top/test_tlds.py +++ b/tests/api_resources/radar/email/security/top/test_tlds.py @@ -63,7 +63,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncTlds: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/email/security/top/tlds/test_malicious.py b/tests/api_resources/radar/email/security/top/tlds/test_malicious.py index 79ca8b49bbe..93e3b437867 100644 --- a/tests/api_resources/radar/email/security/top/tlds/test_malicious.py +++ b/tests/api_resources/radar/email/security/top/tlds/test_malicious.py @@ -70,7 +70,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncMalicious: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/email/security/top/tlds/test_spam.py b/tests/api_resources/radar/email/security/top/tlds/test_spam.py index 2e561af84f9..8a7d5759e5b 100644 --- a/tests/api_resources/radar/email/security/top/tlds/test_spam.py +++ b/tests/api_resources/radar/email/security/top/tlds/test_spam.py @@ -70,7 +70,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncSpam: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/email/security/top/tlds/test_spoof.py b/tests/api_resources/radar/email/security/top/tlds/test_spoof.py index c06d638af23..67e3482f7e9 100644 --- a/tests/api_resources/radar/email/security/top/tlds/test_spoof.py +++ b/tests/api_resources/radar/email/security/top/tlds/test_spoof.py @@ -70,7 +70,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncSpoof: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/entities/test_asns.py b/tests/api_resources/radar/entities/test_asns.py index 25c5d7f322b..ad48799698b 100644 --- a/tests/api_resources/radar/entities/test_asns.py +++ b/tests/api_resources/radar/entities/test_asns.py @@ -179,7 +179,9 @@ def test_streaming_response_rel(self, client: Cloudflare) -> None: class TestAsyncASNs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/entities/test_locations.py b/tests/api_resources/radar/entities/test_locations.py index b7fedeea1e4..0e3102f36c1 100644 --- a/tests/api_resources/radar/entities/test_locations.py +++ b/tests/api_resources/radar/entities/test_locations.py @@ -103,7 +103,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLocations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/ases/test_bot_class.py b/tests/api_resources/radar/http/ases/test_bot_class.py index 98df2ef1124..61f93190dc4 100644 --- a/tests/api_resources/radar/http/ases/test_bot_class.py +++ b/tests/api_resources/radar/http/ases/test_bot_class.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncBotClass: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/ases/test_browser_family.py b/tests/api_resources/radar/http/ases/test_browser_family.py index ec95ad11eb3..51f7c3821c5 100644 --- a/tests/api_resources/radar/http/ases/test_browser_family.py +++ b/tests/api_resources/radar/http/ases/test_browser_family.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncBrowserFamily: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/ases/test_device_type.py b/tests/api_resources/radar/http/ases/test_device_type.py index 16f5159f28e..93ea5f0ac2a 100644 --- a/tests/api_resources/radar/http/ases/test_device_type.py +++ b/tests/api_resources/radar/http/ases/test_device_type.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncDeviceType: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/ases/test_http_method.py b/tests/api_resources/radar/http/ases/test_http_method.py index e78240f48d0..c463291a9c6 100644 --- a/tests/api_resources/radar/http/ases/test_http_method.py +++ b/tests/api_resources/radar/http/ases/test_http_method.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncHTTPMethod: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/ases/test_http_protocol.py b/tests/api_resources/radar/http/ases/test_http_protocol.py index ed93997533f..7b20e3f6fd5 100644 --- a/tests/api_resources/radar/http/ases/test_http_protocol.py +++ b/tests/api_resources/radar/http/ases/test_http_protocol.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncHTTPProtocol: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/ases/test_ip_version.py b/tests/api_resources/radar/http/ases/test_ip_version.py index 6852e542ea2..51d29528bcf 100644 --- a/tests/api_resources/radar/http/ases/test_ip_version.py +++ b/tests/api_resources/radar/http/ases/test_ip_version.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncIPVersion: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/ases/test_os.py b/tests/api_resources/radar/http/ases/test_os.py index 6504480d77e..7bdb87ae5e9 100644 --- a/tests/api_resources/radar/http/ases/test_os.py +++ b/tests/api_resources/radar/http/ases/test_os.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncOS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/ases/test_tls_version.py b/tests/api_resources/radar/http/ases/test_tls_version.py index bbd6d24f88d..6e70af951a4 100644 --- a/tests/api_resources/radar/http/ases/test_tls_version.py +++ b/tests/api_resources/radar/http/ases/test_tls_version.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncTLSVersion: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/locations/test_bot_class.py b/tests/api_resources/radar/http/locations/test_bot_class.py index 6dc83153fd2..b798c51d092 100644 --- a/tests/api_resources/radar/http/locations/test_bot_class.py +++ b/tests/api_resources/radar/http/locations/test_bot_class.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncBotClass: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/locations/test_browser_family.py b/tests/api_resources/radar/http/locations/test_browser_family.py index 4f1d0335857..77dc9030920 100644 --- a/tests/api_resources/radar/http/locations/test_browser_family.py +++ b/tests/api_resources/radar/http/locations/test_browser_family.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncBrowserFamily: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/locations/test_device_type.py b/tests/api_resources/radar/http/locations/test_device_type.py index 7d5e60d4bb5..f3716bf62a5 100644 --- a/tests/api_resources/radar/http/locations/test_device_type.py +++ b/tests/api_resources/radar/http/locations/test_device_type.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncDeviceType: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/locations/test_http_method.py b/tests/api_resources/radar/http/locations/test_http_method.py index f38a1e462c2..f50613db2db 100644 --- a/tests/api_resources/radar/http/locations/test_http_method.py +++ b/tests/api_resources/radar/http/locations/test_http_method.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncHTTPMethod: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/locations/test_http_protocol.py b/tests/api_resources/radar/http/locations/test_http_protocol.py index b72c48d133f..f0c76f621a8 100644 --- a/tests/api_resources/radar/http/locations/test_http_protocol.py +++ b/tests/api_resources/radar/http/locations/test_http_protocol.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncHTTPProtocol: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/locations/test_ip_version.py b/tests/api_resources/radar/http/locations/test_ip_version.py index cccb9672906..07cd41a1e61 100644 --- a/tests/api_resources/radar/http/locations/test_ip_version.py +++ b/tests/api_resources/radar/http/locations/test_ip_version.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncIPVersion: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/locations/test_os.py b/tests/api_resources/radar/http/locations/test_os.py index adda371838c..11e69bfc1d4 100644 --- a/tests/api_resources/radar/http/locations/test_os.py +++ b/tests/api_resources/radar/http/locations/test_os.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncOS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/locations/test_tls_version.py b/tests/api_resources/radar/http/locations/test_tls_version.py index d44cf7872ee..3bcfe4bc5f8 100644 --- a/tests/api_resources/radar/http/locations/test_tls_version.py +++ b/tests/api_resources/radar/http/locations/test_tls_version.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncTLSVersion: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/test_ases.py b/tests/api_resources/radar/http/test_ases.py index 9413713558b..ca39e93f26c 100644 --- a/tests/api_resources/radar/http/test_ases.py +++ b/tests/api_resources/radar/http/test_ases.py @@ -68,7 +68,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncAses: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/test_locations.py b/tests/api_resources/radar/http/test_locations.py index a4bd04bb8cd..7b5c37939b5 100644 --- a/tests/api_resources/radar/http/test_locations.py +++ b/tests/api_resources/radar/http/test_locations.py @@ -68,7 +68,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncLocations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/test_summary.py b/tests/api_resources/radar/http/test_summary.py index 5340efc6361..ecc5266ebd0 100644 --- a/tests/api_resources/radar/http/test_summary.py +++ b/tests/api_resources/radar/http/test_summary.py @@ -398,7 +398,9 @@ def test_streaming_response_tls_version(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_bot_class(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/test_timeseries_groups.py b/tests/api_resources/radar/http/test_timeseries_groups.py index a6c02e58a2a..0fe58aff435 100644 --- a/tests/api_resources/radar/http/test_timeseries_groups.py +++ b/tests/api_resources/radar/http/test_timeseries_groups.py @@ -505,7 +505,9 @@ def test_streaming_response_tls_version(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_bot_class(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/test_top.py b/tests/api_resources/radar/http/test_top.py index ebfce964cf3..573ebe4d676 100644 --- a/tests/api_resources/radar/http/test_top.py +++ b/tests/api_resources/radar/http/test_top.py @@ -118,7 +118,9 @@ def test_streaming_response_browser_family(self, client: Cloudflare) -> None: class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_browser(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/leaked_credentials/test_summary.py b/tests/api_resources/radar/leaked_credentials/test_summary.py index 7e877b54281..243ea3d92cb 100644 --- a/tests/api_resources/radar/leaked_credentials/test_summary.py +++ b/tests/api_resources/radar/leaked_credentials/test_summary.py @@ -97,7 +97,9 @@ def test_streaming_response_compromised(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_bot_class(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/leaked_credentials/test_timeseries_groups.py b/tests/api_resources/radar/leaked_credentials/test_timeseries_groups.py index a9027283c8e..723333f641e 100644 --- a/tests/api_resources/radar/leaked_credentials/test_timeseries_groups.py +++ b/tests/api_resources/radar/leaked_credentials/test_timeseries_groups.py @@ -99,7 +99,9 @@ def test_streaming_response_compromised(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_bot_class(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/netflows/test_top.py b/tests/api_resources/radar/netflows/test_top.py index 9dc8315bdcb..c4256286fe9 100644 --- a/tests/api_resources/radar/netflows/test_top.py +++ b/tests/api_resources/radar/netflows/test_top.py @@ -100,7 +100,9 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None: class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_ases(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/quality/speed/test_top.py b/tests/api_resources/radar/quality/speed/test_top.py index 5e8c6d353f7..32f88ff2f33 100644 --- a/tests/api_resources/radar/quality/speed/test_top.py +++ b/tests/api_resources/radar/quality/speed/test_top.py @@ -103,7 +103,9 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None: class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_ases(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/quality/test_iqi.py b/tests/api_resources/radar/quality/test_iqi.py index 40084c8bff3..3d337273df4 100644 --- a/tests/api_resources/radar/quality/test_iqi.py +++ b/tests/api_resources/radar/quality/test_iqi.py @@ -117,7 +117,9 @@ def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None: class TestAsyncIQI: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_summary(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/quality/test_speed.py b/tests/api_resources/radar/quality/test_speed.py index 235910fd4e7..73ae0a7e430 100644 --- a/tests/api_resources/radar/quality/test_speed.py +++ b/tests/api_resources/radar/quality/test_speed.py @@ -99,7 +99,9 @@ def test_streaming_response_summary(self, client: Cloudflare) -> None: class TestAsyncSpeed: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_histogram(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/ranking/test_domain.py b/tests/api_resources/radar/ranking/test_domain.py index 553229c8e89..79accf46b76 100644 --- a/tests/api_resources/radar/ranking/test_domain.py +++ b/tests/api_resources/radar/ranking/test_domain.py @@ -71,7 +71,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomain: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/ranking/test_internet_services.py b/tests/api_resources/radar/ranking/test_internet_services.py index 77fbb715bb4..4e510fcecf8 100644 --- a/tests/api_resources/radar/ranking/test_internet_services.py +++ b/tests/api_resources/radar/ranking/test_internet_services.py @@ -133,7 +133,9 @@ def test_streaming_response_top(self, client: Cloudflare) -> None: class TestAsyncInternetServices: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_categories(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/robots_txt/test_top.py b/tests/api_resources/radar/robots_txt/test_top.py index e0cc7628659..5d14405e273 100644 --- a/tests/api_resources/radar/robots_txt/test_top.py +++ b/tests/api_resources/radar/robots_txt/test_top.py @@ -56,7 +56,9 @@ def test_streaming_response_domain_categories(self, client: Cloudflare) -> None: class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_domain_categories(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/robots_txt/top/test_user_agents.py b/tests/api_resources/radar/robots_txt/top/test_user_agents.py index ac2435dba6d..989bf17da17 100644 --- a/tests/api_resources/radar/robots_txt/top/test_user_agents.py +++ b/tests/api_resources/radar/robots_txt/top/test_user_agents.py @@ -58,7 +58,9 @@ def test_streaming_response_directive(self, client: Cloudflare) -> None: class TestAsyncUserAgents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_directive(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_annotations.py b/tests/api_resources/radar/test_annotations.py index 03a7ee5c795..84f528b38ba 100644 --- a/tests/api_resources/radar/test_annotations.py +++ b/tests/api_resources/radar/test_annotations.py @@ -59,7 +59,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncAnnotations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_as112.py b/tests/api_resources/radar/test_as112.py index 98525d4fe89..6b01e5d588f 100644 --- a/tests/api_resources/radar/test_as112.py +++ b/tests/api_resources/radar/test_as112.py @@ -62,7 +62,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncAS112: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_bgp.py b/tests/api_resources/radar/test_bgp.py index 4888918b441..62a7dc325f8 100644 --- a/tests/api_resources/radar/test_bgp.py +++ b/tests/api_resources/radar/test_bgp.py @@ -60,7 +60,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncBGP: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_bots.py b/tests/api_resources/radar/test_bots.py new file mode 100644 index 00000000000..dfddc19bd0b --- /dev/null +++ b/tests/api_resources/radar/test_bots.py @@ -0,0 +1,491 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type +from cloudflare._utils import parse_datetime +from cloudflare.types.radar import ( + BotGetResponse, + BotListResponse, + BotSummaryResponse, + BotTimeseriesResponse, + BotTimeseriesGroupsResponse, +) + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestBots: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_list(self, client: Cloudflare) -> None: + bot = client.radar.bots.list() + assert_matches_type(BotListResponse, bot, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Cloudflare) -> None: + bot = client.radar.bots.list( + bot_category="SEARCH_ENGINE_CRAWLER", + bot_operator="botOperator", + bot_verification_status="VERIFIED", + format="JSON", + limit=5, + offset=0, + ) + assert_matches_type(BotListResponse, bot, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Cloudflare) -> None: + response = client.radar.bots.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = response.parse() + assert_matches_type(BotListResponse, bot, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Cloudflare) -> None: + with client.radar.bots.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = response.parse() + assert_matches_type(BotListResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + bot = client.radar.bots.get( + bot_slug="gptbot", + ) + assert_matches_type(BotGetResponse, bot, path=["response"]) + + @parametrize + def test_method_get_with_all_params(self, client: Cloudflare) -> None: + bot = client.radar.bots.get( + bot_slug="gptbot", + format="JSON", + ) + assert_matches_type(BotGetResponse, bot, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + response = client.radar.bots.with_raw_response.get( + bot_slug="gptbot", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = response.parse() + assert_matches_type(BotGetResponse, bot, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.radar.bots.with_streaming_response.get( + bot_slug="gptbot", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = response.parse() + assert_matches_type(BotGetResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `bot_slug` but received ''"): + client.radar.bots.with_raw_response.get( + bot_slug="", + ) + + @parametrize + def test_method_summary(self, client: Cloudflare) -> None: + bot = client.radar.bots.summary( + dimension="BOT", + ) + assert_matches_type(BotSummaryResponse, bot, path=["response"]) + + @parametrize + def test_method_summary_with_all_params(self, client: Cloudflare) -> None: + bot = client.radar.bots.summary( + dimension="BOT", + asn=["string"], + bot=["string"], + bot_category=["SEARCH_ENGINE_CRAWLER"], + bot_operator=["string"], + bot_verification_status=["VERIFIED"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit_per_group=10, + location=["string"], + name=["main_series"], + ) + assert_matches_type(BotSummaryResponse, bot, path=["response"]) + + @parametrize + def test_raw_response_summary(self, client: Cloudflare) -> None: + response = client.radar.bots.with_raw_response.summary( + dimension="BOT", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = response.parse() + assert_matches_type(BotSummaryResponse, bot, path=["response"]) + + @parametrize + def test_streaming_response_summary(self, client: Cloudflare) -> None: + with client.radar.bots.with_streaming_response.summary( + dimension="BOT", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = response.parse() + assert_matches_type(BotSummaryResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_timeseries(self, client: Cloudflare) -> None: + bot = client.radar.bots.timeseries() + assert_matches_type(BotTimeseriesResponse, bot, path=["response"]) + + @parametrize + def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: + bot = client.radar.bots.timeseries( + agg_interval="1h", + asn=["string"], + bot=["string"], + bot_category=["SEARCH_ENGINE_CRAWLER"], + bot_operator=["string"], + bot_verification_status=["VERIFIED"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + location=["string"], + name=["main_series"], + ) + assert_matches_type(BotTimeseriesResponse, bot, path=["response"]) + + @parametrize + def test_raw_response_timeseries(self, client: Cloudflare) -> None: + response = client.radar.bots.with_raw_response.timeseries() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = response.parse() + assert_matches_type(BotTimeseriesResponse, bot, path=["response"]) + + @parametrize + def test_streaming_response_timeseries(self, client: Cloudflare) -> None: + with client.radar.bots.with_streaming_response.timeseries() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = response.parse() + assert_matches_type(BotTimeseriesResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_timeseries_groups(self, client: Cloudflare) -> None: + bot = client.radar.bots.timeseries_groups( + dimension="BOT", + ) + assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"]) + + @parametrize + def test_method_timeseries_groups_with_all_params(self, client: Cloudflare) -> None: + bot = client.radar.bots.timeseries_groups( + dimension="BOT", + agg_interval="1h", + asn=["string"], + bot=["string"], + bot_category=["SEARCH_ENGINE_CRAWLER"], + bot_operator=["string"], + bot_verification_status=["VERIFIED"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit_per_group=10, + location=["string"], + name=["main_series"], + ) + assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"]) + + @parametrize + def test_raw_response_timeseries_groups(self, client: Cloudflare) -> None: + response = client.radar.bots.with_raw_response.timeseries_groups( + dimension="BOT", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = response.parse() + assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"]) + + @parametrize + def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None: + with client.radar.bots.with_streaming_response.timeseries_groups( + dimension="BOT", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = response.parse() + assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncBots: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @parametrize + async def test_method_list(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.list() + assert_matches_type(BotListResponse, bot, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.list( + bot_category="SEARCH_ENGINE_CRAWLER", + bot_operator="botOperator", + bot_verification_status="VERIFIED", + format="JSON", + limit=5, + offset=0, + ) + assert_matches_type(BotListResponse, bot, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: + response = await async_client.radar.bots.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = await response.parse() + assert_matches_type(BotListResponse, bot, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: + async with async_client.radar.bots.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = await response.parse() + assert_matches_type(BotListResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.get( + bot_slug="gptbot", + ) + assert_matches_type(BotGetResponse, bot, path=["response"]) + + @parametrize + async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.get( + bot_slug="gptbot", + format="JSON", + ) + assert_matches_type(BotGetResponse, bot, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.radar.bots.with_raw_response.get( + bot_slug="gptbot", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = await response.parse() + assert_matches_type(BotGetResponse, bot, path=["response"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.radar.bots.with_streaming_response.get( + bot_slug="gptbot", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = await response.parse() + assert_matches_type(BotGetResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `bot_slug` but received ''"): + await async_client.radar.bots.with_raw_response.get( + bot_slug="", + ) + + @parametrize + async def test_method_summary(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.summary( + dimension="BOT", + ) + assert_matches_type(BotSummaryResponse, bot, path=["response"]) + + @parametrize + async def test_method_summary_with_all_params(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.summary( + dimension="BOT", + asn=["string"], + bot=["string"], + bot_category=["SEARCH_ENGINE_CRAWLER"], + bot_operator=["string"], + bot_verification_status=["VERIFIED"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit_per_group=10, + location=["string"], + name=["main_series"], + ) + assert_matches_type(BotSummaryResponse, bot, path=["response"]) + + @parametrize + async def test_raw_response_summary(self, async_client: AsyncCloudflare) -> None: + response = await async_client.radar.bots.with_raw_response.summary( + dimension="BOT", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = await response.parse() + assert_matches_type(BotSummaryResponse, bot, path=["response"]) + + @parametrize + async def test_streaming_response_summary(self, async_client: AsyncCloudflare) -> None: + async with async_client.radar.bots.with_streaming_response.summary( + dimension="BOT", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = await response.parse() + assert_matches_type(BotSummaryResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.timeseries() + assert_matches_type(BotTimeseriesResponse, bot, path=["response"]) + + @parametrize + async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.timeseries( + agg_interval="1h", + asn=["string"], + bot=["string"], + bot_category=["SEARCH_ENGINE_CRAWLER"], + bot_operator=["string"], + bot_verification_status=["VERIFIED"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + location=["string"], + name=["main_series"], + ) + assert_matches_type(BotTimeseriesResponse, bot, path=["response"]) + + @parametrize + async def test_raw_response_timeseries(self, async_client: AsyncCloudflare) -> None: + response = await async_client.radar.bots.with_raw_response.timeseries() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = await response.parse() + assert_matches_type(BotTimeseriesResponse, bot, path=["response"]) + + @parametrize + async def test_streaming_response_timeseries(self, async_client: AsyncCloudflare) -> None: + async with async_client.radar.bots.with_streaming_response.timeseries() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = await response.parse() + assert_matches_type(BotTimeseriesResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_timeseries_groups(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.timeseries_groups( + dimension="BOT", + ) + assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"]) + + @parametrize + async def test_method_timeseries_groups_with_all_params(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.timeseries_groups( + dimension="BOT", + agg_interval="1h", + asn=["string"], + bot=["string"], + bot_category=["SEARCH_ENGINE_CRAWLER"], + bot_operator=["string"], + bot_verification_status=["VERIFIED"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit_per_group=10, + location=["string"], + name=["main_series"], + ) + assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"]) + + @parametrize + async def test_raw_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None: + response = await async_client.radar.bots.with_raw_response.timeseries_groups( + dimension="BOT", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = await response.parse() + assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"]) + + @parametrize + async def test_streaming_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None: + async with async_client.radar.bots.with_streaming_response.timeseries_groups( + dimension="BOT", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = await response.parse() + assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/radar/test_datasets.py b/tests/api_resources/radar/test_datasets.py index e9e8d057314..fbb7e5b4b7a 100644 --- a/tests/api_resources/radar/test_datasets.py +++ b/tests/api_resources/radar/test_datasets.py @@ -136,7 +136,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDatasets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_dns.py b/tests/api_resources/radar/test_dns.py index 0f507565f30..2bbcc22b504 100644 --- a/tests/api_resources/radar/test_dns.py +++ b/tests/api_resources/radar/test_dns.py @@ -65,7 +65,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncDNS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_entities.py b/tests/api_resources/radar/test_entities.py index a9a5a170bf0..9c3d1f16731 100644 --- a/tests/api_resources/radar/test_entities.py +++ b/tests/api_resources/radar/test_entities.py @@ -58,7 +58,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncEntities: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_http.py b/tests/api_resources/radar/test_http.py index 7187de25759..6f6730baacc 100644 --- a/tests/api_resources/radar/test_http.py +++ b/tests/api_resources/radar/test_http.py @@ -69,7 +69,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncHTTP: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_netflows.py b/tests/api_resources/radar/test_netflows.py index 66ccf93f556..73d50ce90ad 100644 --- a/tests/api_resources/radar/test_netflows.py +++ b/tests/api_resources/radar/test_netflows.py @@ -104,7 +104,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncNetflows: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_summary(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_ranking.py b/tests/api_resources/radar/test_ranking.py index 9ea16b2ce33..727d90a1879 100644 --- a/tests/api_resources/radar/test_ranking.py +++ b/tests/api_resources/radar/test_ranking.py @@ -102,7 +102,9 @@ def test_streaming_response_top(self, client: Cloudflare) -> None: class TestAsyncRanking: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_timeseries_groups(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_search.py b/tests/api_resources/radar/test_search.py index a0d51854976..2e313ae7af0 100644 --- a/tests/api_resources/radar/test_search.py +++ b/tests/api_resources/radar/test_search.py @@ -62,7 +62,9 @@ def test_streaming_response_global(self, client: Cloudflare) -> None: class TestAsyncSearch: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_global(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_tcp_resets_timeouts.py b/tests/api_resources/radar/test_tcp_resets_timeouts.py index ad009f54168..3ea655e3b91 100644 --- a/tests/api_resources/radar/test_tcp_resets_timeouts.py +++ b/tests/api_resources/radar/test_tcp_resets_timeouts.py @@ -102,7 +102,9 @@ def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None: class TestAsyncTCPResetsTimeouts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_summary(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_traffic_anomalies.py b/tests/api_resources/radar/test_traffic_anomalies.py index 7e92c76fe39..34ff87eb8bb 100644 --- a/tests/api_resources/radar/test_traffic_anomalies.py +++ b/tests/api_resources/radar/test_traffic_anomalies.py @@ -60,7 +60,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncTrafficAnomalies: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/traffic_anomalies/test_locations.py b/tests/api_resources/radar/traffic_anomalies/test_locations.py index 005738ac3e2..cb56dcdd238 100644 --- a/tests/api_resources/radar/traffic_anomalies/test_locations.py +++ b/tests/api_resources/radar/traffic_anomalies/test_locations.py @@ -57,7 +57,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncLocations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/verified_bots/test_top.py b/tests/api_resources/radar/verified_bots/test_top.py index 888fe79936c..2a1576beb5a 100644 --- a/tests/api_resources/radar/verified_bots/test_top.py +++ b/tests/api_resources/radar/verified_bots/test_top.py @@ -15,6 +15,8 @@ TopCategoriesResponse, ) +# pyright: reportDeprecated=false + base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,27 +25,32 @@ class TestTop: @parametrize def test_method_bots(self, client: Cloudflare) -> None: - top = client.radar.verified_bots.top.bots() + with pytest.warns(DeprecationWarning): + top = client.radar.verified_bots.top.bots() + assert_matches_type(TopBotsResponse, top, path=["response"]) @parametrize def test_method_bots_with_all_params(self, client: Cloudflare) -> None: - top = client.radar.verified_bots.top.bots( - asn=["string"], - continent=["string"], - date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], - date_range=["7d"], - date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], - format="JSON", - limit=5, - location=["string"], - name=["main_series"], - ) + with pytest.warns(DeprecationWarning): + top = client.radar.verified_bots.top.bots( + asn=["string"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit=5, + location=["string"], + name=["main_series"], + ) + assert_matches_type(TopBotsResponse, top, path=["response"]) @parametrize def test_raw_response_bots(self, client: Cloudflare) -> None: - response = client.radar.verified_bots.top.with_raw_response.bots() + with pytest.warns(DeprecationWarning): + response = client.radar.verified_bots.top.with_raw_response.bots() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -52,38 +59,44 @@ def test_raw_response_bots(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_bots(self, client: Cloudflare) -> None: - with client.radar.verified_bots.top.with_streaming_response.bots() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + with client.radar.verified_bots.top.with_streaming_response.bots() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - top = response.parse() - assert_matches_type(TopBotsResponse, top, path=["response"]) + top = response.parse() + assert_matches_type(TopBotsResponse, top, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_method_categories(self, client: Cloudflare) -> None: - top = client.radar.verified_bots.top.categories() + with pytest.warns(DeprecationWarning): + top = client.radar.verified_bots.top.categories() + assert_matches_type(TopCategoriesResponse, top, path=["response"]) @parametrize def test_method_categories_with_all_params(self, client: Cloudflare) -> None: - top = client.radar.verified_bots.top.categories( - asn=["string"], - continent=["string"], - date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], - date_range=["7d"], - date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], - format="JSON", - limit=5, - location=["string"], - name=["main_series"], - ) + with pytest.warns(DeprecationWarning): + top = client.radar.verified_bots.top.categories( + asn=["string"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit=5, + location=["string"], + name=["main_series"], + ) + assert_matches_type(TopCategoriesResponse, top, path=["response"]) @parametrize def test_raw_response_categories(self, client: Cloudflare) -> None: - response = client.radar.verified_bots.top.with_raw_response.categories() + with pytest.warns(DeprecationWarning): + response = client.radar.verified_bots.top.with_raw_response.categories() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -92,42 +105,50 @@ def test_raw_response_categories(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_categories(self, client: Cloudflare) -> None: - with client.radar.verified_bots.top.with_streaming_response.categories() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + with client.radar.verified_bots.top.with_streaming_response.categories() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - top = response.parse() - assert_matches_type(TopCategoriesResponse, top, path=["response"]) + top = response.parse() + assert_matches_type(TopCategoriesResponse, top, path=["response"]) assert cast(Any, response.is_closed) is True class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_bots(self, async_client: AsyncCloudflare) -> None: - top = await async_client.radar.verified_bots.top.bots() + with pytest.warns(DeprecationWarning): + top = await async_client.radar.verified_bots.top.bots() + assert_matches_type(TopBotsResponse, top, path=["response"]) @parametrize async def test_method_bots_with_all_params(self, async_client: AsyncCloudflare) -> None: - top = await async_client.radar.verified_bots.top.bots( - asn=["string"], - continent=["string"], - date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], - date_range=["7d"], - date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], - format="JSON", - limit=5, - location=["string"], - name=["main_series"], - ) + with pytest.warns(DeprecationWarning): + top = await async_client.radar.verified_bots.top.bots( + asn=["string"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit=5, + location=["string"], + name=["main_series"], + ) + assert_matches_type(TopBotsResponse, top, path=["response"]) @parametrize async def test_raw_response_bots(self, async_client: AsyncCloudflare) -> None: - response = await async_client.radar.verified_bots.top.with_raw_response.bots() + with pytest.warns(DeprecationWarning): + response = await async_client.radar.verified_bots.top.with_raw_response.bots() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -136,38 +157,44 @@ async def test_raw_response_bots(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_bots(self, async_client: AsyncCloudflare) -> None: - async with async_client.radar.verified_bots.top.with_streaming_response.bots() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + async with async_client.radar.verified_bots.top.with_streaming_response.bots() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - top = await response.parse() - assert_matches_type(TopBotsResponse, top, path=["response"]) + top = await response.parse() + assert_matches_type(TopBotsResponse, top, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_method_categories(self, async_client: AsyncCloudflare) -> None: - top = await async_client.radar.verified_bots.top.categories() + with pytest.warns(DeprecationWarning): + top = await async_client.radar.verified_bots.top.categories() + assert_matches_type(TopCategoriesResponse, top, path=["response"]) @parametrize async def test_method_categories_with_all_params(self, async_client: AsyncCloudflare) -> None: - top = await async_client.radar.verified_bots.top.categories( - asn=["string"], - continent=["string"], - date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], - date_range=["7d"], - date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], - format="JSON", - limit=5, - location=["string"], - name=["main_series"], - ) + with pytest.warns(DeprecationWarning): + top = await async_client.radar.verified_bots.top.categories( + asn=["string"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit=5, + location=["string"], + name=["main_series"], + ) + assert_matches_type(TopCategoriesResponse, top, path=["response"]) @parametrize async def test_raw_response_categories(self, async_client: AsyncCloudflare) -> None: - response = await async_client.radar.verified_bots.top.with_raw_response.categories() + with pytest.warns(DeprecationWarning): + response = await async_client.radar.verified_bots.top.with_raw_response.categories() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -176,11 +203,12 @@ async def test_raw_response_categories(self, async_client: AsyncCloudflare) -> N @parametrize async def test_streaming_response_categories(self, async_client: AsyncCloudflare) -> None: - async with async_client.radar.verified_bots.top.with_streaming_response.categories() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + async with async_client.radar.verified_bots.top.with_streaming_response.categories() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - top = await response.parse() - assert_matches_type(TopCategoriesResponse, top, path=["response"]) + top = await response.parse() + assert_matches_type(TopCategoriesResponse, top, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/registrar/test_domains.py b/tests/api_resources/registrar/test_domains.py index ebd7b48b403..672117b33bb 100644 --- a/tests/api_resources/registrar/test_domains.py +++ b/tests/api_resources/registrar/test_domains.py @@ -165,7 +165,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomains: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/request_tracers/test_traces.py b/tests/api_resources/request_tracers/test_traces.py index 92147ae93ba..73c32b2424d 100644 --- a/tests/api_resources/request_tracers/test_traces.py +++ b/tests/api_resources/request_tracers/test_traces.py @@ -106,7 +106,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncTraces: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/resource_sharing/test_recipients.py b/tests/api_resources/resource_sharing/test_recipients.py index 4da13a844a5..48922ac03ca 100644 --- a/tests/api_resources/resource_sharing/test_recipients.py +++ b/tests/api_resources/resource_sharing/test_recipients.py @@ -261,7 +261,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRecipients: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/resource_sharing/test_resources.py b/tests/api_resources/resource_sharing/test_resources.py index 967e5dcbfca..36adaec0d62 100644 --- a/tests/api_resources/resource_sharing/test_resources.py +++ b/tests/api_resources/resource_sharing/test_resources.py @@ -340,7 +340,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncResources: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/rules/lists/test_bulk_operations.py b/tests/api_resources/rules/lists/test_bulk_operations.py index da64194e2e9..da56522a4bf 100644 --- a/tests/api_resources/rules/lists/test_bulk_operations.py +++ b/tests/api_resources/rules/lists/test_bulk_operations.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBulkOperations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/rules/lists/test_items.py b/tests/api_resources/rules/lists/test_items.py index 91e4dc0c2f5..ba87c4bcda4 100644 --- a/tests/api_resources/rules/lists/test_items.py +++ b/tests/api_resources/rules/lists/test_items.py @@ -298,7 +298,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncItems: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/rules/test_lists.py b/tests/api_resources/rules/test_lists.py index c08bd6dac16..ac12105216b 100644 --- a/tests/api_resources/rules/test_lists.py +++ b/tests/api_resources/rules/test_lists.py @@ -286,7 +286,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLists: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/rulesets/phases/test_versions.py b/tests/api_resources/rulesets/phases/test_versions.py index 6b0858b12c5..002f11ccc12 100644 --- a/tests/api_resources/rulesets/phases/test_versions.py +++ b/tests/api_resources/rulesets/phases/test_versions.py @@ -155,7 +155,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVersions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/rulesets/test_phases.py b/tests/api_resources/rulesets/test_phases.py index 4a4de40bd3e..612a2ecec3f 100644 --- a/tests/api_resources/rulesets/test_phases.py +++ b/tests/api_resources/rulesets/test_phases.py @@ -175,7 +175,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPhases: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/rulesets/test_rules.py b/tests/api_resources/rulesets/test_rules.py index d37e672d13d..3c990cb972c 100644 --- a/tests/api_resources/rulesets/test_rules.py +++ b/tests/api_resources/rulesets/test_rules.py @@ -3918,7 +3918,9 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/rulesets/test_versions.py b/tests/api_resources/rulesets/test_versions.py index 620e4992e4d..21b8ef98db7 100644 --- a/tests/api_resources/rulesets/test_versions.py +++ b/tests/api_resources/rulesets/test_versions.py @@ -249,7 +249,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVersions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/rum/test_rules.py b/tests/api_resources/rum/test_rules.py index 5ab034386be..6f8dce9a875 100644 --- a/tests/api_resources/rum/test_rules.py +++ b/tests/api_resources/rum/test_rules.py @@ -331,7 +331,9 @@ def test_path_params_bulk_create(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/rum/test_site_info.py b/tests/api_resources/rum/test_site_info.py index 0762f7dfd57..279dc7b73dd 100644 --- a/tests/api_resources/rum/test_site_info.py +++ b/tests/api_resources/rum/test_site_info.py @@ -276,7 +276,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSiteInfo: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/schema_validation/settings/test_operations.py b/tests/api_resources/schema_validation/settings/test_operations.py index f6852ed6e79..6e05e58155a 100644 --- a/tests/api_resources/schema_validation/settings/test_operations.py +++ b/tests/api_resources/schema_validation/settings/test_operations.py @@ -276,7 +276,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOperations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/schema_validation/test_schemas.py b/tests/api_resources/schema_validation/test_schemas.py index 14b2e9dcc9b..057c751492b 100644 --- a/tests/api_resources/schema_validation/test_schemas.py +++ b/tests/api_resources/schema_validation/test_schemas.py @@ -291,7 +291,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSchemas: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/schema_validation/test_settings.py b/tests/api_resources/schema_validation/test_settings.py index 103f160ac31..68752e94f3d 100644 --- a/tests/api_resources/schema_validation/test_settings.py +++ b/tests/api_resources/schema_validation/test_settings.py @@ -159,7 +159,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/secrets_store/stores/test_secrets.py b/tests/api_resources/secrets_store/stores/test_secrets.py index 21904623076..44f47d80bb5 100644 --- a/tests/api_resources/secrets_store/stores/test_secrets.py +++ b/tests/api_resources/secrets_store/stores/test_secrets.py @@ -488,7 +488,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSecrets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/secrets_store/test_quota.py b/tests/api_resources/secrets_store/test_quota.py index 90e87c12a44..d74f03ae049 100644 --- a/tests/api_resources/secrets_store/test_quota.py +++ b/tests/api_resources/secrets_store/test_quota.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncQuota: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/secrets_store/test_stores.py b/tests/api_resources/secrets_store/test_stores.py index 96211f2286b..68fb500fd5e 100644 --- a/tests/api_resources/secrets_store/test_stores.py +++ b/tests/api_resources/secrets_store/test_stores.py @@ -163,7 +163,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncStores: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/security_center/insights/test_class_.py b/tests/api_resources/security_center/insights/test_class_.py index 3ec1f252d86..0609b2be126 100644 --- a/tests/api_resources/security_center/insights/test_class_.py +++ b/tests/api_resources/security_center/insights/test_class_.py @@ -85,7 +85,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncClass: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize diff --git a/tests/api_resources/security_center/insights/test_severity.py b/tests/api_resources/security_center/insights/test_severity.py index ddc6e8dd62b..589dd72a083 100644 --- a/tests/api_resources/security_center/insights/test_severity.py +++ b/tests/api_resources/security_center/insights/test_severity.py @@ -85,7 +85,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSeverity: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize diff --git a/tests/api_resources/security_center/insights/test_type.py b/tests/api_resources/security_center/insights/test_type.py index a2c3da3604c..e9ae172ed08 100644 --- a/tests/api_resources/security_center/insights/test_type.py +++ b/tests/api_resources/security_center/insights/test_type.py @@ -85,7 +85,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncType: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize diff --git a/tests/api_resources/security_center/test_insights.py b/tests/api_resources/security_center/test_insights.py index c4776444b97..4c92fe945f9 100644 --- a/tests/api_resources/security_center/test_insights.py +++ b/tests/api_resources/security_center/test_insights.py @@ -159,7 +159,9 @@ def test_path_params_dismiss(self, client: Cloudflare) -> None: class TestAsyncInsights: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize diff --git a/tests/api_resources/snippets/test_content.py b/tests/api_resources/snippets/test_content.py index 371c111994b..163b3683f2b 100644 --- a/tests/api_resources/snippets/test_content.py +++ b/tests/api_resources/snippets/test_content.py @@ -95,7 +95,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncContent: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="throwing HTTP 415") @parametrize diff --git a/tests/api_resources/snippets/test_rules.py b/tests/api_resources/snippets/test_rules.py index 53816f2070b..46a3e6bb37f 100644 --- a/tests/api_resources/snippets/test_rules.py +++ b/tests/api_resources/snippets/test_rules.py @@ -149,7 +149,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/spectrum/analytics/aggregates/test_currents.py b/tests/api_resources/spectrum/analytics/aggregates/test_currents.py index 8d60f728d26..e5734e2287b 100644 --- a/tests/api_resources/spectrum/analytics/aggregates/test_currents.py +++ b/tests/api_resources/spectrum/analytics/aggregates/test_currents.py @@ -66,7 +66,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCurrents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/spectrum/analytics/events/test_bytimes.py b/tests/api_resources/spectrum/analytics/events/test_bytimes.py index bf5b7ef66b8..0699c930575 100644 --- a/tests/api_resources/spectrum/analytics/events/test_bytimes.py +++ b/tests/api_resources/spectrum/analytics/events/test_bytimes.py @@ -76,7 +76,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBytimes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/spectrum/analytics/events/test_summaries.py b/tests/api_resources/spectrum/analytics/events/test_summaries.py index ee8b78cd589..bf892c8df62 100644 --- a/tests/api_resources/spectrum/analytics/events/test_summaries.py +++ b/tests/api_resources/spectrum/analytics/events/test_summaries.py @@ -71,7 +71,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSummaries: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/spectrum/test_apps.py b/tests/api_resources/spectrum/test_apps.py index 1ed83c2f50f..27bdcdfcc59 100644 --- a/tests/api_resources/spectrum/test_apps.py +++ b/tests/api_resources/spectrum/test_apps.py @@ -524,7 +524,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncApps: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize diff --git a/tests/api_resources/speed/pages/test_tests.py b/tests/api_resources/speed/pages/test_tests.py index a97a4b14f52..148d3b0c93d 100644 --- a/tests/api_resources/speed/pages/test_tests.py +++ b/tests/api_resources/speed/pages/test_tests.py @@ -256,7 +256,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/speed/test_availabilities.py b/tests/api_resources/speed/test_availabilities.py index 59d87a22852..8f2e328affd 100644 --- a/tests/api_resources/speed/test_availabilities.py +++ b/tests/api_resources/speed/test_availabilities.py @@ -57,7 +57,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAvailabilities: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/speed/test_pages.py b/tests/api_resources/speed/test_pages.py index 611a73ec015..a14bcb31c8b 100644 --- a/tests/api_resources/speed/test_pages.py +++ b/tests/api_resources/speed/test_pages.py @@ -151,7 +151,9 @@ def test_path_params_trend(self, client: Cloudflare) -> None: class TestAsyncPages: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/speed/test_schedule.py b/tests/api_resources/speed/test_schedule.py index e3e05e0ed53..96eab910c45 100644 --- a/tests/api_resources/speed/test_schedule.py +++ b/tests/api_resources/speed/test_schedule.py @@ -194,7 +194,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSchedule: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ssl/certificate_packs/test_quota.py b/tests/api_resources/ssl/certificate_packs/test_quota.py index 0181a4d9e7d..2c665c9237e 100644 --- a/tests/api_resources/ssl/certificate_packs/test_quota.py +++ b/tests/api_resources/ssl/certificate_packs/test_quota.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncQuota: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ssl/test_analyze.py b/tests/api_resources/ssl/test_analyze.py index 3a1e6c43744..cd0a9100b67 100644 --- a/tests/api_resources/ssl/test_analyze.py +++ b/tests/api_resources/ssl/test_analyze.py @@ -65,7 +65,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncAnalyze: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ssl/test_certificate_packs.py b/tests/api_resources/ssl/test_certificate_packs.py index 6c118f8d63c..0ea985fb443 100644 --- a/tests/api_resources/ssl/test_certificate_packs.py +++ b/tests/api_resources/ssl/test_certificate_packs.py @@ -294,7 +294,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCertificatePacks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ssl/test_recommendations.py b/tests/api_resources/ssl/test_recommendations.py index 49520ba3738..3f6abca8c59 100644 --- a/tests/api_resources/ssl/test_recommendations.py +++ b/tests/api_resources/ssl/test_recommendations.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRecommendations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ssl/test_verification.py b/tests/api_resources/ssl/test_verification.py index 4d6460a428d..73b42e44599 100644 --- a/tests/api_resources/ssl/test_verification.py +++ b/tests/api_resources/ssl/test_verification.py @@ -121,7 +121,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVerification: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ssl/universal/test_settings.py b/tests/api_resources/ssl/universal/test_settings.py index a6040dd1411..425b2528f38 100644 --- a/tests/api_resources/ssl/universal/test_settings.py +++ b/tests/api_resources/ssl/universal/test_settings.py @@ -103,7 +103,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/captions/language/test_vtt.py b/tests/api_resources/stream/captions/language/test_vtt.py index c3e6421643b..e70b277d2e2 100644 --- a/tests/api_resources/stream/captions/language/test_vtt.py +++ b/tests/api_resources/stream/captions/language/test_vtt.py @@ -78,7 +78,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVtt: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/captions/test_language.py b/tests/api_resources/stream/captions/test_language.py index 0fe61c3cb38..133fafb0f57 100644 --- a/tests/api_resources/stream/captions/test_language.py +++ b/tests/api_resources/stream/captions/test_language.py @@ -269,7 +269,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLanguage: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/live_inputs/test_outputs.py b/tests/api_resources/stream/live_inputs/test_outputs.py index d1041731a3f..e4aeed86843 100644 --- a/tests/api_resources/stream/live_inputs/test_outputs.py +++ b/tests/api_resources/stream/live_inputs/test_outputs.py @@ -263,7 +263,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncOutputs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_audio_tracks.py b/tests/api_resources/stream/test_audio_tracks.py index bf7462cf829..243129a8296 100644 --- a/tests/api_resources/stream/test_audio_tracks.py +++ b/tests/api_resources/stream/test_audio_tracks.py @@ -262,7 +262,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAudioTracks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_captions.py b/tests/api_resources/stream/test_captions.py index 89847fcdd1a..e39009815b6 100644 --- a/tests/api_resources/stream/test_captions.py +++ b/tests/api_resources/stream/test_captions.py @@ -68,7 +68,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCaptions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_clip.py b/tests/api_resources/stream/test_clip.py index c0806600820..7c6b2a2bf25 100644 --- a/tests/api_resources/stream/test_clip.py +++ b/tests/api_resources/stream/test_clip.py @@ -85,7 +85,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncClip: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_copy.py b/tests/api_resources/stream/test_copy.py index c2d65c32f2e..da77578d882 100644 --- a/tests/api_resources/stream/test_copy.py +++ b/tests/api_resources/stream/test_copy.py @@ -78,7 +78,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncCopy: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_direct_upload.py b/tests/api_resources/stream/test_direct_upload.py index 54f9c3d0070..70474f551cb 100644 --- a/tests/api_resources/stream/test_direct_upload.py +++ b/tests/api_resources/stream/test_direct_upload.py @@ -79,7 +79,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncDirectUpload: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_downloads.py b/tests/api_resources/stream/test_downloads.py index 59fdefe0eb2..242d4f3c211 100644 --- a/tests/api_resources/stream/test_downloads.py +++ b/tests/api_resources/stream/test_downloads.py @@ -167,7 +167,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDownloads: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_embed.py b/tests/api_resources/stream/test_embed.py index 1019efe5e4c..4158863edde 100644 --- a/tests/api_resources/stream/test_embed.py +++ b/tests/api_resources/stream/test_embed.py @@ -66,7 +66,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEmbed: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_keys.py b/tests/api_resources/stream/test_keys.py index fba7bbc8253..31b38c8f769 100644 --- a/tests/api_resources/stream/test_keys.py +++ b/tests/api_resources/stream/test_keys.py @@ -148,7 +148,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncKeys: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_live_inputs.py b/tests/api_resources/stream/test_live_inputs.py index a41165cf355..8c637eb3141 100644 --- a/tests/api_resources/stream/test_live_inputs.py +++ b/tests/api_resources/stream/test_live_inputs.py @@ -285,7 +285,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLiveInputs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_token.py b/tests/api_resources/stream/test_token.py index b3e356b61f6..1ecc4892b56 100644 --- a/tests/api_resources/stream/test_token.py +++ b/tests/api_resources/stream/test_token.py @@ -100,7 +100,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncToken: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_videos.py b/tests/api_resources/stream/test_videos.py index c0ee01a60ff..9708f4488bf 100644 --- a/tests/api_resources/stream/test_videos.py +++ b/tests/api_resources/stream/test_videos.py @@ -65,7 +65,9 @@ def test_path_params_storage_usage(self, client: Cloudflare) -> None: class TestAsyncVideos: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_storage_usage(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_watermarks.py b/tests/api_resources/stream/test_watermarks.py index a70f96b1280..0cafcf5d0c5 100644 --- a/tests/api_resources/stream/test_watermarks.py +++ b/tests/api_resources/stream/test_watermarks.py @@ -214,7 +214,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWatermarks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/stream/test_webhooks.py b/tests/api_resources/stream/test_webhooks.py index 565e3777ea8..63a685256d4 100644 --- a/tests/api_resources/stream/test_webhooks.py +++ b/tests/api_resources/stream/test_webhooks.py @@ -136,7 +136,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWebhooks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_abuse_reports.py b/tests/api_resources/test_abuse_reports.py index a2309a11c6f..f88cf806d63 100644 --- a/tests/api_resources/test_abuse_reports.py +++ b/tests/api_resources/test_abuse_reports.py @@ -858,7 +858,9 @@ def test_path_params_create_overload_8(self, client: Cloudflare) -> None: class TestAsyncAbuseReports: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index 345d30376fa..df241383c9e 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -236,7 +236,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAccounts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_ai.py b/tests/api_resources/test_ai.py index 3e168ba5d75..1861c05cc28 100644 --- a/tests/api_resources/test_ai.py +++ b/tests/api_resources/test_ai.py @@ -1027,7 +1027,9 @@ def test_path_params_run_overload_14(self, client: Cloudflare) -> None: class TestAsyncAI: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_run_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_ai_gateway.py b/tests/api_resources/test_ai_gateway.py index be57afddcff..909b68d8164 100644 --- a/tests/api_resources/test_ai_gateway.py +++ b/tests/api_resources/test_ai_gateway.py @@ -352,7 +352,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAIGateway: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_audit_logs.py b/tests/api_resources/test_audit_logs.py index 5c550224d90..b992b177c3f 100644 --- a/tests/api_resources/test_audit_logs.py +++ b/tests/api_resources/test_audit_logs.py @@ -80,7 +80,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAuditLogs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_bot_management.py b/tests/api_resources/test_bot_management.py index 45478cc0021..526820026a7 100644 --- a/tests/api_resources/test_bot_management.py +++ b/tests/api_resources/test_bot_management.py @@ -264,7 +264,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBotManagement: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_brand_protection.py b/tests/api_resources/test_brand_protection.py index 9dfcb8502d9..56f9d7792ca 100644 --- a/tests/api_resources/test_brand_protection.py +++ b/tests/api_resources/test_brand_protection.py @@ -115,7 +115,9 @@ def test_path_params_url_info(self, client: Cloudflare) -> None: class TestAsyncBrandProtection: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_submit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_cache.py b/tests/api_resources/test_cache.py index 7af5c5be461..e95bbc2dd3c 100644 --- a/tests/api_resources/test_cache.py +++ b/tests/api_resources/test_cache.py @@ -312,7 +312,9 @@ def test_path_params_purge_overload_6(self, client: Cloudflare) -> None: class TestAsyncCache: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_purge_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_client_certificates.py b/tests/api_resources/test_client_certificates.py index 254ed8c24c4..45cab4c2feb 100644 --- a/tests/api_resources/test_client_certificates.py +++ b/tests/api_resources/test_client_certificates.py @@ -262,7 +262,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncClientCertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_content_scanning.py b/tests/api_resources/test_content_scanning.py index a66910245a8..c01e309d925 100644 --- a/tests/api_resources/test_content_scanning.py +++ b/tests/api_resources/test_content_scanning.py @@ -94,7 +94,9 @@ def test_path_params_enable(self, client: Cloudflare) -> None: class TestAsyncContentScanning: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_disable(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_custom_certificates.py b/tests/api_resources/test_custom_certificates.py index 8f054553aad..e7b672d2ede 100644 --- a/tests/api_resources/test_custom_certificates.py +++ b/tests/api_resources/test_custom_certificates.py @@ -288,7 +288,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustomCertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_custom_hostnames.py b/tests/api_resources/test_custom_hostnames.py index a18761dde17..10f5a4a1398 100644 --- a/tests/api_resources/test_custom_hostnames.py +++ b/tests/api_resources/test_custom_hostnames.py @@ -336,7 +336,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustomHostnames: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_custom_nameservers.py b/tests/api_resources/test_custom_nameservers.py index 942468fa896..6a9a06f4d4d 100644 --- a/tests/api_resources/test_custom_nameservers.py +++ b/tests/api_resources/test_custom_nameservers.py @@ -160,7 +160,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustomNameservers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_custom_pages.py b/tests/api_resources/test_custom_pages.py index 28b7765c9eb..c9818d0eb30 100644 --- a/tests/api_resources/test_custom_pages.py +++ b/tests/api_resources/test_custom_pages.py @@ -223,7 +223,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustomPages: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize diff --git a/tests/api_resources/test_dcv_delegation.py b/tests/api_resources/test_dcv_delegation.py index 0f04ca1a893..1660709969b 100644 --- a/tests/api_resources/test_dcv_delegation.py +++ b/tests/api_resources/test_dcv_delegation.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDCVDelegation: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_dns_firewall.py b/tests/api_resources/test_dns_firewall.py index c97f5b3c417..a1843a42bbe 100644 --- a/tests/api_resources/test_dns_firewall.py +++ b/tests/api_resources/test_dns_firewall.py @@ -314,7 +314,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDNSFirewall: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/test_email_routing.py b/tests/api_resources/test_email_routing.py index e39bb1e1c5e..9ee958eb5ce 100644 --- a/tests/api_resources/test_email_routing.py +++ b/tests/api_resources/test_email_routing.py @@ -153,7 +153,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEmailRouting: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_disable(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_filters.py b/tests/api_resources/test_filters.py index 1f0aaa1080f..bf12c195874 100644 --- a/tests/api_resources/test_filters.py +++ b/tests/api_resources/test_filters.py @@ -390,7 +390,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFilters: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/test_healthchecks.py b/tests/api_resources/test_healthchecks.py index c242ab594ac..e8ceb8eda69 100644 --- a/tests/api_resources/test_healthchecks.py +++ b/tests/api_resources/test_healthchecks.py @@ -435,7 +435,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHealthchecks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_ips.py b/tests/api_resources/test_ips.py index e013f501f77..449885157ba 100644 --- a/tests/api_resources/test_ips.py +++ b/tests/api_resources/test_ips.py @@ -51,7 +51,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncIPs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_keyless_certificates.py b/tests/api_resources/test_keyless_certificates.py index 0dae2518fe2..ea17c20d1b1 100644 --- a/tests/api_resources/test_keyless_certificates.py +++ b/tests/api_resources/test_keyless_certificates.py @@ -293,7 +293,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncKeylessCertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_leaked_credential_checks.py b/tests/api_resources/test_leaked_credential_checks.py index 6d29dde2917..6f82f5dbb3d 100644 --- a/tests/api_resources/test_leaked_credential_checks.py +++ b/tests/api_resources/test_leaked_credential_checks.py @@ -106,7 +106,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLeakedCredentialChecks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_load_balancers.py b/tests/api_resources/test_load_balancers.py index 5b206b46d25..12774db01b0 100644 --- a/tests/api_resources/test_load_balancers.py +++ b/tests/api_resources/test_load_balancers.py @@ -699,7 +699,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLoadBalancers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_managed_transforms.py b/tests/api_resources/test_managed_transforms.py index f00cf76c8b0..d2e91bfbb4f 100644 --- a/tests/api_resources/test_managed_transforms.py +++ b/tests/api_resources/test_managed_transforms.py @@ -196,7 +196,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncManagedTransforms: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize diff --git a/tests/api_resources/test_memberships.py b/tests/api_resources/test_memberships.py index 7d30c588011..19fe2ee97a7 100644 --- a/tests/api_resources/test_memberships.py +++ b/tests/api_resources/test_memberships.py @@ -181,7 +181,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMemberships: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_mtls_certificates.py b/tests/api_resources/test_mtls_certificates.py index 666b1c3c621..e5ad0553d13 100644 --- a/tests/api_resources/test_mtls_certificates.py +++ b/tests/api_resources/test_mtls_certificates.py @@ -214,7 +214,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMTLSCertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_origin_ca_certificates.py b/tests/api_resources/test_origin_ca_certificates.py index ddd89222e1e..23f97dc3e59 100644 --- a/tests/api_resources/test_origin_ca_certificates.py +++ b/tests/api_resources/test_origin_ca_certificates.py @@ -194,7 +194,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOriginCACertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize diff --git a/tests/api_resources/test_origin_post_quantum_encryption.py b/tests/api_resources/test_origin_post_quantum_encryption.py index 5be62d7556c..9160b032a64 100644 --- a/tests/api_resources/test_origin_post_quantum_encryption.py +++ b/tests/api_resources/test_origin_post_quantum_encryption.py @@ -122,7 +122,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOriginPostQuantumEncryption: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/test_origin_tls_client_auth.py b/tests/api_resources/test_origin_tls_client_auth.py index fc28c9cbee6..89b2f4c1fbc 100644 --- a/tests/api_resources/test_origin_tls_client_auth.py +++ b/tests/api_resources/test_origin_tls_client_auth.py @@ -207,7 +207,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOriginTLSClientAuth: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_page_rules.py b/tests/api_resources/test_page_rules.py index bfe632db4aa..a98e9338e9d 100644 --- a/tests/api_resources/test_page_rules.py +++ b/tests/api_resources/test_page_rules.py @@ -404,7 +404,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPageRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="generated params are incorrect") @parametrize diff --git a/tests/api_resources/test_page_shield.py b/tests/api_resources/test_page_shield.py index 2511ba986b2..a1c807dc965 100644 --- a/tests/api_resources/test_page_shield.py +++ b/tests/api_resources/test_page_shield.py @@ -105,7 +105,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPageShield: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_pipelines.py b/tests/api_resources/test_pipelines.py index 97d66e53b81..6ca73da466f 100644 --- a/tests/api_resources/test_pipelines.py +++ b/tests/api_resources/test_pipelines.py @@ -438,7 +438,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPipelines: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_queues.py b/tests/api_resources/test_queues.py index fb1930d4074..e337e5aae5c 100644 --- a/tests/api_resources/test_queues.py +++ b/tests/api_resources/test_queues.py @@ -323,7 +323,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncQueues: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_rate_limits.py b/tests/api_resources/test_rate_limits.py index 13cbbdfeca6..85a6de47b2f 100644 --- a/tests/api_resources/test_rate_limits.py +++ b/tests/api_resources/test_rate_limits.py @@ -396,7 +396,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRateLimits: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/test_resource_sharing.py b/tests/api_resources/test_resource_sharing.py index 04448a2d72f..45692b97cbf 100644 --- a/tests/api_resources/test_resource_sharing.py +++ b/tests/api_resources/test_resource_sharing.py @@ -307,7 +307,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncResourceSharing: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_rulesets.py b/tests/api_resources/test_rulesets.py index 1d16aef9e20..f6589f3c67d 100644 --- a/tests/api_resources/test_rulesets.py +++ b/tests/api_resources/test_rulesets.py @@ -425,7 +425,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRulesets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/test_security_txt.py b/tests/api_resources/test_security_txt.py index 58f8e8306f3..0da5f1a9f06 100644 --- a/tests/api_resources/test_security_txt.py +++ b/tests/api_resources/test_security_txt.py @@ -158,7 +158,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSecurityTXT: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_snippets.py b/tests/api_resources/test_snippets.py index 25af699eda9..e0ca184d00e 100644 --- a/tests/api_resources/test_snippets.py +++ b/tests/api_resources/test_snippets.py @@ -217,7 +217,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSnippets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="throwing HTTP 415") @parametrize diff --git a/tests/api_resources/test_stream.py b/tests/api_resources/test_stream.py index db91a27d509..9dc95d5e834 100644 --- a/tests/api_resources/test_stream.py +++ b/tests/api_resources/test_stream.py @@ -302,7 +302,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncStream: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/test_url_normalization.py b/tests/api_resources/test_url_normalization.py index 961a3f7b78d..7dfd2d41316 100644 --- a/tests/api_resources/test_url_normalization.py +++ b/tests/api_resources/test_url_normalization.py @@ -156,7 +156,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncURLNormalization: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize diff --git a/tests/api_resources/test_user.py b/tests/api_resources/test_user.py index d214ccb7353..b6ccd151f8b 100644 --- a/tests/api_resources/test_user.py +++ b/tests/api_resources/test_user.py @@ -80,7 +80,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncUser: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_waiting_rooms.py b/tests/api_resources/test_waiting_rooms.py index 763cf81e989..ed4243ca17b 100644 --- a/tests/api_resources/test_waiting_rooms.py +++ b/tests/api_resources/test_waiting_rooms.py @@ -486,7 +486,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWaitingRooms: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_workflows.py b/tests/api_resources/test_workflows.py index 30163e14d9c..bcc84aa9081 100644 --- a/tests/api_resources/test_workflows.py +++ b/tests/api_resources/test_workflows.py @@ -227,7 +227,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWorkflows: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_zaraz.py b/tests/api_resources/test_zaraz.py index 5b9e0b3829c..00bdec56c63 100644 --- a/tests/api_resources/test_zaraz.py +++ b/tests/api_resources/test_zaraz.py @@ -61,7 +61,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: class TestAsyncZaraz: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_zones.py b/tests/api_resources/test_zones.py index b4f8bf827d8..0ee90986d59 100644 --- a/tests/api_resources/test_zones.py +++ b/tests/api_resources/test_zones.py @@ -236,7 +236,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncZones: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/turnstile/test_widgets.py b/tests/api_resources/turnstile/test_widgets.py index 931be7a095f..cfdb1450c39 100644 --- a/tests/api_resources/turnstile/test_widgets.py +++ b/tests/api_resources/turnstile/test_widgets.py @@ -373,7 +373,9 @@ def test_path_params_rotate_secret(self, client: Cloudflare) -> None: class TestAsyncWidgets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/url_scanner/test_responses.py b/tests/api_resources/url_scanner/test_responses.py index 1690ba966df..f059cb256eb 100644 --- a/tests/api_resources/url_scanner/test_responses.py +++ b/tests/api_resources/url_scanner/test_responses.py @@ -66,7 +66,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncResponses: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/url_scanner/test_scans.py b/tests/api_resources/url_scanner/test_scans.py index a2d0680507a..bcb27351ece 100644 --- a/tests/api_resources/url_scanner/test_scans.py +++ b/tests/api_resources/url_scanner/test_scans.py @@ -421,7 +421,9 @@ def test_path_params_screenshot(self, client: Cloudflare) -> None: class TestAsyncScans: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/user/billing/test_history.py b/tests/api_resources/user/billing/test_history.py index 067df084104..b5a06e26a57 100644 --- a/tests/api_resources/user/billing/test_history.py +++ b/tests/api_resources/user/billing/test_history.py @@ -66,7 +66,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncHistory: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/user/billing/test_profile.py b/tests/api_resources/user/billing/test_profile.py index 06eed719a6b..4a974aed1f0 100644 --- a/tests/api_resources/user/billing/test_profile.py +++ b/tests/api_resources/user/billing/test_profile.py @@ -50,7 +50,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncProfile: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/user/test_audit_logs.py b/tests/api_resources/user/test_audit_logs.py index 5ce89e4e73b..f678b7539a2 100644 --- a/tests/api_resources/user/test_audit_logs.py +++ b/tests/api_resources/user/test_audit_logs.py @@ -66,7 +66,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncAuditLogs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/user/test_invites.py b/tests/api_resources/user/test_invites.py index d2bfd631da8..e2c1217a92d 100644 --- a/tests/api_resources/user/test_invites.py +++ b/tests/api_resources/user/test_invites.py @@ -125,7 +125,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncInvites: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/user/test_organizations.py b/tests/api_resources/user/test_organizations.py index 724aac1a95c..da23d43f15d 100644 --- a/tests/api_resources/user/test_organizations.py +++ b/tests/api_resources/user/test_organizations.py @@ -152,7 +152,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOrganizations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/user/test_subscriptions.py b/tests/api_resources/user/test_subscriptions.py index f2483fa8d75..ab0298d51a7 100644 --- a/tests/api_resources/user/test_subscriptions.py +++ b/tests/api_resources/user/test_subscriptions.py @@ -139,7 +139,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncSubscriptions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/user/test_tokens.py b/tests/api_resources/user/test_tokens.py index af745a5815d..bcba28f9023 100644 --- a/tests/api_resources/user/test_tokens.py +++ b/tests/api_resources/user/test_tokens.py @@ -36,10 +36,7 @@ def test_method_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -69,10 +66,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], condition={ @@ -98,10 +92,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -123,10 +114,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) as response: @@ -151,13 +139,9 @@ def test_method_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) assert_matches_type(Optional[Token], token, path=["response"]) @@ -186,13 +170,9 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", condition={ "request_ip": { "in": ["123.123.123.0/24", "2606:4700::/32"], @@ -201,6 +181,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, expires_on=parse_datetime("2020-01-01T00:00:00Z"), not_before=parse_datetime("2018-07-01T05:20:00Z"), + status="active", ) assert_matches_type(Optional[Token], token, path=["response"]) @@ -217,13 +198,9 @@ def test_raw_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) assert response.is_closed is True @@ -244,13 +221,9 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -274,13 +247,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -435,7 +404,9 @@ def test_streaming_response_verify(self, client: Cloudflare) -> None: class TestAsyncTokens: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize @@ -449,10 +420,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -482,10 +450,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], condition={ @@ -511,10 +476,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -536,10 +498,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) as response: @@ -564,13 +523,9 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) assert_matches_type(Optional[Token], token, path=["response"]) @@ -599,13 +554,9 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", condition={ "request_ip": { "in": ["123.123.123.0/24", "2606:4700::/32"], @@ -614,6 +565,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, expires_on=parse_datetime("2020-01-01T00:00:00Z"), not_before=parse_datetime("2018-07-01T05:20:00Z"), + status="active", ) assert_matches_type(Optional[Token], token, path=["response"]) @@ -630,13 +582,9 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) assert response.is_closed is True @@ -657,13 +605,9 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -687,13 +631,9 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) @pytest.mark.skip(reason="TODO: investigate broken test") diff --git a/tests/api_resources/user/tokens/test_permission_groups.py b/tests/api_resources/user/tokens/test_permission_groups.py index 2ce293ee632..185dbfb8771 100644 --- a/tests/api_resources/user/tokens/test_permission_groups.py +++ b/tests/api_resources/user/tokens/test_permission_groups.py @@ -48,7 +48,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncPermissionGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/user/tokens/test_value.py b/tests/api_resources/user/tokens/test_value.py index 1256130d6bf..459bf43aabf 100644 --- a/tests/api_resources/user/tokens/test_value.py +++ b/tests/api_resources/user/tokens/test_value.py @@ -64,7 +64,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: class TestAsyncValue: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/vectorize/indexes/test_metadata_index.py b/tests/api_resources/vectorize/indexes/test_metadata_index.py index 2c91354788d..2dbf39b034d 100644 --- a/tests/api_resources/vectorize/indexes/test_metadata_index.py +++ b/tests/api_resources/vectorize/indexes/test_metadata_index.py @@ -182,7 +182,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncMetadataIndex: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/vectorize/test_indexes.py b/tests/api_resources/vectorize/test_indexes.py index 1a27050902d..fd2e3b78fcf 100644 --- a/tests/api_resources/vectorize/test_indexes.py +++ b/tests/api_resources/vectorize/test_indexes.py @@ -600,7 +600,9 @@ def test_path_params_upsert(self, client: Cloudflare) -> None: class TestAsyncIndexes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/waiting_rooms/events/test_details.py b/tests/api_resources/waiting_rooms/events/test_details.py index c164f78f6b8..efd4a6b83a1 100644 --- a/tests/api_resources/waiting_rooms/events/test_details.py +++ b/tests/api_resources/waiting_rooms/events/test_details.py @@ -79,7 +79,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDetails: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/waiting_rooms/test_events.py b/tests/api_resources/waiting_rooms/test_events.py index a626488d2e3..b7615210e18 100644 --- a/tests/api_resources/waiting_rooms/test_events.py +++ b/tests/api_resources/waiting_rooms/test_events.py @@ -491,7 +491,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEvents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/waiting_rooms/test_page.py b/tests/api_resources/waiting_rooms/test_page.py index 881d9a3a906..e7f87c79d0d 100644 --- a/tests/api_resources/waiting_rooms/test_page.py +++ b/tests/api_resources/waiting_rooms/test_page.py @@ -61,7 +61,9 @@ def test_path_params_preview(self, client: Cloudflare) -> None: class TestAsyncPage: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_preview(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/waiting_rooms/test_rules.py b/tests/api_resources/waiting_rooms/test_rules.py index 535dbf679a3..7861f9bfe4a 100644 --- a/tests/api_resources/waiting_rooms/test_rules.py +++ b/tests/api_resources/waiting_rooms/test_rules.py @@ -374,7 +374,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/waiting_rooms/test_settings.py b/tests/api_resources/waiting_rooms/test_settings.py index 823c9e02011..787b1c36e75 100644 --- a/tests/api_resources/waiting_rooms/test_settings.py +++ b/tests/api_resources/waiting_rooms/test_settings.py @@ -153,7 +153,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/waiting_rooms/test_statuses.py b/tests/api_resources/waiting_rooms/test_statuses.py index 5ca8f12dbec..3c06812d4e3 100644 --- a/tests/api_resources/waiting_rooms/test_statuses.py +++ b/tests/api_resources/waiting_rooms/test_statuses.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncStatuses: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py b/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py index b46488974a4..6c2e96fbf7f 100644 --- a/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py +++ b/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py @@ -352,7 +352,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEntries: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py b/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py index 26cdee2b5a6..e83927a314f 100644 --- a/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py +++ b/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py @@ -125,7 +125,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncContentLists: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/web3/test_hostnames.py b/tests/api_resources/web3/test_hostnames.py index cb60bbc8e75..a53bf0c2b0d 100644 --- a/tests/api_resources/web3/test_hostnames.py +++ b/tests/api_resources/web3/test_hostnames.py @@ -269,7 +269,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHostnames: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/assets/test_upload.py b/tests/api_resources/workers/assets/test_upload.py index 4ba17c7640a..1e058d78ce4 100644 --- a/tests/api_resources/workers/assets/test_upload.py +++ b/tests/api_resources/workers/assets/test_upload.py @@ -65,7 +65,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncUpload: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/observability/test_telemetry.py b/tests/api_resources/workers/observability/test_telemetry.py index ba1b1bc90fc..bef7afd0eb6 100644 --- a/tests/api_resources/workers/observability/test_telemetry.py +++ b/tests/api_resources/workers/observability/test_telemetry.py @@ -311,7 +311,9 @@ def test_path_params_values(self, client: Cloudflare) -> None: class TestAsyncTelemetry: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_keys(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/scripts/assets/test_upload.py b/tests/api_resources/workers/scripts/assets/test_upload.py index b1d00e18e6b..049f3460f79 100644 --- a/tests/api_resources/workers/scripts/assets/test_upload.py +++ b/tests/api_resources/workers/scripts/assets/test_upload.py @@ -97,7 +97,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncUpload: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/scripts/test_content.py b/tests/api_resources/workers/scripts/test_content.py index 844fa02c9fc..3831e686f57 100644 --- a/tests/api_resources/workers/scripts/test_content.py +++ b/tests/api_resources/workers/scripts/test_content.py @@ -165,7 +165,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncContent: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/workers/scripts/test_deployments.py b/tests/api_resources/workers/scripts/test_deployments.py index 45203082efa..e6b2a2e42f7 100644 --- a/tests/api_resources/workers/scripts/test_deployments.py +++ b/tests/api_resources/workers/scripts/test_deployments.py @@ -170,7 +170,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDeployments: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/scripts/test_schedules.py b/tests/api_resources/workers/scripts/test_schedules.py index 3b9532ec015..49788ae1352 100644 --- a/tests/api_resources/workers/scripts/test_schedules.py +++ b/tests/api_resources/workers/scripts/test_schedules.py @@ -120,7 +120,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSchedules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/scripts/test_script_and_version_settings.py b/tests/api_resources/workers/scripts/test_script_and_version_settings.py index 42dc810c516..9849d452657 100644 --- a/tests/api_resources/workers/scripts/test_script_and_version_settings.py +++ b/tests/api_resources/workers/scripts/test_script_and_version_settings.py @@ -178,7 +178,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncScriptAndVersionSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/scripts/test_secrets.py b/tests/api_resources/workers/scripts/test_secrets.py index eb1ce97513b..eaf7a5eabad 100644 --- a/tests/api_resources/workers/scripts/test_secrets.py +++ b/tests/api_resources/workers/scripts/test_secrets.py @@ -343,7 +343,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSecrets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/scripts/test_settings.py b/tests/api_resources/workers/scripts/test_settings.py index cb624108311..9a07538ecc1 100644 --- a/tests/api_resources/workers/scripts/test_settings.py +++ b/tests/api_resources/workers/scripts/test_settings.py @@ -140,7 +140,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/scripts/test_subdomain.py b/tests/api_resources/workers/scripts/test_subdomain.py index afcaa274663..f2ada9e6d5a 100644 --- a/tests/api_resources/workers/scripts/test_subdomain.py +++ b/tests/api_resources/workers/scripts/test_subdomain.py @@ -182,7 +182,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSubdomain: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/scripts/test_tail.py b/tests/api_resources/workers/scripts/test_tail.py index 7dc3b85f88c..4041a0a60d6 100644 --- a/tests/api_resources/workers/scripts/test_tail.py +++ b/tests/api_resources/workers/scripts/test_tail.py @@ -180,7 +180,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTail: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/scripts/test_versions.py b/tests/api_resources/workers/scripts/test_versions.py index 95df44b4788..38bae61b036 100644 --- a/tests/api_resources/workers/scripts/test_versions.py +++ b/tests/api_resources/workers/scripts/test_versions.py @@ -227,7 +227,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVersions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/workers/test_account_settings.py b/tests/api_resources/workers/test_account_settings.py index 5f96e020275..c158d4a0729 100644 --- a/tests/api_resources/workers/test_account_settings.py +++ b/tests/api_resources/workers/test_account_settings.py @@ -107,7 +107,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAccountSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/test_domains.py b/tests/api_resources/workers/test_domains.py index 1bbc559f8f8..324bb802af1 100644 --- a/tests/api_resources/workers/test_domains.py +++ b/tests/api_resources/workers/test_domains.py @@ -220,7 +220,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomains: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/test_routes.py b/tests/api_resources/workers/test_routes.py index 19547a324f0..594e8309ae9 100644 --- a/tests/api_resources/workers/test_routes.py +++ b/tests/api_resources/workers/test_routes.py @@ -274,7 +274,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRoutes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/test_scripts.py b/tests/api_resources/workers/test_scripts.py index fc0e0bad871..0ac098a416a 100644 --- a/tests/api_resources/workers/test_scripts.py +++ b/tests/api_resources/workers/test_scripts.py @@ -45,6 +45,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "html_handling": "auto-trailing-slash", "not_found_handling": "404-page", "run_worker_first": ["string"], + "serve_directly": True, }, "jwt": "jwt", }, @@ -297,7 +298,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncScripts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize @@ -323,6 +326,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "html_handling": "auto-trailing-slash", "not_found_handling": "404-page", "run_worker_first": ["string"], + "serve_directly": True, }, "jwt": "jwt", }, diff --git a/tests/api_resources/workers/test_subdomains.py b/tests/api_resources/workers/test_subdomains.py index 96da816768c..ab015c6a3e8 100644 --- a/tests/api_resources/workers/test_subdomains.py +++ b/tests/api_resources/workers/test_subdomains.py @@ -99,7 +99,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSubdomains: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_asset_upload.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_asset_upload.py index df897cae3b7..1b4b109eb1d 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_asset_upload.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_asset_upload.py @@ -117,7 +117,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncAssetUpload: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py index be685ad0e29..8bac33bc665 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py @@ -80,7 +80,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBindings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py index dcdd9ad6275..6dc0401bada 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py @@ -191,7 +191,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncContent: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py index bf53cc33b74..ed3745b014c 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py @@ -416,7 +416,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSecrets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py index cdb0c20388c..77ae0124e66 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py @@ -208,7 +208,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py index 3723f23e5a4..deeb2779dcb 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py @@ -223,7 +223,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncTags: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py index 3f82e720e66..7fd78a6c457 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py @@ -46,6 +46,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "html_handling": "auto-trailing-slash", "not_found_handling": "404-page", "run_worker_first": ["string"], + "serve_directly": True, }, "jwt": "jwt", }, @@ -297,7 +298,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncScripts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize @@ -325,6 +328,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "html_handling": "auto-trailing-slash", "not_found_handling": "404-page", "run_worker_first": ["string"], + "serve_directly": True, }, "jwt": "jwt", }, diff --git a/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py b/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py index df9749cb2e5..a885e5f370a 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py +++ b/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py @@ -204,7 +204,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncNamespaces: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workflows/instances/test_events.py b/tests/api_resources/workflows/instances/test_events.py index 8857d0356fd..fa638445ffc 100644 --- a/tests/api_resources/workflows/instances/test_events.py +++ b/tests/api_resources/workflows/instances/test_events.py @@ -103,7 +103,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncEvents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workflows/instances/test_status.py b/tests/api_resources/workflows/instances/test_status.py index bf69221dc66..5b7e8ff5db9 100644 --- a/tests/api_resources/workflows/instances/test_status.py +++ b/tests/api_resources/workflows/instances/test_status.py @@ -85,7 +85,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncStatus: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workflows/test_instances.py b/tests/api_resources/workflows/test_instances.py index b13a0879f29..00dcaf09d72 100644 --- a/tests/api_resources/workflows/test_instances.py +++ b/tests/api_resources/workflows/test_instances.py @@ -267,7 +267,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncInstances: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workflows/test_versions.py b/tests/api_resources/workflows/test_versions.py index 46b2c9f5466..ecdc89ad65b 100644 --- a/tests/api_resources/workflows/test_versions.py +++ b/tests/api_resources/workflows/test_versions.py @@ -138,7 +138,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVersions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zaraz/history/test_configs.py b/tests/api_resources/zaraz/history/test_configs.py index 64707d5d443..bf2943babcd 100644 --- a/tests/api_resources/zaraz/history/test_configs.py +++ b/tests/api_resources/zaraz/history/test_configs.py @@ -61,7 +61,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfigs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zaraz/test_config.py b/tests/api_resources/zaraz/test_config.py index 15a39c60cac..73473ea9fa5 100644 --- a/tests/api_resources/zaraz/test_config.py +++ b/tests/api_resources/zaraz/test_config.py @@ -399,7 +399,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfig: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zaraz/test_default.py b/tests/api_resources/zaraz/test_default.py index b0a77bb4a0b..0ecaa604f69 100644 --- a/tests/api_resources/zaraz/test_default.py +++ b/tests/api_resources/zaraz/test_default.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDefault: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zaraz/test_export.py b/tests/api_resources/zaraz/test_export.py index 73ea5604505..9f0ca72f17a 100644 --- a/tests/api_resources/zaraz/test_export.py +++ b/tests/api_resources/zaraz/test_export.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncExport: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zaraz/test_history.py b/tests/api_resources/zaraz/test_history.py index 7690f5c9b68..e67d1fa7fa3 100644 --- a/tests/api_resources/zaraz/test_history.py +++ b/tests/api_resources/zaraz/test_history.py @@ -111,7 +111,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncHistory: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zaraz/test_publish.py b/tests/api_resources/zaraz/test_publish.py index 0ff472b0f22..893341b58bc 100644 --- a/tests/api_resources/zaraz/test_publish.py +++ b/tests/api_resources/zaraz/test_publish.py @@ -64,7 +64,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncPublish: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zaraz/test_workflow.py b/tests/api_resources/zaraz/test_workflow.py index 52930af6397..10aed6902f3 100644 --- a/tests/api_resources/zaraz/test_workflow.py +++ b/tests/api_resources/zaraz/test_workflow.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWorkflow: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/applications/policy_tests/test_users.py b/tests/api_resources/zero_trust/access/applications/policy_tests/test_users.py index 0489de97d1d..4043950764e 100755 --- a/tests/api_resources/zero_trust/access/applications/policy_tests/test_users.py +++ b/tests/api_resources/zero_trust/access/applications/policy_tests/test_users.py @@ -79,7 +79,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncUsers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/applications/test_cas.py b/tests/api_resources/zero_trust/access/applications/test_cas.py index 5ec4f55234f..96b822700df 100644 --- a/tests/api_resources/zero_trust/access/applications/test_cas.py +++ b/tests/api_resources/zero_trust/access/applications/test_cas.py @@ -276,7 +276,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCAs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/access/applications/test_policies.py b/tests/api_resources/zero_trust/access/applications/test_policies.py index edb59c1c638..747a489d1be 100644 --- a/tests/api_resources/zero_trust/access/applications/test_policies.py +++ b/tests/api_resources/zero_trust/access/applications/test_policies.py @@ -439,7 +439,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPolicies: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/access/applications/test_policy_tests.py b/tests/api_resources/zero_trust/access/applications/test_policy_tests.py index 561ff4e4dbe..d4517ef3e31 100755 --- a/tests/api_resources/zero_trust/access/applications/test_policy_tests.py +++ b/tests/api_resources/zero_trust/access/applications/test_policy_tests.py @@ -141,7 +141,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPolicyTests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/applications/test_settings.py b/tests/api_resources/zero_trust/access/applications/test_settings.py index b9f96bdcbfd..a1bc19b917e 100644 --- a/tests/api_resources/zero_trust/access/applications/test_settings.py +++ b/tests/api_resources/zero_trust/access/applications/test_settings.py @@ -160,7 +160,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py b/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py index daafd6559ea..668f6fc35b0 100644 --- a/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py +++ b/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py @@ -86,7 +86,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncUserPolicyChecks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/access/certificates/test_settings.py b/tests/api_resources/zero_trust/access/certificates/test_settings.py index bb371f1b93d..65b683707ca 100644 --- a/tests/api_resources/zero_trust/access/certificates/test_settings.py +++ b/tests/api_resources/zero_trust/access/certificates/test_settings.py @@ -172,7 +172,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/access/infrastructure/test_targets.py b/tests/api_resources/zero_trust/access/infrastructure/test_targets.py index 3eebb5554ba..74205d6a65b 100644 --- a/tests/api_resources/zero_trust/access/infrastructure/test_targets.py +++ b/tests/api_resources/zero_trust/access/infrastructure/test_targets.py @@ -478,7 +478,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTargets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/logs/scim/test_updates.py b/tests/api_resources/zero_trust/access/logs/scim/test_updates.py index 776071ab042..958488c0d33 100644 --- a/tests/api_resources/zero_trust/access/logs/scim/test_updates.py +++ b/tests/api_resources/zero_trust/access/logs/scim/test_updates.py @@ -82,7 +82,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncUpdates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/logs/test_access_requests.py b/tests/api_resources/zero_trust/access/logs/test_access_requests.py index 3eafad4f1a6..a083df20054 100644 --- a/tests/api_resources/zero_trust/access/logs/test_access_requests.py +++ b/tests/api_resources/zero_trust/access/logs/test_access_requests.py @@ -69,7 +69,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAccessRequests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/test_applications.py b/tests/api_resources/zero_trust/access/test_applications.py index 3accaf5a932..32545b7e0f6 100644 --- a/tests/api_resources/zero_trust/access/test_applications.py +++ b/tests/api_resources/zero_trust/access/test_applications.py @@ -3156,7 +3156,9 @@ def test_path_params_revoke_tokens(self, client: Cloudflare) -> None: class TestAsyncApplications: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/access/test_bookmarks.py b/tests/api_resources/zero_trust/access/test_bookmarks.py index c181fbba11f..b824fd1024a 100644 --- a/tests/api_resources/zero_trust/access/test_bookmarks.py +++ b/tests/api_resources/zero_trust/access/test_bookmarks.py @@ -290,7 +290,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBookmarks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/test_certificates.py b/tests/api_resources/zero_trust/access/test_certificates.py index 8bd7249ed22..bfa0e89b3b5 100644 --- a/tests/api_resources/zero_trust/access/test_certificates.py +++ b/tests/api_resources/zero_trust/access/test_certificates.py @@ -355,7 +355,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/access/test_custom_pages.py b/tests/api_resources/zero_trust/access/test_custom_pages.py index b21a942f7b8..7693e217603 100644 --- a/tests/api_resources/zero_trust/access/test_custom_pages.py +++ b/tests/api_resources/zero_trust/access/test_custom_pages.py @@ -294,7 +294,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustomPages: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/test_gateway_ca.py b/tests/api_resources/zero_trust/access/test_gateway_ca.py index 723be698029..80604ae6620 100644 --- a/tests/api_resources/zero_trust/access/test_gateway_ca.py +++ b/tests/api_resources/zero_trust/access/test_gateway_ca.py @@ -144,7 +144,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncGatewayCA: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/test_groups.py b/tests/api_resources/zero_trust/access/test_groups.py index f83be911c0f..fe592c5eb4f 100644 --- a/tests/api_resources/zero_trust/access/test_groups.py +++ b/tests/api_resources/zero_trust/access/test_groups.py @@ -371,7 +371,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/access/test_keys.py b/tests/api_resources/zero_trust/access/test_keys.py index f0b87f16c0f..b2a7ea7fb3b 100644 --- a/tests/api_resources/zero_trust/access/test_keys.py +++ b/tests/api_resources/zero_trust/access/test_keys.py @@ -137,7 +137,9 @@ def test_path_params_rotate(self, client: Cloudflare) -> None: class TestAsyncKeys: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/test_policies.py b/tests/api_resources/zero_trust/access/test_policies.py index 5102dd04664..9f15939ac35 100644 --- a/tests/api_resources/zero_trust/access/test_policies.py +++ b/tests/api_resources/zero_trust/access/test_policies.py @@ -332,7 +332,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPolicies: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/test_service_tokens.py b/tests/api_resources/zero_trust/access/test_service_tokens.py index f6980f81209..ad2553a44c6 100644 --- a/tests/api_resources/zero_trust/access/test_service_tokens.py +++ b/tests/api_resources/zero_trust/access/test_service_tokens.py @@ -442,7 +442,9 @@ def test_path_params_rotate(self, client: Cloudflare) -> None: class TestAsyncServiceTokens: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/access/test_tags.py b/tests/api_resources/zero_trust/access/test_tags.py index 26cebba1a61..9c5aa48bc98 100644 --- a/tests/api_resources/zero_trust/access/test_tags.py +++ b/tests/api_resources/zero_trust/access/test_tags.py @@ -253,7 +253,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTags: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/test_users.py b/tests/api_resources/zero_trust/access/test_users.py index ae92054aec0..f87073d2ed5 100644 --- a/tests/api_resources/zero_trust/access/test_users.py +++ b/tests/api_resources/zero_trust/access/test_users.py @@ -68,7 +68,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncUsers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/users/test_active_sessions.py b/tests/api_resources/zero_trust/access/users/test_active_sessions.py index e0f1db9ea66..d9c41b65972 100644 --- a/tests/api_resources/zero_trust/access/users/test_active_sessions.py +++ b/tests/api_resources/zero_trust/access/users/test_active_sessions.py @@ -128,7 +128,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncActiveSessions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/users/test_failed_logins.py b/tests/api_resources/zero_trust/access/users/test_failed_logins.py index 697dbe9181f..293eddfd0e4 100644 --- a/tests/api_resources/zero_trust/access/users/test_failed_logins.py +++ b/tests/api_resources/zero_trust/access/users/test_failed_logins.py @@ -68,7 +68,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncFailedLogins: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py b/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py index 9b7d2644d33..5505fe5588a 100644 --- a/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py +++ b/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLastSeenIdentity: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/policies/custom/test_excludes.py b/tests/api_resources/zero_trust/devices/policies/custom/test_excludes.py index 3f6f640d871..54c1b30db1a 100644 --- a/tests/api_resources/zero_trust/devices/policies/custom/test_excludes.py +++ b/tests/api_resources/zero_trust/devices/policies/custom/test_excludes.py @@ -121,7 +121,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncExcludes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/policies/custom/test_fallback_domains.py b/tests/api_resources/zero_trust/devices/policies/custom/test_fallback_domains.py index f9396cb4b7a..c5a9ef3e156 100644 --- a/tests/api_resources/zero_trust/devices/policies/custom/test_fallback_domains.py +++ b/tests/api_resources/zero_trust/devices/policies/custom/test_fallback_domains.py @@ -121,7 +121,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFallbackDomains: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/policies/custom/test_includes.py b/tests/api_resources/zero_trust/devices/policies/custom/test_includes.py index 5a978a24fa8..51596f1cd73 100644 --- a/tests/api_resources/zero_trust/devices/policies/custom/test_includes.py +++ b/tests/api_resources/zero_trust/devices/policies/custom/test_includes.py @@ -121,7 +121,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIncludes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/policies/default/test_certificates.py b/tests/api_resources/zero_trust/devices/policies/default/test_certificates.py index 58b38f6c67e..62ddac10409 100644 --- a/tests/api_resources/zero_trust/devices/policies/default/test_certificates.py +++ b/tests/api_resources/zero_trust/devices/policies/default/test_certificates.py @@ -99,7 +99,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/policies/default/test_excludes.py b/tests/api_resources/zero_trust/devices/policies/default/test_excludes.py index d32898c6e0e..51781aace5e 100644 --- a/tests/api_resources/zero_trust/devices/policies/default/test_excludes.py +++ b/tests/api_resources/zero_trust/devices/policies/default/test_excludes.py @@ -100,7 +100,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncExcludes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/policies/default/test_fallback_domains.py b/tests/api_resources/zero_trust/devices/policies/default/test_fallback_domains.py index 13e16b48292..7d81d4d2265 100644 --- a/tests/api_resources/zero_trust/devices/policies/default/test_fallback_domains.py +++ b/tests/api_resources/zero_trust/devices/policies/default/test_fallback_domains.py @@ -100,7 +100,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFallbackDomains: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/policies/default/test_includes.py b/tests/api_resources/zero_trust/devices/policies/default/test_includes.py index eaed69ed067..89c4aebae8d 100644 --- a/tests/api_resources/zero_trust/devices/policies/default/test_includes.py +++ b/tests/api_resources/zero_trust/devices/policies/default/test_includes.py @@ -100,7 +100,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIncludes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/policies/test_custom.py b/tests/api_resources/zero_trust/devices/policies/test_custom.py index 29d15b73f25..324311c25b8 100644 --- a/tests/api_resources/zero_trust/devices/policies/test_custom.py +++ b/tests/api_resources/zero_trust/devices/policies/test_custom.py @@ -351,7 +351,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustom: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/devices/policies/test_default.py b/tests/api_resources/zero_trust/devices/policies/test_default.py index aeb1539e130..4e6dce31427 100644 --- a/tests/api_resources/zero_trust/devices/policies/test_default.py +++ b/tests/api_resources/zero_trust/devices/policies/test_default.py @@ -132,7 +132,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDefault: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/posture/test_integrations.py b/tests/api_resources/zero_trust/devices/posture/test_integrations.py index 35efacf4282..02edc0b9b20 100644 --- a/tests/api_resources/zero_trust/devices/posture/test_integrations.py +++ b/tests/api_resources/zero_trust/devices/posture/test_integrations.py @@ -312,7 +312,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIntegrations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/resilience/test_global_warp_override.py b/tests/api_resources/zero_trust/devices/resilience/test_global_warp_override.py index 6f3727f6460..f5d2c2974e5 100644 --- a/tests/api_resources/zero_trust/devices/resilience/test_global_warp_override.py +++ b/tests/api_resources/zero_trust/devices/resilience/test_global_warp_override.py @@ -111,7 +111,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncGlobalWARPOverride: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/test_devices_.py b/tests/api_resources/zero_trust/devices/test_devices_.py index 94c98cd4bb4..95440abceec 100644 --- a/tests/api_resources/zero_trust/devices/test_devices_.py +++ b/tests/api_resources/zero_trust/devices/test_devices_.py @@ -237,7 +237,9 @@ def test_path_params_revoke(self, client: Cloudflare) -> None: class TestAsyncDevices: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate prism error for invalid security scheme used") @parametrize diff --git a/tests/api_resources/zero_trust/devices/test_dex_tests.py b/tests/api_resources/zero_trust/devices/test_dex_tests.py index 7198475bd23..1bf2479ebe4 100644 --- a/tests/api_resources/zero_trust/devices/test_dex_tests.py +++ b/tests/api_resources/zero_trust/devices/test_dex_tests.py @@ -331,7 +331,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDEXTests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/test_fleet_status.py b/tests/api_resources/zero_trust/devices/test_fleet_status.py index 308864477e0..fa6ed7dbd72 100644 --- a/tests/api_resources/zero_trust/devices/test_fleet_status.py +++ b/tests/api_resources/zero_trust/devices/test_fleet_status.py @@ -83,7 +83,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFleetStatus: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/test_networks.py b/tests/api_resources/zero_trust/devices/test_networks.py index f09f4ba1555..09e1164f0be 100644 --- a/tests/api_resources/zero_trust/devices/test_networks.py +++ b/tests/api_resources/zero_trust/devices/test_networks.py @@ -279,7 +279,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncNetworks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/test_override_codes.py b/tests/api_resources/zero_trust/devices/test_override_codes.py index d3d41b67877..64cedbbaac8 100644 --- a/tests/api_resources/zero_trust/devices/test_override_codes.py +++ b/tests/api_resources/zero_trust/devices/test_override_codes.py @@ -131,7 +131,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOverrideCodes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate prism error for invalid security scheme used") @parametrize diff --git a/tests/api_resources/zero_trust/devices/test_posture.py b/tests/api_resources/zero_trust/devices/test_posture.py index 7df5498d5e8..36505a237d1 100644 --- a/tests/api_resources/zero_trust/devices/test_posture.py +++ b/tests/api_resources/zero_trust/devices/test_posture.py @@ -302,7 +302,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPosture: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/test_registrations.py b/tests/api_resources/zero_trust/devices/test_registrations.py index 544dcf13b36..9a3b5e4cda7 100644 --- a/tests/api_resources/zero_trust/devices/test_registrations.py +++ b/tests/api_resources/zero_trust/devices/test_registrations.py @@ -327,7 +327,9 @@ def test_path_params_unrevoke(self, client: Cloudflare) -> None: class TestAsyncRegistrations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate prism error for invalid security scheme used") @parametrize diff --git a/tests/api_resources/zero_trust/devices/test_revoke.py b/tests/api_resources/zero_trust/devices/test_revoke.py index df8b21c996e..285d2cebc88 100644 --- a/tests/api_resources/zero_trust/devices/test_revoke.py +++ b/tests/api_resources/zero_trust/devices/test_revoke.py @@ -68,7 +68,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncRevoke: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/test_settings.py b/tests/api_resources/zero_trust/devices/test_settings.py index 194a95ad61f..f4518b03567 100644 --- a/tests/api_resources/zero_trust/devices/test_settings.py +++ b/tests/api_resources/zero_trust/devices/test_settings.py @@ -195,7 +195,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/test_unrevoke.py b/tests/api_resources/zero_trust/devices/test_unrevoke.py index 4155a91a1c4..c48cd42d16c 100644 --- a/tests/api_resources/zero_trust/devices/test_unrevoke.py +++ b/tests/api_resources/zero_trust/devices/test_unrevoke.py @@ -68,7 +68,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncUnrevoke: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/commands/test_devices.py b/tests/api_resources/zero_trust/dex/commands/test_devices.py index be6707c9e2a..d364b9938d9 100644 --- a/tests/api_resources/zero_trust/dex/commands/test_devices.py +++ b/tests/api_resources/zero_trust/dex/commands/test_devices.py @@ -76,7 +76,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncDevices: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/commands/test_downloads.py b/tests/api_resources/zero_trust/dex/commands/test_downloads.py index 66711dbdd5a..d91195e566a 100644 --- a/tests/api_resources/zero_trust/dex/commands/test_downloads.py +++ b/tests/api_resources/zero_trust/dex/commands/test_downloads.py @@ -103,7 +103,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDownloads: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize @pytest.mark.respx(base_url=base_url) diff --git a/tests/api_resources/zero_trust/dex/commands/test_quota.py b/tests/api_resources/zero_trust/dex/commands/test_quota.py index 5291e9d3113..c3114be6849 100644 --- a/tests/api_resources/zero_trust/dex/commands/test_quota.py +++ b/tests/api_resources/zero_trust/dex/commands/test_quota.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncQuota: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py b/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py index c542c152c1b..c77565e0f06 100644 --- a/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py +++ b/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py @@ -98,7 +98,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncDevices: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py b/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py index 98fd5fd8ad4..6a6125e8a30 100644 --- a/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py +++ b/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py @@ -89,7 +89,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPercentiles: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/test_colos.py b/tests/api_resources/zero_trust/dex/test_colos.py index 8e4d0db4399..cb35c388539 100644 --- a/tests/api_resources/zero_trust/dex/test_colos.py +++ b/tests/api_resources/zero_trust/dex/test_colos.py @@ -75,7 +75,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncColos: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/test_commands.py b/tests/api_resources/zero_trust/dex/test_commands.py index 9692c4fde6c..0397c5dd48d 100644 --- a/tests/api_resources/zero_trust/dex/test_commands.py +++ b/tests/api_resources/zero_trust/dex/test_commands.py @@ -151,7 +151,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncCommands: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/test_fleet_status.py b/tests/api_resources/zero_trust/dex/test_fleet_status.py index db1676eacde..0c858737366 100644 --- a/tests/api_resources/zero_trust/dex/test_fleet_status.py +++ b/tests/api_resources/zero_trust/dex/test_fleet_status.py @@ -120,7 +120,9 @@ def test_path_params_over_time(self, client: Cloudflare) -> None: class TestAsyncFleetStatus: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_live(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/test_http_tests.py b/tests/api_resources/zero_trust/dex/test_http_tests.py index 21329525b50..47ab64b6035 100644 --- a/tests/api_resources/zero_trust/dex/test_http_tests.py +++ b/tests/api_resources/zero_trust/dex/test_http_tests.py @@ -95,7 +95,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHTTPTests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/test_tests.py b/tests/api_resources/zero_trust/dex/test_tests.py index 3c5a325a62c..cee5ea6d397 100644 --- a/tests/api_resources/zero_trust/dex/test_tests.py +++ b/tests/api_resources/zero_trust/dex/test_tests.py @@ -70,7 +70,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncTests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/test_traceroute_tests.py b/tests/api_resources/zero_trust/dex/test_traceroute_tests.py index e9c90169344..65eafd20ede 100644 --- a/tests/api_resources/zero_trust/dex/test_traceroute_tests.py +++ b/tests/api_resources/zero_trust/dex/test_traceroute_tests.py @@ -237,7 +237,9 @@ def test_path_params_percentiles(self, client: Cloudflare) -> None: class TestAsyncTracerouteTests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/test_warp_change_events.py b/tests/api_resources/zero_trust/dex/test_warp_change_events.py index 402089c3dc2..fa9309617f8 100644 --- a/tests/api_resources/zero_trust/dex/test_warp_change_events.py +++ b/tests/api_resources/zero_trust/dex/test_warp_change_events.py @@ -89,7 +89,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWARPChangeEvents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py b/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py index 04439705540..6a91c7b68c4 100644 --- a/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py +++ b/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py @@ -66,7 +66,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncUniqueDevices: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py b/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py index cde7d16b706..ca7f869da0b 100644 --- a/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py +++ b/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncNetworkPath: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/datasets/test_upload.py b/tests/api_resources/zero_trust/dlp/datasets/test_upload.py index 15c42ee5123..020210b6ecd 100644 --- a/tests/api_resources/zero_trust/dlp/datasets/test_upload.py +++ b/tests/api_resources/zero_trust/dlp/datasets/test_upload.py @@ -130,7 +130,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncUpload: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/datasets/test_versions.py b/tests/api_resources/zero_trust/dlp/datasets/test_versions.py index cb9b3c2c46c..6fa1f18a4ea 100755 --- a/tests/api_resources/zero_trust/dlp/datasets/test_versions.py +++ b/tests/api_resources/zero_trust/dlp/datasets/test_versions.py @@ -82,7 +82,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncVersions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/dlp/datasets/versions/test_entries.py b/tests/api_resources/zero_trust/dlp/datasets/versions/test_entries.py index 086fcceba69..6b705981752 100755 --- a/tests/api_resources/zero_trust/dlp/datasets/versions/test_entries.py +++ b/tests/api_resources/zero_trust/dlp/datasets/versions/test_entries.py @@ -95,7 +95,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncEntries: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/dlp/email/test_account_mapping.py b/tests/api_resources/zero_trust/dlp/email/test_account_mapping.py index 8c0e9f1aaad..a257b620e2a 100644 --- a/tests/api_resources/zero_trust/dlp/email/test_account_mapping.py +++ b/tests/api_resources/zero_trust/dlp/email/test_account_mapping.py @@ -122,7 +122,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAccountMapping: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/dlp/email/test_rules.py b/tests/api_resources/zero_trust/dlp/email/test_rules.py index e09032dad07..199e40dfe70 100644 --- a/tests/api_resources/zero_trust/dlp/email/test_rules.py +++ b/tests/api_resources/zero_trust/dlp/email/test_rules.py @@ -422,7 +422,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/profiles/test_custom.py b/tests/api_resources/zero_trust/dlp/profiles/test_custom.py index b2c3d4b3c8c..3cbbf67e3c4 100644 --- a/tests/api_resources/zero_trust/dlp/profiles/test_custom.py +++ b/tests/api_resources/zero_trust/dlp/profiles/test_custom.py @@ -308,7 +308,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustom: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py b/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py index 3b8f9b5b28d..ac97b878563 100644 --- a/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py +++ b/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py @@ -137,7 +137,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPredefined: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/test_datasets.py b/tests/api_resources/zero_trust/dlp/test_datasets.py index bba64c26030..6c5abd035ac 100644 --- a/tests/api_resources/zero_trust/dlp/test_datasets.py +++ b/tests/api_resources/zero_trust/dlp/test_datasets.py @@ -267,7 +267,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDatasets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/test_entries.py b/tests/api_resources/zero_trust/dlp/test_entries.py index d0a651e7f92..ab3097d2258 100644 --- a/tests/api_resources/zero_trust/dlp/test_entries.py +++ b/tests/api_resources/zero_trust/dlp/test_entries.py @@ -446,7 +446,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEntries: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/test_limits.py b/tests/api_resources/zero_trust/dlp/test_limits.py index ca7e470cfd6..1b728920c2c 100755 --- a/tests/api_resources/zero_trust/dlp/test_limits.py +++ b/tests/api_resources/zero_trust/dlp/test_limits.py @@ -57,7 +57,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncLimits: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/test_patterns.py b/tests/api_resources/zero_trust/dlp/test_patterns.py index f9bd0319a32..92f8176ec56 100644 --- a/tests/api_resources/zero_trust/dlp/test_patterns.py +++ b/tests/api_resources/zero_trust/dlp/test_patterns.py @@ -70,7 +70,9 @@ def test_path_params_validate(self, client: Cloudflare) -> None: class TestAsyncPatterns: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_validate(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/test_payload_logs.py b/tests/api_resources/zero_trust/dlp/test_payload_logs.py index 2d9c15c0be9..b868687bae1 100644 --- a/tests/api_resources/zero_trust/dlp/test_payload_logs.py +++ b/tests/api_resources/zero_trust/dlp/test_payload_logs.py @@ -103,7 +103,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPayloadLogs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/test_profiles.py b/tests/api_resources/zero_trust/dlp/test_profiles.py index 186567d9299..33177649778 100644 --- a/tests/api_resources/zero_trust/dlp/test_profiles.py +++ b/tests/api_resources/zero_trust/dlp/test_profiles.py @@ -114,7 +114,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncProfiles: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/configurations/test_custom_certificate.py b/tests/api_resources/zero_trust/gateway/configurations/test_custom_certificate.py index b5a8ec58cd0..37b130fd4c0 100644 --- a/tests/api_resources/zero_trust/gateway/configurations/test_custom_certificate.py +++ b/tests/api_resources/zero_trust/gateway/configurations/test_custom_certificate.py @@ -64,7 +64,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustomCertificate: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/lists/test_items.py b/tests/api_resources/zero_trust/gateway/lists/test_items.py index 9fcc52d42a2..5b17241871f 100644 --- a/tests/api_resources/zero_trust/gateway/lists/test_items.py +++ b/tests/api_resources/zero_trust/gateway/lists/test_items.py @@ -68,7 +68,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncItems: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_app_types.py b/tests/api_resources/zero_trust/gateway/test_app_types.py index 166d36defcd..f39d2bdec9c 100644 --- a/tests/api_resources/zero_trust/gateway/test_app_types.py +++ b/tests/api_resources/zero_trust/gateway/test_app_types.py @@ -58,7 +58,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAppTypes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py b/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py index 55ce02105b1..453b20dae93 100644 --- a/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py +++ b/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py @@ -137,7 +137,9 @@ def test_path_params_rotate_seed(self, client: Cloudflare) -> None: class TestAsyncAuditSSHSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_categories.py b/tests/api_resources/zero_trust/gateway/test_categories.py index 42d6ae3b4db..f03cd27897c 100644 --- a/tests/api_resources/zero_trust/gateway/test_categories.py +++ b/tests/api_resources/zero_trust/gateway/test_categories.py @@ -58,7 +58,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncCategories: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_certificates.py b/tests/api_resources/zero_trust/gateway/test_certificates.py index 5cbd3f90415..86e44845741 100644 --- a/tests/api_resources/zero_trust/gateway/test_certificates.py +++ b/tests/api_resources/zero_trust/gateway/test_certificates.py @@ -313,7 +313,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_configurations.py b/tests/api_resources/zero_trust/gateway/test_configurations.py index 9368b1e530d..0989237e3b7 100644 --- a/tests/api_resources/zero_trust/gateway/test_configurations.py +++ b/tests/api_resources/zero_trust/gateway/test_configurations.py @@ -45,7 +45,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "support_url": "support_url", }, }, - "app_control_settings": {"enabled": False}, "block_page": { "background_color": "background_color", "enabled": True, @@ -138,7 +137,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "support_url": "support_url", }, }, - "app_control_settings": {"enabled": False}, "block_page": { "background_color": "background_color", "enabled": True, @@ -247,7 +245,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfigurations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: @@ -273,7 +273,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "support_url": "support_url", }, }, - "app_control_settings": {"enabled": False}, "block_page": { "background_color": "background_color", "enabled": True, @@ -366,7 +365,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "support_url": "support_url", }, }, - "app_control_settings": {"enabled": False}, "block_page": { "background_color": "background_color", "enabled": True, diff --git a/tests/api_resources/zero_trust/gateway/test_lists.py b/tests/api_resources/zero_trust/gateway/test_lists.py index 4c81584d3e3..b9e375ba154 100644 --- a/tests/api_resources/zero_trust/gateway/test_lists.py +++ b/tests/api_resources/zero_trust/gateway/test_lists.py @@ -359,7 +359,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLists: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_locations.py b/tests/api_resources/zero_trust/gateway/test_locations.py index 0a629a61f6e..b53c7d4be82 100644 --- a/tests/api_resources/zero_trust/gateway/test_locations.py +++ b/tests/api_resources/zero_trust/gateway/test_locations.py @@ -306,7 +306,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLocations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_logging.py b/tests/api_resources/zero_trust/gateway/test_logging.py index 7c780cb3d9f..b2965923156 100644 --- a/tests/api_resources/zero_trust/gateway/test_logging.py +++ b/tests/api_resources/zero_trust/gateway/test_logging.py @@ -117,7 +117,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLogging: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py b/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py index 4e8f3d0db64..defe1467d67 100644 --- a/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py +++ b/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py @@ -258,7 +258,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncProxyEndpoints: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_rules.py b/tests/api_resources/zero_trust/gateway/test_rules.py index c5c5073136e..f8d10747e1f 100644 --- a/tests/api_resources/zero_trust/gateway/test_rules.py +++ b/tests/api_resources/zero_trust/gateway/test_rules.py @@ -534,7 +534,9 @@ def test_path_params_reset_expiration(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/identity_providers/scim/test_groups.py b/tests/api_resources/zero_trust/identity_providers/scim/test_groups.py index 36c7768d104..d02e38c40b4 100644 --- a/tests/api_resources/zero_trust/identity_providers/scim/test_groups.py +++ b/tests/api_resources/zero_trust/identity_providers/scim/test_groups.py @@ -79,7 +79,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/identity_providers/scim/test_users.py b/tests/api_resources/zero_trust/identity_providers/scim/test_users.py index 8c2ccc6de8c..3bfcf13c4f5 100644 --- a/tests/api_resources/zero_trust/identity_providers/scim/test_users.py +++ b/tests/api_resources/zero_trust/identity_providers/scim/test_users.py @@ -81,7 +81,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncUsers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/networks/routes/test_ips.py b/tests/api_resources/zero_trust/networks/routes/test_ips.py index f171b36a709..57b3495217c 100644 --- a/tests/api_resources/zero_trust/networks/routes/test_ips.py +++ b/tests/api_resources/zero_trust/networks/routes/test_ips.py @@ -77,7 +77,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIPs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/networks/routes/test_networks.py b/tests/api_resources/zero_trust/networks/routes/test_networks.py index ce1e6053a32..465079d2ace 100644 --- a/tests/api_resources/zero_trust/networks/routes/test_networks.py +++ b/tests/api_resources/zero_trust/networks/routes/test_networks.py @@ -217,7 +217,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncNetworks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/networks/subnets/test_cloudflare_source.py b/tests/api_resources/zero_trust/networks/subnets/test_cloudflare_source.py index 367f7785d4b..27a5af44aad 100644 --- a/tests/api_resources/zero_trust/networks/subnets/test_cloudflare_source.py +++ b/tests/api_resources/zero_trust/networks/subnets/test_cloudflare_source.py @@ -72,7 +72,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: class TestAsyncCloudflareSource: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/networks/test_routes.py b/tests/api_resources/zero_trust/networks/test_routes.py index 88876d04d01..8c2f63e0532 100644 --- a/tests/api_resources/zero_trust/networks/test_routes.py +++ b/tests/api_resources/zero_trust/networks/test_routes.py @@ -292,7 +292,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRoutes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/networks/test_subnets.py b/tests/api_resources/zero_trust/networks/test_subnets.py index 8e7f03de8e2..e8d64025ff2 100644 --- a/tests/api_resources/zero_trust/networks/test_subnets.py +++ b/tests/api_resources/zero_trust/networks/test_subnets.py @@ -76,7 +76,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncSubnets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/networks/test_virtual_networks.py b/tests/api_resources/zero_trust/networks/test_virtual_networks.py index b846dfe89ed..554ac67960b 100644 --- a/tests/api_resources/zero_trust/networks/test_virtual_networks.py +++ b/tests/api_resources/zero_trust/networks/test_virtual_networks.py @@ -279,7 +279,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVirtualNetworks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/organizations/test_doh.py b/tests/api_resources/zero_trust/organizations/test_doh.py index 58ac94ae30a..49e33e57776 100644 --- a/tests/api_resources/zero_trust/organizations/test_doh.py +++ b/tests/api_resources/zero_trust/organizations/test_doh.py @@ -104,7 +104,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDOH: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py b/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py index 3e0087721b2..84ee250e1d7 100644 --- a/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py +++ b/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncReferences: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py b/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py index 1e3527df1cc..3c6ca23a906 100644 --- a/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py +++ b/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py @@ -122,7 +122,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBehaviours: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/risk_scoring/test_integrations.py b/tests/api_resources/zero_trust/risk_scoring/test_integrations.py index 5ec6ae4e5ba..0584e0e27df 100644 --- a/tests/api_resources/zero_trust/risk_scoring/test_integrations.py +++ b/tests/api_resources/zero_trust/risk_scoring/test_integrations.py @@ -288,7 +288,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIntegrations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/risk_scoring/test_summary.py b/tests/api_resources/zero_trust/risk_scoring/test_summary.py index acf625187e5..b4ca1529021 100644 --- a/tests/api_resources/zero_trust/risk_scoring/test_summary.py +++ b/tests/api_resources/zero_trust/risk_scoring/test_summary.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/test_connectivity_settings.py b/tests/api_resources/zero_trust/test_connectivity_settings.py index 310f4319091..15836a2f91c 100644 --- a/tests/api_resources/zero_trust/test_connectivity_settings.py +++ b/tests/api_resources/zero_trust/test_connectivity_settings.py @@ -107,7 +107,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConnectivitySettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/test_devices.py b/tests/api_resources/zero_trust/test_devices.py index b6548ab51ef..fa02515657c 100644 --- a/tests/api_resources/zero_trust/test_devices.py +++ b/tests/api_resources/zero_trust/test_devices.py @@ -118,7 +118,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDevices: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/test_gateway.py b/tests/api_resources/zero_trust/test_gateway.py index 4f68a4f6c2c..c796464f9e9 100644 --- a/tests/api_resources/zero_trust/test_gateway.py +++ b/tests/api_resources/zero_trust/test_gateway.py @@ -95,7 +95,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncGateway: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/test_identity_providers.py b/tests/api_resources/zero_trust/test_identity_providers.py index fc69af496c7..f2e7458d904 100644 --- a/tests/api_resources/zero_trust/test_identity_providers.py +++ b/tests/api_resources/zero_trust/test_identity_providers.py @@ -2798,7 +2798,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIdentityProviders: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/test_organizations.py b/tests/api_resources/zero_trust/test_organizations.py index e900ad0d293..67c7718fd65 100644 --- a/tests/api_resources/zero_trust/test_organizations.py +++ b/tests/api_resources/zero_trust/test_organizations.py @@ -298,7 +298,9 @@ def test_path_params_revoke_users(self, client: Cloudflare) -> None: class TestAsyncOrganizations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/test_risk_scoring.py b/tests/api_resources/zero_trust/test_risk_scoring.py index 18653b789e8..9a8252864e0 100644 --- a/tests/api_resources/zero_trust/test_risk_scoring.py +++ b/tests/api_resources/zero_trust/test_risk_scoring.py @@ -115,7 +115,9 @@ def test_path_params_reset(self, client: Cloudflare) -> None: class TestAsyncRiskScoring: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/test_seats.py b/tests/api_resources/zero_trust/test_seats.py index b424abaee04..afd583e5546 100644 --- a/tests/api_resources/zero_trust/test_seats.py +++ b/tests/api_resources/zero_trust/test_seats.py @@ -90,7 +90,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncSeats: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/test_tunnels.py b/tests/api_resources/zero_trust/test_tunnels.py index b723b2b3327..eedc25523bc 100644 --- a/tests/api_resources/zero_trust/test_tunnels.py +++ b/tests/api_resources/zero_trust/test_tunnels.py @@ -78,7 +78,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncTunnels: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/tunnels/cloudflared/test_configurations.py b/tests/api_resources/zero_trust/tunnels/cloudflared/test_configurations.py index 2aa511ecfd1..0ccbba7e0ed 100644 --- a/tests/api_resources/zero_trust/tunnels/cloudflared/test_configurations.py +++ b/tests/api_resources/zero_trust/tunnels/cloudflared/test_configurations.py @@ -175,7 +175,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfigurations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/tunnels/cloudflared/test_connections.py b/tests/api_resources/zero_trust/tunnels/cloudflared/test_connections.py index 359c067b8af..76559a92398 100644 --- a/tests/api_resources/zero_trust/tunnels/cloudflared/test_connections.py +++ b/tests/api_resources/zero_trust/tunnels/cloudflared/test_connections.py @@ -125,7 +125,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConnections: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/tunnels/cloudflared/test_connectors.py b/tests/api_resources/zero_trust/tunnels/cloudflared/test_connectors.py index a18b48bb4d3..2b3d6203843 100644 --- a/tests/api_resources/zero_trust/tunnels/cloudflared/test_connectors.py +++ b/tests/api_resources/zero_trust/tunnels/cloudflared/test_connectors.py @@ -79,7 +79,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConnectors: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/tunnels/cloudflared/test_management.py b/tests/api_resources/zero_trust/tunnels/cloudflared/test_management.py index 366d43ed8eb..60cc2e6707e 100644 --- a/tests/api_resources/zero_trust/tunnels/cloudflared/test_management.py +++ b/tests/api_resources/zero_trust/tunnels/cloudflared/test_management.py @@ -71,7 +71,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncManagement: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/tunnels/cloudflared/test_token.py b/tests/api_resources/zero_trust/tunnels/cloudflared/test_token.py index bcd08c85974..afc44019f79 100644 --- a/tests/api_resources/zero_trust/tunnels/cloudflared/test_token.py +++ b/tests/api_resources/zero_trust/tunnels/cloudflared/test_token.py @@ -66,7 +66,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncToken: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/tunnels/test_cloudflared.py b/tests/api_resources/zero_trust/tunnels/test_cloudflared.py index 95c3ae6b27d..28740d8ed81 100644 --- a/tests/api_resources/zero_trust/tunnels/test_cloudflared.py +++ b/tests/api_resources/zero_trust/tunnels/test_cloudflared.py @@ -289,7 +289,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCloudflared: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/tunnels/test_warp_connector.py b/tests/api_resources/zero_trust/tunnels/test_warp_connector.py index 593001744cc..dee06560f20 100644 --- a/tests/api_resources/zero_trust/tunnels/test_warp_connector.py +++ b/tests/api_resources/zero_trust/tunnels/test_warp_connector.py @@ -279,7 +279,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWARPConnector: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/tunnels/warp_connector/test_token.py b/tests/api_resources/zero_trust/tunnels/warp_connector/test_token.py index 998afc6848e..2a2d98cc44d 100644 --- a/tests/api_resources/zero_trust/tunnels/warp_connector/test_token.py +++ b/tests/api_resources/zero_trust/tunnels/warp_connector/test_token.py @@ -66,7 +66,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncToken: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zones/test_activation_check.py b/tests/api_resources/zones/test_activation_check.py index a78a1d1567b..267737f406d 100644 --- a/tests/api_resources/zones/test_activation_check.py +++ b/tests/api_resources/zones/test_activation_check.py @@ -57,7 +57,9 @@ def test_path_params_trigger(self, client: Cloudflare) -> None: class TestAsyncActivationCheck: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_trigger(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zones/test_custom_nameservers.py b/tests/api_resources/zones/test_custom_nameservers.py index e3c7d509f44..48ba893c07a 100644 --- a/tests/api_resources/zones/test_custom_nameservers.py +++ b/tests/api_resources/zones/test_custom_nameservers.py @@ -124,7 +124,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustomNameservers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zones/test_holds.py b/tests/api_resources/zones/test_holds.py index b34e5066342..70446eb4e59 100644 --- a/tests/api_resources/zones/test_holds.py +++ b/tests/api_resources/zones/test_holds.py @@ -196,7 +196,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHolds: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zones/test_plans.py b/tests/api_resources/zones/test_plans.py index 4cd474090ce..216f4430f91 100644 --- a/tests/api_resources/zones/test_plans.py +++ b/tests/api_resources/zones/test_plans.py @@ -106,7 +106,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPlans: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zones/test_rate_plans.py b/tests/api_resources/zones/test_rate_plans.py index 656e6512dd1..d80b1b53cf1 100644 --- a/tests/api_resources/zones/test_rate_plans.py +++ b/tests/api_resources/zones/test_rate_plans.py @@ -58,7 +58,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRatePlans: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zones/test_settings.py b/tests/api_resources/zones/test_settings.py index e09e254556c..63985d634a6 100644 --- a/tests/api_resources/zones/test_settings.py +++ b/tests/api_resources/zones/test_settings.py @@ -184,7 +184,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zones/test_subscriptions.py b/tests/api_resources/zones/test_subscriptions.py index f99e737ef56..00bd212c993 100644 --- a/tests/api_resources/zones/test_subscriptions.py +++ b/tests/api_resources/zones/test_subscriptions.py @@ -167,7 +167,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSubscriptions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/conftest.py b/tests/conftest.py index 9ec5ce03747..4e9cf86222e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -6,10 +6,12 @@ import logging from typing import TYPE_CHECKING, Iterator, AsyncIterator +import httpx import pytest from pytest_asyncio import is_async_test -from cloudflare import Cloudflare, AsyncCloudflare +from cloudflare import Cloudflare, AsyncCloudflare, DefaultAioHttpClient +from cloudflare._utils import is_dict if TYPE_CHECKING: from _pytest.fixtures import FixtureRequest # pyright: ignore[reportPrivateImportUsage] @@ -27,6 +29,19 @@ def pytest_collection_modifyitems(items: list[pytest.Function]) -> None: for async_test in pytest_asyncio_tests: async_test.add_marker(session_scope_marker, append=False) + # We skip tests that use both the aiohttp client and respx_mock as respx_mock + # doesn't support custom transports. + for item in items: + if "async_client" not in item.fixturenames or "respx_mock" not in item.fixturenames: + continue + + if not hasattr(item, "callspec"): + continue + + async_client_param = item.callspec.params.get("async_client") + if is_dict(async_client_param) and async_client_param.get("http_client") == "aiohttp": + item.add_marker(pytest.mark.skip(reason="aiohttp client is not compatible with respx_mock")) + base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -48,11 +63,29 @@ def client(request: FixtureRequest) -> Iterator[Cloudflare]: @pytest.fixture(scope="session") async def async_client(request: FixtureRequest) -> AsyncIterator[AsyncCloudflare]: - strict = getattr(request, "param", True) - if not isinstance(strict, bool): - raise TypeError(f"Unexpected fixture parameter type {type(strict)}, expected {bool}") + param = getattr(request, "param", True) + + # defaults + strict = True + http_client: None | httpx.AsyncClient = None + + if isinstance(param, bool): + strict = param + elif is_dict(param): + strict = param.get("strict", True) + assert isinstance(strict, bool) + + http_client_type = param.get("http_client", "httpx") + if http_client_type == "aiohttp": + http_client = DefaultAioHttpClient() + else: + raise TypeError(f"Unexpected fixture parameter type {type(param)}, expected bool or dict") async with AsyncCloudflare( - base_url=base_url, api_key=api_key, api_email=api_email, _strict_response_validation=strict + base_url=base_url, + api_key=api_key, + api_email=api_email, + _strict_response_validation=strict, + http_client=http_client, ) as client: yield client diff --git a/tests/test_client.py b/tests/test_client.py index 71aea28019c..672c968e18f 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -23,9 +23,7 @@ from cloudflare import Cloudflare, AsyncCloudflare, APIResponseValidationError from cloudflare._types import Omit -from cloudflare._utils import maybe_transform from cloudflare._models import BaseModel, FinalRequestOptions -from cloudflare._constants import RAW_RESPONSE_HEADER from cloudflare._exceptions import APIStatusError, APITimeoutError, APIResponseValidationError from cloudflare._base_client import ( DEFAULT_TIMEOUT, @@ -35,7 +33,6 @@ DefaultAsyncHttpxClient, make_request_options, ) -from cloudflare.types.zones.zone_create_params import ZoneCreateParams from .utils import update_env @@ -207,6 +204,7 @@ def test_copy_signature(self) -> None: copy_param = copy_signature.parameters.get(name) assert copy_param is not None, f"copy() signature is missing the {name} param" + @pytest.mark.skipif(sys.version_info >= (3, 10), reason="fails because of a memory leak that started from 3.12") def test_copy_build_request(self) -> None: options = FinalRequestOptions(method="get", url="/foo") @@ -893,44 +891,21 @@ def test_parse_retry_after_header(self, remaining_retries: int, retry_after: str @mock.patch("cloudflare._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, client: Cloudflare) -> None: respx_mock.post("/zones").mock(side_effect=httpx.TimeoutException("Test timeout error")) with pytest.raises(APITimeoutError): - self.client.post( - "/zones", - body=cast( - object, - maybe_transform( - dict(account={"id": "023e105f4ecef8ad9ca31a8372d0c353"}, name="example.com", type="full"), - ZoneCreateParams, - ), - ), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) + client.zones.with_streaming_response.create(account={}, name="example.com").__enter__() assert _get_open_connections(self.client) == 0 @mock.patch("cloudflare._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, client: Cloudflare) -> None: respx_mock.post("/zones").mock(return_value=httpx.Response(500)) with pytest.raises(APIStatusError): - self.client.post( - "/zones", - body=cast( - object, - maybe_transform( - dict(account={"id": "023e105f4ecef8ad9ca31a8372d0c353"}, name="example.com", type="full"), - ZoneCreateParams, - ), - ), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) - + client.zones.with_streaming_response.create(account={}, name="example.com").__enter__() assert _get_open_connections(self.client) == 0 @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) @@ -1211,6 +1186,7 @@ def test_copy_signature(self) -> None: copy_param = copy_signature.parameters.get(name) assert copy_param is not None, f"copy() signature is missing the {name} param" + @pytest.mark.skipif(sys.version_info >= (3, 10), reason="fails because of a memory leak that started from 3.12") def test_copy_build_request(self) -> None: options = FinalRequestOptions(method="get", url="/foo") @@ -1821,44 +1797,25 @@ async def test_parse_retry_after_header(self, remaining_retries: int, retry_afte @mock.patch("cloudflare._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + async def test_retrying_timeout_errors_doesnt_leak( + self, respx_mock: MockRouter, async_client: AsyncCloudflare + ) -> None: respx_mock.post("/zones").mock(side_effect=httpx.TimeoutException("Test timeout error")) with pytest.raises(APITimeoutError): - await self.client.post( - "/zones", - body=cast( - object, - maybe_transform( - dict(account={"id": "023e105f4ecef8ad9ca31a8372d0c353"}, name="example.com", type="full"), - ZoneCreateParams, - ), - ), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) + await async_client.zones.with_streaming_response.create(account={}, name="example.com").__aenter__() assert _get_open_connections(self.client) == 0 @mock.patch("cloudflare._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + async def test_retrying_status_errors_doesnt_leak( + self, respx_mock: MockRouter, async_client: AsyncCloudflare + ) -> None: respx_mock.post("/zones").mock(return_value=httpx.Response(500)) with pytest.raises(APIStatusError): - await self.client.post( - "/zones", - body=cast( - object, - maybe_transform( - dict(account={"id": "023e105f4ecef8ad9ca31a8372d0c353"}, name="example.com", type="full"), - ZoneCreateParams, - ), - ), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) - + await async_client.zones.with_streaming_response.create(account={}, name="example.com").__aenter__() assert _get_open_connections(self.client) == 0 @pytest.mark.parametrize("failures_before_success", [0, 2, 4])