1. Packages
  2. Vercel
  3. API Docs
  4. getProjectFunctionCpu
Vercel v1.11.0 published on Thursday, May 23, 2024 by Pulumiverse

vercel.getProjectFunctionCpu

Explore with Pulumi AI

vercel logo
Vercel v1.11.0 published on Thursday, May 23, 2024 by Pulumiverse

    Provides information about a Project’s Function CPU setting.

    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.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vercel from "@pulumi/vercel";
    
    const exampleProject = vercel.getProject({
        name: "example",
    });
    const exampleProjectFunctionCpu = exampleProject.then(exampleProject => vercel.getProjectFunctionCpu({
        projectId: exampleProject.id,
    }));
    
    import pulumi
    import pulumi_vercel as vercel
    
    example_project = vercel.get_project(name="example")
    example_project_function_cpu = vercel.get_project_function_cpu(project_id=example_project.id)
    
    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.LookupProject(ctx, &vercel.LookupProjectArgs{
    			Name: "example",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = vercel.LookupProjectFunctionCpu(ctx, &vercel.LookupProjectFunctionCpuArgs{
    			ProjectId: exampleProject.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vercel = Pulumi.Vercel;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleProject = Vercel.GetProject.Invoke(new()
        {
            Name = "example",
        });
    
        var exampleProjectFunctionCpu = Vercel.GetProjectFunctionCpu.Invoke(new()
        {
            ProjectId = exampleProject.Apply(getProjectResult => getProjectResult.Id),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vercel.VercelFunctions;
    import com.pulumi.vercel.inputs.GetProjectArgs;
    import com.pulumi.vercel.inputs.GetProjectFunctionCpuArgs;
    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) {
            final var exampleProject = VercelFunctions.getProject(GetProjectArgs.builder()
                .name("example")
                .build());
    
            final var exampleProjectFunctionCpu = VercelFunctions.getProjectFunctionCpu(GetProjectFunctionCpuArgs.builder()
                .projectId(exampleProject.applyValue(getProjectResult -> getProjectResult.id()))
                .build());
    
        }
    }
    
    variables:
      exampleProject:
        fn::invoke:
          Function: vercel:getProject
          Arguments:
            name: example
      exampleProjectFunctionCpu:
        fn::invoke:
          Function: vercel:getProjectFunctionCpu
          Arguments:
            projectId: ${exampleProject.id}
    

    Using getProjectFunctionCpu

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getProjectFunctionCpu(args: GetProjectFunctionCpuArgs, opts?: InvokeOptions): Promise<GetProjectFunctionCpuResult>
    function getProjectFunctionCpuOutput(args: GetProjectFunctionCpuOutputArgs, opts?: InvokeOptions): Output<GetProjectFunctionCpuResult>
    def get_project_function_cpu(project_id: Optional[str] = None,
                                 team_id: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetProjectFunctionCpuResult
    def get_project_function_cpu_output(project_id: Optional[pulumi.Input[str]] = None,
                                 team_id: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetProjectFunctionCpuResult]
    func LookupProjectFunctionCpu(ctx *Context, args *LookupProjectFunctionCpuArgs, opts ...InvokeOption) (*LookupProjectFunctionCpuResult, error)
    func LookupProjectFunctionCpuOutput(ctx *Context, args *LookupProjectFunctionCpuOutputArgs, opts ...InvokeOption) LookupProjectFunctionCpuResultOutput

    > Note: This function is named LookupProjectFunctionCpu in the Go SDK.

    public static class GetProjectFunctionCpu 
    {
        public static Task<GetProjectFunctionCpuResult> InvokeAsync(GetProjectFunctionCpuArgs args, InvokeOptions? opts = null)
        public static Output<GetProjectFunctionCpuResult> Invoke(GetProjectFunctionCpuInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetProjectFunctionCpuResult> getProjectFunctionCpu(GetProjectFunctionCpuArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: vercel:index/getProjectFunctionCpu:getProjectFunctionCpu
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ProjectId string
    The ID of the Project to read the Function CPU setting 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.
    ProjectId string
    The ID of the Project to read the Function CPU setting 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.
    projectId String
    The ID of the Project to read the Function CPU setting 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.
    projectId string
    The ID of the Project to read the Function CPU setting 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.
    project_id str
    The ID of the Project to read the Function CPU setting 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.
    projectId String
    The ID of the Project to read the Function CPU setting 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.

    getProjectFunctionCpu Result

    The following output properties are available:

    Cpu string
    The amount of CPU available to your Serverless Functions. Should be one of 'basic' (0.6vCPU), 'standard' (1vCPU) or 'performance' (1.7vCPUs).
    Id string
    The ID of the resource.
    ProjectId string
    The ID of the Project to read the Function CPU setting 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).
    Id string
    The ID of the resource.
    ProjectId string
    The ID of the Project to read the Function CPU setting 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).
    id String
    The ID of the resource.
    projectId String
    The ID of the Project to read the Function CPU setting 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).
    id string
    The ID of the resource.
    projectId string
    The ID of the Project to read the Function CPU setting 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).
    id str
    The ID of the resource.
    project_id str
    The ID of the Project to read the Function CPU setting 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).
    id String
    The ID of the resource.
    projectId String
    The ID of the Project to read the Function CPU setting 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.

    Package Details

    Repository
    vercel pulumiverse/pulumi-vercel
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vercel Terraform Provider.
    vercel logo
    Vercel v1.11.0 published on Thursday, May 23, 2024 by Pulumiverse