restoreFromSnapshot
abstract suspend fun restoreFromSnapshot(input: RestoreFromSnapshotRequest): RestoreFromSnapshotResponse
Restores a directory using an existing directory snapshot.
When you restore a directory from a snapshot, any changes made to the directory after the snapshot date are overwritten.
This action returns as soon as the restore operation is initiated. You can monitor the progress of the restore operation by calling the DescribeDirectories operation with the directory identifier. When the DirectoryDescription.Stage value changes to Active
, the restore operation is complete.
Samples
fun main() {
//sampleStart
// The following example restores a directory using an existing directory snapshot.
val resp = directoryClient.restoreFromSnapshot {
snapshotId = "s-9267f6da4e"
}
//sampleEnd
}