diff --git a/scaleway-async/scaleway_async/edge_services/v1beta1/api.py b/scaleway-async/scaleway_async/edge_services/v1beta1/api.py index d28be38e5..bf5e1bfef 100644 --- a/scaleway-async/scaleway_async/edge_services/v1beta1/api.py +++ b/scaleway-async/scaleway_async/edge_services/v1beta1/api.py @@ -1186,6 +1186,7 @@ async def create_cache_stage( self, *, fallback_ttl: Optional[str] = None, + include_cookies: Optional[bool] = None, backend_stage_id: Optional[str] = None, pipeline_id: str, waf_stage_id: Optional[str] = None, @@ -1195,6 +1196,7 @@ async def create_cache_stage( Create cache stage. Create a new cache stage. You must specify the `fallback_ttl` field to customize the TTL of the cache. :param fallback_ttl: Time To Live (TTL) in seconds. Defines how long content is cached. + :param include_cookies: Defines whether responses to requests with cookies must be stored in the cache. :param backend_stage_id: Backend stage ID the cache stage will be linked to. One-Of ('next'): at most one of 'backend_stage_id', 'waf_stage_id', 'route_stage_id' could be set. :param pipeline_id: Pipeline ID the Cache stage belongs to. @@ -1220,6 +1222,7 @@ async def create_cache_stage( body=marshal_CreateCacheStageRequest( CreateCacheStageRequest( fallback_ttl=fallback_ttl, + include_cookies=include_cookies, pipeline_id=pipeline_id, backend_stage_id=backend_stage_id, waf_stage_id=waf_stage_id, @@ -1266,15 +1269,17 @@ async def update_cache_stage( *, cache_stage_id: str, fallback_ttl: Optional[str] = None, + include_cookies: Optional[bool] = None, backend_stage_id: Optional[str] = None, waf_stage_id: Optional[str] = None, route_stage_id: Optional[str] = None, ) -> CacheStage: """ Update cache stage. - Update the parameters of an existing cache stage, specified by its `cache_stage_id`. Parameters which can be updated include the `fallback_ttl` and `backend_stage_id`. + Update the parameters of an existing cache stage, specified by its `cache_stage_id`. Parameters which can be updated include the `fallback_ttl`, `include_cookies` and `backend_stage_id`. :param cache_stage_id: ID of the cache stage to update. :param fallback_ttl: Time To Live (TTL) in seconds. Defines how long content is cached. + :param include_cookies: Defines whether responses to requests with cookies must be stored in the cache. :param backend_stage_id: Backend stage ID the cache stage will be linked to. One-Of ('next'): at most one of 'backend_stage_id', 'waf_stage_id', 'route_stage_id' could be set. :param waf_stage_id: @@ -1300,6 +1305,7 @@ async def update_cache_stage( UpdateCacheStageRequest( cache_stage_id=cache_stage_id, fallback_ttl=fallback_ttl, + include_cookies=include_cookies, backend_stage_id=backend_stage_id, waf_stage_id=waf_stage_id, route_stage_id=route_stage_id, diff --git a/scaleway-async/scaleway_async/edge_services/v1beta1/marshalling.py b/scaleway-async/scaleway_async/edge_services/v1beta1/marshalling.py index b01c7d7cf..464cfcc1e 100644 --- a/scaleway-async/scaleway_async/edge_services/v1beta1/marshalling.py +++ b/scaleway-async/scaleway_async/edge_services/v1beta1/marshalling.py @@ -226,6 +226,10 @@ def unmarshal_CacheStage(data: Any) -> CacheStage: if field is not None: args["pipeline_id"] = field + field = data.get("include_cookies", None) + if field is not None: + args["include_cookies"] = field + field = data.get("fallback_ttl", None) if field is not None: args["fallback_ttl"] = field @@ -1516,6 +1520,9 @@ def marshal_CreateCacheStageRequest( if request.fallback_ttl is not None: output["fallback_ttl"] = request.fallback_ttl + if request.include_cookies is not None: + output["include_cookies"] = request.include_cookies + return output @@ -1783,6 +1790,9 @@ def marshal_UpdateCacheStageRequest( if request.fallback_ttl is not None: output["fallback_ttl"] = request.fallback_ttl + if request.include_cookies is not None: + output["include_cookies"] = request.include_cookies + return output diff --git a/scaleway-async/scaleway_async/edge_services/v1beta1/types.py b/scaleway-async/scaleway_async/edge_services/v1beta1/types.py index 5172a74aa..22254f04e 100644 --- a/scaleway-async/scaleway_async/edge_services/v1beta1/types.py +++ b/scaleway-async/scaleway_async/edge_services/v1beta1/types.py @@ -402,6 +402,11 @@ class CacheStage: Pipeline ID the cache stage belongs to. """ + include_cookies: bool + """ + Defines whether responses to requests with cookies must be stored in the cache. + """ + fallback_ttl: Optional[str] """ Time To Live (TTL) in seconds. Defines how long content is cached. @@ -849,6 +854,11 @@ class CreateCacheStageRequest: Time To Live (TTL) in seconds. Defines how long content is cached. """ + include_cookies: Optional[bool] + """ + Defines whether responses to requests with cookies must be stored in the cache. + """ + pipeline_id: str """ Pipeline ID the Cache stage belongs to. @@ -1700,6 +1710,11 @@ class UpdateCacheStageRequest: Time To Live (TTL) in seconds. Defines how long content is cached. """ + include_cookies: Optional[bool] + """ + Defines whether responses to requests with cookies must be stored in the cache. + """ + backend_stage_id: Optional[str] waf_stage_id: Optional[str] diff --git a/scaleway/scaleway/edge_services/v1beta1/api.py b/scaleway/scaleway/edge_services/v1beta1/api.py index 6446a5fa9..2eed44b2e 100644 --- a/scaleway/scaleway/edge_services/v1beta1/api.py +++ b/scaleway/scaleway/edge_services/v1beta1/api.py @@ -1184,6 +1184,7 @@ def create_cache_stage( self, *, fallback_ttl: Optional[str] = None, + include_cookies: Optional[bool] = None, backend_stage_id: Optional[str] = None, pipeline_id: str, waf_stage_id: Optional[str] = None, @@ -1193,6 +1194,7 @@ def create_cache_stage( Create cache stage. Create a new cache stage. You must specify the `fallback_ttl` field to customize the TTL of the cache. :param fallback_ttl: Time To Live (TTL) in seconds. Defines how long content is cached. + :param include_cookies: Defines whether responses to requests with cookies must be stored in the cache. :param backend_stage_id: Backend stage ID the cache stage will be linked to. One-Of ('next'): at most one of 'backend_stage_id', 'waf_stage_id', 'route_stage_id' could be set. :param pipeline_id: Pipeline ID the Cache stage belongs to. @@ -1218,6 +1220,7 @@ def create_cache_stage( body=marshal_CreateCacheStageRequest( CreateCacheStageRequest( fallback_ttl=fallback_ttl, + include_cookies=include_cookies, pipeline_id=pipeline_id, backend_stage_id=backend_stage_id, waf_stage_id=waf_stage_id, @@ -1264,15 +1267,17 @@ def update_cache_stage( *, cache_stage_id: str, fallback_ttl: Optional[str] = None, + include_cookies: Optional[bool] = None, backend_stage_id: Optional[str] = None, waf_stage_id: Optional[str] = None, route_stage_id: Optional[str] = None, ) -> CacheStage: """ Update cache stage. - Update the parameters of an existing cache stage, specified by its `cache_stage_id`. Parameters which can be updated include the `fallback_ttl` and `backend_stage_id`. + Update the parameters of an existing cache stage, specified by its `cache_stage_id`. Parameters which can be updated include the `fallback_ttl`, `include_cookies` and `backend_stage_id`. :param cache_stage_id: ID of the cache stage to update. :param fallback_ttl: Time To Live (TTL) in seconds. Defines how long content is cached. + :param include_cookies: Defines whether responses to requests with cookies must be stored in the cache. :param backend_stage_id: Backend stage ID the cache stage will be linked to. One-Of ('next'): at most one of 'backend_stage_id', 'waf_stage_id', 'route_stage_id' could be set. :param waf_stage_id: @@ -1298,6 +1303,7 @@ def update_cache_stage( UpdateCacheStageRequest( cache_stage_id=cache_stage_id, fallback_ttl=fallback_ttl, + include_cookies=include_cookies, backend_stage_id=backend_stage_id, waf_stage_id=waf_stage_id, route_stage_id=route_stage_id, diff --git a/scaleway/scaleway/edge_services/v1beta1/marshalling.py b/scaleway/scaleway/edge_services/v1beta1/marshalling.py index b01c7d7cf..464cfcc1e 100644 --- a/scaleway/scaleway/edge_services/v1beta1/marshalling.py +++ b/scaleway/scaleway/edge_services/v1beta1/marshalling.py @@ -226,6 +226,10 @@ def unmarshal_CacheStage(data: Any) -> CacheStage: if field is not None: args["pipeline_id"] = field + field = data.get("include_cookies", None) + if field is not None: + args["include_cookies"] = field + field = data.get("fallback_ttl", None) if field is not None: args["fallback_ttl"] = field @@ -1516,6 +1520,9 @@ def marshal_CreateCacheStageRequest( if request.fallback_ttl is not None: output["fallback_ttl"] = request.fallback_ttl + if request.include_cookies is not None: + output["include_cookies"] = request.include_cookies + return output @@ -1783,6 +1790,9 @@ def marshal_UpdateCacheStageRequest( if request.fallback_ttl is not None: output["fallback_ttl"] = request.fallback_ttl + if request.include_cookies is not None: + output["include_cookies"] = request.include_cookies + return output diff --git a/scaleway/scaleway/edge_services/v1beta1/types.py b/scaleway/scaleway/edge_services/v1beta1/types.py index 5172a74aa..22254f04e 100644 --- a/scaleway/scaleway/edge_services/v1beta1/types.py +++ b/scaleway/scaleway/edge_services/v1beta1/types.py @@ -402,6 +402,11 @@ class CacheStage: Pipeline ID the cache stage belongs to. """ + include_cookies: bool + """ + Defines whether responses to requests with cookies must be stored in the cache. + """ + fallback_ttl: Optional[str] """ Time To Live (TTL) in seconds. Defines how long content is cached. @@ -849,6 +854,11 @@ class CreateCacheStageRequest: Time To Live (TTL) in seconds. Defines how long content is cached. """ + include_cookies: Optional[bool] + """ + Defines whether responses to requests with cookies must be stored in the cache. + """ + pipeline_id: str """ Pipeline ID the Cache stage belongs to. @@ -1700,6 +1710,11 @@ class UpdateCacheStageRequest: Time To Live (TTL) in seconds. Defines how long content is cached. """ + include_cookies: Optional[bool] + """ + Defines whether responses to requests with cookies must be stored in the cache. + """ + backend_stage_id: Optional[str] waf_stage_id: Optional[str]