---
title: CKFetchRecordZonesOperation
framework: cloudkit
role: symbol
role_heading: Class
path: cloudkit/ckfetchrecordzonesoperation
---

# CKFetchRecordZonesOperation

An operation for retrieving record zones from a database.

## Declaration

```swift
class CKFetchRecordZonesOperation
```

## Mentioned in

Encrypting User Data

## Overview

Overview Use this operation object to fetch record zones so that you can ascertain their capabilities. If you assign a handler to the completionBlock property of the operation, CloudKit calls it after the operation executes and returns its results. You can use the handler to perform any housekeeping tasks that relate to the operation, but don’t use it to process the results of the operation. The handler you specify should manage any failures, whether due to an error or an explicit cancellation.

## Topics

### Initializing the Zone Fetch Operation

- [init(recordZoneIDs:)](cloudkit/ckfetchrecordzonesoperation/init(recordzoneids:).md)
- [init()](cloudkit/ckfetchrecordzonesoperation/init().md)

### Getting All Record Zones

- [fetchAllRecordZonesOperation()](cloudkit/ckfetchrecordzonesoperation/fetchallrecordzonesoperation().md)

### Configuring a Zone Fetch Operation

- [recordZoneIDs](cloudkit/ckfetchrecordzonesoperation/recordzoneids.md)

### Processing Zone Fetch Results

- [fetchRecordZonesCompletionBlock](cloudkit/ckfetchrecordzonesoperation/fetchrecordzonescompletionblock.md)

### Instance Properties

- [fetchRecordZonesResultBlock](cloudkit/ckfetchrecordzonesoperation/fetchrecordzonesresultblock.md)
- [perRecordZoneResultBlock](cloudkit/ckfetchrecordzonesoperation/perrecordzoneresultblock.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

### Fetch Requests

- [CKFetchRecordsOperation](cloudkit/ckfetchrecordsoperation.md)
