1. Packages
  2. Vercel
  3. API Docs
  4. ProjectFunctionCpu
Vercel v1.14.3 published on Monday, Oct 7, 2024 by Pulumiverse

vercel.ProjectFunctionCpu

Explore with Pulumi AI

This resource has been deprecated and no longer works. Please use the vercel.Project resource and its resource_config attribute instead.

Provides a Function CPU resource for a Project.

This controls the maximum amount of CPU utilization your Serverless Functions can use while executing. Standard is optimal for most frontend workloads. You can override this per function using the vercel.json file.

A new Deployment is required for your changes to take effect.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as vercel from "@pulumiverse/vercel";

const exampleProject = new vercel.Project("exampleProject", {});
const exampleProjectFunctionCpu = new vercel.ProjectFunctionCpu("exampleProjectFunctionCpu", {
    projectId: exampleProject.id,
    cpu: "performance",
});
Copy
import pulumi
import pulumiverse_vercel as vercel

example_project = vercel.Project("exampleProject")
example_project_function_cpu = vercel.ProjectFunctionCpu("exampleProjectFunctionCpu",
    project_id=example_project.id,
    cpu="performance")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-vercel/sdk/go/vercel"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleProject, err := vercel.NewProject(ctx, "exampleProject", nil)
		if err != nil {
			return err
		}
		_, err = vercel.NewProjectFunctionCpu(ctx, "exampleProjectFunctionCpu", &vercel.ProjectFunctionCpuArgs{
			ProjectId: exampleProject.ID(),
			Cpu:       pulumi.String("performance"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vercel = Pulumiverse.Vercel;

return await Deployment.RunAsync(() => 
{
    var exampleProject = new Vercel.Project("exampleProject");

    var exampleProjectFunctionCpu = new Vercel.ProjectFunctionCpu("exampleProjectFunctionCpu", new()
    {
        ProjectId = exampleProject.Id,
        Cpu = "performance",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vercel.Project;
import com.pulumi.vercel.ProjectFunctionCpu;
import com.pulumi.vercel.ProjectFunctionCpuArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var exampleProject = new Project("exampleProject");

        var exampleProjectFunctionCpu = new ProjectFunctionCpu("exampleProjectFunctionCpu", ProjectFunctionCpuArgs.builder()
            .projectId(exampleProject.id())
            .cpu("performance")
            .build());

    }
}
Copy
resources:
  exampleProject:
    type: vercel:Project
  exampleProjectFunctionCpu:
    type: vercel:ProjectFunctionCpu
    properties:
      projectId: ${exampleProject.id}
      cpu: performance
Copy

Create ProjectFunctionCpu Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ProjectFunctionCpu(name: string, args: ProjectFunctionCpuArgs, opts?: CustomResourceOptions);
@overload
def ProjectFunctionCpu(resource_name: str,
                       args: ProjectFunctionCpuArgs,
                       opts: Optional[ResourceOptions] = None)

@overload
def ProjectFunctionCpu(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       cpu: Optional[str] = None,
                       project_id: Optional[str] = None,
                       team_id: Optional[str] = None)
func NewProjectFunctionCpu(ctx *Context, name string, args ProjectFunctionCpuArgs, opts ...ResourceOption) (*ProjectFunctionCpu, error)
public ProjectFunctionCpu(string name, ProjectFunctionCpuArgs args, CustomResourceOptions? opts = null)
public ProjectFunctionCpu(String name, ProjectFunctionCpuArgs args)
public ProjectFunctionCpu(String name, ProjectFunctionCpuArgs args, CustomResourceOptions options)
type: vercel:ProjectFunctionCpu
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ProjectFunctionCpuArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ProjectFunctionCpuArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ProjectFunctionCpuArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ProjectFunctionCpuArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ProjectFunctionCpuArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var projectFunctionCpuResource = new Vercel.ProjectFunctionCpu("projectFunctionCpuResource", new()
{
    Cpu = "string",
    ProjectId = "string",
    TeamId = "string",
});
Copy
example, err := vercel.NewProjectFunctionCpu(ctx, "projectFunctionCpuResource", &vercel.ProjectFunctionCpuArgs{
	Cpu:       pulumi.String("string"),
	ProjectId: pulumi.String("string"),
	TeamId:    pulumi.String("string"),
})
Copy
var projectFunctionCpuResource = new ProjectFunctionCpu("projectFunctionCpuResource", ProjectFunctionCpuArgs.builder()
    .cpu("string")
    .projectId("string")
    .teamId("string")
    .build());
Copy
project_function_cpu_resource = vercel.ProjectFunctionCpu("projectFunctionCpuResource",
    cpu="string",
    project_id="string",
    team_id="string")
Copy
const projectFunctionCpuResource = new vercel.ProjectFunctionCpu("projectFunctionCpuResource", {
    cpu: "string",
    projectId: "string",
    teamId: "string",
});
Copy
type: vercel:ProjectFunctionCpu
properties:
    cpu: string
    projectId: string
    teamId: string
Copy

ProjectFunctionCpu Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ProjectFunctionCpu resource accepts the following input properties:

Cpu This property is required. string
The amount of CPU available to your Serverless Functions. Should be one of 'basic' (0.6vCPU), 'standard' (1vCPU) or 'performance' (1.7vCPUs).
ProjectId This property is required. string
The ID of the Project to adjust the CPU for.
TeamId string
The ID of the team the Project exists under. Required when configuring a team resource if a default team has not been set in the provider.
Cpu This property is required. string
The amount of CPU available to your Serverless Functions. Should be one of 'basic' (0.6vCPU), 'standard' (1vCPU) or 'performance' (1.7vCPUs).
ProjectId This property is required. string
The ID of the Project to adjust the CPU for.
TeamId string
The ID of the team the Project exists under. Required when configuring a team resource if a default team has not been set in the provider.
cpu This property is required. String
The amount of CPU available to your Serverless Functions. Should be one of 'basic' (0.6vCPU), 'standard' (1vCPU) or 'performance' (1.7vCPUs).
projectId This property is required. String
The ID of the Project to adjust the CPU for.
teamId String
The ID of the team the Project exists under. Required when configuring a team resource if a default team has not been set in the provider.
cpu This property is required. string
The amount of CPU available to your Serverless Functions. Should be one of 'basic' (0.6vCPU), 'standard' (1vCPU) or 'performance' (1.7vCPUs).
projectId This property is required. string
The ID of the Project to adjust the CPU for.
teamId string
The ID of the team the Project exists under. Required when configuring a team resource if a default team has not been set in the provider.
cpu This property is required. str
The amount of CPU available to your Serverless Functions. Should be one of 'basic' (0.6vCPU), 'standard' (1vCPU) or 'performance' (1.7vCPUs).
project_id This property is required. str
The ID of the Project to adjust the CPU for.
team_id str
The ID of the team the Project exists under. Required when configuring a team resource if a default team has not been set in the provider.
cpu This property is required. String
The amount of CPU available to your Serverless Functions. Should be one of 'basic' (0.6vCPU), 'standard' (1vCPU) or 'performance' (1.7vCPUs).
projectId This property is required. String
The ID of the Project to adjust the CPU for.
teamId String
The ID of the team the Project exists under. Required when configuring a team resource if a default team has not been set in the provider.

Outputs

All input properties are implicitly available as output properties. Additionally, the ProjectFunctionCpu resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ProjectFunctionCpu Resource

Get an existing ProjectFunctionCpu resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ProjectFunctionCpuState, opts?: CustomResourceOptions): ProjectFunctionCpu
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cpu: Optional[str] = None,
        project_id: Optional[str] = None,
        team_id: Optional[str] = None) -> ProjectFunctionCpu
func GetProjectFunctionCpu(ctx *Context, name string, id IDInput, state *ProjectFunctionCpuState, opts ...ResourceOption) (*ProjectFunctionCpu, error)
public static ProjectFunctionCpu Get(string name, Input<string> id, ProjectFunctionCpuState? state, CustomResourceOptions? opts = null)
public static ProjectFunctionCpu get(String name, Output<String> id, ProjectFunctionCpuState state, CustomResourceOptions options)
resources:  _:    type: vercel:ProjectFunctionCpu    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Cpu string
The amount of CPU available to your Serverless Functions. Should be one of 'basic' (0.6vCPU), 'standard' (1vCPU) or 'performance' (1.7vCPUs).
ProjectId string
The ID of the Project to adjust the CPU for.
TeamId string
The ID of the team the Project exists under. Required when configuring a team resource if a default team has not been set in the provider.
Cpu string
The amount of CPU available to your Serverless Functions. Should be one of 'basic' (0.6vCPU), 'standard' (1vCPU) or 'performance' (1.7vCPUs).
ProjectId string
The ID of the Project to adjust the CPU for.
TeamId string
The ID of the team the Project exists under. Required when configuring a team resource if a default team has not been set in the provider.
cpu String
The amount of CPU available to your Serverless Functions. Should be one of 'basic' (0.6vCPU), 'standard' (1vCPU) or 'performance' (1.7vCPUs).
projectId String
The ID of the Project to adjust the CPU for.
teamId String
The ID of the team the Project exists under. Required when configuring a team resource if a default team has not been set in the provider.
cpu string
The amount of CPU available to your Serverless Functions. Should be one of 'basic' (0.6vCPU), 'standard' (1vCPU) or 'performance' (1.7vCPUs).
projectId string
The ID of the Project to adjust the CPU for.
teamId string
The ID of the team the Project exists under. Required when configuring a team resource if a default team has not been set in the provider.
cpu str
The amount of CPU available to your Serverless Functions. Should be one of 'basic' (0.6vCPU), 'standard' (1vCPU) or 'performance' (1.7vCPUs).
project_id str
The ID of the Project to adjust the CPU for.
team_id str
The ID of the team the Project exists under. Required when configuring a team resource if a default team has not been set in the provider.
cpu String
The amount of CPU available to your Serverless Functions. Should be one of 'basic' (0.6vCPU), 'standard' (1vCPU) or 'performance' (1.7vCPUs).
projectId String
The ID of the Project to adjust the CPU for.
teamId String
The ID of the team the Project exists under. Required when configuring a team resource if a default team has not been set in the provider.

Import

You can import via the team_id and project_id.

  • team_id can be found in the team settings tab in the Vercel UI.

  • project_id can be found in the project settings tab in the Vercel UI.

$ pulumi import vercel:index/projectFunctionCpu:ProjectFunctionCpu example team_xxxxxxxxxxxxxxxxxxxxxxxx/prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
vercel pulumiverse/pulumi-vercel
License
Apache-2.0
Notes
This Pulumi package is based on the vercel Terraform Provider.