<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKSyncEngine-5sie5/RecordZoneChangeBatch/init(recordsToSave:recordIDsToDelete:atomicByZone:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:8CloudKit12CKSyncEngineC21RecordZoneChangeBatchV13recordsToSave09recordIDsJ6Delete08atomicByF0AESaySo8CKRecordCG_SaySo0Q2IDCGSbtcfc"
  },
  "title" : "init(recordsToSave:recordIDsToDelete:atomicByZone:)"
}
-->

# init(recordsToSave:recordIDsToDelete:atomicByZone:)

Creates a batch of records to modify.

```
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> 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 ``doc://com.apple.cloudkit/documentation/CloudKit/CKError/Code/limitExceeded``.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)