Skip to content

CreateSnapshot

Source: src/AWS/DirectoryService/CreateSnapshot.ts

Runtime binding for the CreateSnapshot operation (IAM action ds:CreateSnapshot), scoped to one Directory.

Takes a manual snapshot of the bound Simple AD or Managed Microsoft AD directory — e.g. before a scheduled change — returning the new SnapshotId. Manual snapshots are limited per directory (see GetSnapshotLimits). The directory id is injected from the binding. Provide the implementation with Effect.provide(AWS.DirectoryService.CreateSnapshotHttp).

// init — bind the operation to the directory
const createSnapshot = yield* AWS.DirectoryService.CreateSnapshot(directory);
// runtime
const { SnapshotId } = yield* createSnapshot({ Name: "pre-migration" });