fastly 5.3.1 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +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
@@ -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
|
@@ -351,5 +351,87 @@ module Fastly
|
|
351
351
|
end
|
352
352
|
return data, status_code, headers
|
353
353
|
end
|
354
|
+
|
355
|
+
# Update a director
|
356
|
+
# Update the director for a particular service and version.
|
357
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
358
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
359
|
+
# @option opts [String] :director_name Name for the Director. (required)
|
360
|
+
# @return [DirectorResponse]
|
361
|
+
def update_director(opts = {})
|
362
|
+
data, _status_code, _headers = update_director_with_http_info(opts)
|
363
|
+
data
|
364
|
+
end
|
365
|
+
|
366
|
+
# Update a director
|
367
|
+
# Update the director for a particular service and version.
|
368
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
369
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
370
|
+
# @option opts [String] :director_name Name for the Director. (required)
|
371
|
+
# @return [Array<(DirectorResponse, Integer, Hash)>] DirectorResponse data, response status code and response headers
|
372
|
+
def update_director_with_http_info(opts = {})
|
373
|
+
if @api_client.config.debugging
|
374
|
+
@api_client.config.logger.debug 'Calling API: DirectorApi.update_director ...'
|
375
|
+
end
|
376
|
+
# unbox the parameters from the hash
|
377
|
+
service_id = opts[:'service_id']
|
378
|
+
version_id = opts[:'version_id']
|
379
|
+
director_name = opts[:'director_name']
|
380
|
+
# verify the required parameter 'service_id' is set
|
381
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
382
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling DirectorApi.update_director"
|
383
|
+
end
|
384
|
+
# verify the required parameter 'version_id' is set
|
385
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
386
|
+
fail ArgumentError, "Missing the required parameter 'version_id' when calling DirectorApi.update_director"
|
387
|
+
end
|
388
|
+
# verify the required parameter 'director_name' is set
|
389
|
+
if @api_client.config.client_side_validation && director_name.nil?
|
390
|
+
fail ArgumentError, "Missing the required parameter 'director_name' when calling DirectorApi.update_director"
|
391
|
+
end
|
392
|
+
# resource path
|
393
|
+
local_var_path = '/service/{service_id}/version/{version_id}/director/{director_name}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'director_name' + '}', CGI.escape(director_name.to_s))
|
394
|
+
|
395
|
+
# query parameters
|
396
|
+
query_params = opts[:query_params] || {}
|
397
|
+
|
398
|
+
# header parameters
|
399
|
+
header_params = opts[:header_params] || {}
|
400
|
+
# HTTP header 'Accept' (if needed)
|
401
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
402
|
+
# HTTP header 'Content-Type'
|
403
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
404
|
+
if !content_type.nil?
|
405
|
+
header_params['Content-Type'] = content_type
|
406
|
+
end
|
407
|
+
|
408
|
+
# form parameters
|
409
|
+
form_params = opts[:form_params] || {}
|
410
|
+
|
411
|
+
# http body (model)
|
412
|
+
post_body = opts[:debug_body]
|
413
|
+
|
414
|
+
# return_type
|
415
|
+
return_type = opts[:debug_return_type] || 'DirectorResponse'
|
416
|
+
|
417
|
+
# auth_names
|
418
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
419
|
+
|
420
|
+
new_options = opts.merge(
|
421
|
+
:operation => :"DirectorApi.update_director",
|
422
|
+
:header_params => header_params,
|
423
|
+
:query_params => query_params,
|
424
|
+
:form_params => form_params,
|
425
|
+
:body => post_body,
|
426
|
+
:auth_names => auth_names,
|
427
|
+
:return_type => return_type
|
428
|
+
)
|
429
|
+
|
430
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
431
|
+
if @api_client.config.debugging
|
432
|
+
@api_client.config.logger.debug "API called: DirectorApi#update_director\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
433
|
+
end
|
434
|
+
return data, status_code, headers
|
435
|
+
end
|
354
436
|
end
|
355
437
|
end
|
@@ -0,0 +1,125 @@
|
|
1
|
+
=begin
|
2
|
+
#Fastly API
|
3
|
+
|
4
|
+
#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: oss@fastly.com
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'cgi'
|
12
|
+
|
13
|
+
module Fastly
|
14
|
+
class DomainInspectorHistoricalApi
|
15
|
+
attr_accessor :api_client
|
16
|
+
|
17
|
+
def initialize(api_client = ApiClient.default)
|
18
|
+
@api_client = api_client
|
19
|
+
end
|
20
|
+
# Get historical domain data for a service
|
21
|
+
# Fetches historical domain metrics for a given Fastly service, optionally filtering and grouping the results by domain, region, or POP.
|
22
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
23
|
+
# @option opts [String] :start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value.
|
24
|
+
# @option opts [String] :_end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value.
|
25
|
+
# @option opts [String] :downsample Duration of sample windows. (default to 'hour')
|
26
|
+
# @option opts [String] :metric The metric to retrieve. Up to ten comma-separated metrics are accepted. (default to 'edge_requests')
|
27
|
+
# @option opts [String] :group_by Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=domain` will return one timeseries for every domain, as a total across all datacenters (POPs).
|
28
|
+
# @option opts [String] :limit Number of results per page. The maximum is 200. (default to '100')
|
29
|
+
# @option opts [String] :cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty.
|
30
|
+
# @option opts [String] :region Limit query to one or more specific geographic regions. Values should be comma-separated.
|
31
|
+
# @option opts [String] :datacenter Limit query to one or more specific POPs. Values should be comma-separated.
|
32
|
+
# @option opts [String] :domain Limit query to one or more specific domains. Values should be comma-separated.
|
33
|
+
# @return [HistoricalDomainsResponse]
|
34
|
+
def get_domain_inspector_historical(opts = {})
|
35
|
+
data, _status_code, _headers = get_domain_inspector_historical_with_http_info(opts)
|
36
|
+
data
|
37
|
+
end
|
38
|
+
|
39
|
+
# Get historical domain data for a service
|
40
|
+
# Fetches historical domain metrics for a given Fastly service, optionally filtering and grouping the results by domain, region, or POP.
|
41
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
42
|
+
# @option opts [String] :start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value.
|
43
|
+
# @option opts [String] :_end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value.
|
44
|
+
# @option opts [String] :downsample Duration of sample windows. (default to 'hour')
|
45
|
+
# @option opts [String] :metric The metric to retrieve. Up to ten comma-separated metrics are accepted. (default to 'edge_requests')
|
46
|
+
# @option opts [String] :group_by Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=domain` will return one timeseries for every domain, as a total across all datacenters (POPs).
|
47
|
+
# @option opts [String] :limit Number of results per page. The maximum is 200. (default to '100')
|
48
|
+
# @option opts [String] :cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty.
|
49
|
+
# @option opts [String] :region Limit query to one or more specific geographic regions. Values should be comma-separated.
|
50
|
+
# @option opts [String] :datacenter Limit query to one or more specific POPs. Values should be comma-separated.
|
51
|
+
# @option opts [String] :domain Limit query to one or more specific domains. Values should be comma-separated.
|
52
|
+
# @return [Array<(HistoricalDomainsResponse, Integer, Hash)>] HistoricalDomainsResponse data, response status code and response headers
|
53
|
+
def get_domain_inspector_historical_with_http_info(opts = {})
|
54
|
+
if @api_client.config.debugging
|
55
|
+
@api_client.config.logger.debug 'Calling API: DomainInspectorHistoricalApi.get_domain_inspector_historical ...'
|
56
|
+
end
|
57
|
+
# unbox the parameters from the hash
|
58
|
+
service_id = opts[:'service_id']
|
59
|
+
# verify the required parameter 'service_id' is set
|
60
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
61
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling DomainInspectorHistoricalApi.get_domain_inspector_historical"
|
62
|
+
end
|
63
|
+
allowable_values = ["hour", "minute", "day"]
|
64
|
+
if @api_client.config.client_side_validation && opts[:'downsample'] && !allowable_values.include?(opts[:'downsample'])
|
65
|
+
fail ArgumentError, "invalid value for \"downsample\", must be one of #{allowable_values}"
|
66
|
+
end
|
67
|
+
allowable_values = ["domain", "datacenter", "region", "none"]
|
68
|
+
if @api_client.config.client_side_validation && opts[:'group_by'] && !allowable_values.include?(opts[:'group_by'])
|
69
|
+
fail ArgumentError, "invalid value for \"group_by\", must be one of #{allowable_values}"
|
70
|
+
end
|
71
|
+
allowable_values = ["usa", "europe", "asia", "asia_india", "asia_southkorea", "africa_std", "southamerica_std"]
|
72
|
+
if @api_client.config.client_side_validation && opts[:'region'] && !allowable_values.include?(opts[:'region'])
|
73
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
74
|
+
end
|
75
|
+
# resource path
|
76
|
+
local_var_path = '/metrics/domains/services/{service_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
|
77
|
+
|
78
|
+
# query parameters
|
79
|
+
query_params = opts[:query_params] || {}
|
80
|
+
query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
|
81
|
+
query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil?
|
82
|
+
query_params[:'downsample'] = opts[:'downsample'] if !opts[:'downsample'].nil?
|
83
|
+
query_params[:'metric'] = opts[:'metric'] if !opts[:'metric'].nil?
|
84
|
+
query_params[:'group_by'] = opts[:'group_by'] if !opts[:'group_by'].nil?
|
85
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
86
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
87
|
+
query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil?
|
88
|
+
query_params[:'datacenter'] = opts[:'datacenter'] if !opts[:'datacenter'].nil?
|
89
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
90
|
+
|
91
|
+
# header parameters
|
92
|
+
header_params = opts[:header_params] || {}
|
93
|
+
# HTTP header 'Accept' (if needed)
|
94
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
95
|
+
|
96
|
+
# form parameters
|
97
|
+
form_params = opts[:form_params] || {}
|
98
|
+
|
99
|
+
# http body (model)
|
100
|
+
post_body = opts[:debug_body]
|
101
|
+
|
102
|
+
# return_type
|
103
|
+
return_type = opts[:debug_return_type] || 'HistoricalDomainsResponse'
|
104
|
+
|
105
|
+
# auth_names
|
106
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
107
|
+
|
108
|
+
new_options = opts.merge(
|
109
|
+
:operation => :"DomainInspectorHistoricalApi.get_domain_inspector_historical",
|
110
|
+
:header_params => header_params,
|
111
|
+
:query_params => query_params,
|
112
|
+
:form_params => form_params,
|
113
|
+
:body => post_body,
|
114
|
+
:auth_names => auth_names,
|
115
|
+
:return_type => return_type
|
116
|
+
)
|
117
|
+
|
118
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
119
|
+
if @api_client.config.debugging
|
120
|
+
@api_client.config.logger.debug "API called: DomainInspectorHistoricalApi#get_domain_inspector_historical\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
121
|
+
end
|
122
|
+
return data, status_code, headers
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|