---
title: CKModifyRecordZonesOperation
framework: cloudkit
role: symbol
role_heading: Class
path: cloudkit/ckmodifyrecordzonesoperation
---

# CKModifyRecordZonesOperation

An operation that modifies one or more record zones.

## Declaration

```swift
class CKModifyRecordZonesOperation
```

## Mentioned in

Encrypting User Data Responding to Requests to Delete Data

## Overview

Overview After you create one or more record zones, use this operation to save those zones to the database. You can also use the operation to delete record zones and their records. If you assign a handler to the completionBlock property of the operation, CloudKit calls the handler after the operation executes and returns its results. Use the handler to perform housekeeping tasks for the operation, but don’t use it to process the results of the operation. The handler you provide should manage any failures of the operation, whether due to an error or an explicit cancellation.

## Topics

### Creating a Modify Zones Operation

- [init(recordZonesToSave:recordZoneIDsToDelete:)](cloudkit/ckmodifyrecordzonesoperation/init(recordzonestosave:recordzoneidstodelete:).md)
- [init()](cloudkit/ckmodifyrecordzonesoperation/init().md)

### Configuring the Modify Zones Operation

- [recordZonesToSave](cloudkit/ckmodifyrecordzonesoperation/recordzonestosave.md)
- [recordZoneIDsToDelete](cloudkit/ckmodifyrecordzonesoperation/recordzoneidstodelete.md)

### Processing the Modify Zones Results

- [modifyRecordZonesCompletionBlock](cloudkit/ckmodifyrecordzonesoperation/modifyrecordzonescompletionblock.md)

### Instance Properties

- [modifyRecordZonesResultBlock](cloudkit/ckmodifyrecordzonesoperation/modifyrecordzonesresultblock.md)
- [perRecordZoneDeleteBlock](cloudkit/ckmodifyrecordzonesoperation/perrecordzonedeleteblock-6c82y.md)
- [perRecordZoneSaveBlock](cloudkit/ckmodifyrecordzonesoperation/perrecordzonesaveblock-1m45y.md)

## Relationships

### Inherits From

- [CKDatabaseOperation](cloudkit/ckdatabaseoperation.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Transactions

- [CKModifyRecordsOperation](cloudkit/ckmodifyrecordsoperation.md)
