@datadog/datadog-api-client
Version:
OpenAPI client for Datadog APIs
563 lines • 31.2 kB
JavaScript
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CSMSettingsApi = exports.CSMSettingsApiResponseProcessor = exports.CSMSettingsApiRequestFactory = void 0;
const baseapi_1 = require("../../datadog-api-client-common/baseapi");
const configuration_1 = require("../../datadog-api-client-common/configuration");
const http_1 = require("../../datadog-api-client-common/http/http");
const logger_1 = require("../../../logger");
const ObjectSerializer_1 = require("../models/ObjectSerializer");
const exception_1 = require("../../datadog-api-client-common/exception");
class CSMSettingsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
getCSMAgentlessHostFacetInfo(facet, search, query, _options) {
return __awaiter(this, void 0, void 0, function* () {
const _config = _options || this.configuration;
logger_1.logger.warn("Using unstable operation 'getCSMAgentlessHostFacetInfo'");
if (!_config.unstableOperations["v2.getCSMAgentlessHostFacetInfo"]) {
throw new Error("Unstable operation 'getCSMAgentlessHostFacetInfo' is disabled");
}
// verify required parameter 'facet' is not null or undefined
if (facet === null || facet === undefined) {
throw new baseapi_1.RequiredError("facet", "getCSMAgentlessHostFacetInfo");
}
// Path Params
const localVarPath = "/api/v2/csm/settings/agentless_hosts/facet_info";
// Make Request Context
const requestContext = _config
.getServer("v2.CSMSettingsApi.getCSMAgentlessHostFacetInfo")
.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Query Params
if (facet !== undefined) {
requestContext.setQueryParam("facet", ObjectSerializer_1.ObjectSerializer.serialize(facet, "string", ""), "");
}
if (search !== undefined) {
requestContext.setQueryParam("search", ObjectSerializer_1.ObjectSerializer.serialize(search, "string", ""), "");
}
if (query !== undefined) {
requestContext.setQueryParam("query", ObjectSerializer_1.ObjectSerializer.serialize(query, "string", ""), "");
}
// Apply auth methods
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
"apiKeyAuth",
"appKeyAuth",
]);
return requestContext;
});
}
getCSMUnifiedHostFacetInfo(facet, search, query, _options) {
return __awaiter(this, void 0, void 0, function* () {
const _config = _options || this.configuration;
logger_1.logger.warn("Using unstable operation 'getCSMUnifiedHostFacetInfo'");
if (!_config.unstableOperations["v2.getCSMUnifiedHostFacetInfo"]) {
throw new Error("Unstable operation 'getCSMUnifiedHostFacetInfo' is disabled");
}
// verify required parameter 'facet' is not null or undefined
if (facet === null || facet === undefined) {
throw new baseapi_1.RequiredError("facet", "getCSMUnifiedHostFacetInfo");
}
// Path Params
const localVarPath = "/api/v2/csm/settings/hosts/facet_info";
// Make Request Context
const requestContext = _config
.getServer("v2.CSMSettingsApi.getCSMUnifiedHostFacetInfo")
.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Query Params
if (facet !== undefined) {
requestContext.setQueryParam("facet", ObjectSerializer_1.ObjectSerializer.serialize(facet, "string", ""), "");
}
if (search !== undefined) {
requestContext.setQueryParam("search", ObjectSerializer_1.ObjectSerializer.serialize(search, "string", ""), "");
}
if (query !== undefined) {
requestContext.setQueryParam("query", ObjectSerializer_1.ObjectSerializer.serialize(query, "string", ""), "");
}
// Apply auth methods
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
"apiKeyAuth",
"appKeyAuth",
]);
return requestContext;
});
}
listCSMAgentlessHostFacets(_options) {
return __awaiter(this, void 0, void 0, function* () {
const _config = _options || this.configuration;
logger_1.logger.warn("Using unstable operation 'listCSMAgentlessHostFacets'");
if (!_config.unstableOperations["v2.listCSMAgentlessHostFacets"]) {
throw new Error("Unstable operation 'listCSMAgentlessHostFacets' is disabled");
}
// Path Params
const localVarPath = "/api/v2/csm/settings/agentless_hosts/facets";
// Make Request Context
const requestContext = _config
.getServer("v2.CSMSettingsApi.listCSMAgentlessHostFacets")
.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Apply auth methods
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
"apiKeyAuth",
"appKeyAuth",
]);
return requestContext;
});
}
listCSMAgentlessHosts(page, size, query, _options) {
return __awaiter(this, void 0, void 0, function* () {
const _config = _options || this.configuration;
logger_1.logger.warn("Using unstable operation 'listCSMAgentlessHosts'");
if (!_config.unstableOperations["v2.listCSMAgentlessHosts"]) {
throw new Error("Unstable operation 'listCSMAgentlessHosts' is disabled");
}
// Path Params
const localVarPath = "/api/v2/csm/settings/agentless_hosts";
// Make Request Context
const requestContext = _config
.getServer("v2.CSMSettingsApi.listCSMAgentlessHosts")
.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Query Params
if (page !== undefined) {
requestContext.setQueryParam("page", ObjectSerializer_1.ObjectSerializer.serialize(page, "number", "int32"), "");
}
if (size !== undefined) {
requestContext.setQueryParam("size", ObjectSerializer_1.ObjectSerializer.serialize(size, "number", "int32"), "");
}
if (query !== undefined) {
requestContext.setQueryParam("query", ObjectSerializer_1.ObjectSerializer.serialize(query, "string", ""), "");
}
// Apply auth methods
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
"apiKeyAuth",
"appKeyAuth",
]);
return requestContext;
});
}
listCSMUnifiedHostFacets(_options) {
return __awaiter(this, void 0, void 0, function* () {
const _config = _options || this.configuration;
logger_1.logger.warn("Using unstable operation 'listCSMUnifiedHostFacets'");
if (!_config.unstableOperations["v2.listCSMUnifiedHostFacets"]) {
throw new Error("Unstable operation 'listCSMUnifiedHostFacets' is disabled");
}
// Path Params
const localVarPath = "/api/v2/csm/settings/hosts/facets";
// Make Request Context
const requestContext = _config
.getServer("v2.CSMSettingsApi.listCSMUnifiedHostFacets")
.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Apply auth methods
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
"apiKeyAuth",
"appKeyAuth",
]);
return requestContext;
});
}
listCSMUnifiedHosts(page, size, query, _options) {
return __awaiter(this, void 0, void 0, function* () {
const _config = _options || this.configuration;
logger_1.logger.warn("Using unstable operation 'listCSMUnifiedHosts'");
if (!_config.unstableOperations["v2.listCSMUnifiedHosts"]) {
throw new Error("Unstable operation 'listCSMUnifiedHosts' is disabled");
}
// Path Params
const localVarPath = "/api/v2/csm/settings/hosts";
// Make Request Context
const requestContext = _config
.getServer("v2.CSMSettingsApi.listCSMUnifiedHosts")
.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Query Params
if (page !== undefined) {
requestContext.setQueryParam("page", ObjectSerializer_1.ObjectSerializer.serialize(page, "number", "int32"), "");
}
if (size !== undefined) {
requestContext.setQueryParam("size", ObjectSerializer_1.ObjectSerializer.serialize(size, "number", "int32"), "");
}
if (query !== undefined) {
requestContext.setQueryParam("query", ObjectSerializer_1.ObjectSerializer.serialize(query, "string", ""), "");
}
// Apply auth methods
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
"apiKeyAuth",
"appKeyAuth",
]);
return requestContext;
});
}
}
exports.CSMSettingsApiRequestFactory = CSMSettingsApiRequestFactory;
class CSMSettingsApiResponseProcessor {
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to getCSMAgentlessHostFacetInfo
* @throws ApiException if the response code was not in [200, 299]
*/
getCSMAgentlessHostFacetInfo(response) {
return __awaiter(this, void 0, void 0, function* () {
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CsmHostFacetInfoResponse");
return body;
}
if (response.httpStatusCode === 400) {
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
let body;
try {
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "JSONAPIErrorResponse");
}
catch (error) {
logger_1.logger.debug(`Got error deserializing error: ${error}`);
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
}
throw new exception_1.ApiException(response.httpStatusCode, body);
}
if (response.httpStatusCode === 403 || response.httpStatusCode === 429) {
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
let body;
try {
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
}
catch (error) {
logger_1.logger.debug(`Got error deserializing error: ${error}`);
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
}
throw new exception_1.ApiException(response.httpStatusCode, body);
}
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CsmHostFacetInfoResponse", "");
return body;
}
const body = (yield response.body.text()) || "";
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
});
}
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to getCSMUnifiedHostFacetInfo
* @throws ApiException if the response code was not in [200, 299]
*/
getCSMUnifiedHostFacetInfo(response) {
return __awaiter(this, void 0, void 0, function* () {
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CsmHostFacetInfoResponse");
return body;
}
if (response.httpStatusCode === 400) {
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
let body;
try {
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "JSONAPIErrorResponse");
}
catch (error) {
logger_1.logger.debug(`Got error deserializing error: ${error}`);
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
}
throw new exception_1.ApiException(response.httpStatusCode, body);
}
if (response.httpStatusCode === 403 || response.httpStatusCode === 429) {
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
let body;
try {
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
}
catch (error) {
logger_1.logger.debug(`Got error deserializing error: ${error}`);
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
}
throw new exception_1.ApiException(response.httpStatusCode, body);
}
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CsmHostFacetInfoResponse", "");
return body;
}
const body = (yield response.body.text()) || "";
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
});
}
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to listCSMAgentlessHostFacets
* @throws ApiException if the response code was not in [200, 299]
*/
listCSMAgentlessHostFacets(response) {
return __awaiter(this, void 0, void 0, function* () {
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CsmAgentlessHostFacetsResponse");
return body;
}
if (response.httpStatusCode === 403 || response.httpStatusCode === 429) {
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
let body;
try {
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
}
catch (error) {
logger_1.logger.debug(`Got error deserializing error: ${error}`);
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
}
throw new exception_1.ApiException(response.httpStatusCode, body);
}
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CsmAgentlessHostFacetsResponse", "");
return body;
}
const body = (yield response.body.text()) || "";
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
});
}
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to listCSMAgentlessHosts
* @throws ApiException if the response code was not in [200, 299]
*/
listCSMAgentlessHosts(response) {
return __awaiter(this, void 0, void 0, function* () {
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CsmAgentlessHostsResponse");
return body;
}
if (response.httpStatusCode === 400) {
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
let body;
try {
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "JSONAPIErrorResponse");
}
catch (error) {
logger_1.logger.debug(`Got error deserializing error: ${error}`);
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
}
throw new exception_1.ApiException(response.httpStatusCode, body);
}
if (response.httpStatusCode === 403 || response.httpStatusCode === 429) {
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
let body;
try {
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
}
catch (error) {
logger_1.logger.debug(`Got error deserializing error: ${error}`);
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
}
throw new exception_1.ApiException(response.httpStatusCode, body);
}
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CsmAgentlessHostsResponse", "");
return body;
}
const body = (yield response.body.text()) || "";
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
});
}
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to listCSMUnifiedHostFacets
* @throws ApiException if the response code was not in [200, 299]
*/
listCSMUnifiedHostFacets(response) {
return __awaiter(this, void 0, void 0, function* () {
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CsmUnifiedHostFacetsResponse");
return body;
}
if (response.httpStatusCode === 403 || response.httpStatusCode === 429) {
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
let body;
try {
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
}
catch (error) {
logger_1.logger.debug(`Got error deserializing error: ${error}`);
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
}
throw new exception_1.ApiException(response.httpStatusCode, body);
}
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CsmUnifiedHostFacetsResponse", "");
return body;
}
const body = (yield response.body.text()) || "";
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
});
}
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to listCSMUnifiedHosts
* @throws ApiException if the response code was not in [200, 299]
*/
listCSMUnifiedHosts(response) {
return __awaiter(this, void 0, void 0, function* () {
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CsmUnifiedHostsResponse");
return body;
}
if (response.httpStatusCode === 400) {
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
let body;
try {
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "JSONAPIErrorResponse");
}
catch (error) {
logger_1.logger.debug(`Got error deserializing error: ${error}`);
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
}
throw new exception_1.ApiException(response.httpStatusCode, body);
}
if (response.httpStatusCode === 403 || response.httpStatusCode === 429) {
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
let body;
try {
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
}
catch (error) {
logger_1.logger.debug(`Got error deserializing error: ${error}`);
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
}
throw new exception_1.ApiException(response.httpStatusCode, body);
}
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CsmUnifiedHostsResponse", "");
return body;
}
const body = (yield response.body.text()) || "";
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
});
}
}
exports.CSMSettingsApiResponseProcessor = CSMSettingsApiResponseProcessor;
class CSMSettingsApi {
constructor(configuration, requestFactory, responseProcessor) {
this.configuration = configuration;
this.requestFactory =
requestFactory || new CSMSettingsApiRequestFactory(configuration);
this.responseProcessor =
responseProcessor || new CSMSettingsApiResponseProcessor();
}
/**
* Get the value distribution for a specific agentless host facet, with optional search and filtering.
* @param param The request object
*/
getCSMAgentlessHostFacetInfo(param, options) {
const requestContextPromise = this.requestFactory.getCSMAgentlessHostFacetInfo(param.facet, param.search, param.query, options);
return requestContextPromise.then((requestContext) => {
return this.configuration.httpApi
.send(requestContext)
.then((responseContext) => {
return this.responseProcessor.getCSMAgentlessHostFacetInfo(responseContext);
});
});
}
/**
* Get the value distribution for a specific unified host facet, with optional search and filtering.
* @param param The request object
*/
getCSMUnifiedHostFacetInfo(param, options) {
const requestContextPromise = this.requestFactory.getCSMUnifiedHostFacetInfo(param.facet, param.search, param.query, options);
return requestContextPromise.then((requestContext) => {
return this.configuration.httpApi
.send(requestContext)
.then((responseContext) => {
return this.responseProcessor.getCSMUnifiedHostFacetInfo(responseContext);
});
});
}
/**
* Get the list of available facets for filtering agentless hosts.
* @param param The request object
*/
listCSMAgentlessHostFacets(options) {
const requestContextPromise = this.requestFactory.listCSMAgentlessHostFacets(options);
return requestContextPromise.then((requestContext) => {
return this.configuration.httpApi
.send(requestContext)
.then((responseContext) => {
return this.responseProcessor.listCSMAgentlessHostFacets(responseContext);
});
});
}
/**
* Get the list of agentless hosts for CSM, with optional pagination and filtering.
* @param param The request object
*/
listCSMAgentlessHosts(param = {}, options) {
const requestContextPromise = this.requestFactory.listCSMAgentlessHosts(param.page, param.size, param.query, options);
return requestContextPromise.then((requestContext) => {
return this.configuration.httpApi
.send(requestContext)
.then((responseContext) => {
return this.responseProcessor.listCSMAgentlessHosts(responseContext);
});
});
}
/**
* Get the list of available facets for filtering unified hosts.
* @param param The request object
*/
listCSMUnifiedHostFacets(options) {
const requestContextPromise = this.requestFactory.listCSMUnifiedHostFacets(options);
return requestContextPromise.then((requestContext) => {
return this.configuration.httpApi
.send(requestContext)
.then((responseContext) => {
return this.responseProcessor.listCSMUnifiedHostFacets(responseContext);
});
});
}
/**
* Get the list of unified hosts for CSM, combining agent and agentless host data, with optional pagination and filtering.
* @param param The request object
*/
listCSMUnifiedHosts(param = {}, options) {
const requestContextPromise = this.requestFactory.listCSMUnifiedHosts(param.page, param.size, param.query, options);
return requestContextPromise.then((requestContext) => {
return this.configuration.httpApi
.send(requestContext)
.then((responseContext) => {
return this.responseProcessor.listCSMUnifiedHosts(responseContext);
});
});
}
}
exports.CSMSettingsApi = CSMSettingsApi;
//# sourceMappingURL=CSMSettingsApi.js.map