@@ -35,6 +35,19 @@ def create_dataset(body, opts = {})
3535 #
3636 # Create a dataset with the configurations in the request.
3737 #
38+ # ### Datasets Constraints
39+ #
40+ # - **Tag Limit per Dataset**:
41+ # - Each Restricted Dataset supports a maximum of 10 key:value pairs.
42+ #
43+ # - **Tag Key Rules per Telemetry Type**:
44+ # - Only one tag key or attribute may be used to define access within a single telemetry type.
45+ # - The same or different tag key may be used across different telemetry types.
46+ #
47+ # - **Tag Value Uniqueness**:
48+ # - Tag values must be unique within a single dataset.
49+ # - A tag value used in one dataset cannot be reused in another dataset of the same telemetry type.
50+ #
3851 # @param body [DatasetCreateRequest] Dataset payload
3952 # @param opts [Hash] the optional parameters
4053 # @return [Array<(DatasetResponseSingle, Integer, Hash)>] DatasetResponseSingle data, response status code and response headers
@@ -155,6 +168,91 @@ def delete_dataset_with_http_info(dataset_id, opts = {})
155168 return data , status_code , headers
156169 end
157170
171+ # Edits a dataset.
172+ #
173+ # @see #edit_dataset_with_http_info
174+ def edit_dataset ( dataset_id , body , opts = { } )
175+ data , _status_code , _headers = edit_dataset_with_http_info ( dataset_id , body , opts )
176+ data
177+ end
178+
179+ # Edits a dataset.
180+ #
181+ # Edits the dataset associated with the ID.
182+ #
183+ # ### Datasets Constraints
184+ #
185+ # - **Tag Limit per Dataset**:
186+ # - Each Restricted Dataset supports a maximum of 10 key:value pairs.
187+ #
188+ # - **Tag Key Rules per Telemetry Type**:
189+ # - Only one tag key or attribute may be used to define access within a single telemetry type.
190+ # - The same or different tag key may be used across different telemetry types.
191+ #
192+ # - **Tag Value Uniqueness**:
193+ # - Tag values must be unique within a single dataset.
194+ # - A tag value used in one dataset cannot be reused in another dataset of the same telemetry type.
195+ #
196+ # @param dataset_id [String] The ID of a defined dataset.
197+ # @param body [DatasetEditRequest] Dataset payload
198+ # @param opts [Hash] the optional parameters
199+ # @return [Array<(DatasetResponseSingle, Integer, Hash)>] DatasetResponseSingle data, response status code and response headers
200+ def edit_dataset_with_http_info ( dataset_id , body , opts = { } )
201+
202+ if @api_client . config . debugging
203+ @api_client . config . logger . debug 'Calling API: DatasetsAPI.edit_dataset ...'
204+ end
205+ # verify the required parameter 'dataset_id' is set
206+ if @api_client . config . client_side_validation && dataset_id . nil?
207+ fail ArgumentError , "Missing the required parameter 'dataset_id' when calling DatasetsAPI.edit_dataset"
208+ end
209+ # verify the required parameter 'body' is set
210+ if @api_client . config . client_side_validation && body . nil?
211+ fail ArgumentError , "Missing the required parameter 'body' when calling DatasetsAPI.edit_dataset"
212+ end
213+ # resource path
214+ local_var_path = '/api/v2/datasets/{dataset_id}' . sub ( '{dataset_id}' , CGI . escape ( dataset_id . to_s ) . gsub ( '%2F' , '/' ) )
215+
216+ # query parameters
217+ query_params = opts [ :query_params ] || { }
218+
219+ # header parameters
220+ header_params = opts [ :header_params ] || { }
221+ # HTTP header 'Accept' (if needed)
222+ header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] )
223+ # HTTP header 'Content-Type'
224+ header_params [ 'Content-Type' ] = @api_client . select_header_content_type ( [ 'application/json' ] )
225+
226+ # form parameters
227+ form_params = opts [ :form_params ] || { }
228+
229+ # http body (model)
230+ post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( body )
231+
232+ # return_type
233+ return_type = opts [ :debug_return_type ] || 'DatasetResponseSingle'
234+
235+ # auth_names
236+ auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth , :AuthZ ]
237+
238+ new_options = opts . merge (
239+ :operation => :edit_dataset ,
240+ :header_params => header_params ,
241+ :query_params => query_params ,
242+ :form_params => form_params ,
243+ :body => post_body ,
244+ :auth_names => auth_names ,
245+ :return_type => return_type ,
246+ :api_version => "V2"
247+ )
248+
249+ data , status_code , headers = @api_client . call_api ( Net ::HTTP ::Put , local_var_path , new_options )
250+ if @api_client . config . debugging
251+ @api_client . config . logger . debug "API called: DatasetsAPI#edit_dataset\n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
252+ end
253+ return data , status_code , headers
254+ end
255+
158256 # Get all datasets.
159257 #
160258 # @see #get_all_datasets_with_http_info
0 commit comments