fastly 8.10.0 → 9.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -1
- 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/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/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/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,471 @@
|
|
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 LoggingGrafanacloudlogsApi
|
15
|
+
attr_accessor :api_client
|
16
|
+
|
17
|
+
def initialize(api_client = ApiClient.default)
|
18
|
+
@api_client = api_client
|
19
|
+
end
|
20
|
+
# Create a Grafana Cloud Logs log endpoint
|
21
|
+
# Create a Grafana Cloud Logs logging object for a particular service and version.
|
22
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
23
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
24
|
+
# @option opts [String] :name The name for the real-time logging configuration.
|
25
|
+
# @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
|
26
|
+
# @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
|
27
|
+
# @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).
|
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 `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
29
|
+
# @option opts [String] :user The Grafana Cloud Logs Dataset you want to log to.
|
30
|
+
# @option opts [String] :url The URL of the Loki instance in your Grafana stack.
|
31
|
+
# @option opts [String] :token The Grafana Access Policy token with `logs:write` access scoped to your Loki instance.
|
32
|
+
# @option opts [String] :index The Stream Labels, a JSON string used to identify the stream.
|
33
|
+
# @return [LoggingGrafanacloudlogsResponse]
|
34
|
+
def create_log_grafanacloudlogs(opts = {})
|
35
|
+
data, _status_code, _headers = create_log_grafanacloudlogs_with_http_info(opts)
|
36
|
+
data
|
37
|
+
end
|
38
|
+
|
39
|
+
# Create a Grafana Cloud Logs log endpoint
|
40
|
+
# Create a Grafana Cloud Logs logging object for a particular service and version.
|
41
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
42
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
43
|
+
# @option opts [String] :name The name for the real-time logging configuration.
|
44
|
+
# @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
|
45
|
+
# @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
|
46
|
+
# @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).
|
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 `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
48
|
+
# @option opts [String] :user The Grafana Cloud Logs Dataset you want to log to.
|
49
|
+
# @option opts [String] :url The URL of the Loki instance in your Grafana stack.
|
50
|
+
# @option opts [String] :token The Grafana Access Policy token with `logs:write` access scoped to your Loki instance.
|
51
|
+
# @option opts [String] :index The Stream Labels, a JSON string used to identify the stream.
|
52
|
+
# @return [Array<(LoggingGrafanacloudlogsResponse, Integer, Hash)>] LoggingGrafanacloudlogsResponse data, response status code and response headers
|
53
|
+
def create_log_grafanacloudlogs_with_http_info(opts = {})
|
54
|
+
if @api_client.config.debugging
|
55
|
+
@api_client.config.logger.debug 'Calling API: LoggingGrafanacloudlogsApi.create_log_grafanacloudlogs ...'
|
56
|
+
end
|
57
|
+
# unbox the parameters from the hash
|
58
|
+
service_id = opts[:'service_id']
|
59
|
+
version_id = opts[:'version_id']
|
60
|
+
# verify the required parameter 'service_id' is set
|
61
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
62
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling LoggingGrafanacloudlogsApi.create_log_grafanacloudlogs"
|
63
|
+
end
|
64
|
+
# verify the required parameter 'version_id' is set
|
65
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
66
|
+
fail ArgumentError, "Missing the required parameter 'version_id' when calling LoggingGrafanacloudlogsApi.create_log_grafanacloudlogs"
|
67
|
+
end
|
68
|
+
allowable_values = ["none", "waf_debug", "null"]
|
69
|
+
if @api_client.config.client_side_validation && opts[:'placement'] && !allowable_values.include?(opts[:'placement'])
|
70
|
+
fail ArgumentError, "invalid value for \"placement\", must be one of #{allowable_values}"
|
71
|
+
end
|
72
|
+
allowable_values = [1, 2]
|
73
|
+
if @api_client.config.client_side_validation && opts[:'format_version'] && !allowable_values.include?(opts[:'format_version'])
|
74
|
+
fail ArgumentError, "invalid value for \"format_version\", must be one of #{allowable_values}"
|
75
|
+
end
|
76
|
+
# resource path
|
77
|
+
local_var_path = '/service/{service_id}/version/{version_id}/logging/grafanacloudlogs'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
|
78
|
+
|
79
|
+
# query parameters
|
80
|
+
query_params = opts[:query_params] || {}
|
81
|
+
|
82
|
+
# header parameters
|
83
|
+
header_params = opts[:header_params] || {}
|
84
|
+
# HTTP header 'Accept' (if needed)
|
85
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
86
|
+
# HTTP header 'Content-Type'
|
87
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
88
|
+
if !content_type.nil?
|
89
|
+
header_params['Content-Type'] = content_type
|
90
|
+
end
|
91
|
+
|
92
|
+
# form parameters
|
93
|
+
form_params = opts[:form_params] || {}
|
94
|
+
form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
|
95
|
+
form_params['placement'] = opts[:'placement'] if !opts[:'placement'].nil?
|
96
|
+
form_params['response_condition'] = opts[:'response_condition'] if !opts[:'response_condition'].nil?
|
97
|
+
form_params['format'] = opts[:'format'] if !opts[:'format'].nil?
|
98
|
+
form_params['format_version'] = opts[:'format_version'] if !opts[:'format_version'].nil?
|
99
|
+
form_params['user'] = opts[:'user'] if !opts[:'user'].nil?
|
100
|
+
form_params['url'] = opts[:'url'] if !opts[:'url'].nil?
|
101
|
+
form_params['token'] = opts[:'token'] if !opts[:'token'].nil?
|
102
|
+
form_params['index'] = opts[:'index'] if !opts[:'index'].nil?
|
103
|
+
|
104
|
+
# http body (model)
|
105
|
+
post_body = opts[:debug_body]
|
106
|
+
|
107
|
+
# return_type
|
108
|
+
return_type = opts[:debug_return_type] || 'LoggingGrafanacloudlogsResponse'
|
109
|
+
|
110
|
+
# auth_names
|
111
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
112
|
+
|
113
|
+
new_options = opts.merge(
|
114
|
+
:operation => :"LoggingGrafanacloudlogsApi.create_log_grafanacloudlogs",
|
115
|
+
:header_params => header_params,
|
116
|
+
:query_params => query_params,
|
117
|
+
:form_params => form_params,
|
118
|
+
:body => post_body,
|
119
|
+
:auth_names => auth_names,
|
120
|
+
:return_type => return_type
|
121
|
+
)
|
122
|
+
|
123
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
124
|
+
if @api_client.config.debugging
|
125
|
+
@api_client.config.logger.debug "API called: LoggingGrafanacloudlogsApi#create_log_grafanacloudlogs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
126
|
+
end
|
127
|
+
return data, status_code, headers
|
128
|
+
end
|
129
|
+
|
130
|
+
# Delete the Grafana Cloud Logs log endpoint
|
131
|
+
# Delete the Grafana Cloud Logs logging object for a particular service and version.
|
132
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
133
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
134
|
+
# @option opts [String] :logging_grafanacloudlogs_name The name for the real-time logging configuration. (required)
|
135
|
+
# @return [InlineResponse200]
|
136
|
+
def delete_log_grafanacloudlogs(opts = {})
|
137
|
+
data, _status_code, _headers = delete_log_grafanacloudlogs_with_http_info(opts)
|
138
|
+
data
|
139
|
+
end
|
140
|
+
|
141
|
+
# Delete the Grafana Cloud Logs log endpoint
|
142
|
+
# Delete the Grafana Cloud Logs logging object for a particular service and version.
|
143
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
144
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
145
|
+
# @option opts [String] :logging_grafanacloudlogs_name The name for the real-time logging configuration. (required)
|
146
|
+
# @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
|
147
|
+
def delete_log_grafanacloudlogs_with_http_info(opts = {})
|
148
|
+
if @api_client.config.debugging
|
149
|
+
@api_client.config.logger.debug 'Calling API: LoggingGrafanacloudlogsApi.delete_log_grafanacloudlogs ...'
|
150
|
+
end
|
151
|
+
# unbox the parameters from the hash
|
152
|
+
service_id = opts[:'service_id']
|
153
|
+
version_id = opts[:'version_id']
|
154
|
+
logging_grafanacloudlogs_name = opts[:'logging_grafanacloudlogs_name']
|
155
|
+
# verify the required parameter 'service_id' is set
|
156
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
157
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling LoggingGrafanacloudlogsApi.delete_log_grafanacloudlogs"
|
158
|
+
end
|
159
|
+
# verify the required parameter 'version_id' is set
|
160
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
161
|
+
fail ArgumentError, "Missing the required parameter 'version_id' when calling LoggingGrafanacloudlogsApi.delete_log_grafanacloudlogs"
|
162
|
+
end
|
163
|
+
# verify the required parameter 'logging_grafanacloudlogs_name' is set
|
164
|
+
if @api_client.config.client_side_validation && logging_grafanacloudlogs_name.nil?
|
165
|
+
fail ArgumentError, "Missing the required parameter 'logging_grafanacloudlogs_name' when calling LoggingGrafanacloudlogsApi.delete_log_grafanacloudlogs"
|
166
|
+
end
|
167
|
+
# resource path
|
168
|
+
local_var_path = '/service/{service_id}/version/{version_id}/logging/grafanacloudlogs/{logging_grafanacloudlogs_name}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'logging_grafanacloudlogs_name' + '}', CGI.escape(logging_grafanacloudlogs_name.to_s))
|
169
|
+
|
170
|
+
# query parameters
|
171
|
+
query_params = opts[:query_params] || {}
|
172
|
+
|
173
|
+
# header parameters
|
174
|
+
header_params = opts[:header_params] || {}
|
175
|
+
# HTTP header 'Accept' (if needed)
|
176
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
177
|
+
|
178
|
+
# form parameters
|
179
|
+
form_params = opts[:form_params] || {}
|
180
|
+
|
181
|
+
# http body (model)
|
182
|
+
post_body = opts[:debug_body]
|
183
|
+
|
184
|
+
# return_type
|
185
|
+
return_type = opts[:debug_return_type] || 'InlineResponse200'
|
186
|
+
|
187
|
+
# auth_names
|
188
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
189
|
+
|
190
|
+
new_options = opts.merge(
|
191
|
+
:operation => :"LoggingGrafanacloudlogsApi.delete_log_grafanacloudlogs",
|
192
|
+
:header_params => header_params,
|
193
|
+
:query_params => query_params,
|
194
|
+
:form_params => form_params,
|
195
|
+
:body => post_body,
|
196
|
+
:auth_names => auth_names,
|
197
|
+
:return_type => return_type
|
198
|
+
)
|
199
|
+
|
200
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
201
|
+
if @api_client.config.debugging
|
202
|
+
@api_client.config.logger.debug "API called: LoggingGrafanacloudlogsApi#delete_log_grafanacloudlogs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
203
|
+
end
|
204
|
+
return data, status_code, headers
|
205
|
+
end
|
206
|
+
|
207
|
+
# Get a Grafana Cloud Logs log endpoint
|
208
|
+
# Get the details of a Grafana Cloud Logs logging object for a particular service and version.
|
209
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
210
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
211
|
+
# @option opts [String] :logging_grafanacloudlogs_name The name for the real-time logging configuration. (required)
|
212
|
+
# @return [LoggingGrafanacloudlogsResponse]
|
213
|
+
def get_log_grafanacloudlogs(opts = {})
|
214
|
+
data, _status_code, _headers = get_log_grafanacloudlogs_with_http_info(opts)
|
215
|
+
data
|
216
|
+
end
|
217
|
+
|
218
|
+
# Get a Grafana Cloud Logs log endpoint
|
219
|
+
# Get the details of a Grafana Cloud Logs logging object for a particular service and version.
|
220
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
221
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
222
|
+
# @option opts [String] :logging_grafanacloudlogs_name The name for the real-time logging configuration. (required)
|
223
|
+
# @return [Array<(LoggingGrafanacloudlogsResponse, Integer, Hash)>] LoggingGrafanacloudlogsResponse data, response status code and response headers
|
224
|
+
def get_log_grafanacloudlogs_with_http_info(opts = {})
|
225
|
+
if @api_client.config.debugging
|
226
|
+
@api_client.config.logger.debug 'Calling API: LoggingGrafanacloudlogsApi.get_log_grafanacloudlogs ...'
|
227
|
+
end
|
228
|
+
# unbox the parameters from the hash
|
229
|
+
service_id = opts[:'service_id']
|
230
|
+
version_id = opts[:'version_id']
|
231
|
+
logging_grafanacloudlogs_name = opts[:'logging_grafanacloudlogs_name']
|
232
|
+
# verify the required parameter 'service_id' is set
|
233
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
234
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling LoggingGrafanacloudlogsApi.get_log_grafanacloudlogs"
|
235
|
+
end
|
236
|
+
# verify the required parameter 'version_id' is set
|
237
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
238
|
+
fail ArgumentError, "Missing the required parameter 'version_id' when calling LoggingGrafanacloudlogsApi.get_log_grafanacloudlogs"
|
239
|
+
end
|
240
|
+
# verify the required parameter 'logging_grafanacloudlogs_name' is set
|
241
|
+
if @api_client.config.client_side_validation && logging_grafanacloudlogs_name.nil?
|
242
|
+
fail ArgumentError, "Missing the required parameter 'logging_grafanacloudlogs_name' when calling LoggingGrafanacloudlogsApi.get_log_grafanacloudlogs"
|
243
|
+
end
|
244
|
+
# resource path
|
245
|
+
local_var_path = '/service/{service_id}/version/{version_id}/logging/grafanacloudlogs/{logging_grafanacloudlogs_name}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'logging_grafanacloudlogs_name' + '}', CGI.escape(logging_grafanacloudlogs_name.to_s))
|
246
|
+
|
247
|
+
# query parameters
|
248
|
+
query_params = opts[:query_params] || {}
|
249
|
+
|
250
|
+
# header parameters
|
251
|
+
header_params = opts[:header_params] || {}
|
252
|
+
# HTTP header 'Accept' (if needed)
|
253
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
254
|
+
|
255
|
+
# form parameters
|
256
|
+
form_params = opts[:form_params] || {}
|
257
|
+
|
258
|
+
# http body (model)
|
259
|
+
post_body = opts[:debug_body]
|
260
|
+
|
261
|
+
# return_type
|
262
|
+
return_type = opts[:debug_return_type] || 'LoggingGrafanacloudlogsResponse'
|
263
|
+
|
264
|
+
# auth_names
|
265
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
266
|
+
|
267
|
+
new_options = opts.merge(
|
268
|
+
:operation => :"LoggingGrafanacloudlogsApi.get_log_grafanacloudlogs",
|
269
|
+
:header_params => header_params,
|
270
|
+
:query_params => query_params,
|
271
|
+
:form_params => form_params,
|
272
|
+
:body => post_body,
|
273
|
+
:auth_names => auth_names,
|
274
|
+
:return_type => return_type
|
275
|
+
)
|
276
|
+
|
277
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
278
|
+
if @api_client.config.debugging
|
279
|
+
@api_client.config.logger.debug "API called: LoggingGrafanacloudlogsApi#get_log_grafanacloudlogs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
280
|
+
end
|
281
|
+
return data, status_code, headers
|
282
|
+
end
|
283
|
+
|
284
|
+
# List Grafana Cloud Logs log endpoints
|
285
|
+
# List all of the Grafana Cloud Logs logging objects for a particular service and version.
|
286
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
287
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
288
|
+
# @return [Array<LoggingGrafanacloudlogsResponse>]
|
289
|
+
def list_log_grafanacloudlogs(opts = {})
|
290
|
+
data, _status_code, _headers = list_log_grafanacloudlogs_with_http_info(opts)
|
291
|
+
data
|
292
|
+
end
|
293
|
+
|
294
|
+
# List Grafana Cloud Logs log endpoints
|
295
|
+
# List all of the Grafana Cloud Logs logging objects for a particular service and version.
|
296
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
297
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
298
|
+
# @return [Array<(Array<LoggingGrafanacloudlogsResponse>, Integer, Hash)>] Array<LoggingGrafanacloudlogsResponse> data, response status code and response headers
|
299
|
+
def list_log_grafanacloudlogs_with_http_info(opts = {})
|
300
|
+
if @api_client.config.debugging
|
301
|
+
@api_client.config.logger.debug 'Calling API: LoggingGrafanacloudlogsApi.list_log_grafanacloudlogs ...'
|
302
|
+
end
|
303
|
+
# unbox the parameters from the hash
|
304
|
+
service_id = opts[:'service_id']
|
305
|
+
version_id = opts[:'version_id']
|
306
|
+
# verify the required parameter 'service_id' is set
|
307
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
308
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling LoggingGrafanacloudlogsApi.list_log_grafanacloudlogs"
|
309
|
+
end
|
310
|
+
# verify the required parameter 'version_id' is set
|
311
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
312
|
+
fail ArgumentError, "Missing the required parameter 'version_id' when calling LoggingGrafanacloudlogsApi.list_log_grafanacloudlogs"
|
313
|
+
end
|
314
|
+
# resource path
|
315
|
+
local_var_path = '/service/{service_id}/version/{version_id}/logging/grafanacloudlogs'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
|
316
|
+
|
317
|
+
# query parameters
|
318
|
+
query_params = opts[:query_params] || {}
|
319
|
+
|
320
|
+
# header parameters
|
321
|
+
header_params = opts[:header_params] || {}
|
322
|
+
# HTTP header 'Accept' (if needed)
|
323
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
324
|
+
|
325
|
+
# form parameters
|
326
|
+
form_params = opts[:form_params] || {}
|
327
|
+
|
328
|
+
# http body (model)
|
329
|
+
post_body = opts[:debug_body]
|
330
|
+
|
331
|
+
# return_type
|
332
|
+
return_type = opts[:debug_return_type] || 'Array<LoggingGrafanacloudlogsResponse>'
|
333
|
+
|
334
|
+
# auth_names
|
335
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
336
|
+
|
337
|
+
new_options = opts.merge(
|
338
|
+
:operation => :"LoggingGrafanacloudlogsApi.list_log_grafanacloudlogs",
|
339
|
+
:header_params => header_params,
|
340
|
+
:query_params => query_params,
|
341
|
+
:form_params => form_params,
|
342
|
+
:body => post_body,
|
343
|
+
:auth_names => auth_names,
|
344
|
+
:return_type => return_type
|
345
|
+
)
|
346
|
+
|
347
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
348
|
+
if @api_client.config.debugging
|
349
|
+
@api_client.config.logger.debug "API called: LoggingGrafanacloudlogsApi#list_log_grafanacloudlogs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
350
|
+
end
|
351
|
+
return data, status_code, headers
|
352
|
+
end
|
353
|
+
|
354
|
+
# Update a Grafana Cloud Logs log endpoint
|
355
|
+
# Update a Grafana Cloud Logs logging object for a particular service and version.
|
356
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
357
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
358
|
+
# @option opts [String] :logging_grafanacloudlogs_name The name for the real-time logging configuration. (required)
|
359
|
+
# @option opts [String] :name The name for the real-time logging configuration.
|
360
|
+
# @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
|
361
|
+
# @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
|
362
|
+
# @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).
|
363
|
+
# @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 `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
364
|
+
# @option opts [String] :user The Grafana Cloud Logs Dataset you want to log to.
|
365
|
+
# @option opts [String] :url The URL of the Loki instance in your Grafana stack.
|
366
|
+
# @option opts [String] :token The Grafana Access Policy token with `logs:write` access scoped to your Loki instance.
|
367
|
+
# @option opts [String] :index The Stream Labels, a JSON string used to identify the stream.
|
368
|
+
# @return [LoggingGrafanacloudlogsResponse]
|
369
|
+
def update_log_grafanacloudlogs(opts = {})
|
370
|
+
data, _status_code, _headers = update_log_grafanacloudlogs_with_http_info(opts)
|
371
|
+
data
|
372
|
+
end
|
373
|
+
|
374
|
+
# Update a Grafana Cloud Logs log endpoint
|
375
|
+
# Update a Grafana Cloud Logs logging object for a particular service and version.
|
376
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
377
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
378
|
+
# @option opts [String] :logging_grafanacloudlogs_name The name for the real-time logging configuration. (required)
|
379
|
+
# @option opts [String] :name The name for the real-time logging configuration.
|
380
|
+
# @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
|
381
|
+
# @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
|
382
|
+
# @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).
|
383
|
+
# @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 `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
384
|
+
# @option opts [String] :user The Grafana Cloud Logs Dataset you want to log to.
|
385
|
+
# @option opts [String] :url The URL of the Loki instance in your Grafana stack.
|
386
|
+
# @option opts [String] :token The Grafana Access Policy token with `logs:write` access scoped to your Loki instance.
|
387
|
+
# @option opts [String] :index The Stream Labels, a JSON string used to identify the stream.
|
388
|
+
# @return [Array<(LoggingGrafanacloudlogsResponse, Integer, Hash)>] LoggingGrafanacloudlogsResponse data, response status code and response headers
|
389
|
+
def update_log_grafanacloudlogs_with_http_info(opts = {})
|
390
|
+
if @api_client.config.debugging
|
391
|
+
@api_client.config.logger.debug 'Calling API: LoggingGrafanacloudlogsApi.update_log_grafanacloudlogs ...'
|
392
|
+
end
|
393
|
+
# unbox the parameters from the hash
|
394
|
+
service_id = opts[:'service_id']
|
395
|
+
version_id = opts[:'version_id']
|
396
|
+
logging_grafanacloudlogs_name = opts[:'logging_grafanacloudlogs_name']
|
397
|
+
# verify the required parameter 'service_id' is set
|
398
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
399
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling LoggingGrafanacloudlogsApi.update_log_grafanacloudlogs"
|
400
|
+
end
|
401
|
+
# verify the required parameter 'version_id' is set
|
402
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
403
|
+
fail ArgumentError, "Missing the required parameter 'version_id' when calling LoggingGrafanacloudlogsApi.update_log_grafanacloudlogs"
|
404
|
+
end
|
405
|
+
# verify the required parameter 'logging_grafanacloudlogs_name' is set
|
406
|
+
if @api_client.config.client_side_validation && logging_grafanacloudlogs_name.nil?
|
407
|
+
fail ArgumentError, "Missing the required parameter 'logging_grafanacloudlogs_name' when calling LoggingGrafanacloudlogsApi.update_log_grafanacloudlogs"
|
408
|
+
end
|
409
|
+
allowable_values = ["none", "waf_debug", "null"]
|
410
|
+
if @api_client.config.client_side_validation && opts[:'placement'] && !allowable_values.include?(opts[:'placement'])
|
411
|
+
fail ArgumentError, "invalid value for \"placement\", must be one of #{allowable_values}"
|
412
|
+
end
|
413
|
+
allowable_values = [1, 2]
|
414
|
+
if @api_client.config.client_side_validation && opts[:'format_version'] && !allowable_values.include?(opts[:'format_version'])
|
415
|
+
fail ArgumentError, "invalid value for \"format_version\", must be one of #{allowable_values}"
|
416
|
+
end
|
417
|
+
# resource path
|
418
|
+
local_var_path = '/service/{service_id}/version/{version_id}/logging/grafanacloudlogs/{logging_grafanacloudlogs_name}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'logging_grafanacloudlogs_name' + '}', CGI.escape(logging_grafanacloudlogs_name.to_s))
|
419
|
+
|
420
|
+
# query parameters
|
421
|
+
query_params = opts[:query_params] || {}
|
422
|
+
|
423
|
+
# header parameters
|
424
|
+
header_params = opts[:header_params] || {}
|
425
|
+
# HTTP header 'Accept' (if needed)
|
426
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
427
|
+
# HTTP header 'Content-Type'
|
428
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
429
|
+
if !content_type.nil?
|
430
|
+
header_params['Content-Type'] = content_type
|
431
|
+
end
|
432
|
+
|
433
|
+
# form parameters
|
434
|
+
form_params = opts[:form_params] || {}
|
435
|
+
form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
|
436
|
+
form_params['placement'] = opts[:'placement'] if !opts[:'placement'].nil?
|
437
|
+
form_params['response_condition'] = opts[:'response_condition'] if !opts[:'response_condition'].nil?
|
438
|
+
form_params['format'] = opts[:'format'] if !opts[:'format'].nil?
|
439
|
+
form_params['format_version'] = opts[:'format_version'] if !opts[:'format_version'].nil?
|
440
|
+
form_params['user'] = opts[:'user'] if !opts[:'user'].nil?
|
441
|
+
form_params['url'] = opts[:'url'] if !opts[:'url'].nil?
|
442
|
+
form_params['token'] = opts[:'token'] if !opts[:'token'].nil?
|
443
|
+
form_params['index'] = opts[:'index'] if !opts[:'index'].nil?
|
444
|
+
|
445
|
+
# http body (model)
|
446
|
+
post_body = opts[:debug_body]
|
447
|
+
|
448
|
+
# return_type
|
449
|
+
return_type = opts[:debug_return_type] || 'LoggingGrafanacloudlogsResponse'
|
450
|
+
|
451
|
+
# auth_names
|
452
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
453
|
+
|
454
|
+
new_options = opts.merge(
|
455
|
+
:operation => :"LoggingGrafanacloudlogsApi.update_log_grafanacloudlogs",
|
456
|
+
:header_params => header_params,
|
457
|
+
:query_params => query_params,
|
458
|
+
:form_params => form_params,
|
459
|
+
:body => post_body,
|
460
|
+
:auth_names => auth_names,
|
461
|
+
:return_type => return_type
|
462
|
+
)
|
463
|
+
|
464
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
465
|
+
if @api_client.config.debugging
|
466
|
+
@api_client.config.logger.debug "API called: LoggingGrafanacloudlogsApi#update_log_grafanacloudlogs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
467
|
+
end
|
468
|
+
return data, status_code, headers
|
469
|
+
end
|
470
|
+
end
|
471
|
+
end
|