cloudflare
Version:
The official TypeScript library for the Cloudflare API
151 lines • 5.64 kB
TypeScript
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as CertificatesAPI from 'cloudflare/resources/zero-trust/access/certificates/certificates';
import * as SettingsAPI from 'cloudflare/resources/zero-trust/access/certificates/settings';
import { SinglePage } from 'cloudflare/pagination';
export declare class Certificates extends APIResource {
settings: SettingsAPI.Settings;
/**
* Adds a new mTLS root certificate to Access.
*/
create(params: CertificateCreateParams, options?: Core.RequestOptions): Core.APIPromise<ZeroTrustCertificates>;
/**
* Updates a configured mTLS certificate.
*/
update(uuid: string, params: CertificateUpdateParams, options?: Core.RequestOptions): Core.APIPromise<ZeroTrustCertificates>;
/**
* Lists all mTLS root certificates.
*/
list(params?: CertificateListParams, options?: Core.RequestOptions): Core.PagePromise<ZeroTrustCertificatesSinglePage, ZeroTrustCertificates>;
list(options?: Core.RequestOptions): Core.PagePromise<ZeroTrustCertificatesSinglePage, ZeroTrustCertificates>;
/**
* Deletes an mTLS certificate.
*/
delete(uuid: string, params?: CertificateDeleteParams, options?: Core.RequestOptions): Core.APIPromise<CertificateDeleteResponse>;
delete(uuid: string, options?: Core.RequestOptions): Core.APIPromise<CertificateDeleteResponse>;
/**
* Fetches a single mTLS certificate.
*/
get(uuid: string, params?: CertificateGetParams, options?: Core.RequestOptions): Core.APIPromise<ZeroTrustCertificates>;
get(uuid: string, options?: Core.RequestOptions): Core.APIPromise<ZeroTrustCertificates>;
}
export declare class ZeroTrustCertificatesSinglePage extends SinglePage<ZeroTrustCertificates> {
}
export interface ZeroTrustCertificates {
/**
* The ID of the application that will use this certificate.
*/
id?: string;
/**
* The hostnames of the applications that will use this certificate.
*/
associated_hostnames?: Array<string>;
created_at?: string;
expires_on?: string;
/**
* The MD5 fingerprint of the certificate.
*/
fingerprint?: string;
/**
* The name of the certificate.
*/
name?: string;
updated_at?: string;
}
export interface CertificateDeleteResponse {
/**
* UUID
*/
id?: string;
}
export interface CertificateCreateParams {
/**
* Body param: The certificate content.
*/
certificate: string;
/**
* Body param: The name of the certificate.
*/
name: string;
/**
* Path param: The Account ID to use for this endpoint. Mutually exclusive with the
* Zone ID.
*/
account_id?: string;
/**
* Path param: The Zone ID to use for this endpoint. Mutually exclusive with the
* Account ID.
*/
zone_id?: string;
/**
* Body param: The hostnames of the applications that will use this certificate.
*/
associated_hostnames?: Array<string>;
}
export interface CertificateUpdateParams {
/**
* Body param: The hostnames of the applications that will use this certificate.
*/
associated_hostnames: Array<string>;
/**
* Path param: The Account ID to use for this endpoint. Mutually exclusive with the
* Zone ID.
*/
account_id?: string;
/**
* Path param: The Zone ID to use for this endpoint. Mutually exclusive with the
* Account ID.
*/
zone_id?: string;
/**
* Body param: The name of the certificate.
*/
name?: string;
}
export interface CertificateListParams {
/**
* The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
*/
account_id?: string;
/**
* The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
*/
zone_id?: string;
}
export interface CertificateDeleteParams {
/**
* The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
*/
account_id?: string;
/**
* The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
*/
zone_id?: string;
}
export interface CertificateGetParams {
/**
* The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
*/
account_id?: string;
/**
* The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
*/
zone_id?: string;
}
export declare namespace Certificates {
export import ZeroTrustCertificates = CertificatesAPI.ZeroTrustCertificates;
export import CertificateDeleteResponse = CertificatesAPI.CertificateDeleteResponse;
export import ZeroTrustCertificatesSinglePage = CertificatesAPI.ZeroTrustCertificatesSinglePage;
export import CertificateCreateParams = CertificatesAPI.CertificateCreateParams;
export import CertificateUpdateParams = CertificatesAPI.CertificateUpdateParams;
export import CertificateListParams = CertificatesAPI.CertificateListParams;
export import CertificateDeleteParams = CertificatesAPI.CertificateDeleteParams;
export import CertificateGetParams = CertificatesAPI.CertificateGetParams;
export import Settings = SettingsAPI.Settings;
export import ZeroTrustSettings = SettingsAPI.ZeroTrustSettings;
export import SettingUpdateResponse = SettingsAPI.SettingUpdateResponse;
export import SettingGetResponse = SettingsAPI.SettingGetResponse;
export import SettingUpdateParams = SettingsAPI.SettingUpdateParams;
export import SettingGetParams = SettingsAPI.SettingGetParams;
}
//# sourceMappingURL=certificates.d.ts.map