ZoneManagementService
class ZoneManagementService (View source)
Service for managing DNS zones. Failures come back as
message is the API wording, the code lets the web forms word it themselves.
Constants
| ERR_NO_OWNER |
|
| ERR_INVALID_NAME |
|
| ERR_EXISTS |
|
| ERR_OVERLAP |
|
| ERR_INVALID_TYPE |
|
| ERR_MASTER_REQUIRED |
|
| ERR_INVALID_MASTER |
|
| ERR_INVALID_SOA_EDIT_API |
|
| ERR_TEMPLATE_NOT_FOUND |
|
| ERR_TEMPLATE_AMBIGUOUS |
|
| ERR_TEMPLATE_FORBIDDEN |
|
| ERR_ZONE_WRITE |
|
| ERR_NOT_FOUND |
|
| ERR_READ_ONLY |
|
Methods
No description
Resolves a template given by name or numeric id and checks the acting user may apply it (own, global, or ueberuser - the same rule the web UI enforces).
Create a new DNS zone
Update a zone
Delete a zone
Set domain permissions
Applies a zone template (or "none" to unlink) to an existing zone, replacing the template-managed records. The caller must be allowed to use the template.
Details
__construct(ZoneRepositoryInterface $zoneRepository, ConfigurationManager $config, object $db, LoggerInterface|null $logger = null, RecordChangeLogger|null $changeLogger = null, PdnsCapabilities|null $capabilities = null, ZoneSigningService|null $signing = null)
No description
array
resolveZoneTemplate(string $zoneTemplate, int|null $actingUserId)
Resolves a template given by name or numeric id and checks the acting user may apply it (own, global, or ueberuser - the same rule the web UI enforces).
array
createZone(string $domain, string $type, int|null $owner, string $slaveMaster = '', string $zoneTemplate = 'none', bool $enableDnssec = false, array $groupIds = [], int|null $actingUserId = null, string|null $soaEditApi = null)
Create a new DNS zone
array
updateZone(int $zoneId, array $updates)
Update a zone
array
deleteZone(int $zoneId)
Delete a zone
array
setDomainPermissions(int $domainId, int $userId)
Set domain permissions
array
applyTemplate(int $zoneId, string $template, int $actingUserId)
Applies a zone template (or "none" to unlink) to an existing zone, replacing the template-managed records. The caller must be allowed to use the template.