fastly 8.9.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -0
- data/Gemfile.lock +1 -1
- data/README.md +15 -4
- data/docs/AccessKey.md +12 -0
- data/docs/AccessKeyResponse.md +15 -0
- data/docs/AclsInComputeApi.md +2 -2
- data/docs/Backend.md +2 -2
- data/docs/BackendApi.md +8 -8
- data/docs/BackendResponse.md +2 -2
- data/docs/BillingUsageMetricsApi.md +13 -19
- data/docs/ComputeAclUpdate.md +10 -0
- data/docs/DimensionAttributesCountryStats.md +12 -0
- data/docs/DimensionAttributesRate.md +10 -0
- data/docs/DimensionBrowser.md +10 -0
- data/docs/DimensionContentType.md +10 -0
- data/docs/DimensionCountry.md +10 -0
- data/docs/DimensionDevice.md +10 -0
- data/docs/DimensionOs.md +10 -0
- data/docs/DimensionResponse.md +10 -0
- data/docs/DimensionStatusCode.md +10 -0
- data/docs/DimensionUrl.md +10 -0
- data/docs/EnabledProductsApi.md +5 -5
- data/docs/FilterFieldItem.md +12 -0
- data/docs/GetLogInsightsResponse.md +11 -0
- data/docs/GetLogRecordsResponse.md +11 -0
- data/docs/GetLogRecordsResponseMeta.md +10 -0
- data/docs/GetLogRecordsResponseMetaFilters.md +16 -0
- data/docs/InsightsApi.md +69 -0
- data/docs/KvStoreItemApi.md +2 -0
- data/docs/LogExplorerApi.md +65 -0
- data/docs/LogInsights.md +12 -0
- data/docs/LogInsightsDimensionAttributes.md +49 -0
- data/docs/LogInsightsDimensions.md +61 -0
- data/docs/LogInsightsMeta.md +10 -0
- data/docs/LogInsightsMetaFilter.md +14 -0
- data/docs/LogInsightsValues.md +65 -0
- data/docs/LogPropertyServiceId.md +9 -0
- data/docs/LogRecord.md +37 -0
- data/docs/LoggingGrafanacloudlogsAdditional.md +14 -0
- data/docs/LoggingGrafanacloudlogsApi.md +259 -0
- data/docs/LoggingGrafanacloudlogsResponse.md +23 -0
- data/docs/ObjectStorageAccessKeysApi.md +163 -0
- data/docs/RealtimeEntryAggregated.md +3 -7
- data/docs/RealtimeMeasurements.md +3 -7
- data/docs/Results.md +3 -7
- data/docs/SetConfiguration.md +1 -0
- data/docs/Usagemetric.md +18 -0
- data/docs/Usagemetrics.md +10 -0
- data/docs/ValueField.md +59 -0
- data/docs/Values503Responses.md +12 -0
- data/docs/ValuesBandwidth.md +11 -0
- data/docs/ValuesBrowser.md +11 -0
- data/docs/ValuesCacheHitRatio.md +10 -0
- data/docs/ValuesCountryStats.md +12 -0
- data/docs/ValuesDuration.md +12 -0
- data/docs/ValuesMisses.md +10 -0
- data/docs/ValuesRate.md +10 -0
- data/docs/ValuesRequests.md +10 -0
- data/docs/ValuesStatusCodes.md +12 -0
- data/lib/fastly/api/acls_in_compute_api.rb +3 -3
- data/lib/fastly/api/backend_api.rb +8 -8
- data/lib/fastly/api/billing_usage_metrics_api.rb +30 -57
- data/lib/fastly/api/enabled_products_api.rb +10 -10
- data/lib/fastly/api/insights_api.rb +125 -0
- data/lib/fastly/api/kv_store_item_api.rb +3 -0
- data/lib/fastly/api/log_explorer_api.rb +109 -0
- data/lib/fastly/api/logging_grafanacloudlogs_api.rb +471 -0
- data/lib/fastly/api/object_storage_access_keys_api.rb +263 -0
- data/lib/fastly/configuration.rb +67 -1
- data/lib/fastly/models/access_key.rb +248 -0
- data/lib/fastly/models/access_key_response.rb +269 -0
- data/lib/fastly/models/backend.rb +2 -2
- data/lib/fastly/models/backend_response.rb +2 -2
- data/lib/fastly/models/compute_acl_list_entries.rb +1 -1
- data/lib/fastly/models/compute_acl_lookup.rb +1 -1
- data/lib/fastly/models/compute_acl_update.rb +219 -0
- data/lib/fastly/models/compute_acl_update_entry.rb +1 -1
- data/lib/fastly/models/dimension_attributes_country_stats.rb +237 -0
- data/lib/fastly/models/dimension_attributes_rate.rb +217 -0
- data/lib/fastly/models/dimension_browser.rb +217 -0
- data/lib/fastly/models/dimension_content_type.rb +217 -0
- data/lib/fastly/models/dimension_country.rb +217 -0
- data/lib/fastly/models/dimension_device.rb +217 -0
- data/lib/fastly/models/dimension_os.rb +217 -0
- data/lib/fastly/models/dimension_response.rb +217 -0
- data/lib/fastly/models/dimension_status_code.rb +217 -0
- data/lib/fastly/models/dimension_url.rb +217 -0
- data/lib/fastly/models/filter_field_item.rb +271 -0
- data/lib/fastly/models/get_log_insights_response.rb +227 -0
- data/lib/fastly/models/get_log_records_response.rb +227 -0
- data/lib/fastly/models/get_log_records_response_meta.rb +216 -0
- data/lib/fastly/models/get_log_records_response_meta_filters.rb +307 -0
- data/lib/fastly/models/log_insights.rb +234 -0
- data/lib/fastly/models/log_insights_dimension_attributes.rb +103 -0
- data/lib/fastly/models/log_insights_dimensions.rb +109 -0
- data/lib/fastly/models/log_insights_meta.rb +217 -0
- data/lib/fastly/models/log_insights_meta_filter.rb +284 -0
- data/lib/fastly/models/log_insights_values.rb +111 -0
- data/lib/fastly/models/log_property_service_id.rb +208 -0
- data/lib/fastly/models/log_record.rb +486 -0
- data/lib/fastly/models/logging_grafanacloudlogs_additional.rb +257 -0
- data/lib/fastly/models/logging_grafanacloudlogs_response.rb +408 -0
- data/lib/fastly/models/realtime_entry_aggregated.rb +34 -74
- data/lib/fastly/models/realtime_measurements.rb +34 -74
- data/lib/fastly/models/results.rb +31 -71
- data/lib/fastly/models/set_configuration.rb +14 -4
- data/lib/fastly/models/usagemetric.rb +297 -0
- data/lib/fastly/models/usagemetrics.rb +218 -0
- data/lib/fastly/models/value_field.rb +108 -0
- data/lib/fastly/models/values503_responses.rb +237 -0
- data/lib/fastly/models/values_bandwidth.rb +227 -0
- data/lib/fastly/models/values_browser.rb +227 -0
- data/lib/fastly/models/values_cache_hit_ratio.rb +217 -0
- data/lib/fastly/models/values_country_stats.rb +237 -0
- data/lib/fastly/models/values_duration.rb +237 -0
- data/lib/fastly/models/values_misses.rb +217 -0
- data/lib/fastly/models/values_rate.rb +217 -0
- data/lib/fastly/models/values_requests.rb +217 -0
- data/lib/fastly/models/values_status_codes.rb +237 -0
- data/lib/fastly/version.rb +1 -1
- data/lib/fastly.rb +45 -0
- data/sig.json +1 -1
- metadata +92 -2
@@ -0,0 +1,10 @@
|
|
1
|
+
# Fastly::ValuesCacheHitRatio
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **cache_hit_ratio** | **Float** | The cache hit ratio for the URL specified in the dimension. | [optional] |
|
8
|
+
|
9
|
+
[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
10
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# Fastly::ValuesCountryStats
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **region** | **String** | The client's country subdivision code as defined by ISO 3166-2. | [optional] |
|
8
|
+
| **region_chr** | **Float** | The cache hit ratio for the region. | [optional] |
|
9
|
+
| **region_error_rate** | **Float** | The error rate for the region. | [optional] |
|
10
|
+
|
11
|
+
[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
12
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# Fastly::ValuesDuration
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **average_response_time** | **Float** | The average time in seconds to respond to requests to the URL in the current dimension. | [optional] |
|
8
|
+
| **p95_response_time** | **Float** | The P95 time in seconds to respond to requests to the URL in the current dimension. | [optional] |
|
9
|
+
| **response_time_percentage** | **Float** | The total percentage of time to respond to all requests to the URL in the current dimension. | [optional] |
|
10
|
+
|
11
|
+
[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
12
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Fastly::ValuesMisses
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **miss_rate** | **Float** | The miss rate for requests to the URL in the current dimension. | [optional] |
|
8
|
+
|
9
|
+
[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
10
|
+
|
data/docs/ValuesRate.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# Fastly::ValuesRate
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **rate** | **Float** | The percentage of requests matching the value in the current dimension. | [optional] |
|
8
|
+
|
9
|
+
[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
10
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Fastly::ValuesRequests
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **request_percentage** | **Float** | The percentage of all requests made to the URL in the current dimension. | [optional] |
|
8
|
+
|
9
|
+
[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
10
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# Fastly::ValuesStatusCodes
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **url** | **String** | The HTTP request path. | [optional] |
|
8
|
+
| **rate_per_status** | **Float** | The URL accounts for this percentage of the status code in this dimension. | [optional] |
|
9
|
+
| **rate_per_url** | **Float** | The rate at which the status code in this dimension occurs for this URL. | [optional] |
|
10
|
+
|
11
|
+
[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
12
|
+
|
@@ -402,7 +402,7 @@ module Fastly
|
|
402
402
|
# Update an ACL
|
403
403
|
# Update an ACL.
|
404
404
|
# @option opts [String] :acl_id (required)
|
405
|
-
# @option opts [
|
405
|
+
# @option opts [ComputeAclUpdate] :compute_acl_update
|
406
406
|
# @return [nil]
|
407
407
|
def compute_acl_update_acls(opts = {})
|
408
408
|
compute_acl_update_acls_with_http_info(opts)
|
@@ -412,7 +412,7 @@ module Fastly
|
|
412
412
|
# Update an ACL
|
413
413
|
# Update an ACL.
|
414
414
|
# @option opts [String] :acl_id (required)
|
415
|
-
# @option opts [
|
415
|
+
# @option opts [ComputeAclUpdate] :compute_acl_update
|
416
416
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
417
417
|
def compute_acl_update_acls_with_http_info(opts = {})
|
418
418
|
if @api_client.config.debugging
|
@@ -442,7 +442,7 @@ module Fastly
|
|
442
442
|
form_params = opts[:form_params] || {}
|
443
443
|
|
444
444
|
# http body (model)
|
445
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'
|
445
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'compute_acl_update'])
|
446
446
|
|
447
447
|
# return_type
|
448
448
|
return_type = opts[:debug_return_type]
|
@@ -26,8 +26,8 @@ module Fastly
|
|
26
26
|
# @option opts [Integer] :between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`.
|
27
27
|
# @option opts [String] :client_cert Unused.
|
28
28
|
# @option opts [String] :comment A freeform descriptive note.
|
29
|
-
# @option opts [Integer] :connect_timeout Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a
|
30
|
-
# @option opts [Integer] :first_byte_timeout Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent. If exceeded, the connection is aborted and a
|
29
|
+
# @option opts [Integer] :connect_timeout Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`.
|
30
|
+
# @option opts [Integer] :first_byte_timeout Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.first_byte_timeout`.
|
31
31
|
# @option opts [String] :healthcheck The name of the healthcheck to use with this backend.
|
32
32
|
# @option opts [String] :hostname The hostname of the backend. May be used as an alternative to `address` to set the backend location.
|
33
33
|
# @option opts [String] :ipv4 IPv4 address of the backend. May be used as an alternative to `address` to set the backend location.
|
@@ -71,8 +71,8 @@ module Fastly
|
|
71
71
|
# @option opts [Integer] :between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`.
|
72
72
|
# @option opts [String] :client_cert Unused.
|
73
73
|
# @option opts [String] :comment A freeform descriptive note.
|
74
|
-
# @option opts [Integer] :connect_timeout Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a
|
75
|
-
# @option opts [Integer] :first_byte_timeout Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent. If exceeded, the connection is aborted and a
|
74
|
+
# @option opts [Integer] :connect_timeout Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`.
|
75
|
+
# @option opts [Integer] :first_byte_timeout Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.first_byte_timeout`.
|
76
76
|
# @option opts [String] :healthcheck The name of the healthcheck to use with this backend.
|
77
77
|
# @option opts [String] :hostname The hostname of the backend. May be used as an alternative to `address` to set the backend location.
|
78
78
|
# @option opts [String] :ipv4 IPv4 address of the backend. May be used as an alternative to `address` to set the backend location.
|
@@ -436,8 +436,8 @@ module Fastly
|
|
436
436
|
# @option opts [Integer] :between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`.
|
437
437
|
# @option opts [String] :client_cert Unused.
|
438
438
|
# @option opts [String] :comment A freeform descriptive note.
|
439
|
-
# @option opts [Integer] :connect_timeout Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a
|
440
|
-
# @option opts [Integer] :first_byte_timeout Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent. If exceeded, the connection is aborted and a
|
439
|
+
# @option opts [Integer] :connect_timeout Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`.
|
440
|
+
# @option opts [Integer] :first_byte_timeout Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.first_byte_timeout`.
|
441
441
|
# @option opts [String] :healthcheck The name of the healthcheck to use with this backend.
|
442
442
|
# @option opts [String] :hostname The hostname of the backend. May be used as an alternative to `address` to set the backend location.
|
443
443
|
# @option opts [String] :ipv4 IPv4 address of the backend. May be used as an alternative to `address` to set the backend location.
|
@@ -482,8 +482,8 @@ module Fastly
|
|
482
482
|
# @option opts [Integer] :between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`.
|
483
483
|
# @option opts [String] :client_cert Unused.
|
484
484
|
# @option opts [String] :comment A freeform descriptive note.
|
485
|
-
# @option opts [Integer] :connect_timeout Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a
|
486
|
-
# @option opts [Integer] :first_byte_timeout Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent. If exceeded, the connection is aborted and a
|
485
|
+
# @option opts [Integer] :connect_timeout Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`.
|
486
|
+
# @option opts [Integer] :first_byte_timeout Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.first_byte_timeout`.
|
487
487
|
# @option opts [String] :healthcheck The name of the healthcheck to use with this backend.
|
488
488
|
# @option opts [String] :hostname The hostname of the backend. May be used as an alternative to `address` to set the backend location.
|
489
489
|
# @option opts [String] :ipv4 IPv4 address of the backend. May be used as an alternative to `address` to set the backend location.
|
@@ -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/
|
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
|
-
#
|
151
|
-
# Returns
|
152
|
-
# @option opts [String] :
|
153
|
-
# @
|
154
|
-
|
155
|
-
|
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
|
-
#
|
160
|
-
# Returns
|
161
|
-
# @option opts [String] :
|
162
|
-
# @
|
163
|
-
|
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.
|
131
|
+
@api_client.config.logger.debug 'Calling API: BillingUsageMetricsApi.get_usage_metrics ...'
|
166
132
|
end
|
167
133
|
# unbox the parameters from the hash
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
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/
|
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] || '
|
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.
|
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#
|
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 `
|
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: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `
|
31
|
+
# 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`.
|
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 `
|
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: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `
|
100
|
+
# 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`.
|
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 `
|
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: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `
|
176
|
+
# 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`.
|
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: `ngwaf`.
|
246
|
+
# Get configuration for an enabled product on a service. Supported product IDs: `ngwaf` and `ddos_protection`.
|
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: `ngwaf`.
|
317
|
+
# Update configuration for an enabled product on a service. Supported product IDs: `ngwaf` and `ddos_protection`.
|
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] || {}
|