ZoneManagementService
class ZoneManagementService (View source)
Creates zones for the API with the same checks the web form applies. 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 |
|
| ERR_ZONE_LIMIT |
|
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
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, ConfigurationInterface $config, RepositoryFactoryInterface $repositoryFactory, PermissionService $permissions, RecordChangeWriterInterface $changeLogger, DomainManagerInterface|Closure $domainManager, ZoneTemplateService $zoneTemplates, LoggerInterface|null $logger = null, PdnsCapabilities|Closure|null $capabilities = null, ZoneSigningService|null $signing = null, DomainRepositoryInterface|null $domainRepository = null, ZoneCacheFlusherInterface|null $zoneCacheFlusher = null, ZoneOwnershipLimit|null $ownershipLimit = null, ZoneChangeRequestRepositoryInterface|null $changeRequests = 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
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.