(environment)
- postV1ProjectsIdOrNameCustomEnvironments - Create a custom environment for the current project.
- getV9ProjectsIdOrNameCustomEnvironments - Retrieve custom environments
- getV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId - Retrieve a custom environment
- patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId - Update a custom environment
- deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId - Remove a custom environment
Creates a custom environment for the current project. Cannot be named 'Production' or 'Preview'.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.environment.postV1ProjectsIdOrNameCustomEnvironments({
idOrName: "<value>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { environmentPostV1ProjectsIdOrNameCustomEnvironments } from "@vercel/sdk/funcs/environmentPostV1ProjectsIdOrNameCustomEnvironments.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await environmentPostV1ProjectsIdOrNameCustomEnvironments(vercel, {
idOrName: "<value>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
models.PostV1ProjectsIdOrNameCustomEnvironmentsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.PostV1ProjectsIdOrNameCustomEnvironmentsResponseBody>
Error Type | Status Code | Content Type |
---|---|---|
models.VercelBadRequestError | 400 | application/json |
models.VercelForbiddenError | 401 | application/json |
models.SDKError | 4XX, 5XX | */* |
Retrieve custom environments for the project. Must not be named 'Production' or 'Preview'.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.environment.getV9ProjectsIdOrNameCustomEnvironments({
idOrName: "<value>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { environmentGetV9ProjectsIdOrNameCustomEnvironments } from "@vercel/sdk/funcs/environmentGetV9ProjectsIdOrNameCustomEnvironments.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await environmentGetV9ProjectsIdOrNameCustomEnvironments(vercel, {
idOrName: "<value>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
models.GetV9ProjectsIdOrNameCustomEnvironmentsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.GetV9ProjectsIdOrNameCustomEnvironmentsResponseBody>
Error Type | Status Code | Content Type |
---|---|---|
models.VercelBadRequestError | 400 | application/json |
models.VercelForbiddenError | 401 | application/json |
models.SDKError | 4XX, 5XX | */* |
Retrieve a custom environment for the project. Must not be named 'Production' or 'Preview'.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.environment.getV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId({
idOrName: "<value>",
environmentSlugOrId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { environmentGetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId } from "@vercel/sdk/funcs/environmentGetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await environmentGetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId(vercel, {
idOrName: "<value>",
environmentSlugOrId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
models.GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.GetV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody>
Error Type | Status Code | Content Type |
---|---|---|
models.VercelBadRequestError | 400 | application/json |
models.VercelForbiddenError | 401 | application/json |
models.VercelNotFoundError | 404 | application/json |
models.SDKError | 4XX, 5XX | */* |
Update a custom environment for the project. Must not be named 'Production' or 'Preview'.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.environment.patchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId({
idOrName: "<value>",
environmentSlugOrId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { environmentPatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId } from "@vercel/sdk/funcs/environmentPatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await environmentPatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId(vercel, {
idOrName: "<value>",
environmentSlugOrId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
models.PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.PatchV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody>
Error Type | Status Code | Content Type |
---|---|---|
models.VercelBadRequestError | 400 | application/json |
models.VercelForbiddenError | 401 | application/json |
models.SDKError | 4XX, 5XX | */* |
Remove a custom environment for the project. Must not be named 'Production' or 'Preview'.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.environment.deleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId({
idOrName: "<value>",
environmentSlugOrId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { environmentDeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId } from "@vercel/sdk/funcs/environmentDeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await environmentDeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrId(vercel, {
idOrName: "<value>",
environmentSlugOrId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
models.DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.DeleteV9ProjectsIdOrNameCustomEnvironmentsEnvironmentSlugOrIdResponseBody>
Error Type | Status Code | Content Type |
---|---|---|
models.VercelBadRequestError | 400 | application/json |
models.VercelForbiddenError | 401 | application/json |
models.SDKError | 4XX, 5XX | */* |