fastly 8.10.0 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +27 -1
  3. data/Gemfile.lock +1 -1
  4. data/README.md +15 -4
  5. data/docs/AccessKey.md +12 -0
  6. data/docs/AccessKeyResponse.md +15 -0
  7. data/docs/AclsInComputeApi.md +2 -2
  8. data/docs/BillingUsageMetricsApi.md +13 -19
  9. data/docs/ComputeAclUpdate.md +10 -0
  10. data/docs/DimensionAttributesCountryStats.md +12 -0
  11. data/docs/DimensionAttributesRate.md +10 -0
  12. data/docs/DimensionBrowser.md +10 -0
  13. data/docs/DimensionContentType.md +10 -0
  14. data/docs/DimensionCountry.md +10 -0
  15. data/docs/DimensionDevice.md +10 -0
  16. data/docs/DimensionOs.md +10 -0
  17. data/docs/DimensionResponse.md +10 -0
  18. data/docs/DimensionStatusCode.md +10 -0
  19. data/docs/DimensionUrl.md +10 -0
  20. data/docs/EnabledProductsApi.md +5 -5
  21. data/docs/FilterFieldItem.md +12 -0
  22. data/docs/GetLogInsightsResponse.md +11 -0
  23. data/docs/GetLogRecordsResponse.md +11 -0
  24. data/docs/GetLogRecordsResponseMeta.md +10 -0
  25. data/docs/GetLogRecordsResponseMetaFilters.md +16 -0
  26. data/docs/InsightsApi.md +69 -0
  27. data/docs/KvStoreItemApi.md +2 -0
  28. data/docs/LogExplorerApi.md +65 -0
  29. data/docs/LogInsights.md +12 -0
  30. data/docs/LogInsightsDimensionAttributes.md +49 -0
  31. data/docs/LogInsightsDimensions.md +61 -0
  32. data/docs/LogInsightsMeta.md +10 -0
  33. data/docs/LogInsightsMetaFilter.md +14 -0
  34. data/docs/LogInsightsValues.md +65 -0
  35. data/docs/LogPropertyServiceId.md +9 -0
  36. data/docs/LogRecord.md +37 -0
  37. data/docs/LoggingGrafanacloudlogsAdditional.md +14 -0
  38. data/docs/LoggingGrafanacloudlogsApi.md +259 -0
  39. data/docs/LoggingGrafanacloudlogsResponse.md +23 -0
  40. data/docs/ObjectStorageAccessKeysApi.md +163 -0
  41. data/docs/RealtimeEntryAggregated.md +3 -7
  42. data/docs/RealtimeMeasurements.md +3 -7
  43. data/docs/Results.md +3 -7
  44. data/docs/SetConfiguration.md +1 -0
  45. data/docs/Usagemetric.md +18 -0
  46. data/docs/Usagemetrics.md +10 -0
  47. data/docs/ValueField.md +59 -0
  48. data/docs/Values503Responses.md +12 -0
  49. data/docs/ValuesBandwidth.md +11 -0
  50. data/docs/ValuesBrowser.md +11 -0
  51. data/docs/ValuesCacheHitRatio.md +10 -0
  52. data/docs/ValuesCountryStats.md +12 -0
  53. data/docs/ValuesDuration.md +12 -0
  54. data/docs/ValuesMisses.md +10 -0
  55. data/docs/ValuesRate.md +10 -0
  56. data/docs/ValuesRequests.md +10 -0
  57. data/docs/ValuesStatusCodes.md +12 -0
  58. data/lib/fastly/api/acls_in_compute_api.rb +3 -3
  59. data/lib/fastly/api/billing_usage_metrics_api.rb +30 -57
  60. data/lib/fastly/api/enabled_products_api.rb +10 -10
  61. data/lib/fastly/api/insights_api.rb +125 -0
  62. data/lib/fastly/api/kv_store_item_api.rb +3 -0
  63. data/lib/fastly/api/log_explorer_api.rb +109 -0
  64. data/lib/fastly/api/logging_grafanacloudlogs_api.rb +471 -0
  65. data/lib/fastly/api/object_storage_access_keys_api.rb +263 -0
  66. data/lib/fastly/configuration.rb +67 -1
  67. data/lib/fastly/models/access_key.rb +248 -0
  68. data/lib/fastly/models/access_key_response.rb +269 -0
  69. data/lib/fastly/models/compute_acl_list_entries.rb +1 -1
  70. data/lib/fastly/models/compute_acl_lookup.rb +1 -1
  71. data/lib/fastly/models/compute_acl_update.rb +219 -0
  72. data/lib/fastly/models/compute_acl_update_entry.rb +1 -1
  73. data/lib/fastly/models/dimension_attributes_country_stats.rb +237 -0
  74. data/lib/fastly/models/dimension_attributes_rate.rb +217 -0
  75. data/lib/fastly/models/dimension_browser.rb +217 -0
  76. data/lib/fastly/models/dimension_content_type.rb +217 -0
  77. data/lib/fastly/models/dimension_country.rb +217 -0
  78. data/lib/fastly/models/dimension_device.rb +217 -0
  79. data/lib/fastly/models/dimension_os.rb +217 -0
  80. data/lib/fastly/models/dimension_response.rb +217 -0
  81. data/lib/fastly/models/dimension_status_code.rb +217 -0
  82. data/lib/fastly/models/dimension_url.rb +217 -0
  83. data/lib/fastly/models/filter_field_item.rb +271 -0
  84. data/lib/fastly/models/get_log_insights_response.rb +227 -0
  85. data/lib/fastly/models/get_log_records_response.rb +227 -0
  86. data/lib/fastly/models/get_log_records_response_meta.rb +216 -0
  87. data/lib/fastly/models/get_log_records_response_meta_filters.rb +307 -0
  88. data/lib/fastly/models/log_insights.rb +234 -0
  89. data/lib/fastly/models/log_insights_dimension_attributes.rb +103 -0
  90. data/lib/fastly/models/log_insights_dimensions.rb +109 -0
  91. data/lib/fastly/models/log_insights_meta.rb +217 -0
  92. data/lib/fastly/models/log_insights_meta_filter.rb +284 -0
  93. data/lib/fastly/models/log_insights_values.rb +111 -0
  94. data/lib/fastly/models/log_property_service_id.rb +208 -0
  95. data/lib/fastly/models/log_record.rb +486 -0
  96. data/lib/fastly/models/logging_grafanacloudlogs_additional.rb +257 -0
  97. data/lib/fastly/models/logging_grafanacloudlogs_response.rb +408 -0
  98. data/lib/fastly/models/realtime_entry_aggregated.rb +34 -74
  99. data/lib/fastly/models/realtime_measurements.rb +34 -74
  100. data/lib/fastly/models/results.rb +31 -71
  101. data/lib/fastly/models/set_configuration.rb +14 -4
  102. data/lib/fastly/models/usagemetric.rb +297 -0
  103. data/lib/fastly/models/usagemetrics.rb +218 -0
  104. data/lib/fastly/models/value_field.rb +108 -0
  105. data/lib/fastly/models/values503_responses.rb +237 -0
  106. data/lib/fastly/models/values_bandwidth.rb +227 -0
  107. data/lib/fastly/models/values_browser.rb +227 -0
  108. data/lib/fastly/models/values_cache_hit_ratio.rb +217 -0
  109. data/lib/fastly/models/values_country_stats.rb +237 -0
  110. data/lib/fastly/models/values_duration.rb +237 -0
  111. data/lib/fastly/models/values_misses.rb +217 -0
  112. data/lib/fastly/models/values_rate.rb +217 -0
  113. data/lib/fastly/models/values_requests.rb +217 -0
  114. data/lib/fastly/models/values_status_codes.rb +237 -0
  115. data/lib/fastly/version.rb +1 -1
  116. data/lib/fastly.rb +45 -0
  117. data/sig.json +1 -1
  118. metadata +92 -2
@@ -19,12 +19,8 @@ module Fastly
19
19
  end
20
20
  # Retrieve service-level usage metrics for a product.
21
21
  # Returns product usage, broken down by service.
22
- # @option opts [String] :customer_id Alphanumeric string identifying the customer. (required)
23
22
  # @option opts [String] :product_id The product identifier for the metrics returned (e.g., `cdn_usage`). This field is not required for CSV requests. (required)
24
23
  # @option opts [String] :usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). This field is not required for CSV requests. (required)
25
- # @option opts [String] :time_granularity (required)
26
- # @option opts [String] :start_date
27
- # @option opts [String] :end_date
28
24
  # @option opts [String] :start_month
29
25
  # @option opts [String] :end_month
30
26
  # @option opts [String] :limit Number of results per page. The maximum is 100. (default to '5')
@@ -37,12 +33,8 @@ module Fastly
37
33
 
38
34
  # Retrieve service-level usage metrics for a product.
39
35
  # Returns product usage, broken down by service.
40
- # @option opts [String] :customer_id Alphanumeric string identifying the customer. (required)
41
36
  # @option opts [String] :product_id The product identifier for the metrics returned (e.g., `cdn_usage`). This field is not required for CSV requests. (required)
42
37
  # @option opts [String] :usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). This field is not required for CSV requests. (required)
43
- # @option opts [String] :time_granularity (required)
44
- # @option opts [String] :start_date
45
- # @option opts [String] :end_date
46
38
  # @option opts [String] :start_month
47
39
  # @option opts [String] :end_month
48
40
  # @option opts [String] :limit Number of results per page. The maximum is 100. (default to '5')
@@ -53,14 +45,8 @@ module Fastly
53
45
  @api_client.config.logger.debug 'Calling API: BillingUsageMetricsApi.get_service_level_usage ...'
54
46
  end
55
47
  # unbox the parameters from the hash
56
- customer_id = opts[:'customer_id']
57
48
  product_id = opts[:'product_id']
58
49
  usage_type_name = opts[:'usage_type_name']
59
- time_granularity = opts[:'time_granularity']
60
- # verify the required parameter 'customer_id' is set
61
- if @api_client.config.client_side_validation && customer_id.nil?
62
- fail ArgumentError, "Missing the required parameter 'customer_id' when calling BillingUsageMetricsApi.get_service_level_usage"
63
- end
64
50
  # verify the required parameter 'product_id' is set
65
51
  if @api_client.config.client_side_validation && product_id.nil?
66
52
  fail ArgumentError, "Missing the required parameter 'product_id' when calling BillingUsageMetricsApi.get_service_level_usage"
@@ -69,25 +55,6 @@ module Fastly
69
55
  if @api_client.config.client_side_validation && usage_type_name.nil?
70
56
  fail ArgumentError, "Missing the required parameter 'usage_type_name' when calling BillingUsageMetricsApi.get_service_level_usage"
71
57
  end
72
- # verify the required parameter 'time_granularity' is set
73
- if @api_client.config.client_side_validation && time_granularity.nil?
74
- fail ArgumentError, "Missing the required parameter 'time_granularity' when calling BillingUsageMetricsApi.get_service_level_usage"
75
- end
76
- pattern = Regexp.new(/^day$|^month$/)
77
- if @api_client.config.client_side_validation && time_granularity !~ pattern
78
- fail ArgumentError, "invalid value for 'time_granularity' when calling BillingUsageMetricsApi.get_service_level_usage, must conform to the pattern #{pattern}."
79
- end
80
-
81
- pattern = Regexp.new(/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/)
82
- if @api_client.config.client_side_validation && !opts[:'start_date'].nil? && opts[:'start_date'] !~ pattern
83
- fail ArgumentError, "invalid value for 'opts[:\"start_date\"]' when calling BillingUsageMetricsApi.get_service_level_usage, must conform to the pattern #{pattern}."
84
- end
85
-
86
- pattern = Regexp.new(/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/)
87
- if @api_client.config.client_side_validation && !opts[:'end_date'].nil? && opts[:'end_date'] !~ pattern
88
- fail ArgumentError, "invalid value for 'opts[:\"end_date\"]' when calling BillingUsageMetricsApi.get_service_level_usage, must conform to the pattern #{pattern}."
89
- end
90
-
91
58
  pattern = Regexp.new(/^[0-9]{4}-[0-9]{2}$/)
92
59
  if @api_client.config.client_side_validation && !opts[:'start_month'].nil? && opts[:'start_month'] !~ pattern
93
60
  fail ArgumentError, "invalid value for 'opts[:\"start_month\"]' when calling BillingUsageMetricsApi.get_service_level_usage, must conform to the pattern #{pattern}."
@@ -99,15 +66,12 @@ module Fastly
99
66
  end
100
67
 
101
68
  # resource path
102
- local_var_path = '/billing/v2/account_customers/{customer_id}/service-usage-metrics'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s))
69
+ local_var_path = '/billing/v3/service-usage-metrics'
103
70
 
104
71
  # query parameters
105
72
  query_params = opts[:query_params] || {}
106
73
  query_params[:'product_id'] = product_id
107
74
  query_params[:'usage_type_name'] = usage_type_name
108
- query_params[:'time_granularity'] = time_granularity
109
- query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
110
- query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
111
75
  query_params[:'start_month'] = opts[:'start_month'] if !opts[:'start_month'].nil?
112
76
  query_params[:'end_month'] = opts[:'end_month'] if !opts[:'end_month'].nil?
113
77
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
@@ -147,34 +111,43 @@ module Fastly
147
111
  return data, status_code, headers
148
112
  end
149
113
 
150
- # Retrieve product usage types for a customer.
151
- # Returns product usage types reported by the customer's services.
152
- # @option opts [String] :customer_id Alphanumeric string identifying the customer. (required)
153
- # @return [Serviceusagetypes]
154
- def get_service_level_usage_types(opts = {})
155
- data, _status_code, _headers = get_service_level_usage_types_with_http_info(opts)
114
+ # Get monthly usage metrics
115
+ # Returns monthly usage metrics for customer by product.
116
+ # @option opts [String] :start_month
117
+ # @option opts [String] :end_month
118
+ # @return [Usagemetric]
119
+ def get_usage_metrics(opts = {})
120
+ data, _status_code, _headers = get_usage_metrics_with_http_info(opts)
156
121
  data
157
122
  end
158
123
 
159
- # Retrieve product usage types for a customer.
160
- # Returns product usage types reported by the customer's services.
161
- # @option opts [String] :customer_id Alphanumeric string identifying the customer. (required)
162
- # @return [Array<(Serviceusagetypes, Integer, Hash)>] Serviceusagetypes data, response status code and response headers
163
- def get_service_level_usage_types_with_http_info(opts = {})
124
+ # Get monthly usage metrics
125
+ # Returns monthly usage metrics for customer by product.
126
+ # @option opts [String] :start_month
127
+ # @option opts [String] :end_month
128
+ # @return [Array<(Usagemetric, Integer, Hash)>] Usagemetric data, response status code and response headers
129
+ def get_usage_metrics_with_http_info(opts = {})
164
130
  if @api_client.config.debugging
165
- @api_client.config.logger.debug 'Calling API: BillingUsageMetricsApi.get_service_level_usage_types ...'
131
+ @api_client.config.logger.debug 'Calling API: BillingUsageMetricsApi.get_usage_metrics ...'
166
132
  end
167
133
  # unbox the parameters from the hash
168
- customer_id = opts[:'customer_id']
169
- # verify the required parameter 'customer_id' is set
170
- if @api_client.config.client_side_validation && customer_id.nil?
171
- fail ArgumentError, "Missing the required parameter 'customer_id' when calling BillingUsageMetricsApi.get_service_level_usage_types"
134
+ pattern = Regexp.new(/^[0-9]{4}-[0-9]{2}$/)
135
+ if @api_client.config.client_side_validation && !opts[:'start_month'].nil? && opts[:'start_month'] !~ pattern
136
+ fail ArgumentError, "invalid value for 'opts[:\"start_month\"]' when calling BillingUsageMetricsApi.get_usage_metrics, must conform to the pattern #{pattern}."
137
+ end
138
+
139
+ pattern = Regexp.new(/^[0-9]{4}-[0-9]{2}$/)
140
+ if @api_client.config.client_side_validation && !opts[:'end_month'].nil? && opts[:'end_month'] !~ pattern
141
+ fail ArgumentError, "invalid value for 'opts[:\"end_month\"]' when calling BillingUsageMetricsApi.get_usage_metrics, must conform to the pattern #{pattern}."
172
142
  end
143
+
173
144
  # resource path
174
- local_var_path = '/billing/v2/account_customers/{customer_id}/service-usage-types'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s))
145
+ local_var_path = '/billing/v3/usage-metrics'
175
146
 
176
147
  # query parameters
177
148
  query_params = opts[:query_params] || {}
149
+ query_params[:'start_month'] = opts[:'start_month'] if !opts[:'start_month'].nil?
150
+ query_params[:'end_month'] = opts[:'end_month'] if !opts[:'end_month'].nil?
178
151
 
179
152
  # header parameters
180
153
  header_params = opts[:header_params] || {}
@@ -188,13 +161,13 @@ module Fastly
188
161
  post_body = opts[:debug_body]
189
162
 
190
163
  # return_type
191
- return_type = opts[:debug_return_type] || 'Serviceusagetypes'
164
+ return_type = opts[:debug_return_type] || 'Usagemetric'
192
165
 
193
166
  # auth_names
194
167
  auth_names = opts[:debug_auth_names] || ['token']
195
168
 
196
169
  new_options = opts.merge(
197
- :operation => :"BillingUsageMetricsApi.get_service_level_usage_types",
170
+ :operation => :"BillingUsageMetricsApi.get_usage_metrics",
198
171
  :header_params => header_params,
199
172
  :query_params => query_params,
200
173
  :form_params => form_params,
@@ -205,7 +178,7 @@ module Fastly
205
178
 
206
179
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
207
180
  if @api_client.config.debugging
208
- @api_client.config.logger.debug "API called: BillingUsageMetricsApi#get_service_level_usage_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
181
+ @api_client.config.logger.debug "API called: BillingUsageMetricsApi#get_usage_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
209
182
  end
210
183
  return data, status_code, headers
211
184
  end
@@ -18,7 +18,7 @@ module Fastly
18
18
  @api_client = api_client
19
19
  end
20
20
  # Disable a product
21
- # Disable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`.
21
+ # Disable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, `ngwaf`, `ddos_protection`, and `log_explorer_insights`.
22
22
  # @option opts [String] :product_id (required)
23
23
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
24
24
  # @return [nil]
@@ -28,7 +28,7 @@ module Fastly
28
28
  end
29
29
 
30
30
  # Disable a product
31
- # Disable a product on a service. Supported product IDs: &#x60;brotli_compression&#x60;,&#x60;domain_inspector&#x60;,&#x60;fanout&#x60;,&#x60;image_optimizer&#x60;,&#x60;origin_inspector&#x60;, &#x60;websockets&#x60;, &#x60;bot_management&#x60;, and &#x60;ngwaf&#x60;.
31
+ # Disable a product on a service. Supported product IDs: &#x60;brotli_compression&#x60;,&#x60;domain_inspector&#x60;,&#x60;fanout&#x60;,&#x60;image_optimizer&#x60;,&#x60;origin_inspector&#x60;, &#x60;websockets&#x60;, &#x60;bot_management&#x60;, &#x60;ngwaf&#x60;, &#x60;ddos_protection&#x60;, and &#x60;log_explorer_insights&#x60;.
32
32
  # @option opts [String] :product_id (required)
33
33
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
34
34
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -86,7 +86,7 @@ module Fastly
86
86
  end
87
87
 
88
88
  # Enable a product
89
- # Enable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`.
89
+ # Enable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, `ngwaf`, `ddos_protection`, and `log_explorer_insights`.
90
90
  # @option opts [String] :product_id (required)
91
91
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
92
92
  # @option opts [SetWorkspaceId] :set_workspace_id
@@ -97,7 +97,7 @@ module Fastly
97
97
  end
98
98
 
99
99
  # Enable a product
100
- # Enable a product on a service. Supported product IDs: &#x60;brotli_compression&#x60;,&#x60;domain_inspector&#x60;,&#x60;fanout&#x60;,&#x60;image_optimizer&#x60;,&#x60;origin_inspector&#x60;, &#x60;websockets&#x60;, &#x60;bot_management&#x60;, and &#x60;ngwaf&#x60;.
100
+ # Enable a product on a service. Supported product IDs: &#x60;brotli_compression&#x60;,&#x60;domain_inspector&#x60;,&#x60;fanout&#x60;,&#x60;image_optimizer&#x60;,&#x60;origin_inspector&#x60;, &#x60;websockets&#x60;, &#x60;bot_management&#x60;, &#x60;ngwaf&#x60;, &#x60;ddos_protection&#x60;, and &#x60;log_explorer_insights&#x60;.
101
101
  # @option opts [String] :product_id (required)
102
102
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
103
103
  # @option opts [SetWorkspaceId] :set_workspace_id
@@ -163,7 +163,7 @@ module Fastly
163
163
  end
164
164
 
165
165
  # Get enabled product
166
- # Get enabled product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`.
166
+ # Get enabled product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, `ngwaf`, `ddos_protection`, and `log_explorer_insights`.
167
167
  # @option opts [String] :product_id (required)
168
168
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
169
169
  # @return [EnabledProductResponse]
@@ -173,7 +173,7 @@ module Fastly
173
173
  end
174
174
 
175
175
  # Get enabled product
176
- # Get enabled product on a service. Supported product IDs: &#x60;brotli_compression&#x60;,&#x60;domain_inspector&#x60;,&#x60;fanout&#x60;,&#x60;image_optimizer&#x60;,&#x60;origin_inspector&#x60;, &#x60;websockets&#x60;, &#x60;bot_management&#x60;, and &#x60;ngwaf&#x60;.
176
+ # Get enabled product on a service. Supported product IDs: &#x60;brotli_compression&#x60;,&#x60;domain_inspector&#x60;,&#x60;fanout&#x60;,&#x60;image_optimizer&#x60;,&#x60;origin_inspector&#x60;, &#x60;websockets&#x60;, &#x60;bot_management&#x60;, &#x60;ngwaf&#x60;, &#x60;ddos_protection&#x60;, and &#x60;log_explorer_insights&#x60;.
177
177
  # @option opts [String] :product_id (required)
178
178
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
179
179
  # @return [Array<(EnabledProductResponse, Integer, Hash)>] EnabledProductResponse data, response status code and response headers
@@ -233,7 +233,7 @@ module Fastly
233
233
  end
234
234
 
235
235
  # Get configuration for a product
236
- # Get configuration for an enabled product on a service. Supported product IDs: `ngwaf`.
236
+ # Get configuration for an enabled product on a service. Supported product IDs: `ngwaf` and `ddos_protection`.
237
237
  # @option opts [String] :product_id (required)
238
238
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
239
239
  # @return [ConfiguredProductResponse]
@@ -243,7 +243,7 @@ module Fastly
243
243
  end
244
244
 
245
245
  # Get configuration for a product
246
- # Get configuration for an enabled product on a service. Supported product IDs: &#x60;ngwaf&#x60;.
246
+ # Get configuration for an enabled product on a service. Supported product IDs: &#x60;ngwaf&#x60; and &#x60;ddos_protection&#x60;.
247
247
  # @option opts [String] :product_id (required)
248
248
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
249
249
  # @return [Array<(ConfiguredProductResponse, Integer, Hash)>] ConfiguredProductResponse data, response status code and response headers
@@ -303,7 +303,7 @@ module Fastly
303
303
  end
304
304
 
305
305
  # Update configuration for a product
306
- # Update configuration for an enabled product on a service. Supported product IDs: `ngwaf`.
306
+ # Update configuration for an enabled product on a service. Supported product IDs: `ngwaf` and `ddos_protection`.
307
307
  # @option opts [String] :product_id (required)
308
308
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
309
309
  # @option opts [SetConfiguration] :set_configuration
@@ -314,7 +314,7 @@ module Fastly
314
314
  end
315
315
 
316
316
  # Update configuration for a product
317
- # Update configuration for an enabled product on a service. Supported product IDs: &#x60;ngwaf&#x60;.
317
+ # Update configuration for an enabled product on a service. Supported product IDs: &#x60;ngwaf&#x60; and &#x60;ddos_protection&#x60;.
318
318
  # @option opts [String] :product_id (required)
319
319
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
320
320
  # @option opts [SetConfiguration] :set_configuration
@@ -0,0 +1,125 @@
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://www.fastly.com/documentation/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 InsightsApi
15
+ attr_accessor :api_client
16
+
17
+ def initialize(api_client = ApiClient.default)
18
+ @api_client = api_client
19
+ end
20
+ # Retrieve log insights
21
+ # Retrieves statistics from sampled log records.
22
+ # @option opts [String] :visualization (required)
23
+ # @option opts [String] :service_id (required)
24
+ # @option opts [String] :start (required)
25
+ # @option opts [String] :_end (required)
26
+ # @option opts [String] :pops
27
+ # @option opts [String] :domain
28
+ # @option opts [Boolean] :domain_exact_match
29
+ # @option opts [Float] :limit
30
+ # @return [GetLogInsightsResponse]
31
+ def get_log_insights(opts = {})
32
+ data, _status_code, _headers = get_log_insights_with_http_info(opts)
33
+ data
34
+ end
35
+
36
+ # Retrieve log insights
37
+ # Retrieves statistics from sampled log records.
38
+ # @option opts [String] :visualization (required)
39
+ # @option opts [String] :service_id (required)
40
+ # @option opts [String] :start (required)
41
+ # @option opts [String] :_end (required)
42
+ # @option opts [String] :pops
43
+ # @option opts [String] :domain
44
+ # @option opts [Boolean] :domain_exact_match
45
+ # @option opts [Float] :limit
46
+ # @return [Array<(GetLogInsightsResponse, Integer, Hash)>] GetLogInsightsResponse data, response status code and response headers
47
+ def get_log_insights_with_http_info(opts = {})
48
+ if @api_client.config.debugging
49
+ @api_client.config.logger.debug 'Calling API: InsightsApi.get_log_insights ...'
50
+ end
51
+ # unbox the parameters from the hash
52
+ visualization = opts[:'visualization']
53
+ service_id = opts[:'service_id']
54
+ start = opts[:'start']
55
+ _end = opts[:'_end']
56
+ # verify the required parameter 'visualization' is set
57
+ if @api_client.config.client_side_validation && visualization.nil?
58
+ fail ArgumentError, "Missing the required parameter 'visualization' when calling InsightsApi.get_log_insights"
59
+ end
60
+ # verify enum value
61
+ allowable_values = ["top-url-by-bandwidth", "bottom-url-by-cache-hit-ratio", "top-url-by-cache-hit-ratio", "country-statistics", "top-url-by-duration-sum", "top-4xx-urls", "top-5xx-urls", "top-url-by-misses", "top-url-by-requests", "top-browser-by-requests", "top-content-type-by-requests", "top-device-by-requests", "top-os-by-requests", "response-status-codes", "top-503-responses"]
62
+ if @api_client.config.client_side_validation && !allowable_values.include?(visualization)
63
+ fail ArgumentError, "invalid value for \"visualization\", must be one of #{allowable_values}"
64
+ end
65
+ # verify the required parameter 'service_id' is set
66
+ if @api_client.config.client_side_validation && service_id.nil?
67
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling InsightsApi.get_log_insights"
68
+ end
69
+ # verify the required parameter 'start' is set
70
+ if @api_client.config.client_side_validation && start.nil?
71
+ fail ArgumentError, "Missing the required parameter 'start' when calling InsightsApi.get_log_insights"
72
+ end
73
+ # verify the required parameter '_end' is set
74
+ if @api_client.config.client_side_validation && _end.nil?
75
+ fail ArgumentError, "Missing the required parameter '_end' when calling InsightsApi.get_log_insights"
76
+ end
77
+ # resource path
78
+ local_var_path = '/observability/log-insights'
79
+
80
+ # query parameters
81
+ query_params = opts[:query_params] || {}
82
+ query_params[:'visualization'] = visualization
83
+ query_params[:'service_id'] = service_id
84
+ query_params[:'start'] = start
85
+ query_params[:'end'] = _end
86
+ query_params[:'pops'] = opts[:'pops'] if !opts[:'pops'].nil?
87
+ query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
88
+ query_params[:'domain_exact_match'] = opts[:'domain_exact_match'] if !opts[:'domain_exact_match'].nil?
89
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
90
+
91
+ # header parameters
92
+ header_params = opts[:header_params] || {}
93
+ # HTTP header 'Accept' (if needed)
94
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
95
+
96
+ # form parameters
97
+ form_params = opts[:form_params] || {}
98
+
99
+ # http body (model)
100
+ post_body = opts[:debug_body]
101
+
102
+ # return_type
103
+ return_type = opts[:debug_return_type] || 'GetLogInsightsResponse'
104
+
105
+ # auth_names
106
+ auth_names = opts[:debug_auth_names] || ['token']
107
+
108
+ new_options = opts.merge(
109
+ :operation => :"InsightsApi.get_log_insights",
110
+ :header_params => header_params,
111
+ :query_params => query_params,
112
+ :form_params => form_params,
113
+ :body => post_body,
114
+ :auth_names => auth_names,
115
+ :return_type => return_type
116
+ )
117
+
118
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
119
+ if @api_client.config.debugging
120
+ @api_client.config.logger.debug "API called: InsightsApi#get_log_insights\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
121
+ end
122
+ return data, status_code, headers
123
+ end
124
+ end
125
+ end
@@ -91,6 +91,7 @@ module Fastly
91
91
  # @option opts [String] :cursor
92
92
  # @option opts [Integer] :limit (default to 100)
93
93
  # @option opts [String] :prefix
94
+ # @option opts [String] :consistency
94
95
  # @return [InlineResponse2004]
95
96
  def get_keys(opts = {})
96
97
  data, _status_code, _headers = get_keys_with_http_info(opts)
@@ -103,6 +104,7 @@ module Fastly
103
104
  # @option opts [String] :cursor
104
105
  # @option opts [Integer] :limit (default to 100)
105
106
  # @option opts [String] :prefix
107
+ # @option opts [String] :consistency
106
108
  # @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
107
109
  def get_keys_with_http_info(opts = {})
108
110
  if @api_client.config.debugging
@@ -122,6 +124,7 @@ module Fastly
122
124
  query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
123
125
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
124
126
  query_params[:'prefix'] = opts[:'prefix'] if !opts[:'prefix'].nil?
127
+ query_params[:'consistency'] = opts[:'consistency'] if !opts[:'consistency'].nil?
125
128
 
126
129
  # header parameters
127
130
  header_params = opts[:header_params] || {}
@@ -0,0 +1,109 @@
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://www.fastly.com/documentation/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 LogExplorerApi
15
+ attr_accessor :api_client
16
+
17
+ def initialize(api_client = ApiClient.default)
18
+ @api_client = api_client
19
+ end
20
+ # Retrieve log records
21
+ # Retrieves log records.
22
+ # @option opts [String] :service_id (required)
23
+ # @option opts [String] :start (required)
24
+ # @option opts [String] :_end (required)
25
+ # @option opts [Float] :limit
26
+ # @option opts [String] :next_cursor
27
+ # @option opts [String] :filter
28
+ # @return [GetLogRecordsResponse]
29
+ def get_log_records(opts = {})
30
+ data, _status_code, _headers = get_log_records_with_http_info(opts)
31
+ data
32
+ end
33
+
34
+ # Retrieve log records
35
+ # Retrieves log records.
36
+ # @option opts [String] :service_id (required)
37
+ # @option opts [String] :start (required)
38
+ # @option opts [String] :_end (required)
39
+ # @option opts [Float] :limit
40
+ # @option opts [String] :next_cursor
41
+ # @option opts [String] :filter
42
+ # @return [Array<(GetLogRecordsResponse, Integer, Hash)>] GetLogRecordsResponse data, response status code and response headers
43
+ def get_log_records_with_http_info(opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: LogExplorerApi.get_log_records ...'
46
+ end
47
+ # unbox the parameters from the hash
48
+ service_id = opts[:'service_id']
49
+ start = opts[:'start']
50
+ _end = opts[:'_end']
51
+ # verify the required parameter 'service_id' is set
52
+ if @api_client.config.client_side_validation && service_id.nil?
53
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling LogExplorerApi.get_log_records"
54
+ end
55
+ # verify the required parameter 'start' is set
56
+ if @api_client.config.client_side_validation && start.nil?
57
+ fail ArgumentError, "Missing the required parameter 'start' when calling LogExplorerApi.get_log_records"
58
+ end
59
+ # verify the required parameter '_end' is set
60
+ if @api_client.config.client_side_validation && _end.nil?
61
+ fail ArgumentError, "Missing the required parameter '_end' when calling LogExplorerApi.get_log_records"
62
+ end
63
+ # resource path
64
+ local_var_path = '/observability/log-explorer'
65
+
66
+ # query parameters
67
+ query_params = opts[:query_params] || {}
68
+ query_params[:'service_id'] = service_id
69
+ query_params[:'start'] = start
70
+ query_params[:'end'] = _end
71
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
72
+ query_params[:'next_cursor'] = opts[:'next_cursor'] if !opts[:'next_cursor'].nil?
73
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
74
+
75
+ # header parameters
76
+ header_params = opts[:header_params] || {}
77
+ # HTTP header 'Accept' (if needed)
78
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
79
+
80
+ # form parameters
81
+ form_params = opts[:form_params] || {}
82
+
83
+ # http body (model)
84
+ post_body = opts[:debug_body]
85
+
86
+ # return_type
87
+ return_type = opts[:debug_return_type] || 'GetLogRecordsResponse'
88
+
89
+ # auth_names
90
+ auth_names = opts[:debug_auth_names] || ['token']
91
+
92
+ new_options = opts.merge(
93
+ :operation => :"LogExplorerApi.get_log_records",
94
+ :header_params => header_params,
95
+ :query_params => query_params,
96
+ :form_params => form_params,
97
+ :body => post_body,
98
+ :auth_names => auth_names,
99
+ :return_type => return_type
100
+ )
101
+
102
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
103
+ if @api_client.config.debugging
104
+ @api_client.config.logger.debug "API called: LogExplorerApi#get_log_records\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
105
+ end
106
+ return data, status_code, headers
107
+ end
108
+ end
109
+ end