1. Packages
  2. Vercel Provider
  3. API Docs
  4. ProjectCrons
Vercel v3.15.1 published on Monday, Sep 8, 2025 by Pulumiverse

vercel.ProjectCrons

Explore with Pulumi AI

vercel logo
Vercel v3.15.1 published on Monday, Sep 8, 2025 by Pulumiverse

    Provides a Project Crons resource.

    The resource toggles whether crons are enabled for a Vercel project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vercel from "@pulumiverse/vercel";
    
    const example = new vercel.Project("example", {
        name: "example-project",
        framework: "nextjs",
        gitRepository: {
            type: "github",
            repo: "vercel/some-repo",
        },
    });
    const exampleProjectCrons = new vercel.ProjectCrons("example", {
        projectId: example.id,
        enabled: true,
    });
    
    import pulumi
    import pulumiverse_vercel as vercel
    
    example = vercel.Project("example",
        name="example-project",
        framework="nextjs",
        git_repository={
            "type": "github",
            "repo": "vercel/some-repo",
        })
    example_project_crons = vercel.ProjectCrons("example",
        project_id=example.id,
        enabled=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-vercel/sdk/v3/go/vercel"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := vercel.NewProject(ctx, "example", &vercel.ProjectArgs{
    			Name:      pulumi.String("example-project"),
    			Framework: pulumi.String("nextjs"),
    			GitRepository: &vercel.ProjectGitRepositoryArgs{
    				Type: pulumi.String("github"),
    				Repo: pulumi.String("vercel/some-repo"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vercel.NewProjectCrons(ctx, "example", &vercel.ProjectCronsArgs{
    			ProjectId: example.ID(),
    			Enabled:   pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vercel = Pulumiverse.Vercel;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Vercel.Project("example", new()
        {
            Name = "example-project",
            Framework = "nextjs",
            GitRepository = new Vercel.Inputs.ProjectGitRepositoryArgs
            {
                Type = "github",
                Repo = "vercel/some-repo",
            },
        });
    
        var exampleProjectCrons = new Vercel.ProjectCrons("example", new()
        {
            ProjectId = example.Id,
            Enabled = true,
        });
    
    });
    
    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.ProjectArgs;
    import com.pulumi.vercel.inputs.ProjectGitRepositoryArgs;
    import com.pulumi.vercel.ProjectCrons;
    import com.pulumi.vercel.ProjectCronsArgs;
    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 example = new Project("example", ProjectArgs.builder()
                .name("example-project")
                .framework("nextjs")
                .gitRepository(ProjectGitRepositoryArgs.builder()
                    .type("github")
                    .repo("vercel/some-repo")
                    .build())
                .build());
    
            var exampleProjectCrons = new ProjectCrons("exampleProjectCrons", ProjectCronsArgs.builder()
                .projectId(example.id())
                .enabled(true)
                .build());
    
        }
    }
    
    resources:
      example:
        type: vercel:Project
        properties:
          name: example-project
          framework: nextjs
          gitRepository:
            type: github
            repo: vercel/some-repo
      exampleProjectCrons:
        type: vercel:ProjectCrons
        name: example
        properties:
          projectId: ${example.id}
          enabled: true
    

    Create ProjectCrons Resource

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

    Constructor syntax

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

    Parameters

    name string
    The unique name of the resource.
    args ProjectCronsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ProjectCronsArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ProjectCronsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectCronsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectCronsArgs
    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 projectCronsResource = new Vercel.ProjectCrons("projectCronsResource", new()
    {
        Enabled = false,
        ProjectId = "string",
        TeamId = "string",
    });
    
    example, err := vercel.NewProjectCrons(ctx, "projectCronsResource", &vercel.ProjectCronsArgs{
    	Enabled:   pulumi.Bool(false),
    	ProjectId: pulumi.String("string"),
    	TeamId:    pulumi.String("string"),
    })
    
    var projectCronsResource = new ProjectCrons("projectCronsResource", ProjectCronsArgs.builder()
        .enabled(false)
        .projectId("string")
        .teamId("string")
        .build());
    
    project_crons_resource = vercel.ProjectCrons("projectCronsResource",
        enabled=False,
        project_id="string",
        team_id="string")
    
    const projectCronsResource = new vercel.ProjectCrons("projectCronsResource", {
        enabled: false,
        projectId: "string",
        teamId: "string",
    });
    
    type: vercel:ProjectCrons
    properties:
        enabled: false
        projectId: string
        teamId: string
    

    ProjectCrons 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 ProjectCrons resource accepts the following input properties:

    Enabled bool
    Whether crons are enabled for the project.
    ProjectId string
    The ID of the Project to toggle crons 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.
    Enabled bool
    Whether crons are enabled for the project.
    ProjectId string
    The ID of the Project to toggle crons 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.
    enabled Boolean
    Whether crons are enabled for the project.
    projectId String
    The ID of the Project to toggle crons 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.
    enabled boolean
    Whether crons are enabled for the project.
    projectId string
    The ID of the Project to toggle crons 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.
    enabled bool
    Whether crons are enabled for the project.
    project_id str
    The ID of the Project to toggle crons 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.
    enabled Boolean
    Whether crons are enabled for the project.
    projectId String
    The ID of the Project to toggle crons 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 ProjectCrons 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 ProjectCrons Resource

    Get an existing ProjectCrons 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?: ProjectCronsState, opts?: CustomResourceOptions): ProjectCrons
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            enabled: Optional[bool] = None,
            project_id: Optional[str] = None,
            team_id: Optional[str] = None) -> ProjectCrons
    func GetProjectCrons(ctx *Context, name string, id IDInput, state *ProjectCronsState, opts ...ResourceOption) (*ProjectCrons, error)
    public static ProjectCrons Get(string name, Input<string> id, ProjectCronsState? state, CustomResourceOptions? opts = null)
    public static ProjectCrons get(String name, Output<String> id, ProjectCronsState state, CustomResourceOptions options)
    resources:  _:    type: vercel:ProjectCrons    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    Enabled bool
    Whether crons are enabled for the project.
    ProjectId string
    The ID of the Project to toggle crons 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.
    Enabled bool
    Whether crons are enabled for the project.
    ProjectId string
    The ID of the Project to toggle crons 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.
    enabled Boolean
    Whether crons are enabled for the project.
    projectId String
    The ID of the Project to toggle crons 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.
    enabled boolean
    Whether crons are enabled for the project.
    projectId string
    The ID of the Project to toggle crons 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.
    enabled bool
    Whether crons are enabled for the project.
    project_id str
    The ID of the Project to toggle crons 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.
    enabled Boolean
    Whether crons are enabled for the project.
    projectId String
    The ID of the Project to toggle crons 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

    If importing with a team configured on the provider, simply use the project ID.

    • project_id can be found in the project settings tab in the Vercel UI.
    $ pulumi import vercel:index/projectCrons:ProjectCrons example prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
    

    Alternatively, 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/projectCrons:ProjectCrons example team_xxxxxxxxxxxxxxxxxxxxxxxx/prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
    

    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.
    vercel logo
    Vercel v3.15.1 published on Monday, Sep 8, 2025 by Pulumiverse