datadog_api_client 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.apigentools-info +4 -4
- data/.generator/schemas/v1/openapi.yaml +233 -14
- data/.generator/schemas/v2/openapi.yaml +1403 -151
- data/CHANGELOG.md +27 -0
- data/examples/v1/dashboards/CreateDashboard_1039800684.rb +37 -0
- data/examples/v1/dashboards/CreateDashboard_2432046716.rb +33 -0
- data/examples/v1/dashboards/CreateDashboard_2610827685.rb +38 -0
- data/examples/v1/dashboards/CreateDashboard_2843286292.rb +43 -0
- data/examples/v1/gcp-integration/CreateGCPIntegration.rb +1 -0
- data/examples/v1/gcp-integration/DeleteGCPIntegration.rb +1 -0
- data/examples/v1/gcp-integration/UpdateGCPIntegration.rb +1 -0
- data/examples/v1/monitors/ValidateExistingMonitor.rb +1 -0
- data/examples/v1/monitors/ValidateMonitor.rb +1 -0
- data/examples/v1/service-level-objectives/CreateSLO.rb +2 -2
- data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +16 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +1 -0
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.rb +74 -0
- data/examples/v1/synthetics/UpdateBrowserTest.rb +16 -0
- data/examples/v2/cloudflare-integration/CreateCloudflareAccount.rb +16 -0
- data/examples/v2/cloudflare-integration/DeleteCloudflareAccount.rb +5 -0
- data/examples/v2/cloudflare-integration/GetCloudflareAccount.rb +8 -0
- data/examples/v2/cloudflare-integration/ListCloudflareAccounts.rb +5 -0
- data/examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb +18 -0
- data/examples/v2/fastly-integration/CreateFastlyAccount.rb +16 -0
- data/examples/v2/fastly-integration/CreateFastlyService.rb +18 -0
- data/examples/v2/fastly-integration/DeleteFastlyAccount.rb +5 -0
- data/examples/v2/fastly-integration/DeleteFastlyService.rb +5 -0
- data/examples/v2/fastly-integration/GetFastlyAccount.rb +8 -0
- data/examples/v2/fastly-integration/GetFastlyService.rb +5 -0
- data/examples/v2/fastly-integration/ListFastlyAccounts.rb +5 -0
- data/examples/v2/fastly-integration/ListFastlyServices.rb +5 -0
- data/examples/v2/fastly-integration/UpdateFastlyAccount.rb +17 -0
- data/examples/v2/fastly-integration/UpdateFastlyService.rb +18 -0
- data/examples/v2/metrics/QueryScalarData.rb +5 -6
- data/examples/v2/metrics/QueryScalarData_3112571352.rb +35 -0
- data/examples/v2/metrics/QueryTimeseriesData.rb +5 -6
- data/examples/v2/metrics/QueryTimeseriesData_301142940.rb +35 -0
- data/examples/v2/monitors/CreateMonitorConfigPolicy.rb +22 -0
- data/examples/v2/monitors/DeleteMonitorConfigPolicy.rb +8 -0
- data/examples/v2/monitors/GetMonitorConfigPolicy.rb +8 -0
- data/examples/v2/monitors/ListMonitorConfigPolicies.rb +5 -0
- data/examples/v2/monitors/UpdateMonitorConfigPolicy.rb +26 -0
- data/examples/v2/sensitive-data-scanner/CreateScanningRule.rb +6 -0
- data/examples/v2/{users → service-accounts}/CreateServiceAccount.rb +1 -1
- data/lib/datadog_api_client/inflector.rb +61 -0
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
- data/lib/datadog_api_client/v1/models/gcp_account.rb +11 -1
- data/lib/datadog_api_client/v1/models/host_meta.rb +1 -1
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -1
- data/lib/datadog_api_client/v1/models/list_stream_compute_aggregation.rb +40 -0
- data/lib/datadog_api_client/v1/models/list_stream_compute_items.rb +112 -0
- data/lib/datadog_api_client/v1/models/list_stream_group_by_items.rb +102 -0
- data/lib/datadog_api_client/v1/models/list_stream_query.rb +61 -1
- data/lib/datadog_api_client/v1/models/list_stream_source.rb +2 -0
- data/lib/datadog_api_client/v1/models/metrics_query_metadata.rb +3 -2
- data/lib/datadog_api_client/v1/models/monitor_options.rb +11 -1
- data/lib/datadog_api_client/v1/models/monitor_options_notification_presets.rb +29 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -2
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +13 -13
- data/lib/datadog_api_client/v1/models/run_workflow_widget_definition.rb +187 -0
- data/lib/datadog_api_client/v1/models/run_workflow_widget_definition_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/run_workflow_widget_input.rb +123 -0
- data/lib/datadog_api_client/v1/models/synthetics_config_variable.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +21 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_options_http_version.rb +28 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling.rb +103 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling_timeframe.rb +126 -0
- data/lib/datadog_api_client/v1/models/widget_definition.rb +1 -0
- data/lib/datadog_api_client/v2/api/cloudflare_integration_api.rb +355 -0
- data/lib/datadog_api_client/v2/api/fastly_integration_api.rb +709 -0
- data/lib/datadog_api_client/v2/api/metrics_api.rb +7 -6
- data/lib/datadog_api_client/v2/api/monitors_api.rb +355 -0
- data/lib/datadog_api_client/v2/api/service_accounts_api.rb +67 -0
- data/lib/datadog_api_client/v2/api/users_api.rb +0 -67
- data/lib/datadog_api_client/v2/models/cloudflare_account_create_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_attributes.rb +133 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_data.rb +123 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_response.rb +91 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_response_attributes.rb +112 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_response_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_update_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_attributes.rb +112 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_data.rb +101 -0
- data/lib/datadog_api_client/v2/models/cloudflare_accounts_response.rb +93 -0
- data/lib/datadog_api_client/v2/models/cost_by_org_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/data_scalar_column.rb +123 -0
- data/lib/datadog_api_client/v2/models/fastly_accoun_response_attributes.rb +114 -0
- data/lib/datadog_api_client/v2/models/fastly_account_create_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/fastly_account_create_request_attributes.rb +135 -0
- data/lib/datadog_api_client/v2/models/fastly_account_create_request_data.rb +123 -0
- data/lib/datadog_api_client/v2/models/fastly_account_response.rb +91 -0
- data/lib/datadog_api_client/v2/models/fastly_account_response_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/fastly_account_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/fastly_account_update_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/fastly_account_update_request_attributes.rb +91 -0
- data/lib/datadog_api_client/v2/models/fastly_account_update_request_data.rb +101 -0
- data/lib/datadog_api_client/v2/models/fastly_accounts_response.rb +93 -0
- data/lib/datadog_api_client/v2/models/fastly_service.rb +114 -0
- data/lib/datadog_api_client/v2/models/fastly_service_attributes.rb +93 -0
- data/lib/datadog_api_client/v2/models/fastly_service_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/fastly_service_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/fastly_service_response.rb +91 -0
- data/lib/datadog_api_client/v2/models/fastly_service_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/fastly_services_response.rb +93 -0
- data/lib/datadog_api_client/v2/models/group_scalar_column.rb +113 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_edit_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_response.rb +101 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_create_data.rb +123 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_create_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_edit_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_edit_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_list_response.rb +93 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_policy.rb +62 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_policy_create_request.rb +62 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_response.rb +91 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_response_data.rb +111 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy.rb +124 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy_create_request.rb +150 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/scalar_column.rb +35 -77
- data/lib/datadog_api_client/v2/models/scalar_formula_response_atrributes.rb +4 -16
- data/lib/datadog_api_client/v2/models/scalar_meta.rb +96 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +11 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +11 -1
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_attributes.rb +22 -9
- data/lib/datadog_api_client/v2/models/timeseries_response_series.rb +4 -1
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +91 -3
|
@@ -0,0 +1,709 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V2 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'cgi'
|
|
17
|
+
|
|
18
|
+
module DatadogAPIClient::V2
|
|
19
|
+
class FastlyIntegrationAPI
|
|
20
|
+
attr_accessor :api_client
|
|
21
|
+
|
|
22
|
+
def initialize(api_client = DatadogAPIClient::APIClient.default)
|
|
23
|
+
@api_client = api_client
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Add Fastly account.
|
|
27
|
+
#
|
|
28
|
+
# @see #create_fastly_account_with_http_info
|
|
29
|
+
def create_fastly_account(body, opts = {})
|
|
30
|
+
data, _status_code, _headers = create_fastly_account_with_http_info(body, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Add Fastly account.
|
|
35
|
+
#
|
|
36
|
+
# Create a Fastly account.
|
|
37
|
+
#
|
|
38
|
+
# @param body [FastlyAccountCreateRequest]
|
|
39
|
+
# @param opts [Hash] the optional parameters
|
|
40
|
+
# @return [Array<(FastlyAccountResponse, Integer, Hash)>] FastlyAccountResponse data, response status code and response headers
|
|
41
|
+
def create_fastly_account_with_http_info(body, opts = {})
|
|
42
|
+
|
|
43
|
+
if @api_client.config.debugging
|
|
44
|
+
@api_client.config.logger.debug 'Calling API: FastlyIntegrationAPI.create_fastly_account ...'
|
|
45
|
+
end
|
|
46
|
+
# verify the required parameter 'body' is set
|
|
47
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
48
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling FastlyIntegrationAPI.create_fastly_account"
|
|
49
|
+
end
|
|
50
|
+
# resource path
|
|
51
|
+
local_var_path = '/api/v2/integrations/fastly/accounts'
|
|
52
|
+
|
|
53
|
+
# query parameters
|
|
54
|
+
query_params = opts[:query_params] || {}
|
|
55
|
+
|
|
56
|
+
# header parameters
|
|
57
|
+
header_params = opts[:header_params] || {}
|
|
58
|
+
# HTTP header 'Accept' (if needed)
|
|
59
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
60
|
+
# HTTP header 'Content-Type'
|
|
61
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
62
|
+
|
|
63
|
+
# form parameters
|
|
64
|
+
form_params = opts[:form_params] || {}
|
|
65
|
+
|
|
66
|
+
# http body (model)
|
|
67
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
68
|
+
|
|
69
|
+
# return_type
|
|
70
|
+
return_type = opts[:debug_return_type] || 'FastlyAccountResponse'
|
|
71
|
+
|
|
72
|
+
# auth_names
|
|
73
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
74
|
+
|
|
75
|
+
new_options = opts.merge(
|
|
76
|
+
:operation => :create_fastly_account,
|
|
77
|
+
:header_params => header_params,
|
|
78
|
+
:query_params => query_params,
|
|
79
|
+
:form_params => form_params,
|
|
80
|
+
:body => post_body,
|
|
81
|
+
:auth_names => auth_names,
|
|
82
|
+
:return_type => return_type,
|
|
83
|
+
:api_version => "V2"
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
87
|
+
if @api_client.config.debugging
|
|
88
|
+
@api_client.config.logger.debug "API called: FastlyIntegrationAPI#create_fastly_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
89
|
+
end
|
|
90
|
+
return data, status_code, headers
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Add Fastly service.
|
|
94
|
+
#
|
|
95
|
+
# @see #create_fastly_service_with_http_info
|
|
96
|
+
def create_fastly_service(account_id, body, opts = {})
|
|
97
|
+
data, _status_code, _headers = create_fastly_service_with_http_info(account_id, body, opts)
|
|
98
|
+
data
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Add Fastly service.
|
|
102
|
+
#
|
|
103
|
+
# Create a Fastly service for an account.
|
|
104
|
+
#
|
|
105
|
+
# @param account_id [String] Fastly Account id.
|
|
106
|
+
# @param body [FastlyServiceRequest]
|
|
107
|
+
# @param opts [Hash] the optional parameters
|
|
108
|
+
# @return [Array<(FastlyServiceResponse, Integer, Hash)>] FastlyServiceResponse data, response status code and response headers
|
|
109
|
+
def create_fastly_service_with_http_info(account_id, body, opts = {})
|
|
110
|
+
|
|
111
|
+
if @api_client.config.debugging
|
|
112
|
+
@api_client.config.logger.debug 'Calling API: FastlyIntegrationAPI.create_fastly_service ...'
|
|
113
|
+
end
|
|
114
|
+
# verify the required parameter 'account_id' is set
|
|
115
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
116
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling FastlyIntegrationAPI.create_fastly_service"
|
|
117
|
+
end
|
|
118
|
+
# verify the required parameter 'body' is set
|
|
119
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
120
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling FastlyIntegrationAPI.create_fastly_service"
|
|
121
|
+
end
|
|
122
|
+
# resource path
|
|
123
|
+
local_var_path = '/api/v2/integrations/fastly/accounts/{account_id}/services'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/'))
|
|
124
|
+
|
|
125
|
+
# query parameters
|
|
126
|
+
query_params = opts[:query_params] || {}
|
|
127
|
+
|
|
128
|
+
# header parameters
|
|
129
|
+
header_params = opts[:header_params] || {}
|
|
130
|
+
# HTTP header 'Accept' (if needed)
|
|
131
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
132
|
+
# HTTP header 'Content-Type'
|
|
133
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
134
|
+
|
|
135
|
+
# form parameters
|
|
136
|
+
form_params = opts[:form_params] || {}
|
|
137
|
+
|
|
138
|
+
# http body (model)
|
|
139
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
140
|
+
|
|
141
|
+
# return_type
|
|
142
|
+
return_type = opts[:debug_return_type] || 'FastlyServiceResponse'
|
|
143
|
+
|
|
144
|
+
# auth_names
|
|
145
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
146
|
+
|
|
147
|
+
new_options = opts.merge(
|
|
148
|
+
:operation => :create_fastly_service,
|
|
149
|
+
:header_params => header_params,
|
|
150
|
+
:query_params => query_params,
|
|
151
|
+
:form_params => form_params,
|
|
152
|
+
:body => post_body,
|
|
153
|
+
:auth_names => auth_names,
|
|
154
|
+
:return_type => return_type,
|
|
155
|
+
:api_version => "V2"
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
159
|
+
if @api_client.config.debugging
|
|
160
|
+
@api_client.config.logger.debug "API called: FastlyIntegrationAPI#create_fastly_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
161
|
+
end
|
|
162
|
+
return data, status_code, headers
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Delete Fastly account.
|
|
166
|
+
#
|
|
167
|
+
# @see #delete_fastly_account_with_http_info
|
|
168
|
+
def delete_fastly_account(account_id, opts = {})
|
|
169
|
+
delete_fastly_account_with_http_info(account_id, opts)
|
|
170
|
+
nil
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Delete Fastly account.
|
|
174
|
+
#
|
|
175
|
+
# Delete a Fastly account.
|
|
176
|
+
#
|
|
177
|
+
# @param account_id [String] Fastly Account id.
|
|
178
|
+
# @param opts [Hash] the optional parameters
|
|
179
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
180
|
+
def delete_fastly_account_with_http_info(account_id, opts = {})
|
|
181
|
+
|
|
182
|
+
if @api_client.config.debugging
|
|
183
|
+
@api_client.config.logger.debug 'Calling API: FastlyIntegrationAPI.delete_fastly_account ...'
|
|
184
|
+
end
|
|
185
|
+
# verify the required parameter 'account_id' is set
|
|
186
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
187
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling FastlyIntegrationAPI.delete_fastly_account"
|
|
188
|
+
end
|
|
189
|
+
# resource path
|
|
190
|
+
local_var_path = '/api/v2/integrations/fastly/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/'))
|
|
191
|
+
|
|
192
|
+
# query parameters
|
|
193
|
+
query_params = opts[:query_params] || {}
|
|
194
|
+
|
|
195
|
+
# header parameters
|
|
196
|
+
header_params = opts[:header_params] || {}
|
|
197
|
+
# HTTP header 'Accept' (if needed)
|
|
198
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
199
|
+
|
|
200
|
+
# form parameters
|
|
201
|
+
form_params = opts[:form_params] || {}
|
|
202
|
+
|
|
203
|
+
# http body (model)
|
|
204
|
+
post_body = opts[:debug_body]
|
|
205
|
+
|
|
206
|
+
# return_type
|
|
207
|
+
return_type = opts[:debug_return_type]
|
|
208
|
+
|
|
209
|
+
# auth_names
|
|
210
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
211
|
+
|
|
212
|
+
new_options = opts.merge(
|
|
213
|
+
:operation => :delete_fastly_account,
|
|
214
|
+
:header_params => header_params,
|
|
215
|
+
:query_params => query_params,
|
|
216
|
+
:form_params => form_params,
|
|
217
|
+
:body => post_body,
|
|
218
|
+
:auth_names => auth_names,
|
|
219
|
+
:return_type => return_type,
|
|
220
|
+
:api_version => "V2"
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
|
224
|
+
if @api_client.config.debugging
|
|
225
|
+
@api_client.config.logger.debug "API called: FastlyIntegrationAPI#delete_fastly_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
226
|
+
end
|
|
227
|
+
return data, status_code, headers
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Delete Fastly service.
|
|
231
|
+
#
|
|
232
|
+
# @see #delete_fastly_service_with_http_info
|
|
233
|
+
def delete_fastly_service(account_id, service_id, opts = {})
|
|
234
|
+
delete_fastly_service_with_http_info(account_id, service_id, opts)
|
|
235
|
+
nil
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Delete Fastly service.
|
|
239
|
+
#
|
|
240
|
+
# Delete a Fastly service for an account.
|
|
241
|
+
#
|
|
242
|
+
# @param account_id [String] Fastly Account id.
|
|
243
|
+
# @param service_id [String] Fastly Service ID.
|
|
244
|
+
# @param opts [Hash] the optional parameters
|
|
245
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
246
|
+
def delete_fastly_service_with_http_info(account_id, service_id, opts = {})
|
|
247
|
+
|
|
248
|
+
if @api_client.config.debugging
|
|
249
|
+
@api_client.config.logger.debug 'Calling API: FastlyIntegrationAPI.delete_fastly_service ...'
|
|
250
|
+
end
|
|
251
|
+
# verify the required parameter 'account_id' is set
|
|
252
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
253
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling FastlyIntegrationAPI.delete_fastly_service"
|
|
254
|
+
end
|
|
255
|
+
# verify the required parameter 'service_id' is set
|
|
256
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
|
257
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling FastlyIntegrationAPI.delete_fastly_service"
|
|
258
|
+
end
|
|
259
|
+
# resource path
|
|
260
|
+
local_var_path = '/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')).sub('{service_id}', CGI.escape(service_id.to_s).gsub('%2F', '/'))
|
|
261
|
+
|
|
262
|
+
# query parameters
|
|
263
|
+
query_params = opts[:query_params] || {}
|
|
264
|
+
|
|
265
|
+
# header parameters
|
|
266
|
+
header_params = opts[:header_params] || {}
|
|
267
|
+
# HTTP header 'Accept' (if needed)
|
|
268
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
269
|
+
|
|
270
|
+
# form parameters
|
|
271
|
+
form_params = opts[:form_params] || {}
|
|
272
|
+
|
|
273
|
+
# http body (model)
|
|
274
|
+
post_body = opts[:debug_body]
|
|
275
|
+
|
|
276
|
+
# return_type
|
|
277
|
+
return_type = opts[:debug_return_type]
|
|
278
|
+
|
|
279
|
+
# auth_names
|
|
280
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
281
|
+
|
|
282
|
+
new_options = opts.merge(
|
|
283
|
+
:operation => :delete_fastly_service,
|
|
284
|
+
:header_params => header_params,
|
|
285
|
+
:query_params => query_params,
|
|
286
|
+
:form_params => form_params,
|
|
287
|
+
:body => post_body,
|
|
288
|
+
:auth_names => auth_names,
|
|
289
|
+
:return_type => return_type,
|
|
290
|
+
:api_version => "V2"
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
|
294
|
+
if @api_client.config.debugging
|
|
295
|
+
@api_client.config.logger.debug "API called: FastlyIntegrationAPI#delete_fastly_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
296
|
+
end
|
|
297
|
+
return data, status_code, headers
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# Get Fastly account.
|
|
301
|
+
#
|
|
302
|
+
# @see #get_fastly_account_with_http_info
|
|
303
|
+
def get_fastly_account(account_id, opts = {})
|
|
304
|
+
data, _status_code, _headers = get_fastly_account_with_http_info(account_id, opts)
|
|
305
|
+
data
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Get Fastly account.
|
|
309
|
+
#
|
|
310
|
+
# Get a Fastly account.
|
|
311
|
+
#
|
|
312
|
+
# @param account_id [String] Fastly Account id.
|
|
313
|
+
# @param opts [Hash] the optional parameters
|
|
314
|
+
# @return [Array<(FastlyAccountResponse, Integer, Hash)>] FastlyAccountResponse data, response status code and response headers
|
|
315
|
+
def get_fastly_account_with_http_info(account_id, opts = {})
|
|
316
|
+
|
|
317
|
+
if @api_client.config.debugging
|
|
318
|
+
@api_client.config.logger.debug 'Calling API: FastlyIntegrationAPI.get_fastly_account ...'
|
|
319
|
+
end
|
|
320
|
+
# verify the required parameter 'account_id' is set
|
|
321
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
322
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling FastlyIntegrationAPI.get_fastly_account"
|
|
323
|
+
end
|
|
324
|
+
# resource path
|
|
325
|
+
local_var_path = '/api/v2/integrations/fastly/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/'))
|
|
326
|
+
|
|
327
|
+
# query parameters
|
|
328
|
+
query_params = opts[:query_params] || {}
|
|
329
|
+
|
|
330
|
+
# header parameters
|
|
331
|
+
header_params = opts[:header_params] || {}
|
|
332
|
+
# HTTP header 'Accept' (if needed)
|
|
333
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
334
|
+
|
|
335
|
+
# form parameters
|
|
336
|
+
form_params = opts[:form_params] || {}
|
|
337
|
+
|
|
338
|
+
# http body (model)
|
|
339
|
+
post_body = opts[:debug_body]
|
|
340
|
+
|
|
341
|
+
# return_type
|
|
342
|
+
return_type = opts[:debug_return_type] || 'FastlyAccountResponse'
|
|
343
|
+
|
|
344
|
+
# auth_names
|
|
345
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
346
|
+
|
|
347
|
+
new_options = opts.merge(
|
|
348
|
+
:operation => :get_fastly_account,
|
|
349
|
+
:header_params => header_params,
|
|
350
|
+
:query_params => query_params,
|
|
351
|
+
:form_params => form_params,
|
|
352
|
+
:body => post_body,
|
|
353
|
+
:auth_names => auth_names,
|
|
354
|
+
:return_type => return_type,
|
|
355
|
+
:api_version => "V2"
|
|
356
|
+
)
|
|
357
|
+
|
|
358
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
359
|
+
if @api_client.config.debugging
|
|
360
|
+
@api_client.config.logger.debug "API called: FastlyIntegrationAPI#get_fastly_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
361
|
+
end
|
|
362
|
+
return data, status_code, headers
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
# Get Fastly service.
|
|
366
|
+
#
|
|
367
|
+
# @see #get_fastly_service_with_http_info
|
|
368
|
+
def get_fastly_service(account_id, service_id, opts = {})
|
|
369
|
+
data, _status_code, _headers = get_fastly_service_with_http_info(account_id, service_id, opts)
|
|
370
|
+
data
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
# Get Fastly service.
|
|
374
|
+
#
|
|
375
|
+
# Get a Fastly service for an account.
|
|
376
|
+
#
|
|
377
|
+
# @param account_id [String] Fastly Account id.
|
|
378
|
+
# @param service_id [String] Fastly Service ID.
|
|
379
|
+
# @param opts [Hash] the optional parameters
|
|
380
|
+
# @return [Array<(FastlyServiceResponse, Integer, Hash)>] FastlyServiceResponse data, response status code and response headers
|
|
381
|
+
def get_fastly_service_with_http_info(account_id, service_id, opts = {})
|
|
382
|
+
|
|
383
|
+
if @api_client.config.debugging
|
|
384
|
+
@api_client.config.logger.debug 'Calling API: FastlyIntegrationAPI.get_fastly_service ...'
|
|
385
|
+
end
|
|
386
|
+
# verify the required parameter 'account_id' is set
|
|
387
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
388
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling FastlyIntegrationAPI.get_fastly_service"
|
|
389
|
+
end
|
|
390
|
+
# verify the required parameter 'service_id' is set
|
|
391
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
|
392
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling FastlyIntegrationAPI.get_fastly_service"
|
|
393
|
+
end
|
|
394
|
+
# resource path
|
|
395
|
+
local_var_path = '/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')).sub('{service_id}', CGI.escape(service_id.to_s).gsub('%2F', '/'))
|
|
396
|
+
|
|
397
|
+
# query parameters
|
|
398
|
+
query_params = opts[:query_params] || {}
|
|
399
|
+
|
|
400
|
+
# header parameters
|
|
401
|
+
header_params = opts[:header_params] || {}
|
|
402
|
+
# HTTP header 'Accept' (if needed)
|
|
403
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
404
|
+
|
|
405
|
+
# form parameters
|
|
406
|
+
form_params = opts[:form_params] || {}
|
|
407
|
+
|
|
408
|
+
# http body (model)
|
|
409
|
+
post_body = opts[:debug_body]
|
|
410
|
+
|
|
411
|
+
# return_type
|
|
412
|
+
return_type = opts[:debug_return_type] || 'FastlyServiceResponse'
|
|
413
|
+
|
|
414
|
+
# auth_names
|
|
415
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
416
|
+
|
|
417
|
+
new_options = opts.merge(
|
|
418
|
+
:operation => :get_fastly_service,
|
|
419
|
+
:header_params => header_params,
|
|
420
|
+
:query_params => query_params,
|
|
421
|
+
:form_params => form_params,
|
|
422
|
+
:body => post_body,
|
|
423
|
+
:auth_names => auth_names,
|
|
424
|
+
:return_type => return_type,
|
|
425
|
+
:api_version => "V2"
|
|
426
|
+
)
|
|
427
|
+
|
|
428
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
429
|
+
if @api_client.config.debugging
|
|
430
|
+
@api_client.config.logger.debug "API called: FastlyIntegrationAPI#get_fastly_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
431
|
+
end
|
|
432
|
+
return data, status_code, headers
|
|
433
|
+
end
|
|
434
|
+
|
|
435
|
+
# List Fastly accounts.
|
|
436
|
+
#
|
|
437
|
+
# @see #list_fastly_accounts_with_http_info
|
|
438
|
+
def list_fastly_accounts(opts = {})
|
|
439
|
+
data, _status_code, _headers = list_fastly_accounts_with_http_info(opts)
|
|
440
|
+
data
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
# List Fastly accounts.
|
|
444
|
+
#
|
|
445
|
+
# List Fastly accounts.
|
|
446
|
+
#
|
|
447
|
+
# @param opts [Hash] the optional parameters
|
|
448
|
+
# @return [Array<(FastlyAccountsResponse, Integer, Hash)>] FastlyAccountsResponse data, response status code and response headers
|
|
449
|
+
def list_fastly_accounts_with_http_info(opts = {})
|
|
450
|
+
|
|
451
|
+
if @api_client.config.debugging
|
|
452
|
+
@api_client.config.logger.debug 'Calling API: FastlyIntegrationAPI.list_fastly_accounts ...'
|
|
453
|
+
end
|
|
454
|
+
# resource path
|
|
455
|
+
local_var_path = '/api/v2/integrations/fastly/accounts'
|
|
456
|
+
|
|
457
|
+
# query parameters
|
|
458
|
+
query_params = opts[:query_params] || {}
|
|
459
|
+
|
|
460
|
+
# header parameters
|
|
461
|
+
header_params = opts[:header_params] || {}
|
|
462
|
+
# HTTP header 'Accept' (if needed)
|
|
463
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
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] || 'FastlyAccountsResponse'
|
|
473
|
+
|
|
474
|
+
# auth_names
|
|
475
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
476
|
+
|
|
477
|
+
new_options = opts.merge(
|
|
478
|
+
:operation => :list_fastly_accounts,
|
|
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
|
+
:api_version => "V2"
|
|
486
|
+
)
|
|
487
|
+
|
|
488
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
489
|
+
if @api_client.config.debugging
|
|
490
|
+
@api_client.config.logger.debug "API called: FastlyIntegrationAPI#list_fastly_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
491
|
+
end
|
|
492
|
+
return data, status_code, headers
|
|
493
|
+
end
|
|
494
|
+
|
|
495
|
+
# List Fastly services.
|
|
496
|
+
#
|
|
497
|
+
# @see #list_fastly_services_with_http_info
|
|
498
|
+
def list_fastly_services(account_id, opts = {})
|
|
499
|
+
data, _status_code, _headers = list_fastly_services_with_http_info(account_id, opts)
|
|
500
|
+
data
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
# List Fastly services.
|
|
504
|
+
#
|
|
505
|
+
# List Fastly services for an account.
|
|
506
|
+
#
|
|
507
|
+
# @param account_id [String] Fastly Account id.
|
|
508
|
+
# @param opts [Hash] the optional parameters
|
|
509
|
+
# @return [Array<(FastlyServicesResponse, Integer, Hash)>] FastlyServicesResponse data, response status code and response headers
|
|
510
|
+
def list_fastly_services_with_http_info(account_id, opts = {})
|
|
511
|
+
|
|
512
|
+
if @api_client.config.debugging
|
|
513
|
+
@api_client.config.logger.debug 'Calling API: FastlyIntegrationAPI.list_fastly_services ...'
|
|
514
|
+
end
|
|
515
|
+
# verify the required parameter 'account_id' is set
|
|
516
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
517
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling FastlyIntegrationAPI.list_fastly_services"
|
|
518
|
+
end
|
|
519
|
+
# resource path
|
|
520
|
+
local_var_path = '/api/v2/integrations/fastly/accounts/{account_id}/services'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/'))
|
|
521
|
+
|
|
522
|
+
# query parameters
|
|
523
|
+
query_params = opts[:query_params] || {}
|
|
524
|
+
|
|
525
|
+
# header parameters
|
|
526
|
+
header_params = opts[:header_params] || {}
|
|
527
|
+
# HTTP header 'Accept' (if needed)
|
|
528
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
529
|
+
|
|
530
|
+
# form parameters
|
|
531
|
+
form_params = opts[:form_params] || {}
|
|
532
|
+
|
|
533
|
+
# http body (model)
|
|
534
|
+
post_body = opts[:debug_body]
|
|
535
|
+
|
|
536
|
+
# return_type
|
|
537
|
+
return_type = opts[:debug_return_type] || 'FastlyServicesResponse'
|
|
538
|
+
|
|
539
|
+
# auth_names
|
|
540
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
541
|
+
|
|
542
|
+
new_options = opts.merge(
|
|
543
|
+
:operation => :list_fastly_services,
|
|
544
|
+
:header_params => header_params,
|
|
545
|
+
:query_params => query_params,
|
|
546
|
+
:form_params => form_params,
|
|
547
|
+
:body => post_body,
|
|
548
|
+
:auth_names => auth_names,
|
|
549
|
+
:return_type => return_type,
|
|
550
|
+
:api_version => "V2"
|
|
551
|
+
)
|
|
552
|
+
|
|
553
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
554
|
+
if @api_client.config.debugging
|
|
555
|
+
@api_client.config.logger.debug "API called: FastlyIntegrationAPI#list_fastly_services\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
556
|
+
end
|
|
557
|
+
return data, status_code, headers
|
|
558
|
+
end
|
|
559
|
+
|
|
560
|
+
# Update Fastly account.
|
|
561
|
+
#
|
|
562
|
+
# @see #update_fastly_account_with_http_info
|
|
563
|
+
def update_fastly_account(account_id, body, opts = {})
|
|
564
|
+
data, _status_code, _headers = update_fastly_account_with_http_info(account_id, body, opts)
|
|
565
|
+
data
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
# Update Fastly account.
|
|
569
|
+
#
|
|
570
|
+
# Update a Fastly account.
|
|
571
|
+
#
|
|
572
|
+
# @param account_id [String] Fastly Account id.
|
|
573
|
+
# @param body [FastlyAccountUpdateRequest]
|
|
574
|
+
# @param opts [Hash] the optional parameters
|
|
575
|
+
# @return [Array<(FastlyAccountResponse, Integer, Hash)>] FastlyAccountResponse data, response status code and response headers
|
|
576
|
+
def update_fastly_account_with_http_info(account_id, body, opts = {})
|
|
577
|
+
|
|
578
|
+
if @api_client.config.debugging
|
|
579
|
+
@api_client.config.logger.debug 'Calling API: FastlyIntegrationAPI.update_fastly_account ...'
|
|
580
|
+
end
|
|
581
|
+
# verify the required parameter 'account_id' is set
|
|
582
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
583
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling FastlyIntegrationAPI.update_fastly_account"
|
|
584
|
+
end
|
|
585
|
+
# verify the required parameter 'body' is set
|
|
586
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
587
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling FastlyIntegrationAPI.update_fastly_account"
|
|
588
|
+
end
|
|
589
|
+
# resource path
|
|
590
|
+
local_var_path = '/api/v2/integrations/fastly/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/'))
|
|
591
|
+
|
|
592
|
+
# query parameters
|
|
593
|
+
query_params = opts[:query_params] || {}
|
|
594
|
+
|
|
595
|
+
# header parameters
|
|
596
|
+
header_params = opts[:header_params] || {}
|
|
597
|
+
# HTTP header 'Accept' (if needed)
|
|
598
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
599
|
+
# HTTP header 'Content-Type'
|
|
600
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
601
|
+
|
|
602
|
+
# form parameters
|
|
603
|
+
form_params = opts[:form_params] || {}
|
|
604
|
+
|
|
605
|
+
# http body (model)
|
|
606
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
607
|
+
|
|
608
|
+
# return_type
|
|
609
|
+
return_type = opts[:debug_return_type] || 'FastlyAccountResponse'
|
|
610
|
+
|
|
611
|
+
# auth_names
|
|
612
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
613
|
+
|
|
614
|
+
new_options = opts.merge(
|
|
615
|
+
:operation => :update_fastly_account,
|
|
616
|
+
:header_params => header_params,
|
|
617
|
+
:query_params => query_params,
|
|
618
|
+
:form_params => form_params,
|
|
619
|
+
:body => post_body,
|
|
620
|
+
:auth_names => auth_names,
|
|
621
|
+
:return_type => return_type,
|
|
622
|
+
:api_version => "V2"
|
|
623
|
+
)
|
|
624
|
+
|
|
625
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
|
|
626
|
+
if @api_client.config.debugging
|
|
627
|
+
@api_client.config.logger.debug "API called: FastlyIntegrationAPI#update_fastly_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
628
|
+
end
|
|
629
|
+
return data, status_code, headers
|
|
630
|
+
end
|
|
631
|
+
|
|
632
|
+
# Update Fastly service.
|
|
633
|
+
#
|
|
634
|
+
# @see #update_fastly_service_with_http_info
|
|
635
|
+
def update_fastly_service(account_id, service_id, body, opts = {})
|
|
636
|
+
data, _status_code, _headers = update_fastly_service_with_http_info(account_id, service_id, body, opts)
|
|
637
|
+
data
|
|
638
|
+
end
|
|
639
|
+
|
|
640
|
+
# Update Fastly service.
|
|
641
|
+
#
|
|
642
|
+
# Update a Fastly service for an account.
|
|
643
|
+
#
|
|
644
|
+
# @param account_id [String] Fastly Account id.
|
|
645
|
+
# @param service_id [String] Fastly Service ID.
|
|
646
|
+
# @param body [FastlyServiceRequest]
|
|
647
|
+
# @param opts [Hash] the optional parameters
|
|
648
|
+
# @return [Array<(FastlyServiceResponse, Integer, Hash)>] FastlyServiceResponse data, response status code and response headers
|
|
649
|
+
def update_fastly_service_with_http_info(account_id, service_id, body, opts = {})
|
|
650
|
+
|
|
651
|
+
if @api_client.config.debugging
|
|
652
|
+
@api_client.config.logger.debug 'Calling API: FastlyIntegrationAPI.update_fastly_service ...'
|
|
653
|
+
end
|
|
654
|
+
# verify the required parameter 'account_id' is set
|
|
655
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
656
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling FastlyIntegrationAPI.update_fastly_service"
|
|
657
|
+
end
|
|
658
|
+
# verify the required parameter 'service_id' is set
|
|
659
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
|
660
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling FastlyIntegrationAPI.update_fastly_service"
|
|
661
|
+
end
|
|
662
|
+
# verify the required parameter 'body' is set
|
|
663
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
664
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling FastlyIntegrationAPI.update_fastly_service"
|
|
665
|
+
end
|
|
666
|
+
# resource path
|
|
667
|
+
local_var_path = '/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')).sub('{service_id}', CGI.escape(service_id.to_s).gsub('%2F', '/'))
|
|
668
|
+
|
|
669
|
+
# query parameters
|
|
670
|
+
query_params = opts[:query_params] || {}
|
|
671
|
+
|
|
672
|
+
# header parameters
|
|
673
|
+
header_params = opts[:header_params] || {}
|
|
674
|
+
# HTTP header 'Accept' (if needed)
|
|
675
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
676
|
+
# HTTP header 'Content-Type'
|
|
677
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
678
|
+
|
|
679
|
+
# form parameters
|
|
680
|
+
form_params = opts[:form_params] || {}
|
|
681
|
+
|
|
682
|
+
# http body (model)
|
|
683
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
684
|
+
|
|
685
|
+
# return_type
|
|
686
|
+
return_type = opts[:debug_return_type] || 'FastlyServiceResponse'
|
|
687
|
+
|
|
688
|
+
# auth_names
|
|
689
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
690
|
+
|
|
691
|
+
new_options = opts.merge(
|
|
692
|
+
:operation => :update_fastly_service,
|
|
693
|
+
:header_params => header_params,
|
|
694
|
+
:query_params => query_params,
|
|
695
|
+
:form_params => form_params,
|
|
696
|
+
:body => post_body,
|
|
697
|
+
:auth_names => auth_names,
|
|
698
|
+
:return_type => return_type,
|
|
699
|
+
:api_version => "V2"
|
|
700
|
+
)
|
|
701
|
+
|
|
702
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
|
|
703
|
+
if @api_client.config.debugging
|
|
704
|
+
@api_client.config.logger.debug "API called: FastlyIntegrationAPI#update_fastly_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
705
|
+
end
|
|
706
|
+
return data, status_code, headers
|
|
707
|
+
end
|
|
708
|
+
end
|
|
709
|
+
end
|