Class: DatadogAPIClient::V2::SoftwareCatalogAPI
- Inherits:
-
Object
- Object
- DatadogAPIClient::V2::SoftwareCatalogAPI
- Defined in:
- lib/datadog_api_client/v2/api/software_catalog_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_catalog_entity(entity_id, opts = {}) ⇒ Object
Delete a single entity.
-
#delete_catalog_entity_with_http_info(entity_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a single entity.
-
#delete_catalog_kind(kind_id, opts = {}) ⇒ Object
Delete a single kind.
-
#delete_catalog_kind_with_http_info(kind_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a single kind.
-
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ SoftwareCatalogAPI
constructor
A new instance of SoftwareCatalogAPI.
-
#list_catalog_entity(opts = {}) ⇒ Object
Get a list of entities.
-
#list_catalog_entity_with_http_info(opts = {}) ⇒ Array<(ListEntityCatalogResponse, Integer, Hash)>
Get a list of entities.
-
#list_catalog_entity_with_pagination(opts = {}) {|EntityData| ... } ⇒ Object
Get a list of entities.
-
#list_catalog_kind(opts = {}) ⇒ Object
Get a list of entity kinds.
-
#list_catalog_kind_with_http_info(opts = {}) ⇒ Array<(ListKindCatalogResponse, Integer, Hash)>
Get a list of entity kinds.
-
#list_catalog_kind_with_pagination(opts = {}) {|KindData| ... } ⇒ Object
Get a list of entity kinds.
-
#list_catalog_relation(opts = {}) ⇒ Object
Get a list of entity relations.
-
#list_catalog_relation_with_http_info(opts = {}) ⇒ Array<(ListRelationCatalogResponse, Integer, Hash)>
Get a list of entity relations.
-
#list_catalog_relation_with_pagination(opts = {}) {|RelationResponse| ... } ⇒ Object
Get a list of entity relations.
-
#upsert_catalog_entity(body, opts = {}) ⇒ Object
Create or update entities.
-
#upsert_catalog_entity_with_http_info(body, opts = {}) ⇒ Array<(UpsertCatalogEntityResponse, Integer, Hash)>
Create or update entities.
-
#upsert_catalog_kind(body, opts = {}) ⇒ Object
Create or update kinds.
-
#upsert_catalog_kind_with_http_info(body, opts = {}) ⇒ Array<(UpsertCatalogKindResponse, Integer, Hash)>
Create or update kinds.
Constructor Details
permalink #initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ SoftwareCatalogAPI
Returns a new instance of SoftwareCatalogAPI.
22 23 24 |
# File 'lib/datadog_api_client/v2/api/software_catalog_api.rb', line 22 def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end |
Instance Attribute Details
permalink #api_client ⇒ Object
Returns the value of attribute api_client.
20 21 22 |
# File 'lib/datadog_api_client/v2/api/software_catalog_api.rb', line 20 def api_client @api_client end |
Instance Method Details
permalink #delete_catalog_entity(entity_id, opts = {}) ⇒ Object
Delete a single entity.
29 30 31 32 |
# File 'lib/datadog_api_client/v2/api/software_catalog_api.rb', line 29 def delete_catalog_entity(entity_id, opts = {}) delete_catalog_entity_with_http_info(entity_id, opts) nil end |
permalink #delete_catalog_entity_with_http_info(entity_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a single entity.
Delete a single entity in Software Catalog.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/datadog_api_client/v2/api/software_catalog_api.rb', line 41 def delete_catalog_entity_with_http_info(entity_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SoftwareCatalogAPI.delete_catalog_entity ...' end # verify the required parameter 'entity_id' is set if @api_client.config.client_side_validation && entity_id.nil? fail ArgumentError, "Missing the required parameter 'entity_id' when calling SoftwareCatalogAPI.delete_catalog_entity" end # resource path local_var_path = '/api/v2/catalog/entity/{entity_id}'.sub('{entity_id}', CGI.escape(entity_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :delete_catalog_entity, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SoftwareCatalogAPI#delete_catalog_entity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
permalink #delete_catalog_kind(kind_id, opts = {}) ⇒ Object
Delete a single kind.
94 95 96 97 |
# File 'lib/datadog_api_client/v2/api/software_catalog_api.rb', line 94 def delete_catalog_kind(kind_id, opts = {}) delete_catalog_kind_with_http_info(kind_id, opts) nil end |
permalink #delete_catalog_kind_with_http_info(kind_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a single kind.
Delete a single kind in Software Catalog.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/datadog_api_client/v2/api/software_catalog_api.rb', line 106 def delete_catalog_kind_with_http_info(kind_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SoftwareCatalogAPI.delete_catalog_kind ...' end # verify the required parameter 'kind_id' is set if @api_client.config.client_side_validation && kind_id.nil? fail ArgumentError, "Missing the required parameter 'kind_id' when calling SoftwareCatalogAPI.delete_catalog_kind" end # resource path local_var_path = '/api/v2/catalog/kind/{kind_id}'.sub('{kind_id}', CGI.escape(kind_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :delete_catalog_kind, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SoftwareCatalogAPI#delete_catalog_kind\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
permalink #list_catalog_entity(opts = {}) ⇒ Object
Get a list of entities.
159 160 161 162 |
# File 'lib/datadog_api_client/v2/api/software_catalog_api.rb', line 159 def list_catalog_entity(opts = {}) data, _status_code, _headers = list_catalog_entity_with_http_info(opts) data end |
permalink #list_catalog_entity_with_http_info(opts = {}) ⇒ Array<(ListEntityCatalogResponse, Integer, Hash)>
Get a list of entities.
Get a list of entities from Software Catalog.
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/datadog_api_client/v2/api/software_catalog_api.rb', line 180 def list_catalog_entity_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SoftwareCatalogAPI.list_catalog_entity ...' end allowable_values = ['RelationTypeOwns', 'RelationTypeOwnedBy', 'RelationTypeDependsOn', 'RelationTypeDependencyOf', 'RelationTypePartsOf', 'RelationTypeHasPart', 'RelationTypeOtherOwns', 'RelationTypeOtherOwnedBy', 'RelationTypeImplementedBy', 'RelationTypeImplements'] if @api_client.config.client_side_validation && opts[:'filter_relation_type'] && !allowable_values.include?(opts[:'filter_relation_type']) fail ArgumentError, "invalid value for \"filter_relation_type\", must be one of #{allowable_values}" end allowable_values = ['schema', 'raw_schema', 'oncall', 'incident', 'relation'] if @api_client.config.client_side_validation && opts[:'include'] && !allowable_values.include?(opts[:'include']) fail ArgumentError, "invalid value for \"include\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v2/catalog/entity' # query parameters query_params = opts[:query_params] || {} query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil? query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil? query_params[:'filter[id]'] = opts[:'filter_id'] if !opts[:'filter_id'].nil? query_params[:'filter[ref]'] = opts[:'filter_ref'] if !opts[:'filter_ref'].nil? query_params[:'filter[name]'] = opts[:'filter_name'] if !opts[:'filter_name'].nil? query_params[:'filter[kind]'] = opts[:'filter_kind'] if !opts[:'filter_kind'].nil? query_params[:'filter[owner]'] = opts[:'filter_owner'] if !opts[:'filter_owner'].nil? query_params[:'filter[relation][type]'] = opts[:'filter_relation_type'] if !opts[:'filter_relation_type'].nil? query_params[:'filter[exclude_snapshot]'] = opts[:'filter_exclude_snapshot'] if !opts[:'filter_exclude_snapshot'].nil? query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListEntityCatalogResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_catalog_entity, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SoftwareCatalogAPI#list_catalog_entity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
permalink #list_catalog_entity_with_pagination(opts = {}) {|EntityData| ... } ⇒ Object
Get a list of entities.
Provide a paginated version of #list_catalog_entity, returning all items.
To use it you need to use a block: list_catalog_entity_with_pagination { |item| p item }
251 252 253 254 255 256 257 258 259 260 261 262 263 |
# File 'lib/datadog_api_client/v2/api/software_catalog_api.rb', line 251 def list_catalog_entity_with_pagination(opts = {}) api_version = "V2" page_size = @api_client.get_attribute_from_path(opts, "page_limit", 100) @api_client.set_attribute_from_path(api_version, opts, "page_limit", Integer, page_size) while true do response = list_catalog_entity(opts) @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } if @api_client.get_attribute_from_path(response, "data").length < page_size break end @api_client.set_attribute_from_path(api_version, opts, "page_offset", Integer, @api_client.get_attribute_from_path(opts, "page_offset", 0) + page_size) end end |
permalink #list_catalog_kind(opts = {}) ⇒ Object
Get a list of entity kinds.
268 269 270 271 |
# File 'lib/datadog_api_client/v2/api/software_catalog_api.rb', line 268 def list_catalog_kind(opts = {}) data, _status_code, _headers = list_catalog_kind_with_http_info(opts) data end |
permalink #list_catalog_kind_with_http_info(opts = {}) ⇒ Array<(ListKindCatalogResponse, Integer, Hash)>
Get a list of entity kinds.
Get a list of entity kinds from Software Catalog.
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
# File 'lib/datadog_api_client/v2/api/software_catalog_api.rb', line 283 def list_catalog_kind_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SoftwareCatalogAPI.list_catalog_kind ...' end # resource path local_var_path = '/api/v2/catalog/kind' # query parameters query_params = opts[:query_params] || {} query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil? query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil? query_params[:'filter[id]'] = opts[:'filter_id'] if !opts[:'filter_id'].nil? query_params[:'filter[name]'] = opts[:'filter_name'] if !opts[:'filter_name'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListKindCatalogResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_catalog_kind, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SoftwareCatalogAPI#list_catalog_kind\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
permalink #list_catalog_kind_with_pagination(opts = {}) {|KindData| ... } ⇒ Object
Get a list of entity kinds.
Provide a paginated version of #list_catalog_kind, returning all items.
To use it you need to use a block: list_catalog_kind_with_pagination { |item| p item }
340 341 342 343 344 345 346 347 348 349 350 351 352 |
# File 'lib/datadog_api_client/v2/api/software_catalog_api.rb', line 340 def list_catalog_kind_with_pagination(opts = {}) api_version = "V2" page_size = @api_client.get_attribute_from_path(opts, "page_limit", 100) @api_client.set_attribute_from_path(api_version, opts, "page_limit", Integer, page_size) while true do response = list_catalog_kind(opts) @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } if @api_client.get_attribute_from_path(response, "data").length < page_size break end @api_client.set_attribute_from_path(api_version, opts, "page_offset", Integer, @api_client.get_attribute_from_path(opts, "page_offset", 0) + page_size) end end |
permalink #list_catalog_relation(opts = {}) ⇒ Object
Get a list of entity relations.
357 358 359 360 |
# File 'lib/datadog_api_client/v2/api/software_catalog_api.rb', line 357 def list_catalog_relation(opts = {}) data, _status_code, _headers = list_catalog_relation_with_http_info(opts) data end |
permalink #list_catalog_relation_with_http_info(opts = {}) ⇒ Array<(ListRelationCatalogResponse, Integer, Hash)>
Get a list of entity relations.
Get a list of entity relations from Software Catalog.
374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 |
# File 'lib/datadog_api_client/v2/api/software_catalog_api.rb', line 374 def list_catalog_relation_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SoftwareCatalogAPI.list_catalog_relation ...' end allowable_values = ['RelationTypeOwns', 'RelationTypeOwnedBy', 'RelationTypeDependsOn', 'RelationTypeDependencyOf', 'RelationTypePartsOf', 'RelationTypeHasPart', 'RelationTypeOtherOwns', 'RelationTypeOtherOwnedBy', 'RelationTypeImplementedBy', 'RelationTypeImplements'] if @api_client.config.client_side_validation && opts[:'filter_type'] && !allowable_values.include?(opts[:'filter_type']) fail ArgumentError, "invalid value for \"filter_type\", must be one of #{allowable_values}" end allowable_values = ['entity', 'schema'] if @api_client.config.client_side_validation && opts[:'include'] && !allowable_values.include?(opts[:'include']) fail ArgumentError, "invalid value for \"include\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v2/catalog/relation' # query parameters query_params = opts[:query_params] || {} query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil? query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil? query_params[:'filter[type]'] = opts[:'filter_type'] if !opts[:'filter_type'].nil? query_params[:'filter[from_ref]'] = opts[:'filter_from_ref'] if !opts[:'filter_from_ref'].nil? query_params[:'filter[to_ref]'] = opts[:'filter_to_ref'] if !opts[:'filter_to_ref'].nil? query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListRelationCatalogResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_catalog_relation, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SoftwareCatalogAPI#list_catalog_relation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
permalink #list_catalog_relation_with_pagination(opts = {}) {|RelationResponse| ... } ⇒ Object
Get a list of entity relations.
Provide a paginated version of #list_catalog_relation, returning all items.
To use it you need to use a block: list_catalog_relation_with_pagination { |item| p item }
441 442 443 444 445 446 447 448 449 450 451 452 453 |
# File 'lib/datadog_api_client/v2/api/software_catalog_api.rb', line 441 def list_catalog_relation_with_pagination(opts = {}) api_version = "V2" page_size = @api_client.get_attribute_from_path(opts, "page_limit", 100) @api_client.set_attribute_from_path(api_version, opts, "page_limit", Integer, page_size) while true do response = list_catalog_relation(opts) @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } if @api_client.get_attribute_from_path(response, "data").length < page_size break end @api_client.set_attribute_from_path(api_version, opts, "page_offset", Integer, @api_client.get_attribute_from_path(opts, "page_offset", 0) + page_size) end end |
permalink #upsert_catalog_entity(body, opts = {}) ⇒ Object
Create or update entities.
458 459 460 461 |
# File 'lib/datadog_api_client/v2/api/software_catalog_api.rb', line 458 def upsert_catalog_entity(body, opts = {}) data, _status_code, _headers = upsert_catalog_entity_with_http_info(body, opts) data end |
permalink #upsert_catalog_entity_with_http_info(body, opts = {}) ⇒ Array<(UpsertCatalogEntityResponse, Integer, Hash)>
Create or update entities.
Create or update entities in Software Catalog.
470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 |
# File 'lib/datadog_api_client/v2/api/software_catalog_api.rb', line 470 def upsert_catalog_entity_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SoftwareCatalogAPI.upsert_catalog_entity ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling SoftwareCatalogAPI.upsert_catalog_entity" end # resource path local_var_path = '/api/v2/catalog/entity' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'UpsertCatalogEntityResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :upsert_catalog_entity, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SoftwareCatalogAPI#upsert_catalog_entity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
permalink #upsert_catalog_kind(body, opts = {}) ⇒ Object
Create or update kinds.
525 526 527 528 |
# File 'lib/datadog_api_client/v2/api/software_catalog_api.rb', line 525 def upsert_catalog_kind(body, opts = {}) data, _status_code, _headers = upsert_catalog_kind_with_http_info(body, opts) data end |
permalink #upsert_catalog_kind_with_http_info(body, opts = {}) ⇒ Array<(UpsertCatalogKindResponse, Integer, Hash)>
Create or update kinds.
Create or update kinds in Software Catalog.
537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 |
# File 'lib/datadog_api_client/v2/api/software_catalog_api.rb', line 537 def upsert_catalog_kind_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SoftwareCatalogAPI.upsert_catalog_kind ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling SoftwareCatalogAPI.upsert_catalog_kind" end # resource path local_var_path = '/api/v2/catalog/kind' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'UpsertCatalogKindResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :upsert_catalog_kind, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SoftwareCatalogAPI#upsert_catalog_kind\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |