@volter/twin-cloudflare 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +223 -0
- package/dist/r2/src/endpoint.d.ts +14 -0
- package/dist/r2/src/endpoint.js +30 -0
- package/dist/r2/src/fetch.d.ts +7 -0
- package/dist/r2/src/fetch.js +230 -0
- package/dist/r2/src/generated/surface.gen.json +1 -0
- package/dist/r2/src/manifest.d.ts +22 -0
- package/dist/r2/src/manifest.js +69 -0
- package/dist/r2/src/semantics/buckets.d.ts +18 -0
- package/dist/r2/src/semantics/buckets.js +145 -0
- package/dist/r2/src/semantics/objects.d.ts +8 -0
- package/dist/r2/src/semantics/objects.js +252 -0
- package/dist/r2/src/wire.d.ts +54 -0
- package/dist/r2/src/wire.js +120 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.js +26 -0
- package/dist/src/cloudflare-budget.d.ts +22 -0
- package/dist/src/cloudflare-budget.js +40 -0
- package/dist/src/cloudflare-capabilities.d.ts +6 -0
- package/dist/src/cloudflare-capabilities.js +1161 -0
- package/dist/src/cloudflare-common.d.ts +59 -0
- package/dist/src/cloudflare-common.js +142 -0
- package/dist/src/cloudflare-conformance.d.ts +6 -0
- package/dist/src/cloudflare-conformance.js +251 -0
- package/dist/src/cloudflare-connector.d.ts +53 -0
- package/dist/src/cloudflare-connector.js +418 -0
- package/dist/src/cloudflare-openapi-operations.d.ts +10 -0
- package/dist/src/cloudflare-openapi-operations.js +3336 -0
- package/dist/src/cloudflare-provisioning.d.ts +5 -0
- package/dist/src/cloudflare-provisioning.js +2097 -0
- package/dist/src/cloudflare-r2.d.ts +121 -0
- package/dist/src/cloudflare-r2.js +138 -0
- package/dist/src/cloudflare-server.d.ts +17 -0
- package/dist/src/cloudflare-server.js +101 -0
- package/dist/src/cloudflare-twin.d.ts +14 -0
- package/dist/src/cloudflare-twin.js +762 -0
- package/dist/src/cloudflare-worker-assets.d.ts +25 -0
- package/dist/src/cloudflare-worker-assets.js +192 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/index.js +69 -0
- package/dist/src/screens/dashboard.d.ts +3 -0
- package/dist/src/screens/dashboard.js +265 -0
- package/package.json +56 -0
- package/src/cli.ts +25 -0
- package/src/cloudflare-budget.ts +61 -0
- package/src/cloudflare-capabilities.ts +1107 -0
- package/src/cloudflare-common.ts +183 -0
- package/src/cloudflare-conformance.ts +204 -0
- package/src/cloudflare-connector.ts +443 -0
- package/src/cloudflare-openapi-operations.ts +3344 -0
- package/src/cloudflare-provisioning.ts +1969 -0
- package/src/cloudflare-r2.ts +173 -0
- package/src/cloudflare-server.ts +109 -0
- package/src/cloudflare-twin.ts +714 -0
- package/src/cloudflare-worker-assets.ts +207 -0
- package/src/index.ts +112 -0
- package/src/screens/dashboard.tsx +297 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
// The R2 lane's fetch: R2's S3 endpoint (`<ACCOUNT_ID>.r2.cloudflarestorage.com`, path-style or virtual-hosted) through
|
|
2
|
+
// the derived dispatch, and a bucket's public reads at a custom domain connected to it. The cloudflare pack's fetch
|
|
3
|
+
// (../../src/cloudflare-server.ts) sends both kinds of host here.
|
|
4
|
+
import { applyTwinWrite, bindSemantics, coreFor, createDerivedFetch, crossCutting, projectResources, vendorError, worldNow } from '@volter/world-core';
|
|
5
|
+
import { catchUpR2CustomDomains, r2Allows, r2Credential, r2PublicDomain, r2TempCredential } from "../../src/cloudflare-r2.js";
|
|
6
|
+
import surface from './generated/surface.gen.json' with { type: 'json' };
|
|
7
|
+
import { pathStyle } from "./endpoint.js";
|
|
8
|
+
import { manifest, spanning } from "./manifest.js";
|
|
9
|
+
import { bucketSemantics, DEFAULT_LIFECYCLE } from "./semantics/buckets.js";
|
|
10
|
+
import { objectBytes, objectHeaders, objectSemantics } from "./semantics/objects.js";
|
|
11
|
+
import { corsHeaders, corsRuleFor, endpointOf, hostOf, requestedHeaders, withBytes } from "./wire.js";
|
|
12
|
+
// what each operation the lane serves needs of the token that signed it (cloudflare-r2.ts r2Allows, from the permissions
|
|
13
|
+
// the R2 API tokens page states)
|
|
14
|
+
const ADMIN_WRITE = new Set(['CreateBucket', 'DeleteBucket', 'PutBucketCors', 'DeleteBucketCors', 'PutBucketLifecycleConfiguration']);
|
|
15
|
+
const ADMIN_READ = new Set(['ListBuckets', 'HeadBucket', 'GetBucketCors', 'GetBucketLifecycleConfiguration', 'GetBucketLocation', 'GetBucketEncryption']);
|
|
16
|
+
const OBJECT_READ = new Set(['GetObject', 'HeadObject', 'ListObjects', 'ListObjectsV2']);
|
|
17
|
+
function needOf(call) {
|
|
18
|
+
const id = call.operation.id;
|
|
19
|
+
if (ADMIN_WRITE.has(id))
|
|
20
|
+
return { admin: 'write' };
|
|
21
|
+
if (ADMIN_READ.has(id))
|
|
22
|
+
return { admin: 'read' };
|
|
23
|
+
return { object: OBJECT_READ.has(id) ? 'read' : 'write', bucket: String(call.params.Bucket ?? '') };
|
|
24
|
+
}
|
|
25
|
+
/** The Access Key ID a request is signed with, from its Authorization header or a presigned URL's X-Amz-Credential. */
|
|
26
|
+
function accessKeyOf(request) {
|
|
27
|
+
const auth = request.headers.get('authorization') ?? '';
|
|
28
|
+
const header = /^AWS4-HMAC-SHA256\s+Credential=([^/,\s]+)\//.exec(auth);
|
|
29
|
+
if (header)
|
|
30
|
+
return header[1];
|
|
31
|
+
const credential = new URL(request.url).searchParams.get('X-Amz-Credential');
|
|
32
|
+
return credential ? credential.split('/')[0] : undefined;
|
|
33
|
+
}
|
|
34
|
+
/** When a presigned URL stops working: its X-Amz-Date plus X-Amz-Expires seconds ("Expiry: Timeout from 1 second to 7
|
|
35
|
+
* days (604,800 seconds)", https://developers.cloudflare.com/r2/api/s3/presigned-urls/). */
|
|
36
|
+
function presignedUntil(request) {
|
|
37
|
+
const q = new URL(request.url).searchParams;
|
|
38
|
+
const date = /^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/.exec(q.get('X-Amz-Date') ?? '');
|
|
39
|
+
const expires = Number(q.get('X-Amz-Expires'));
|
|
40
|
+
if (!date || !q.has('X-Amz-Signature') || !Number.isFinite(expires))
|
|
41
|
+
return undefined;
|
|
42
|
+
return Date.parse(`${date[1]}-${date[2]}-${date[3]}T${date[4]}:${date[5]}:${date[6]}Z`) + expires * 1000;
|
|
43
|
+
}
|
|
44
|
+
/** Whether a request names an object outside a temporary credential's paths ("prefixes: keys starting with any listed
|
|
45
|
+
* prefix", "objects: exact object keys"): an object's key, or the prefix a listing asks for. */
|
|
46
|
+
function outsidePaths(c, call, need) {
|
|
47
|
+
const objectKey = call.params.Key !== undefined ? String(call.params.Key) : undefined;
|
|
48
|
+
const asked = objectKey ?? new URL(call.request.url).searchParams.get('prefix') ?? ('object' in need ? '' : undefined);
|
|
49
|
+
return asked !== undefined && !(c.prefixes.some((p) => asked.startsWith(p)) || (objectKey !== undefined && c.objects.includes(objectKey)));
|
|
50
|
+
}
|
|
51
|
+
/** A copy reads its source as well as writing its destination, so the token needs read on the source's bucket too. */
|
|
52
|
+
function copySourceAllowed(token, request) {
|
|
53
|
+
const source = decodeURIComponent(request.headers.get('x-amz-copy-source') ?? '').replace(/^\//, '').split('/')[0] ?? '';
|
|
54
|
+
return r2Allows(token, { object: 'read', bucket: source });
|
|
55
|
+
}
|
|
56
|
+
// R2's documented refusals for a caller (https://developers.cloudflare.com/r2/api/error-codes/)
|
|
57
|
+
const UNAUTHORIZED = { status: 401, code: 'Unauthorized', message: 'Missing or invalid authentication credentials.' };
|
|
58
|
+
const EXPIRED = { status: 403, code: 'ExpiredRequest', message: 'Presigned URL or request signature has expired.' };
|
|
59
|
+
const DENIED = { status: 403, code: 'AccessDenied', message: 'Insufficient permissions for the requested operation.' };
|
|
60
|
+
/** R2's own act as time passes: an object a lifecycle rule expires is removed ("Objects will typically be removed from a
|
|
61
|
+
* bucket within 24 hours of the x-amz-expiration value", Object lifecycles), and one a rule transitions moves to
|
|
62
|
+
* Infrequent Access, each at the moment it falls due and stamped then. Where the documentation stops: the days count from
|
|
63
|
+
* when the object was last written. */
|
|
64
|
+
async function expireObjects(root, now) {
|
|
65
|
+
const at = Date.parse(now);
|
|
66
|
+
const tree = projectResources('cloudflare', root);
|
|
67
|
+
const buckets = tree.filter((r) => r.type === 'r2_bucket' && r.deleted !== true);
|
|
68
|
+
const objects = tree.filter((r) => r.type === 'r2_object' && r.deleted !== true);
|
|
69
|
+
for (const b of buckets) {
|
|
70
|
+
const all = (b.lifecycle ?? DEFAULT_LIFECYCLE).filter((r) => r.enabled);
|
|
71
|
+
// when an action falls due for an object: its rule's days after the object was written, or on its rule's date (the
|
|
72
|
+
// page's "deleting objects on a specific date"); an object written after that date is due when it is next seen
|
|
73
|
+
const dueAt = (written, days, date) => (date !== undefined ? Math.max(Date.parse(date), written) : days !== undefined ? written + days * 86_400_000 : Infinity);
|
|
74
|
+
for (const o of objects.filter((x) => x.bucket_id === b.id)) {
|
|
75
|
+
const written = Date.parse(String(o.last_modified));
|
|
76
|
+
const inRule = (r) => String(o.key).startsWith(r.prefix);
|
|
77
|
+
const expiring = all.filter((r) => inRule(r) && (r.expireDays !== undefined || r.expireDate !== undefined)).map((r) => ({ r, due: dueAt(written, r.expireDays, r.expireDate) })).sort((p, q) => p.due - q.due)[0];
|
|
78
|
+
if (expiring && expiring.due <= at) {
|
|
79
|
+
await applyTwinWrite('cloudflare', { operation: 'r2_object.expire', subjectType: 'r2_object', subjectId: o.id, fields: { deleted: true, expired_by: expiring.r.id }, occurredAt: new Date(expiring.due).toISOString(), actor: { kind: 'system' } }, root);
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
// a transition to Infrequent Access, the same act on its own days or date
|
|
83
|
+
const move = all.filter(inRule).flatMap((r) => (r.transitions ?? []).map((tr) => ({ ...tr, due: dueAt(written, tr.days, tr.date) }))).find((m) => o.storage_class !== m.storageClass && m.due <= at);
|
|
84
|
+
if (move)
|
|
85
|
+
await applyTwinWrite('cloudflare', { operation: 'r2_object.transition', subjectType: 'r2_object', subjectId: o.id, fields: { storage_class: move.storageClass }, occurredAt: new Date(move.due).toISOString(), actor: { kind: 'system' } }, root);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
const bucketRow = (account, bucket, root) => projectResources('cloudflare', root).find((r) => r.type === 'r2_bucket' && r.deleted !== true && r.id === `${account}:${bucket}`);
|
|
90
|
+
export function createR2LaneFetch(options = {}) {
|
|
91
|
+
const scope = { ...(options.root !== undefined ? { root: options.root } : {}), ...(options.clock ? { clock: options.clock } : {}) };
|
|
92
|
+
const root = options.root;
|
|
93
|
+
const now = () => (options.clock ?? worldNow)();
|
|
94
|
+
const cross = crossCutting(manifest, { readOnly: options.readOnly ?? false, ...scope });
|
|
95
|
+
/** A request signed with temporary credentials ("The session token is sent with every request via the
|
|
96
|
+
* X-Amz-Security-Token header", https://developers.cloudflare.com/r2/api/s3/temporary-credentials/): the credential's
|
|
97
|
+
* bucket, permission and paths, within its parent token's grant, until its TTL. Where R2's documentation stops: a
|
|
98
|
+
* credential past its TTL is refused with the ExpiredRequest R2 answers an expired signature; its paths restrict the
|
|
99
|
+
* objects a request names (a list, the prefix it asks for), and leave bucket operations to the permission. */
|
|
100
|
+
const temporary = (call, next, account, key, session) => {
|
|
101
|
+
const found = key ? r2TempCredential(account, key, session, root) : undefined;
|
|
102
|
+
if (!found)
|
|
103
|
+
return vendorError(manifest, UNAUTHORIZED);
|
|
104
|
+
const { credential: c, parent } = found;
|
|
105
|
+
if (Date.parse(now()) > Date.parse(c.expires_at))
|
|
106
|
+
return vendorError(manifest, EXPIRED);
|
|
107
|
+
const need = needOf(call);
|
|
108
|
+
// "A temporary credential is bound to exactly one bucket"
|
|
109
|
+
const bucket = String(call.params.Bucket ?? '');
|
|
110
|
+
if (bucket !== c.bucket)
|
|
111
|
+
return vendorError(manifest, DENIED);
|
|
112
|
+
const scoped = { ...parent, permission: c.permission, buckets: [c.bucket] };
|
|
113
|
+
if (!r2Allows(scoped, need) || !r2Allows(parent, need))
|
|
114
|
+
return vendorError(manifest, DENIED);
|
|
115
|
+
if ((c.prefixes.length || c.objects.length) && outsidePaths(c, call, need))
|
|
116
|
+
return vendorError(manifest, DENIED);
|
|
117
|
+
if (call.operation.id === 'CopyObject' && !copySourceAllowed(scoped, call.request))
|
|
118
|
+
return vendorError(manifest, DENIED);
|
|
119
|
+
return cross(call, next);
|
|
120
|
+
};
|
|
121
|
+
const derived = createDerivedFetch({
|
|
122
|
+
surface: { ...surface, spanning },
|
|
123
|
+
handlers: bindSemantics(manifest, { ...bucketSemantics(), ...objectSemantics() }, scope),
|
|
124
|
+
core: coreFor(manifest, scope),
|
|
125
|
+
// every request to the S3 endpoint is signed with an R2 API token's credentials; the token's permission decides what
|
|
126
|
+
// it may do (R2 API tokens: "Object Read & Write: Allows the ability to read, write, and list objects in specific
|
|
127
|
+
// buckets"), and a presigned URL acts with the token that signed it until it expires. Where the evidence stops: the twin
|
|
128
|
+
// names the signer by the Access Key ID in the credential scope and does not recompute the signature, as the aws pack's
|
|
129
|
+
// judged Secrets Manager lane does (its life sends a placeholder signature); a journey step cannot compute SigV4.
|
|
130
|
+
around: async (call, next) => {
|
|
131
|
+
const endpoint = endpointOf(hostOf(call.request));
|
|
132
|
+
const key = accessKeyOf(call.request);
|
|
133
|
+
const session = call.request.headers.get('x-amz-security-token') ?? new URL(call.request.url).searchParams.get('X-Amz-Security-Token');
|
|
134
|
+
if (session !== null)
|
|
135
|
+
return temporary(call, next, endpoint.account, key, session);
|
|
136
|
+
const token = key ? r2Credential(endpoint.account, key, root) : undefined;
|
|
137
|
+
if (!token)
|
|
138
|
+
return vendorError(manifest, UNAUTHORIZED);
|
|
139
|
+
const until = presignedUntil(call.request);
|
|
140
|
+
if (until !== undefined && Date.parse(now()) > until)
|
|
141
|
+
return vendorError(manifest, EXPIRED);
|
|
142
|
+
if (!r2Allows(token, needOf(call)))
|
|
143
|
+
return vendorError(manifest, DENIED);
|
|
144
|
+
if (call.operation.id === 'CopyObject' && !copySourceAllowed(token, call.request))
|
|
145
|
+
return vendorError(manifest, DENIED);
|
|
146
|
+
return cross(call, next);
|
|
147
|
+
},
|
|
148
|
+
// an operation R2 does not implement, or the lane does not serve: R2 refuses what it does not support with 501
|
|
149
|
+
// NotImplemented (release notes, 2022-07-01); that it answers an operation so is the lane's reading (spec/SOURCE.md)
|
|
150
|
+
gap: () => vendorError(manifest, { status: 501, code: 'NotImplemented', message: 'Not Implemented' }),
|
|
151
|
+
});
|
|
152
|
+
return Object.assign(async (request) => {
|
|
153
|
+
const at = now();
|
|
154
|
+
if (!options.readOnly) {
|
|
155
|
+
await catchUpR2CustomDomains(root, at);
|
|
156
|
+
await expireObjects(root, at);
|
|
157
|
+
}
|
|
158
|
+
const host = hostOf(request);
|
|
159
|
+
const endpoint = endpointOf(host);
|
|
160
|
+
if (!endpoint)
|
|
161
|
+
return publicRead(request, host, root);
|
|
162
|
+
// a virtual-hosted request names its bucket in the host: the same operation as its path-style form (endpoint.ts)
|
|
163
|
+
const url = new URL(request.url);
|
|
164
|
+
const seen = `${url.protocol}//${host}${url.pathname}${url.search}`;
|
|
165
|
+
const addressed = endpoint.bucket ? new Request(pathStyle(seen), request) : request;
|
|
166
|
+
const path = new URL(addressed.url).pathname.split('/').filter(Boolean);
|
|
167
|
+
const bucket = path[0] ? decodeURIComponent(path[0]) : undefined;
|
|
168
|
+
if (request.method === 'OPTIONS')
|
|
169
|
+
return preflight(addressed, endpoint.account, bucket, root);
|
|
170
|
+
const answer = await derived(await withBytes(addressed));
|
|
171
|
+
return withCors(addressed, answer, bucket ? bucketRow(endpoint.account, bucket, root) : undefined);
|
|
172
|
+
}, { owners: () => derived.owners() });
|
|
173
|
+
}
|
|
174
|
+
/** A browser's preflight before a cross-origin request: "When a browser makes a request to a presigned URL on a
|
|
175
|
+
* different origin, the browser enforces CORS. Without a CORS policy, browser-based uploads and downloads using presigned
|
|
176
|
+
* URLs will fail" (https://developers.cloudflare.com/r2/buckets/cors/); the bucket's first rule that allows the origin,
|
|
177
|
+
* the method and the headers answers it. Where R2's documentation stops: a preflight no rule allows is refused with 403
|
|
178
|
+
* and S3's words for it. */
|
|
179
|
+
function preflight(request, account, bucket, root) {
|
|
180
|
+
const b = bucket ? bucketRow(account, bucket, root) : undefined;
|
|
181
|
+
if (!b)
|
|
182
|
+
return vendorError(manifest, { status: 404, code: 'NoSuchBucket', message: 'The specified bucket does not exist.' });
|
|
183
|
+
const origin = request.headers.get('origin');
|
|
184
|
+
const method = request.headers.get('access-control-request-method');
|
|
185
|
+
if (!origin || !method)
|
|
186
|
+
return vendorError(manifest, { status: 400, code: 'BadRequest', message: 'Insufficient information. Origin request header needed.' });
|
|
187
|
+
const rules = (b.cors ?? []);
|
|
188
|
+
const requested = requestedHeaders(request);
|
|
189
|
+
const rule = corsRuleFor(rules, origin, method, requested);
|
|
190
|
+
if (!rule)
|
|
191
|
+
return vendorError(manifest, { status: 403, code: 'AccessForbidden', message: rules.length ? 'CORS Response: This CORS request is not allowed.' : 'CORS Response: CORS is not enabled for this bucket.' });
|
|
192
|
+
return new Response(null, { status: 200, headers: corsHeaders(rule, origin, requested, true) });
|
|
193
|
+
}
|
|
194
|
+
/** A cross-origin request's answer carries the headers of the bucket's rule for its origin and method ("These response
|
|
195
|
+
* headers are only returned when the incoming HTTP request is a valid CORS request"). R2 "does not include CORS response
|
|
196
|
+
* headers on expired presigned URL responses"; where its documentation stops, the twin leaves them off every refusal. */
|
|
197
|
+
function withCors(request, answer, bucket) {
|
|
198
|
+
const origin = request.headers.get('origin');
|
|
199
|
+
if (!origin || !bucket || answer.status >= 400)
|
|
200
|
+
return answer;
|
|
201
|
+
const rule = corsRuleFor((bucket.cors ?? []), origin, request.method, []);
|
|
202
|
+
if (!rule)
|
|
203
|
+
return answer;
|
|
204
|
+
const headers = new Headers(answer.headers);
|
|
205
|
+
for (const [k, v] of Object.entries(corsHeaders(rule, origin, [], false)))
|
|
206
|
+
headers.set(k, v);
|
|
207
|
+
return new Response(answer.body, { status: answer.status, statusText: answer.statusText, headers });
|
|
208
|
+
}
|
|
209
|
+
/** A public read at a custom domain connected to a bucket (https://developers.cloudflare.com/r2/buckets/public-buckets/:
|
|
210
|
+
* "Expose your bucket as a custom domain under your control"): GET or HEAD of `/<key>` with no credential. "Currently,
|
|
211
|
+
* public buckets do not let you list the bucket contents at the root of your (sub) domain." Where the documentation
|
|
212
|
+
* stops: a key the bucket does not hold, a domain not yet Active or not enabled, and the domain's root answer a plain 404;
|
|
213
|
+
* another method answers 405. Cloudflare's cache in front of the domain is not modelled: a read reaches the bucket. */
|
|
214
|
+
async function publicRead(request, host, root) {
|
|
215
|
+
const notFound = () => new Response('Not Found', { status: 404, headers: { 'content-type': 'text/plain' } });
|
|
216
|
+
const domain = r2PublicDomain(host, root);
|
|
217
|
+
if (!domain)
|
|
218
|
+
return notFound();
|
|
219
|
+
if (request.method !== 'GET' && request.method !== 'HEAD')
|
|
220
|
+
return new Response('Method Not Allowed', { status: 405, headers: { 'content-type': 'text/plain', allow: 'GET, HEAD' } });
|
|
221
|
+
const key = decodeURIComponent(new URL(request.url).pathname.replace(/^\//, ''));
|
|
222
|
+
if (!key)
|
|
223
|
+
return notFound();
|
|
224
|
+
const o = projectResources('cloudflare', root).find((r) => r.type === 'r2_object' && r.deleted !== true && r.id === `${domain.account_id}:${domain.bucket}/${key}`);
|
|
225
|
+
if (!o)
|
|
226
|
+
return notFound();
|
|
227
|
+
const headers = objectHeaders(o);
|
|
228
|
+
const answer = request.method === 'HEAD' ? new Response(null, { headers }) : new Response(await objectBytes(o, root), { headers });
|
|
229
|
+
return withCors(request, answer, bucketRow(domain.account_id, domain.bucket, root));
|
|
230
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "generatedBy": "scripts/derive-pack.ts", "spec": "smithy.json.gz", "format": "smithy", "version": "2006-03-01", "resources": [{ "name": "AbacStatus", "schema": "AbacStatus", "fields": [{ "name": "Status", "type": "string", "nullable": true, "enum": ["Enabled", "Disabled"] }], "stateCandidates": [{ "field": "Status", "values": ["Disabled", "Enabled"] }], "expandable": [] }, { "name": "AbortMultipartUploadOutput", "schema": "AbortMultipartUploadOutput", "fields": [], "stateCandidates": [], "expandable": [] }, { "name": "CompleteMultipartUploadOutput", "schema": "CompleteMultipartUploadOutput", "fields": [{ "name": "Bucket", "type": "string", "nullable": true }, { "name": "ChecksumCRC32", "type": "string", "nullable": true }, { "name": "ChecksumCRC32C", "type": "string", "nullable": true }, { "name": "ChecksumCRC64NVME", "type": "string", "nullable": true }, { "name": "ChecksumMD5", "type": "string", "nullable": true }, { "name": "ChecksumSHA1", "type": "string", "nullable": true }, { "name": "ChecksumSHA256", "type": "string", "nullable": true }, { "name": "ChecksumSHA512", "type": "string", "nullable": true }, { "name": "ChecksumType", "type": "string", "nullable": true, "enum": ["COMPOSITE", "FULL_OBJECT"] }, { "name": "ChecksumXXHASH128", "type": "string", "nullable": true }, { "name": "ChecksumXXHASH3", "type": "string", "nullable": true }, { "name": "ChecksumXXHASH64", "type": "string", "nullable": true }, { "name": "ETag", "type": "string", "nullable": true }, { "name": "Key", "type": "string", "nullable": true }, { "name": "Location", "type": "string", "nullable": true }], "stateCandidates": [{ "field": "ChecksumType", "values": ["COMPOSITE", "FULL_OBJECT"] }], "expandable": [] }, { "name": "CopyObjectResult", "schema": "CopyObjectResult", "fields": [{ "name": "ChecksumCRC32", "type": "string", "nullable": true }, { "name": "ChecksumCRC32C", "type": "string", "nullable": true }, { "name": "ChecksumCRC64NVME", "type": "string", "nullable": true }, { "name": "ChecksumMD5", "type": "string", "nullable": true }, { "name": "ChecksumSHA1", "type": "string", "nullable": true }, { "name": "ChecksumSHA256", "type": "string", "nullable": true }, { "name": "ChecksumSHA512", "type": "string", "nullable": true }, { "name": "ChecksumType", "type": "string", "nullable": true, "enum": ["COMPOSITE", "FULL_OBJECT"] }, { "name": "ChecksumXXHASH128", "type": "string", "nullable": true }, { "name": "ChecksumXXHASH3", "type": "string", "nullable": true }, { "name": "ChecksumXXHASH64", "type": "string", "nullable": true }, { "name": "ETag", "type": "string", "nullable": true }, { "name": "LastModified", "type": "string", "nullable": true }], "stateCandidates": [{ "field": "ChecksumType", "values": ["COMPOSITE", "FULL_OBJECT"] }], "expandable": [] }, { "name": "CopyPartResult", "schema": "CopyPartResult", "fields": [{ "name": "ChecksumCRC32", "type": "string", "nullable": true }, { "name": "ChecksumCRC32C", "type": "string", "nullable": true }, { "name": "ChecksumCRC64NVME", "type": "string", "nullable": true }, { "name": "ChecksumMD5", "type": "string", "nullable": true }, { "name": "ChecksumSHA1", "type": "string", "nullable": true }, { "name": "ChecksumSHA256", "type": "string", "nullable": true }, { "name": "ChecksumSHA512", "type": "string", "nullable": true }, { "name": "ChecksumXXHASH128", "type": "string", "nullable": true }, { "name": "ChecksumXXHASH3", "type": "string", "nullable": true }, { "name": "ChecksumXXHASH64", "type": "string", "nullable": true }, { "name": "ETag", "type": "string", "nullable": true }, { "name": "LastModified", "type": "string", "nullable": true }], "stateCandidates": [], "expandable": [] }, { "name": "CreateBucketOutput", "schema": "CreateBucketOutput", "fields": [], "stateCandidates": [], "expandable": [] }, { "name": "CreateMultipartUploadOutput", "schema": "CreateMultipartUploadOutput", "fields": [{ "name": "Bucket", "type": "string", "nullable": true }, { "name": "Key", "type": "string", "nullable": true }, { "name": "UploadId", "type": "string", "nullable": true }], "stateCandidates": [], "expandable": [] }, { "name": "CreateSessionOutput", "schema": "CreateSessionOutput", "fields": [{ "name": "Credentials", "type": "SessionCredentials", "nullable": false, "required": true }], "stateCandidates": [], "expandable": [] }, { "name": "DeleteObjectAnnotationOutput", "schema": "DeleteObjectAnnotationOutput", "fields": [], "stateCandidates": [], "expandable": [] }, { "name": "DeleteObjectOutput", "schema": "DeleteObjectOutput", "fields": [], "stateCandidates": [], "expandable": [] }, { "name": "DeleteObjectsOutput", "schema": "DeleteObjectsOutput", "fields": [{ "name": "Deleted", "type": "list", "nullable": true }, { "name": "Error", "type": "list", "nullable": true }], "stateCandidates": [], "expandable": [] }, { "name": "GetBucketCorsOutput", "schema": "GetBucketCorsOutput", "fields": [{ "name": "CORSRule", "type": "list", "nullable": true }], "stateCandidates": [], "expandable": [] }, { "name": "GetBucketLifecycleConfigurationOutput", "schema": "GetBucketLifecycleConfigurationOutput", "fields": [{ "name": "Rule", "type": "list", "nullable": true }], "stateCandidates": [], "expandable": [] }, { "name": "GetBucketLocationOutput", "schema": "GetBucketLocationOutput", "fields": [{ "name": "LocationConstraint", "type": "string", "nullable": true, "enum": ["af-south-1", "ap-east-1", "ap-east-2", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-south-1", "ap-south-2", "ap-southeast-1", "ap-southeast-2", "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", "ap-southeast-6", "ap-southeast-7", "ca-central-1", "ca-west-1", "cn-north-1", "cn-northwest-1", "EU", "eu-central-1", "eu-central-2", "eu-north-1", "eu-south-1", "eu-south-2", "eu-west-1", "eu-west-2", "eu-west-3", "il-central-1", "me-central-1", "me-south-1", "mx-central-1", "sa-east-1", "us-east-2", "us-gov-east-1", "us-gov-west-1", "us-west-1", "us-west-2", "auto"] }], "stateCandidates": [{ "field": "LocationConstraint", "values": ["EU", "af-south-1", "ap-east-1", "ap-east-2", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-south-1", "ap-south-2", "ap-southeast-1", "ap-southeast-2", "ap-southeast-3", "ap-southeast-4", "ap-southeast-5", "ap-southeast-6", "ap-southeast-7", "auto", "ca-central-1", "ca-west-1", "cn-north-1", "cn-northwest-1", "eu-central-1", "eu-central-2", "eu-north-1", "eu-south-1", "eu-south-2", "eu-west-1", "eu-west-2", "eu-west-3", "il-central-1", "me-central-1", "me-south-1", "mx-central-1", "sa-east-1", "us-east-2", "us-gov-east-1", "us-gov-west-1", "us-west-1", "us-west-2"] }], "expandable": [] }, { "name": "GetBucketMetadataConfigurationResult", "schema": "GetBucketMetadataConfigurationResult", "fields": [{ "name": "MetadataConfigurationResult", "type": "MetadataConfigurationResult", "nullable": false, "required": true }], "stateCandidates": [], "expandable": [] }, { "name": "GetBucketMetadataTableConfigurationResult", "schema": "GetBucketMetadataTableConfigurationResult", "fields": [{ "name": "Error", "type": "ErrorDetails", "nullable": true }, { "name": "MetadataTableConfigurationResult", "type": "MetadataTableConfigurationResult", "nullable": false, "required": true }, { "name": "Status", "type": "string", "nullable": false, "required": true }], "stateCandidates": [], "expandable": [] }, { "name": "GetObjectAclOutput", "schema": "GetObjectAclOutput", "fields": [{ "name": "AccessControlList", "type": "list", "nullable": true }, { "name": "Owner", "type": "Owner", "nullable": true }], "stateCandidates": [], "expandable": [] }, { "name": "GetObjectAttributesOutput", "schema": "GetObjectAttributesOutput", "fields": [{ "name": "Checksum", "type": "Checksum", "nullable": true }, { "name": "ETag", "type": "string", "nullable": true }, { "name": "ObjectParts", "type": "GetObjectAttributesParts", "nullable": true }, { "name": "ObjectSize", "type": "long", "nullable": true }, { "name": "StorageClass", "type": "string", "nullable": true, "enum": ["STANDARD", "REDUCED_REDUNDANCY", "STANDARD_IA", "ONEZONE_IA", "INTELLIGENT_TIERING", "GLACIER", "DEEP_ARCHIVE", "OUTPOSTS", "GLACIER_IR", "SNOW", "EXPRESS_ONEZONE", "FSX_OPENZFS", "FSX_ONTAP", "AWS_BACKUP_WARM", "AWS_BACKUP_LOW_COST_WARM"] }], "stateCandidates": [{ "field": "StorageClass", "values": ["AWS_BACKUP_LOW_COST_WARM", "AWS_BACKUP_WARM", "DEEP_ARCHIVE", "EXPRESS_ONEZONE", "FSX_ONTAP", "FSX_OPENZFS", "GLACIER", "GLACIER_IR", "INTELLIGENT_TIERING", "ONEZONE_IA", "OUTPOSTS", "REDUCED_REDUNDANCY", "SNOW", "STANDARD", "STANDARD_IA"] }], "expandable": [] }, { "name": "HeadBucketOutput", "schema": "HeadBucketOutput", "fields": [], "stateCandidates": [], "expandable": [] }, { "name": "HeadObjectOutput", "schema": "HeadObjectOutput", "fields": [], "stateCandidates": [], "expandable": [] }, { "name": "ListBucketsOutput", "schema": "ListBucketsOutput", "fields": [{ "name": "Buckets", "type": "list", "nullable": true }, { "name": "ContinuationToken", "type": "string", "nullable": true }, { "name": "Owner", "type": "Owner", "nullable": true }, { "name": "Prefix", "type": "string", "nullable": true }], "stateCandidates": [], "expandable": [] }, { "name": "ListDirectoryBucketsOutput", "schema": "ListDirectoryBucketsOutput", "fields": [{ "name": "Buckets", "type": "list", "nullable": true }, { "name": "ContinuationToken", "type": "string", "nullable": true }], "stateCandidates": [], "expandable": [] }, { "name": "ListMultipartUploadsOutput", "schema": "ListMultipartUploadsOutput", "fields": [{ "name": "Bucket", "type": "string", "nullable": true }, { "name": "CommonPrefixes", "type": "list", "nullable": true }, { "name": "Delimiter", "type": "string", "nullable": true }, { "name": "EncodingType", "type": "string", "nullable": true, "enum": ["url"] }, { "name": "IsTruncated", "type": "boolean", "nullable": true }, { "name": "KeyMarker", "type": "string", "nullable": true }, { "name": "MaxUploads", "type": "integer", "nullable": true }, { "name": "NextKeyMarker", "type": "string", "nullable": true }, { "name": "NextUploadIdMarker", "type": "string", "nullable": true }, { "name": "Prefix", "type": "string", "nullable": true }, { "name": "Upload", "type": "list", "nullable": true }, { "name": "UploadIdMarker", "type": "string", "nullable": true }], "stateCandidates": [], "expandable": [] }, { "name": "ListObjectAnnotationsOutput", "schema": "ListObjectAnnotationsOutput", "fields": [{ "name": "AnnotationCount", "type": "integer", "nullable": true }, { "name": "AnnotationPrefix", "type": "string", "nullable": true }, { "name": "Annotations", "type": "list", "nullable": true }, { "name": "Bucket", "type": "string", "nullable": true }, { "name": "ContinuationToken", "type": "string", "nullable": true }, { "name": "Key", "type": "string", "nullable": true }, { "name": "MaxAnnotationResults", "type": "integer", "nullable": true }, { "name": "NextContinuationToken", "type": "string", "nullable": true }], "stateCandidates": [], "expandable": [] }, { "name": "ListObjectsOutput", "schema": "ListObjectsOutput", "fields": [{ "name": "CommonPrefixes", "type": "list", "nullable": true }, { "name": "Contents", "type": "list", "nullable": true }, { "name": "Delimiter", "type": "string", "nullable": true }, { "name": "EncodingType", "type": "string", "nullable": true, "enum": ["url"] }, { "name": "IsTruncated", "type": "boolean", "nullable": true }, { "name": "Marker", "type": "string", "nullable": true }, { "name": "MaxKeys", "type": "integer", "nullable": true }, { "name": "Name", "type": "string", "nullable": true }, { "name": "NextMarker", "type": "string", "nullable": true }, { "name": "Prefix", "type": "string", "nullable": true }], "stateCandidates": [], "expandable": [] }, { "name": "ListObjectsV2Output", "schema": "ListObjectsV2Output", "fields": [{ "name": "CommonPrefixes", "type": "list", "nullable": true }, { "name": "Contents", "type": "list", "nullable": true }, { "name": "ContinuationToken", "type": "string", "nullable": true }, { "name": "Delimiter", "type": "string", "nullable": true }, { "name": "EncodingType", "type": "string", "nullable": true, "enum": ["url"] }, { "name": "IsTruncated", "type": "boolean", "nullable": true }, { "name": "KeyCount", "type": "integer", "nullable": true }, { "name": "MaxKeys", "type": "integer", "nullable": true }, { "name": "Name", "type": "string", "nullable": true }, { "name": "NextContinuationToken", "type": "string", "nullable": true }, { "name": "Prefix", "type": "string", "nullable": true }, { "name": "StartAfter", "type": "string", "nullable": true }], "stateCandidates": [], "expandable": [] }, { "name": "ListObjectVersionsOutput", "schema": "ListObjectVersionsOutput", "fields": [{ "name": "CommonPrefixes", "type": "list", "nullable": true }, { "name": "DeleteMarker", "type": "list", "nullable": true }, { "name": "Delimiter", "type": "string", "nullable": true }, { "name": "EncodingType", "type": "string", "nullable": true, "enum": ["url"] }, { "name": "IsTruncated", "type": "boolean", "nullable": true }, { "name": "KeyMarker", "type": "string", "nullable": true }, { "name": "MaxKeys", "type": "integer", "nullable": true }, { "name": "Name", "type": "string", "nullable": true }, { "name": "NextKeyMarker", "type": "string", "nullable": true }, { "name": "NextVersionIdMarker", "type": "string", "nullable": true }, { "name": "Prefix", "type": "string", "nullable": true }, { "name": "Version", "type": "list", "nullable": true }, { "name": "VersionIdMarker", "type": "string", "nullable": true }], "stateCandidates": [], "expandable": [] }, { "name": "ListPartsOutput", "schema": "ListPartsOutput", "fields": [{ "name": "Bucket", "type": "string", "nullable": true }, { "name": "ChecksumAlgorithm", "type": "string", "nullable": true, "enum": ["CRC32", "CRC32C", "SHA1", "SHA256", "CRC64NVME", "SHA512", "MD5", "XXHASH64", "XXHASH3", "XXHASH128"] }, { "name": "ChecksumType", "type": "string", "nullable": true, "enum": ["COMPOSITE", "FULL_OBJECT"] }, { "name": "Initiator", "type": "Initiator", "nullable": true }, { "name": "IsTruncated", "type": "boolean", "nullable": true }, { "name": "Key", "type": "string", "nullable": true }, { "name": "MaxParts", "type": "integer", "nullable": true }, { "name": "NextPartNumberMarker", "type": "string", "nullable": true }, { "name": "Owner", "type": "Owner", "nullable": true }, { "name": "Part", "type": "list", "nullable": true }, { "name": "PartNumberMarker", "type": "string", "nullable": true }, { "name": "StorageClass", "type": "string", "nullable": true, "enum": ["STANDARD", "REDUCED_REDUNDANCY", "STANDARD_IA", "ONEZONE_IA", "INTELLIGENT_TIERING", "GLACIER", "DEEP_ARCHIVE", "OUTPOSTS", "GLACIER_IR", "SNOW", "EXPRESS_ONEZONE", "FSX_OPENZFS", "FSX_ONTAP", "AWS_BACKUP_WARM", "AWS_BACKUP_LOW_COST_WARM"] }, { "name": "UploadId", "type": "string", "nullable": true }], "stateCandidates": [{ "field": "ChecksumAlgorithm", "values": ["CRC32", "CRC32C", "CRC64NVME", "MD5", "SHA1", "SHA256", "SHA512", "XXHASH128", "XXHASH3", "XXHASH64"] }, { "field": "ChecksumType", "values": ["COMPOSITE", "FULL_OBJECT"] }, { "field": "StorageClass", "values": ["AWS_BACKUP_LOW_COST_WARM", "AWS_BACKUP_WARM", "DEEP_ARCHIVE", "EXPRESS_ONEZONE", "FSX_ONTAP", "FSX_OPENZFS", "GLACIER", "GLACIER_IR", "INTELLIGENT_TIERING", "ONEZONE_IA", "OUTPOSTS", "REDUCED_REDUNDANCY", "SNOW", "STANDARD", "STANDARD_IA"] }], "expandable": [] }, { "name": "ObjectLockLegalHold", "schema": "ObjectLockLegalHold", "fields": [{ "name": "Status", "type": "string", "nullable": true, "enum": ["ON", "OFF"] }], "stateCandidates": [{ "field": "Status", "values": ["OFF", "ON"] }], "expandable": [] }, { "name": "ObjectLockRetention", "schema": "ObjectLockRetention", "fields": [{ "name": "EventHold", "type": "string", "nullable": true, "enum": ["ON", "OFF"] }, { "name": "EventHoldDuration", "type": "EventHoldDuration", "nullable": true }, { "name": "Mode", "type": "string", "nullable": true, "enum": ["GOVERNANCE", "COMPLIANCE"] }, { "name": "RetainUntilDate", "type": "string", "nullable": true }], "stateCandidates": [{ "field": "EventHold", "values": ["OFF", "ON"] }, { "field": "Mode", "values": ["COMPLIANCE", "GOVERNANCE"] }], "expandable": [] }, { "name": "PutBucketLifecycleConfigurationOutput", "schema": "PutBucketLifecycleConfigurationOutput", "fields": [], "stateCandidates": [], "expandable": [] }, { "name": "PutObjectAclOutput", "schema": "PutObjectAclOutput", "fields": [], "stateCandidates": [], "expandable": [] }, { "name": "PutObjectAnnotationOutput", "schema": "PutObjectAnnotationOutput", "fields": [{ "name": "AnnotationName", "type": "string", "nullable": true }, { "name": "Key", "type": "string", "nullable": true }], "stateCandidates": [], "expandable": [] }, { "name": "PutObjectLegalHoldOutput", "schema": "PutObjectLegalHoldOutput", "fields": [], "stateCandidates": [], "expandable": [] }, { "name": "PutObjectOutput", "schema": "PutObjectOutput", "fields": [], "stateCandidates": [], "expandable": [] }, { "name": "PutObjectRetentionOutput", "schema": "PutObjectRetentionOutput", "fields": [], "stateCandidates": [], "expandable": [] }, { "name": "RenameObjectOutput", "schema": "RenameObjectOutput", "fields": [], "stateCandidates": [], "expandable": [] }, { "name": "RestoreObjectOutput", "schema": "RestoreObjectOutput", "fields": [], "stateCandidates": [], "expandable": [] }, { "name": "ServerSideEncryptionConfiguration", "schema": "ServerSideEncryptionConfiguration", "fields": [{ "name": "Rule", "type": "list", "nullable": false, "required": true }], "stateCandidates": [], "expandable": [] }, { "name": "Unit", "schema": "Unit", "fields": [], "stateCandidates": [], "expandable": [] }, { "name": "UpdateObjectEncryptionResponse", "schema": "UpdateObjectEncryptionResponse", "fields": [], "stateCandidates": [], "expandable": [] }, { "name": "UploadPartOutput", "schema": "UploadPartOutput", "fields": [], "stateCandidates": [], "expandable": [] }], "operations": [{ "id": "AbortMultipartUpload", "method": "delete", "path": "/{Bucket}/{Key}", "pathParams": ["Bucket", "Key"], "query": [{ "name": "uploadId", "type": "string", "required": true }], "body": [], "bodyEncoding": "xml", "successStatus": 204, "answers": { "resource": "AbortMultipartUploadOutput", "list": false }, "class": "action", "discriminator": { "uploadId": null } }, { "id": "CompleteMultipartUpload", "method": "post", "path": "/{Bucket}/{Key}", "pathParams": ["Bucket", "Key"], "query": [{ "name": "uploadId", "type": "string", "required": true }], "body": [{ "name": "MultipartUpload", "type": "CompletedMultipartUpload", "required": false }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "CompleteMultipartUploadOutput", "list": false }, "class": "action" }, { "id": "CopyObject", "method": "put", "path": "/{Bucket}/{Key}", "pathParams": ["Bucket", "Key"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "CopyObjectResult", "list": false }, "class": "action", "headers": { "x-amz-copy-source": null } }, { "id": "CreateBucket", "method": "put", "path": "/{Bucket}", "pathParams": ["Bucket"], "query": [], "body": [{ "name": "CreateBucketConfiguration", "type": "CreateBucketConfiguration", "required": false }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "CreateBucketOutput", "list": false }, "class": "create" }, { "id": "CreateBucketMetadataConfiguration", "method": "post", "path": "/{Bucket}", "discriminator": { "metadataConfiguration": "" }, "pathParams": ["Bucket"], "query": [], "body": [{ "name": "MetadataConfiguration", "type": "MetadataConfiguration", "required": true }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "Unit", "list": false }, "class": "create" }, { "id": "CreateBucketMetadataTableConfiguration", "method": "post", "path": "/{Bucket}", "discriminator": { "metadataTable": "" }, "pathParams": ["Bucket"], "query": [], "body": [{ "name": "MetadataTableConfiguration", "type": "MetadataTableConfiguration", "required": true }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "Unit", "list": false }, "class": "create" }, { "id": "CreateMultipartUpload", "method": "post", "path": "/{Bucket}/{Key}", "discriminator": { "uploads": "" }, "pathParams": ["Bucket", "Key"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "CreateMultipartUploadOutput", "list": false }, "class": "create" }, { "id": "CreateSession", "method": "get", "path": "/{Bucket}", "discriminator": { "session": "" }, "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "CreateSessionOutput", "list": false }, "class": "create" }, { "id": "DeleteBucket", "method": "delete", "path": "/{Bucket}", "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 204, "answers": { "resource": "Unit", "list": false }, "class": "delete" }, { "id": "DeleteBucketAnalyticsConfiguration", "method": "delete", "path": "/{Bucket}", "discriminator": { "analytics": "" }, "pathParams": ["Bucket"], "query": [{ "name": "id", "type": "string", "required": true }], "body": [], "bodyEncoding": "xml", "successStatus": 204, "answers": { "resource": "Unit", "list": false }, "class": "delete" }, { "id": "DeleteBucketCors", "method": "delete", "path": "/{Bucket}", "discriminator": { "cors": "" }, "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 204, "answers": { "resource": "Unit", "list": false }, "class": "delete" }, { "id": "DeleteBucketEncryption", "method": "delete", "path": "/{Bucket}", "discriminator": { "encryption": "" }, "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 204, "answers": { "resource": "Unit", "list": false }, "class": "delete" }, { "id": "DeleteBucketIntelligentTieringConfiguration", "method": "delete", "path": "/{Bucket}", "discriminator": { "intelligent-tiering": "" }, "pathParams": ["Bucket"], "query": [{ "name": "id", "type": "string", "required": true }], "body": [], "bodyEncoding": "xml", "successStatus": 204, "answers": { "resource": "Unit", "list": false }, "class": "delete" }, { "id": "DeleteBucketInventoryConfiguration", "method": "delete", "path": "/{Bucket}", "discriminator": { "inventory": "" }, "pathParams": ["Bucket"], "query": [{ "name": "id", "type": "string", "required": true }], "body": [], "bodyEncoding": "xml", "successStatus": 204, "answers": { "resource": "Unit", "list": false }, "class": "delete" }, { "id": "DeleteBucketLifecycle", "method": "delete", "path": "/{Bucket}", "discriminator": { "lifecycle": "" }, "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 204, "answers": { "resource": "Unit", "list": false }, "class": "delete" }, { "id": "DeleteBucketMetadataConfiguration", "method": "delete", "path": "/{Bucket}", "discriminator": { "metadataConfiguration": "" }, "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 204, "answers": { "resource": "Unit", "list": false }, "class": "delete" }, { "id": "DeleteBucketMetadataTableConfiguration", "method": "delete", "path": "/{Bucket}", "discriminator": { "metadataTable": "" }, "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 204, "answers": { "resource": "Unit", "list": false }, "class": "delete" }, { "id": "DeleteBucketMetricsConfiguration", "method": "delete", "path": "/{Bucket}", "discriminator": { "metrics": "" }, "pathParams": ["Bucket"], "query": [{ "name": "id", "type": "string", "required": true }], "body": [], "bodyEncoding": "xml", "successStatus": 204, "answers": { "resource": "Unit", "list": false }, "class": "delete" }, { "id": "DeleteBucketOwnershipControls", "method": "delete", "path": "/{Bucket}", "discriminator": { "ownershipControls": "" }, "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 204, "answers": { "resource": "Unit", "list": false }, "class": "delete" }, { "id": "DeleteBucketPolicy", "method": "delete", "path": "/{Bucket}", "discriminator": { "policy": "" }, "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 204, "answers": { "resource": "Unit", "list": false }, "class": "delete" }, { "id": "DeleteBucketReplication", "method": "delete", "path": "/{Bucket}", "discriminator": { "replication": "" }, "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 204, "answers": { "resource": "Unit", "list": false }, "class": "delete" }, { "id": "DeleteBucketTagging", "method": "delete", "path": "/{Bucket}", "discriminator": { "tagging": "" }, "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 204, "answers": { "resource": "Unit", "list": false }, "class": "delete" }, { "id": "DeleteBucketWebsite", "method": "delete", "path": "/{Bucket}", "discriminator": { "website": "" }, "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 204, "answers": { "resource": "Unit", "list": false }, "class": "delete" }, { "id": "DeleteObject", "method": "delete", "path": "/{Bucket}/{Key}", "pathParams": ["Bucket", "Key"], "query": [{ "name": "versionId", "type": "string", "required": false }], "body": [], "bodyEncoding": "xml", "successStatus": 204, "answers": { "resource": "DeleteObjectOutput", "list": false }, "class": "delete" }, { "id": "DeleteObjectAnnotation", "method": "delete", "path": "/{Bucket}/{Key}", "discriminator": { "annotation": "" }, "pathParams": ["Bucket", "Key"], "query": [{ "name": "annotationName", "type": "string", "required": true }, { "name": "versionId", "type": "string", "required": false }], "body": [], "bodyEncoding": "xml", "successStatus": 204, "answers": { "resource": "DeleteObjectAnnotationOutput", "list": false }, "class": "delete" }, { "id": "DeleteObjects", "method": "post", "path": "/{Bucket}", "discriminator": { "delete": "" }, "pathParams": ["Bucket"], "query": [], "body": [{ "name": "Delete", "type": "Delete", "required": true }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "DeleteObjectsOutput", "list": false }, "class": "delete" }, { "id": "DeletePublicAccessBlock", "method": "delete", "path": "/{Bucket}", "discriminator": { "publicAccessBlock": "" }, "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 204, "answers": { "resource": "Unit", "list": false }, "class": "delete" }, { "id": "GetBucketAbac", "method": "get", "path": "/{Bucket}", "discriminator": { "abac": "" }, "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "AbacStatus", "list": false }, "class": "retrieve" }, { "id": "GetBucketCors", "method": "get", "path": "/{Bucket}", "discriminator": { "cors": "" }, "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "GetBucketCorsOutput", "list": false }, "class": "retrieve" }, { "id": "GetBucketEncryption", "method": "get", "path": "/{Bucket}", "discriminator": { "encryption": "" }, "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "ServerSideEncryptionConfiguration", "list": false }, "class": "retrieve" }, { "id": "GetBucketLifecycleConfiguration", "method": "get", "path": "/{Bucket}", "discriminator": { "lifecycle": "" }, "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "GetBucketLifecycleConfigurationOutput", "list": false }, "class": "retrieve" }, { "id": "GetBucketLocation", "method": "get", "path": "/{Bucket}", "discriminator": { "location": "" }, "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "GetBucketLocationOutput", "list": false }, "class": "retrieve" }, { "id": "GetBucketMetadataConfiguration", "method": "get", "path": "/{Bucket}", "discriminator": { "metadataConfiguration": "" }, "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "GetBucketMetadataConfigurationResult", "list": false }, "class": "retrieve" }, { "id": "GetBucketMetadataTableConfiguration", "method": "get", "path": "/{Bucket}", "discriminator": { "metadataTable": "" }, "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "GetBucketMetadataTableConfigurationResult", "list": false }, "class": "retrieve" }, { "id": "GetObject", "method": "get", "path": "/{Bucket}/{Key}", "pathParams": ["Bucket", "Key"], "query": [{ "name": "response-cache-control", "type": "string", "required": false }, { "name": "response-content-disposition", "type": "string", "required": false }, { "name": "response-content-encoding", "type": "string", "required": false }, { "name": "response-content-language", "type": "string", "required": false }, { "name": "response-content-type", "type": "string", "required": false }, { "name": "response-expires", "type": "string", "required": false }, { "name": "versionId", "type": "string", "required": false }, { "name": "partNumber", "type": "integer", "required": false }], "body": [], "bodyEncoding": "xml", "successStatus": 200, "class": "retrieve" }, { "id": "GetObjectAcl", "method": "get", "path": "/{Bucket}/{Key}", "discriminator": { "acl": "" }, "pathParams": ["Bucket", "Key"], "query": [{ "name": "versionId", "type": "string", "required": false }], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "GetObjectAclOutput", "list": false }, "class": "retrieve" }, { "id": "GetObjectAnnotation", "method": "get", "path": "/{Bucket}/{Key}", "discriminator": { "annotation": "", "annotationName": null }, "pathParams": ["Bucket", "Key"], "query": [{ "name": "annotationName", "type": "string", "required": true }, { "name": "versionId", "type": "string", "required": false }], "body": [], "bodyEncoding": "xml", "successStatus": 200, "class": "retrieve" }, { "id": "GetObjectAttributes", "method": "get", "path": "/{Bucket}/{Key}", "discriminator": { "attributes": "" }, "pathParams": ["Bucket", "Key"], "query": [{ "name": "versionId", "type": "string", "required": false }], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "GetObjectAttributesOutput", "list": false }, "class": "retrieve" }, { "id": "GetObjectLegalHold", "method": "get", "path": "/{Bucket}/{Key}", "discriminator": { "legal-hold": "" }, "pathParams": ["Bucket", "Key"], "query": [{ "name": "versionId", "type": "string", "required": false }], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "ObjectLockLegalHold", "list": false }, "class": "retrieve" }, { "id": "GetObjectRetention", "method": "get", "path": "/{Bucket}/{Key}", "discriminator": { "retention": "" }, "pathParams": ["Bucket", "Key"], "query": [{ "name": "versionId", "type": "string", "required": false }], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "ObjectLockRetention", "list": false }, "class": "retrieve" }, { "id": "GetObjectTorrent", "method": "get", "path": "/{Bucket}/{Key}", "discriminator": { "torrent": "" }, "pathParams": ["Bucket", "Key"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 200, "class": "retrieve" }, { "id": "HeadBucket", "method": "head", "path": "/{Bucket}", "pathParams": ["Bucket"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "HeadBucketOutput", "list": false }, "class": "action" }, { "id": "HeadObject", "method": "head", "path": "/{Bucket}/{Key}", "pathParams": ["Bucket", "Key"], "query": [{ "name": "response-cache-control", "type": "string", "required": false }, { "name": "response-content-disposition", "type": "string", "required": false }, { "name": "response-content-encoding", "type": "string", "required": false }, { "name": "response-content-language", "type": "string", "required": false }, { "name": "response-content-type", "type": "string", "required": false }, { "name": "response-expires", "type": "string", "required": false }, { "name": "versionId", "type": "string", "required": false }, { "name": "partNumber", "type": "integer", "required": false }], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "HeadObjectOutput", "list": false }, "class": "action" }, { "id": "ListBuckets", "method": "get", "path": "/", "pathParams": [], "query": [{ "name": "max-buckets", "type": "integer", "required": false }, { "name": "continuation-token", "type": "string", "required": false }, { "name": "prefix", "type": "string", "required": false }, { "name": "bucket-region", "type": "string", "required": false }], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "ListBucketsOutput", "list": false }, "class": "list" }, { "id": "ListDirectoryBuckets", "method": "get", "path": "/", "discriminator": { "x-id": "ListDirectoryBuckets" }, "pathParams": [], "query": [{ "name": "continuation-token", "type": "string", "required": false }, { "name": "max-directory-buckets", "type": "integer", "required": false }], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "ListDirectoryBucketsOutput", "list": false }, "class": "list" }, { "id": "ListMultipartUploads", "method": "get", "path": "/{Bucket}", "discriminator": { "uploads": "" }, "pathParams": ["Bucket"], "query": [{ "name": "delimiter", "type": "string", "required": false }, { "name": "encoding-type", "type": "string", "required": false }, { "name": "key-marker", "type": "string", "required": false }, { "name": "max-uploads", "type": "integer", "required": false }, { "name": "prefix", "type": "string", "required": false }, { "name": "upload-id-marker", "type": "string", "required": false }], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "ListMultipartUploadsOutput", "list": false }, "class": "list" }, { "id": "ListObjectAnnotations", "method": "get", "path": "/{Bucket}/{Key}", "discriminator": { "annotation": "" }, "pathParams": ["Bucket", "Key"], "query": [{ "name": "versionId", "type": "string", "required": false }, { "name": "max-annotation-results", "type": "integer", "required": false }, { "name": "annotation-prefix", "type": "string", "required": false }, { "name": "continuation-token", "type": "string", "required": false }], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "ListObjectAnnotationsOutput", "list": false }, "class": "list" }, { "id": "ListObjectVersions", "method": "get", "path": "/{Bucket}", "discriminator": { "versions": "" }, "pathParams": ["Bucket"], "query": [{ "name": "delimiter", "type": "string", "required": false }, { "name": "encoding-type", "type": "string", "required": false }, { "name": "key-marker", "type": "string", "required": false }, { "name": "max-keys", "type": "integer", "required": false }, { "name": "prefix", "type": "string", "required": false }, { "name": "version-id-marker", "type": "string", "required": false }], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "ListObjectVersionsOutput", "list": false }, "class": "list" }, { "id": "ListObjects", "method": "get", "path": "/{Bucket}", "pathParams": ["Bucket"], "query": [{ "name": "delimiter", "type": "string", "required": false }, { "name": "encoding-type", "type": "string", "required": false }, { "name": "marker", "type": "string", "required": false }, { "name": "max-keys", "type": "integer", "required": false }, { "name": "prefix", "type": "string", "required": false }], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "ListObjectsOutput", "list": false }, "class": "list" }, { "id": "ListObjectsV2", "method": "get", "path": "/{Bucket}", "discriminator": { "list-type": "2" }, "pathParams": ["Bucket"], "query": [{ "name": "delimiter", "type": "string", "required": false }, { "name": "encoding-type", "type": "string", "required": false }, { "name": "max-keys", "type": "integer", "required": false }, { "name": "prefix", "type": "string", "required": false }, { "name": "continuation-token", "type": "string", "required": false }, { "name": "fetch-owner", "type": "boolean", "required": false }, { "name": "start-after", "type": "string", "required": false }], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "ListObjectsV2Output", "list": false }, "class": "list" }, { "id": "ListParts", "method": "get", "path": "/{Bucket}/{Key}", "pathParams": ["Bucket", "Key"], "query": [{ "name": "max-parts", "type": "integer", "required": false }, { "name": "part-number-marker", "type": "string", "required": false }, { "name": "uploadId", "type": "string", "required": true }], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "ListPartsOutput", "list": false }, "class": "list", "discriminator": { "uploadId": null } }, { "id": "PutBucketAbac", "method": "put", "path": "/{Bucket}", "discriminator": { "abac": "" }, "pathParams": ["Bucket"], "query": [], "body": [{ "name": "AbacStatus", "type": "AbacStatus", "required": true }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "Unit", "list": false }, "class": "update" }, { "id": "PutBucketCors", "method": "put", "path": "/{Bucket}", "discriminator": { "cors": "" }, "pathParams": ["Bucket"], "query": [], "body": [{ "name": "CORSConfiguration", "type": "CORSConfiguration", "required": true }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "Unit", "list": false }, "class": "update" }, { "id": "PutBucketLifecycleConfiguration", "method": "put", "path": "/{Bucket}", "discriminator": { "lifecycle": "" }, "pathParams": ["Bucket"], "query": [], "body": [{ "name": "LifecycleConfiguration", "type": "BucketLifecycleConfiguration", "required": false }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "PutBucketLifecycleConfigurationOutput", "list": false }, "class": "update" }, { "id": "PutObject", "method": "put", "path": "/{Bucket}/{Key}", "pathParams": ["Bucket", "Key"], "query": [], "body": [{ "name": "Body", "type": "blob", "required": false }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "PutObjectOutput", "list": false }, "class": "update" }, { "id": "PutObjectAcl", "method": "put", "path": "/{Bucket}/{Key}", "discriminator": { "acl": "" }, "pathParams": ["Bucket", "Key"], "query": [{ "name": "versionId", "type": "string", "required": false }], "body": [{ "name": "AccessControlPolicy", "type": "AccessControlPolicy", "required": false }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "PutObjectAclOutput", "list": false }, "class": "update" }, { "id": "PutObjectAnnotation", "method": "put", "path": "/{Bucket}/{Key}", "discriminator": { "annotation": "" }, "pathParams": ["Bucket", "Key"], "query": [{ "name": "versionId", "type": "string", "required": false }, { "name": "annotationName", "type": "string", "required": true }], "body": [{ "name": "AnnotationPayload", "type": "blob", "required": true }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "PutObjectAnnotationOutput", "list": false }, "class": "update" }, { "id": "PutObjectLegalHold", "method": "put", "path": "/{Bucket}/{Key}", "discriminator": { "legal-hold": "" }, "pathParams": ["Bucket", "Key"], "query": [{ "name": "versionId", "type": "string", "required": false }], "body": [{ "name": "LegalHold", "type": "ObjectLockLegalHold", "required": false }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "PutObjectLegalHoldOutput", "list": false }, "class": "update" }, { "id": "PutObjectRetention", "method": "put", "path": "/{Bucket}/{Key}", "discriminator": { "retention": "" }, "pathParams": ["Bucket", "Key"], "query": [{ "name": "versionId", "type": "string", "required": false }], "body": [{ "name": "Retention", "type": "ObjectLockRetention", "required": false }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "PutObjectRetentionOutput", "list": false }, "class": "update" }, { "id": "RenameObject", "method": "put", "path": "/{Bucket}/{Key}", "discriminator": { "renameObject": "" }, "pathParams": ["Bucket", "Key"], "query": [], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "RenameObjectOutput", "list": false }, "class": "action" }, { "id": "RestoreObject", "method": "post", "path": "/{Bucket}/{Key}", "discriminator": { "restore": "" }, "pathParams": ["Bucket", "Key"], "query": [{ "name": "versionId", "type": "string", "required": false }], "body": [{ "name": "RestoreRequest", "type": "RestoreRequest", "required": false }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "RestoreObjectOutput", "list": false }, "class": "action" }, { "id": "SelectObjectContent", "method": "post", "path": "/{Bucket}/{Key}", "discriminator": { "select": "", "select-type": "2" }, "pathParams": ["Bucket", "Key"], "query": [], "body": [{ "name": "Expression", "type": "string", "required": true }, { "name": "ExpressionType", "type": "string", "required": true }, { "name": "RequestProgress", "type": "RequestProgress", "required": false }, { "name": "InputSerialization", "type": "InputSerialization", "required": true }, { "name": "OutputSerialization", "type": "OutputSerialization", "required": true }, { "name": "ScanRange", "type": "ScanRange", "required": false }], "bodyEncoding": "xml", "successStatus": 200, "class": "action" }, { "id": "UpdateBucketMetadataAnnotationTableConfiguration", "method": "put", "path": "/{Bucket}", "discriminator": { "metadataAnnotationTable": "" }, "pathParams": ["Bucket"], "query": [], "body": [{ "name": "AnnotationTableConfiguration", "type": "AnnotationTableConfigurationUpdates", "required": true }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "Unit", "list": false }, "class": "update" }, { "id": "UpdateBucketMetadataInventoryTableConfiguration", "method": "put", "path": "/{Bucket}", "discriminator": { "metadataInventoryTable": "" }, "pathParams": ["Bucket"], "query": [], "body": [{ "name": "InventoryTableConfiguration", "type": "InventoryTableConfigurationUpdates", "required": true }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "Unit", "list": false }, "class": "update" }, { "id": "UpdateBucketMetadataJournalTableConfiguration", "method": "put", "path": "/{Bucket}", "discriminator": { "metadataJournalTable": "" }, "pathParams": ["Bucket"], "query": [], "body": [{ "name": "JournalTableConfiguration", "type": "JournalTableConfigurationUpdates", "required": true }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "Unit", "list": false }, "class": "update" }, { "id": "UpdateObjectEncryption", "method": "put", "path": "/{Bucket}/{Key}", "discriminator": { "encryption": "" }, "pathParams": ["Bucket", "Key"], "query": [{ "name": "versionId", "type": "string", "required": false }], "body": [{ "name": "ObjectEncryption", "type": "ObjectEncryption", "required": true }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "UpdateObjectEncryptionResponse", "list": false }, "class": "update" }, { "id": "UploadPart", "method": "put", "path": "/{Bucket}/{Key}", "pathParams": ["Bucket", "Key"], "query": [{ "name": "partNumber", "type": "integer", "required": true }, { "name": "uploadId", "type": "string", "required": true }], "body": [{ "name": "Body", "type": "blob", "required": false }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "UploadPartOutput", "list": false }, "class": "action", "discriminator": { "partNumber": null, "uploadId": null } }, { "id": "UploadPartCopy", "method": "put", "path": "/{Bucket}/{Key}", "pathParams": ["Bucket", "Key"], "query": [{ "name": "partNumber", "type": "integer", "required": true }, { "name": "uploadId", "type": "string", "required": true }], "body": [], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "CopyPartResult", "list": false }, "class": "action", "headers": { "x-amz-copy-source": null }, "discriminator": { "partNumber": null, "uploadId": null } }, { "id": "WriteGetObjectResponse", "method": "post", "path": "/WriteGetObjectResponse", "pathParams": [], "query": [], "body": [{ "name": "Body", "type": "blob", "required": false }], "bodyEncoding": "xml", "successStatus": 200, "answers": { "resource": "Unit", "list": false }, "class": "action" }] }
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { DerivedManifest } from '@volter/world-core';
|
|
2
|
+
/** The path parameters whose values hold slashes: an object key is a greedy label, `{Key+}`, which Smithy defines as "a
|
|
3
|
+
* label suffixed with the + qualifier that can be used to match more than one path segment"
|
|
4
|
+
* (https://smithy.io/2.0/spec/http-bindings.html, Greedy labels). */
|
|
5
|
+
export declare const spanning: string[];
|
|
6
|
+
/** The hosts the lane serves: R2's S3 endpoint, "The API is available via the https://<ACCOUNT_ID>.r2.cloudflarestorage.com
|
|
7
|
+
* endpoint" (https://developers.cloudflare.com/r2/api/s3/api/), and its virtual-hosted form under the same suffix. The
|
|
8
|
+
* cloudflare pack's descriptor routes them here, and SHAPE judges the lane's life on them alone. */
|
|
9
|
+
export declare const hosts: {
|
|
10
|
+
suffix: string;
|
|
11
|
+
}[];
|
|
12
|
+
/** A request URL as the lane routes it: a virtual-hosted one in path-style form (endpoint.ts), shared with SHAPE and the
|
|
13
|
+
* example replay so they read a request as the router does. */
|
|
14
|
+
export { pathStyle } from './endpoint.js';
|
|
15
|
+
/** R2's one region. "When using the S3 API, the region for an R2 bucket is auto. For compatibility with tools that do
|
|
16
|
+
* not allow you to specify a region, an empty value and us-east-1 will alias to the auto region. This also applies to
|
|
17
|
+
* the LocationConstraint for the CreateBucket API." (https://developers.cloudflare.com/r2/api/s3/api/) */
|
|
18
|
+
export declare const region: {
|
|
19
|
+
readonly name: "auto";
|
|
20
|
+
readonly aliases: readonly ["", "us-east-1"];
|
|
21
|
+
};
|
|
22
|
+
export declare const manifest: DerivedManifest;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/** The path parameters whose values hold slashes: an object key is a greedy label, `{Key+}`, which Smithy defines as "a
|
|
2
|
+
* label suffixed with the + qualifier that can be used to match more than one path segment"
|
|
3
|
+
* (https://smithy.io/2.0/spec/http-bindings.html, Greedy labels). */
|
|
4
|
+
export const spanning = ['Key'];
|
|
5
|
+
/** The hosts the lane serves: R2's S3 endpoint, "The API is available via the https://<ACCOUNT_ID>.r2.cloudflarestorage.com
|
|
6
|
+
* endpoint" (https://developers.cloudflare.com/r2/api/s3/api/), and its virtual-hosted form under the same suffix. The
|
|
7
|
+
* cloudflare pack's descriptor routes them here, and SHAPE judges the lane's life on them alone. */
|
|
8
|
+
export const hosts = [{ suffix: '.r2.cloudflarestorage.com' }];
|
|
9
|
+
/** A request URL as the lane routes it: a virtual-hosted one in path-style form (endpoint.ts), shared with SHAPE and the
|
|
10
|
+
* example replay so they read a request as the router does. */
|
|
11
|
+
export { pathStyle } from "./endpoint.js";
|
|
12
|
+
/** R2's one region. "When using the S3 API, the region for an R2 bucket is auto. For compatibility with tools that do
|
|
13
|
+
* not allow you to specify a region, an empty value and us-east-1 will alias to the auto region. This also applies to
|
|
14
|
+
* the LocationConstraint for the CreateBucket API." (https://developers.cloudflare.com/r2/api/s3/api/) */
|
|
15
|
+
export const region = { name: 'auto', aliases: ['', 'us-east-1'] };
|
|
16
|
+
export const manifest = {
|
|
17
|
+
vendor: 'cloudflare',
|
|
18
|
+
// one account's buckets are one set, whether made through the S3 API or the control plane
|
|
19
|
+
// (cloudflare-provisioning.ts stores them as `r2_bucket` under `<account_id>:<name>`), so the lane writes the
|
|
20
|
+
// cloudflare pack's namespace
|
|
21
|
+
service: 'cloudflare',
|
|
22
|
+
body: {},
|
|
23
|
+
// R2 mints no id for a bucket or an object: the caller names both, and each is stored under its account and name
|
|
24
|
+
ids: { template: '{prefix}{n}', acceptProvided: true },
|
|
25
|
+
time: 'iso',
|
|
26
|
+
// "For the S3-compatible API, errors are returned as XML in the response body: <Error> <Code>NoSuchKey</Code>
|
|
27
|
+
// <Message>The specified key does not exist.</Message> </Error>" (https://developers.cloudflare.com/r2/api/error-codes/).
|
|
28
|
+
// A string template answers as an XML document.
|
|
29
|
+
error: '<?xml version="1.0" encoding="UTF-8"?><Error><Code>{code}</Code><Message>{message}</Message></Error>',
|
|
30
|
+
defaultKind: 'InvalidRequest',
|
|
31
|
+
// a read-only twin is the twin's mode, not R2's: it answers R2's refusal of the class (error-codes: "10003 AccessDenied
|
|
32
|
+
// 403 Insufficient permissions for the requested operation."), its message stating the rule
|
|
33
|
+
readOnly: { status: 403, code: 'AccessDenied', message: 'Insufficient permissions for the requested operation: this twin is read-only.' },
|
|
34
|
+
// error-codes: "10007 NoSuchKey 404 The specified object key does not exist."; the message is the one the page's XML
|
|
35
|
+
// example carries
|
|
36
|
+
notFound: { status: 404, code: 'NoSuchKey', message: 'The specified key does not exist.' },
|
|
37
|
+
// ListObjectsV2 (AWS's page, for the S3 wire): "By default, the action returns up to 1,000 key names."
|
|
38
|
+
list: { style: 'envelope', envelope: { ListBucketResult: { Contents: '{data}', NextContinuationToken: '{next}' } }, limit: { param: 'max-keys', default: 1000, max: 1000 } },
|
|
39
|
+
deleted: {},
|
|
40
|
+
// An R2 API token's Access Key ID signs requests with SigV4 ("You can generate an API token to serve as the Access Key
|
|
41
|
+
// for usage with existing S3-compatible SDKs", https://developers.cloudflare.com/r2/api/tokens/); a presigned URL
|
|
42
|
+
// carries its signature in the query. R2 documents a missing or invalid credential as "10002 Unauthorized 401 Missing
|
|
43
|
+
// or invalid authentication credentials." (error-codes).
|
|
44
|
+
auth: {
|
|
45
|
+
header: 'authorization',
|
|
46
|
+
scheme: 'AWS4-HMAC-SHA256',
|
|
47
|
+
gateWhenAbsent: false,
|
|
48
|
+
missing: { status: 401, code: 'Unauthorized', message: 'Missing or invalid authentication credentials.' },
|
|
49
|
+
invalidKeys: [],
|
|
50
|
+
invalid: { status: 401, code: 'Unauthorized', message: 'Missing or invalid authentication credentials.' },
|
|
51
|
+
},
|
|
52
|
+
resources: {
|
|
53
|
+
// a bucket, the control plane's `r2_bucket` row
|
|
54
|
+
Bucket: {
|
|
55
|
+
storedAs: 'r2_bucket',
|
|
56
|
+
idPrefix: 'bucket',
|
|
57
|
+
// error-codes: "10006 NoSuchBucket 404 The specified bucket does not exist."
|
|
58
|
+
notFound: { code: 'NoSuchBucket', message: 'The specified bucket does not exist.' },
|
|
59
|
+
// DeleteBucket refuses a bucket that holds objects (error-codes: "10008 BucketNotEmpty 409 Cannot delete bucket
|
|
60
|
+
// that contains objects."): a guard over the bucket's objects, not a state of the bucket, so its handler's.
|
|
61
|
+
},
|
|
62
|
+
// an object, present or absent (no state field), under its bucket
|
|
63
|
+
Object: {
|
|
64
|
+
storedAs: 'r2_object',
|
|
65
|
+
idPrefix: 'object',
|
|
66
|
+
parent: { param: 'Bucket', field: 'bucket', resource: 'Bucket' },
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Semantics, SemanticsContext } from '@volter/world-core';
|
|
2
|
+
import { type LifecycleRule } from '../wire.js';
|
|
3
|
+
type Row = Record<string, unknown>;
|
|
4
|
+
export declare const accountOf: (ctx: SemanticsContext) => string;
|
|
5
|
+
export declare const jurisdictionOf: (ctx: SemanticsContext) => string;
|
|
6
|
+
export declare const bucketId: (ctx: SemanticsContext, name: string) => string;
|
|
7
|
+
/** A bucket as this endpoint reaches it: "When using a jurisdiction endpoint, you will not be able to access R2 resources
|
|
8
|
+
* outside of that jurisdiction" (Data location), and a bucket in a jurisdiction is reached only through its endpoint. */
|
|
9
|
+
export declare const bucketOf: (ctx: SemanticsContext, name: string) => Row | undefined;
|
|
10
|
+
export declare const objectsIn: (ctx: SemanticsContext, name: string) => Row[];
|
|
11
|
+
export declare const noSuchBucket: (ctx: SemanticsContext) => Response;
|
|
12
|
+
export declare const DEFAULT_LIFECYCLE: LifecycleRule[];
|
|
13
|
+
export declare const LOCATION_HINTS: Set<string>;
|
|
14
|
+
/** A bucket as CreateBucket makes it, in the endpoint's jurisdiction ("Once an R2 bucket is created, the jurisdiction cannot
|
|
15
|
+
* be changed", Data location), with its location hint when one was given, and R2's default lifecycle rule. */
|
|
16
|
+
export declare function createBucketRow(ctx: SemanticsContext, name: string, hint?: string): Promise<void>;
|
|
17
|
+
export declare function bucketSemantics(): Record<string, Semantics>;
|
|
18
|
+
export {};
|