diff --git a/.stats.yml b/.stats.yml index fb9c1f9d86d..1d8d5af0d6f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1417 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b414602f316e30c6870beeb57670a6c2360a68b7b0b5e349d748700b7516ba29.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-53e6a4695205673e20c0dbbcda08991b451276b3681c9d776f98b85ddacf564a.yml diff --git a/src/cloudflare/resources/load_balancers/monitors/monitors.py b/src/cloudflare/resources/load_balancers/monitors/monitors.py index 44714f64f7e..b7dbe192fbe 100644 --- a/src/cloudflare/resources/load_balancers/monitors/monitors.py +++ b/src/cloudflare/resources/load_balancers/monitors/monitors.py @@ -78,12 +78,12 @@ def create( self, *, account_id: str, - expected_codes: str, allow_insecure: bool | NotGiven = NOT_GIVEN, consecutive_down: int | NotGiven = NOT_GIVEN, consecutive_up: int | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, expected_body: str | NotGiven = NOT_GIVEN, + expected_codes: str | NotGiven = NOT_GIVEN, follow_redirects: bool | NotGiven = NOT_GIVEN, header: Dict[str, List[str]] | NotGiven = NOT_GIVEN, interval: int | NotGiven = NOT_GIVEN, @@ -107,9 +107,6 @@ def create( Args: account_id: Identifier - expected_codes: The expected HTTP response code or code range of the health check. This - parameter is only valid for HTTP and HTTPS monitors. - allow_insecure: Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors. @@ -125,6 +122,9 @@ def create( is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors. + expected_codes: The expected HTTP response code or code range of the health check. This + parameter is only valid for HTTP and HTTPS monitors. + follow_redirects: Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors. @@ -170,12 +170,12 @@ def create( f"/accounts/{account_id}/load_balancers/monitors", body=maybe_transform( { - "expected_codes": expected_codes, "allow_insecure": allow_insecure, "consecutive_down": consecutive_down, "consecutive_up": consecutive_up, "description": description, "expected_body": expected_body, + "expected_codes": expected_codes, "follow_redirects": follow_redirects, "header": header, "interval": interval, @@ -204,12 +204,12 @@ def update( monitor_id: str, *, account_id: str, - expected_codes: str, allow_insecure: bool | NotGiven = NOT_GIVEN, consecutive_down: int | NotGiven = NOT_GIVEN, consecutive_up: int | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, expected_body: str | NotGiven = NOT_GIVEN, + expected_codes: str | NotGiven = NOT_GIVEN, follow_redirects: bool | NotGiven = NOT_GIVEN, header: Dict[str, List[str]] | NotGiven = NOT_GIVEN, interval: int | NotGiven = NOT_GIVEN, @@ -233,9 +233,6 @@ def update( Args: account_id: Identifier - expected_codes: The expected HTTP response code or code range of the health check. This - parameter is only valid for HTTP and HTTPS monitors. - allow_insecure: Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors. @@ -251,6 +248,9 @@ def update( is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors. + expected_codes: The expected HTTP response code or code range of the health check. This + parameter is only valid for HTTP and HTTPS monitors. + follow_redirects: Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors. @@ -298,12 +298,12 @@ def update( f"/accounts/{account_id}/load_balancers/monitors/{monitor_id}", body=maybe_transform( { - "expected_codes": expected_codes, "allow_insecure": allow_insecure, "consecutive_down": consecutive_down, "consecutive_up": consecutive_up, "description": description, "expected_body": expected_body, + "expected_codes": expected_codes, "follow_redirects": follow_redirects, "header": header, "interval": interval, @@ -410,12 +410,12 @@ def edit( monitor_id: str, *, account_id: str, - expected_codes: str, allow_insecure: bool | NotGiven = NOT_GIVEN, consecutive_down: int | NotGiven = NOT_GIVEN, consecutive_up: int | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, expected_body: str | NotGiven = NOT_GIVEN, + expected_codes: str | NotGiven = NOT_GIVEN, follow_redirects: bool | NotGiven = NOT_GIVEN, header: Dict[str, List[str]] | NotGiven = NOT_GIVEN, interval: int | NotGiven = NOT_GIVEN, @@ -439,9 +439,6 @@ def edit( Args: account_id: Identifier - expected_codes: The expected HTTP response code or code range of the health check. This - parameter is only valid for HTTP and HTTPS monitors. - allow_insecure: Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors. @@ -457,6 +454,9 @@ def edit( is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors. + expected_codes: The expected HTTP response code or code range of the health check. This + parameter is only valid for HTTP and HTTPS monitors. + follow_redirects: Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors. @@ -504,12 +504,12 @@ def edit( f"/accounts/{account_id}/load_balancers/monitors/{monitor_id}", body=maybe_transform( { - "expected_codes": expected_codes, "allow_insecure": allow_insecure, "consecutive_down": consecutive_down, "consecutive_up": consecutive_up, "description": description, "expected_body": expected_body, + "expected_codes": expected_codes, "follow_redirects": follow_redirects, "header": header, "interval": interval, @@ -608,12 +608,12 @@ async def create( self, *, account_id: str, - expected_codes: str, allow_insecure: bool | NotGiven = NOT_GIVEN, consecutive_down: int | NotGiven = NOT_GIVEN, consecutive_up: int | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, expected_body: str | NotGiven = NOT_GIVEN, + expected_codes: str | NotGiven = NOT_GIVEN, follow_redirects: bool | NotGiven = NOT_GIVEN, header: Dict[str, List[str]] | NotGiven = NOT_GIVEN, interval: int | NotGiven = NOT_GIVEN, @@ -637,9 +637,6 @@ async def create( Args: account_id: Identifier - expected_codes: The expected HTTP response code or code range of the health check. This - parameter is only valid for HTTP and HTTPS monitors. - allow_insecure: Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors. @@ -655,6 +652,9 @@ async def create( is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors. + expected_codes: The expected HTTP response code or code range of the health check. This + parameter is only valid for HTTP and HTTPS monitors. + follow_redirects: Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors. @@ -700,12 +700,12 @@ async def create( f"/accounts/{account_id}/load_balancers/monitors", body=await async_maybe_transform( { - "expected_codes": expected_codes, "allow_insecure": allow_insecure, "consecutive_down": consecutive_down, "consecutive_up": consecutive_up, "description": description, "expected_body": expected_body, + "expected_codes": expected_codes, "follow_redirects": follow_redirects, "header": header, "interval": interval, @@ -734,12 +734,12 @@ async def update( monitor_id: str, *, account_id: str, - expected_codes: str, allow_insecure: bool | NotGiven = NOT_GIVEN, consecutive_down: int | NotGiven = NOT_GIVEN, consecutive_up: int | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, expected_body: str | NotGiven = NOT_GIVEN, + expected_codes: str | NotGiven = NOT_GIVEN, follow_redirects: bool | NotGiven = NOT_GIVEN, header: Dict[str, List[str]] | NotGiven = NOT_GIVEN, interval: int | NotGiven = NOT_GIVEN, @@ -763,9 +763,6 @@ async def update( Args: account_id: Identifier - expected_codes: The expected HTTP response code or code range of the health check. This - parameter is only valid for HTTP and HTTPS monitors. - allow_insecure: Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors. @@ -781,6 +778,9 @@ async def update( is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors. + expected_codes: The expected HTTP response code or code range of the health check. This + parameter is only valid for HTTP and HTTPS monitors. + follow_redirects: Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors. @@ -828,12 +828,12 @@ async def update( f"/accounts/{account_id}/load_balancers/monitors/{monitor_id}", body=await async_maybe_transform( { - "expected_codes": expected_codes, "allow_insecure": allow_insecure, "consecutive_down": consecutive_down, "consecutive_up": consecutive_up, "description": description, "expected_body": expected_body, + "expected_codes": expected_codes, "follow_redirects": follow_redirects, "header": header, "interval": interval, @@ -940,12 +940,12 @@ async def edit( monitor_id: str, *, account_id: str, - expected_codes: str, allow_insecure: bool | NotGiven = NOT_GIVEN, consecutive_down: int | NotGiven = NOT_GIVEN, consecutive_up: int | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, expected_body: str | NotGiven = NOT_GIVEN, + expected_codes: str | NotGiven = NOT_GIVEN, follow_redirects: bool | NotGiven = NOT_GIVEN, header: Dict[str, List[str]] | NotGiven = NOT_GIVEN, interval: int | NotGiven = NOT_GIVEN, @@ -969,9 +969,6 @@ async def edit( Args: account_id: Identifier - expected_codes: The expected HTTP response code or code range of the health check. This - parameter is only valid for HTTP and HTTPS monitors. - allow_insecure: Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors. @@ -987,6 +984,9 @@ async def edit( is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors. + expected_codes: The expected HTTP response code or code range of the health check. This + parameter is only valid for HTTP and HTTPS monitors. + follow_redirects: Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors. @@ -1034,12 +1034,12 @@ async def edit( f"/accounts/{account_id}/load_balancers/monitors/{monitor_id}", body=await async_maybe_transform( { - "expected_codes": expected_codes, "allow_insecure": allow_insecure, "consecutive_down": consecutive_down, "consecutive_up": consecutive_up, "description": description, "expected_body": expected_body, + "expected_codes": expected_codes, "follow_redirects": follow_redirects, "header": header, "interval": interval, diff --git a/src/cloudflare/resources/load_balancers/monitors/previews.py b/src/cloudflare/resources/load_balancers/monitors/previews.py index 5a105f64a3c..bcddb93a21f 100644 --- a/src/cloudflare/resources/load_balancers/monitors/previews.py +++ b/src/cloudflare/resources/load_balancers/monitors/previews.py @@ -53,12 +53,12 @@ def create( monitor_id: str, *, account_id: str, - expected_codes: str, allow_insecure: bool | NotGiven = NOT_GIVEN, consecutive_down: int | NotGiven = NOT_GIVEN, consecutive_up: int | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, expected_body: str | NotGiven = NOT_GIVEN, + expected_codes: str | NotGiven = NOT_GIVEN, follow_redirects: bool | NotGiven = NOT_GIVEN, header: Dict[str, List[str]] | NotGiven = NOT_GIVEN, interval: int | NotGiven = NOT_GIVEN, @@ -84,9 +84,6 @@ def create( Args: account_id: Identifier - expected_codes: The expected HTTP response code or code range of the health check. This - parameter is only valid for HTTP and HTTPS monitors. - allow_insecure: Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors. @@ -102,6 +99,9 @@ def create( is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors. + expected_codes: The expected HTTP response code or code range of the health check. This + parameter is only valid for HTTP and HTTPS monitors. + follow_redirects: Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors. @@ -149,12 +149,12 @@ def create( f"/accounts/{account_id}/load_balancers/monitors/{monitor_id}/preview", body=maybe_transform( { - "expected_codes": expected_codes, "allow_insecure": allow_insecure, "consecutive_down": consecutive_down, "consecutive_up": consecutive_up, "description": description, "expected_body": expected_body, + "expected_codes": expected_codes, "follow_redirects": follow_redirects, "header": header, "interval": interval, @@ -204,12 +204,12 @@ async def create( monitor_id: str, *, account_id: str, - expected_codes: str, allow_insecure: bool | NotGiven = NOT_GIVEN, consecutive_down: int | NotGiven = NOT_GIVEN, consecutive_up: int | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, expected_body: str | NotGiven = NOT_GIVEN, + expected_codes: str | NotGiven = NOT_GIVEN, follow_redirects: bool | NotGiven = NOT_GIVEN, header: Dict[str, List[str]] | NotGiven = NOT_GIVEN, interval: int | NotGiven = NOT_GIVEN, @@ -235,9 +235,6 @@ async def create( Args: account_id: Identifier - expected_codes: The expected HTTP response code or code range of the health check. This - parameter is only valid for HTTP and HTTPS monitors. - allow_insecure: Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors. @@ -253,6 +250,9 @@ async def create( is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors. + expected_codes: The expected HTTP response code or code range of the health check. This + parameter is only valid for HTTP and HTTPS monitors. + follow_redirects: Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors. @@ -300,12 +300,12 @@ async def create( f"/accounts/{account_id}/load_balancers/monitors/{monitor_id}/preview", body=await async_maybe_transform( { - "expected_codes": expected_codes, "allow_insecure": allow_insecure, "consecutive_down": consecutive_down, "consecutive_up": consecutive_up, "description": description, "expected_body": expected_body, + "expected_codes": expected_codes, "follow_redirects": follow_redirects, "header": header, "interval": interval, diff --git a/src/cloudflare/resources/load_balancers/pools/health.py b/src/cloudflare/resources/load_balancers/pools/health.py index bc231f1b88b..1b80a29b524 100644 --- a/src/cloudflare/resources/load_balancers/pools/health.py +++ b/src/cloudflare/resources/load_balancers/pools/health.py @@ -54,12 +54,12 @@ def create( pool_id: str, *, account_id: str, - expected_codes: str, allow_insecure: bool | NotGiven = NOT_GIVEN, consecutive_down: int | NotGiven = NOT_GIVEN, consecutive_up: int | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, expected_body: str | NotGiven = NOT_GIVEN, + expected_codes: str | NotGiven = NOT_GIVEN, follow_redirects: bool | NotGiven = NOT_GIVEN, header: Dict[str, List[str]] | NotGiven = NOT_GIVEN, interval: int | NotGiven = NOT_GIVEN, @@ -85,9 +85,6 @@ def create( Args: account_id: Identifier - expected_codes: The expected HTTP response code or code range of the health check. This - parameter is only valid for HTTP and HTTPS monitors. - allow_insecure: Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors. @@ -103,6 +100,9 @@ def create( is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors. + expected_codes: The expected HTTP response code or code range of the health check. This + parameter is only valid for HTTP and HTTPS monitors. + follow_redirects: Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors. @@ -150,12 +150,12 @@ def create( f"/accounts/{account_id}/load_balancers/pools/{pool_id}/preview", body=maybe_transform( { - "expected_codes": expected_codes, "allow_insecure": allow_insecure, "consecutive_down": consecutive_down, "consecutive_up": consecutive_up, "description": description, "expected_body": expected_body, + "expected_codes": expected_codes, "follow_redirects": follow_redirects, "header": header, "interval": interval, @@ -247,12 +247,12 @@ async def create( pool_id: str, *, account_id: str, - expected_codes: str, allow_insecure: bool | NotGiven = NOT_GIVEN, consecutive_down: int | NotGiven = NOT_GIVEN, consecutive_up: int | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, expected_body: str | NotGiven = NOT_GIVEN, + expected_codes: str | NotGiven = NOT_GIVEN, follow_redirects: bool | NotGiven = NOT_GIVEN, header: Dict[str, List[str]] | NotGiven = NOT_GIVEN, interval: int | NotGiven = NOT_GIVEN, @@ -278,9 +278,6 @@ async def create( Args: account_id: Identifier - expected_codes: The expected HTTP response code or code range of the health check. This - parameter is only valid for HTTP and HTTPS monitors. - allow_insecure: Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors. @@ -296,6 +293,9 @@ async def create( is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors. + expected_codes: The expected HTTP response code or code range of the health check. This + parameter is only valid for HTTP and HTTPS monitors. + follow_redirects: Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors. @@ -343,12 +343,12 @@ async def create( f"/accounts/{account_id}/load_balancers/pools/{pool_id}/preview", body=await async_maybe_transform( { - "expected_codes": expected_codes, "allow_insecure": allow_insecure, "consecutive_down": consecutive_down, "consecutive_up": consecutive_up, "description": description, "expected_body": expected_body, + "expected_codes": expected_codes, "follow_redirects": follow_redirects, "header": header, "interval": interval, diff --git a/src/cloudflare/types/load_balancers/monitor_create_params.py b/src/cloudflare/types/load_balancers/monitor_create_params.py index 99eb83a7f2b..583d753a9f7 100644 --- a/src/cloudflare/types/load_balancers/monitor_create_params.py +++ b/src/cloudflare/types/load_balancers/monitor_create_params.py @@ -14,12 +14,6 @@ class MonitorCreateParams(TypedDict, total=False): account_id: Required[str] """Identifier""" - expected_codes: Required[str] - """The expected HTTP response code or code range of the health check. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - allow_insecure: bool """Do not validate the certificate when monitor use HTTPS. @@ -48,6 +42,12 @@ class MonitorCreateParams(TypedDict, total=False): parameter is only valid for HTTP and HTTPS monitors. """ + expected_codes: str + """The expected HTTP response code or code range of the health check. + + This parameter is only valid for HTTP and HTTPS monitors. + """ + follow_redirects: bool """Follow redirects if returned by the origin. diff --git a/src/cloudflare/types/load_balancers/monitor_edit_params.py b/src/cloudflare/types/load_balancers/monitor_edit_params.py index decb06b211c..38e365daefb 100644 --- a/src/cloudflare/types/load_balancers/monitor_edit_params.py +++ b/src/cloudflare/types/load_balancers/monitor_edit_params.py @@ -14,12 +14,6 @@ class MonitorEditParams(TypedDict, total=False): account_id: Required[str] """Identifier""" - expected_codes: Required[str] - """The expected HTTP response code or code range of the health check. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - allow_insecure: bool """Do not validate the certificate when monitor use HTTPS. @@ -48,6 +42,12 @@ class MonitorEditParams(TypedDict, total=False): parameter is only valid for HTTP and HTTPS monitors. """ + expected_codes: str + """The expected HTTP response code or code range of the health check. + + This parameter is only valid for HTTP and HTTPS monitors. + """ + follow_redirects: bool """Follow redirects if returned by the origin. diff --git a/src/cloudflare/types/load_balancers/monitor_update_params.py b/src/cloudflare/types/load_balancers/monitor_update_params.py index 00eb877ab16..4444d40b3b3 100644 --- a/src/cloudflare/types/load_balancers/monitor_update_params.py +++ b/src/cloudflare/types/load_balancers/monitor_update_params.py @@ -14,12 +14,6 @@ class MonitorUpdateParams(TypedDict, total=False): account_id: Required[str] """Identifier""" - expected_codes: Required[str] - """The expected HTTP response code or code range of the health check. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - allow_insecure: bool """Do not validate the certificate when monitor use HTTPS. @@ -48,6 +42,12 @@ class MonitorUpdateParams(TypedDict, total=False): parameter is only valid for HTTP and HTTPS monitors. """ + expected_codes: str + """The expected HTTP response code or code range of the health check. + + This parameter is only valid for HTTP and HTTPS monitors. + """ + follow_redirects: bool """Follow redirects if returned by the origin. diff --git a/src/cloudflare/types/load_balancers/monitors/preview_create_params.py b/src/cloudflare/types/load_balancers/monitors/preview_create_params.py index 4dbc8f1f929..fd69866ce2a 100644 --- a/src/cloudflare/types/load_balancers/monitors/preview_create_params.py +++ b/src/cloudflare/types/load_balancers/monitors/preview_create_params.py @@ -14,12 +14,6 @@ class PreviewCreateParams(TypedDict, total=False): account_id: Required[str] """Identifier""" - expected_codes: Required[str] - """The expected HTTP response code or code range of the health check. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - allow_insecure: bool """Do not validate the certificate when monitor use HTTPS. @@ -48,6 +42,12 @@ class PreviewCreateParams(TypedDict, total=False): parameter is only valid for HTTP and HTTPS monitors. """ + expected_codes: str + """The expected HTTP response code or code range of the health check. + + This parameter is only valid for HTTP and HTTPS monitors. + """ + follow_redirects: bool """Follow redirects if returned by the origin. diff --git a/src/cloudflare/types/load_balancers/pools/health_create_params.py b/src/cloudflare/types/load_balancers/pools/health_create_params.py index 05e044d8084..6191d4430df 100644 --- a/src/cloudflare/types/load_balancers/pools/health_create_params.py +++ b/src/cloudflare/types/load_balancers/pools/health_create_params.py @@ -14,12 +14,6 @@ class HealthCreateParams(TypedDict, total=False): account_id: Required[str] """Identifier""" - expected_codes: Required[str] - """The expected HTTP response code or code range of the health check. - - This parameter is only valid for HTTP and HTTPS monitors. - """ - allow_insecure: bool """Do not validate the certificate when monitor use HTTPS. @@ -48,6 +42,12 @@ class HealthCreateParams(TypedDict, total=False): parameter is only valid for HTTP and HTTPS monitors. """ + expected_codes: str + """The expected HTTP response code or code range of the health check. + + This parameter is only valid for HTTP and HTTPS monitors. + """ + follow_redirects: bool """Follow redirects if returned by the origin. diff --git a/tests/api_resources/load_balancers/monitors/test_previews.py b/tests/api_resources/load_balancers/monitors/test_previews.py index 41ee30b546c..931fab8ad2f 100644 --- a/tests/api_resources/load_balancers/monitors/test_previews.py +++ b/tests/api_resources/load_balancers/monitors/test_previews.py @@ -22,7 +22,6 @@ def test_method_create(self, client: Cloudflare) -> None: preview = client.load_balancers.monitors.previews.create( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert_matches_type(PreviewCreateResponse, preview, path=["response"]) @@ -31,12 +30,12 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: preview = client.load_balancers.monitors.previews.create( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", allow_insecure=True, consecutive_down=0, consecutive_up=0, description="Login page monitor", expected_body="alive", + expected_codes="2xx", follow_redirects=True, header={ "Host": ["example.com"], @@ -58,7 +57,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.previews.with_raw_response.create( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert response.is_closed is True @@ -71,7 +69,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: with client.load_balancers.monitors.previews.with_streaming_response.create( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +84,12 @@ def test_path_params_create(self, client: Cloudflare) -> None: client.load_balancers.monitors.previews.with_raw_response.create( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", - expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): client.load_balancers.monitors.previews.with_raw_response.create( monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) @@ -106,7 +101,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: preview = await async_client.load_balancers.monitors.previews.create( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert_matches_type(PreviewCreateResponse, preview, path=["response"]) @@ -115,12 +109,12 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare preview = await async_client.load_balancers.monitors.previews.create( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", allow_insecure=True, consecutive_down=0, consecutive_up=0, description="Login page monitor", expected_body="alive", + expected_codes="2xx", follow_redirects=True, header={ "Host": ["example.com"], @@ -142,7 +136,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.previews.with_raw_response.create( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert response.is_closed is True @@ -155,7 +148,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async with async_client.load_balancers.monitors.previews.with_streaming_response.create( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -171,12 +163,10 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: await async_client.load_balancers.monitors.previews.with_raw_response.create( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", - expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): await async_client.load_balancers.monitors.previews.with_raw_response.create( monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) diff --git a/tests/api_resources/load_balancers/pools/test_health.py b/tests/api_resources/load_balancers/pools/test_health.py index 8c8bcab99ed..11104c5d258 100644 --- a/tests/api_resources/load_balancers/pools/test_health.py +++ b/tests/api_resources/load_balancers/pools/test_health.py @@ -22,7 +22,6 @@ def test_method_create(self, client: Cloudflare) -> None: health = client.load_balancers.pools.health.create( pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert_matches_type(HealthCreateResponse, health, path=["response"]) @@ -31,12 +30,12 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: health = client.load_balancers.pools.health.create( pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", allow_insecure=True, consecutive_down=0, consecutive_up=0, description="Login page monitor", expected_body="alive", + expected_codes="2xx", follow_redirects=True, header={ "Host": ["example.com"], @@ -58,7 +57,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: response = client.load_balancers.pools.health.with_raw_response.create( pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert response.is_closed is True @@ -71,7 +69,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: with client.load_balancers.pools.health.with_streaming_response.create( pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +84,12 @@ def test_path_params_create(self, client: Cloudflare) -> None: client.load_balancers.pools.health.with_raw_response.create( pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", - expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): client.load_balancers.pools.health.with_raw_response.create( pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) @parametrize @@ -154,7 +149,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: health = await async_client.load_balancers.pools.health.create( pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert_matches_type(HealthCreateResponse, health, path=["response"]) @@ -163,12 +157,12 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare health = await async_client.load_balancers.pools.health.create( pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", allow_insecure=True, consecutive_down=0, consecutive_up=0, description="Login page monitor", expected_body="alive", + expected_codes="2xx", follow_redirects=True, header={ "Host": ["example.com"], @@ -190,7 +184,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.health.with_raw_response.create( pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert response.is_closed is True @@ -203,7 +196,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async with async_client.load_balancers.pools.health.with_streaming_response.create( pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -219,14 +211,12 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: await async_client.load_balancers.pools.health.with_raw_response.create( pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", - expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): await async_client.load_balancers.pools.health.with_raw_response.create( pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) @parametrize diff --git a/tests/api_resources/load_balancers/test_monitors.py b/tests/api_resources/load_balancers/test_monitors.py index be4ef2579d0..851afac1b0d 100644 --- a/tests/api_resources/load_balancers/test_monitors.py +++ b/tests/api_resources/load_balancers/test_monitors.py @@ -25,7 +25,6 @@ class TestMonitors: def test_method_create(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert_matches_type(Monitor, monitor, path=["response"]) @@ -33,12 +32,12 @@ def test_method_create(self, client: Cloudflare) -> None: def test_method_create_with_all_params(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", allow_insecure=True, consecutive_down=0, consecutive_up=0, description="Login page monitor", expected_body="alive", + expected_codes="2xx", follow_redirects=True, header={ "Host": ["example.com"], @@ -59,7 +58,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_create(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.with_raw_response.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert response.is_closed is True @@ -71,7 +69,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: def test_streaming_response_create(self, client: Cloudflare) -> None: with client.load_balancers.monitors.with_streaming_response.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -86,7 +83,6 @@ 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.load_balancers.monitors.with_raw_response.create( account_id="", - expected_codes="2xx", ) @parametrize @@ -94,7 +90,6 @@ def test_method_update(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.update( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert_matches_type(Monitor, monitor, path=["response"]) @@ -103,12 +98,12 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.update( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", allow_insecure=True, consecutive_down=0, consecutive_up=0, description="Login page monitor", expected_body="alive", + expected_codes="2xx", follow_redirects=True, header={ "Host": ["example.com"], @@ -130,7 +125,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.with_raw_response.update( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert response.is_closed is True @@ -143,7 +137,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: with client.load_balancers.monitors.with_streaming_response.update( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -159,14 +152,12 @@ def test_path_params_update(self, client: Cloudflare) -> None: client.load_balancers.monitors.with_raw_response.update( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", - expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): client.load_balancers.monitors.with_raw_response.update( monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) @parametrize @@ -260,7 +251,6 @@ def test_method_edit(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.edit( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert_matches_type(Monitor, monitor, path=["response"]) @@ -269,12 +259,12 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.edit( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", allow_insecure=True, consecutive_down=0, consecutive_up=0, description="Login page monitor", expected_body="alive", + expected_codes="2xx", follow_redirects=True, header={ "Host": ["example.com"], @@ -296,7 +286,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.with_raw_response.edit( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert response.is_closed is True @@ -309,7 +298,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.load_balancers.monitors.with_streaming_response.edit( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -325,14 +313,12 @@ def test_path_params_edit(self, client: Cloudflare) -> None: client.load_balancers.monitors.with_raw_response.edit( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", - expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): client.load_balancers.monitors.with_raw_response.edit( monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) @parametrize @@ -391,7 +377,6 @@ class TestAsyncMonitors: async def test_method_create(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert_matches_type(Monitor, monitor, path=["response"]) @@ -399,12 +384,12 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", allow_insecure=True, consecutive_down=0, consecutive_up=0, description="Login page monitor", expected_body="alive", + expected_codes="2xx", follow_redirects=True, header={ "Host": ["example.com"], @@ -425,7 +410,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.load_balancers.monitors.with_raw_response.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert response.is_closed is True @@ -437,7 +421,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.load_balancers.monitors.with_streaming_response.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -452,7 +435,6 @@ 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.load_balancers.monitors.with_raw_response.create( account_id="", - expected_codes="2xx", ) @parametrize @@ -460,7 +442,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.update( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert_matches_type(Monitor, monitor, path=["response"]) @@ -469,12 +450,12 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare monitor = await async_client.load_balancers.monitors.update( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", allow_insecure=True, consecutive_down=0, consecutive_up=0, description="Login page monitor", expected_body="alive", + expected_codes="2xx", follow_redirects=True, header={ "Host": ["example.com"], @@ -496,7 +477,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.with_raw_response.update( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert response.is_closed is True @@ -509,7 +489,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async with async_client.load_balancers.monitors.with_streaming_response.update( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -525,14 +504,12 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: await async_client.load_balancers.monitors.with_raw_response.update( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", - expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): await async_client.load_balancers.monitors.with_raw_response.update( monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) @parametrize @@ -626,7 +603,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.edit( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert_matches_type(Monitor, monitor, path=["response"]) @@ -635,12 +611,12 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) monitor = await async_client.load_balancers.monitors.edit( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", allow_insecure=True, consecutive_down=0, consecutive_up=0, description="Login page monitor", expected_body="alive", + expected_codes="2xx", follow_redirects=True, header={ "Host": ["example.com"], @@ -662,7 +638,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.with_raw_response.edit( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) assert response.is_closed is True @@ -675,7 +650,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async with async_client.load_balancers.monitors.with_streaming_response.edit( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -691,14 +665,12 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: await async_client.load_balancers.monitors.with_raw_response.edit( monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", - expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): await async_client.load_balancers.monitors.with_raw_response.edit( monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - expected_codes="2xx", ) @parametrize