cloudflare/cloudflare-typescript

Public

mirrored from https://github.com/cloudflare/cloudflare-typescriptAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
7609e84ab3db53e79aefce6a112e90cb2a2bbba0

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/resources/cache/regional-tiered-cache.ts

137lines · modecode

1// File generated from our OpenAPI spec by Stainless.
2
3import * as Core from 'cloudflare/core';
4import { APIResource } from 'cloudflare/resource';
5import * as RegionalTieredCacheAPI from 'cloudflare/resources/cache/regional-tiered-cache';
6
7export class RegionalTieredCache extends APIResource {
8 /**
9 * Instructs Cloudflare to check a regional hub data center on the way to your
10 * upper tier. This can help improve performance for smart and custom tiered cache
11 * topologies.
12 */
13 update(
14 zoneId: string,
15 body: RegionalTieredCacheUpdateParams,
16 options?: Core.RequestOptions,
17 ): Core.APIPromise<RegionalTieredCacheUpdateResponse> {
18 return (
19 this._client.patch(`/zones/${zoneId}/cache/regional_tiered_cache`, {
20 body,
21 ...options,
22 }) as Core.APIPromise<{ result: RegionalTieredCacheUpdateResponse }>
23 )._thenUnwrap((obj) => obj.result);
24 }
25
26 /**
27 * Instructs Cloudflare to check a regional hub data center on the way to your
28 * upper tier. This can help improve performance for smart and custom tiered cache
29 * topologies.
30 */
31 get(zoneId: string, options?: Core.RequestOptions): Core.APIPromise<RegionalTieredCacheGetResponse> {
32 return (
33 this._client.get(`/zones/${zoneId}/cache/regional_tiered_cache`, options) as Core.APIPromise<{
34 result: RegionalTieredCacheGetResponse;
35 }>
36 )._thenUnwrap((obj) => obj.result);
37 }
38}
39
40/**
41 * Instructs Cloudflare to check a regional hub data center on the way to your
42 * upper tier. This can help improve performance for smart and custom tiered cache
43 * topologies.
44 */
45export interface RegionalTieredCacheUpdateResponse {
46 /**
47 * ID of the zone setting.
48 */
49 id: 'tc_regional';
50
51 /**
52 * last time this setting was modified.
53 */
54 modified_on: string | null;
55
56 /**
57 * Instructs Cloudflare to check a regional hub data center on the way to your
58 * upper tier. This can help improve performance for smart and custom tiered cache
59 * topologies.
60 */
61 value: RegionalTieredCacheUpdateResponse.Value;
62}
63
64export namespace RegionalTieredCacheUpdateResponse {
65 /**
66 * Instructs Cloudflare to check a regional hub data center on the way to your
67 * upper tier. This can help improve performance for smart and custom tiered cache
68 * topologies.
69 */
70 export interface Value {
71 /**
72 * ID of the zone setting.
73 */
74 id: 'tc_regional';
75
76 /**
77 * last time this setting was modified.
78 */
79 modified_on: string | null;
80 }
81}
82
83/**
84 * Instructs Cloudflare to check a regional hub data center on the way to your
85 * upper tier. This can help improve performance for smart and custom tiered cache
86 * topologies.
87 */
88export interface RegionalTieredCacheGetResponse {
89 /**
90 * ID of the zone setting.
91 */
92 id: 'tc_regional';
93
94 /**
95 * last time this setting was modified.
96 */
97 modified_on: string | null;
98
99 /**
100 * Instructs Cloudflare to check a regional hub data center on the way to your
101 * upper tier. This can help improve performance for smart and custom tiered cache
102 * topologies.
103 */
104 value: RegionalTieredCacheGetResponse.Value;
105}
106
107export namespace RegionalTieredCacheGetResponse {
108 /**
109 * Instructs Cloudflare to check a regional hub data center on the way to your
110 * upper tier. This can help improve performance for smart and custom tiered cache
111 * topologies.
112 */
113 export interface Value {
114 /**
115 * ID of the zone setting.
116 */
117 id: 'tc_regional';
118
119 /**
120 * last time this setting was modified.
121 */
122 modified_on: string | null;
123 }
124}
125
126export interface RegionalTieredCacheUpdateParams {
127 /**
128 * Value of the Regional Tiered Cache zone setting.
129 */
130 value: 'on' | 'off';
131}
132
133export namespace RegionalTieredCache {
134 export import RegionalTieredCacheUpdateResponse = RegionalTieredCacheAPI.RegionalTieredCacheUpdateResponse;
135 export import RegionalTieredCacheGetResponse = RegionalTieredCacheAPI.RegionalTieredCacheGetResponse;
136 export import RegionalTieredCacheUpdateParams = RegionalTieredCacheAPI.RegionalTieredCacheUpdateParams;
137}
138