deployments
Creates, updates, deletes, gets or lists a deployments
resource.
Overview
Name | deployments |
Type | Resource |
Id | vercel.aliases.deployments |
Fields
The following fields are returned by SELECT
queries:
- list_deployment_aliases
The list of aliases assigned to the deployment
Name | Datatype | Description |
---|---|---|
alias | string | The alias name, it could be a .vercel.app subdomain or a custom domain (example: my-alias.vercel.app) |
created | string (date-time) | The date when the alias was created (example: 2017-04-26T23:00:34.232Z) |
protectionBypass | object | The protection bypass for the alias |
redirect | string | Target destination domain for redirect when the alias is a redirect |
uid | string | The unique identifier of the alias (example: 2WjyKQmM8ZnGcJsPWMrHRHrE) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list_deployment_aliases | select | id , teamId | Retrieves all Aliases for the Deployment with the given ID. The authenticated user or team must own the deployment. | |
_list_deployment_aliases | exec | id , teamId | Retrieves all Aliases for the Deployment with the given ID. The authenticated user or team must own the deployment. | |
assign_alias | exec | id , teamId | Creates a new alias for the deployment with the given deployment ID. The authenticated user or team must own this deployment. If the desired alias is already assigned to another deployment, then it will be removed from the old deployment and assigned to the new one. |
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.
Name | Datatype | Description |
---|---|---|
id |
| The ID of the deployment the aliases should be listed for |
teamId | string | The Team identifier or slug to perform the request on behalf of. |
SELECT
examples
- list_deployment_aliases
Retrieves all Aliases for the Deployment with the given ID. The authenticated user or team must own the deployment.
SELECT
alias,
created,
protectionBypass,
redirect,
uid
FROM vercel.aliases.deployments
WHERE id = '{{ id }}' -- required
AND teamId = '{{ teamId }}' -- required
;
Lifecycle Methods
- _list_deployment_aliases
- assign_alias
Retrieves all Aliases for the Deployment with the given ID. The authenticated user or team must own the deployment.
EXEC vercel.aliases.deployments._list_deployment_aliases
@id='{{ id }}' --required,
@teamId='{{ teamId }}' --required
;
Creates a new alias for the deployment with the given deployment ID. The authenticated user or team must own this deployment. If the desired alias is already assigned to another deployment, then it will be removed from the old deployment and assigned to the new one.
EXEC vercel.aliases.deployments.assign_alias
@id='{{ id }}' --required,
@teamId='{{ teamId }}' --required
@@json=
'{
"alias": "{{ alias }}",
"redirect": "{{ redirect }}"
}'
;