@datadog/datadog-api-client
Version:
OpenAPI client for Datadog APIs
82 lines (81 loc) • 4.37 kB
TypeScript
import { BaseAPIRequestFactory } from "../../datadog-api-client-common/baseapi";
import { Configuration } from "../../datadog-api-client-common/configuration";
import { RequestContext, ResponseContext } from "../../datadog-api-client-common/http/http";
import { GovernanceControlResponse } from "../models/GovernanceControlResponse";
import { GovernanceControlsResponse } from "../models/GovernanceControlsResponse";
import { GovernanceControlUpdateRequest } from "../models/GovernanceControlUpdateRequest";
export declare class GovernanceControlsApiRequestFactory extends BaseAPIRequestFactory {
getGovernanceControl(detectionType: string, _options?: Configuration): Promise<RequestContext>;
listGovernanceControls(_options?: Configuration): Promise<RequestContext>;
updateGovernanceControl(detectionType: string, body: GovernanceControlUpdateRequest, _options?: Configuration): Promise<RequestContext>;
}
export declare class GovernanceControlsApiResponseProcessor {
/**
* 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 getGovernanceControl
* @throws ApiException if the response code was not in [200, 299]
*/
getGovernanceControl(response: ResponseContext): Promise<GovernanceControlResponse>;
/**
* 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 listGovernanceControls
* @throws ApiException if the response code was not in [200, 299]
*/
listGovernanceControls(response: ResponseContext): Promise<GovernanceControlsResponse>;
/**
* 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 updateGovernanceControl
* @throws ApiException if the response code was not in [200, 299]
*/
updateGovernanceControl(response: ResponseContext): Promise<GovernanceControlResponse>;
}
export interface GovernanceControlsApiGetGovernanceControlRequest {
/**
* The detection type that identifies the control, for example `unused_api_keys`.
* @type string
*/
detectionType: string;
}
export interface GovernanceControlsApiUpdateGovernanceControlRequest {
/**
* The detection type that identifies the control, for example `unused_api_keys`.
* @type string
*/
detectionType: string;
/**
* @type GovernanceControlUpdateRequest
*/
body: GovernanceControlUpdateRequest;
}
export declare class GovernanceControlsApi {
private requestFactory;
private responseProcessor;
private configuration;
constructor(configuration: Configuration, requestFactory?: GovernanceControlsApiRequestFactory, responseProcessor?: GovernanceControlsApiResponseProcessor);
/**
* Retrieve a single governance control by its detection type, including the organization's current
* detection, notification, and mitigation configuration and detection counts.
* @param param The request object
*/
getGovernanceControl(param: GovernanceControlsApiGetGovernanceControlRequest, options?: Configuration): Promise<GovernanceControlResponse>;
/**
* Retrieve the list of governance controls configured for the organization. Each control pairs a
* detection definition with the organization's current detection, notification, and mitigation
* configuration, along with counts of active and mitigated detections.
* @param param The request object
*/
listGovernanceControls(options?: Configuration): Promise<GovernanceControlsResponse>;
/**
* Update the detection, notification, and mitigation configuration of a governance control. Only
* the attributes present in the request are modified. Changing the mitigation type or its
* parameters may require additional permissions.
* @param param The request object
*/
updateGovernanceControl(param: GovernanceControlsApiUpdateGovernanceControlRequest, options?: Configuration): Promise<GovernanceControlResponse>;
}