fastly 5.3.0 → 6.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 +62 -0
- data/Gemfile.lock +1 -1
- data/README.md +86 -63
- data/docs/AclEntry.md +1 -1
- data/docs/AclEntryApi.md +176 -0
- data/docs/AclEntryResponse.md +1 -1
- data/docs/ApexRedirectApi.md +56 -0
- data/docs/Batch.md +12 -0
- data/docs/BatchErrors.md +13 -0
- data/docs/BulkUpdateAclEntry.md +1 -1
- data/docs/ClientKey.md +12 -0
- data/docs/ContactApi.md +50 -0
- data/docs/Content.md +2 -2
- data/docs/ContentApi.md +52 -0
- data/docs/DirectorApi.md +42 -0
- data/docs/DomainInspector.md +12 -0
- data/docs/DomainInspectorEntry.md +11 -0
- data/docs/DomainInspectorEntryDimensions.md +12 -0
- data/docs/DomainInspectorHistoricalApi.md +72 -0
- data/docs/DomainInspectorMeasurements.md +71 -0
- data/docs/DomainInspectorRealtimeApi.md +132 -0
- data/docs/DomainInspectorRealtimeEntry.md +12 -0
- data/docs/EventAttributes.md +1 -1
- data/docs/{EventsResponseAllOf.md → EventData.md} +1 -1
- data/docs/HistoricalDomains.md +13 -0
- data/docs/HistoricalDomainsData.md +11 -0
- data/docs/HistoricalDomainsMeta.md +18 -0
- data/docs/HistoricalDomainsMetaFilters.md +12 -0
- data/docs/HistoricalDomainsResponse.md +13 -0
- data/docs/HistoricalDomainsResponseAllOf.md +10 -0
- data/docs/{HistoricalFieldResultsAttributesAllOf.md → HistoricalFieldResultsAttributesAdditional.md} +1 -1
- data/docs/HistoricalOriginsResponse.md +13 -0
- data/docs/HistoricalOriginsResponseAllOf.md +10 -0
- data/docs/IamRolesApi.md +157 -0
- data/docs/IamServiceGroupsApi.md +157 -0
- data/docs/IamUserGroupsApi.md +315 -0
- data/docs/InlineResponse2005.md +11 -0
- data/docs/InlineResponse2006.md +11 -0
- data/docs/InlineResponse2007.md +10 -0
- data/docs/InlineResponse400.md +10 -0
- data/docs/LegacyWafConfigurationSet.md +11 -0
- data/docs/LegacyWafConfigurationSetsApi.md +125 -0
- data/docs/LegacyWafFirewall.md +18 -0
- data/docs/LegacyWafFirewallApi.md +352 -0
- data/docs/LegacyWafOwasp.md +38 -0
- data/docs/LegacyWafOwaspApi.md +138 -0
- data/docs/LegacyWafRule.md +14 -0
- data/docs/LegacyWafRuleApi.md +184 -0
- data/docs/LegacyWafRuleStatus.md +12 -0
- data/docs/LegacyWafRuleStatusApi.md +202 -0
- data/docs/LegacyWafRuleset.md +11 -0
- data/docs/LegacyWafRulesetApi.md +136 -0
- data/docs/LegacyWafTag.md +10 -0
- data/docs/LegacyWafTagApi.md +58 -0
- data/docs/LegacyWafUpdateStatus.md +15 -0
- data/docs/LegacyWafUpdateStatusApi.md +102 -0
- data/docs/LoggingKafkaApi.md +42 -0
- data/docs/LoggingKinesisApi.md +42 -0
- data/docs/OriginInspector.md +12 -0
- data/docs/OriginInspectorDimensions.md +12 -0
- data/docs/OriginInspectorEntry.md +11 -0
- data/docs/OriginInspectorHistorical.md +13 -0
- data/docs/OriginInspectorHistoricalApi.md +72 -0
- data/docs/OriginInspectorHistoricalData.md +11 -0
- data/docs/OriginInspectorHistoricalMeta.md +18 -0
- data/docs/OriginInspectorHistoricalMetaFilters.md +12 -0
- data/docs/OriginInspectorMeasurements.md +161 -0
- data/docs/OriginInspectorRealtimeApi.md +132 -0
- data/docs/OriginInspectorRealtimeEntry.md +12 -0
- data/docs/OriginInspectorRealtimeEntryRecorded.md +9 -0
- data/docs/OriginInspectorSubsequentRequestTimestamp.md +9 -0
- data/docs/OriginInspectorValues.md +161 -0
- data/docs/PaginationCursorMeta.md +11 -0
- data/docs/ReadOnlyServiceId.md +9 -0
- data/docs/ReadOnlyVersion.md +9 -0
- data/docs/RealtimeEntry.md +2 -2
- data/docs/RealtimeEntryAggregated.md +227 -0
- data/docs/RealtimeEntryRecorded.md +9 -0
- data/docs/RealtimeMeasurements.md +1 -1
- data/docs/RecordedTimestamp.md +9 -0
- data/docs/RequestSettingsApi.md +40 -0
- data/docs/ResponseObjectApi.md +82 -0
- data/docs/SchemasSnippetResponse.md +1 -1
- data/docs/Secret.md +12 -0
- data/docs/SecretResponse.md +13 -0
- data/docs/SecretStore.md +10 -0
- data/docs/SecretStoreApi.md +233 -0
- data/docs/SecretStoreItemApi.md +255 -0
- data/docs/SecretStoreResponse.md +12 -0
- data/docs/ServiceAuthorizationsApi.md +76 -0
- data/docs/SigningKey.md +10 -0
- data/docs/Snippet.md +1 -1
- data/docs/SnippetApi.md +46 -4
- data/docs/SnippetResponse.md +1 -1
- data/docs/SubsequentRequestTimestamp.md +9 -0
- data/docs/SudoApi.md +52 -0
- data/docs/SudoGenericTokenError.md +10 -0
- data/docs/SudoRequest.md +12 -0
- data/docs/SudoResponse.md +10 -0
- data/docs/TokensAdditionalProps.md +9 -0
- data/docs/TokensApi.md +70 -0
- data/docs/ValidatorResult.md +1 -5
- data/docs/ValidatorResultData.md +12 -0
- data/docs/ValidatorResultDataAttributes.md +14 -0
- data/docs/{ValidatorResultMessages.md → ValidatorResultDataAttributesMessages.md} +2 -2
- data/docs/Values.md +71 -0
- data/docs/VclApi.md +8 -6
- data/docs/VclSyntaxHighlightingResponse.md +10 -0
- data/docs/WafActiveRulesApi.md +41 -0
- data/lib/fastly/api/acl_entry_api.rb +332 -0
- data/lib/fastly/api/apex_redirect_api.rb +111 -0
- data/lib/fastly/api/contact_api.rb +90 -0
- data/lib/fastly/api/content_api.rb +79 -0
- data/lib/fastly/api/director_api.rb +82 -0
- data/lib/fastly/api/domain_inspector_historical_api.rb +125 -0
- data/lib/fastly/api/domain_inspector_realtime_api.rb +223 -0
- data/lib/fastly/api/iam_roles_api.rb +271 -0
- data/lib/fastly/api/iam_service_groups_api.rb +271 -0
- data/lib/fastly/api/iam_user_groups_api.rb +547 -0
- data/lib/fastly/api/legacy_waf_configuration_sets_api.rb +209 -0
- data/lib/fastly/api/legacy_waf_firewall_api.rb +627 -0
- data/lib/fastly/api/legacy_waf_owasp_api.rb +244 -0
- data/lib/fastly/api/legacy_waf_rule_api.rb +307 -0
- data/lib/fastly/api/legacy_waf_rule_status_api.rb +366 -0
- data/lib/fastly/api/legacy_waf_ruleset_api.rb +237 -0
- data/lib/fastly/api/legacy_waf_tag_api.rb +96 -0
- data/lib/fastly/api/legacy_waf_update_status_api.rb +184 -0
- data/lib/fastly/api/logging_kafka_api.rb +82 -0
- data/lib/fastly/api/logging_kinesis_api.rb +82 -0
- data/lib/fastly/api/origin_inspector_historical_api.rb +125 -0
- data/lib/fastly/api/origin_inspector_realtime_api.rb +223 -0
- data/lib/fastly/api/request_settings_api.rb +75 -0
- data/lib/fastly/api/response_object_api.rb +157 -0
- data/lib/fastly/api/secret_store_api.rb +381 -0
- data/lib/fastly/api/secret_store_item_api.rb +437 -0
- data/lib/fastly/api/service_authorizations_api.rb +126 -0
- data/lib/fastly/api/snippet_api.rb +88 -6
- data/lib/fastly/api/sudo_api.rb +83 -0
- data/lib/fastly/api/tokens_api.rb +122 -0
- data/lib/fastly/api/vcl_api.rb +10 -10
- data/lib/fastly/api/waf_active_rules_api.rb +75 -0
- data/lib/fastly/configuration.rb +504 -0
- data/lib/fastly/models/acl_entry.rb +1 -1
- data/lib/fastly/models/acl_entry_response.rb +1 -1
- data/lib/fastly/models/batch.rb +239 -0
- data/lib/fastly/models/batch_errors.rb +247 -0
- data/lib/fastly/models/bulk_update_acl_entry.rb +1 -1
- data/lib/fastly/models/client_key.rb +239 -0
- data/lib/fastly/models/content.rb +8 -4
- data/lib/fastly/models/domain.rb +1 -0
- data/lib/fastly/models/domain_inspector.rb +238 -0
- data/lib/fastly/models/domain_inspector_entry.rb +228 -0
- data/lib/fastly/models/domain_inspector_entry_dimensions.rb +238 -0
- data/lib/fastly/models/domain_inspector_measurements.rb +828 -0
- data/lib/fastly/models/domain_inspector_realtime_entry.rb +241 -0
- data/lib/fastly/models/event_attributes.rb +4 -2
- data/lib/fastly/models/{events_response_all_of.rb → event_data.rb} +3 -3
- data/lib/fastly/models/events_response.rb +1 -1
- data/lib/fastly/models/historical_domains.rb +249 -0
- data/lib/fastly/models/historical_domains_data.rb +228 -0
- data/lib/fastly/models/historical_domains_meta.rb +297 -0
- data/lib/fastly/models/historical_domains_meta_filters.rb +235 -0
- data/lib/fastly/models/historical_domains_response.rb +257 -0
- data/lib/fastly/models/historical_domains_response_all_of.rb +219 -0
- data/lib/fastly/models/historical_field_results_attributes.rb +1 -1
- data/lib/fastly/models/{historical_field_results_attributes_all_of.rb → historical_field_results_attributes_additional.rb} +3 -3
- data/lib/fastly/models/historical_origins_response.rb +257 -0
- data/lib/fastly/models/historical_origins_response_all_of.rb +219 -0
- data/lib/fastly/models/inline_response2005.rb +227 -0
- data/lib/fastly/models/inline_response2006.rb +227 -0
- data/lib/fastly/models/inline_response2007.rb +218 -0
- data/lib/fastly/models/inline_response400.rb +250 -0
- data/lib/fastly/models/legacy_waf_configuration_set.rb +227 -0
- data/lib/fastly/models/legacy_waf_firewall.rb +297 -0
- data/lib/fastly/models/legacy_waf_owasp.rb +527 -0
- data/lib/fastly/models/legacy_waf_rule.rb +257 -0
- data/lib/fastly/models/legacy_waf_rule_status.rb +237 -0
- data/lib/fastly/models/legacy_waf_ruleset.rb +227 -0
- data/lib/fastly/models/legacy_waf_tag.rb +217 -0
- data/lib/fastly/models/legacy_waf_update_status.rb +267 -0
- data/lib/fastly/models/origin_inspector.rb +238 -0
- data/lib/fastly/models/origin_inspector_dimensions.rb +238 -0
- data/lib/fastly/models/origin_inspector_entry.rb +228 -0
- data/lib/fastly/models/origin_inspector_historical.rb +249 -0
- data/lib/fastly/models/origin_inspector_historical_data.rb +225 -0
- data/lib/fastly/models/origin_inspector_historical_meta.rb +297 -0
- data/lib/fastly/models/origin_inspector_historical_meta_filters.rb +235 -0
- data/lib/fastly/models/origin_inspector_measurements.rb +1728 -0
- data/lib/fastly/models/origin_inspector_realtime_entry.rb +241 -0
- data/lib/fastly/models/origin_inspector_realtime_entry_recorded.rb +208 -0
- data/lib/fastly/models/origin_inspector_subsequent_request_timestamp.rb +208 -0
- data/lib/fastly/models/origin_inspector_values.rb +1728 -0
- data/lib/fastly/models/pagination_cursor_meta.rb +227 -0
- data/lib/fastly/models/read_only_service_id.rb +207 -0
- data/lib/fastly/models/read_only_version.rb +207 -0
- data/lib/fastly/models/realtime_entry.rb +2 -7
- data/lib/fastly/models/realtime_entry_aggregated.rb +2397 -0
- data/lib/fastly/models/realtime_entry_recorded.rb +208 -0
- data/lib/fastly/models/realtime_measurements.rb +4 -2
- data/lib/fastly/models/recorded_timestamp.rb +208 -0
- data/lib/fastly/models/schemas_snippet_response.rb +3 -3
- data/lib/fastly/models/secret.rb +238 -0
- data/lib/fastly/models/secret_response.rb +249 -0
- data/lib/fastly/models/secret_store.rb +217 -0
- data/lib/fastly/models/secret_store_response.rb +238 -0
- data/lib/fastly/models/signing_key.rb +218 -0
- data/lib/fastly/models/snippet.rb +3 -3
- data/lib/fastly/models/snippet_response.rb +3 -3
- data/lib/fastly/models/subsequent_request_timestamp.rb +208 -0
- data/lib/fastly/models/sudo_generic_token_error.rb +216 -0
- data/lib/fastly/models/sudo_request.rb +244 -0
- data/lib/fastly/models/sudo_response.rb +217 -0
- data/lib/fastly/models/tokens_additional_props.rb +227 -0
- data/lib/fastly/models/validator_result.rb +7 -84
- data/lib/fastly/models/validator_result_data.rb +234 -0
- data/lib/fastly/models/validator_result_data_attributes.rb +293 -0
- data/lib/fastly/models/{validator_result_messages.rb → validator_result_data_attributes_messages.rb} +4 -4
- data/lib/fastly/models/values.rb +828 -0
- data/lib/fastly/models/vcl_syntax_highlighting_response.rb +217 -0
- data/lib/fastly/version.rb +1 -1
- data/lib/fastly.rb +79 -3
- data/sig.json +1 -1
- metadata +160 -8
@@ -351,5 +351,87 @@ module Fastly
|
|
351
351
|
end
|
352
352
|
return data, status_code, headers
|
353
353
|
end
|
354
|
+
|
355
|
+
# Update a director
|
356
|
+
# Update the director for a particular service and version.
|
357
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
358
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
359
|
+
# @option opts [String] :director_name Name for the Director. (required)
|
360
|
+
# @return [DirectorResponse]
|
361
|
+
def update_director(opts = {})
|
362
|
+
data, _status_code, _headers = update_director_with_http_info(opts)
|
363
|
+
data
|
364
|
+
end
|
365
|
+
|
366
|
+
# Update a director
|
367
|
+
# Update the director for a particular service and version.
|
368
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
369
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
370
|
+
# @option opts [String] :director_name Name for the Director. (required)
|
371
|
+
# @return [Array<(DirectorResponse, Integer, Hash)>] DirectorResponse data, response status code and response headers
|
372
|
+
def update_director_with_http_info(opts = {})
|
373
|
+
if @api_client.config.debugging
|
374
|
+
@api_client.config.logger.debug 'Calling API: DirectorApi.update_director ...'
|
375
|
+
end
|
376
|
+
# unbox the parameters from the hash
|
377
|
+
service_id = opts[:'service_id']
|
378
|
+
version_id = opts[:'version_id']
|
379
|
+
director_name = opts[:'director_name']
|
380
|
+
# verify the required parameter 'service_id' is set
|
381
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
382
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling DirectorApi.update_director"
|
383
|
+
end
|
384
|
+
# verify the required parameter 'version_id' is set
|
385
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
386
|
+
fail ArgumentError, "Missing the required parameter 'version_id' when calling DirectorApi.update_director"
|
387
|
+
end
|
388
|
+
# verify the required parameter 'director_name' is set
|
389
|
+
if @api_client.config.client_side_validation && director_name.nil?
|
390
|
+
fail ArgumentError, "Missing the required parameter 'director_name' when calling DirectorApi.update_director"
|
391
|
+
end
|
392
|
+
# resource path
|
393
|
+
local_var_path = '/service/{service_id}/version/{version_id}/director/{director_name}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'director_name' + '}', CGI.escape(director_name.to_s))
|
394
|
+
|
395
|
+
# query parameters
|
396
|
+
query_params = opts[:query_params] || {}
|
397
|
+
|
398
|
+
# header parameters
|
399
|
+
header_params = opts[:header_params] || {}
|
400
|
+
# HTTP header 'Accept' (if needed)
|
401
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
402
|
+
# HTTP header 'Content-Type'
|
403
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
404
|
+
if !content_type.nil?
|
405
|
+
header_params['Content-Type'] = content_type
|
406
|
+
end
|
407
|
+
|
408
|
+
# form parameters
|
409
|
+
form_params = opts[:form_params] || {}
|
410
|
+
|
411
|
+
# http body (model)
|
412
|
+
post_body = opts[:debug_body]
|
413
|
+
|
414
|
+
# return_type
|
415
|
+
return_type = opts[:debug_return_type] || 'DirectorResponse'
|
416
|
+
|
417
|
+
# auth_names
|
418
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
419
|
+
|
420
|
+
new_options = opts.merge(
|
421
|
+
:operation => :"DirectorApi.update_director",
|
422
|
+
:header_params => header_params,
|
423
|
+
:query_params => query_params,
|
424
|
+
:form_params => form_params,
|
425
|
+
:body => post_body,
|
426
|
+
:auth_names => auth_names,
|
427
|
+
:return_type => return_type
|
428
|
+
)
|
429
|
+
|
430
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
431
|
+
if @api_client.config.debugging
|
432
|
+
@api_client.config.logger.debug "API called: DirectorApi#update_director\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
433
|
+
end
|
434
|
+
return data, status_code, headers
|
435
|
+
end
|
354
436
|
end
|
355
437
|
end
|
@@ -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://developer.fastly.com/reference/api/)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: oss@fastly.com
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'cgi'
|
12
|
+
|
13
|
+
module Fastly
|
14
|
+
class DomainInspectorHistoricalApi
|
15
|
+
attr_accessor :api_client
|
16
|
+
|
17
|
+
def initialize(api_client = ApiClient.default)
|
18
|
+
@api_client = api_client
|
19
|
+
end
|
20
|
+
# Get historical domain data for a service
|
21
|
+
# Fetches historical domain metrics for a given Fastly service, optionally filtering and grouping the results by domain, region, or POP.
|
22
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
23
|
+
# @option opts [String] :start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value.
|
24
|
+
# @option opts [String] :_end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value.
|
25
|
+
# @option opts [String] :downsample Duration of sample windows. (default to 'hour')
|
26
|
+
# @option opts [String] :metric The metric to retrieve. Up to ten comma-separated metrics are accepted. (default to 'edge_requests')
|
27
|
+
# @option opts [String] :group_by Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=domain` will return one timeseries for every domain, as a total across all datacenters (POPs).
|
28
|
+
# @option opts [String] :limit Number of results per page. The maximum is 200. (default to '100')
|
29
|
+
# @option opts [String] :cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty.
|
30
|
+
# @option opts [String] :region Limit query to one or more specific geographic regions. Values should be comma-separated.
|
31
|
+
# @option opts [String] :datacenter Limit query to one or more specific POPs. Values should be comma-separated.
|
32
|
+
# @option opts [String] :domain Limit query to one or more specific domains. Values should be comma-separated.
|
33
|
+
# @return [HistoricalDomainsResponse]
|
34
|
+
def get_domain_inspector_historical(opts = {})
|
35
|
+
data, _status_code, _headers = get_domain_inspector_historical_with_http_info(opts)
|
36
|
+
data
|
37
|
+
end
|
38
|
+
|
39
|
+
# Get historical domain data for a service
|
40
|
+
# Fetches historical domain metrics for a given Fastly service, optionally filtering and grouping the results by domain, region, or POP.
|
41
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
42
|
+
# @option opts [String] :start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value.
|
43
|
+
# @option opts [String] :_end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value.
|
44
|
+
# @option opts [String] :downsample Duration of sample windows. (default to 'hour')
|
45
|
+
# @option opts [String] :metric The metric to retrieve. Up to ten comma-separated metrics are accepted. (default to 'edge_requests')
|
46
|
+
# @option opts [String] :group_by Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=domain` will return one timeseries for every domain, as a total across all datacenters (POPs).
|
47
|
+
# @option opts [String] :limit Number of results per page. The maximum is 200. (default to '100')
|
48
|
+
# @option opts [String] :cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty.
|
49
|
+
# @option opts [String] :region Limit query to one or more specific geographic regions. Values should be comma-separated.
|
50
|
+
# @option opts [String] :datacenter Limit query to one or more specific POPs. Values should be comma-separated.
|
51
|
+
# @option opts [String] :domain Limit query to one or more specific domains. Values should be comma-separated.
|
52
|
+
# @return [Array<(HistoricalDomainsResponse, Integer, Hash)>] HistoricalDomainsResponse data, response status code and response headers
|
53
|
+
def get_domain_inspector_historical_with_http_info(opts = {})
|
54
|
+
if @api_client.config.debugging
|
55
|
+
@api_client.config.logger.debug 'Calling API: DomainInspectorHistoricalApi.get_domain_inspector_historical ...'
|
56
|
+
end
|
57
|
+
# unbox the parameters from the hash
|
58
|
+
service_id = opts[:'service_id']
|
59
|
+
# verify the required parameter 'service_id' is set
|
60
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
61
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling DomainInspectorHistoricalApi.get_domain_inspector_historical"
|
62
|
+
end
|
63
|
+
allowable_values = ["hour", "minute", "day"]
|
64
|
+
if @api_client.config.client_side_validation && opts[:'downsample'] && !allowable_values.include?(opts[:'downsample'])
|
65
|
+
fail ArgumentError, "invalid value for \"downsample\", must be one of #{allowable_values}"
|
66
|
+
end
|
67
|
+
allowable_values = ["domain", "datacenter", "region", "none"]
|
68
|
+
if @api_client.config.client_side_validation && opts[:'group_by'] && !allowable_values.include?(opts[:'group_by'])
|
69
|
+
fail ArgumentError, "invalid value for \"group_by\", must be one of #{allowable_values}"
|
70
|
+
end
|
71
|
+
allowable_values = ["usa", "europe", "asia", "asia_india", "asia_southkorea", "africa_std", "southamerica_std"]
|
72
|
+
if @api_client.config.client_side_validation && opts[:'region'] && !allowable_values.include?(opts[:'region'])
|
73
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
74
|
+
end
|
75
|
+
# resource path
|
76
|
+
local_var_path = '/metrics/domains/services/{service_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
|
77
|
+
|
78
|
+
# query parameters
|
79
|
+
query_params = opts[:query_params] || {}
|
80
|
+
query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
|
81
|
+
query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil?
|
82
|
+
query_params[:'downsample'] = opts[:'downsample'] if !opts[:'downsample'].nil?
|
83
|
+
query_params[:'metric'] = opts[:'metric'] if !opts[:'metric'].nil?
|
84
|
+
query_params[:'group_by'] = opts[:'group_by'] if !opts[:'group_by'].nil?
|
85
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
86
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
87
|
+
query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil?
|
88
|
+
query_params[:'datacenter'] = opts[:'datacenter'] if !opts[:'datacenter'].nil?
|
89
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].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] || 'HistoricalDomainsResponse'
|
104
|
+
|
105
|
+
# auth_names
|
106
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
107
|
+
|
108
|
+
new_options = opts.merge(
|
109
|
+
:operation => :"DomainInspectorHistoricalApi.get_domain_inspector_historical",
|
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: DomainInspectorHistoricalApi#get_domain_inspector_historical\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
121
|
+
end
|
122
|
+
return data, status_code, headers
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
@@ -0,0 +1,223 @@
|
|
1
|
+
=begin
|
2
|
+
#Fastly API
|
3
|
+
|
4
|
+
#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: oss@fastly.com
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'cgi'
|
12
|
+
|
13
|
+
module Fastly
|
14
|
+
class DomainInspectorRealtimeApi
|
15
|
+
attr_accessor :api_client
|
16
|
+
|
17
|
+
def initialize(api_client = ApiClient.default)
|
18
|
+
@api_client = api_client
|
19
|
+
end
|
20
|
+
# Get real-time domain data for the last 120 seconds
|
21
|
+
# Get data for the 120 seconds preceding the latest timestamp available for a service.
|
22
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
23
|
+
# @return [DomainInspector]
|
24
|
+
def get_domain_inspector_last120_seconds(opts = {})
|
25
|
+
data, _status_code, _headers = get_domain_inspector_last120_seconds_with_http_info(opts)
|
26
|
+
data
|
27
|
+
end
|
28
|
+
|
29
|
+
# Get real-time domain data for the last 120 seconds
|
30
|
+
# Get data for the 120 seconds preceding the latest timestamp available for a service.
|
31
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
32
|
+
# @return [Array<(DomainInspector, Integer, Hash)>] DomainInspector data, response status code and response headers
|
33
|
+
def get_domain_inspector_last120_seconds_with_http_info(opts = {})
|
34
|
+
if @api_client.config.debugging
|
35
|
+
@api_client.config.logger.debug 'Calling API: DomainInspectorRealtimeApi.get_domain_inspector_last120_seconds ...'
|
36
|
+
end
|
37
|
+
# unbox the parameters from the hash
|
38
|
+
service_id = opts[:'service_id']
|
39
|
+
# verify the required parameter 'service_id' is set
|
40
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling DomainInspectorRealtimeApi.get_domain_inspector_last120_seconds"
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/v1/domains/{service_id}/ts/h'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = opts[:query_params] || {}
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = opts[:header_params] || {}
|
51
|
+
# HTTP header 'Accept' (if needed)
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
53
|
+
|
54
|
+
# form parameters
|
55
|
+
form_params = opts[:form_params] || {}
|
56
|
+
|
57
|
+
# http body (model)
|
58
|
+
post_body = opts[:debug_body]
|
59
|
+
|
60
|
+
# return_type
|
61
|
+
return_type = opts[:debug_return_type] || 'DomainInspector'
|
62
|
+
|
63
|
+
# auth_names
|
64
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
65
|
+
|
66
|
+
new_options = opts.merge(
|
67
|
+
:operation => :"DomainInspectorRealtimeApi.get_domain_inspector_last120_seconds",
|
68
|
+
:header_params => header_params,
|
69
|
+
:query_params => query_params,
|
70
|
+
:form_params => form_params,
|
71
|
+
:body => post_body,
|
72
|
+
:auth_names => auth_names,
|
73
|
+
:return_type => return_type
|
74
|
+
)
|
75
|
+
|
76
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
77
|
+
if @api_client.config.debugging
|
78
|
+
@api_client.config.logger.debug "API called: DomainInspectorRealtimeApi#get_domain_inspector_last120_seconds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
79
|
+
end
|
80
|
+
return data, status_code, headers
|
81
|
+
end
|
82
|
+
|
83
|
+
# Get a limited number of real-time domain data entries
|
84
|
+
# Get data for the `max_entries` seconds preceding the latest timestamp available for a service, up to a maximum of 120 entries.
|
85
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
86
|
+
# @option opts [Integer] :max_entries Maximum number of results to show. (required)
|
87
|
+
# @return [DomainInspector]
|
88
|
+
def get_domain_inspector_last_max_entries(opts = {})
|
89
|
+
data, _status_code, _headers = get_domain_inspector_last_max_entries_with_http_info(opts)
|
90
|
+
data
|
91
|
+
end
|
92
|
+
|
93
|
+
# Get a limited number of real-time domain data entries
|
94
|
+
# Get data for the `max_entries` seconds preceding the latest timestamp available for a service, up to a maximum of 120 entries.
|
95
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
96
|
+
# @option opts [Integer] :max_entries Maximum number of results to show. (required)
|
97
|
+
# @return [Array<(DomainInspector, Integer, Hash)>] DomainInspector data, response status code and response headers
|
98
|
+
def get_domain_inspector_last_max_entries_with_http_info(opts = {})
|
99
|
+
if @api_client.config.debugging
|
100
|
+
@api_client.config.logger.debug 'Calling API: DomainInspectorRealtimeApi.get_domain_inspector_last_max_entries ...'
|
101
|
+
end
|
102
|
+
# unbox the parameters from the hash
|
103
|
+
service_id = opts[:'service_id']
|
104
|
+
max_entries = opts[:'max_entries']
|
105
|
+
# verify the required parameter 'service_id' is set
|
106
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
107
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling DomainInspectorRealtimeApi.get_domain_inspector_last_max_entries"
|
108
|
+
end
|
109
|
+
# verify the required parameter 'max_entries' is set
|
110
|
+
if @api_client.config.client_side_validation && max_entries.nil?
|
111
|
+
fail ArgumentError, "Missing the required parameter 'max_entries' when calling DomainInspectorRealtimeApi.get_domain_inspector_last_max_entries"
|
112
|
+
end
|
113
|
+
# resource path
|
114
|
+
local_var_path = '/v1/domains/{service_id}/ts/h/limit/{max_entries}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'max_entries' + '}', CGI.escape(max_entries.to_s))
|
115
|
+
|
116
|
+
# query parameters
|
117
|
+
query_params = opts[:query_params] || {}
|
118
|
+
|
119
|
+
# header parameters
|
120
|
+
header_params = opts[:header_params] || {}
|
121
|
+
# HTTP header 'Accept' (if needed)
|
122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
123
|
+
|
124
|
+
# form parameters
|
125
|
+
form_params = opts[:form_params] || {}
|
126
|
+
|
127
|
+
# http body (model)
|
128
|
+
post_body = opts[:debug_body]
|
129
|
+
|
130
|
+
# return_type
|
131
|
+
return_type = opts[:debug_return_type] || 'DomainInspector'
|
132
|
+
|
133
|
+
# auth_names
|
134
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
135
|
+
|
136
|
+
new_options = opts.merge(
|
137
|
+
:operation => :"DomainInspectorRealtimeApi.get_domain_inspector_last_max_entries",
|
138
|
+
:header_params => header_params,
|
139
|
+
:query_params => query_params,
|
140
|
+
:form_params => form_params,
|
141
|
+
:body => post_body,
|
142
|
+
:auth_names => auth_names,
|
143
|
+
:return_type => return_type
|
144
|
+
)
|
145
|
+
|
146
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
147
|
+
if @api_client.config.debugging
|
148
|
+
@api_client.config.logger.debug "API called: DomainInspectorRealtimeApi#get_domain_inspector_last_max_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
149
|
+
end
|
150
|
+
return data, status_code, headers
|
151
|
+
end
|
152
|
+
|
153
|
+
# Get real-time domain data from a specified time
|
154
|
+
# Get real-time domain data for the specified reporting period. Specify `0` to get a single entry for the last complete second. The `Timestamp` field included in the response provides the time index of the latest entry in the dataset and can be provided as the `start_timestamp` of the next request for a seamless continuation of the dataset from one request to the next. Due to processing latency, the earliest entry in the response dataset may be earlier than `start_timestamp` by the value of `AggregateDelay`.
|
155
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
156
|
+
# @option opts [Integer] :start_timestamp Timestamp in seconds (Unix epoch time). (required)
|
157
|
+
# @return [DomainInspector]
|
158
|
+
def get_domain_inspector_last_second(opts = {})
|
159
|
+
data, _status_code, _headers = get_domain_inspector_last_second_with_http_info(opts)
|
160
|
+
data
|
161
|
+
end
|
162
|
+
|
163
|
+
# Get real-time domain data from a specified time
|
164
|
+
# Get real-time domain data for the specified reporting period. Specify `0` to get a single entry for the last complete second. The `Timestamp` field included in the response provides the time index of the latest entry in the dataset and can be provided as the `start_timestamp` of the next request for a seamless continuation of the dataset from one request to the next. Due to processing latency, the earliest entry in the response dataset may be earlier than `start_timestamp` by the value of `AggregateDelay`.
|
165
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
166
|
+
# @option opts [Integer] :start_timestamp Timestamp in seconds (Unix epoch time). (required)
|
167
|
+
# @return [Array<(DomainInspector, Integer, Hash)>] DomainInspector data, response status code and response headers
|
168
|
+
def get_domain_inspector_last_second_with_http_info(opts = {})
|
169
|
+
if @api_client.config.debugging
|
170
|
+
@api_client.config.logger.debug 'Calling API: DomainInspectorRealtimeApi.get_domain_inspector_last_second ...'
|
171
|
+
end
|
172
|
+
# unbox the parameters from the hash
|
173
|
+
service_id = opts[:'service_id']
|
174
|
+
start_timestamp = opts[:'start_timestamp']
|
175
|
+
# verify the required parameter 'service_id' is set
|
176
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
177
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling DomainInspectorRealtimeApi.get_domain_inspector_last_second"
|
178
|
+
end
|
179
|
+
# verify the required parameter 'start_timestamp' is set
|
180
|
+
if @api_client.config.client_side_validation && start_timestamp.nil?
|
181
|
+
fail ArgumentError, "Missing the required parameter 'start_timestamp' when calling DomainInspectorRealtimeApi.get_domain_inspector_last_second"
|
182
|
+
end
|
183
|
+
# resource path
|
184
|
+
local_var_path = '/v1/domains/{service_id}/ts/{start_timestamp}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'start_timestamp' + '}', CGI.escape(start_timestamp.to_s))
|
185
|
+
|
186
|
+
# query parameters
|
187
|
+
query_params = opts[:query_params] || {}
|
188
|
+
|
189
|
+
# header parameters
|
190
|
+
header_params = opts[:header_params] || {}
|
191
|
+
# HTTP header 'Accept' (if needed)
|
192
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
193
|
+
|
194
|
+
# form parameters
|
195
|
+
form_params = opts[:form_params] || {}
|
196
|
+
|
197
|
+
# http body (model)
|
198
|
+
post_body = opts[:debug_body]
|
199
|
+
|
200
|
+
# return_type
|
201
|
+
return_type = opts[:debug_return_type] || 'DomainInspector'
|
202
|
+
|
203
|
+
# auth_names
|
204
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
205
|
+
|
206
|
+
new_options = opts.merge(
|
207
|
+
:operation => :"DomainInspectorRealtimeApi.get_domain_inspector_last_second",
|
208
|
+
:header_params => header_params,
|
209
|
+
:query_params => query_params,
|
210
|
+
:form_params => form_params,
|
211
|
+
:body => post_body,
|
212
|
+
:auth_names => auth_names,
|
213
|
+
:return_type => return_type
|
214
|
+
)
|
215
|
+
|
216
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
217
|
+
if @api_client.config.debugging
|
218
|
+
@api_client.config.logger.debug "API called: DomainInspectorRealtimeApi#get_domain_inspector_last_second\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
219
|
+
end
|
220
|
+
return data, status_code, headers
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|