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
@@ -22,7 +22,7 @@ module Fastly
|
|
22
22
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
23
23
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
24
24
|
# @option opts [String] :name The name for the snippet.
|
25
|
-
# @option opts [
|
25
|
+
# @option opts [String] :dynamic Sets the snippet version.
|
26
26
|
# @option opts [String] :type The location in generated VCL where the snippet should be placed.
|
27
27
|
# @option opts [String] :content The VCL code that specifies exactly what the snippet does.
|
28
28
|
# @option opts [String] :priority Priority determines execution order. Lower numbers execute first. (default to '100')
|
@@ -37,7 +37,7 @@ module Fastly
|
|
37
37
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
38
38
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
39
39
|
# @option opts [String] :name The name for the snippet.
|
40
|
-
# @option opts [
|
40
|
+
# @option opts [String] :dynamic Sets the snippet version.
|
41
41
|
# @option opts [String] :type The location in generated VCL where the snippet should be placed.
|
42
42
|
# @option opts [String] :content The VCL code that specifies exactly what the snippet does.
|
43
43
|
# @option opts [String] :priority Priority determines execution order. Lower numbers execute first. (default to '100')
|
@@ -57,7 +57,7 @@ module Fastly
|
|
57
57
|
if @api_client.config.client_side_validation && version_id.nil?
|
58
58
|
fail ArgumentError, "Missing the required parameter 'version_id' when calling SnippetApi.create_snippet"
|
59
59
|
end
|
60
|
-
allowable_values = [0, 1]
|
60
|
+
allowable_values = ["0", "1"]
|
61
61
|
if @api_client.config.client_side_validation && opts[:'dynamic'] && !allowable_values.include?(opts[:'dynamic'])
|
62
62
|
fail ArgumentError, "invalid value for \"dynamic\", must be one of #{allowable_values}"
|
63
63
|
end
|
@@ -409,12 +409,94 @@ module Fastly
|
|
409
409
|
return data, status_code, headers
|
410
410
|
end
|
411
411
|
|
412
|
+
# Update a versioned snippet
|
413
|
+
# Update a specific snippet for a particular service and version.
|
414
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
415
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
416
|
+
# @option opts [String] :snippet_name The name for the snippet. (required)
|
417
|
+
# @return [SnippetResponse]
|
418
|
+
def update_snippet(opts = {})
|
419
|
+
data, _status_code, _headers = update_snippet_with_http_info(opts)
|
420
|
+
data
|
421
|
+
end
|
422
|
+
|
423
|
+
# Update a versioned snippet
|
424
|
+
# Update a specific snippet for a particular service and version.
|
425
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
426
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
427
|
+
# @option opts [String] :snippet_name The name for the snippet. (required)
|
428
|
+
# @return [Array<(SnippetResponse, Integer, Hash)>] SnippetResponse data, response status code and response headers
|
429
|
+
def update_snippet_with_http_info(opts = {})
|
430
|
+
if @api_client.config.debugging
|
431
|
+
@api_client.config.logger.debug 'Calling API: SnippetApi.update_snippet ...'
|
432
|
+
end
|
433
|
+
# unbox the parameters from the hash
|
434
|
+
service_id = opts[:'service_id']
|
435
|
+
version_id = opts[:'version_id']
|
436
|
+
snippet_name = opts[:'snippet_name']
|
437
|
+
# verify the required parameter 'service_id' is set
|
438
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
439
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling SnippetApi.update_snippet"
|
440
|
+
end
|
441
|
+
# verify the required parameter 'version_id' is set
|
442
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
443
|
+
fail ArgumentError, "Missing the required parameter 'version_id' when calling SnippetApi.update_snippet"
|
444
|
+
end
|
445
|
+
# verify the required parameter 'snippet_name' is set
|
446
|
+
if @api_client.config.client_side_validation && snippet_name.nil?
|
447
|
+
fail ArgumentError, "Missing the required parameter 'snippet_name' when calling SnippetApi.update_snippet"
|
448
|
+
end
|
449
|
+
# resource path
|
450
|
+
local_var_path = '/service/{service_id}/version/{version_id}/snippet/{snippet_name}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'snippet_name' + '}', CGI.escape(snippet_name.to_s))
|
451
|
+
|
452
|
+
# query parameters
|
453
|
+
query_params = opts[:query_params] || {}
|
454
|
+
|
455
|
+
# header parameters
|
456
|
+
header_params = opts[:header_params] || {}
|
457
|
+
# HTTP header 'Accept' (if needed)
|
458
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
459
|
+
# HTTP header 'Content-Type'
|
460
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
461
|
+
if !content_type.nil?
|
462
|
+
header_params['Content-Type'] = content_type
|
463
|
+
end
|
464
|
+
|
465
|
+
# form parameters
|
466
|
+
form_params = opts[:form_params] || {}
|
467
|
+
|
468
|
+
# http body (model)
|
469
|
+
post_body = opts[:debug_body]
|
470
|
+
|
471
|
+
# return_type
|
472
|
+
return_type = opts[:debug_return_type] || 'SnippetResponse'
|
473
|
+
|
474
|
+
# auth_names
|
475
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
476
|
+
|
477
|
+
new_options = opts.merge(
|
478
|
+
:operation => :"SnippetApi.update_snippet",
|
479
|
+
:header_params => header_params,
|
480
|
+
:query_params => query_params,
|
481
|
+
:form_params => form_params,
|
482
|
+
:body => post_body,
|
483
|
+
:auth_names => auth_names,
|
484
|
+
:return_type => return_type
|
485
|
+
)
|
486
|
+
|
487
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
488
|
+
if @api_client.config.debugging
|
489
|
+
@api_client.config.logger.debug "API called: SnippetApi#update_snippet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
490
|
+
end
|
491
|
+
return data, status_code, headers
|
492
|
+
end
|
493
|
+
|
412
494
|
# Update a dynamic snippet
|
413
495
|
# Update a dynamic snippet for a particular service.
|
414
496
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
415
497
|
# @option opts [String] :snippet_id Alphanumeric string identifying a VCL Snippet. (required)
|
416
498
|
# @option opts [String] :name The name for the snippet.
|
417
|
-
# @option opts [
|
499
|
+
# @option opts [String] :dynamic Sets the snippet version.
|
418
500
|
# @option opts [String] :type The location in generated VCL where the snippet should be placed.
|
419
501
|
# @option opts [String] :content The VCL code that specifies exactly what the snippet does.
|
420
502
|
# @option opts [String] :priority Priority determines execution order. Lower numbers execute first. (default to '100')
|
@@ -429,7 +511,7 @@ module Fastly
|
|
429
511
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
430
512
|
# @option opts [String] :snippet_id Alphanumeric string identifying a VCL Snippet. (required)
|
431
513
|
# @option opts [String] :name The name for the snippet.
|
432
|
-
# @option opts [
|
514
|
+
# @option opts [String] :dynamic Sets the snippet version.
|
433
515
|
# @option opts [String] :type The location in generated VCL where the snippet should be placed.
|
434
516
|
# @option opts [String] :content The VCL code that specifies exactly what the snippet does.
|
435
517
|
# @option opts [String] :priority Priority determines execution order. Lower numbers execute first. (default to '100')
|
@@ -449,7 +531,7 @@ module Fastly
|
|
449
531
|
if @api_client.config.client_side_validation && snippet_id.nil?
|
450
532
|
fail ArgumentError, "Missing the required parameter 'snippet_id' when calling SnippetApi.update_snippet_dynamic"
|
451
533
|
end
|
452
|
-
allowable_values = [0, 1]
|
534
|
+
allowable_values = ["0", "1"]
|
453
535
|
if @api_client.config.client_side_validation && opts[:'dynamic'] && !allowable_values.include?(opts[:'dynamic'])
|
454
536
|
fail ArgumentError, "invalid value for \"dynamic\", must be one of #{allowable_values}"
|
455
537
|
end
|
@@ -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)
|
data/lib/fastly/api/vcl_api.rb
CHANGED
@@ -402,17 +402,17 @@ module Fastly
|
|
402
402
|
# Display the content of generated VCL with HTML syntax highlighting. Include line numbers by sending `lineno=true` as a request parameter.
|
403
403
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
404
404
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
405
|
-
# @return [
|
405
|
+
# @return [VclSyntaxHighlightingResponse]
|
406
406
|
def get_custom_vcl_generated_highlighted(opts = {})
|
407
|
-
get_custom_vcl_generated_highlighted_with_http_info(opts)
|
408
|
-
|
407
|
+
data, _status_code, _headers = get_custom_vcl_generated_highlighted_with_http_info(opts)
|
408
|
+
data
|
409
409
|
end
|
410
410
|
|
411
411
|
# Get the generated VCL with syntax highlighting
|
412
412
|
# Display the content of generated VCL with HTML syntax highlighting. Include line numbers by sending `lineno=true` as a request parameter.
|
413
413
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
414
414
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
415
|
-
# @return [Array<(
|
415
|
+
# @return [Array<(VclSyntaxHighlightingResponse, Integer, Hash)>] VclSyntaxHighlightingResponse data, response status code and response headers
|
416
416
|
def get_custom_vcl_generated_highlighted_with_http_info(opts = {})
|
417
417
|
if @api_client.config.debugging
|
418
418
|
@api_client.config.logger.debug 'Calling API: VclApi.get_custom_vcl_generated_highlighted ...'
|
@@ -446,7 +446,7 @@ module Fastly
|
|
446
446
|
post_body = opts[:debug_body]
|
447
447
|
|
448
448
|
# return_type
|
449
|
-
return_type = opts[:debug_return_type]
|
449
|
+
return_type = opts[:debug_return_type] || 'VclSyntaxHighlightingResponse'
|
450
450
|
|
451
451
|
# auth_names
|
452
452
|
auth_names = opts[:debug_auth_names] || ['token']
|
@@ -473,10 +473,10 @@ module Fastly
|
|
473
473
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
474
474
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
475
475
|
# @option opts [String] :vcl_name The name of this VCL. (required)
|
476
|
-
# @return [
|
476
|
+
# @return [VclSyntaxHighlightingResponse]
|
477
477
|
def get_custom_vcl_highlighted(opts = {})
|
478
|
-
get_custom_vcl_highlighted_with_http_info(opts)
|
479
|
-
|
478
|
+
data, _status_code, _headers = get_custom_vcl_highlighted_with_http_info(opts)
|
479
|
+
data
|
480
480
|
end
|
481
481
|
|
482
482
|
# Get a custom VCL file with syntax highlighting
|
@@ -484,7 +484,7 @@ module Fastly
|
|
484
484
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
485
485
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
486
486
|
# @option opts [String] :vcl_name The name of this VCL. (required)
|
487
|
-
# @return [Array<(
|
487
|
+
# @return [Array<(VclSyntaxHighlightingResponse, Integer, Hash)>] VclSyntaxHighlightingResponse data, response status code and response headers
|
488
488
|
def get_custom_vcl_highlighted_with_http_info(opts = {})
|
489
489
|
if @api_client.config.debugging
|
490
490
|
@api_client.config.logger.debug 'Calling API: VclApi.get_custom_vcl_highlighted ...'
|
@@ -523,7 +523,7 @@ module Fastly
|
|
523
523
|
post_body = opts[:debug_body]
|
524
524
|
|
525
525
|
# return_type
|
526
|
-
return_type = opts[:debug_return_type]
|
526
|
+
return_type = opts[:debug_return_type] || 'VclSyntaxHighlightingResponse'
|
527
527
|
|
528
528
|
# auth_names
|
529
529
|
auth_names = opts[:debug_auth_names] || ['token']
|
@@ -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)
|