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,355 @@
|
|
|
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 CloudflareIntegrationAPI
|
|
20
|
+
attr_accessor :api_client
|
|
21
|
+
|
|
22
|
+
def initialize(api_client = DatadogAPIClient::APIClient.default)
|
|
23
|
+
@api_client = api_client
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Add Cloudflare account.
|
|
27
|
+
#
|
|
28
|
+
# @see #create_cloudflare_account_with_http_info
|
|
29
|
+
def create_cloudflare_account(body, opts = {})
|
|
30
|
+
data, _status_code, _headers = create_cloudflare_account_with_http_info(body, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Add Cloudflare account.
|
|
35
|
+
#
|
|
36
|
+
# Create a Cloudflare account.
|
|
37
|
+
#
|
|
38
|
+
# @param body [CloudflareAccountCreateRequest]
|
|
39
|
+
# @param opts [Hash] the optional parameters
|
|
40
|
+
# @return [Array<(CloudflareAccountResponse, Integer, Hash)>] CloudflareAccountResponse data, response status code and response headers
|
|
41
|
+
def create_cloudflare_account_with_http_info(body, opts = {})
|
|
42
|
+
|
|
43
|
+
if @api_client.config.debugging
|
|
44
|
+
@api_client.config.logger.debug 'Calling API: CloudflareIntegrationAPI.create_cloudflare_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 CloudflareIntegrationAPI.create_cloudflare_account"
|
|
49
|
+
end
|
|
50
|
+
# resource path
|
|
51
|
+
local_var_path = '/api/v2/integrations/cloudflare/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] || 'CloudflareAccountResponse'
|
|
71
|
+
|
|
72
|
+
# auth_names
|
|
73
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
74
|
+
|
|
75
|
+
new_options = opts.merge(
|
|
76
|
+
:operation => :create_cloudflare_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: CloudflareIntegrationAPI#create_cloudflare_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
89
|
+
end
|
|
90
|
+
return data, status_code, headers
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Delete Cloudflare account.
|
|
94
|
+
#
|
|
95
|
+
# @see #delete_cloudflare_account_with_http_info
|
|
96
|
+
def delete_cloudflare_account(account_id, opts = {})
|
|
97
|
+
delete_cloudflare_account_with_http_info(account_id, opts)
|
|
98
|
+
nil
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Delete Cloudflare account.
|
|
102
|
+
#
|
|
103
|
+
# Delete a Cloudflare account.
|
|
104
|
+
#
|
|
105
|
+
# @param account_id [String] None
|
|
106
|
+
# @param opts [Hash] the optional parameters
|
|
107
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
108
|
+
def delete_cloudflare_account_with_http_info(account_id, opts = {})
|
|
109
|
+
|
|
110
|
+
if @api_client.config.debugging
|
|
111
|
+
@api_client.config.logger.debug 'Calling API: CloudflareIntegrationAPI.delete_cloudflare_account ...'
|
|
112
|
+
end
|
|
113
|
+
# verify the required parameter 'account_id' is set
|
|
114
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
115
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling CloudflareIntegrationAPI.delete_cloudflare_account"
|
|
116
|
+
end
|
|
117
|
+
# resource path
|
|
118
|
+
local_var_path = '/api/v2/integrations/cloudflare/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/'))
|
|
119
|
+
|
|
120
|
+
# query parameters
|
|
121
|
+
query_params = opts[:query_params] || {}
|
|
122
|
+
|
|
123
|
+
# header parameters
|
|
124
|
+
header_params = opts[:header_params] || {}
|
|
125
|
+
# HTTP header 'Accept' (if needed)
|
|
126
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
127
|
+
|
|
128
|
+
# form parameters
|
|
129
|
+
form_params = opts[:form_params] || {}
|
|
130
|
+
|
|
131
|
+
# http body (model)
|
|
132
|
+
post_body = opts[:debug_body]
|
|
133
|
+
|
|
134
|
+
# return_type
|
|
135
|
+
return_type = opts[:debug_return_type]
|
|
136
|
+
|
|
137
|
+
# auth_names
|
|
138
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
139
|
+
|
|
140
|
+
new_options = opts.merge(
|
|
141
|
+
:operation => :delete_cloudflare_account,
|
|
142
|
+
:header_params => header_params,
|
|
143
|
+
:query_params => query_params,
|
|
144
|
+
:form_params => form_params,
|
|
145
|
+
:body => post_body,
|
|
146
|
+
:auth_names => auth_names,
|
|
147
|
+
:return_type => return_type,
|
|
148
|
+
:api_version => "V2"
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
|
152
|
+
if @api_client.config.debugging
|
|
153
|
+
@api_client.config.logger.debug "API called: CloudflareIntegrationAPI#delete_cloudflare_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
154
|
+
end
|
|
155
|
+
return data, status_code, headers
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Get Cloudflare account.
|
|
159
|
+
#
|
|
160
|
+
# @see #get_cloudflare_account_with_http_info
|
|
161
|
+
def get_cloudflare_account(account_id, opts = {})
|
|
162
|
+
data, _status_code, _headers = get_cloudflare_account_with_http_info(account_id, opts)
|
|
163
|
+
data
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Get Cloudflare account.
|
|
167
|
+
#
|
|
168
|
+
# Get a Cloudflare account.
|
|
169
|
+
#
|
|
170
|
+
# @param account_id [String] None
|
|
171
|
+
# @param opts [Hash] the optional parameters
|
|
172
|
+
# @return [Array<(CloudflareAccountResponse, Integer, Hash)>] CloudflareAccountResponse data, response status code and response headers
|
|
173
|
+
def get_cloudflare_account_with_http_info(account_id, opts = {})
|
|
174
|
+
|
|
175
|
+
if @api_client.config.debugging
|
|
176
|
+
@api_client.config.logger.debug 'Calling API: CloudflareIntegrationAPI.get_cloudflare_account ...'
|
|
177
|
+
end
|
|
178
|
+
# verify the required parameter 'account_id' is set
|
|
179
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
180
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling CloudflareIntegrationAPI.get_cloudflare_account"
|
|
181
|
+
end
|
|
182
|
+
# resource path
|
|
183
|
+
local_var_path = '/api/v2/integrations/cloudflare/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/'))
|
|
184
|
+
|
|
185
|
+
# query parameters
|
|
186
|
+
query_params = opts[:query_params] || {}
|
|
187
|
+
|
|
188
|
+
# header parameters
|
|
189
|
+
header_params = opts[:header_params] || {}
|
|
190
|
+
# HTTP header 'Accept' (if needed)
|
|
191
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
192
|
+
|
|
193
|
+
# form parameters
|
|
194
|
+
form_params = opts[:form_params] || {}
|
|
195
|
+
|
|
196
|
+
# http body (model)
|
|
197
|
+
post_body = opts[:debug_body]
|
|
198
|
+
|
|
199
|
+
# return_type
|
|
200
|
+
return_type = opts[:debug_return_type] || 'CloudflareAccountResponse'
|
|
201
|
+
|
|
202
|
+
# auth_names
|
|
203
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
204
|
+
|
|
205
|
+
new_options = opts.merge(
|
|
206
|
+
:operation => :get_cloudflare_account,
|
|
207
|
+
:header_params => header_params,
|
|
208
|
+
:query_params => query_params,
|
|
209
|
+
:form_params => form_params,
|
|
210
|
+
:body => post_body,
|
|
211
|
+
:auth_names => auth_names,
|
|
212
|
+
:return_type => return_type,
|
|
213
|
+
:api_version => "V2"
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
217
|
+
if @api_client.config.debugging
|
|
218
|
+
@api_client.config.logger.debug "API called: CloudflareIntegrationAPI#get_cloudflare_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
219
|
+
end
|
|
220
|
+
return data, status_code, headers
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# List Cloudflare accounts.
|
|
224
|
+
#
|
|
225
|
+
# @see #list_cloudflare_accounts_with_http_info
|
|
226
|
+
def list_cloudflare_accounts(opts = {})
|
|
227
|
+
data, _status_code, _headers = list_cloudflare_accounts_with_http_info(opts)
|
|
228
|
+
data
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# List Cloudflare accounts.
|
|
232
|
+
#
|
|
233
|
+
# List Cloudflare accounts.
|
|
234
|
+
#
|
|
235
|
+
# @param opts [Hash] the optional parameters
|
|
236
|
+
# @return [Array<(CloudflareAccountsResponse, Integer, Hash)>] CloudflareAccountsResponse data, response status code and response headers
|
|
237
|
+
def list_cloudflare_accounts_with_http_info(opts = {})
|
|
238
|
+
|
|
239
|
+
if @api_client.config.debugging
|
|
240
|
+
@api_client.config.logger.debug 'Calling API: CloudflareIntegrationAPI.list_cloudflare_accounts ...'
|
|
241
|
+
end
|
|
242
|
+
# resource path
|
|
243
|
+
local_var_path = '/api/v2/integrations/cloudflare/accounts'
|
|
244
|
+
|
|
245
|
+
# query parameters
|
|
246
|
+
query_params = opts[:query_params] || {}
|
|
247
|
+
|
|
248
|
+
# header parameters
|
|
249
|
+
header_params = opts[:header_params] || {}
|
|
250
|
+
# HTTP header 'Accept' (if needed)
|
|
251
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
252
|
+
|
|
253
|
+
# form parameters
|
|
254
|
+
form_params = opts[:form_params] || {}
|
|
255
|
+
|
|
256
|
+
# http body (model)
|
|
257
|
+
post_body = opts[:debug_body]
|
|
258
|
+
|
|
259
|
+
# return_type
|
|
260
|
+
return_type = opts[:debug_return_type] || 'CloudflareAccountsResponse'
|
|
261
|
+
|
|
262
|
+
# auth_names
|
|
263
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
264
|
+
|
|
265
|
+
new_options = opts.merge(
|
|
266
|
+
:operation => :list_cloudflare_accounts,
|
|
267
|
+
:header_params => header_params,
|
|
268
|
+
:query_params => query_params,
|
|
269
|
+
:form_params => form_params,
|
|
270
|
+
:body => post_body,
|
|
271
|
+
:auth_names => auth_names,
|
|
272
|
+
:return_type => return_type,
|
|
273
|
+
:api_version => "V2"
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
277
|
+
if @api_client.config.debugging
|
|
278
|
+
@api_client.config.logger.debug "API called: CloudflareIntegrationAPI#list_cloudflare_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
279
|
+
end
|
|
280
|
+
return data, status_code, headers
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
# Update Cloudflare account.
|
|
284
|
+
#
|
|
285
|
+
# @see #update_cloudflare_account_with_http_info
|
|
286
|
+
def update_cloudflare_account(account_id, body, opts = {})
|
|
287
|
+
data, _status_code, _headers = update_cloudflare_account_with_http_info(account_id, body, opts)
|
|
288
|
+
data
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# Update Cloudflare account.
|
|
292
|
+
#
|
|
293
|
+
# Update a Cloudflare account.
|
|
294
|
+
#
|
|
295
|
+
# @param account_id [String] None
|
|
296
|
+
# @param body [CloudflareAccountUpdateRequest]
|
|
297
|
+
# @param opts [Hash] the optional parameters
|
|
298
|
+
# @return [Array<(CloudflareAccountResponse, Integer, Hash)>] CloudflareAccountResponse data, response status code and response headers
|
|
299
|
+
def update_cloudflare_account_with_http_info(account_id, body, opts = {})
|
|
300
|
+
|
|
301
|
+
if @api_client.config.debugging
|
|
302
|
+
@api_client.config.logger.debug 'Calling API: CloudflareIntegrationAPI.update_cloudflare_account ...'
|
|
303
|
+
end
|
|
304
|
+
# verify the required parameter 'account_id' is set
|
|
305
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
306
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling CloudflareIntegrationAPI.update_cloudflare_account"
|
|
307
|
+
end
|
|
308
|
+
# verify the required parameter 'body' is set
|
|
309
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
310
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling CloudflareIntegrationAPI.update_cloudflare_account"
|
|
311
|
+
end
|
|
312
|
+
# resource path
|
|
313
|
+
local_var_path = '/api/v2/integrations/cloudflare/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/'))
|
|
314
|
+
|
|
315
|
+
# query parameters
|
|
316
|
+
query_params = opts[:query_params] || {}
|
|
317
|
+
|
|
318
|
+
# header parameters
|
|
319
|
+
header_params = opts[:header_params] || {}
|
|
320
|
+
# HTTP header 'Accept' (if needed)
|
|
321
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
322
|
+
# HTTP header 'Content-Type'
|
|
323
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
324
|
+
|
|
325
|
+
# form parameters
|
|
326
|
+
form_params = opts[:form_params] || {}
|
|
327
|
+
|
|
328
|
+
# http body (model)
|
|
329
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
330
|
+
|
|
331
|
+
# return_type
|
|
332
|
+
return_type = opts[:debug_return_type] || 'CloudflareAccountResponse'
|
|
333
|
+
|
|
334
|
+
# auth_names
|
|
335
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
336
|
+
|
|
337
|
+
new_options = opts.merge(
|
|
338
|
+
:operation => :update_cloudflare_account,
|
|
339
|
+
:header_params => header_params,
|
|
340
|
+
:query_params => query_params,
|
|
341
|
+
:form_params => form_params,
|
|
342
|
+
:body => post_body,
|
|
343
|
+
:auth_names => auth_names,
|
|
344
|
+
:return_type => return_type,
|
|
345
|
+
:api_version => "V2"
|
|
346
|
+
)
|
|
347
|
+
|
|
348
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
|
|
349
|
+
if @api_client.config.debugging
|
|
350
|
+
@api_client.config.logger.debug "API called: CloudflareIntegrationAPI#update_cloudflare_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
351
|
+
end
|
|
352
|
+
return data, status_code, headers
|
|
353
|
+
end
|
|
354
|
+
end
|
|
355
|
+
end
|