fastly 5.2.2 → 5.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +4 -3
  5. data/docs/AutomationTokenCreateResponse.md +3 -3
  6. data/docs/AutomationTokenCreateResponseAllOf.md +3 -3
  7. data/docs/AutomationTokenResponse.md +2 -2
  8. data/docs/AutomationTokenResponseAllOf.md +2 -2
  9. data/docs/AutomationTokensApi.md +4 -3
  10. data/docs/Batch.md +12 -0
  11. data/docs/BatchErrors.md +13 -0
  12. data/docs/ErrorResponse.md +13 -0
  13. data/docs/HistoricalFieldResultsAttributes.md +1 -1
  14. data/docs/HistoricalFieldResultsAttributesAllOf.md +1 -1
  15. data/docs/RateLimiter.md +1 -1
  16. data/docs/RateLimiterApi.md +122 -0
  17. data/docs/RateLimiterResponse.md +1 -1
  18. data/docs/ReadOnlyCustomerId.md +9 -0
  19. data/docs/ReadOnlyId.md +9 -0
  20. data/docs/ReadOnlyIdService.md +9 -0
  21. data/docs/ReadOnlyUserId.md +9 -0
  22. data/docs/SchemasSnippetResponse.md +1 -1
  23. data/docs/Snippet.md +1 -1
  24. data/docs/SnippetApi.md +4 -4
  25. data/docs/SnippetResponse.md +1 -1
  26. data/docs/TokensAdditionalProps.md +9 -0
  27. data/docs/ValidatorResult.md +1 -5
  28. data/docs/ValidatorResultData.md +12 -0
  29. data/docs/ValidatorResultDataAttributes.md +14 -0
  30. data/docs/{ValidatorResultMessages.md → ValidatorResultDataAttributesMessages.md} +2 -2
  31. data/docs/VclApi.md +8 -6
  32. data/docs/VclSyntaxHighlightingResponse.md +10 -0
  33. data/lib/fastly/api/automation_tokens_api.rb +5 -5
  34. data/lib/fastly/api/rate_limiter_api.rb +345 -0
  35. data/lib/fastly/api/snippet_api.rb +6 -6
  36. data/lib/fastly/api/vcl_api.rb +10 -10
  37. data/lib/fastly/configuration.rb +12 -0
  38. data/lib/fastly/models/automation_token_create_request_attributes.rb +0 -1
  39. data/lib/fastly/models/automation_token_create_response.rb +3 -6
  40. data/lib/fastly/models/automation_token_create_response_all_of.rb +3 -6
  41. data/lib/fastly/models/automation_token_response.rb +2 -4
  42. data/lib/fastly/models/automation_token_response_all_of.rb +2 -4
  43. data/lib/fastly/models/batch.rb +239 -0
  44. data/lib/fastly/models/batch_errors.rb +247 -0
  45. data/lib/fastly/models/error_response.rb +245 -0
  46. data/lib/fastly/models/historical_field_results_attributes.rb +1 -2
  47. data/lib/fastly/models/historical_field_results_attributes_all_of.rb +1 -2
  48. data/lib/fastly/models/rate_limiter.rb +5 -2
  49. data/lib/fastly/models/rate_limiter_response.rb +5 -2
  50. data/lib/fastly/models/read_only_customer_id.rb +207 -0
  51. data/lib/fastly/models/read_only_id.rb +207 -0
  52. data/lib/fastly/models/read_only_id_service.rb +207 -0
  53. data/lib/fastly/models/read_only_user_id.rb +207 -0
  54. data/lib/fastly/models/schemas_snippet_response.rb +3 -3
  55. data/lib/fastly/models/snippet.rb +3 -3
  56. data/lib/fastly/models/snippet_response.rb +3 -3
  57. data/lib/fastly/models/tokens_additional_props.rb +227 -0
  58. data/lib/fastly/models/validator_result.rb +7 -84
  59. data/lib/fastly/models/validator_result_data.rb +234 -0
  60. data/lib/fastly/models/{rate_limiter_response1.rb → validator_result_data_attributes.rb} +71 -70
  61. data/lib/fastly/models/{validator_result_messages.rb → validator_result_data_attributes_messages.rb} +4 -4
  62. data/lib/fastly/models/vcl_syntax_highlighting_response.rb +217 -0
  63. data/lib/fastly/version.rb +1 -1
  64. data/lib/fastly.rb +12 -2
  65. data/sig.json +1 -1
  66. metadata +26 -6
  67. data/docs/RateLimiterResponse1.md +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab5a10e8b798ab9c93218ab4cd005873408b6f9be753eb11c9ca20d33da87614
4
- data.tar.gz: fe1fbf9eb94ffde41be15cabbcef01316c910d530abb57b8baab85f9a6d5b7e0
3
+ metadata.gz: b38a491618944f861e22226af46994f0f191cdb23fd34eaae6f7396d014a9682
4
+ data.tar.gz: 4fd97cc8a1bda9eedd210405d58030661c05eec4dee93fc1542718faaf40b777
5
5
  SHA512:
6
- metadata.gz: 1654d1693e6611befdf9227e489522298ffcc1fba856330b6147e970cc2dbce78e6f6357cde5366239c1ac0337445d87dcd5806aac5f87ca0220c9f0e15938b1
7
- data.tar.gz: 73b717ccec4e4b429a21fdcffeeec4dc0ee3439b451eb7c4a6b8a5950face7a277b7eb58defae267dec5a75ab0d10b985f74360a60e51bc22551b535653e474d
6
+ metadata.gz: 4250762ba0be3bae93b6a2b7a8a2a80a2fa1a402e202c6c2b9e1169ae346b7ae67652fbd2d43e1364e91f303e5e5575b2f6c387ac186460cf9643aa8cada5fb4
7
+ data.tar.gz: 80408232d3678508bba1779c0fed55c845627d8da8a54e5e9ab7127f046fafeb5a32824c715373541528327673a8d56ff10c8d11ef4c6d074d14af020045953f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [v5.3.1](https://github.com/fastly/fastly-ruby/releases/tag/release/v5.3.1) (2023-07-05)
4
+
5
+ **Bug fixes:**
6
+
7
+ - fix(snippet): dynamic field switched from int to string.
8
+ - fix(vcl): implement correct response models.
9
+
10
+ ## [v5.3.0](https://github.com/fastly/fastly-ruby/releases/tag/release/v5.3.0) (2023-06-27)
11
+
12
+ **Enhancements:**
13
+
14
+ - feat(rate_limiter): implement POST/PUT endpoints.
15
+
16
+ **Bug fixes:**
17
+
18
+ - fix(automation_tokens): generate explicit error response type.
19
+ - fix(historical_stats): extract primitive into custom type.
20
+
3
21
  ## [v5.2.2](https://github.com/fastly/fastly-ruby/releases/tag/release/v5.2.2) (2023-06-23)
4
22
 
5
23
  **Bug fixes:**
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fastly (5.2.2)
4
+ fastly (5.3.1)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -8,7 +8,7 @@ A Ruby client library for interacting with most facets of the [Fastly API](https
8
8
  To install via RubyGems, add the following to your project's `Gemfile`:
9
9
 
10
10
  ```ruby
11
- gem 'fastly', '~> 5.2.2'
11
+ gem 'fastly', '~> 5.3.1'
12
12
  ```
13
13
 
14
14
  Then run `bundle install`.
@@ -354,9 +354,11 @@ Class | Method | Description
354
354
  [*Fastly::PurgeApi*](docs/PurgeApi.md) | [**purge_all**](docs/PurgeApi.md#purge_all) | Purge everything from a service
355
355
  [*Fastly::PurgeApi*](docs/PurgeApi.md) | [**purge_single_url**](docs/PurgeApi.md#purge_single_url) | Purge a URL
356
356
  [*Fastly::PurgeApi*](docs/PurgeApi.md) | [**purge_tag**](docs/PurgeApi.md#purge_tag) | Purge by surrogate key tag
357
+ [*Fastly::RateLimiterApi*](docs/RateLimiterApi.md) | [**create_rate_limiter**](docs/RateLimiterApi.md#create_rate_limiter) | Create a rate limiter
357
358
  [*Fastly::RateLimiterApi*](docs/RateLimiterApi.md) | [**delete_rate_limiter**](docs/RateLimiterApi.md#delete_rate_limiter) | Delete a rate limiter
358
359
  [*Fastly::RateLimiterApi*](docs/RateLimiterApi.md) | [**get_rate_limiter**](docs/RateLimiterApi.md#get_rate_limiter) | Get a rate limiter
359
360
  [*Fastly::RateLimiterApi*](docs/RateLimiterApi.md) | [**list_rate_limiters**](docs/RateLimiterApi.md#list_rate_limiters) | List rate limiters
361
+ [*Fastly::RateLimiterApi*](docs/RateLimiterApi.md) | [**update_rate_limiter**](docs/RateLimiterApi.md#update_rate_limiter) | Update a rate limiter
360
362
  [*Fastly::RealtimeApi*](docs/RealtimeApi.md) | [**get_stats_last120_seconds**](docs/RealtimeApi.md#get_stats_last120_seconds) | Get real-time data for the last 120 seconds
361
363
  [*Fastly::RealtimeApi*](docs/RealtimeApi.md) | [**get_stats_last120_seconds_limit_entries**](docs/RealtimeApi.md#get_stats_last120_seconds_limit_entries) | Get a limited number of real-time data entries
362
364
  [*Fastly::RealtimeApi*](docs/RealtimeApi.md) | [**get_stats_last_second**](docs/RealtimeApi.md#get_stats_last_second) | Get real-time data from specified time
@@ -507,7 +509,7 @@ The fastly-ruby API client currently does not support the following endpoints:
507
509
  - [`/customer/{customer_id}/contacts`](https://developer.fastly.com/reference/api/account/contact) (POST)
508
510
  - [`/metrics/domains/services/{service_id}`](https://developer.fastly.com/reference/api/metrics-stats/domain-inspector/historical) (GET)
509
511
  - [`/metrics/origins/services/{service_id}`](https://developer.fastly.com/reference/api/metrics-stats/origin-inspector/historical) (GET)
510
- - [`/rate-limiters/{rate_limiter_id}`](https://developer.fastly.com/reference/api/vcl-services/rate-limiter) (PUT)
512
+ - [`/resources/stores/kv/{store_id}/batch`](https://developer.fastly.com/reference/api/services/resources/kv-store-item) (PUT)
511
513
  - [`/resources/stores/secret/client-key`](https://developer.fastly.com/reference/api/services/resources/secret-store) (POST)
512
514
  - [`/resources/stores/secret/signing-key`](https://developer.fastly.com/reference/api/services/resources/secret-store) (GET)
513
515
  - [`/resources/stores/secret/{store_id}/secrets/{secret_name}`](https://developer.fastly.com/reference/api/services/resources/secret) (DELETE, GET)
@@ -528,7 +530,6 @@ The fastly-ruby API client currently does not support the following endpoints:
528
530
  - [`/service/{service_id}/version/{version_id}/director/{director_name}`](https://developer.fastly.com/reference/api/load-balancing/directors/director) (PUT)
529
531
  - [`/service/{service_id}/version/{version_id}/logging/kafka/{logging_kafka_name}`](https://developer.fastly.com/reference/api/logging/kafka) (PUT)
530
532
  - [`/service/{service_id}/version/{version_id}/logging/kinesis/{logging_kinesis_name}`](https://developer.fastly.com/reference/api/logging/kinesis) (PUT)
531
- - [`/service/{service_id}/version/{version_id}/rate-limiters`](https://developer.fastly.com/reference/api/vcl-services/rate-limiter) (POST)
532
533
  - [`/service/{service_id}/version/{version_id}/request_settings`](https://developer.fastly.com/reference/api/vcl-services/request-settings) (POST)
533
534
  - [`/service/{service_id}/version/{version_id}/response_object/{response_object_name}`](https://developer.fastly.com/reference/api/vcl-services/response-object) (PUT)
534
535
  - [`/service/{service_id}/version/{version_id}/response_object`](https://developer.fastly.com/reference/api/vcl-services/response-object) (POST)
@@ -12,9 +12,9 @@
12
12
  | **created_at** | **Time** | A UTC time-stamp of when the token was created. | [optional][readonly] |
13
13
  | **deleted_at** | **Time** | Date and time in ISO 8601 format. | [optional][readonly] |
14
14
  | **updated_at** | **Time** | Date and time in ISO 8601 format. | [optional][readonly] |
15
- | **id** | **String** | | [optional][readonly] |
16
- | **user_id** | **String** | | [optional][readonly] |
17
- | **customer_id** | **String** | | [optional][readonly] |
15
+ | **id** | [**ReadOnlyId**](ReadOnlyId.md) | | [optional] |
16
+ | **user_id** | [**ReadOnlyUserId**](ReadOnlyUserId.md) | | [optional] |
17
+ | **customer_id** | [**ReadOnlyCustomerId**](ReadOnlyCustomerId.md) | | [optional] |
18
18
  | **sudo_expires_at** | **Time** | | [optional][readonly] |
19
19
  | **access_token** | **String** | | [optional][readonly] |
20
20
  | **last_used_at** | **Time** | A UTC time-stamp of when the token was last used. | [optional][readonly] |
@@ -4,9 +4,9 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **id** | **String** | | [optional][readonly] |
8
- | **user_id** | **String** | | [optional][readonly] |
9
- | **customer_id** | **String** | | [optional][readonly] |
7
+ | **id** | [**ReadOnlyId**](ReadOnlyId.md) | | [optional] |
8
+ | **user_id** | [**ReadOnlyUserId**](ReadOnlyUserId.md) | | [optional] |
9
+ | **customer_id** | [**ReadOnlyCustomerId**](ReadOnlyCustomerId.md) | | [optional] |
10
10
  | **sudo_expires_at** | **Time** | | [optional][readonly] |
11
11
  | **created_at** | **Time** | A UTC time-stamp of when the token was created. | [optional][readonly] |
12
12
  | **access_token** | **String** | | [optional][readonly] |
@@ -12,8 +12,8 @@
12
12
  | **created_at** | **String** | A UTC time-stamp of when the token was created. | [optional] |
13
13
  | **deleted_at** | **Time** | Date and time in ISO 8601 format. | [optional][readonly] |
14
14
  | **updated_at** | **Time** | Date and time in ISO 8601 format. | [optional][readonly] |
15
- | **id** | **String** | | [optional][readonly] |
16
- | **customer_id** | **String** | | [optional][readonly] |
15
+ | **id** | [**ReadOnlyId**](ReadOnlyId.md) | | [optional] |
16
+ | **customer_id** | [**ReadOnlyCustomerId**](ReadOnlyCustomerId.md) | | [optional] |
17
17
  | **ip** | **String** | The IP address of the client that last used the token. | [optional] |
18
18
  | **user_agent** | **String** | The User-Agent header of the client that last used the token. | [optional] |
19
19
  | **sudo_expires_at** | **String** | | [optional][readonly] |
@@ -4,8 +4,8 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **id** | **String** | | [optional][readonly] |
8
- | **customer_id** | **String** | | [optional][readonly] |
7
+ | **id** | [**ReadOnlyId**](ReadOnlyId.md) | | [optional] |
8
+ | **customer_id** | [**ReadOnlyCustomerId**](ReadOnlyCustomerId.md) | | [optional] |
9
9
  | **role** | **String** | | [optional] |
10
10
  | **ip** | **String** | The IP address of the client that last used the token. | [optional] |
11
11
  | **user_agent** | **String** | The User-Agent header of the client that last used the token. | [optional] |
@@ -174,7 +174,7 @@ end
174
174
  ## `revoke_automation_token_id()`
175
175
 
176
176
  ```ruby
177
- revoke_automation_token_id(opts) # Revoke an Automation Token by ID
177
+ revoke_automation_token_id(opts): <ErrorResponse> # Revoke an Automation Token by ID
178
178
  ```
179
179
 
180
180
  Revoke an automation token by ID.
@@ -189,7 +189,8 @@ opts = {
189
189
 
190
190
  begin
191
191
  # Revoke an Automation Token by ID
192
- api_instance.revoke_automation_token_id(opts)
192
+ result = api_instance.revoke_automation_token_id(opts)
193
+ p result
193
194
  rescue Fastly::ApiError => e
194
195
  puts "Error when calling AutomationTokensApi->revoke_automation_token_id: #{e}"
195
196
  end
@@ -203,7 +204,7 @@ end
203
204
 
204
205
  ### Return type
205
206
 
206
- nil (empty response body)
207
+ [**ErrorResponse**](ErrorResponse.md)
207
208
 
208
209
  [[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
209
210
  [[Back to README]](../../README.md)
data/docs/Batch.md ADDED
@@ -0,0 +1,12 @@
1
+ # Fastly::Batch
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **title** | **String** | A descriptor for the response of the entire batch | [optional] |
8
+ | **type** | **String** | If an error is present in any of the requests, this field will describe that error | [optional] |
9
+ | **errors** | [**Array&lt;BatchErrors&gt;**](BatchErrors.md) | Per-key errors which failed to parse, validate, or otherwise transmit | [optional] |
10
+
11
+ [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
12
+
@@ -0,0 +1,13 @@
1
+ # Fastly::BatchErrors
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **key** | **String** | The key that the error corresponds to. This field will be empty if the object or one of its fields was unable to be parsed. | [optional] |
8
+ | **index** | **Integer** | The line number of the payload on which the error occurred (starting from 0 for the first line). | [optional] |
9
+ | **code** | **String** | The HTTP response code for the request, or a 400 if the request was not able to be completed. | [optional] |
10
+ | **reason** | **String** | A descriptor of this particular item&#39;s error. | [optional] |
11
+
12
+ [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
13
+
@@ -0,0 +1,13 @@
1
+ # Fastly::ErrorResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **detail** | **String** | | [optional] |
8
+ | **errors** | **Array&lt;Object&gt;** | | [optional] |
9
+ | **status** | **Integer** | | [optional] |
10
+ | **title** | **String** | | [optional] |
11
+
12
+ [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
13
+
@@ -220,7 +220,7 @@
220
220
  | **ddos_action_tarpit** | **Integer** | The number of times the tarpit action was taken. The tarpit action delays writing the response to the client. | [optional] |
221
221
  | **ddos_action_close** | **Integer** | The number of times the close action was taken. The close action aborts the connection as soon as possible. The close action takes effect either right after accept, right after the client hello, or right after the response was sent. | [optional] |
222
222
  | **ddos_action_blackhole** | **Integer** | The number of times the blackhole action was taken. The blackhole action quietly closes a TCP connection without sending a reset. The blackhole action quietly closes a TCP connection without notifying its peer (all TCP state is dropped). | [optional] |
223
- | **service_id** | **String** | | [optional][readonly] |
223
+ | **service_id** | [**ReadOnlyIdService**](ReadOnlyIdService.md) | | [optional] |
224
224
  | **start_time** | **Integer** | | [optional] |
225
225
 
226
226
  [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **service_id** | **String** | | [optional][readonly] |
7
+ | **service_id** | [**ReadOnlyIdService**](ReadOnlyIdService.md) | | [optional] |
8
8
  | **start_time** | **Integer** | | [optional] |
9
9
 
10
10
  [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
data/docs/RateLimiter.md CHANGED
@@ -12,7 +12,7 @@
12
12
  | **client_key** | **Array&lt;String&gt;** | Array of VCL variables used to generate a counter key to identify a client. Example variables include `req.http.Fastly-Client-IP`, `req.http.User-Agent`, or a custom header like `req.http.API-Key`. | [optional] |
13
13
  | **penalty_box_duration** | **Integer** | Length of time in minutes that the rate limiter is in effect after the initial violation is detected. | [optional] |
14
14
  | **action** | **String** | The action to take when a rate limiter violation is detected. | [optional] |
15
- | **response** | [**RateLimiterResponse1**](RateLimiterResponse1.md) | | [optional] |
15
+ | **response** | **Hash&lt;String, String&gt;** | Custom response to be sent when the rate limit is exceeded. Required if `action` is `response`. | [optional] |
16
16
  | **response_object_name** | **String** | Name of existing response object. Required if `action` is `response_object`. Note that the rate limiter response is only updated to reflect the response object content when saving the rate limiter configuration. | [optional] |
17
17
  | **logger_type** | **String** | Name of the type of logging endpoint to be used when action is `log_only`. The logging endpoint type is used to determine the appropriate log format to use when emitting log entries. | [optional] |
18
18
  | **feature_revision** | **Integer** | Revision number of the rate limiting feature implementation. Defaults to the most recent revision. | [optional] |
@@ -10,11 +10,74 @@ api_instance = Fastly::RateLimiterApi.new
10
10
 
11
11
  | Method | HTTP request | Description |
12
12
  | ------ | ------------ | ----------- |
13
+ | [**create_rate_limiter**](RateLimiterApi.md#create_rate_limiter) | **POST** /service/{service_id}/version/{version_id}/rate-limiters | Create a rate limiter |
13
14
  | [**delete_rate_limiter**](RateLimiterApi.md#delete_rate_limiter) | **DELETE** /rate-limiters/{rate_limiter_id} | Delete a rate limiter |
14
15
  | [**get_rate_limiter**](RateLimiterApi.md#get_rate_limiter) | **GET** /rate-limiters/{rate_limiter_id} | Get a rate limiter |
15
16
  | [**list_rate_limiters**](RateLimiterApi.md#list_rate_limiters) | **GET** /service/{service_id}/version/{version_id}/rate-limiters | List rate limiters |
17
+ | [**update_rate_limiter**](RateLimiterApi.md#update_rate_limiter) | **PUT** /rate-limiters/{rate_limiter_id} | Update a rate limiter |
16
18
 
17
19
 
20
+ ## `create_rate_limiter()`
21
+
22
+ ```ruby
23
+ create_rate_limiter(opts): <RateLimiterResponse> # Create a rate limiter
24
+ ```
25
+
26
+ Create a rate limiter for a particular service and version.
27
+
28
+ ### Examples
29
+
30
+ ```ruby
31
+ api_instance = Fastly::RateLimiterApi.new
32
+ opts = {
33
+ service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
34
+ version_id: 56, # Integer | Integer identifying a service version.
35
+ name: 'name_example', # String | A human readable name for the rate limiting rule.
36
+ uri_dictionary_name: 'uri_dictionary_name_example', # String | The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited.
37
+ http_methods: ['HEAD'], # Array<String> | Array of HTTP methods to apply rate limiting to.
38
+ rps_limit: 56, # Integer | Upper limit of requests per second allowed by the rate limiter.
39
+ window_size: 1, # Integer | Number of seconds during which the RPS limit must be exceeded in order to trigger a violation.
40
+ client_key: ['inner_example'], # Array<String> | Array of VCL variables used to generate a counter key to identify a client. Example variables include `req.http.Fastly-Client-IP`, `req.http.User-Agent`, or a custom header like `req.http.API-Key`.
41
+ penalty_box_duration: 56, # Integer | Length of time in minutes that the rate limiter is in effect after the initial violation is detected.
42
+ action: 'response', # String | The action to take when a rate limiter violation is detected.
43
+ response_object_name: 'response_object_name_example', # String | Name of existing response object. Required if `action` is `response_object`. Note that the rate limiter response is only updated to reflect the response object content when saving the rate limiter configuration.
44
+ logger_type: 'azureblob', # String | Name of the type of logging endpoint to be used when action is `log_only`. The logging endpoint type is used to determine the appropriate log format to use when emitting log entries.
45
+ feature_revision: 56, # Integer | Revision number of the rate limiting feature implementation. Defaults to the most recent revision.
46
+ }
47
+
48
+ begin
49
+ # Create a rate limiter
50
+ result = api_instance.create_rate_limiter(opts)
51
+ p result
52
+ rescue Fastly::ApiError => e
53
+ puts "Error when calling RateLimiterApi->create_rate_limiter: #{e}"
54
+ end
55
+ ```
56
+
57
+ ### Options
58
+
59
+ | Name | Type | Description | Notes |
60
+ | ---- | ---- | ----------- | ----- |
61
+ | **service_id** | **String** | Alphanumeric string identifying the service. | |
62
+ | **version_id** | **Integer** | Integer identifying a service version. | |
63
+ | **name** | **String** | A human readable name for the rate limiting rule. | [optional] |
64
+ | **uri_dictionary_name** | **String** | The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. | [optional] |
65
+ | **http_methods** | [**Array&lt;String&gt;**](String.md) | Array of HTTP methods to apply rate limiting to. | [optional] |
66
+ | **rps_limit** | **Integer** | Upper limit of requests per second allowed by the rate limiter. | [optional] |
67
+ | **window_size** | **Integer** | Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. | [optional] |
68
+ | **client_key** | [**Array&lt;String&gt;**](String.md) | Array of VCL variables used to generate a counter key to identify a client. Example variables include `req.http.Fastly-Client-IP`, `req.http.User-Agent`, or a custom header like `req.http.API-Key`. | [optional] |
69
+ | **penalty_box_duration** | **Integer** | Length of time in minutes that the rate limiter is in effect after the initial violation is detected. | [optional] |
70
+ | **action** | **String** | The action to take when a rate limiter violation is detected. | [optional] |
71
+ | **response_object_name** | **String** | Name of existing response object. Required if `action` is `response_object`. Note that the rate limiter response is only updated to reflect the response object content when saving the rate limiter configuration. | [optional] |
72
+ | **logger_type** | **String** | Name of the type of logging endpoint to be used when action is `log_only`. The logging endpoint type is used to determine the appropriate log format to use when emitting log entries. | [optional] |
73
+ | **feature_revision** | **Integer** | Revision number of the rate limiting feature implementation. Defaults to the most recent revision. | [optional] |
74
+
75
+ ### Return type
76
+
77
+ [**RateLimiterResponse**](RateLimiterResponse.md)
78
+
79
+ [[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
80
+ [[Back to README]](../../README.md)
18
81
  ## `delete_rate_limiter()`
19
82
 
20
83
  ```ruby
@@ -128,3 +191,62 @@ end
128
191
 
129
192
  [[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
130
193
  [[Back to README]](../../README.md)
194
+ ## `update_rate_limiter()`
195
+
196
+ ```ruby
197
+ update_rate_limiter(opts): <RateLimiterResponse> # Update a rate limiter
198
+ ```
199
+
200
+ Update a rate limiter by its ID.
201
+
202
+ ### Examples
203
+
204
+ ```ruby
205
+ api_instance = Fastly::RateLimiterApi.new
206
+ opts = {
207
+ rate_limiter_id: 'rate_limiter_id_example', # String | Alphanumeric string identifying the rate limiter.
208
+ name: 'name_example', # String | A human readable name for the rate limiting rule.
209
+ uri_dictionary_name: 'uri_dictionary_name_example', # String | The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited.
210
+ http_methods: ['HEAD'], # Array<String> | Array of HTTP methods to apply rate limiting to.
211
+ rps_limit: 56, # Integer | Upper limit of requests per second allowed by the rate limiter.
212
+ window_size: 1, # Integer | Number of seconds during which the RPS limit must be exceeded in order to trigger a violation.
213
+ client_key: ['inner_example'], # Array<String> | Array of VCL variables used to generate a counter key to identify a client. Example variables include `req.http.Fastly-Client-IP`, `req.http.User-Agent`, or a custom header like `req.http.API-Key`.
214
+ penalty_box_duration: 56, # Integer | Length of time in minutes that the rate limiter is in effect after the initial violation is detected.
215
+ action: 'response', # String | The action to take when a rate limiter violation is detected.
216
+ response_object_name: 'response_object_name_example', # String | Name of existing response object. Required if `action` is `response_object`. Note that the rate limiter response is only updated to reflect the response object content when saving the rate limiter configuration.
217
+ logger_type: 'azureblob', # String | Name of the type of logging endpoint to be used when action is `log_only`. The logging endpoint type is used to determine the appropriate log format to use when emitting log entries.
218
+ feature_revision: 56, # Integer | Revision number of the rate limiting feature implementation. Defaults to the most recent revision.
219
+ }
220
+
221
+ begin
222
+ # Update a rate limiter
223
+ result = api_instance.update_rate_limiter(opts)
224
+ p result
225
+ rescue Fastly::ApiError => e
226
+ puts "Error when calling RateLimiterApi->update_rate_limiter: #{e}"
227
+ end
228
+ ```
229
+
230
+ ### Options
231
+
232
+ | Name | Type | Description | Notes |
233
+ | ---- | ---- | ----------- | ----- |
234
+ | **rate_limiter_id** | **String** | Alphanumeric string identifying the rate limiter. | |
235
+ | **name** | **String** | A human readable name for the rate limiting rule. | [optional] |
236
+ | **uri_dictionary_name** | **String** | The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. | [optional] |
237
+ | **http_methods** | [**Array&lt;String&gt;**](String.md) | Array of HTTP methods to apply rate limiting to. | [optional] |
238
+ | **rps_limit** | **Integer** | Upper limit of requests per second allowed by the rate limiter. | [optional] |
239
+ | **window_size** | **Integer** | Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. | [optional] |
240
+ | **client_key** | [**Array&lt;String&gt;**](String.md) | Array of VCL variables used to generate a counter key to identify a client. Example variables include `req.http.Fastly-Client-IP`, `req.http.User-Agent`, or a custom header like `req.http.API-Key`. | [optional] |
241
+ | **penalty_box_duration** | **Integer** | Length of time in minutes that the rate limiter is in effect after the initial violation is detected. | [optional] |
242
+ | **action** | **String** | The action to take when a rate limiter violation is detected. | [optional] |
243
+ | **response_object_name** | **String** | Name of existing response object. Required if `action` is `response_object`. Note that the rate limiter response is only updated to reflect the response object content when saving the rate limiter configuration. | [optional] |
244
+ | **logger_type** | **String** | Name of the type of logging endpoint to be used when action is `log_only`. The logging endpoint type is used to determine the appropriate log format to use when emitting log entries. | [optional] |
245
+ | **feature_revision** | **Integer** | Revision number of the rate limiting feature implementation. Defaults to the most recent revision. | [optional] |
246
+
247
+ ### Return type
248
+
249
+ [**RateLimiterResponse**](RateLimiterResponse.md)
250
+
251
+ [[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
252
+ [[Back to README]](../../README.md)
@@ -12,7 +12,7 @@
12
12
  | **client_key** | **Array&lt;String&gt;** | Array of VCL variables used to generate a counter key to identify a client. Example variables include `req.http.Fastly-Client-IP`, `req.http.User-Agent`, or a custom header like `req.http.API-Key`. | [optional] |
13
13
  | **penalty_box_duration** | **Integer** | Length of time in minutes that the rate limiter is in effect after the initial violation is detected. | [optional] |
14
14
  | **action** | **String** | The action to take when a rate limiter violation is detected. | [optional] |
15
- | **response** | [**RateLimiterResponse1**](RateLimiterResponse1.md) | | [optional] |
15
+ | **response** | **Hash&lt;String, String&gt;** | Custom response to be sent when the rate limit is exceeded. Required if `action` is `response`. | [optional] |
16
16
  | **response_object_name** | **String** | Name of existing response object. Required if `action` is `response_object`. Note that the rate limiter response is only updated to reflect the response object content when saving the rate limiter configuration. | [optional] |
17
17
  | **logger_type** | **String** | Name of the type of logging endpoint to be used when action is `log_only`. The logging endpoint type is used to determine the appropriate log format to use when emitting log entries. | [optional] |
18
18
  | **feature_revision** | **Integer** | Revision number of the rate limiting feature implementation. Defaults to the most recent revision. | [optional] |
@@ -0,0 +1,9 @@
1
+ # Fastly::ReadOnlyCustomerId
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
9
+
@@ -0,0 +1,9 @@
1
+ # Fastly::ReadOnlyId
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
9
+
@@ -0,0 +1,9 @@
1
+ # Fastly::ReadOnlyIdService
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
9
+
@@ -0,0 +1,9 @@
1
+ # Fastly::ReadOnlyUserId
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
9
+
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **name** | **String** | The name for the snippet. | [optional] |
8
- | **dynamic** | **Integer** | Sets the snippet version. | [optional] |
8
+ | **dynamic** | **String** | Sets the snippet version. | [optional] |
9
9
  | **type** | **String** | The location in generated VCL where the snippet should be placed. | [optional] |
10
10
  | **content** | **String** | The VCL code that specifies exactly what the snippet does. | [optional] |
11
11
  | **priority** | **String** | Priority determines execution order. Lower numbers execute first. | [optional][default to &#39;100&#39;] |
data/docs/Snippet.md CHANGED
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **name** | **String** | The name for the snippet. | [optional] |
8
- | **dynamic** | **Integer** | Sets the snippet version. | [optional] |
8
+ | **dynamic** | **String** | Sets the snippet version. | [optional] |
9
9
  | **type** | **String** | The location in generated VCL where the snippet should be placed. | [optional] |
10
10
  | **content** | **String** | The VCL code that specifies exactly what the snippet does. | [optional] |
11
11
  | **priority** | **String** | Priority determines execution order. Lower numbers execute first. | [optional][default to &#39;100&#39;] |
data/docs/SnippetApi.md CHANGED
@@ -34,7 +34,7 @@ opts = {
34
34
  service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
35
35
  version_id: 56, # Integer | Integer identifying a service version.
36
36
  name: 'name_example', # String | The name for the snippet.
37
- dynamic: 0, # Integer | Sets the snippet version.
37
+ dynamic: '0', # String | Sets the snippet version.
38
38
  type: 'init', # String | The location in generated VCL where the snippet should be placed.
39
39
  content: 'content_example', # String | The VCL code that specifies exactly what the snippet does.
40
40
  priority: 'priority_example', # String | Priority determines execution order. Lower numbers execute first.
@@ -56,7 +56,7 @@ end
56
56
  | **service_id** | **String** | Alphanumeric string identifying the service. | |
57
57
  | **version_id** | **Integer** | Integer identifying a service version. | |
58
58
  | **name** | **String** | The name for the snippet. | [optional] |
59
- | **dynamic** | **Integer** | Sets the snippet version. | [optional] |
59
+ | **dynamic** | **String** | Sets the snippet version. | [optional] |
60
60
  | **type** | **String** | The location in generated VCL where the snippet should be placed. | [optional] |
61
61
  | **content** | **String** | The VCL code that specifies exactly what the snippet does. | [optional] |
62
62
  | **priority** | **String** | Priority determines execution order. Lower numbers execute first. | [optional][default to &#39;100&#39;] |
@@ -243,7 +243,7 @@ opts = {
243
243
  service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
244
244
  snippet_id: 'snippet_id_example', # String | Alphanumeric string identifying a VCL Snippet.
245
245
  name: 'name_example', # String | The name for the snippet.
246
- dynamic: 0, # Integer | Sets the snippet version.
246
+ dynamic: '0', # String | Sets the snippet version.
247
247
  type: 'init', # String | The location in generated VCL where the snippet should be placed.
248
248
  content: 'content_example', # String | The VCL code that specifies exactly what the snippet does.
249
249
  priority: 'priority_example', # String | Priority determines execution order. Lower numbers execute first.
@@ -265,7 +265,7 @@ end
265
265
  | **service_id** | **String** | Alphanumeric string identifying the service. | |
266
266
  | **snippet_id** | **String** | Alphanumeric string identifying a VCL Snippet. | |
267
267
  | **name** | **String** | The name for the snippet. | [optional] |
268
- | **dynamic** | **Integer** | Sets the snippet version. | [optional] |
268
+ | **dynamic** | **String** | Sets the snippet version. | [optional] |
269
269
  | **type** | **String** | The location in generated VCL where the snippet should be placed. | [optional] |
270
270
  | **content** | **String** | The VCL code that specifies exactly what the snippet does. | [optional] |
271
271
  | **priority** | **String** | Priority determines execution order. Lower numbers execute first. | [optional][default to &#39;100&#39;] |
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **name** | **String** | The name for the snippet. | [optional] |
8
- | **dynamic** | **Integer** | Sets the snippet version. | [optional] |
8
+ | **dynamic** | **String** | Sets the snippet version. | [optional] |
9
9
  | **type** | **String** | The location in generated VCL where the snippet should be placed. | [optional] |
10
10
  | **content** | **String** | The VCL code that specifies exactly what the snippet does. | [optional] |
11
11
  | **priority** | **String** | Priority determines execution order. Lower numbers execute first. | [optional][default to &#39;100&#39;] |
@@ -0,0 +1,9 @@
1
+ # Fastly::TokensAdditionalProps
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
9
+
@@ -4,11 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **msg** | **String** | | [optional] |
8
- | **status** | **String** | | [optional] |
9
- | **errors** | **Array&lt;String&gt;** | | [optional] |
10
- | **warnings** | **Array&lt;String&gt;** | | [optional] |
11
- | **messages** | [**Array&lt;ValidatorResultMessages&gt;**](ValidatorResultMessages.md) | | [optional] |
7
+ | **data** | [**ValidatorResultData**](ValidatorResultData.md) | | [optional] |
12
8
 
13
9
  [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
14
10
 
@@ -0,0 +1,12 @@
1
+ # Fastly::ValidatorResultData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [optional] |
8
+ | **type** | **String** | | [optional] |
9
+ | **attributes** | [**ValidatorResultDataAttributes**](ValidatorResultDataAttributes.md) | | [optional] |
10
+
11
+ [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
12
+
@@ -0,0 +1,14 @@
1
+ # Fastly::ValidatorResultDataAttributes
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **msg** | **String** | | [optional] |
8
+ | **status** | **String** | | [optional] |
9
+ | **errors** | **Array&lt;String&gt;** | | [optional] |
10
+ | **warnings** | **Array&lt;String&gt;** | | [optional] |
11
+ | **messages** | [**Array&lt;ValidatorResultDataAttributesMessages&gt;**](ValidatorResultDataAttributesMessages.md) | | [optional] |
12
+
13
+ [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
14
+
@@ -1,4 +1,4 @@
1
- # Fastly::ValidatorResultMessages
1
+ # Fastly::ValidatorResultDataAttributesMessages
2
2
 
3
3
  ## Properties
4
4
 
@@ -7,7 +7,7 @@
7
7
  | **type** | **String** | | |
8
8
  | **warning** | **Boolean** | | |
9
9
  | **message** | **String** | | |
10
- | **tokens** | **Array&lt;Hash&lt;String, AnyOfstringnumber&gt;&gt;** | | |
10
+ | **tokens** | **Array&lt;Hash&lt;String, TokensAdditionalProps&gt;&gt;** | | |
11
11
 
12
12
  [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
13
13
 
data/docs/VclApi.md CHANGED
@@ -235,7 +235,7 @@ end
235
235
  ## `get_custom_vcl_generated_highlighted()`
236
236
 
237
237
  ```ruby
238
- get_custom_vcl_generated_highlighted(opts) # Get the generated VCL with syntax highlighting
238
+ get_custom_vcl_generated_highlighted(opts): <VclSyntaxHighlightingResponse> # Get the generated VCL with syntax highlighting
239
239
  ```
240
240
 
241
241
  Display the content of generated VCL with HTML syntax highlighting. Include line numbers by sending `lineno=true` as a request parameter.
@@ -251,7 +251,8 @@ opts = {
251
251
 
252
252
  begin
253
253
  # Get the generated VCL with syntax highlighting
254
- api_instance.get_custom_vcl_generated_highlighted(opts)
254
+ result = api_instance.get_custom_vcl_generated_highlighted(opts)
255
+ p result
255
256
  rescue Fastly::ApiError => e
256
257
  puts "Error when calling VclApi->get_custom_vcl_generated_highlighted: #{e}"
257
258
  end
@@ -266,14 +267,14 @@ end
266
267
 
267
268
  ### Return type
268
269
 
269
- nil (empty response body)
270
+ [**VclSyntaxHighlightingResponse**](VclSyntaxHighlightingResponse.md)
270
271
 
271
272
  [[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
272
273
  [[Back to README]](../../README.md)
273
274
  ## `get_custom_vcl_highlighted()`
274
275
 
275
276
  ```ruby
276
- get_custom_vcl_highlighted(opts) # Get a custom VCL file with syntax highlighting
277
+ get_custom_vcl_highlighted(opts): <VclSyntaxHighlightingResponse> # Get a custom VCL file with syntax highlighting
277
278
  ```
278
279
 
279
280
  Get the uploaded VCL for a particular service and version with HTML syntax highlighting. Include line numbers by sending `lineno=true` as a request parameter.
@@ -290,7 +291,8 @@ opts = {
290
291
 
291
292
  begin
292
293
  # Get a custom VCL file with syntax highlighting
293
- api_instance.get_custom_vcl_highlighted(opts)
294
+ result = api_instance.get_custom_vcl_highlighted(opts)
295
+ p result
294
296
  rescue Fastly::ApiError => e
295
297
  puts "Error when calling VclApi->get_custom_vcl_highlighted: #{e}"
296
298
  end
@@ -306,7 +308,7 @@ end
306
308
 
307
309
  ### Return type
308
310
 
309
- nil (empty response body)
311
+ [**VclSyntaxHighlightingResponse**](VclSyntaxHighlightingResponse.md)
310
312
 
311
313
  [[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
312
314
  [[Back to README]](../../README.md)