cloudflare
Version:
The official TypeScript library for the Cloudflare API
63 lines • 2.24 kB
TypeScript
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as AlwaysUseHTTPSAPI from 'cloudflare/resources/zones/settings/always-use-https';
export declare class AlwaysUseHTTPS extends APIResource {
/**
* Reply to all requests for URLs that use "http" with a 301 redirect to the
* equivalent "https" URL. If you only want to redirect for a subset of requests,
* consider creating an "Always use HTTPS" page rule.
*/
edit(params: AlwaysUseHTTPSEditParams, options?: Core.RequestOptions): Core.APIPromise<AlwaysUseHTTPS>;
/**
* Reply to all requests for URLs that use "http" with a 301 redirect to the
* equivalent "https" URL. If you only want to redirect for a subset of requests,
* consider creating an "Always use HTTPS" page rule.
*/
get(params: AlwaysUseHTTPSGetParams, options?: Core.RequestOptions): Core.APIPromise<AlwaysUseHTTPS>;
}
/**
* Reply to all requests for URLs that use "http" with a 301 redirect to the
* equivalent "https" URL. If you only want to redirect for a subset of requests,
* consider creating an "Always use HTTPS" page rule.
*/
export interface AlwaysUseHTTPS {
/**
* ID of the zone setting.
*/
id: 'always_use_https';
/**
* Current value of the zone setting.
*/
value: 'on' | 'off';
/**
* Whether or not this setting can be modified for this zone (based on your
* Cloudflare plan level).
*/
editable?: true | false;
/**
* last time this setting was modified.
*/
modified_on?: string | null;
}
export interface AlwaysUseHTTPSEditParams {
/**
* Path param: Identifier
*/
zone_id: string;
/**
* Body param: Value of the zone setting.
*/
value: 'on' | 'off';
}
export interface AlwaysUseHTTPSGetParams {
/**
* Identifier
*/
zone_id: string;
}
export declare namespace AlwaysUseHTTPS {
export import AlwaysUseHTTPS = AlwaysUseHTTPSAPI.AlwaysUseHTTPS;
export import AlwaysUseHTTPSEditParams = AlwaysUseHTTPSAPI.AlwaysUseHTTPSEditParams;
export import AlwaysUseHTTPSGetParams = AlwaysUseHTTPSAPI.AlwaysUseHTTPSGetParams;
}
//# sourceMappingURL=always-use-https.d.ts.map