1. Packages
  2. GitLab
  3. API Docs
  4. ProjectFreezePeriod
GitLab v8.1.0 published on Friday, Jun 21, 2024 by Pulumi

gitlab.ProjectFreezePeriod

Explore with Pulumi AI

gitlab logo
GitLab v8.1.0 published on Friday, Jun 21, 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: foo.id,
        freezeStart: "0 23 * * 5",
        freezeEnd: "0 7 * * 1",
        cronTimezone: "UTC",
    });
    
    import pulumi
    import pulumi_gitlab as gitlab
    
    schedule = gitlab.ProjectFreezePeriod("schedule",
        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/v8/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(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 = 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(foo.id())
                .freezeStart("0 23 * * 5")
                .freezeEnd("0 7 * * 1")
                .cronTimezone("UTC")
                .build());
    
        }
    }
    
    resources:
      schedule:
        type: gitlab:ProjectFreezePeriod
        properties:
          project: ${foo.id}
          freezeStart: 0 23 * * 5
          freezeEnd: 0 7 * * 1
          cronTimezone: UTC
    

    Create ProjectFreezePeriod Resource

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

    Constructor syntax

    new ProjectFreezePeriod(name: string, args: ProjectFreezePeriodArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectFreezePeriod(resource_name: str,
                            args: ProjectFreezePeriodArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def ProjectFreezePeriod(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            freeze_end: Optional[str] = None,
                            freeze_start: Optional[str] = None,
                            project: Optional[str] = None,
                            cron_timezone: Optional[str] = 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.
    
    

    Parameters

    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.

    Constructor example

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

    var projectFreezePeriodResource = new GitLab.ProjectFreezePeriod("projectFreezePeriodResource", new()
    {
        FreezeEnd = "string",
        FreezeStart = "string",
        Project = "string",
        CronTimezone = "string",
    });
    
    example, err := gitlab.NewProjectFreezePeriod(ctx, "projectFreezePeriodResource", &gitlab.ProjectFreezePeriodArgs{
    	FreezeEnd:    pulumi.String("string"),
    	FreezeStart:  pulumi.String("string"),
    	Project:      pulumi.String("string"),
    	CronTimezone: pulumi.String("string"),
    })
    
    var projectFreezePeriodResource = new ProjectFreezePeriod("projectFreezePeriodResource", ProjectFreezePeriodArgs.builder()
        .freezeEnd("string")
        .freezeStart("string")
        .project("string")
        .cronTimezone("string")
        .build());
    
    project_freeze_period_resource = gitlab.ProjectFreezePeriod("projectFreezePeriodResource",
        freeze_end="string",
        freeze_start="string",
        project="string",
        cron_timezone="string")
    
    const projectFreezePeriodResource = new gitlab.ProjectFreezePeriod("projectFreezePeriodResource", {
        freezeEnd: "string",
        freezeStart: "string",
        project: "string",
        cronTimezone: "string",
    });
    
    type: gitlab:ProjectFreezePeriod
    properties:
        cronTimezone: string
        freezeEnd: string
        freezeStart: string
        project: string
    

    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"
    

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

    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 v8.1.0 published on Friday, Jun 21, 2024 by Pulumi