cloudflare/cloudflare-typescript

Public

mirrored fromhttps://github.com/cloudflare/cloudflare-typescriptAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v3.0.0-beta.13

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/resources/acm/total-tls.ts

103lines · modecode

1// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
3import * as Core from 'cloudflare/core';
4import { APIResource } from 'cloudflare/resource';
5import * as TotalTLSAPI from 'cloudflare/resources/acm/total-tls';
6
7export class TotalTLS extends APIResource {
8 /**
9 * Set Total TLS Settings or disable the feature for a Zone.
10 */
11 create(
12 params: TotalTLSCreateParams,
13 options?: Core.RequestOptions,
14 ): Core.APIPromise<TotalTLSCreateResponse> {
15 const { zone_id, ...body } = params;
16 return (
17 this._client.post(`/zones/${zone_id}/acm/total_tls`, { body, ...options }) as Core.APIPromise<{
18 result: TotalTLSCreateResponse;
19 }>
20 )._thenUnwrap((obj) => obj.result);
21 }
22
23 /**
24 * Get Total TLS Settings for a Zone.
25 */
26 get(params: TotalTLSGetParams, options?: Core.RequestOptions): Core.APIPromise<TotalTLSGetResponse> {
27 const { zone_id } = params;
28 return (
29 this._client.get(`/zones/${zone_id}/acm/total_tls`, options) as Core.APIPromise<{
30 result: TotalTLSGetResponse;
31 }>
32 )._thenUnwrap((obj) => obj.result);
33 }
34}
35
36export interface TotalTLSCreateResponse {
37 /**
38 * The Certificate Authority that Total TLS certificates will be issued through.
39 */
40 certificate_authority?: 'google' | 'lets_encrypt';
41
42 /**
43 * If enabled, Total TLS will order a hostname specific TLS certificate for any
44 * proxied A, AAAA, or CNAME record in your zone.
45 */
46 enabled?: boolean;
47
48 /**
49 * The validity period in days for the certificates ordered via Total TLS.
50 */
51 validity_days?: 90;
52}
53
54export interface TotalTLSGetResponse {
55 /**
56 * The Certificate Authority that Total TLS certificates will be issued through.
57 */
58 certificate_authority?: 'google' | 'lets_encrypt';
59
60 /**
61 * If enabled, Total TLS will order a hostname specific TLS certificate for any
62 * proxied A, AAAA, or CNAME record in your zone.
63 */
64 enabled?: boolean;
65
66 /**
67 * The validity period in days for the certificates ordered via Total TLS.
68 */
69 validity_days?: 90;
70}
71
72export interface TotalTLSCreateParams {
73 /**
74 * Path param: Identifier
75 */
76 zone_id: string;
77
78 /**
79 * Body param: If enabled, Total TLS will order a hostname specific TLS certificate
80 * for any proxied A, AAAA, or CNAME record in your zone.
81 */
82 enabled: boolean;
83
84 /**
85 * Body param: The Certificate Authority that Total TLS certificates will be issued
86 * through.
87 */
88 certificate_authority?: 'google' | 'lets_encrypt';
89}
90
91export interface TotalTLSGetParams {
92 /**
93 * Identifier
94 */
95 zone_id: string;
96}
97
98export namespace TotalTLS {
99 export import TotalTLSCreateResponse = TotalTLSAPI.TotalTLSCreateResponse;
100 export import TotalTLSGetResponse = TotalTLSAPI.TotalTLSGetResponse;
101 export import TotalTLSCreateParams = TotalTLSAPI.TotalTLSCreateParams;
102 export import TotalTLSGetParams = TotalTLSAPI.TotalTLSGetParams;
103}
104