Skip to main content

domains

Creates, updates, deletes, gets or lists a domains resource.

Overview

Namedomains
TypeResource
Iddeno.deployment.domains

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
attach_domain_to_deploymentreplacedeploymentId, domainThis API allows you to attach a domain to an existing deployment. Once
attached, the deployment will become accessible via that domain.

If the specified domain is already attached to another deployment, it will
be detached from the current deployment and attached to the new one.
detach_domain_from_deploymentdeletedeploymentId, domainThis API disassociates a domain from a deployment. Once this operation is
completed, the deployment will no longer be accessible via that domain.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deploymentIdstringDeployment ID
domainstringDomain to detach

REPLACE examples

This API allows you to attach a domain to an existing deployment. Once
attached, the deployment will become accessible via that domain.

If the specified domain is already attached to another deployment, it will
be detached from the current deployment and attached to the new one.

REPLACE deno.deployment.domains
SET
-- No updatable properties
WHERE
deploymentId = '{{ deploymentId }}' --required
AND domain = '{{ domain }}' --required
RETURNING
domain;

DELETE examples

This API disassociates a domain from a deployment. Once this operation is
completed, the deployment will no longer be accessible via that domain.

DELETE FROM deno.deployment.domains
WHERE deploymentId = '{{ deploymentId }}' --required
AND domain = '{{ domain }}' --required
;