fastly 7.1.0 → 7.2.0

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 +17 -0
  3. data/Gemfile.lock +2 -2
  4. data/README.md +6 -5
  5. data/docs/EventsApi.md +8 -0
  6. data/docs/HistoricalDdos.md +13 -0
  7. data/docs/HistoricalDdosMeta.md +13 -0
  8. data/docs/HistoricalFieldResultsAttributes.md +9 -0
  9. data/docs/KvStoreApi.md +15 -15
  10. data/docs/LoggingLogentriesAdditional.md +1 -1
  11. data/docs/LoggingLogentriesApi.md +4 -4
  12. data/docs/LoggingLogentriesResponse.md +1 -1
  13. data/docs/PlatformDdosDataItems.md +10 -0
  14. data/docs/PlatformDdosEntry.md +10 -0
  15. data/docs/PlatformDdosResponse.md +13 -0
  16. data/docs/PlatformDdosResponseAllOf.md +10 -0
  17. data/docs/RealtimeEntryAggregated.md +9 -0
  18. data/docs/RealtimeMeasurements.md +9 -0
  19. data/docs/Results.md +9 -0
  20. data/docs/SchemasSnippetResponse.md +1 -1
  21. data/docs/SchemasSnippetResponseCommon.md +15 -0
  22. data/docs/Snippet.md +1 -1
  23. data/docs/SnippetAllOf.md +10 -0
  24. data/docs/SnippetApi.md +6 -6
  25. data/docs/SnippetCommon.md +13 -0
  26. data/docs/SnippetResponse.md +1 -1
  27. data/docs/SnippetResponseCommon.md +15 -0
  28. data/docs/{SnippetResponseAllOf.md → SnippetResponseCommonAllOf.md} +1 -1
  29. data/docs/SnippetResponsePost.md +20 -0
  30. data/docs/SnippetWithDynamicNumber.md +14 -0
  31. data/docs/SnippetWithDynamicNumberAllOf.md +10 -0
  32. data/docs/ValuesDdos.md +15 -0
  33. data/docs/WholePlatformDdosHistoricalApi.md +56 -0
  34. data/lib/fastly/api/events_api.rb +12 -0
  35. data/lib/fastly/api/kv_store_api.rb +14 -14
  36. data/lib/fastly/api/logging_logentries_api.rb +4 -4
  37. data/lib/fastly/api/snippet_api.rb +17 -17
  38. data/lib/fastly/api/whole_platform_ddos_historical_api.rb +89 -0
  39. data/lib/fastly/configuration.rb +6 -0
  40. data/lib/fastly/models/historical_ddos.rb +249 -0
  41. data/lib/fastly/models/historical_ddos_meta.rb +248 -0
  42. data/lib/fastly/models/historical_field_results_attributes.rb +91 -1
  43. data/lib/fastly/models/logging_logentries_additional.rb +1 -1
  44. data/lib/fastly/models/logging_logentries_response.rb +1 -1
  45. data/lib/fastly/models/platform_ddos_data_items.rb +216 -0
  46. data/lib/fastly/models/platform_ddos_entry.rb +219 -0
  47. data/lib/fastly/models/platform_ddos_response.rb +257 -0
  48. data/lib/fastly/models/platform_ddos_response_all_of.rb +219 -0
  49. data/lib/fastly/models/realtime_entry_aggregated.rb +94 -4
  50. data/lib/fastly/models/realtime_measurements.rb +94 -4
  51. data/lib/fastly/models/results.rb +94 -4
  52. data/lib/fastly/models/schemas_snippet_response.rb +25 -26
  53. data/lib/fastly/models/schemas_snippet_response_common.rb +276 -0
  54. data/lib/fastly/models/snippet.rb +34 -26
  55. data/lib/fastly/models/snippet_all_of.rb +251 -0
  56. data/lib/fastly/models/snippet_common.rb +283 -0
  57. data/lib/fastly/models/snippet_response.rb +24 -25
  58. data/lib/fastly/models/snippet_response_common.rb +276 -0
  59. data/lib/fastly/models/{snippet_response_all_of.rb → snippet_response_common_all_of.rb} +3 -3
  60. data/lib/fastly/models/snippet_response_post.rb +374 -0
  61. data/lib/fastly/models/snippet_with_dynamic_number.rb +313 -0
  62. data/lib/fastly/models/snippet_with_dynamic_number_all_of.rb +251 -0
  63. data/lib/fastly/models/values_ddos.rb +268 -0
  64. data/lib/fastly/version.rb +1 -1
  65. data/lib/fastly.rb +16 -1
  66. data/sig.json +1 -1
  67. metadata +34 -4
@@ -0,0 +1,10 @@
1
+ # Fastly::SnippetWithDynamicNumberAllOf
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **dynamic** | **Float** | Sets the snippet version. | [optional] |
8
+
9
+ [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
10
+
@@ -0,0 +1,15 @@
1
+ # Fastly::ValuesDdos
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ddos_action_limit_streams_connections** | **Integer** | For HTTP/2, the number of connections the limit-streams action was applied to. The limit-streams action caps the allowed number of concurrent streams in a connection. | [optional] |
8
+ | **ddos_action_limit_streams_requests** | **Integer** | For HTTP/2, the number of requests made on a connection for which the limit-streams action was taken. The limit-streams action caps the allowed number of concurrent streams in a connection. | [optional] |
9
+ | **ddos_action_tarpit_accept** | **Integer** | The number of times the tarpit-accept action was taken. The tarpit-accept action adds a delay when accepting future connections. | [optional] |
10
+ | **ddos_action_tarpit** | **Integer** | The number of times the tarpit action was taken. The tarpit action delays writing the response to the client. | [optional] |
11
+ | **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] |
12
+ | **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] |
13
+
14
+ [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
15
+
@@ -0,0 +1,56 @@
1
+ # Fastly::WholePlatformDdosHistoricalApi
2
+
3
+
4
+ ```ruby
5
+ require 'fastly'
6
+ api_instance = Fastly::WholePlatformDdosHistoricalApi.new
7
+ ```
8
+
9
+ ## Methods
10
+
11
+ | Method | HTTP request | Description |
12
+ | ------ | ------------ | ----------- |
13
+ | [**get_platform_ddos_historical**](WholePlatformDdosHistoricalApi.md#get_platform_ddos_historical) | **GET** /metrics/platform/ddos | Get historical DDoS metrics for the entire Fastly platform |
14
+
15
+
16
+ ## `get_platform_ddos_historical()`
17
+
18
+ ```ruby
19
+ get_platform_ddos_historical(opts): <PlatformDdosResponse> # Get historical DDoS metrics for the entire Fastly platform
20
+ ```
21
+
22
+ Fetches historical DDoS metrics for the entire Fastly platform.
23
+
24
+ ### Examples
25
+
26
+ ```ruby
27
+ api_instance = Fastly::WholePlatformDdosHistoricalApi.new
28
+ opts = {
29
+ start: '2021-08-01T00:00:00.000Z', # String | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value.
30
+ _end: '2020-08-02T00:00:00.000Z', # String | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value.
31
+ downsample: 'hour', # String | Duration of sample windows.
32
+ }
33
+
34
+ begin
35
+ # Get historical DDoS metrics for the entire Fastly platform
36
+ result = api_instance.get_platform_ddos_historical(opts)
37
+ p result
38
+ rescue Fastly::ApiError => e
39
+ puts "Error when calling WholePlatformDdosHistoricalApi->get_platform_ddos_historical: #{e}"
40
+ end
41
+ ```
42
+
43
+ ### Options
44
+
45
+ | Name | Type | Description | Notes |
46
+ | ---- | ---- | ----------- | ----- |
47
+ | **start** | **String** | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. | [optional] |
48
+ | **_end** | **String** | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. | [optional] |
49
+ | **downsample** | **String** | Duration of sample windows. | [optional][default to &#39;hour&#39;] |
50
+
51
+ ### Return type
52
+
53
+ [**PlatformDdosResponse**](PlatformDdosResponse.md)
54
+
55
+ [[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
56
+ [[Back to README]](../../README.md)
@@ -88,6 +88,10 @@ module Fastly
88
88
  # @option opts [String] :filter_user_id Limit the results returned to a specific user.
89
89
  # @option opts [String] :filter_token_id Limit the returned events to a specific token.
90
90
  # @option opts [String] :filter_created_at Limit the returned events to a specific time frame. Accepts sub-parameters: lt, lte, gt, gte (e.g., filter[created_at][gt]&#x3D;2022-01-12).
91
+ # @option opts [String] :filter_created_at_lte Return events on and before a date and time in ISO 8601 format.
92
+ # @option opts [String] :filter_created_at_lt Return events before a date and time in ISO 8601 format.
93
+ # @option opts [String] :filter_created_at_gte Return events on and after a date and time in ISO 8601 format.
94
+ # @option opts [String] :filter_created_at_gt Return events after a date and time in ISO 8601 format.
91
95
  # @option opts [Integer] :page_number Current page.
92
96
  # @option opts [Integer] :page_size Number of records per page. (default to 20)
93
97
  # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at')
@@ -105,6 +109,10 @@ module Fastly
105
109
  # @option opts [String] :filter_user_id Limit the results returned to a specific user.
106
110
  # @option opts [String] :filter_token_id Limit the returned events to a specific token.
107
111
  # @option opts [String] :filter_created_at Limit the returned events to a specific time frame. Accepts sub-parameters: lt, lte, gt, gte (e.g., filter[created_at][gt]&#x3D;2022-01-12).
112
+ # @option opts [String] :filter_created_at_lte Return events on and before a date and time in ISO 8601 format.
113
+ # @option opts [String] :filter_created_at_lt Return events before a date and time in ISO 8601 format.
114
+ # @option opts [String] :filter_created_at_gte Return events on and after a date and time in ISO 8601 format.
115
+ # @option opts [String] :filter_created_at_gt Return events after a date and time in ISO 8601 format.
108
116
  # @option opts [Integer] :page_number Current page.
109
117
  # @option opts [Integer] :page_size Number of records per page. (default to 20)
110
118
  # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at')
@@ -137,6 +145,10 @@ module Fastly
137
145
  query_params[:'filter[user_id]'] = opts[:'filter_user_id'] if !opts[:'filter_user_id'].nil?
138
146
  query_params[:'filter[token_id]'] = opts[:'filter_token_id'] if !opts[:'filter_token_id'].nil?
139
147
  query_params[:'filter[created_at]'] = opts[:'filter_created_at'] if !opts[:'filter_created_at'].nil?
148
+ query_params[:'filter[created_at][lte]'] = opts[:'filter_created_at_lte'] if !opts[:'filter_created_at_lte'].nil?
149
+ query_params[:'filter[created_at][lt]'] = opts[:'filter_created_at_lt'] if !opts[:'filter_created_at_lt'].nil?
150
+ query_params[:'filter[created_at][gte]'] = opts[:'filter_created_at_gte'] if !opts[:'filter_created_at_gte'].nil?
151
+ query_params[:'filter[created_at][gt]'] = opts[:'filter_created_at_gt'] if !opts[:'filter_created_at_gt'].nil?
140
152
  query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
141
153
  query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
142
154
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
@@ -17,8 +17,8 @@ module Fastly
17
17
  def initialize(api_client = ApiClient.default)
18
18
  @api_client = api_client
19
19
  end
20
- # Create an kv store.
21
- # Create a new kv store.
20
+ # Create a KV store.
21
+ # Create a new KV store.
22
22
  # @option opts [String] :location
23
23
  # @option opts [Store] :store
24
24
  # @return [StoreResponse]
@@ -27,8 +27,8 @@ module Fastly
27
27
  data
28
28
  end
29
29
 
30
- # Create an kv store.
31
- # Create a new kv store.
30
+ # Create a KV store.
31
+ # Create a new KV store.
32
32
  # @option opts [String] :location
33
33
  # @option opts [Store] :store
34
34
  # @return [Array<(StoreResponse, Integer, Hash)>] StoreResponse data, response status code and response headers
@@ -83,8 +83,8 @@ module Fastly
83
83
  return data, status_code, headers
84
84
  end
85
85
 
86
- # Delete an kv store.
87
- # An kv store must be empty before it can be deleted. Deleting an kv store that still contains keys will result in a `409` (Conflict).
86
+ # Delete a KV store.
87
+ # A KV store must be empty before it can be deleted. Deleting a KV store that still contains keys will result in a `409` (Conflict).
88
88
  # @option opts [String] :store_id (required)
89
89
  # @return [nil]
90
90
  def delete_store(opts = {})
@@ -92,8 +92,8 @@ module Fastly
92
92
  nil
93
93
  end
94
94
 
95
- # Delete an kv store.
96
- # An kv store must be empty before it can be deleted. Deleting an kv store that still contains keys will result in a &#x60;409&#x60; (Conflict).
95
+ # Delete a KV store.
96
+ # A KV store must be empty before it can be deleted. Deleting a KV store that still contains keys will result in a &#x60;409&#x60; (Conflict).
97
97
  # @option opts [String] :store_id (required)
98
98
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
99
99
  def delete_store_with_http_info(opts = {})
@@ -144,8 +144,8 @@ module Fastly
144
144
  return data, status_code, headers
145
145
  end
146
146
 
147
- # Describe an kv store.
148
- # Get an kv store by ID.
147
+ # Describe a KV store.
148
+ # Get a KV store by ID.
149
149
  # @option opts [String] :store_id (required)
150
150
  # @return [StoreResponse]
151
151
  def get_store(opts = {})
@@ -153,8 +153,8 @@ module Fastly
153
153
  data
154
154
  end
155
155
 
156
- # Describe an kv store.
157
- # Get an kv store by ID.
156
+ # Describe a KV store.
157
+ # Get a KV store by ID.
158
158
  # @option opts [String] :store_id (required)
159
159
  # @return [Array<(StoreResponse, Integer, Hash)>] StoreResponse data, response status code and response headers
160
160
  def get_store_with_http_info(opts = {})
@@ -207,7 +207,7 @@ module Fastly
207
207
  return data, status_code, headers
208
208
  end
209
209
 
210
- # List kv stores.
210
+ # List KV stores.
211
211
  # Get all stores for a given customer.
212
212
  # @option opts [String] :cursor
213
213
  # @option opts [Integer] :limit (default to 100)
@@ -217,7 +217,7 @@ module Fastly
217
217
  data
218
218
  end
219
219
 
220
- # List kv stores.
220
+ # List KV stores.
221
221
  # Get all stores for a given customer.
222
222
  # @option opts [String] :cursor
223
223
  # @option opts [Integer] :limit (default to 100)
@@ -27,7 +27,7 @@ module Fastly
27
27
  # @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '%h %l %u %t \"%r\" %&gt;s %b')
28
28
  # @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in &#x60;vcl_log&#x60; if &#x60;format_version&#x60; is set to &#x60;2&#x60; and in &#x60;vcl_deliver&#x60; if &#x60;format_version&#x60; is set to &#x60;1&#x60;. (default to FORMAT_VERSION::v2)
29
29
  # @option opts [Integer] :port The port number. (default to 20000)
30
- # @option opts [String] :token Use token based authentication ([https://logentries.com/doc/input-token/](https://logentries.com/doc/input-token/)).
30
+ # @option opts [String] :token Use token based authentication.
31
31
  # @option opts [LoggingUseTls] :use_tls (default to LoggingUseTls::no_tls)
32
32
  # @option opts [String] :region The region to which to stream logs.
33
33
  # @return [LoggingLogentriesResponse]
@@ -46,7 +46,7 @@ module Fastly
46
46
  # @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '%h %l %u %t \"%r\" %&gt;s %b')
47
47
  # @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in &#x60;vcl_log&#x60; if &#x60;format_version&#x60; is set to &#x60;2&#x60; and in &#x60;vcl_deliver&#x60; if &#x60;format_version&#x60; is set to &#x60;1&#x60;. (default to FORMAT_VERSION::v2)
48
48
  # @option opts [Integer] :port The port number. (default to 20000)
49
- # @option opts [String] :token Use token based authentication ([https://logentries.com/doc/input-token/](https://logentries.com/doc/input-token/)).
49
+ # @option opts [String] :token Use token based authentication.
50
50
  # @option opts [LoggingUseTls] :use_tls (default to LoggingUseTls::no_tls)
51
51
  # @option opts [String] :region The region to which to stream logs.
52
52
  # @return [Array<(LoggingLogentriesResponse, Integer, Hash)>] LoggingLogentriesResponse data, response status code and response headers
@@ -366,7 +366,7 @@ module Fastly
366
366
  # @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '%h %l %u %t \"%r\" %&gt;s %b')
367
367
  # @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in &#x60;vcl_log&#x60; if &#x60;format_version&#x60; is set to &#x60;2&#x60; and in &#x60;vcl_deliver&#x60; if &#x60;format_version&#x60; is set to &#x60;1&#x60;. (default to FORMAT_VERSION::v2)
368
368
  # @option opts [Integer] :port The port number. (default to 20000)
369
- # @option opts [String] :token Use token based authentication ([https://logentries.com/doc/input-token/](https://logentries.com/doc/input-token/)).
369
+ # @option opts [String] :token Use token based authentication.
370
370
  # @option opts [LoggingUseTls] :use_tls (default to LoggingUseTls::no_tls)
371
371
  # @option opts [String] :region The region to which to stream logs.
372
372
  # @return [LoggingLogentriesResponse]
@@ -386,7 +386,7 @@ module Fastly
386
386
  # @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '%h %l %u %t \"%r\" %&gt;s %b')
387
387
  # @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in &#x60;vcl_log&#x60; if &#x60;format_version&#x60; is set to &#x60;2&#x60; and in &#x60;vcl_deliver&#x60; if &#x60;format_version&#x60; is set to &#x60;1&#x60;. (default to FORMAT_VERSION::v2)
388
388
  # @option opts [Integer] :port The port number. (default to 20000)
389
- # @option opts [String] :token Use token based authentication ([https://logentries.com/doc/input-token/](https://logentries.com/doc/input-token/)).
389
+ # @option opts [String] :token Use token based authentication.
390
390
  # @option opts [LoggingUseTls] :use_tls (default to LoggingUseTls::no_tls)
391
391
  # @option opts [String] :region The region to which to stream logs.
392
392
  # @return [Array<(LoggingLogentriesResponse, Integer, Hash)>] LoggingLogentriesResponse data, response status code and response headers
@@ -22,11 +22,11 @@ module Fastly
22
22
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
23
23
  # @option opts [Integer] :version_id Integer identifying a service version. (required)
24
24
  # @option opts [String] :name The name for the snippet.
25
- # @option opts [String] :dynamic Sets the snippet version.
26
25
  # @option opts [String] :type The location in generated VCL where the snippet should be placed.
27
26
  # @option opts [String] :content The VCL code that specifies exactly what the snippet does.
28
27
  # @option opts [String] :priority Priority determines execution order. Lower numbers execute first. (default to '100')
29
- # @return [SnippetResponse]
28
+ # @option opts [String] :dynamic Sets the snippet version.
29
+ # @return [SnippetResponsePost]
30
30
  def create_snippet(opts = {})
31
31
  data, _status_code, _headers = create_snippet_with_http_info(opts)
32
32
  data
@@ -37,11 +37,11 @@ module Fastly
37
37
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
38
38
  # @option opts [Integer] :version_id Integer identifying a service version. (required)
39
39
  # @option opts [String] :name The name for the snippet.
40
- # @option opts [String] :dynamic Sets the snippet version.
41
40
  # @option opts [String] :type The location in generated VCL where the snippet should be placed.
42
41
  # @option opts [String] :content The VCL code that specifies exactly what the snippet does.
43
42
  # @option opts [String] :priority Priority determines execution order. Lower numbers execute first. (default to '100')
44
- # @return [Array<(SnippetResponse, Integer, Hash)>] SnippetResponse data, response status code and response headers
43
+ # @option opts [String] :dynamic Sets the snippet version.
44
+ # @return [Array<(SnippetResponsePost, Integer, Hash)>] SnippetResponsePost data, response status code and response headers
45
45
  def create_snippet_with_http_info(opts = {})
46
46
  if @api_client.config.debugging
47
47
  @api_client.config.logger.debug 'Calling API: SnippetApi.create_snippet ...'
@@ -57,14 +57,14 @@ module Fastly
57
57
  if @api_client.config.client_side_validation && version_id.nil?
58
58
  fail ArgumentError, "Missing the required parameter 'version_id' when calling SnippetApi.create_snippet"
59
59
  end
60
- allowable_values = ["0", "1"]
61
- if @api_client.config.client_side_validation && opts[:'dynamic'] && !allowable_values.include?(opts[:'dynamic'])
62
- fail ArgumentError, "invalid value for \"dynamic\", must be one of #{allowable_values}"
63
- end
64
60
  allowable_values = ["init", "recv", "hash", "hit", "miss", "pass", "fetch", "error", "deliver", "log", "none"]
65
61
  if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
66
62
  fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
67
63
  end
64
+ allowable_values = ["0", "1"]
65
+ if @api_client.config.client_side_validation && opts[:'dynamic'] && !allowable_values.include?(opts[:'dynamic'])
66
+ fail ArgumentError, "invalid value for \"dynamic\", must be one of #{allowable_values}"
67
+ end
68
68
  # resource path
69
69
  local_var_path = '/service/{service_id}/version/{version_id}/snippet'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
70
70
 
@@ -84,16 +84,16 @@ module Fastly
84
84
  # form parameters
85
85
  form_params = opts[:form_params] || {}
86
86
  form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
87
- form_params['dynamic'] = opts[:'dynamic'] if !opts[:'dynamic'].nil?
88
87
  form_params['type'] = opts[:'type'] if !opts[:'type'].nil?
89
88
  form_params['content'] = opts[:'content'] if !opts[:'content'].nil?
90
89
  form_params['priority'] = opts[:'priority'] if !opts[:'priority'].nil?
90
+ form_params['dynamic'] = opts[:'dynamic'] if !opts[:'dynamic'].nil?
91
91
 
92
92
  # http body (model)
93
93
  post_body = opts[:debug_body]
94
94
 
95
95
  # return_type
96
- return_type = opts[:debug_return_type] || 'SnippetResponse'
96
+ return_type = opts[:debug_return_type] || 'SnippetResponsePost'
97
97
 
98
98
  # auth_names
99
99
  auth_names = opts[:debug_auth_names] || ['token']
@@ -496,10 +496,10 @@ module Fastly
496
496
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
497
497
  # @option opts [String] :snippet_id Alphanumeric string identifying a VCL Snippet. (required)
498
498
  # @option opts [String] :name The name for the snippet.
499
- # @option opts [String] :dynamic Sets the snippet version.
500
499
  # @option opts [String] :type The location in generated VCL where the snippet should be placed.
501
500
  # @option opts [String] :content The VCL code that specifies exactly what the snippet does.
502
501
  # @option opts [String] :priority Priority determines execution order. Lower numbers execute first. (default to '100')
502
+ # @option opts [String] :dynamic Sets the snippet version.
503
503
  # @return [SnippetResponse]
504
504
  def update_snippet_dynamic(opts = {})
505
505
  data, _status_code, _headers = update_snippet_dynamic_with_http_info(opts)
@@ -511,10 +511,10 @@ module Fastly
511
511
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
512
512
  # @option opts [String] :snippet_id Alphanumeric string identifying a VCL Snippet. (required)
513
513
  # @option opts [String] :name The name for the snippet.
514
- # @option opts [String] :dynamic Sets the snippet version.
515
514
  # @option opts [String] :type The location in generated VCL where the snippet should be placed.
516
515
  # @option opts [String] :content The VCL code that specifies exactly what the snippet does.
517
516
  # @option opts [String] :priority Priority determines execution order. Lower numbers execute first. (default to '100')
517
+ # @option opts [String] :dynamic Sets the snippet version.
518
518
  # @return [Array<(SnippetResponse, Integer, Hash)>] SnippetResponse data, response status code and response headers
519
519
  def update_snippet_dynamic_with_http_info(opts = {})
520
520
  if @api_client.config.debugging
@@ -531,14 +531,14 @@ module Fastly
531
531
  if @api_client.config.client_side_validation && snippet_id.nil?
532
532
  fail ArgumentError, "Missing the required parameter 'snippet_id' when calling SnippetApi.update_snippet_dynamic"
533
533
  end
534
- allowable_values = ["0", "1"]
535
- if @api_client.config.client_side_validation && opts[:'dynamic'] && !allowable_values.include?(opts[:'dynamic'])
536
- fail ArgumentError, "invalid value for \"dynamic\", must be one of #{allowable_values}"
537
- end
538
534
  allowable_values = ["init", "recv", "hash", "hit", "miss", "pass", "fetch", "error", "deliver", "log", "none"]
539
535
  if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
540
536
  fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
541
537
  end
538
+ allowable_values = ["0", "1"]
539
+ if @api_client.config.client_side_validation && opts[:'dynamic'] && !allowable_values.include?(opts[:'dynamic'])
540
+ fail ArgumentError, "invalid value for \"dynamic\", must be one of #{allowable_values}"
541
+ end
542
542
  # resource path
543
543
  local_var_path = '/service/{service_id}/snippet/{snippet_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'snippet_id' + '}', CGI.escape(snippet_id.to_s))
544
544
 
@@ -558,10 +558,10 @@ module Fastly
558
558
  # form parameters
559
559
  form_params = opts[:form_params] || {}
560
560
  form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
561
- form_params['dynamic'] = opts[:'dynamic'] if !opts[:'dynamic'].nil?
562
561
  form_params['type'] = opts[:'type'] if !opts[:'type'].nil?
563
562
  form_params['content'] = opts[:'content'] if !opts[:'content'].nil?
564
563
  form_params['priority'] = opts[:'priority'] if !opts[:'priority'].nil?
564
+ form_params['dynamic'] = opts[:'dynamic'] if !opts[:'dynamic'].nil?
565
565
 
566
566
  # http body (model)
567
567
  post_body = opts[:debug_body]
@@ -0,0 +1,89 @@
1
+ =begin
2
+ #Fastly API
3
+
4
+ #Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: oss@fastly.com
8
+
9
+ =end
10
+
11
+ require 'cgi'
12
+
13
+ module Fastly
14
+ class WholePlatformDdosHistoricalApi
15
+ attr_accessor :api_client
16
+
17
+ def initialize(api_client = ApiClient.default)
18
+ @api_client = api_client
19
+ end
20
+ # Get historical DDoS metrics for the entire Fastly platform
21
+ # Fetches historical DDoS metrics for the entire Fastly platform.
22
+ # @option opts [String] :start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided &#x60;downsample&#x60; value.
23
+ # @option opts [String] :_end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided &#x60;downsample&#x60; value.
24
+ # @option opts [String] :downsample Duration of sample windows. (default to 'hour')
25
+ # @return [PlatformDdosResponse]
26
+ def get_platform_ddos_historical(opts = {})
27
+ data, _status_code, _headers = get_platform_ddos_historical_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Get historical DDoS metrics for the entire Fastly platform
32
+ # Fetches historical DDoS metrics for the entire Fastly platform.
33
+ # @option opts [String] :start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided &#x60;downsample&#x60; value.
34
+ # @option opts [String] :_end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided &#x60;downsample&#x60; value.
35
+ # @option opts [String] :downsample Duration of sample windows. (default to 'hour')
36
+ # @return [Array<(PlatformDdosResponse, Integer, Hash)>] PlatformDdosResponse data, response status code and response headers
37
+ def get_platform_ddos_historical_with_http_info(opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: WholePlatformDdosHistoricalApi.get_platform_ddos_historical ...'
40
+ end
41
+ # unbox the parameters from the hash
42
+ allowable_values = ["hour", "day"]
43
+ if @api_client.config.client_side_validation && opts[:'downsample'] && !allowable_values.include?(opts[:'downsample'])
44
+ fail ArgumentError, "invalid value for \"downsample\", must be one of #{allowable_values}"
45
+ end
46
+ # resource path
47
+ local_var_path = '/metrics/platform/ddos'
48
+
49
+ # query parameters
50
+ query_params = opts[:query_params] || {}
51
+ query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
52
+ query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil?
53
+ query_params[:'downsample'] = opts[:'downsample'] if !opts[:'downsample'].nil?
54
+
55
+ # header parameters
56
+ header_params = opts[:header_params] || {}
57
+ # HTTP header 'Accept' (if needed)
58
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
59
+
60
+ # form parameters
61
+ form_params = opts[:form_params] || {}
62
+
63
+ # http body (model)
64
+ post_body = opts[:debug_body]
65
+
66
+ # return_type
67
+ return_type = opts[:debug_return_type] || 'PlatformDdosResponse'
68
+
69
+ # auth_names
70
+ auth_names = opts[:debug_auth_names] || ['token']
71
+
72
+ new_options = opts.merge(
73
+ :operation => :"WholePlatformDdosHistoricalApi.get_platform_ddos_historical",
74
+ :header_params => header_params,
75
+ :query_params => query_params,
76
+ :form_params => form_params,
77
+ :body => post_body,
78
+ :auth_names => auth_names,
79
+ :return_type => return_type
80
+ )
81
+
82
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: WholePlatformDdosHistoricalApi#get_platform_ddos_historical\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+ end
89
+ end
@@ -3440,6 +3440,12 @@ module Fastly
3440
3440
  description: "No description provided",
3441
3441
  }
3442
3442
  ],
3443
+ "WholePlatformDdosHistoricalApi.get_platform_ddos_historical": [
3444
+ {
3445
+ url: "https://api.fastly.com",
3446
+ description: "No description provided",
3447
+ }
3448
+ ],
3443
3449
  }
3444
3450
  end
3445
3451