fastly 14.0.0 → 15.1.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 +45 -0
- data/Gemfile.lock +1 -1
- data/README.md +22 -13
- data/docs/ApiDiscoveryResponseBodyGetAllServices.md +13 -0
- data/docs/ApiDiscoveryResponseCustomer.md +10 -0
- data/docs/ApiDiscoveryResponseCustomerCustomer.md +11 -0
- data/docs/ApiDiscoveryResponseEnable.md +12 -0
- data/docs/ApiDiscoveryResponseEnabledServices.md +10 -0
- data/docs/ApiDiscoveryResponseLinks.md +10 -0
- data/docs/ApiDiscoveryResponseLinksGetAllServices.md +10 -0
- data/docs/ApiDiscoveryResponseLinksGetAllServicesLinks.md +10 -0
- data/docs/ApiDiscoveryResponseLinksLinks.md +10 -0
- data/docs/ApiDiscoveryResponseProduct.md +10 -0
- data/docs/ApiDiscoveryResponseProductProduct.md +11 -0
- data/docs/ApiDiscoveryResponseService.md +10 -0
- data/docs/{BotManagementResponseServiceService.md → ApiDiscoveryResponseServiceService.md} +1 -1
- data/docs/BotManagementResponseBodyEnable.md +1 -1
- data/docs/BotManagementResponseService.md +1 -1
- data/docs/BrotliCompressionResponseBodyEnable.md +1 -1
- data/docs/BrotliCompressionResponseService.md +1 -1
- data/docs/DdosProtectionApi.md +2 -0
- data/docs/DdosProtectionEvent.md +2 -0
- data/docs/DdosProtectionEventAllOf.md +2 -0
- data/docs/DdosProtectionRequestEnableMode.md +10 -0
- data/docs/DdosProtectionResponseConfigure.md +1 -1
- data/docs/DdosProtectionResponseEnable.md +1 -1
- data/docs/DdosProtectionResponseService.md +1 -1
- data/docs/DdosProtectionRuleWithStats.md +23 -0
- data/docs/DdosProtectionRuleWithStatsAllOf.md +10 -0
- data/docs/DdosProtectionTrafficStats.md +1 -0
- data/docs/DdosProtectionTrafficStatsAllOf.md +1 -0
- data/docs/DmDomainsApi.md +220 -0
- data/docs/DomainInspectorHistoricalApi.md +1 -1
- data/docs/DomainInspectorResponseBodyEnable.md +1 -1
- data/docs/DomainInspectorResponseService.md +1 -1
- data/docs/DomainOwnershipsApi.md +2 -2
- data/docs/DomainResearchApi.md +103 -0
- data/docs/DomainResearchResponseBodyEnable.md +12 -0
- data/docs/DomainResearchResponseCustomer.md +10 -0
- data/docs/DomainResearchResponseLinks.md +10 -0
- data/docs/DomainResearchResponseLinksLinks.md +10 -0
- data/docs/DomainResearchResponseProduct.md +10 -0
- data/docs/DomainResearchResponseProductProduct.md +11 -0
- data/docs/FanoutResponseBodyEnable.md +1 -1
- data/docs/FanoutResponseService.md +1 -1
- data/docs/Healthcheck.md +1 -1
- data/docs/HealthcheckApi.md +4 -4
- data/docs/HealthcheckResponse.md +1 -1
- data/docs/IamRolesApi.md +23 -253
- data/docs/IamV1RoleListResponse.md +12 -0
- data/docs/IamV1RoleResponse.md +14 -0
- data/docs/ImageOptimizerResponseBodyEnable.md +1 -1
- data/docs/ImageOptimizerResponseService.md +1 -1
- data/docs/InlineResponse20010.md +11 -0
- data/docs/InlineResponse20011.md +10 -0
- data/docs/InlineResponse2003.md +2 -2
- data/docs/InlineResponse2004.md +2 -1
- data/docs/InlineResponse2005.md +1 -2
- data/docs/InlineResponse2006.md +1 -2
- data/docs/InlineResponse2007.md +1 -1
- data/docs/InlineResponse2008.md +1 -1
- data/docs/InlineResponse2009.md +2 -1
- data/docs/InvitationDataAttributes.md +1 -0
- data/docs/KvStoreApi.md +43 -4
- data/docs/KvStoreDetails.md +2 -0
- data/docs/KvStoreItemApi.md +2 -2
- data/docs/{KvStoreRequestCreate.md → KvStoreRequestCreateOrUpdate.md} +1 -1
- data/docs/LogExplorerInsightsResponseBodyEnable.md +1 -1
- data/docs/LogExplorerInsightsResponseService.md +1 -1
- data/docs/LoggingHttpsAdditional.md +1 -0
- data/docs/LoggingHttpsApi.md +4 -0
- data/docs/LoggingHttpsResponse.md +1 -0
- data/docs/MetricsPlatformApi.md +75 -0
- data/docs/NgwafRequestEnable.md +1 -0
- data/docs/NgwafResponseConfigure.md +1 -1
- data/docs/NgwafResponseEnable.md +1 -1
- data/docs/NgwafResponseService.md +1 -1
- data/docs/Offer.md +12 -0
- data/docs/OfferAllOf.md +12 -0
- data/docs/OriginInspectorHistoricalApi.md +1 -1
- data/docs/OriginInspectorResponseBodyEnable.md +1 -1
- data/docs/OriginInspectorResponseService.md +1 -1
- data/docs/PlatformMetadata.md +14 -0
- data/docs/PlatformMetricsResponse.md +11 -0
- data/docs/PlatformValues.md +25 -0
- data/docs/ProductApiDiscoveryApi.md +163 -0
- data/docs/ProductDdosProtectionApi.md +3 -1
- data/docs/ProductDomainResearchApi.md +115 -0
- data/docs/RealtimeEntryAggregated.md +5 -0
- data/docs/RealtimeMeasurements.md +5 -0
- data/docs/RequestBodyForCreate.md +12 -0
- data/docs/RequestBodyForUpdate.md +11 -0
- data/docs/Results.md +5 -0
- data/docs/SchemasUserResponse.md +1 -0
- data/docs/SecretStoreApi.md +2 -2
- data/docs/SecretStoreItemApi.md +2 -2
- data/docs/ServiceAuthorizationsApi.md +2 -2
- data/docs/Status.md +15 -0
- data/docs/StatusAllOf.md +15 -0
- data/docs/SuccessfulResponseAsObject.md +17 -0
- data/docs/SuccessfulResponseAsObjectAllOf.md +15 -0
- data/docs/Suggestion.md +13 -0
- data/docs/SuggestionAllOf.md +13 -0
- data/docs/User.md +1 -0
- data/docs/UserApi.md +4 -0
- data/docs/UserResponse.md +1 -0
- data/docs/WebsocketsResponseBodyEnable.md +1 -1
- data/docs/WebsocketsResponseService.md +1 -1
- data/lib/fastly/api/ddos_protection_api.rb +3 -0
- data/lib/fastly/api/dm_domains_api.rb +362 -0
- data/lib/fastly/api/domain_inspector_historical_api.rb +1 -1
- data/lib/fastly/api/domain_ownerships_api.rb +3 -3
- data/lib/fastly/api/domain_research_api.rb +163 -0
- data/lib/fastly/api/healthcheck_api.rb +20 -4
- data/lib/fastly/api/iam_roles_api.rb +43 -435
- data/lib/fastly/api/kv_store_api.rb +74 -6
- data/lib/fastly/api/kv_store_item_api.rb +3 -3
- data/lib/fastly/api/logging_https_api.rb +6 -0
- data/lib/fastly/api/metrics_platform_api.rb +134 -0
- data/lib/fastly/api/origin_inspector_historical_api.rb +1 -1
- data/lib/fastly/api/product_api_discovery_api.rb +263 -0
- data/lib/fastly/api/product_ddos_protection_api.rb +10 -3
- data/lib/fastly/api/product_domain_research_api.rb +186 -0
- data/lib/fastly/api/secret_store_api.rb +3 -3
- data/lib/fastly/api/secret_store_item_api.rb +3 -3
- data/lib/fastly/api/service_authorizations_api.rb +3 -3
- data/lib/fastly/api/user_api.rb +6 -0
- data/lib/fastly/configuration.rb +98 -38
- data/lib/fastly/models/api_discovery_response_body_get_all_services.rb +256 -0
- data/lib/fastly/models/api_discovery_response_customer.rb +216 -0
- data/lib/fastly/models/api_discovery_response_customer_customer.rb +227 -0
- data/lib/fastly/models/api_discovery_response_enable.rb +243 -0
- data/lib/fastly/models/api_discovery_response_enabled_services.rb +219 -0
- data/lib/fastly/models/api_discovery_response_links.rb +216 -0
- data/lib/fastly/models/api_discovery_response_links_get_all_services.rb +216 -0
- data/lib/fastly/models/api_discovery_response_links_get_all_services_links.rb +217 -0
- data/lib/fastly/models/api_discovery_response_links_links.rb +217 -0
- data/lib/fastly/models/api_discovery_response_product.rb +216 -0
- data/lib/fastly/models/api_discovery_response_product_product.rb +227 -0
- data/lib/fastly/models/api_discovery_response_service.rb +216 -0
- data/lib/fastly/models/{bot_management_response_service_service.rb → api_discovery_response_service_service.rb} +3 -3
- data/lib/fastly/models/bot_management_response_body_enable.rb +1 -1
- data/lib/fastly/models/bot_management_response_service.rb +1 -1
- data/lib/fastly/models/brotli_compression_response_body_enable.rb +1 -1
- data/lib/fastly/models/brotli_compression_response_service.rb +1 -1
- data/lib/fastly/models/ddos_protection_event.rb +21 -1
- data/lib/fastly/models/ddos_protection_event_all_of.rb +21 -1
- data/lib/fastly/models/ddos_protection_request_enable_mode.rb +251 -0
- data/lib/fastly/models/ddos_protection_response_configure.rb +1 -1
- data/lib/fastly/models/ddos_protection_response_enable.rb +1 -1
- data/lib/fastly/models/ddos_protection_response_service.rb +1 -1
- data/lib/fastly/models/ddos_protection_rule_with_stats.rb +365 -0
- data/lib/fastly/models/ddos_protection_rule_with_stats_all_of.rb +216 -0
- data/lib/fastly/models/ddos_protection_traffic_stats.rb +20 -4
- data/lib/fastly/models/ddos_protection_traffic_stats_all_of.rb +20 -4
- data/lib/fastly/models/domain_inspector_response_body_enable.rb +1 -1
- data/lib/fastly/models/domain_inspector_response_service.rb +1 -1
- data/lib/fastly/models/domain_research_response_body_enable.rb +243 -0
- data/lib/fastly/models/domain_research_response_customer.rb +216 -0
- data/lib/fastly/models/domain_research_response_links.rb +216 -0
- data/lib/fastly/models/domain_research_response_links_links.rb +217 -0
- data/lib/fastly/models/domain_research_response_product.rb +216 -0
- data/lib/fastly/models/domain_research_response_product_product.rb +227 -0
- data/lib/fastly/models/fanout_response_body_enable.rb +1 -1
- data/lib/fastly/models/fanout_response_service.rb +1 -1
- data/lib/fastly/models/healthcheck.rb +25 -1
- data/lib/fastly/models/healthcheck_response.rb +25 -1
- data/lib/fastly/models/iam_v1_role_list_response.rb +240 -0
- data/lib/fastly/models/{iam_role_all_of.rb → iam_v1_role_response.rb} +23 -34
- data/lib/fastly/models/image_optimizer_response_body_enable.rb +1 -1
- data/lib/fastly/models/image_optimizer_response_service.rb +1 -1
- data/lib/fastly/models/inline_response20010.rb +227 -0
- data/lib/fastly/models/inline_response20011.rb +218 -0
- data/lib/fastly/models/inline_response2003.rb +11 -1
- data/lib/fastly/models/inline_response2004.rb +20 -8
- data/lib/fastly/models/inline_response2005.rb +8 -18
- data/lib/fastly/models/inline_response2006.rb +8 -17
- data/lib/fastly/models/inline_response2007.rb +1 -1
- data/lib/fastly/models/inline_response2008.rb +1 -1
- data/lib/fastly/models/inline_response2009.rb +13 -4
- data/lib/fastly/models/invitation_data_attributes.rb +12 -1
- data/lib/fastly/models/kv_store_details.rb +24 -4
- data/lib/fastly/models/{kv_store_request_create.rb → kv_store_request_create_or_update.rb} +3 -3
- data/lib/fastly/models/log_explorer_insights_response_body_enable.rb +1 -1
- data/lib/fastly/models/log_explorer_insights_response_service.rb +1 -1
- data/lib/fastly/models/logging_https_additional.rb +16 -4
- data/lib/fastly/models/logging_https_response.rb +13 -1
- data/lib/fastly/models/ngwaf_request_enable.rb +14 -4
- data/lib/fastly/models/ngwaf_response_configure.rb +1 -1
- data/lib/fastly/models/ngwaf_response_enable.rb +1 -1
- data/lib/fastly/models/ngwaf_response_service.rb +1 -1
- data/lib/fastly/models/offer.rb +245 -0
- data/lib/fastly/models/offer_all_of.rb +237 -0
- data/lib/fastly/models/origin_inspector_response_body_enable.rb +1 -1
- data/lib/fastly/models/origin_inspector_response_service.rb +1 -1
- data/lib/fastly/models/platform_metadata.rb +258 -0
- data/lib/fastly/models/platform_metrics_response.rb +228 -0
- data/lib/fastly/models/platform_values.rb +368 -0
- data/lib/fastly/models/realtime_entry_aggregated.rb +54 -4
- data/lib/fastly/models/realtime_measurements.rb +54 -4
- data/lib/fastly/models/request_body_for_create.rb +244 -0
- data/lib/fastly/models/request_body_for_update.rb +229 -0
- data/lib/fastly/models/results.rb +51 -1
- data/lib/fastly/models/role_user.rb +2 -0
- data/lib/fastly/models/schemas_user_response.rb +13 -1
- data/lib/fastly/models/status.rb +276 -0
- data/lib/fastly/models/status_all_of.rb +268 -0
- data/lib/fastly/models/{iam_role.rb → successful_response_as_object.rb} +37 -35
- data/lib/fastly/models/successful_response_as_object_all_of.rb +268 -0
- data/lib/fastly/models/suggestion.rb +255 -0
- data/lib/fastly/models/suggestion_all_of.rb +247 -0
- data/lib/fastly/models/user.rb +13 -1
- data/lib/fastly/models/user_response.rb +13 -1
- data/lib/fastly/models/websockets_response_body_enable.rb +1 -1
- data/lib/fastly/models/websockets_response_service.rb +1 -1
- data/lib/fastly/version.rb +1 -1
- data/lib/fastly.rb +45 -4
- data/sig.json +1 -1
- metadata +92 -10
- data/docs/IamRole.md +0 -17
- data/docs/IamRoleAllOf.md +0 -15
|
@@ -168,7 +168,7 @@ module Fastly
|
|
|
168
168
|
# @option opts [Integer] :limit (default to 100)
|
|
169
169
|
# @option opts [String] :prefix
|
|
170
170
|
# @option opts [String] :consistency (default to 'strong')
|
|
171
|
-
# @return [
|
|
171
|
+
# @return [InlineResponse2008]
|
|
172
172
|
def kv_store_list_item_keys(opts = {})
|
|
173
173
|
data, _status_code, _headers = kv_store_list_item_keys_with_http_info(opts)
|
|
174
174
|
data
|
|
@@ -181,7 +181,7 @@ module Fastly
|
|
|
181
181
|
# @option opts [Integer] :limit (default to 100)
|
|
182
182
|
# @option opts [String] :prefix
|
|
183
183
|
# @option opts [String] :consistency (default to 'strong')
|
|
184
|
-
# @return [Array<(
|
|
184
|
+
# @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
|
|
185
185
|
def kv_store_list_item_keys_with_http_info(opts = {})
|
|
186
186
|
if @api_client.config.debugging
|
|
187
187
|
@api_client.config.logger.debug 'Calling API: KvStoreItemApi.kv_store_list_item_keys ...'
|
|
@@ -222,7 +222,7 @@ module Fastly
|
|
|
222
222
|
post_body = opts[:debug_body]
|
|
223
223
|
|
|
224
224
|
# return_type
|
|
225
|
-
return_type = opts[:debug_return_type] || '
|
|
225
|
+
return_type = opts[:debug_return_type] || 'InlineResponse2008'
|
|
226
226
|
|
|
227
227
|
# auth_names
|
|
228
228
|
auth_names = opts[:debug_auth_names] || ['token']
|
|
@@ -40,6 +40,7 @@ module Fastly
|
|
|
40
40
|
# @option opts [String] :header_value Value of the custom header sent with the request. (default to 'null')
|
|
41
41
|
# @option opts [String] :method HTTP method used for request. (default to 'POST')
|
|
42
42
|
# @option opts [String] :json_format Enforces valid JSON formatting for log entries.
|
|
43
|
+
# @option opts [Integer] :period How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. (default to 5)
|
|
43
44
|
# @return [LoggingHttpsResponse]
|
|
44
45
|
def create_log_https(opts = {})
|
|
45
46
|
data, _status_code, _headers = create_log_https_with_http_info(opts)
|
|
@@ -69,6 +70,7 @@ module Fastly
|
|
|
69
70
|
# @option opts [String] :header_value Value of the custom header sent with the request. (default to 'null')
|
|
70
71
|
# @option opts [String] :method HTTP method used for request. (default to 'POST')
|
|
71
72
|
# @option opts [String] :json_format Enforces valid JSON formatting for log entries.
|
|
73
|
+
# @option opts [Integer] :period How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. (default to 5)
|
|
72
74
|
# @return [Array<(LoggingHttpsResponse, Integer, Hash)>] LoggingHttpsResponse data, response status code and response headers
|
|
73
75
|
def create_log_https_with_http_info(opts = {})
|
|
74
76
|
if @api_client.config.debugging
|
|
@@ -142,6 +144,7 @@ module Fastly
|
|
|
142
144
|
form_params['header_value'] = opts[:'header_value'] if !opts[:'header_value'].nil?
|
|
143
145
|
form_params['method'] = opts[:'method'] if !opts[:'method'].nil?
|
|
144
146
|
form_params['json_format'] = opts[:'json_format'] if !opts[:'json_format'].nil?
|
|
147
|
+
form_params['period'] = opts[:'period'] if !opts[:'period'].nil?
|
|
145
148
|
|
|
146
149
|
# http body (model)
|
|
147
150
|
post_body = opts[:debug_body]
|
|
@@ -417,6 +420,7 @@ module Fastly
|
|
|
417
420
|
# @option opts [String] :header_value Value of the custom header sent with the request. (default to 'null')
|
|
418
421
|
# @option opts [String] :method HTTP method used for request. (default to 'POST')
|
|
419
422
|
# @option opts [String] :json_format Enforces valid JSON formatting for log entries.
|
|
423
|
+
# @option opts [Integer] :period How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. (default to 5)
|
|
420
424
|
# @return [LoggingHttpsResponse]
|
|
421
425
|
def update_log_https(opts = {})
|
|
422
426
|
data, _status_code, _headers = update_log_https_with_http_info(opts)
|
|
@@ -447,6 +451,7 @@ module Fastly
|
|
|
447
451
|
# @option opts [String] :header_value Value of the custom header sent with the request. (default to 'null')
|
|
448
452
|
# @option opts [String] :method HTTP method used for request. (default to 'POST')
|
|
449
453
|
# @option opts [String] :json_format Enforces valid JSON formatting for log entries.
|
|
454
|
+
# @option opts [Integer] :period How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. (default to 5)
|
|
450
455
|
# @return [Array<(LoggingHttpsResponse, Integer, Hash)>] LoggingHttpsResponse data, response status code and response headers
|
|
451
456
|
def update_log_https_with_http_info(opts = {})
|
|
452
457
|
if @api_client.config.debugging
|
|
@@ -525,6 +530,7 @@ module Fastly
|
|
|
525
530
|
form_params['header_value'] = opts[:'header_value'] if !opts[:'header_value'].nil?
|
|
526
531
|
form_params['method'] = opts[:'method'] if !opts[:'method'].nil?
|
|
527
532
|
form_params['json_format'] = opts[:'json_format'] if !opts[:'json_format'].nil?
|
|
533
|
+
form_params['period'] = opts[:'period'] if !opts[:'period'].nil?
|
|
528
534
|
|
|
529
535
|
# http body (model)
|
|
530
536
|
post_body = opts[:debug_body]
|
|
@@ -0,0 +1,134 @@
|
|
|
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 MetricsPlatformApi
|
|
15
|
+
attr_accessor :api_client
|
|
16
|
+
|
|
17
|
+
def initialize(api_client = ApiClient.default)
|
|
18
|
+
@api_client = api_client
|
|
19
|
+
end
|
|
20
|
+
# Get historical time series metrics for a single service
|
|
21
|
+
# Fetches historical metrics for a single service for a given granularity.
|
|
22
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
|
23
|
+
# @option opts [String] :granularity Duration of sample windows. (required)
|
|
24
|
+
# @option opts [String] :from A valid RFC-8339-formatted date and time indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `granularity` value.
|
|
25
|
+
# @option opts [String] :to A valid RFC-8339-formatted date and time indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `granularity` value.
|
|
26
|
+
# @option opts [String] :metric The metric(s) to retrieve. Multiple values should be comma-separated.
|
|
27
|
+
# @option opts [String] :metric_set The metric set(s) to retrieve. Multiple values should be comma-separated.
|
|
28
|
+
# @option opts [String] :group_by Field to group_by in the query. For example, `group_by=region` will return entries for grouped by timestamp and region.
|
|
29
|
+
# @option opts [String] :region Limit query to one or more specific geographic regions. Values should be comma-separated.
|
|
30
|
+
# @option opts [String] :datacenter Limit query to one or more specific POPs. Values should be comma-separated.
|
|
31
|
+
# @option opts [String] :cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty.
|
|
32
|
+
# @option opts [String] :limit Number of results per page. The maximum is 10000. (default to '1000')
|
|
33
|
+
# @return [PlatformMetricsResponse]
|
|
34
|
+
def get_platform_metrics_service_historical(opts = {})
|
|
35
|
+
data, _status_code, _headers = get_platform_metrics_service_historical_with_http_info(opts)
|
|
36
|
+
data
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Get historical time series metrics for a single service
|
|
40
|
+
# Fetches historical metrics for a single service for a given granularity.
|
|
41
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
|
42
|
+
# @option opts [String] :granularity Duration of sample windows. (required)
|
|
43
|
+
# @option opts [String] :from A valid RFC-8339-formatted date and time indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `granularity` value.
|
|
44
|
+
# @option opts [String] :to A valid RFC-8339-formatted date and time indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `granularity` value.
|
|
45
|
+
# @option opts [String] :metric The metric(s) to retrieve. Multiple values should be comma-separated.
|
|
46
|
+
# @option opts [String] :metric_set The metric set(s) to retrieve. Multiple values should be comma-separated.
|
|
47
|
+
# @option opts [String] :group_by Field to group_by in the query. For example, `group_by=region` will return entries for grouped by timestamp and region.
|
|
48
|
+
# @option opts [String] :region Limit query to one or more specific geographic regions. Values should be comma-separated.
|
|
49
|
+
# @option opts [String] :datacenter Limit query to one or more specific POPs. Values should be comma-separated.
|
|
50
|
+
# @option opts [String] :cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty.
|
|
51
|
+
# @option opts [String] :limit Number of results per page. The maximum is 10000. (default to '1000')
|
|
52
|
+
# @return [Array<(PlatformMetricsResponse, Integer, Hash)>] PlatformMetricsResponse data, response status code and response headers
|
|
53
|
+
def get_platform_metrics_service_historical_with_http_info(opts = {})
|
|
54
|
+
if @api_client.config.debugging
|
|
55
|
+
@api_client.config.logger.debug 'Calling API: MetricsPlatformApi.get_platform_metrics_service_historical ...'
|
|
56
|
+
end
|
|
57
|
+
# unbox the parameters from the hash
|
|
58
|
+
service_id = opts[:'service_id']
|
|
59
|
+
granularity = opts[:'granularity']
|
|
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 MetricsPlatformApi.get_platform_metrics_service_historical"
|
|
63
|
+
end
|
|
64
|
+
# verify the required parameter 'granularity' is set
|
|
65
|
+
if @api_client.config.client_side_validation && granularity.nil?
|
|
66
|
+
fail ArgumentError, "Missing the required parameter 'granularity' when calling MetricsPlatformApi.get_platform_metrics_service_historical"
|
|
67
|
+
end
|
|
68
|
+
# verify enum value
|
|
69
|
+
allowable_values = ["minutely", "hourly", "daily"]
|
|
70
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(granularity)
|
|
71
|
+
fail ArgumentError, "invalid value for \"granularity\", must be one of #{allowable_values}"
|
|
72
|
+
end
|
|
73
|
+
allowable_values = ["ttfb"]
|
|
74
|
+
if @api_client.config.client_side_validation && opts[:'metric_set'] && !allowable_values.include?(opts[:'metric_set'])
|
|
75
|
+
fail ArgumentError, "invalid value for \"metric_set\", must be one of #{allowable_values}"
|
|
76
|
+
end
|
|
77
|
+
allowable_values = ["datacenter", "region"]
|
|
78
|
+
if @api_client.config.client_side_validation && opts[:'group_by'] && !allowable_values.include?(opts[:'group_by'])
|
|
79
|
+
fail ArgumentError, "invalid value for \"group_by\", must be one of #{allowable_values}"
|
|
80
|
+
end
|
|
81
|
+
allowable_values = ["africa_std", "anzac", "asia", "asia_india", "asia_southkorea", "europe", "mexico", "southamerica_std", "usa"]
|
|
82
|
+
if @api_client.config.client_side_validation && opts[:'region'] && !allowable_values.include?(opts[:'region'])
|
|
83
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
|
84
|
+
end
|
|
85
|
+
# resource path
|
|
86
|
+
local_var_path = '/metrics/platform/services/{service_id}/{granularity}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'granularity' + '}', CGI.escape(granularity.to_s))
|
|
87
|
+
|
|
88
|
+
# query parameters
|
|
89
|
+
query_params = opts[:query_params] || {}
|
|
90
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
|
91
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
|
92
|
+
query_params[:'metric'] = opts[:'metric'] if !opts[:'metric'].nil?
|
|
93
|
+
query_params[:'metric_set'] = opts[:'metric_set'] if !opts[:'metric_set'].nil?
|
|
94
|
+
query_params[:'group_by'] = opts[:'group_by'] if !opts[:'group_by'].nil?
|
|
95
|
+
query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil?
|
|
96
|
+
query_params[:'datacenter'] = opts[:'datacenter'] if !opts[:'datacenter'].nil?
|
|
97
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
98
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
99
|
+
|
|
100
|
+
# header parameters
|
|
101
|
+
header_params = opts[:header_params] || {}
|
|
102
|
+
# HTTP header 'Accept' (if needed)
|
|
103
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
104
|
+
|
|
105
|
+
# form parameters
|
|
106
|
+
form_params = opts[:form_params] || {}
|
|
107
|
+
|
|
108
|
+
# http body (model)
|
|
109
|
+
post_body = opts[:debug_body]
|
|
110
|
+
|
|
111
|
+
# return_type
|
|
112
|
+
return_type = opts[:debug_return_type] || 'PlatformMetricsResponse'
|
|
113
|
+
|
|
114
|
+
# auth_names
|
|
115
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
|
116
|
+
|
|
117
|
+
new_options = opts.merge(
|
|
118
|
+
:operation => :"MetricsPlatformApi.get_platform_metrics_service_historical",
|
|
119
|
+
:header_params => header_params,
|
|
120
|
+
:query_params => query_params,
|
|
121
|
+
:form_params => form_params,
|
|
122
|
+
:body => post_body,
|
|
123
|
+
:auth_names => auth_names,
|
|
124
|
+
:return_type => return_type
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
128
|
+
if @api_client.config.debugging
|
|
129
|
+
@api_client.config.logger.debug "API called: MetricsPlatformApi#get_platform_metrics_service_historical\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
130
|
+
end
|
|
131
|
+
return data, status_code, headers
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
end
|
|
@@ -68,7 +68,7 @@ module Fastly
|
|
|
68
68
|
if @api_client.config.client_side_validation && opts[:'group_by'] && !allowable_values.include?(opts[:'group_by'])
|
|
69
69
|
fail ArgumentError, "invalid value for \"group_by\", must be one of #{allowable_values}"
|
|
70
70
|
end
|
|
71
|
-
allowable_values = ["
|
|
71
|
+
allowable_values = ["africa_std", "anzac", "asia", "asia_india", "asia_southkorea", "europe", "mexico", "southamerica_std", "usa"]
|
|
72
72
|
if @api_client.config.client_side_validation && opts[:'region'] && !allowable_values.include?(opts[:'region'])
|
|
73
73
|
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
|
74
74
|
end
|
|
@@ -0,0 +1,263 @@
|
|
|
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 ProductApiDiscoveryApi
|
|
15
|
+
attr_accessor :api_client
|
|
16
|
+
|
|
17
|
+
def initialize(api_client = ApiClient.default)
|
|
18
|
+
@api_client = api_client
|
|
19
|
+
end
|
|
20
|
+
# Disable product
|
|
21
|
+
# Disable the API Discovery product on a service.
|
|
22
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
|
23
|
+
# @return [nil]
|
|
24
|
+
def disable_product_api_discovery(opts = {})
|
|
25
|
+
disable_product_api_discovery_with_http_info(opts)
|
|
26
|
+
nil
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Disable product
|
|
30
|
+
# Disable the API Discovery product on a service.
|
|
31
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
|
32
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
33
|
+
def disable_product_api_discovery_with_http_info(opts = {})
|
|
34
|
+
if @api_client.config.debugging
|
|
35
|
+
@api_client.config.logger.debug 'Calling API: ProductApiDiscoveryApi.disable_product_api_discovery ...'
|
|
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 ProductApiDiscoveryApi.disable_product_api_discovery"
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/enabled-products/v1/api_discovery/services/{service_id}'.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
|
+
|
|
52
|
+
# form parameters
|
|
53
|
+
form_params = opts[:form_params] || {}
|
|
54
|
+
|
|
55
|
+
# http body (model)
|
|
56
|
+
post_body = opts[:debug_body]
|
|
57
|
+
|
|
58
|
+
# return_type
|
|
59
|
+
return_type = opts[:debug_return_type]
|
|
60
|
+
|
|
61
|
+
# auth_names
|
|
62
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
|
63
|
+
|
|
64
|
+
new_options = opts.merge(
|
|
65
|
+
:operation => :"ProductApiDiscoveryApi.disable_product_api_discovery",
|
|
66
|
+
:header_params => header_params,
|
|
67
|
+
:query_params => query_params,
|
|
68
|
+
:form_params => form_params,
|
|
69
|
+
:body => post_body,
|
|
70
|
+
:auth_names => auth_names,
|
|
71
|
+
:return_type => return_type
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
75
|
+
if @api_client.config.debugging
|
|
76
|
+
@api_client.config.logger.debug "API called: ProductApiDiscoveryApi#disable_product_api_discovery\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
77
|
+
end
|
|
78
|
+
return data, status_code, headers
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Enable product
|
|
82
|
+
# Enable the API Discovery product on a service.
|
|
83
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
|
84
|
+
# @return [ApiDiscoveryResponseEnable]
|
|
85
|
+
def enable_product_api_discovery(opts = {})
|
|
86
|
+
data, _status_code, _headers = enable_product_api_discovery_with_http_info(opts)
|
|
87
|
+
data
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Enable product
|
|
91
|
+
# Enable the API Discovery product on a service.
|
|
92
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
|
93
|
+
# @return [Array<(ApiDiscoveryResponseEnable, Integer, Hash)>] ApiDiscoveryResponseEnable data, response status code and response headers
|
|
94
|
+
def enable_product_api_discovery_with_http_info(opts = {})
|
|
95
|
+
if @api_client.config.debugging
|
|
96
|
+
@api_client.config.logger.debug 'Calling API: ProductApiDiscoveryApi.enable_product_api_discovery ...'
|
|
97
|
+
end
|
|
98
|
+
# unbox the parameters from the hash
|
|
99
|
+
service_id = opts[:'service_id']
|
|
100
|
+
# verify the required parameter 'service_id' is set
|
|
101
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
|
102
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling ProductApiDiscoveryApi.enable_product_api_discovery"
|
|
103
|
+
end
|
|
104
|
+
# resource path
|
|
105
|
+
local_var_path = '/enabled-products/v1/api_discovery/services/{service_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
|
|
106
|
+
|
|
107
|
+
# query parameters
|
|
108
|
+
query_params = opts[:query_params] || {}
|
|
109
|
+
|
|
110
|
+
# header parameters
|
|
111
|
+
header_params = opts[:header_params] || {}
|
|
112
|
+
# HTTP header 'Accept' (if needed)
|
|
113
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
114
|
+
|
|
115
|
+
# form parameters
|
|
116
|
+
form_params = opts[:form_params] || {}
|
|
117
|
+
|
|
118
|
+
# http body (model)
|
|
119
|
+
post_body = opts[:debug_body]
|
|
120
|
+
|
|
121
|
+
# return_type
|
|
122
|
+
return_type = opts[:debug_return_type] || 'ApiDiscoveryResponseEnable'
|
|
123
|
+
|
|
124
|
+
# auth_names
|
|
125
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
|
126
|
+
|
|
127
|
+
new_options = opts.merge(
|
|
128
|
+
:operation => :"ProductApiDiscoveryApi.enable_product_api_discovery",
|
|
129
|
+
:header_params => header_params,
|
|
130
|
+
:query_params => query_params,
|
|
131
|
+
:form_params => form_params,
|
|
132
|
+
:body => post_body,
|
|
133
|
+
:auth_names => auth_names,
|
|
134
|
+
:return_type => return_type
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
138
|
+
if @api_client.config.debugging
|
|
139
|
+
@api_client.config.logger.debug "API called: ProductApiDiscoveryApi#enable_product_api_discovery\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
140
|
+
end
|
|
141
|
+
return data, status_code, headers
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Get product enablement status
|
|
145
|
+
# Get the enablement status of the API Discovery product on a service.
|
|
146
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
|
147
|
+
# @return [ApiDiscoveryResponseEnable]
|
|
148
|
+
def get_product_api_discovery(opts = {})
|
|
149
|
+
data, _status_code, _headers = get_product_api_discovery_with_http_info(opts)
|
|
150
|
+
data
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Get product enablement status
|
|
154
|
+
# Get the enablement status of the API Discovery product on a service.
|
|
155
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
|
156
|
+
# @return [Array<(ApiDiscoveryResponseEnable, Integer, Hash)>] ApiDiscoveryResponseEnable data, response status code and response headers
|
|
157
|
+
def get_product_api_discovery_with_http_info(opts = {})
|
|
158
|
+
if @api_client.config.debugging
|
|
159
|
+
@api_client.config.logger.debug 'Calling API: ProductApiDiscoveryApi.get_product_api_discovery ...'
|
|
160
|
+
end
|
|
161
|
+
# unbox the parameters from the hash
|
|
162
|
+
service_id = opts[:'service_id']
|
|
163
|
+
# verify the required parameter 'service_id' is set
|
|
164
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
|
165
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling ProductApiDiscoveryApi.get_product_api_discovery"
|
|
166
|
+
end
|
|
167
|
+
# resource path
|
|
168
|
+
local_var_path = '/enabled-products/v1/api_discovery/services/{service_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.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] || 'ApiDiscoveryResponseEnable'
|
|
186
|
+
|
|
187
|
+
# auth_names
|
|
188
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
|
189
|
+
|
|
190
|
+
new_options = opts.merge(
|
|
191
|
+
:operation => :"ProductApiDiscoveryApi.get_product_api_discovery",
|
|
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(:GET, local_var_path, new_options)
|
|
201
|
+
if @api_client.config.debugging
|
|
202
|
+
@api_client.config.logger.debug "API called: ProductApiDiscoveryApi#get_product_api_discovery\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
203
|
+
end
|
|
204
|
+
return data, status_code, headers
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Get services with product enabled
|
|
208
|
+
# Get all the services for a customer that has the API Discovery product enabled.
|
|
209
|
+
# @return [ApiDiscoveryResponseBodyGetAllServices]
|
|
210
|
+
def get_services_product_api_discovery(opts = {})
|
|
211
|
+
data, _status_code, _headers = get_services_product_api_discovery_with_http_info(opts)
|
|
212
|
+
data
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Get services with product enabled
|
|
216
|
+
# Get all the services for a customer that has the API Discovery product enabled.
|
|
217
|
+
# @return [Array<(ApiDiscoveryResponseBodyGetAllServices, Integer, Hash)>] ApiDiscoveryResponseBodyGetAllServices data, response status code and response headers
|
|
218
|
+
def get_services_product_api_discovery_with_http_info(opts = {})
|
|
219
|
+
if @api_client.config.debugging
|
|
220
|
+
@api_client.config.logger.debug 'Calling API: ProductApiDiscoveryApi.get_services_product_api_discovery ...'
|
|
221
|
+
end
|
|
222
|
+
# unbox the parameters from the hash
|
|
223
|
+
# resource path
|
|
224
|
+
local_var_path = '/enabled-products/v1/api_discovery/services'
|
|
225
|
+
|
|
226
|
+
# query parameters
|
|
227
|
+
query_params = opts[:query_params] || {}
|
|
228
|
+
|
|
229
|
+
# header parameters
|
|
230
|
+
header_params = opts[:header_params] || {}
|
|
231
|
+
# HTTP header 'Accept' (if needed)
|
|
232
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
233
|
+
|
|
234
|
+
# form parameters
|
|
235
|
+
form_params = opts[:form_params] || {}
|
|
236
|
+
|
|
237
|
+
# http body (model)
|
|
238
|
+
post_body = opts[:debug_body]
|
|
239
|
+
|
|
240
|
+
# return_type
|
|
241
|
+
return_type = opts[:debug_return_type] || 'ApiDiscoveryResponseBodyGetAllServices'
|
|
242
|
+
|
|
243
|
+
# auth_names
|
|
244
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
|
245
|
+
|
|
246
|
+
new_options = opts.merge(
|
|
247
|
+
:operation => :"ProductApiDiscoveryApi.get_services_product_api_discovery",
|
|
248
|
+
:header_params => header_params,
|
|
249
|
+
:query_params => query_params,
|
|
250
|
+
:form_params => form_params,
|
|
251
|
+
:body => post_body,
|
|
252
|
+
:auth_names => auth_names,
|
|
253
|
+
:return_type => return_type
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
257
|
+
if @api_client.config.debugging
|
|
258
|
+
@api_client.config.logger.debug "API called: ProductApiDiscoveryApi#get_services_product_api_discovery\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
259
|
+
end
|
|
260
|
+
return data, status_code, headers
|
|
261
|
+
end
|
|
262
|
+
end
|
|
263
|
+
end
|
|
@@ -79,8 +79,9 @@ module Fastly
|
|
|
79
79
|
end
|
|
80
80
|
|
|
81
81
|
# Enable product
|
|
82
|
-
# Enable the DDoS Protection product on a service in 'log' mode.
|
|
82
|
+
# Enable the DDoS Protection product on a service in default 'log' mode unless otherwise specified in the request body.
|
|
83
83
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
|
84
|
+
# @option opts [DdosProtectionRequestEnableMode] :ddos_protection_request_enable_mode
|
|
84
85
|
# @return [DdosProtectionResponseEnable]
|
|
85
86
|
def enable_product_ddos_protection(opts = {})
|
|
86
87
|
data, _status_code, _headers = enable_product_ddos_protection_with_http_info(opts)
|
|
@@ -88,8 +89,9 @@ module Fastly
|
|
|
88
89
|
end
|
|
89
90
|
|
|
90
91
|
# Enable product
|
|
91
|
-
# Enable the DDoS Protection product on a service in 'log' mode.
|
|
92
|
+
# Enable the DDoS Protection product on a service in default 'log' mode unless otherwise specified in the request body.
|
|
92
93
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
|
94
|
+
# @option opts [DdosProtectionRequestEnableMode] :ddos_protection_request_enable_mode
|
|
93
95
|
# @return [Array<(DdosProtectionResponseEnable, Integer, Hash)>] DdosProtectionResponseEnable data, response status code and response headers
|
|
94
96
|
def enable_product_ddos_protection_with_http_info(opts = {})
|
|
95
97
|
if @api_client.config.debugging
|
|
@@ -111,12 +113,17 @@ module Fastly
|
|
|
111
113
|
header_params = opts[:header_params] || {}
|
|
112
114
|
# HTTP header 'Accept' (if needed)
|
|
113
115
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
116
|
+
# HTTP header 'Content-Type'
|
|
117
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
118
|
+
if !content_type.nil?
|
|
119
|
+
header_params['Content-Type'] = content_type
|
|
120
|
+
end
|
|
114
121
|
|
|
115
122
|
# form parameters
|
|
116
123
|
form_params = opts[:form_params] || {}
|
|
117
124
|
|
|
118
125
|
# http body (model)
|
|
119
|
-
post_body = opts[:debug_body]
|
|
126
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'ddos_protection_request_enable_mode'])
|
|
120
127
|
|
|
121
128
|
# return_type
|
|
122
129
|
return_type = opts[:debug_return_type] || 'DdosProtectionResponseEnable'
|