cloudflare
Version:
The official TypeScript library for the Cloudflare API
30 lines • 1.41 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflare/resource';
export class SecurityLevelResource extends APIResource {
/**
* Choose the appropriate security profile for your website, which will
* automatically adjust each of the security settings. If you choose to customize
* an individual security setting, the profile will become Custom.
* (https://support.cloudflare.com/hc/en-us/articles/200170056).
*/
edit(params, options) {
const { zone_id, ...body } = params;
return this._client.patch(`/zones/${zone_id}/settings/security_level`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Choose the appropriate security profile for your website, which will
* automatically adjust each of the security settings. If you choose to customize
* an individual security setting, the profile will become Custom.
* (https://support.cloudflare.com/hc/en-us/articles/200170056).
*/
get(params, options) {
const { zone_id } = params;
return this._client.get(`/zones/${zone_id}/settings/security_level`, options)._thenUnwrap((obj) => obj.result);
}
}
(function (SecurityLevelResource) {
})(SecurityLevelResource || (SecurityLevelResource = {}));
//# sourceMappingURL=security-level.mjs.map