fastly 5.3.1 → 6.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +63 -0
- data/Gemfile.lock +1 -1
- data/README.md +85 -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/{BillingEstimateResponseAllOfLines.md → BillingEstimateLines.md} +2 -2
- data/docs/{BillingEstimateResponseAllOfLine.md → BillingEstimateLinesLineItems.md} +1 -1
- data/docs/BillingEstimateResponse.md +1 -1
- data/docs/{BillingResponseAllOf.md → BillingResponseItemItemsData.md} +1 -1
- data/docs/BillingResponseLineItem.md +1 -1
- data/docs/BillingStatus.md +1 -1
- 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/{BillingEstimateResponseAllOf.md → InlineResponse2007.md} +2 -2
- 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/{BillingResponseLineItemAllOf.md → LineItemData.md} +2 -2
- data/docs/LineItemDataReadOnlyInvoiceId.md +9 -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/SchemasUserResponseReadOnly.md +12 -0
- 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/SnippetApi.md +42 -0
- 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/TokensApi.md +70 -0
- data/docs/{UserResponseAllOf.md → UserResponseReadOnly.md} +1 -1
- data/docs/Values.md +71 -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 +82 -0
- data/lib/fastly/api/sudo_api.rb +83 -0
- data/lib/fastly/api/tokens_api.rb +122 -0
- 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/{billing_response_all_of.rb → billing_estimate_lines.rb} +4 -4
- data/lib/fastly/models/{billing_estimate_response_all_of_line.rb → billing_estimate_lines_line_items.rb} +3 -3
- data/lib/fastly/models/billing_estimate_response.rb +9 -9
- data/lib/fastly/models/billing_response.rb +1 -1
- data/lib/fastly/models/{billing_estimate_response_all_of.rb → billing_response_item_items_data.rb} +11 -11
- data/lib/fastly/models/billing_response_line_item.rb +2 -2
- data/lib/fastly/models/billing_status.rb +2 -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/{billing_estimate_response_all_of_lines.rb → legacy_waf_tag.rb} +11 -10
- data/lib/fastly/models/legacy_waf_update_status.rb +267 -0
- data/lib/fastly/models/{billing_response_line_item_all_of.rb → line_item_data.rb} +4 -4
- data/lib/fastly/models/line_item_data_read_only_invoice_id.rb +207 -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_user_response.rb +5 -2
- data/lib/fastly/models/schemas_user_response_read_only.rb +235 -0
- 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/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/user.rb +3 -0
- data/lib/fastly/models/user_response.rb +4 -1
- data/lib/fastly/models/{user_response_all_of.rb → user_response_read_only.rb} +3 -3
- data/lib/fastly/models/values.rb +828 -0
- data/lib/fastly/version.rb +1 -1
- data/lib/fastly.rb +79 -8
- data/sig.json +1 -1
- metadata +160 -18
@@ -0,0 +1,83 @@
|
|
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 SudoApi
|
15
|
+
attr_accessor :api_client
|
16
|
+
|
17
|
+
def initialize(api_client = ApiClient.default)
|
18
|
+
@api_client = api_client
|
19
|
+
end
|
20
|
+
# Request Sudo access
|
21
|
+
# Re-authenticate to allow the provided user to obtain sudo access.
|
22
|
+
# @option opts [SudoRequest] :sudo_request
|
23
|
+
# @return [SudoResponse]
|
24
|
+
def request_sudo_access(opts = {})
|
25
|
+
data, _status_code, _headers = request_sudo_access_with_http_info(opts)
|
26
|
+
data
|
27
|
+
end
|
28
|
+
|
29
|
+
# Request Sudo access
|
30
|
+
# Re-authenticate to allow the provided user to obtain sudo access.
|
31
|
+
# @option opts [SudoRequest] :sudo_request
|
32
|
+
# @return [Array<(SudoResponse, Integer, Hash)>] SudoResponse data, response status code and response headers
|
33
|
+
def request_sudo_access_with_http_info(opts = {})
|
34
|
+
if @api_client.config.debugging
|
35
|
+
@api_client.config.logger.debug 'Calling API: SudoApi.request_sudo_access ...'
|
36
|
+
end
|
37
|
+
# unbox the parameters from the hash
|
38
|
+
# resource path
|
39
|
+
local_var_path = '/sudo'
|
40
|
+
|
41
|
+
# query parameters
|
42
|
+
query_params = opts[:query_params] || {}
|
43
|
+
|
44
|
+
# header parameters
|
45
|
+
header_params = opts[:header_params] || {}
|
46
|
+
# HTTP header 'Accept' (if needed)
|
47
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json', 'application/problem+json'])
|
48
|
+
# HTTP header 'Content-Type'
|
49
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
50
|
+
if !content_type.nil?
|
51
|
+
header_params['Content-Type'] = content_type
|
52
|
+
end
|
53
|
+
|
54
|
+
# form parameters
|
55
|
+
form_params = opts[:form_params] || {}
|
56
|
+
|
57
|
+
# http body (model)
|
58
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'sudo_request'])
|
59
|
+
|
60
|
+
# return_type
|
61
|
+
return_type = opts[:debug_return_type] || 'SudoResponse'
|
62
|
+
|
63
|
+
# auth_names
|
64
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
65
|
+
|
66
|
+
new_options = opts.merge(
|
67
|
+
:operation => :"SudoApi.request_sudo_access",
|
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(:POST, local_var_path, new_options)
|
77
|
+
if @api_client.config.debugging
|
78
|
+
@api_client.config.logger.debug "API called: SudoApi#request_sudo_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
79
|
+
end
|
80
|
+
return data, status_code, headers
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -17,6 +17,128 @@ module Fastly
|
|
17
17
|
def initialize(api_client = ApiClient.default)
|
18
18
|
@api_client = api_client
|
19
19
|
end
|
20
|
+
# Revoke multiple tokens
|
21
|
+
# Revoke Tokens in bulk format. Users may only revoke their own tokens. Superusers may revoke tokens of others.
|
22
|
+
# @option opts [Hash<String, Object>] :request_body
|
23
|
+
# @return [nil]
|
24
|
+
def bulk_revoke_tokens(opts = {})
|
25
|
+
bulk_revoke_tokens_with_http_info(opts)
|
26
|
+
nil
|
27
|
+
end
|
28
|
+
|
29
|
+
# Revoke multiple tokens
|
30
|
+
# Revoke Tokens in bulk format. Users may only revoke their own tokens. Superusers may revoke tokens of others.
|
31
|
+
# @option opts [Hash<String, Object>] :request_body
|
32
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
33
|
+
def bulk_revoke_tokens_with_http_info(opts = {})
|
34
|
+
if @api_client.config.debugging
|
35
|
+
@api_client.config.logger.debug 'Calling API: TokensApi.bulk_revoke_tokens ...'
|
36
|
+
end
|
37
|
+
# unbox the parameters from the hash
|
38
|
+
# resource path
|
39
|
+
local_var_path = '/tokens'
|
40
|
+
|
41
|
+
# query parameters
|
42
|
+
query_params = opts[:query_params] || {}
|
43
|
+
|
44
|
+
# header parameters
|
45
|
+
header_params = opts[:header_params] || {}
|
46
|
+
# HTTP header 'Content-Type'
|
47
|
+
content_type = @api_client.select_header_content_type(['application/vnd.api+json; ext=bulk'])
|
48
|
+
if !content_type.nil?
|
49
|
+
header_params['Content-Type'] = content_type
|
50
|
+
end
|
51
|
+
|
52
|
+
# form parameters
|
53
|
+
form_params = opts[:form_params] || {}
|
54
|
+
|
55
|
+
# http body (model)
|
56
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_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 => :"TokensApi.bulk_revoke_tokens",
|
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: TokensApi#bulk_revoke_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
77
|
+
end
|
78
|
+
return data, status_code, headers
|
79
|
+
end
|
80
|
+
|
81
|
+
# Create a token
|
82
|
+
# Create an API token. If two-factor authentication is enabled for your account, review [the instructions](/reference/api/auth-tokens/user/) for including a one-time password in the request.
|
83
|
+
# @return [TokenCreatedResponse]
|
84
|
+
def create_token(opts = {})
|
85
|
+
data, _status_code, _headers = create_token_with_http_info(opts)
|
86
|
+
data
|
87
|
+
end
|
88
|
+
|
89
|
+
# Create a token
|
90
|
+
# Create an API token. If two-factor authentication is enabled for your account, review [the instructions](/reference/api/auth-tokens/user/) for including a one-time password in the request.
|
91
|
+
# @return [Array<(TokenCreatedResponse, Integer, Hash)>] TokenCreatedResponse data, response status code and response headers
|
92
|
+
def create_token_with_http_info(opts = {})
|
93
|
+
if @api_client.config.debugging
|
94
|
+
@api_client.config.logger.debug 'Calling API: TokensApi.create_token ...'
|
95
|
+
end
|
96
|
+
# unbox the parameters from the hash
|
97
|
+
# resource path
|
98
|
+
local_var_path = '/tokens'
|
99
|
+
|
100
|
+
# query parameters
|
101
|
+
query_params = opts[:query_params] || {}
|
102
|
+
|
103
|
+
# header parameters
|
104
|
+
header_params = opts[:header_params] || {}
|
105
|
+
# HTTP header 'Accept' (if needed)
|
106
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
107
|
+
# HTTP header 'Content-Type'
|
108
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
109
|
+
if !content_type.nil?
|
110
|
+
header_params['Content-Type'] = content_type
|
111
|
+
end
|
112
|
+
|
113
|
+
# form parameters
|
114
|
+
form_params = opts[:form_params] || {}
|
115
|
+
|
116
|
+
# http body (model)
|
117
|
+
post_body = opts[:debug_body]
|
118
|
+
|
119
|
+
# return_type
|
120
|
+
return_type = opts[:debug_return_type] || 'TokenCreatedResponse'
|
121
|
+
|
122
|
+
# auth_names
|
123
|
+
auth_names = opts[:debug_auth_names] || ['token', 'username_and_password']
|
124
|
+
|
125
|
+
new_options = opts.merge(
|
126
|
+
:operation => :"TokensApi.create_token",
|
127
|
+
:header_params => header_params,
|
128
|
+
:query_params => query_params,
|
129
|
+
:form_params => form_params,
|
130
|
+
:body => post_body,
|
131
|
+
:auth_names => auth_names,
|
132
|
+
:return_type => return_type
|
133
|
+
)
|
134
|
+
|
135
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
136
|
+
if @api_client.config.debugging
|
137
|
+
@api_client.config.logger.debug "API called: TokensApi#create_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
138
|
+
end
|
139
|
+
return data, status_code, headers
|
140
|
+
end
|
141
|
+
|
20
142
|
# Get a token
|
21
143
|
# Get a single token by its id.
|
22
144
|
# @option opts [String] :token_id Alphanumeric string identifying a token. (required)
|
@@ -17,6 +17,81 @@ module Fastly
|
|
17
17
|
def initialize(api_client = ApiClient.default)
|
18
18
|
@api_client = api_client
|
19
19
|
end
|
20
|
+
# Delete multiple active rules from a WAF
|
21
|
+
# Delete many active rules on a particular firewall version using the active rule ID. Limited to 500 rules per request.
|
22
|
+
# @option opts [String] :firewall_id Alphanumeric string identifying a WAF Firewall. (required)
|
23
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
24
|
+
# @option opts [Hash<String, Object>] :request_body
|
25
|
+
# @return [nil]
|
26
|
+
def bulk_delete_waf_active_rules(opts = {})
|
27
|
+
bulk_delete_waf_active_rules_with_http_info(opts)
|
28
|
+
nil
|
29
|
+
end
|
30
|
+
|
31
|
+
# Delete multiple active rules from a WAF
|
32
|
+
# Delete many active rules on a particular firewall version using the active rule ID. Limited to 500 rules per request.
|
33
|
+
# @option opts [String] :firewall_id Alphanumeric string identifying a WAF Firewall. (required)
|
34
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
35
|
+
# @option opts [Hash<String, Object>] :request_body
|
36
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
37
|
+
def bulk_delete_waf_active_rules_with_http_info(opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: WafActiveRulesApi.bulk_delete_waf_active_rules ...'
|
40
|
+
end
|
41
|
+
# unbox the parameters from the hash
|
42
|
+
firewall_id = opts[:'firewall_id']
|
43
|
+
version_id = opts[:'version_id']
|
44
|
+
# verify the required parameter 'firewall_id' is set
|
45
|
+
if @api_client.config.client_side_validation && firewall_id.nil?
|
46
|
+
fail ArgumentError, "Missing the required parameter 'firewall_id' when calling WafActiveRulesApi.bulk_delete_waf_active_rules"
|
47
|
+
end
|
48
|
+
# verify the required parameter 'version_id' is set
|
49
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
50
|
+
fail ArgumentError, "Missing the required parameter 'version_id' when calling WafActiveRulesApi.bulk_delete_waf_active_rules"
|
51
|
+
end
|
52
|
+
# resource path
|
53
|
+
local_var_path = '/waf/firewalls/{firewall_id}/versions/{version_id}/active-rules'.sub('{' + 'firewall_id' + '}', CGI.escape(firewall_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
|
54
|
+
|
55
|
+
# query parameters
|
56
|
+
query_params = opts[:query_params] || {}
|
57
|
+
|
58
|
+
# header parameters
|
59
|
+
header_params = opts[:header_params] || {}
|
60
|
+
# HTTP header 'Content-Type'
|
61
|
+
content_type = @api_client.select_header_content_type(['application/vnd.api+json; ext=bulk'])
|
62
|
+
if !content_type.nil?
|
63
|
+
header_params['Content-Type'] = content_type
|
64
|
+
end
|
65
|
+
|
66
|
+
# form parameters
|
67
|
+
form_params = opts[:form_params] || {}
|
68
|
+
|
69
|
+
# http body (model)
|
70
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body'])
|
71
|
+
|
72
|
+
# return_type
|
73
|
+
return_type = opts[:debug_return_type]
|
74
|
+
|
75
|
+
# auth_names
|
76
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
77
|
+
|
78
|
+
new_options = opts.merge(
|
79
|
+
:operation => :"WafActiveRulesApi.bulk_delete_waf_active_rules",
|
80
|
+
:header_params => header_params,
|
81
|
+
:query_params => query_params,
|
82
|
+
:form_params => form_params,
|
83
|
+
:body => post_body,
|
84
|
+
:auth_names => auth_names,
|
85
|
+
:return_type => return_type
|
86
|
+
)
|
87
|
+
|
88
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
89
|
+
if @api_client.config.debugging
|
90
|
+
@api_client.config.logger.debug "API called: WafActiveRulesApi#bulk_delete_waf_active_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
91
|
+
end
|
92
|
+
return data, status_code, headers
|
93
|
+
end
|
94
|
+
|
20
95
|
# Update multiple active rules
|
21
96
|
# Bulk update all active rules on a [firewall version](https://developer.fastly.com/reference/api/waf/firewall-version/). This endpoint will not add new active rules, only update existing active rules.
|
22
97
|
# @option opts [String] :firewall_id Alphanumeric string identifying a WAF Firewall. (required)
|