1 | |
2 | |
3 | * Update Archive Configuration |
4 | * Use this method to update an existing archiving configuration. |
5 | */ |
6 | export async function main(auth: RT.Mezmo, body: Body) { |
7 | const url = new URL(`https://api.mezmo.com/v1/config/archiving`) |
8 |
|
9 | const response = await fetch(url, { |
10 | method: 'PUT', |
11 | headers: { |
12 | 'Content-Type': 'application/json', |
13 | Authorization: 'Token ' + auth.apiKey |
14 | }, |
15 | body: JSON.stringify(body) |
16 | }) |
17 | if (!response.ok) { |
18 | const text = await response.text() |
19 | throw new Error(`${response.status} ${text}`) |
20 | } |
21 | return await response.json() |
22 | } |
23 |
|
24 | |
25 | |
26 | * This file was automatically generated by json-schema-to-typescript. |
27 | * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, |
28 | * and run json-schema-to-typescript to regenerate this file. |
29 | */ |
30 |
|
31 | export interface Body { |
32 | |
33 | * Defines the type of notification channel. Valid values are: `email`, `webhook`, `slack`, and `pagerduty` |
34 | */ |
35 | integration?: string |
36 | |
37 | * Name of the bucket. |
38 | */ |
39 | bucket?: string |
40 | |
41 | * Private endpoint associated with the bucket. |
42 | */ |
43 | endpoint?: string |
44 | |
45 | * API key that is needed to authenticate with the Cloud Object Storage service. |
46 | */ |
47 | apikey?: string |
48 | |
49 | * CRN of the Cloud Object Storage instance ID where the bucket is available. |
50 | */ |
51 | resourceinstanceid?: string |
52 | |
53 | * Account name |
54 | */ |
55 | accountname?: string |
56 | |
57 | * Account key |
58 | */ |
59 | accountkey?: string |
60 | |
61 | * Project ID |
62 | */ |
63 | projectid?: string |
64 | |
65 | * Space |
66 | */ |
67 | space?: string |
68 | |
69 | * Access key |
70 | */ |
71 | accesskey?: string |
72 | |
73 | * Secret key |
74 | */ |
75 | secretkey?: string |
76 | |
77 | * Auth URL |
78 | */ |
79 | authurl?: string |
80 | |
81 | * Expires |
82 | */ |
83 | expires?: string |
84 | |
85 | * Username |
86 | */ |
87 | username?: string |
88 | |
89 | * Password provided in credentials for authorization |
90 | */ |
91 | password?: string |
92 | |
93 | * Tenant name |
94 | */ |
95 | tenantname?: string |
96 | [k: string]: unknown |
97 | } |
98 |
|