cloudflare
Version:
The official TypeScript library for the Cloudflare API
39 lines • 1.41 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../../resource.mjs";
export class Custom extends APIResource {
/**
* Creates a DLP custom profile.
*/
create(params, options) {
const { account_id, ...body } = params;
return this._client.post(`/accounts/${account_id}/dlp/profiles/custom`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Updates a DLP custom profile.
*/
update(profileId, params, options) {
const { account_id, ...body } = params;
return this._client.put(`/accounts/${account_id}/dlp/profiles/custom/${profileId}`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Deletes a DLP custom profile.
*/
delete(profileId, params, options) {
const { account_id } = params;
return this._client.delete(`/accounts/${account_id}/dlp/profiles/custom/${profileId}`, options)._thenUnwrap((obj) => obj.result);
}
/**
* Fetches a custom DLP profile by id.
*/
get(profileId, params, options) {
const { account_id } = params;
return this._client.get(`/accounts/${account_id}/dlp/profiles/custom/${profileId}`, options)._thenUnwrap((obj) => obj.result);
}
}
//# sourceMappingURL=custom.mjs.map