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
@@ -94,6 +94,83 @@ module Fastly
|
|
94
94
|
return data, status_code, headers
|
95
95
|
end
|
96
96
|
|
97
|
+
# Create an ACL entry
|
98
|
+
# Add an ACL entry to an ACL.
|
99
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
100
|
+
# @option opts [String] :acl_id Alphanumeric string identifying a ACL. (required)
|
101
|
+
# @option opts [AclEntry] :acl_entry
|
102
|
+
# @return [AclEntryResponse]
|
103
|
+
def create_acl_entry(opts = {})
|
104
|
+
data, _status_code, _headers = create_acl_entry_with_http_info(opts)
|
105
|
+
data
|
106
|
+
end
|
107
|
+
|
108
|
+
# Create an ACL entry
|
109
|
+
# Add an ACL entry to an ACL.
|
110
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
111
|
+
# @option opts [String] :acl_id Alphanumeric string identifying a ACL. (required)
|
112
|
+
# @option opts [AclEntry] :acl_entry
|
113
|
+
# @return [Array<(AclEntryResponse, Integer, Hash)>] AclEntryResponse data, response status code and response headers
|
114
|
+
def create_acl_entry_with_http_info(opts = {})
|
115
|
+
if @api_client.config.debugging
|
116
|
+
@api_client.config.logger.debug 'Calling API: AclEntryApi.create_acl_entry ...'
|
117
|
+
end
|
118
|
+
# unbox the parameters from the hash
|
119
|
+
service_id = opts[:'service_id']
|
120
|
+
acl_id = opts[:'acl_id']
|
121
|
+
# verify the required parameter 'service_id' is set
|
122
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
123
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling AclEntryApi.create_acl_entry"
|
124
|
+
end
|
125
|
+
# verify the required parameter 'acl_id' is set
|
126
|
+
if @api_client.config.client_side_validation && acl_id.nil?
|
127
|
+
fail ArgumentError, "Missing the required parameter 'acl_id' when calling AclEntryApi.create_acl_entry"
|
128
|
+
end
|
129
|
+
# resource path
|
130
|
+
local_var_path = '/service/{service_id}/acl/{acl_id}/entry'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'acl_id' + '}', CGI.escape(acl_id.to_s))
|
131
|
+
|
132
|
+
# query parameters
|
133
|
+
query_params = opts[:query_params] || {}
|
134
|
+
|
135
|
+
# header parameters
|
136
|
+
header_params = opts[:header_params] || {}
|
137
|
+
# HTTP header 'Accept' (if needed)
|
138
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
139
|
+
# HTTP header 'Content-Type'
|
140
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
141
|
+
if !content_type.nil?
|
142
|
+
header_params['Content-Type'] = content_type
|
143
|
+
end
|
144
|
+
|
145
|
+
# form parameters
|
146
|
+
form_params = opts[:form_params] || {}
|
147
|
+
|
148
|
+
# http body (model)
|
149
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'acl_entry'])
|
150
|
+
|
151
|
+
# return_type
|
152
|
+
return_type = opts[:debug_return_type] || 'AclEntryResponse'
|
153
|
+
|
154
|
+
# auth_names
|
155
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
156
|
+
|
157
|
+
new_options = opts.merge(
|
158
|
+
:operation => :"AclEntryApi.create_acl_entry",
|
159
|
+
:header_params => header_params,
|
160
|
+
:query_params => query_params,
|
161
|
+
:form_params => form_params,
|
162
|
+
:body => post_body,
|
163
|
+
:auth_names => auth_names,
|
164
|
+
:return_type => return_type
|
165
|
+
)
|
166
|
+
|
167
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
168
|
+
if @api_client.config.debugging
|
169
|
+
@api_client.config.logger.debug "API called: AclEntryApi#create_acl_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
170
|
+
end
|
171
|
+
return data, status_code, headers
|
172
|
+
end
|
173
|
+
|
97
174
|
# Delete an ACL entry
|
98
175
|
# Delete an ACL entry from a specified ACL.
|
99
176
|
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
@@ -170,5 +247,260 @@ module Fastly
|
|
170
247
|
end
|
171
248
|
return data, status_code, headers
|
172
249
|
end
|
250
|
+
|
251
|
+
# Describe an ACL entry
|
252
|
+
# Retrieve a single ACL entry.
|
253
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
254
|
+
# @option opts [String] :acl_id Alphanumeric string identifying a ACL. (required)
|
255
|
+
# @option opts [String] :acl_entry_id Alphanumeric string identifying an ACL Entry. (required)
|
256
|
+
# @return [AclEntryResponse]
|
257
|
+
def get_acl_entry(opts = {})
|
258
|
+
data, _status_code, _headers = get_acl_entry_with_http_info(opts)
|
259
|
+
data
|
260
|
+
end
|
261
|
+
|
262
|
+
# Describe an ACL entry
|
263
|
+
# Retrieve a single ACL entry.
|
264
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
265
|
+
# @option opts [String] :acl_id Alphanumeric string identifying a ACL. (required)
|
266
|
+
# @option opts [String] :acl_entry_id Alphanumeric string identifying an ACL Entry. (required)
|
267
|
+
# @return [Array<(AclEntryResponse, Integer, Hash)>] AclEntryResponse data, response status code and response headers
|
268
|
+
def get_acl_entry_with_http_info(opts = {})
|
269
|
+
if @api_client.config.debugging
|
270
|
+
@api_client.config.logger.debug 'Calling API: AclEntryApi.get_acl_entry ...'
|
271
|
+
end
|
272
|
+
# unbox the parameters from the hash
|
273
|
+
service_id = opts[:'service_id']
|
274
|
+
acl_id = opts[:'acl_id']
|
275
|
+
acl_entry_id = opts[:'acl_entry_id']
|
276
|
+
# verify the required parameter 'service_id' is set
|
277
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
278
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling AclEntryApi.get_acl_entry"
|
279
|
+
end
|
280
|
+
# verify the required parameter 'acl_id' is set
|
281
|
+
if @api_client.config.client_side_validation && acl_id.nil?
|
282
|
+
fail ArgumentError, "Missing the required parameter 'acl_id' when calling AclEntryApi.get_acl_entry"
|
283
|
+
end
|
284
|
+
# verify the required parameter 'acl_entry_id' is set
|
285
|
+
if @api_client.config.client_side_validation && acl_entry_id.nil?
|
286
|
+
fail ArgumentError, "Missing the required parameter 'acl_entry_id' when calling AclEntryApi.get_acl_entry"
|
287
|
+
end
|
288
|
+
# resource path
|
289
|
+
local_var_path = '/service/{service_id}/acl/{acl_id}/entry/{acl_entry_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'acl_id' + '}', CGI.escape(acl_id.to_s)).sub('{' + 'acl_entry_id' + '}', CGI.escape(acl_entry_id.to_s))
|
290
|
+
|
291
|
+
# query parameters
|
292
|
+
query_params = opts[:query_params] || {}
|
293
|
+
|
294
|
+
# header parameters
|
295
|
+
header_params = opts[:header_params] || {}
|
296
|
+
# HTTP header 'Accept' (if needed)
|
297
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
298
|
+
|
299
|
+
# form parameters
|
300
|
+
form_params = opts[:form_params] || {}
|
301
|
+
|
302
|
+
# http body (model)
|
303
|
+
post_body = opts[:debug_body]
|
304
|
+
|
305
|
+
# return_type
|
306
|
+
return_type = opts[:debug_return_type] || 'AclEntryResponse'
|
307
|
+
|
308
|
+
# auth_names
|
309
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
310
|
+
|
311
|
+
new_options = opts.merge(
|
312
|
+
:operation => :"AclEntryApi.get_acl_entry",
|
313
|
+
:header_params => header_params,
|
314
|
+
:query_params => query_params,
|
315
|
+
:form_params => form_params,
|
316
|
+
:body => post_body,
|
317
|
+
:auth_names => auth_names,
|
318
|
+
:return_type => return_type
|
319
|
+
)
|
320
|
+
|
321
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
322
|
+
if @api_client.config.debugging
|
323
|
+
@api_client.config.logger.debug "API called: AclEntryApi#get_acl_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
324
|
+
end
|
325
|
+
return data, status_code, headers
|
326
|
+
end
|
327
|
+
|
328
|
+
# List ACL entries
|
329
|
+
# List ACL entries for a specified ACL.
|
330
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
331
|
+
# @option opts [String] :acl_id Alphanumeric string identifying a ACL. (required)
|
332
|
+
# @option opts [Integer] :page Current page.
|
333
|
+
# @option opts [Integer] :per_page Number of records per page. (default to 20)
|
334
|
+
# @option opts [String] :sort Field on which to sort. (default to 'created')
|
335
|
+
# @option opts [String] :direction Direction in which to sort results. (default to 'ascend')
|
336
|
+
# @return [Array<AclEntryResponse>]
|
337
|
+
def list_acl_entries(opts = {})
|
338
|
+
data, _status_code, _headers = list_acl_entries_with_http_info(opts)
|
339
|
+
data
|
340
|
+
end
|
341
|
+
|
342
|
+
# List ACL entries
|
343
|
+
# List ACL entries for a specified ACL.
|
344
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
345
|
+
# @option opts [String] :acl_id Alphanumeric string identifying a ACL. (required)
|
346
|
+
# @option opts [Integer] :page Current page.
|
347
|
+
# @option opts [Integer] :per_page Number of records per page. (default to 20)
|
348
|
+
# @option opts [String] :sort Field on which to sort. (default to 'created')
|
349
|
+
# @option opts [String] :direction Direction in which to sort results. (default to 'ascend')
|
350
|
+
# @return [Array<(Array<AclEntryResponse>, Integer, Hash)>] Array<AclEntryResponse> data, response status code and response headers
|
351
|
+
def list_acl_entries_with_http_info(opts = {})
|
352
|
+
if @api_client.config.debugging
|
353
|
+
@api_client.config.logger.debug 'Calling API: AclEntryApi.list_acl_entries ...'
|
354
|
+
end
|
355
|
+
# unbox the parameters from the hash
|
356
|
+
service_id = opts[:'service_id']
|
357
|
+
acl_id = opts[:'acl_id']
|
358
|
+
# verify the required parameter 'service_id' is set
|
359
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
360
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling AclEntryApi.list_acl_entries"
|
361
|
+
end
|
362
|
+
# verify the required parameter 'acl_id' is set
|
363
|
+
if @api_client.config.client_side_validation && acl_id.nil?
|
364
|
+
fail ArgumentError, "Missing the required parameter 'acl_id' when calling AclEntryApi.list_acl_entries"
|
365
|
+
end
|
366
|
+
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 100
|
367
|
+
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling AclEntryApi.list_acl_entries, must be smaller than or equal to 100.'
|
368
|
+
end
|
369
|
+
|
370
|
+
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
|
371
|
+
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling AclEntryApi.list_acl_entries, must be greater than or equal to 1.'
|
372
|
+
end
|
373
|
+
|
374
|
+
allowable_values = ["ascend", "descend"]
|
375
|
+
if @api_client.config.client_side_validation && opts[:'direction'] && !allowable_values.include?(opts[:'direction'])
|
376
|
+
fail ArgumentError, "invalid value for \"direction\", must be one of #{allowable_values}"
|
377
|
+
end
|
378
|
+
# resource path
|
379
|
+
local_var_path = '/service/{service_id}/acl/{acl_id}/entries'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'acl_id' + '}', CGI.escape(acl_id.to_s))
|
380
|
+
|
381
|
+
# query parameters
|
382
|
+
query_params = opts[:query_params] || {}
|
383
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
384
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
385
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
386
|
+
query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil?
|
387
|
+
|
388
|
+
# header parameters
|
389
|
+
header_params = opts[:header_params] || {}
|
390
|
+
# HTTP header 'Accept' (if needed)
|
391
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
392
|
+
|
393
|
+
# form parameters
|
394
|
+
form_params = opts[:form_params] || {}
|
395
|
+
|
396
|
+
# http body (model)
|
397
|
+
post_body = opts[:debug_body]
|
398
|
+
|
399
|
+
# return_type
|
400
|
+
return_type = opts[:debug_return_type] || 'Array<AclEntryResponse>'
|
401
|
+
|
402
|
+
# auth_names
|
403
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
404
|
+
|
405
|
+
new_options = opts.merge(
|
406
|
+
:operation => :"AclEntryApi.list_acl_entries",
|
407
|
+
:header_params => header_params,
|
408
|
+
:query_params => query_params,
|
409
|
+
:form_params => form_params,
|
410
|
+
:body => post_body,
|
411
|
+
:auth_names => auth_names,
|
412
|
+
:return_type => return_type
|
413
|
+
)
|
414
|
+
|
415
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
416
|
+
if @api_client.config.debugging
|
417
|
+
@api_client.config.logger.debug "API called: AclEntryApi#list_acl_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
418
|
+
end
|
419
|
+
return data, status_code, headers
|
420
|
+
end
|
421
|
+
|
422
|
+
# Update an ACL entry
|
423
|
+
# Update an ACL entry for a specified ACL.
|
424
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
425
|
+
# @option opts [String] :acl_id Alphanumeric string identifying a ACL. (required)
|
426
|
+
# @option opts [String] :acl_entry_id Alphanumeric string identifying an ACL Entry. (required)
|
427
|
+
# @option opts [AclEntry] :acl_entry
|
428
|
+
# @return [AclEntryResponse]
|
429
|
+
def update_acl_entry(opts = {})
|
430
|
+
data, _status_code, _headers = update_acl_entry_with_http_info(opts)
|
431
|
+
data
|
432
|
+
end
|
433
|
+
|
434
|
+
# Update an ACL entry
|
435
|
+
# Update an ACL entry for a specified ACL.
|
436
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
437
|
+
# @option opts [String] :acl_id Alphanumeric string identifying a ACL. (required)
|
438
|
+
# @option opts [String] :acl_entry_id Alphanumeric string identifying an ACL Entry. (required)
|
439
|
+
# @option opts [AclEntry] :acl_entry
|
440
|
+
# @return [Array<(AclEntryResponse, Integer, Hash)>] AclEntryResponse data, response status code and response headers
|
441
|
+
def update_acl_entry_with_http_info(opts = {})
|
442
|
+
if @api_client.config.debugging
|
443
|
+
@api_client.config.logger.debug 'Calling API: AclEntryApi.update_acl_entry ...'
|
444
|
+
end
|
445
|
+
# unbox the parameters from the hash
|
446
|
+
service_id = opts[:'service_id']
|
447
|
+
acl_id = opts[:'acl_id']
|
448
|
+
acl_entry_id = opts[:'acl_entry_id']
|
449
|
+
# verify the required parameter 'service_id' is set
|
450
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
451
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling AclEntryApi.update_acl_entry"
|
452
|
+
end
|
453
|
+
# verify the required parameter 'acl_id' is set
|
454
|
+
if @api_client.config.client_side_validation && acl_id.nil?
|
455
|
+
fail ArgumentError, "Missing the required parameter 'acl_id' when calling AclEntryApi.update_acl_entry"
|
456
|
+
end
|
457
|
+
# verify the required parameter 'acl_entry_id' is set
|
458
|
+
if @api_client.config.client_side_validation && acl_entry_id.nil?
|
459
|
+
fail ArgumentError, "Missing the required parameter 'acl_entry_id' when calling AclEntryApi.update_acl_entry"
|
460
|
+
end
|
461
|
+
# resource path
|
462
|
+
local_var_path = '/service/{service_id}/acl/{acl_id}/entry/{acl_entry_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'acl_id' + '}', CGI.escape(acl_id.to_s)).sub('{' + 'acl_entry_id' + '}', CGI.escape(acl_entry_id.to_s))
|
463
|
+
|
464
|
+
# query parameters
|
465
|
+
query_params = opts[:query_params] || {}
|
466
|
+
|
467
|
+
# header parameters
|
468
|
+
header_params = opts[:header_params] || {}
|
469
|
+
# HTTP header 'Accept' (if needed)
|
470
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
471
|
+
# HTTP header 'Content-Type'
|
472
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
473
|
+
if !content_type.nil?
|
474
|
+
header_params['Content-Type'] = content_type
|
475
|
+
end
|
476
|
+
|
477
|
+
# form parameters
|
478
|
+
form_params = opts[:form_params] || {}
|
479
|
+
|
480
|
+
# http body (model)
|
481
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'acl_entry'])
|
482
|
+
|
483
|
+
# return_type
|
484
|
+
return_type = opts[:debug_return_type] || 'AclEntryResponse'
|
485
|
+
|
486
|
+
# auth_names
|
487
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
488
|
+
|
489
|
+
new_options = opts.merge(
|
490
|
+
:operation => :"AclEntryApi.update_acl_entry",
|
491
|
+
:header_params => header_params,
|
492
|
+
:query_params => query_params,
|
493
|
+
:form_params => form_params,
|
494
|
+
:body => post_body,
|
495
|
+
:auth_names => auth_names,
|
496
|
+
:return_type => return_type
|
497
|
+
)
|
498
|
+
|
499
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
500
|
+
if @api_client.config.debugging
|
501
|
+
@api_client.config.logger.debug "API called: AclEntryApi#update_acl_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
502
|
+
end
|
503
|
+
return data, status_code, headers
|
504
|
+
end
|
173
505
|
end
|
174
506
|
end
|
@@ -17,6 +17,117 @@ module Fastly
|
|
17
17
|
def initialize(api_client = ApiClient.default)
|
18
18
|
@api_client = api_client
|
19
19
|
end
|
20
|
+
# Create an apex redirect
|
21
|
+
# Create an apex redirect for a particular service and version.
|
22
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
23
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
24
|
+
# @option opts [String] :service_id
|
25
|
+
# @option opts [Integer] :version
|
26
|
+
# @option opts [Time] :created_at Date and time in ISO 8601 format.
|
27
|
+
# @option opts [Time] :deleted_at Date and time in ISO 8601 format.
|
28
|
+
# @option opts [Time] :updated_at Date and time in ISO 8601 format.
|
29
|
+
# @option opts [Integer] :status_code HTTP status code used to redirect the client.
|
30
|
+
# @option opts [Array<String>] :domains Array of apex domains that should redirect to their WWW subdomain.
|
31
|
+
# @option opts [Integer] :feature_revision Revision number of the apex redirect feature implementation. Defaults to the most recent revision.
|
32
|
+
# @return [ApexRedirect]
|
33
|
+
def create_apex_redirect(opts = {})
|
34
|
+
data, _status_code, _headers = create_apex_redirect_with_http_info(opts)
|
35
|
+
data
|
36
|
+
end
|
37
|
+
|
38
|
+
# Create an apex redirect
|
39
|
+
# Create an apex redirect for a particular service and version.
|
40
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
41
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
42
|
+
# @option opts [String] :service_id
|
43
|
+
# @option opts [Integer] :version
|
44
|
+
# @option opts [Time] :created_at Date and time in ISO 8601 format.
|
45
|
+
# @option opts [Time] :deleted_at Date and time in ISO 8601 format.
|
46
|
+
# @option opts [Time] :updated_at Date and time in ISO 8601 format.
|
47
|
+
# @option opts [Integer] :status_code HTTP status code used to redirect the client.
|
48
|
+
# @option opts [Array<String>] :domains Array of apex domains that should redirect to their WWW subdomain.
|
49
|
+
# @option opts [Integer] :feature_revision Revision number of the apex redirect feature implementation. Defaults to the most recent revision.
|
50
|
+
# @return [Array<(ApexRedirect, Integer, Hash)>] ApexRedirect data, response status code and response headers
|
51
|
+
def create_apex_redirect_with_http_info(opts = {})
|
52
|
+
if @api_client.config.debugging
|
53
|
+
@api_client.config.logger.debug 'Calling API: ApexRedirectApi.create_apex_redirect ...'
|
54
|
+
end
|
55
|
+
# unbox the parameters from the hash
|
56
|
+
service_id = opts[:'service_id']
|
57
|
+
version_id = opts[:'version_id']
|
58
|
+
# verify the required parameter 'service_id' is set
|
59
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
60
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling ApexRedirectApi.create_apex_redirect"
|
61
|
+
end
|
62
|
+
# verify the required parameter 'version_id' is set
|
63
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
64
|
+
fail ArgumentError, "Missing the required parameter 'version_id' when calling ApexRedirectApi.create_apex_redirect"
|
65
|
+
end
|
66
|
+
allowable_values = [301, 302, 307, 308]
|
67
|
+
if @api_client.config.client_side_validation && opts[:'status_code'] && !allowable_values.include?(opts[:'status_code'])
|
68
|
+
fail ArgumentError, "invalid value for \"status_code\", must be one of #{allowable_values}"
|
69
|
+
end
|
70
|
+
if @api_client.config.client_side_validation && !opts[:'domains'].nil? && opts[:'domains'].length < 1
|
71
|
+
fail ArgumentError, 'invalid value for "opts[:"domains"]" when calling ApexRedirectApi.create_apex_redirect, number of items must be greater than or equal to 1.'
|
72
|
+
end
|
73
|
+
|
74
|
+
if @api_client.config.client_side_validation && !opts[:'feature_revision'].nil? && opts[:'feature_revision'] < 1
|
75
|
+
fail ArgumentError, 'invalid value for "opts[:"feature_revision"]" when calling ApexRedirectApi.create_apex_redirect, must be greater than or equal to 1.'
|
76
|
+
end
|
77
|
+
|
78
|
+
# resource path
|
79
|
+
local_var_path = '/service/{service_id}/version/{version_id}/apex-redirects'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
|
80
|
+
|
81
|
+
# query parameters
|
82
|
+
query_params = opts[:query_params] || {}
|
83
|
+
|
84
|
+
# header parameters
|
85
|
+
header_params = opts[:header_params] || {}
|
86
|
+
# HTTP header 'Accept' (if needed)
|
87
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
88
|
+
# HTTP header 'Content-Type'
|
89
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
90
|
+
if !content_type.nil?
|
91
|
+
header_params['Content-Type'] = content_type
|
92
|
+
end
|
93
|
+
|
94
|
+
# form parameters
|
95
|
+
form_params = opts[:form_params] || {}
|
96
|
+
form_params['service_id'] = opts[:'service_id'] if !opts[:'service_id'].nil?
|
97
|
+
form_params['version'] = opts[:'version'] if !opts[:'version'].nil?
|
98
|
+
form_params['created_at'] = opts[:'created_at'] if !opts[:'created_at'].nil?
|
99
|
+
form_params['deleted_at'] = opts[:'deleted_at'] if !opts[:'deleted_at'].nil?
|
100
|
+
form_params['updated_at'] = opts[:'updated_at'] if !opts[:'updated_at'].nil?
|
101
|
+
form_params['status_code'] = opts[:'status_code'] if !opts[:'status_code'].nil?
|
102
|
+
form_params['domains'] = @api_client.build_collection_param(opts[:'domains'], :csv) if !opts[:'domains'].nil?
|
103
|
+
form_params['feature_revision'] = opts[:'feature_revision'] if !opts[:'feature_revision'].nil?
|
104
|
+
|
105
|
+
# http body (model)
|
106
|
+
post_body = opts[:debug_body]
|
107
|
+
|
108
|
+
# return_type
|
109
|
+
return_type = opts[:debug_return_type] || 'ApexRedirect'
|
110
|
+
|
111
|
+
# auth_names
|
112
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
113
|
+
|
114
|
+
new_options = opts.merge(
|
115
|
+
:operation => :"ApexRedirectApi.create_apex_redirect",
|
116
|
+
:header_params => header_params,
|
117
|
+
:query_params => query_params,
|
118
|
+
:form_params => form_params,
|
119
|
+
:body => post_body,
|
120
|
+
:auth_names => auth_names,
|
121
|
+
:return_type => return_type
|
122
|
+
)
|
123
|
+
|
124
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
125
|
+
if @api_client.config.debugging
|
126
|
+
@api_client.config.logger.debug "API called: ApexRedirectApi#create_apex_redirect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
127
|
+
end
|
128
|
+
return data, status_code, headers
|
129
|
+
end
|
130
|
+
|
20
131
|
# Delete an apex redirect
|
21
132
|
# Delete an apex redirect by its ID.
|
22
133
|
# @option opts [String] :apex_redirect_id (required)
|
@@ -17,6 +17,96 @@ module Fastly
|
|
17
17
|
def initialize(api_client = ApiClient.default)
|
18
18
|
@api_client = api_client
|
19
19
|
end
|
20
|
+
# Add a new customer contact
|
21
|
+
# Create a contact.
|
22
|
+
# @option opts [String] :customer_id Alphanumeric string identifying the customer. (required)
|
23
|
+
# @option opts [String] :user_id The alphanumeric string representing the user for this customer contact.
|
24
|
+
# @option opts [String] :contact_type The type of contact.
|
25
|
+
# @option opts [String] :name The name of this contact, when user_id is not provided.
|
26
|
+
# @option opts [String] :email The email of this contact, when a user_id is not provided.
|
27
|
+
# @option opts [String] :phone The phone number for this contact. Required for primary, technical, and security contact types.
|
28
|
+
# @option opts [String] :customer_id The alphanumeric string representing the customer for this customer contact.
|
29
|
+
# @return [ContactResponse]
|
30
|
+
def create_contacts(opts = {})
|
31
|
+
data, _status_code, _headers = create_contacts_with_http_info(opts)
|
32
|
+
data
|
33
|
+
end
|
34
|
+
|
35
|
+
# Add a new customer contact
|
36
|
+
# Create a contact.
|
37
|
+
# @option opts [String] :customer_id Alphanumeric string identifying the customer. (required)
|
38
|
+
# @option opts [String] :user_id The alphanumeric string representing the user for this customer contact.
|
39
|
+
# @option opts [String] :contact_type The type of contact.
|
40
|
+
# @option opts [String] :name The name of this contact, when user_id is not provided.
|
41
|
+
# @option opts [String] :email The email of this contact, when a user_id is not provided.
|
42
|
+
# @option opts [String] :phone The phone number for this contact. Required for primary, technical, and security contact types.
|
43
|
+
# @option opts [String] :customer_id The alphanumeric string representing the customer for this customer contact.
|
44
|
+
# @return [Array<(ContactResponse, Integer, Hash)>] ContactResponse data, response status code and response headers
|
45
|
+
def create_contacts_with_http_info(opts = {})
|
46
|
+
if @api_client.config.debugging
|
47
|
+
@api_client.config.logger.debug 'Calling API: ContactApi.create_contacts ...'
|
48
|
+
end
|
49
|
+
# unbox the parameters from the hash
|
50
|
+
customer_id = opts[:'customer_id']
|
51
|
+
# verify the required parameter 'customer_id' is set
|
52
|
+
if @api_client.config.client_side_validation && customer_id.nil?
|
53
|
+
fail ArgumentError, "Missing the required parameter 'customer_id' when calling ContactApi.create_contacts"
|
54
|
+
end
|
55
|
+
allowable_values = ["primary", "billing", "technical", "security", "emergency", "general compliance"]
|
56
|
+
if @api_client.config.client_side_validation && opts[:'contact_type'] && !allowable_values.include?(opts[:'contact_type'])
|
57
|
+
fail ArgumentError, "invalid value for \"contact_type\", must be one of #{allowable_values}"
|
58
|
+
end
|
59
|
+
# resource path
|
60
|
+
local_var_path = '/customer/{customer_id}/contacts'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s))
|
61
|
+
|
62
|
+
# query parameters
|
63
|
+
query_params = opts[:query_params] || {}
|
64
|
+
|
65
|
+
# header parameters
|
66
|
+
header_params = opts[:header_params] || {}
|
67
|
+
# HTTP header 'Accept' (if needed)
|
68
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
69
|
+
# HTTP header 'Content-Type'
|
70
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
71
|
+
if !content_type.nil?
|
72
|
+
header_params['Content-Type'] = content_type
|
73
|
+
end
|
74
|
+
|
75
|
+
# form parameters
|
76
|
+
form_params = opts[:form_params] || {}
|
77
|
+
form_params['user_id'] = opts[:'user_id'] if !opts[:'user_id'].nil?
|
78
|
+
form_params['contact_type'] = opts[:'contact_type'] if !opts[:'contact_type'].nil?
|
79
|
+
form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
|
80
|
+
form_params['email'] = opts[:'email'] if !opts[:'email'].nil?
|
81
|
+
form_params['phone'] = opts[:'phone'] if !opts[:'phone'].nil?
|
82
|
+
form_params['customer_id'] = opts[:'customer_id'] if !opts[:'customer_id'].nil?
|
83
|
+
|
84
|
+
# http body (model)
|
85
|
+
post_body = opts[:debug_body]
|
86
|
+
|
87
|
+
# return_type
|
88
|
+
return_type = opts[:debug_return_type] || 'ContactResponse'
|
89
|
+
|
90
|
+
# auth_names
|
91
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
92
|
+
|
93
|
+
new_options = opts.merge(
|
94
|
+
:operation => :"ContactApi.create_contacts",
|
95
|
+
:header_params => header_params,
|
96
|
+
:query_params => query_params,
|
97
|
+
:form_params => form_params,
|
98
|
+
:body => post_body,
|
99
|
+
:auth_names => auth_names,
|
100
|
+
:return_type => return_type
|
101
|
+
)
|
102
|
+
|
103
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
104
|
+
if @api_client.config.debugging
|
105
|
+
@api_client.config.logger.debug "API called: ContactApi#create_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
106
|
+
end
|
107
|
+
return data, status_code, headers
|
108
|
+
end
|
109
|
+
|
20
110
|
# Delete a contact
|
21
111
|
# Delete a contact.
|
22
112
|
# @option opts [String] :customer_id Alphanumeric string identifying the customer. (required)
|
@@ -0,0 +1,79 @@
|
|
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 ContentApi
|
15
|
+
attr_accessor :api_client
|
16
|
+
|
17
|
+
def initialize(api_client = ApiClient.default)
|
18
|
+
@api_client = api_client
|
19
|
+
end
|
20
|
+
# Check status of content in each POP's cache
|
21
|
+
# Retrieve headers and MD5 hash of the content for a particular URL from each Fastly edge server. This API is limited to 200 requests per hour.
|
22
|
+
# @option opts [String] :url Full URL (host and path) to check on all nodes. if protocol is omitted, http will be assumed.
|
23
|
+
# @return [Array<Content>]
|
24
|
+
def content_check(opts = {})
|
25
|
+
data, _status_code, _headers = content_check_with_http_info(opts)
|
26
|
+
data
|
27
|
+
end
|
28
|
+
|
29
|
+
# Check status of content in each POP's cache
|
30
|
+
# Retrieve headers and MD5 hash of the content for a particular URL from each Fastly edge server. This API is limited to 200 requests per hour.
|
31
|
+
# @option opts [String] :url Full URL (host and path) to check on all nodes. if protocol is omitted, http will be assumed.
|
32
|
+
# @return [Array<(Array<Content>, Integer, Hash)>] Array<Content> data, response status code and response headers
|
33
|
+
def content_check_with_http_info(opts = {})
|
34
|
+
if @api_client.config.debugging
|
35
|
+
@api_client.config.logger.debug 'Calling API: ContentApi.content_check ...'
|
36
|
+
end
|
37
|
+
# unbox the parameters from the hash
|
38
|
+
# resource path
|
39
|
+
local_var_path = '/content/edge_check'
|
40
|
+
|
41
|
+
# query parameters
|
42
|
+
query_params = opts[:query_params] || {}
|
43
|
+
query_params[:'url'] = opts[:'url'] if !opts[:'url'].nil?
|
44
|
+
|
45
|
+
# header parameters
|
46
|
+
header_params = opts[:header_params] || {}
|
47
|
+
# HTTP header 'Accept' (if needed)
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
49
|
+
|
50
|
+
# form parameters
|
51
|
+
form_params = opts[:form_params] || {}
|
52
|
+
|
53
|
+
# http body (model)
|
54
|
+
post_body = opts[:debug_body]
|
55
|
+
|
56
|
+
# return_type
|
57
|
+
return_type = opts[:debug_return_type] || 'Array<Content>'
|
58
|
+
|
59
|
+
# auth_names
|
60
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
61
|
+
|
62
|
+
new_options = opts.merge(
|
63
|
+
:operation => :"ContentApi.content_check",
|
64
|
+
:header_params => header_params,
|
65
|
+
:query_params => query_params,
|
66
|
+
:form_params => form_params,
|
67
|
+
:body => post_body,
|
68
|
+
:auth_names => auth_names,
|
69
|
+
:return_type => return_type
|
70
|
+
)
|
71
|
+
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
73
|
+
if @api_client.config.debugging
|
74
|
+
@api_client.config.logger.debug "API called: ContentApi#content_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
75
|
+
end
|
76
|
+
return data, status_code, headers
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|