---
title: "init(recordsToSave:recordIDsToDelete:atomicByZone:)"
framework: cloudkit
role: symbol
role_heading: Initializer
path: "cloudkit/cksyncengine-5sie5/recordzonechangebatch/init(recordstosave:recordidstodelete:atomicbyzone:)"
---

# init(recordsToSave:recordIDsToDelete:atomicByZone:)

Creates a batch of records to modify.

## Declaration

```swift
init(recordsToSave: [CKRecord] = [], recordIDsToDelete: [CKRecord.ID] = [], atomicByZone: Bool = false)
```

## Parameters

- `recordsToSave`: The records to save.
- `recordIDsToDelete`: The identifiers of the records to delete.
- `atomicByZone`: A Boolean value that determines whether CloudKit modifies the specified records atomically by record zone.

## Discussion

Discussion important: When using this initializer to create batches, consider the number of records you specify and their combined size. If you specify too many records, or their combined size is too large, the send operation may fail with an error of type CKError.Code.limitExceeded.

## See Also

### Creating a batch

- [init(pendingChanges:recordProvider:)](cloudkit/cksyncengine-5sie5/recordzonechangebatch/init(pendingchanges:recordprovider:).md)
- [CKSyncEngine.PendingRecordZoneChange](cloudkit/cksyncengine-5sie5/pendingrecordzonechange.md)
