diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 21d8baf0..30235252 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,7 +63,7 @@ jobs: - name: Get GitHub OIDC Token if: github.repository == 'stainless-sdks/gcore-python' id: github-oidc - uses: actions/github-script@v6 + uses: actions/github-script@v8 with: script: core.setOutput('github_token', await core.getIDToken()); diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 554e34bb..f81bf992 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.30.0" + ".": "0.31.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index f6bc2e9b..839f1657 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 645 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-2d64161889a53046ca5e593a772328a5290246c3d74f8c07fed1037feae1bdbc.yml -openapi_spec_hash: 2360d25764d74e6972cf600fcd20fd4e -config_hash: e9e5b750687e9071d8b606963f0ffd6d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-f9e3248b7c9cc29017d94b17dd33fbc7b3eaa4eda92c1c7202b41b8cca84bc33.yml +openapi_spec_hash: cb53ad5e99f343ea9adc322d9f805b63 +config_hash: 98f7a9b9463b6248408d48a4adbb14d3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1511c56c..60afbd8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 0.31.0 (2026-01-28) + +Full Changelog: [v0.30.0...v0.31.0](https://github.com/G-Core/gcore-python/compare/v0.30.0...v0.31.0) + +### Features + +* **api:** aggregated API specs update ([a7076d0](https://github.com/G-Core/gcore-python/commit/a7076d04fa78e4ea71b148ef8c10d0013536e904)) +* **api:** manual upload of aggregated API specs ([47734d2](https://github.com/G-Core/gcore-python/commit/47734d2b4fcd22875d2ec80b2b0453600b912eca)) + + +### Chores + +* **ci:** upgrade `actions/github-script` ([a2328c0](https://github.com/G-Core/gcore-python/commit/a2328c02b6d94f8af8cdeb7dbc72d81f1e2d17d0)) + ## 0.30.0 (2026-01-22) Full Changelog: [v0.29.0...v0.30.0](https://github.com/G-Core/gcore-python/compare/v0.29.0...v0.30.0) diff --git a/pyproject.toml b/pyproject.toml index 26af6423..3ad9b84a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "gcore" -version = "0.30.0" +version = "0.31.0" description = "The official Python library for the gcore API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/gcore/_version.py b/src/gcore/_version.py index 574d5dd3..d06a94b9 100644 --- a/src/gcore/_version.py +++ b/src/gcore/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "gcore" -__version__ = "0.30.0" # x-release-please-version +__version__ = "0.31.0" # x-release-please-version diff --git a/src/gcore/resources/dns/metrics.py b/src/gcore/resources/dns/metrics.py index 3359b610..918583f4 100644 --- a/src/gcore/resources/dns/metrics.py +++ b/src/gcore/resources/dns/metrics.py @@ -58,8 +58,8 @@ def list( Example of success response: ``` - # HELP healthcheck_state The `healthcheck_state` metric reflects the state of a specific monitor after conducting a health check - # TYPE healthcheck_state gauge + HELP healthcheck_state The `healthcheck_state` metric reflects the state of a specific monitor after conducting a health check + TYPE healthcheck_state gauge healthcheck_state{client_id="1",monitor_id="431",monitor_locations="us-east-1,us-west-1",monitor_name="test-monitor-1",monitor_type="http",rrset_name="rrset-name1",rrset_type="rrset-type1",zone_name="zone-name1"} 0 healthcheck_state{client_id="1",monitor_id="4871",monitor_locations="fr-1,fr-2",monitor_name="test-monitor-2",monitor_type="tcp",rrset_name="rrset-name2",rrset_type="rrset-type2",zone_name="zone-name2"} 1 healthcheck_state{client_id="2",monitor_id="7123",monitor_locations="ua-1,ua-2",monitor_name="test-monitor-3",monitor_type="icmp",rrset_name="rrset-name3",rrset_type="rrset-type3",zone_name="zone-name3"} 0 @@ -136,8 +136,8 @@ async def list( Example of success response: ``` - # HELP healthcheck_state The `healthcheck_state` metric reflects the state of a specific monitor after conducting a health check - # TYPE healthcheck_state gauge + HELP healthcheck_state The `healthcheck_state` metric reflects the state of a specific monitor after conducting a health check + TYPE healthcheck_state gauge healthcheck_state{client_id="1",monitor_id="431",monitor_locations="us-east-1,us-west-1",monitor_name="test-monitor-1",monitor_type="http",rrset_name="rrset-name1",rrset_type="rrset-type1",zone_name="zone-name1"} 0 healthcheck_state{client_id="1",monitor_id="4871",monitor_locations="fr-1,fr-2",monitor_name="test-monitor-2",monitor_type="tcp",rrset_name="rrset-name2",rrset_type="rrset-type2",zone_name="zone-name2"} 1 healthcheck_state{client_id="2",monitor_id="7123",monitor_locations="ua-1,ua-2",monitor_name="test-monitor-3",monitor_type="icmp",rrset_name="rrset-name3",rrset_type="rrset-type3",zone_name="zone-name3"} 0 diff --git a/src/gcore/resources/dns/zones/rrsets.py b/src/gcore/resources/dns/zones/rrsets.py index b1ab12a5..736b590d 100644 --- a/src/gcore/resources/dns/zones/rrsets.py +++ b/src/gcore/resources/dns/zones/rrsets.py @@ -72,32 +72,27 @@ def create( Add the RRSet to the zone specified by zoneName, RRSets can be configured to be either dynamic or static. - ### Static RRsets - - Staticly configured RRSets provide DNS responses as is. - - ### Dynamic RRsets - - Dynamic RRSets have picker configuration defined thus it's possible to finely - customize DNS response. Picking rules are defined on the RRSet level as a list - of selectors, filters and mutators. Picker considers different resource records - metadata, requestor IP, and other event-feeds like monitoring. Picker - configuration is an ordered list defined by "pickers" attribute. Requestor IP is - determined by EDNS Client Subnet (ECS) if defined, otherwise - by - client/recursor IP. Selector pickers are used in the specified order until the - first match, in case of match - all next selectors are bypassed. Filters or - mutators are applied to the match according to the order they are specified. + Static RRsets Staticly configured RRSets provide DNS responses as is. + + Dynamic RRsets Dynamic RRSets have picker configuration defined thus it's + possible to finely customize DNS response. Picking rules are defined on the + RRSet level as a list of selectors, filters and mutators. Picker considers + different resource records metadata, requestor IP, and other event-feeds like + monitoring. Picker configuration is an ordered list defined by "pickers" + attribute. Requestor IP is determined by EDNS Client Subnet (ECS) if defined, + otherwise - by client/recursor IP. Selector pickers are used in the specified + order until the first match, in case of match - all next selectors are bypassed. + Filters or mutators are applied to the match according to the order they are + specified. For example, sort records by proximity to user, shuffle based on weights and return not more than 3: `"pickers": [ { "type": "geodistance" }, { "type": "weighted_shuffle" }, { "type": "first_n", "limit": 3 } ]` - #### geodns filter - - A resource record is included in the answer if resource record's metadata - matches requestor info. For each resource record in RRSet, the following - metadata is considered (in the order specified): + geodns filter A resource record is included in the answer if resource record's + metadata matches requestor info. For each resource record in RRSet, the + following metadata is considered (in the order specified): - `ip` - list of network addresses in CIDR format, e.g. `["192.168.15.150/25", "2003:de:2016::/48"]`; @@ -114,91 +109,71 @@ def create( Example: `"pickers": [ { "type": "geodns", "strict": true } ]` - ##### Strict parameter - - `strict: true` means that if no records percolate through the geodns filter it - returns no answers. `strict: false` means that if no records percolate through - the geodns filter, all records are passed over. + Strict parameter `strict: true` means that if no records percolate through the + geodns filter it returns no answers. `strict: false` means that if no records + percolate through the geodns filter, all records are passed over. - #### asn selector - - Resource records which ASN metadata matches ASN of the requestor are picked by - this selector, and passed to the next non-selector picker, if there is no - match - next configured picker starts with all records. + asn selector Resource records which ASN metadata matches ASN of the requestor + are picked by this selector, and passed to the next non-selector picker, if + there is no match - next configured picker starts with all records. Example: `"pickers": [ {"type": "asn"} ]` - #### country selector - - Resource records which country metadata matches country of the requestor are - picked by this selector, and passed to the next non-selector picker, if there is - no match - next configured picker starts with all records. + country selector Resource records which country metadata matches country of the + requestor are picked by this selector, and passed to the next non-selector + picker, if there is no match - next configured picker starts with all records. Example: `"pickers": [ { "type": "country" } ]` - #### continent selector - - Resource records which continent metadata matches continent of the requestor are - picked by this selector, and passed to the next non-selector picker, if there is - no match - next configured picker starts with all records. + continent selector Resource records which continent metadata matches continent + of the requestor are picked by this selector, and passed to the next + non-selector picker, if there is no match - next configured picker starts with + all records. Example: `"pickers": [ { "type": "continent" } ]` - #### region selector - - Resource records which region metadata matches region of the requestor are - picked by this selector, and passed to the next non-selector picker, if there is - no match - next configured picker starts with all records. e.g. `fr-nor` for - France/Normandy. + region selector Resource records which region metadata matches region of the + requestor are picked by this selector, and passed to the next non-selector + picker, if there is no match - next configured picker starts with all records. + e.g. `fr-nor` for France/Normandy. Example: `"pickers": [ { "type": "region" } ]` - #### ip selector - - Resource records which IP metadata matches IP of the requestor are picked by - this selector, and passed to the next non-selector picker, if there is no - match - next configured picker starts with all records. Maximum 100 subnets are - allowed to specify in meta of RR. + ip selector Resource records which IP metadata matches IP of the requestor are + picked by this selector, and passed to the next non-selector picker, if there is + no match - next configured picker starts with all records. Maximum 100 subnets + are allowed to specify in meta of RR. Example: `"pickers": [ { "type": "ip" } ]` - #### default selector - - When enabled, records marked as default are selected: + default selector When enabled, records marked as default are selected: `"meta": {"default": true}`. Example: `"pickers": [ { "type": "geodns", "strict": false }, { "type": "default" }, { "type": "first_n", "limit": 2 } ]` - #### geodistance mutator - - The resource records are rearranged in ascending order based on the distance (in - meters) from requestor to the coordinates specified in latlong metadata. - Distance is calculated using Haversine formula. The "nearest" to the user's IP - RR goes first. The records without latlong metadata come last. e.g. for Berlin - `[52.520008, 13.404954]`.; + geodistance mutator The resource records are rearranged in ascending order based + on the distance (in meters) from requestor to the coordinates specified in + latlong metadata. Distance is calculated using Haversine formula. The "nearest" + to the user's IP RR goes first. The records without latlong metadata come last. + e.g. for Berlin `[52.520008, 13.404954]`.; In this configuration the only "nearest" to the requestor record to be returned: `"pickers": [ { "type": "geodistance" }, { "type": "first_n", "limit": 1 } ]` - #### `weighted_shuffle` mutator - - The resource records are rearranged in random order based on the `weight` - metadata. Default weight (if not specified) is 50. + `weighted_shuffle` mutator The resource records are rearranged in random order + based on the `weight` metadata. Default weight (if not specified) is 50. Example: `"pickers": [ { "type": "weighted_shuffle" } ]` - #### `first_n` filter - - Slices first N (N specified as a limit parameter value) resource records. + `first_n` filter Slices first N (N specified as a limit parameter value) + resource records. Example: `"pickers": [ { "type": "first_n", "limit": 1 } ]` returns only the first resource record. - ##### limit parameter - - Can be a positive value for a specific limit. Use zero or leave it blank to - indicate no limits. + limit parameter Can be a positive value for a specific limit. Use zero or leave + it blank to indicate no limits. Args: resource_records: List of resource record from rrset @@ -528,32 +503,27 @@ async def create( Add the RRSet to the zone specified by zoneName, RRSets can be configured to be either dynamic or static. - ### Static RRsets + Static RRsets Staticly configured RRSets provide DNS responses as is. - Staticly configured RRSets provide DNS responses as is. - - ### Dynamic RRsets - - Dynamic RRSets have picker configuration defined thus it's possible to finely - customize DNS response. Picking rules are defined on the RRSet level as a list - of selectors, filters and mutators. Picker considers different resource records - metadata, requestor IP, and other event-feeds like monitoring. Picker - configuration is an ordered list defined by "pickers" attribute. Requestor IP is - determined by EDNS Client Subnet (ECS) if defined, otherwise - by - client/recursor IP. Selector pickers are used in the specified order until the - first match, in case of match - all next selectors are bypassed. Filters or - mutators are applied to the match according to the order they are specified. + Dynamic RRsets Dynamic RRSets have picker configuration defined thus it's + possible to finely customize DNS response. Picking rules are defined on the + RRSet level as a list of selectors, filters and mutators. Picker considers + different resource records metadata, requestor IP, and other event-feeds like + monitoring. Picker configuration is an ordered list defined by "pickers" + attribute. Requestor IP is determined by EDNS Client Subnet (ECS) if defined, + otherwise - by client/recursor IP. Selector pickers are used in the specified + order until the first match, in case of match - all next selectors are bypassed. + Filters or mutators are applied to the match according to the order they are + specified. For example, sort records by proximity to user, shuffle based on weights and return not more than 3: `"pickers": [ { "type": "geodistance" }, { "type": "weighted_shuffle" }, { "type": "first_n", "limit": 3 } ]` - #### geodns filter - - A resource record is included in the answer if resource record's metadata - matches requestor info. For each resource record in RRSet, the following - metadata is considered (in the order specified): + geodns filter A resource record is included in the answer if resource record's + metadata matches requestor info. For each resource record in RRSet, the + following metadata is considered (in the order specified): - `ip` - list of network addresses in CIDR format, e.g. `["192.168.15.150/25", "2003:de:2016::/48"]`; @@ -570,91 +540,71 @@ async def create( Example: `"pickers": [ { "type": "geodns", "strict": true } ]` - ##### Strict parameter - - `strict: true` means that if no records percolate through the geodns filter it - returns no answers. `strict: false` means that if no records percolate through - the geodns filter, all records are passed over. - - #### asn selector + Strict parameter `strict: true` means that if no records percolate through the + geodns filter it returns no answers. `strict: false` means that if no records + percolate through the geodns filter, all records are passed over. - Resource records which ASN metadata matches ASN of the requestor are picked by - this selector, and passed to the next non-selector picker, if there is no - match - next configured picker starts with all records. + asn selector Resource records which ASN metadata matches ASN of the requestor + are picked by this selector, and passed to the next non-selector picker, if + there is no match - next configured picker starts with all records. Example: `"pickers": [ {"type": "asn"} ]` - #### country selector - - Resource records which country metadata matches country of the requestor are - picked by this selector, and passed to the next non-selector picker, if there is - no match - next configured picker starts with all records. + country selector Resource records which country metadata matches country of the + requestor are picked by this selector, and passed to the next non-selector + picker, if there is no match - next configured picker starts with all records. Example: `"pickers": [ { "type": "country" } ]` - #### continent selector - - Resource records which continent metadata matches continent of the requestor are - picked by this selector, and passed to the next non-selector picker, if there is - no match - next configured picker starts with all records. + continent selector Resource records which continent metadata matches continent + of the requestor are picked by this selector, and passed to the next + non-selector picker, if there is no match - next configured picker starts with + all records. Example: `"pickers": [ { "type": "continent" } ]` - #### region selector - - Resource records which region metadata matches region of the requestor are - picked by this selector, and passed to the next non-selector picker, if there is - no match - next configured picker starts with all records. e.g. `fr-nor` for - France/Normandy. + region selector Resource records which region metadata matches region of the + requestor are picked by this selector, and passed to the next non-selector + picker, if there is no match - next configured picker starts with all records. + e.g. `fr-nor` for France/Normandy. Example: `"pickers": [ { "type": "region" } ]` - #### ip selector - - Resource records which IP metadata matches IP of the requestor are picked by - this selector, and passed to the next non-selector picker, if there is no - match - next configured picker starts with all records. Maximum 100 subnets are - allowed to specify in meta of RR. + ip selector Resource records which IP metadata matches IP of the requestor are + picked by this selector, and passed to the next non-selector picker, if there is + no match - next configured picker starts with all records. Maximum 100 subnets + are allowed to specify in meta of RR. Example: `"pickers": [ { "type": "ip" } ]` - #### default selector - - When enabled, records marked as default are selected: + default selector When enabled, records marked as default are selected: `"meta": {"default": true}`. Example: `"pickers": [ { "type": "geodns", "strict": false }, { "type": "default" }, { "type": "first_n", "limit": 2 } ]` - #### geodistance mutator - - The resource records are rearranged in ascending order based on the distance (in - meters) from requestor to the coordinates specified in latlong metadata. - Distance is calculated using Haversine formula. The "nearest" to the user's IP - RR goes first. The records without latlong metadata come last. e.g. for Berlin - `[52.520008, 13.404954]`.; + geodistance mutator The resource records are rearranged in ascending order based + on the distance (in meters) from requestor to the coordinates specified in + latlong metadata. Distance is calculated using Haversine formula. The "nearest" + to the user's IP RR goes first. The records without latlong metadata come last. + e.g. for Berlin `[52.520008, 13.404954]`.; In this configuration the only "nearest" to the requestor record to be returned: `"pickers": [ { "type": "geodistance" }, { "type": "first_n", "limit": 1 } ]` - #### `weighted_shuffle` mutator - - The resource records are rearranged in random order based on the `weight` - metadata. Default weight (if not specified) is 50. + `weighted_shuffle` mutator The resource records are rearranged in random order + based on the `weight` metadata. Default weight (if not specified) is 50. Example: `"pickers": [ { "type": "weighted_shuffle" } ]` - #### `first_n` filter - - Slices first N (N specified as a limit parameter value) resource records. + `first_n` filter Slices first N (N specified as a limit parameter value) + resource records. Example: `"pickers": [ { "type": "first_n", "limit": 1 } ]` returns only the first resource record. - ##### limit parameter - - Can be a positive value for a specific limit. Use zero or leave it blank to - indicate no limits. + limit parameter Can be a positive value for a specific limit. Use zero or leave + it blank to indicate no limits. Args: resource_records: List of resource record from rrset diff --git a/src/gcore/resources/streaming/playlists.py b/src/gcore/resources/streaming/playlists.py index fe1f49db..28f15c1a 100644 --- a/src/gcore/resources/streaming/playlists.py +++ b/src/gcore/resources/streaming/playlists.py @@ -173,6 +173,7 @@ def create( This URL is a link to the main manifest. But you can also manually specify suffix-options that will allow you to change the manifest to your request: + `/playlists/{client_id}_{playlist_id}/master[-cmaf][-min-N][-max-N][-img][-(h264|hevc|av1)].m3u8` Please see the details in `hls_url` attribute of /videos/{id} method. @@ -308,6 +309,7 @@ def update( This URL is a link to the main manifest. But you can also manually specify suffix-options that will allow you to change the manifest to your request: + `/playlists/{client_id}_{playlist_id}/master[-cmaf][-min-N][-max-N][-img][-(h264|hevc|av1)].m3u8` Please see the details in `hls_url` attribute of /videos/{id} method. @@ -662,6 +664,7 @@ async def create( This URL is a link to the main manifest. But you can also manually specify suffix-options that will allow you to change the manifest to your request: + `/playlists/{client_id}_{playlist_id}/master[-cmaf][-min-N][-max-N][-img][-(h264|hevc|av1)].m3u8` Please see the details in `hls_url` attribute of /videos/{id} method. @@ -797,6 +800,7 @@ async def update( This URL is a link to the main manifest. But you can also manually specify suffix-options that will allow you to change the manifest to your request: + `/playlists/{client_id}_{playlist_id}/master[-cmaf][-min-N][-max-N][-img][-(h264|hevc|av1)].m3u8` Please see the details in `hls_url` attribute of /videos/{id} method. diff --git a/src/gcore/types/cdn/cdn_resource.py b/src/gcore/types/cdn/cdn_resource.py index a1066729..760e9ee1 100644 --- a/src/gcore/types/cdn/cdn_resource.py +++ b/src/gcore/types/cdn/cdn_resource.py @@ -790,6 +790,7 @@ class OptionsIPAddressACL(BaseModel): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, you have to independently monitor their relevance. + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ @@ -1592,6 +1593,9 @@ class OptionsUserAgentACL(BaseModel): - **allow** - List of User-Agents for which access is prohibited. - **deny** - List of User-Agents for which access is allowed. + You can provide exact User-Agent strings or regular expressions. Regular + expressions must start with `~` (case-sensitive) or `~*` (case-insensitive). + Use an empty string `""` to allow/deny access when the User-Agent header is empty. """ @@ -1823,8 +1827,9 @@ class Options(BaseModel): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, - you have to independently monitor their relevance. We recommend you use a script - for automatically update IP ACL. + you have to independently monitor their relevance. + + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ diff --git a/src/gcore/types/cdn/resource_create_params.py b/src/gcore/types/cdn/resource_create_params.py index 09c122d2..743fba2a 100644 --- a/src/gcore/types/cdn/resource_create_params.py +++ b/src/gcore/types/cdn/resource_create_params.py @@ -913,6 +913,7 @@ class OptionsIPAddressACL(TypedDict, total=False): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, you have to independently monitor their relevance. + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ @@ -1713,6 +1714,9 @@ class OptionsUserAgentACL(TypedDict, total=False): - **allow** - List of User-Agents for which access is prohibited. - **deny** - List of User-Agents for which access is allowed. + You can provide exact User-Agent strings or regular expressions. Regular + expressions must start with `~` (case-sensitive) or `~*` (case-insensitive). + Use an empty string `""` to allow/deny access when the User-Agent header is empty. """ @@ -1944,8 +1948,9 @@ class Options(TypedDict, total=False): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, - you have to independently monitor their relevance. We recommend you use a script - for automatically update IP ACL. + you have to independently monitor their relevance. + + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ diff --git a/src/gcore/types/cdn/resource_replace_params.py b/src/gcore/types/cdn/resource_replace_params.py index e1ab08b8..fb57bb77 100644 --- a/src/gcore/types/cdn/resource_replace_params.py +++ b/src/gcore/types/cdn/resource_replace_params.py @@ -891,6 +891,7 @@ class OptionsIPAddressACL(TypedDict, total=False): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, you have to independently monitor their relevance. + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ @@ -1691,6 +1692,9 @@ class OptionsUserAgentACL(TypedDict, total=False): - **allow** - List of User-Agents for which access is prohibited. - **deny** - List of User-Agents for which access is allowed. + You can provide exact User-Agent strings or regular expressions. Regular + expressions must start with `~` (case-sensitive) or `~*` (case-insensitive). + Use an empty string `""` to allow/deny access when the User-Agent header is empty. """ @@ -1922,8 +1926,9 @@ class Options(TypedDict, total=False): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, - you have to independently monitor their relevance. We recommend you use a script - for automatically update IP ACL. + you have to independently monitor their relevance. + + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ diff --git a/src/gcore/types/cdn/resource_update_params.py b/src/gcore/types/cdn/resource_update_params.py index c231f15d..92251e5c 100644 --- a/src/gcore/types/cdn/resource_update_params.py +++ b/src/gcore/types/cdn/resource_update_params.py @@ -882,6 +882,7 @@ class OptionsIPAddressACL(TypedDict, total=False): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, you have to independently monitor their relevance. + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ @@ -1682,6 +1683,9 @@ class OptionsUserAgentACL(TypedDict, total=False): - **allow** - List of User-Agents for which access is prohibited. - **deny** - List of User-Agents for which access is allowed. + You can provide exact User-Agent strings or regular expressions. Regular + expressions must start with `~` (case-sensitive) or `~*` (case-insensitive). + Use an empty string `""` to allow/deny access when the User-Agent header is empty. """ @@ -1913,8 +1917,9 @@ class Options(TypedDict, total=False): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, - you have to independently monitor their relevance. We recommend you use a script - for automatically update IP ACL. + you have to independently monitor their relevance. + + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ diff --git a/src/gcore/types/cdn/resources/cdn_resource_rule.py b/src/gcore/types/cdn/resources/cdn_resource_rule.py index 2b61a6d2..c28f6e6a 100644 --- a/src/gcore/types/cdn/resources/cdn_resource_rule.py +++ b/src/gcore/types/cdn/resources/cdn_resource_rule.py @@ -762,6 +762,7 @@ class OptionsIPAddressACL(BaseModel): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, you have to independently monitor their relevance. + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ @@ -1474,6 +1475,9 @@ class OptionsUserAgentACL(BaseModel): - **allow** - List of User-Agents for which access is prohibited. - **deny** - List of User-Agents for which access is allowed. + You can provide exact User-Agent strings or regular expressions. Regular + expressions must start with `~` (case-sensitive) or `~*` (case-insensitive). + Use an empty string `""` to allow/deny access when the User-Agent header is empty. """ @@ -1699,8 +1703,9 @@ class Options(BaseModel): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, - you have to independently monitor their relevance. We recommend you use a script - for automatically update IP ACL. + you have to independently monitor their relevance. + + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ diff --git a/src/gcore/types/cdn/resources/rule_create_params.py b/src/gcore/types/cdn/resources/rule_create_params.py index 9d48700f..052803bb 100644 --- a/src/gcore/types/cdn/resources/rule_create_params.py +++ b/src/gcore/types/cdn/resources/rule_create_params.py @@ -838,6 +838,7 @@ class OptionsIPAddressACL(TypedDict, total=False): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, you have to independently monitor their relevance. + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ @@ -1548,6 +1549,9 @@ class OptionsUserAgentACL(TypedDict, total=False): - **allow** - List of User-Agents for which access is prohibited. - **deny** - List of User-Agents for which access is allowed. + You can provide exact User-Agent strings or regular expressions. Regular + expressions must start with `~` (case-sensitive) or `~*` (case-insensitive). + Use an empty string `""` to allow/deny access when the User-Agent header is empty. """ @@ -1773,8 +1777,9 @@ class Options(TypedDict, total=False): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, - you have to independently monitor their relevance. We recommend you use a script - for automatically update IP ACL. + you have to independently monitor their relevance. + + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ diff --git a/src/gcore/types/cdn/resources/rule_replace_params.py b/src/gcore/types/cdn/resources/rule_replace_params.py index 44a3a9f7..86fb2b30 100644 --- a/src/gcore/types/cdn/resources/rule_replace_params.py +++ b/src/gcore/types/cdn/resources/rule_replace_params.py @@ -840,6 +840,7 @@ class OptionsIPAddressACL(TypedDict, total=False): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, you have to independently monitor their relevance. + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ @@ -1550,6 +1551,9 @@ class OptionsUserAgentACL(TypedDict, total=False): - **allow** - List of User-Agents for which access is prohibited. - **deny** - List of User-Agents for which access is allowed. + You can provide exact User-Agent strings or regular expressions. Regular + expressions must start with `~` (case-sensitive) or `~*` (case-insensitive). + Use an empty string `""` to allow/deny access when the User-Agent header is empty. """ @@ -1775,8 +1779,9 @@ class Options(TypedDict, total=False): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, - you have to independently monitor their relevance. We recommend you use a script - for automatically update IP ACL. + you have to independently monitor their relevance. + + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ diff --git a/src/gcore/types/cdn/resources/rule_update_params.py b/src/gcore/types/cdn/resources/rule_update_params.py index a689c70f..c4ae3b10 100644 --- a/src/gcore/types/cdn/resources/rule_update_params.py +++ b/src/gcore/types/cdn/resources/rule_update_params.py @@ -840,6 +840,7 @@ class OptionsIPAddressACL(TypedDict, total=False): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, you have to independently monitor their relevance. + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ @@ -1550,6 +1551,9 @@ class OptionsUserAgentACL(TypedDict, total=False): - **allow** - List of User-Agents for which access is prohibited. - **deny** - List of User-Agents for which access is allowed. + You can provide exact User-Agent strings or regular expressions. Regular + expressions must start with `~` (case-sensitive) or `~*` (case-insensitive). + Use an empty string `""` to allow/deny access when the User-Agent header is empty. """ @@ -1775,8 +1779,9 @@ class Options(TypedDict, total=False): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, - you have to independently monitor their relevance. We recommend you use a script - for automatically update IP ACL. + you have to independently monitor their relevance. + + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ diff --git a/src/gcore/types/cdn/rule_template.py b/src/gcore/types/cdn/rule_template.py index 12360cca..e23d3805 100644 --- a/src/gcore/types/cdn/rule_template.py +++ b/src/gcore/types/cdn/rule_template.py @@ -762,6 +762,7 @@ class OptionsIPAddressACL(BaseModel): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, you have to independently monitor their relevance. + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ @@ -1474,6 +1475,9 @@ class OptionsUserAgentACL(BaseModel): - **allow** - List of User-Agents for which access is prohibited. - **deny** - List of User-Agents for which access is allowed. + You can provide exact User-Agent strings or regular expressions. Regular + expressions must start with `~` (case-sensitive) or `~*` (case-insensitive). + Use an empty string `""` to allow/deny access when the User-Agent header is empty. """ @@ -1699,8 +1703,9 @@ class Options(BaseModel): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, - you have to independently monitor their relevance. We recommend you use a script - for automatically update IP ACL. + you have to independently monitor their relevance. + + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ diff --git a/src/gcore/types/cdn/rule_template_create_params.py b/src/gcore/types/cdn/rule_template_create_params.py index 5a000d28..6d44873b 100644 --- a/src/gcore/types/cdn/rule_template_create_params.py +++ b/src/gcore/types/cdn/rule_template_create_params.py @@ -822,6 +822,7 @@ class OptionsIPAddressACL(TypedDict, total=False): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, you have to independently monitor their relevance. + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ @@ -1532,6 +1533,9 @@ class OptionsUserAgentACL(TypedDict, total=False): - **allow** - List of User-Agents for which access is prohibited. - **deny** - List of User-Agents for which access is allowed. + You can provide exact User-Agent strings or regular expressions. Regular + expressions must start with `~` (case-sensitive) or `~*` (case-insensitive). + Use an empty string `""` to allow/deny access when the User-Agent header is empty. """ @@ -1757,8 +1761,9 @@ class Options(TypedDict, total=False): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, - you have to independently monitor their relevance. We recommend you use a script - for automatically update IP ACL. + you have to independently monitor their relevance. + + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ diff --git a/src/gcore/types/cdn/rule_template_replace_params.py b/src/gcore/types/cdn/rule_template_replace_params.py index 4af0182e..7dba15b1 100644 --- a/src/gcore/types/cdn/rule_template_replace_params.py +++ b/src/gcore/types/cdn/rule_template_replace_params.py @@ -822,6 +822,7 @@ class OptionsIPAddressACL(TypedDict, total=False): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, you have to independently monitor their relevance. + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ @@ -1532,6 +1533,9 @@ class OptionsUserAgentACL(TypedDict, total=False): - **allow** - List of User-Agents for which access is prohibited. - **deny** - List of User-Agents for which access is allowed. + You can provide exact User-Agent strings or regular expressions. Regular + expressions must start with `~` (case-sensitive) or `~*` (case-insensitive). + Use an empty string `""` to allow/deny access when the User-Agent header is empty. """ @@ -1757,8 +1761,9 @@ class Options(TypedDict, total=False): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, - you have to independently monitor their relevance. We recommend you use a script - for automatically update IP ACL. + you have to independently monitor their relevance. + + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ diff --git a/src/gcore/types/cdn/rule_template_update_params.py b/src/gcore/types/cdn/rule_template_update_params.py index 8d45b593..37b2ec5b 100644 --- a/src/gcore/types/cdn/rule_template_update_params.py +++ b/src/gcore/types/cdn/rule_template_update_params.py @@ -822,6 +822,7 @@ class OptionsIPAddressACL(TypedDict, total=False): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, you have to independently monitor their relevance. + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ @@ -1532,6 +1533,9 @@ class OptionsUserAgentACL(TypedDict, total=False): - **allow** - List of User-Agents for which access is prohibited. - **deny** - List of User-Agents for which access is allowed. + You can provide exact User-Agent strings or regular expressions. Regular + expressions must start with `~` (case-sensitive) or `~*` (case-insensitive). + Use an empty string `""` to allow/deny access when the User-Agent header is empty. """ @@ -1757,8 +1761,9 @@ class Options(TypedDict, total=False): """Controls access to the CDN resource content for specific IP addresses. If you want to use IPs from our CDN servers IP list for IP ACL configuration, - you have to independently monitor their relevance. We recommend you use a script - for automatically update IP ACL. + you have to independently monitor their relevance. + + We recommend you use a script for automatically update IP ACL. [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses) """ diff --git a/src/gcore/types/streaming/playlist.py b/src/gcore/types/streaming/playlist.py index 495c206d..e0f94e66 100644 --- a/src/gcore/types/streaming/playlist.py +++ b/src/gcore/types/streaming/playlist.py @@ -49,6 +49,7 @@ class Playlist(BaseModel): This URL is a link to the main manifest. But you can also manually specify suffix-options that will allow you to change the manifest to your request: + `/playlists/{client_id}_{playlist_id}/master[-cmaf][-min-N][-max-N][-img][-(h264|hevc|av1)].m3u8` Please see the details in `hls_url` attribute of /videos/{id} method. diff --git a/src/gcore/types/streaming/playlist_create_params.py b/src/gcore/types/streaming/playlist_create_params.py index f9102a3f..2eebe230 100644 --- a/src/gcore/types/streaming/playlist_create_params.py +++ b/src/gcore/types/streaming/playlist_create_params.py @@ -49,6 +49,7 @@ class PlaylistCreateParams(TypedDict, total=False): This URL is a link to the main manifest. But you can also manually specify suffix-options that will allow you to change the manifest to your request: + `/playlists/{client_id}_{playlist_id}/master[-cmaf][-min-N][-max-N][-img][-(h264|hevc|av1)].m3u8` Please see the details in `hls_url` attribute of /videos/{id} method. diff --git a/src/gcore/types/streaming/playlist_update_params.py b/src/gcore/types/streaming/playlist_update_params.py index 10fe4362..ce411690 100644 --- a/src/gcore/types/streaming/playlist_update_params.py +++ b/src/gcore/types/streaming/playlist_update_params.py @@ -49,6 +49,7 @@ class PlaylistUpdateParams(TypedDict, total=False): This URL is a link to the main manifest. But you can also manually specify suffix-options that will allow you to change the manifest to your request: + `/playlists/{client_id}_{playlist_id}/master[-cmaf][-min-N][-max-N][-img][-(h264|hevc|av1)].m3u8` Please see the details in `hls_url` attribute of /videos/{id} method. diff --git a/src/gcore/types/streaming/video.py b/src/gcore/types/streaming/video.py index c12c6453..f6a405ee 100644 --- a/src/gcore/types/streaming/video.py +++ b/src/gcore/types/streaming/video.py @@ -85,7 +85,9 @@ class ConvertedVideo(BaseModel): **Default MP4 file name structure** Link to the file {filename} contains information about the encoding method using - format: `___.mp4` + format: + + `___.mp4` - `` – Internal quality identifier and file version. Please do not use it, can be changed at any time without any notice. diff --git a/tests/api_resources/cdn/resources/test_rules.py b/tests/api_resources/cdn/resources/test_rules.py index 63940c96..351ea91b 100644 --- a/tests/api_resources/cdn/resources/test_rules.py +++ b/tests/api_resources/cdn/resources/test_rules.py @@ -291,7 +291,7 @@ def test_method_create_with_all_params(self, client: Gcore) -> None: }, "user_agent_acl": { "enabled": True, - "excepted_values": ["UserAgent Value", ""], + "excepted_values": ["UserAgent Value", "~*.*bot.*", ""], "policy_type": "allow", }, "waap": { @@ -607,7 +607,7 @@ def test_method_update_with_all_params(self, client: Gcore) -> None: }, "user_agent_acl": { "enabled": True, - "excepted_values": ["UserAgent Value", ""], + "excepted_values": ["UserAgent Value", "~*.*bot.*", ""], "policy_type": "allow", }, "waap": { @@ -1024,7 +1024,7 @@ def test_method_replace_with_all_params(self, client: Gcore) -> None: }, "user_agent_acl": { "enabled": True, - "excepted_values": ["UserAgent Value", ""], + "excepted_values": ["UserAgent Value", "~*.*bot.*", ""], "policy_type": "allow", }, "waap": { @@ -1349,7 +1349,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) -> }, "user_agent_acl": { "enabled": True, - "excepted_values": ["UserAgent Value", ""], + "excepted_values": ["UserAgent Value", "~*.*bot.*", ""], "policy_type": "allow", }, "waap": { @@ -1665,7 +1665,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGcore) -> }, "user_agent_acl": { "enabled": True, - "excepted_values": ["UserAgent Value", ""], + "excepted_values": ["UserAgent Value", "~*.*bot.*", ""], "policy_type": "allow", }, "waap": { @@ -2082,7 +2082,7 @@ async def test_method_replace_with_all_params(self, async_client: AsyncGcore) -> }, "user_agent_acl": { "enabled": True, - "excepted_values": ["UserAgent Value", ""], + "excepted_values": ["UserAgent Value", "~*.*bot.*", ""], "policy_type": "allow", }, "waap": { diff --git a/tests/api_resources/cdn/test_resources.py b/tests/api_resources/cdn/test_resources.py index debacd03..a987d85b 100644 --- a/tests/api_resources/cdn/test_resources.py +++ b/tests/api_resources/cdn/test_resources.py @@ -311,7 +311,7 @@ def test_method_create_with_all_params(self, client: Gcore) -> None: }, "user_agent_acl": { "enabled": True, - "excepted_values": ["UserAgent Value", ""], + "excepted_values": ["UserAgent Value", "~*.*bot.*", ""], "policy_type": "allow", }, "waap": { @@ -652,7 +652,7 @@ def test_method_update_with_all_params(self, client: Gcore) -> None: }, "user_agent_acl": { "enabled": True, - "excepted_values": ["UserAgent Value", ""], + "excepted_values": ["UserAgent Value", "~*.*bot.*", ""], "policy_type": "allow", }, "waap": { @@ -1281,7 +1281,7 @@ def test_method_replace_with_all_params(self, client: Gcore) -> None: }, "user_agent_acl": { "enabled": True, - "excepted_values": ["UserAgent Value", ""], + "excepted_values": ["UserAgent Value", "~*.*bot.*", ""], "policy_type": "allow", }, "waap": { @@ -1627,7 +1627,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) -> }, "user_agent_acl": { "enabled": True, - "excepted_values": ["UserAgent Value", ""], + "excepted_values": ["UserAgent Value", "~*.*bot.*", ""], "policy_type": "allow", }, "waap": { @@ -1968,7 +1968,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGcore) -> }, "user_agent_acl": { "enabled": True, - "excepted_values": ["UserAgent Value", ""], + "excepted_values": ["UserAgent Value", "~*.*bot.*", ""], "policy_type": "allow", }, "waap": { @@ -2597,7 +2597,7 @@ async def test_method_replace_with_all_params(self, async_client: AsyncGcore) -> }, "user_agent_acl": { "enabled": True, - "excepted_values": ["UserAgent Value", ""], + "excepted_values": ["UserAgent Value", "~*.*bot.*", ""], "policy_type": "allow", }, "waap": { diff --git a/tests/api_resources/cdn/test_rule_templates.py b/tests/api_resources/cdn/test_rule_templates.py index cf4af42c..e7d8cb23 100644 --- a/tests/api_resources/cdn/test_rule_templates.py +++ b/tests/api_resources/cdn/test_rule_templates.py @@ -287,7 +287,7 @@ def test_method_create_with_all_params(self, client: Gcore) -> None: }, "user_agent_acl": { "enabled": True, - "excepted_values": ["UserAgent Value", ""], + "excepted_values": ["UserAgent Value", "~*.*bot.*", ""], "policy_type": "allow", }, "waap": { @@ -595,7 +595,7 @@ def test_method_update_with_all_params(self, client: Gcore) -> None: }, "user_agent_acl": { "enabled": True, - "excepted_values": ["UserAgent Value", ""], + "excepted_values": ["UserAgent Value", "~*.*bot.*", ""], "policy_type": "allow", }, "waap": { @@ -994,7 +994,7 @@ def test_method_replace_with_all_params(self, client: Gcore) -> None: }, "user_agent_acl": { "enabled": True, - "excepted_values": ["UserAgent Value", ""], + "excepted_values": ["UserAgent Value", "~*.*bot.*", ""], "policy_type": "allow", }, "waap": { @@ -1312,7 +1312,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) -> }, "user_agent_acl": { "enabled": True, - "excepted_values": ["UserAgent Value", ""], + "excepted_values": ["UserAgent Value", "~*.*bot.*", ""], "policy_type": "allow", }, "waap": { @@ -1620,7 +1620,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGcore) -> }, "user_agent_acl": { "enabled": True, - "excepted_values": ["UserAgent Value", ""], + "excepted_values": ["UserAgent Value", "~*.*bot.*", ""], "policy_type": "allow", }, "waap": { @@ -2019,7 +2019,7 @@ async def test_method_replace_with_all_params(self, async_client: AsyncGcore) -> }, "user_agent_acl": { "enabled": True, - "excepted_values": ["UserAgent Value", ""], + "excepted_values": ["UserAgent Value", "~*.*bot.*", ""], "policy_type": "allow", }, "waap": {