cloudflare
Version:
The official TypeScript library for the Cloudflare API
38 lines • 1.39 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflare/resource';
export class Custom extends APIResource {
/**
* Creates a set of DLP custom profiles.
*/
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 });
}
/**
* 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.
*/
get(profileId, params, options) {
const { account_id } = params;
return this._client.get(`/accounts/${account_id}/dlp/profiles/custom/${profileId}`, options)._thenUnwrap((obj) => obj.result);
}
}
(function (Custom) {
})(Custom || (Custom = {}));
//# sourceMappingURL=custom.mjs.map