Create a pending diff record and return its DiffId.
DiffId
kind
"storage_class"
payload
The backend returns AppError { kind: "Validation" } for unsupported kinds.
AppError { kind: "Validation" }
const diffId = await diffPreviewCreate("storage_class", { targets: [{ bucket: "my-bucket", key: "photos/img.jpg" }], current: { "photos/img.jpg": "STANDARD" }, new_class: "GLACIER",}); Copy
const diffId = await diffPreviewCreate("storage_class", { targets: [{ bucket: "my-bucket", key: "photos/img.jpg" }], current: { "photos/img.jpg": "STANDARD" }, new_class: "GLACIER",});
The diff kind string. Currently only "storage_class".
The diff payload object for the given kind.
Create a pending diff record and return its
DiffId.Parameters
kind— Must be"storage_class"in v1.payload— JSON payload matching the schema for the given kind.The backend returns
AppError { kind: "Validation" }for unsupported kinds.Usage