UNPKG

@datadog/datadog-api-client

Version:
367 lines (366 loc) 20.1 kB
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 { ApplicationSecurityPolicyCreateRequest } from "../models/ApplicationSecurityPolicyCreateRequest"; import { ApplicationSecurityPolicyListResponse } from "../models/ApplicationSecurityPolicyListResponse"; import { ApplicationSecurityPolicyResponse } from "../models/ApplicationSecurityPolicyResponse"; import { ApplicationSecurityPolicyUpdateRequest } from "../models/ApplicationSecurityPolicyUpdateRequest"; import { ApplicationSecurityServicesResponse } from "../models/ApplicationSecurityServicesResponse"; import { ApplicationSecurityWafCustomRuleCreateRequest } from "../models/ApplicationSecurityWafCustomRuleCreateRequest"; import { ApplicationSecurityWafCustomRuleListResponse } from "../models/ApplicationSecurityWafCustomRuleListResponse"; import { ApplicationSecurityWafCustomRuleResponse } from "../models/ApplicationSecurityWafCustomRuleResponse"; import { ApplicationSecurityWafCustomRuleUpdateRequest } from "../models/ApplicationSecurityWafCustomRuleUpdateRequest"; import { ApplicationSecurityWafExclusionFilterCreateRequest } from "../models/ApplicationSecurityWafExclusionFilterCreateRequest"; import { ApplicationSecurityWafExclusionFilterResponse } from "../models/ApplicationSecurityWafExclusionFilterResponse"; import { ApplicationSecurityWafExclusionFiltersResponse } from "../models/ApplicationSecurityWafExclusionFiltersResponse"; import { ApplicationSecurityWafExclusionFilterUpdateRequest } from "../models/ApplicationSecurityWafExclusionFilterUpdateRequest"; export declare class ApplicationSecurityApiRequestFactory extends BaseAPIRequestFactory { createApplicationSecurityWafCustomRule(body: ApplicationSecurityWafCustomRuleCreateRequest, _options?: Configuration): Promise<RequestContext>; createApplicationSecurityWafExclusionFilter(body: ApplicationSecurityWafExclusionFilterCreateRequest, _options?: Configuration): Promise<RequestContext>; createApplicationSecurityWafPolicy(body: ApplicationSecurityPolicyCreateRequest, _options?: Configuration): Promise<RequestContext>; deleteApplicationSecurityWafCustomRule(customRuleId: string, _options?: Configuration): Promise<RequestContext>; deleteApplicationSecurityWafExclusionFilter(exclusionFilterId: string, _options?: Configuration): Promise<RequestContext>; deleteApplicationSecurityWafPolicy(policyId: string, _options?: Configuration): Promise<RequestContext>; getApplicationSecurityWafCustomRule(customRuleId: string, _options?: Configuration): Promise<RequestContext>; getApplicationSecurityWafExclusionFilter(exclusionFilterId: string, _options?: Configuration): Promise<RequestContext>; getApplicationSecurityWafPolicy(policyId: string, _options?: Configuration): Promise<RequestContext>; getAsmServiceByName(serviceFilter: string, _options?: Configuration): Promise<RequestContext>; listApplicationSecurityWAFCustomRules(_options?: Configuration): Promise<RequestContext>; listApplicationSecurityWafExclusionFilters(_options?: Configuration): Promise<RequestContext>; listApplicationSecurityWAFPolicies(_options?: Configuration): Promise<RequestContext>; updateApplicationSecurityWafCustomRule(customRuleId: string, body: ApplicationSecurityWafCustomRuleUpdateRequest, _options?: Configuration): Promise<RequestContext>; updateApplicationSecurityWafExclusionFilter(exclusionFilterId: string, body: ApplicationSecurityWafExclusionFilterUpdateRequest, _options?: Configuration): Promise<RequestContext>; updateApplicationSecurityWafPolicy(policyId: string, body: ApplicationSecurityPolicyUpdateRequest, _options?: Configuration): Promise<RequestContext>; } export declare class ApplicationSecurityApiResponseProcessor { /** * 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 createApplicationSecurityWafCustomRule * @throws ApiException if the response code was not in [200, 299] */ createApplicationSecurityWafCustomRule(response: ResponseContext): Promise<ApplicationSecurityWafCustomRuleResponse>; /** * 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 createApplicationSecurityWafExclusionFilter * @throws ApiException if the response code was not in [200, 299] */ createApplicationSecurityWafExclusionFilter(response: ResponseContext): Promise<ApplicationSecurityWafExclusionFilterResponse>; /** * 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 createApplicationSecurityWafPolicy * @throws ApiException if the response code was not in [200, 299] */ createApplicationSecurityWafPolicy(response: ResponseContext): Promise<ApplicationSecurityPolicyResponse>; /** * 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 deleteApplicationSecurityWafCustomRule * @throws ApiException if the response code was not in [200, 299] */ deleteApplicationSecurityWafCustomRule(response: ResponseContext): Promise<void>; /** * 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 deleteApplicationSecurityWafExclusionFilter * @throws ApiException if the response code was not in [200, 299] */ deleteApplicationSecurityWafExclusionFilter(response: ResponseContext): Promise<void>; /** * 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 deleteApplicationSecurityWafPolicy * @throws ApiException if the response code was not in [200, 299] */ deleteApplicationSecurityWafPolicy(response: ResponseContext): Promise<void>; /** * 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 getApplicationSecurityWafCustomRule * @throws ApiException if the response code was not in [200, 299] */ getApplicationSecurityWafCustomRule(response: ResponseContext): Promise<ApplicationSecurityWafCustomRuleResponse>; /** * 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 getApplicationSecurityWafExclusionFilter * @throws ApiException if the response code was not in [200, 299] */ getApplicationSecurityWafExclusionFilter(response: ResponseContext): Promise<ApplicationSecurityWafExclusionFilterResponse>; /** * 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 getApplicationSecurityWafPolicy * @throws ApiException if the response code was not in [200, 299] */ getApplicationSecurityWafPolicy(response: ResponseContext): Promise<ApplicationSecurityPolicyResponse>; /** * 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 getAsmServiceByName * @throws ApiException if the response code was not in [200, 299] */ getAsmServiceByName(response: ResponseContext): Promise<ApplicationSecurityServicesResponse>; /** * 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 listApplicationSecurityWAFCustomRules * @throws ApiException if the response code was not in [200, 299] */ listApplicationSecurityWAFCustomRules(response: ResponseContext): Promise<ApplicationSecurityWafCustomRuleListResponse>; /** * 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 listApplicationSecurityWafExclusionFilters * @throws ApiException if the response code was not in [200, 299] */ listApplicationSecurityWafExclusionFilters(response: ResponseContext): Promise<ApplicationSecurityWafExclusionFiltersResponse>; /** * 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 listApplicationSecurityWAFPolicies * @throws ApiException if the response code was not in [200, 299] */ listApplicationSecurityWAFPolicies(response: ResponseContext): Promise<ApplicationSecurityPolicyListResponse>; /** * 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 updateApplicationSecurityWafCustomRule * @throws ApiException if the response code was not in [200, 299] */ updateApplicationSecurityWafCustomRule(response: ResponseContext): Promise<ApplicationSecurityWafCustomRuleResponse>; /** * 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 updateApplicationSecurityWafExclusionFilter * @throws ApiException if the response code was not in [200, 299] */ updateApplicationSecurityWafExclusionFilter(response: ResponseContext): Promise<ApplicationSecurityWafExclusionFilterResponse>; /** * 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 updateApplicationSecurityWafPolicy * @throws ApiException if the response code was not in [200, 299] */ updateApplicationSecurityWafPolicy(response: ResponseContext): Promise<ApplicationSecurityPolicyResponse>; } export interface ApplicationSecurityApiCreateApplicationSecurityWafCustomRuleRequest { /** * The definition of the new WAF Custom Rule. * @type ApplicationSecurityWafCustomRuleCreateRequest */ body: ApplicationSecurityWafCustomRuleCreateRequest; } export interface ApplicationSecurityApiCreateApplicationSecurityWafExclusionFilterRequest { /** * The definition of the new WAF exclusion filter. * @type ApplicationSecurityWafExclusionFilterCreateRequest */ body: ApplicationSecurityWafExclusionFilterCreateRequest; } export interface ApplicationSecurityApiCreateApplicationSecurityWafPolicyRequest { /** * The new WAF policy. * @type ApplicationSecurityPolicyCreateRequest */ body: ApplicationSecurityPolicyCreateRequest; } export interface ApplicationSecurityApiDeleteApplicationSecurityWafCustomRuleRequest { /** * The ID of the custom rule. * @type string */ customRuleId: string; } export interface ApplicationSecurityApiDeleteApplicationSecurityWafExclusionFilterRequest { /** * The identifier of the WAF exclusion filter. * @type string */ exclusionFilterId: string; } export interface ApplicationSecurityApiDeleteApplicationSecurityWafPolicyRequest { /** * The ID of the policy. * @type string */ policyId: string; } export interface ApplicationSecurityApiGetApplicationSecurityWafCustomRuleRequest { /** * The ID of the custom rule. * @type string */ customRuleId: string; } export interface ApplicationSecurityApiGetApplicationSecurityWafExclusionFilterRequest { /** * The identifier of the WAF exclusion filter. * @type string */ exclusionFilterId: string; } export interface ApplicationSecurityApiGetApplicationSecurityWafPolicyRequest { /** * The ID of the policy. * @type string */ policyId: string; } export interface ApplicationSecurityApiGetAsmServiceByNameRequest { /** * The name of the service to retrieve Application Security details for. * Returns all matching services across environments. * @type string */ serviceFilter: string; } export interface ApplicationSecurityApiUpdateApplicationSecurityWafCustomRuleRequest { /** * The ID of the custom rule. * @type string */ customRuleId: string; /** * New definition of the WAF Custom Rule. * @type ApplicationSecurityWafCustomRuleUpdateRequest */ body: ApplicationSecurityWafCustomRuleUpdateRequest; } export interface ApplicationSecurityApiUpdateApplicationSecurityWafExclusionFilterRequest { /** * The identifier of the WAF exclusion filter. * @type string */ exclusionFilterId: string; /** * The exclusion filter to update. * @type ApplicationSecurityWafExclusionFilterUpdateRequest */ body: ApplicationSecurityWafExclusionFilterUpdateRequest; } export interface ApplicationSecurityApiUpdateApplicationSecurityWafPolicyRequest { /** * The ID of the policy. * @type string */ policyId: string; /** * New WAF policy. * @type ApplicationSecurityPolicyUpdateRequest */ body: ApplicationSecurityPolicyUpdateRequest; } export declare class ApplicationSecurityApi { private requestFactory; private responseProcessor; private configuration; constructor(configuration: Configuration, requestFactory?: ApplicationSecurityApiRequestFactory, responseProcessor?: ApplicationSecurityApiResponseProcessor); /** * Create a new WAF custom rule with the given parameters. * @param param The request object */ createApplicationSecurityWafCustomRule(param: ApplicationSecurityApiCreateApplicationSecurityWafCustomRuleRequest, options?: Configuration): Promise<ApplicationSecurityWafCustomRuleResponse>; /** * Create a new WAF exclusion filter with the given parameters. * * A request matched by an exclusion filter will be ignored by the Application Security WAF product. * Go to https://app.datadoghq.com/security/appsec/passlist to review existing exclusion filters (also called passlist entries). * @param param The request object */ createApplicationSecurityWafExclusionFilter(param: ApplicationSecurityApiCreateApplicationSecurityWafExclusionFilterRequest, options?: Configuration): Promise<ApplicationSecurityWafExclusionFilterResponse>; /** * Create a new WAF policy. * @param param The request object */ createApplicationSecurityWafPolicy(param: ApplicationSecurityApiCreateApplicationSecurityWafPolicyRequest, options?: Configuration): Promise<ApplicationSecurityPolicyResponse>; /** * Delete a specific WAF custom rule. * @param param The request object */ deleteApplicationSecurityWafCustomRule(param: ApplicationSecurityApiDeleteApplicationSecurityWafCustomRuleRequest, options?: Configuration): Promise<void>; /** * Delete a specific WAF exclusion filter using its identifier. * @param param The request object */ deleteApplicationSecurityWafExclusionFilter(param: ApplicationSecurityApiDeleteApplicationSecurityWafExclusionFilterRequest, options?: Configuration): Promise<void>; /** * Delete a specific WAF policy. * @param param The request object */ deleteApplicationSecurityWafPolicy(param: ApplicationSecurityApiDeleteApplicationSecurityWafPolicyRequest, options?: Configuration): Promise<void>; /** * Retrieve a WAF custom rule by ID. * @param param The request object */ getApplicationSecurityWafCustomRule(param: ApplicationSecurityApiGetApplicationSecurityWafCustomRuleRequest, options?: Configuration): Promise<ApplicationSecurityWafCustomRuleResponse>; /** * Retrieve a specific WAF exclusion filter using its identifier. * @param param The request object */ getApplicationSecurityWafExclusionFilter(param: ApplicationSecurityApiGetApplicationSecurityWafExclusionFilterRequest, options?: Configuration): Promise<ApplicationSecurityWafExclusionFilterResponse>; /** * Retrieve a WAF policy by ID. * @param param The request object */ getApplicationSecurityWafPolicy(param: ApplicationSecurityApiGetApplicationSecurityWafPolicyRequest, options?: Configuration): Promise<ApplicationSecurityPolicyResponse>; /** * Retrieve Application Security details for services matching the given name. * Returns Application Security activation, compatibility, and product enablement * information for each matching `(service, environment)` pair, along with a count * of services that have Application Security Management (Threats) enabled. * @param param The request object */ getAsmServiceByName(param: ApplicationSecurityApiGetAsmServiceByNameRequest, options?: Configuration): Promise<ApplicationSecurityServicesResponse>; /** * Retrieve a list of WAF custom rule. * @param param The request object */ listApplicationSecurityWAFCustomRules(options?: Configuration): Promise<ApplicationSecurityWafCustomRuleListResponse>; /** * Retrieve a list of WAF exclusion filters. * @param param The request object */ listApplicationSecurityWafExclusionFilters(options?: Configuration): Promise<ApplicationSecurityWafExclusionFiltersResponse>; /** * Retrieve a list of WAF policies. * @param param The request object */ listApplicationSecurityWAFPolicies(options?: Configuration): Promise<ApplicationSecurityPolicyListResponse>; /** * Update a specific WAF custom Rule. * Returns the Custom Rule object when the request is successful. * @param param The request object */ updateApplicationSecurityWafCustomRule(param: ApplicationSecurityApiUpdateApplicationSecurityWafCustomRuleRequest, options?: Configuration): Promise<ApplicationSecurityWafCustomRuleResponse>; /** * Update a specific WAF exclusion filter using its identifier. * Returns the exclusion filter object when the request is successful. * @param param The request object */ updateApplicationSecurityWafExclusionFilter(param: ApplicationSecurityApiUpdateApplicationSecurityWafExclusionFilterRequest, options?: Configuration): Promise<ApplicationSecurityWafExclusionFilterResponse>; /** * Update a specific WAF policy. * Returns the policy object when the request is successful. * @param param The request object */ updateApplicationSecurityWafPolicy(param: ApplicationSecurityApiUpdateApplicationSecurityWafPolicyRequest, options?: Configuration): Promise<ApplicationSecurityPolicyResponse>; }