@@ -90,6 +90,72 @@ def create_logs_index_with_http_info(body, opts = {})
90
90
return data , status_code , headers
91
91
end
92
92
93
+ # Delete an index.
94
+ #
95
+ # @see #delete_logs_index_with_http_info
96
+ def delete_logs_index ( name , opts = { } )
97
+ data , _status_code , _headers = delete_logs_index_with_http_info ( name , opts )
98
+ data
99
+ end
100
+
101
+ # Delete an index.
102
+ #
103
+ # Delete an existing index from your organization. Index deletions are permanent and cannot be reverted.
104
+ # You cannot recreate an index with the same name as deleted ones.
105
+ #
106
+ # @param name [String] Name of the log index.
107
+ # @param opts [Hash] the optional parameters
108
+ # @return [Array<(LogsIndex, Integer, Hash)>] LogsIndex data, response status code and response headers
109
+ def delete_logs_index_with_http_info ( name , opts = { } )
110
+
111
+ if @api_client . config . debugging
112
+ @api_client . config . logger . debug 'Calling API: LogsIndexesAPI.delete_logs_index ...'
113
+ end
114
+ # verify the required parameter 'name' is set
115
+ if @api_client . config . client_side_validation && name . nil?
116
+ fail ArgumentError , "Missing the required parameter 'name' when calling LogsIndexesAPI.delete_logs_index"
117
+ end
118
+ # resource path
119
+ local_var_path = '/api/v1/logs/config/indexes/{name}' . sub ( '{name}' , CGI . escape ( name . to_s ) . gsub ( '%2F' , '/' ) )
120
+
121
+ # query parameters
122
+ query_params = opts [ :query_params ] || { }
123
+
124
+ # header parameters
125
+ header_params = opts [ :header_params ] || { }
126
+ # HTTP header 'Accept' (if needed)
127
+ header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] )
128
+
129
+ # form parameters
130
+ form_params = opts [ :form_params ] || { }
131
+
132
+ # http body (model)
133
+ post_body = opts [ :debug_body ]
134
+
135
+ # return_type
136
+ return_type = opts [ :debug_return_type ] || 'LogsIndex'
137
+
138
+ # auth_names
139
+ auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth ]
140
+
141
+ new_options = opts . merge (
142
+ :operation => :delete_logs_index ,
143
+ :header_params => header_params ,
144
+ :query_params => query_params ,
145
+ :form_params => form_params ,
146
+ :body => post_body ,
147
+ :auth_names => auth_names ,
148
+ :return_type => return_type ,
149
+ :api_version => "V1"
150
+ )
151
+
152
+ data , status_code , headers = @api_client . call_api ( Net ::HTTP ::Delete , local_var_path , new_options )
153
+ if @api_client . config . debugging
154
+ @api_client . config . logger . debug "API called: LogsIndexesAPI#delete_logs_index\n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
155
+ end
156
+ return data , status_code , headers
157
+ end
158
+
93
159
# Get an index.
94
160
#
95
161
# @see #get_logs_index_with_http_info
0 commit comments