1. Packages
  2. GitLab
  3. API Docs
  4. ProjectFreezePeriod
GitLab v6.10.0 published on Monday, Mar 25, 2024 by Pulumi

gitlab.ProjectFreezePeriod

Explore with Pulumi AI

gitlab logo
GitLab v6.10.0 published on Monday, Mar 25, 2024 by Pulumi

    The gitlab.ProjectFreezePeriod resource allows to manage the lifecycle of a freeze period for a project.

    Upstream API: GitLab REST API docs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gitlab from "@pulumi/gitlab";
    
    const schedule = new gitlab.ProjectFreezePeriod("schedule", {
        project: gitlab_project.foo.id,
        freezeStart: "0 23 * * 5",
        freezeEnd: "0 7 * * 1",
        cronTimezone: "UTC",
    });
    
    import pulumi
    import pulumi_gitlab as gitlab
    
    schedule = gitlab.ProjectFreezePeriod("schedule",
        project=gitlab_project["foo"]["id"],
        freeze_start="0 23 * * 5",
        freeze_end="0 7 * * 1",
        cron_timezone="UTC")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gitlab.NewProjectFreezePeriod(ctx, "schedule", &gitlab.ProjectFreezePeriodArgs{
    			Project:      pulumi.Any(gitlab_project.Foo.Id),
    			FreezeStart:  pulumi.String("0 23 * * 5"),
    			FreezeEnd:    pulumi.String("0 7 * * 1"),
    			CronTimezone: pulumi.String("UTC"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using GitLab = Pulumi.GitLab;
    
    return await Deployment.RunAsync(() => 
    {
        var schedule = new GitLab.ProjectFreezePeriod("schedule", new()
        {
            Project = gitlab_project.Foo.Id,
            FreezeStart = "0 23 * * 5",
            FreezeEnd = "0 7 * * 1",
            CronTimezone = "UTC",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gitlab.ProjectFreezePeriod;
    import com.pulumi.gitlab.ProjectFreezePeriodArgs;
    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 schedule = new ProjectFreezePeriod("schedule", ProjectFreezePeriodArgs.builder()        
                .project(gitlab_project.foo().id())
                .freezeStart("0 23 * * 5")
                .freezeEnd("0 7 * * 1")
                .cronTimezone("UTC")
                .build());
    
        }
    }
    
    resources:
      schedule:
        type: gitlab:ProjectFreezePeriod
        properties:
          project: ${gitlab_project.foo.id}
          freezeStart: 0 23 * * 5
          freezeEnd: 0 7 * * 1
          cronTimezone: UTC
    

    Create ProjectFreezePeriod Resource

    new ProjectFreezePeriod(name: string, args: ProjectFreezePeriodArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectFreezePeriod(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            cron_timezone: Optional[str] = None,
                            freeze_end: Optional[str] = None,
                            freeze_start: Optional[str] = None,
                            project: Optional[str] = None)
    @overload
    def ProjectFreezePeriod(resource_name: str,
                            args: ProjectFreezePeriodArgs,
                            opts: Optional[ResourceOptions] = None)
    func NewProjectFreezePeriod(ctx *Context, name string, args ProjectFreezePeriodArgs, opts ...ResourceOption) (*ProjectFreezePeriod, error)
    public ProjectFreezePeriod(string name, ProjectFreezePeriodArgs args, CustomResourceOptions? opts = null)
    public ProjectFreezePeriod(String name, ProjectFreezePeriodArgs args)
    public ProjectFreezePeriod(String name, ProjectFreezePeriodArgs args, CustomResourceOptions options)
    
    type: gitlab:ProjectFreezePeriod
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ProjectFreezePeriodArgs
    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 ProjectFreezePeriodArgs
    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 ProjectFreezePeriodArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectFreezePeriodArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectFreezePeriodArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ProjectFreezePeriod Resource Properties

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

    Inputs

    The ProjectFreezePeriod resource accepts the following input properties:

    FreezeEnd string
    End of the Freeze Period in cron format (e.g. 0 2 * * *).
    FreezeStart string
    Start of the Freeze Period in cron format (e.g. 0 1 * * *).
    Project string
    The ID or URL-encoded path of the project to add the schedule to.
    CronTimezone string
    The timezone.
    FreezeEnd string
    End of the Freeze Period in cron format (e.g. 0 2 * * *).
    FreezeStart string
    Start of the Freeze Period in cron format (e.g. 0 1 * * *).
    Project string
    The ID or URL-encoded path of the project to add the schedule to.
    CronTimezone string
    The timezone.
    freezeEnd String
    End of the Freeze Period in cron format (e.g. 0 2 * * *).
    freezeStart String
    Start of the Freeze Period in cron format (e.g. 0 1 * * *).
    project String
    The ID or URL-encoded path of the project to add the schedule to.
    cronTimezone String
    The timezone.
    freezeEnd string
    End of the Freeze Period in cron format (e.g. 0 2 * * *).
    freezeStart string
    Start of the Freeze Period in cron format (e.g. 0 1 * * *).
    project string
    The ID or URL-encoded path of the project to add the schedule to.
    cronTimezone string
    The timezone.
    freeze_end str
    End of the Freeze Period in cron format (e.g. 0 2 * * *).
    freeze_start str
    Start of the Freeze Period in cron format (e.g. 0 1 * * *).
    project str
    The ID or URL-encoded path of the project to add the schedule to.
    cron_timezone str
    The timezone.
    freezeEnd String
    End of the Freeze Period in cron format (e.g. 0 2 * * *).
    freezeStart String
    Start of the Freeze Period in cron format (e.g. 0 1 * * *).
    project String
    The ID or URL-encoded path of the project to add the schedule to.
    cronTimezone String
    The timezone.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ProjectFreezePeriod 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 ProjectFreezePeriod Resource

    Get an existing ProjectFreezePeriod 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?: ProjectFreezePeriodState, opts?: CustomResourceOptions): ProjectFreezePeriod
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cron_timezone: Optional[str] = None,
            freeze_end: Optional[str] = None,
            freeze_start: Optional[str] = None,
            project: Optional[str] = None) -> ProjectFreezePeriod
    func GetProjectFreezePeriod(ctx *Context, name string, id IDInput, state *ProjectFreezePeriodState, opts ...ResourceOption) (*ProjectFreezePeriod, error)
    public static ProjectFreezePeriod Get(string name, Input<string> id, ProjectFreezePeriodState? state, CustomResourceOptions? opts = null)
    public static ProjectFreezePeriod get(String name, Output<String> id, ProjectFreezePeriodState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    CronTimezone string
    The timezone.
    FreezeEnd string
    End of the Freeze Period in cron format (e.g. 0 2 * * *).
    FreezeStart string
    Start of the Freeze Period in cron format (e.g. 0 1 * * *).
    Project string
    The ID or URL-encoded path of the project to add the schedule to.
    CronTimezone string
    The timezone.
    FreezeEnd string
    End of the Freeze Period in cron format (e.g. 0 2 * * *).
    FreezeStart string
    Start of the Freeze Period in cron format (e.g. 0 1 * * *).
    Project string
    The ID or URL-encoded path of the project to add the schedule to.
    cronTimezone String
    The timezone.
    freezeEnd String
    End of the Freeze Period in cron format (e.g. 0 2 * * *).
    freezeStart String
    Start of the Freeze Period in cron format (e.g. 0 1 * * *).
    project String
    The ID or URL-encoded path of the project to add the schedule to.
    cronTimezone string
    The timezone.
    freezeEnd string
    End of the Freeze Period in cron format (e.g. 0 2 * * *).
    freezeStart string
    Start of the Freeze Period in cron format (e.g. 0 1 * * *).
    project string
    The ID or URL-encoded path of the project to add the schedule to.
    cron_timezone str
    The timezone.
    freeze_end str
    End of the Freeze Period in cron format (e.g. 0 2 * * *).
    freeze_start str
    Start of the Freeze Period in cron format (e.g. 0 1 * * *).
    project str
    The ID or URL-encoded path of the project to add the schedule to.
    cronTimezone String
    The timezone.
    freezeEnd String
    End of the Freeze Period in cron format (e.g. 0 2 * * *).
    freezeStart String
    Start of the Freeze Period in cron format (e.g. 0 1 * * *).
    project String
    The ID or URL-encoded path of the project to add the schedule to.

    Import

    GitLab project freeze periods can be imported using an id made up of project_id:freeze_period_id, e.g.

    $ pulumi import gitlab:index/projectFreezePeriod:ProjectFreezePeriod schedule "12345:1337"
    

    Package Details

    Repository
    GitLab pulumi/pulumi-gitlab
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the gitlab Terraform Provider.
    gitlab logo
    GitLab v6.10.0 published on Monday, Mar 25, 2024 by Pulumi