All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gitlab.ProjectMilestone Maven / Gradle / Ivy

The newest version!
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.gitlab;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.gitlab.ProjectMilestoneArgs;
import com.pulumi.gitlab.Utilities;
import com.pulumi.gitlab.inputs.ProjectMilestoneState;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * The `gitlab.ProjectMilestone` resource allows to manage the lifecycle of a project milestone.
 * 
 * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html)
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gitlab.Project;
 * import com.pulumi.gitlab.ProjectArgs;
 * import com.pulumi.gitlab.ProjectMilestone;
 * import com.pulumi.gitlab.ProjectMilestoneArgs;
 * 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) {
 *         // Create a project for the milestone to use
 *         var example = new Project("example", ProjectArgs.builder()
 *             .name("example")
 *             .description("An example project")
 *             .namespaceId(exampleGitlabGroup.id())
 *             .build());
 * 
 *         var exampleProjectMilestone = new ProjectMilestone("exampleProjectMilestone", ProjectMilestoneArgs.builder()
 *             .project(example.id())
 *             .title("example")
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Gitlab project milestone can be imported with a key composed of `<project>:<milestone_id>`, e.g. * * ```sh * $ pulumi import gitlab:index/projectMilestone:ProjectMilestone example "12345:11" * ``` * */ @ResourceType(type="gitlab:index/projectMilestone:ProjectMilestone") public class ProjectMilestone extends com.pulumi.resources.CustomResource { /** * The time of creation of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. * */ @Export(name="createdAt", refs={String.class}, tree="[0]") private Output createdAt; /** * @return The time of creation of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. * */ public Output createdAt() { return this.createdAt; } /** * The description of the milestone. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return The description of the milestone. * */ public Output> description() { return Codegen.optional(this.description); } /** * The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11. * */ @Export(name="dueDate", refs={String.class}, tree="[0]") private Output dueDate; /** * @return The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11. * */ public Output> dueDate() { return Codegen.optional(this.dueDate); } /** * Bool, true if milestone expired. * */ @Export(name="expired", refs={Boolean.class}, tree="[0]") private Output expired; /** * @return Bool, true if milestone expired. * */ public Output expired() { return this.expired; } /** * The ID of the project's milestone. * */ @Export(name="iid", refs={Integer.class}, tree="[0]") private Output iid; /** * @return The ID of the project's milestone. * */ public Output iid() { return this.iid; } /** * The instance-wide ID of the project’s milestone. * */ @Export(name="milestoneId", refs={Integer.class}, tree="[0]") private Output milestoneId; /** * @return The instance-wide ID of the project’s milestone. * */ public Output milestoneId() { return this.milestoneId; } /** * The ID or URL-encoded path of the project owned by the authenticated user. * */ @Export(name="project", refs={String.class}, tree="[0]") private Output project; /** * @return The ID or URL-encoded path of the project owned by the authenticated user. * */ public Output project() { return this.project; } /** * The project ID of milestone. * */ @Export(name="projectId", refs={Integer.class}, tree="[0]") private Output projectId; /** * @return The project ID of milestone. * */ public Output projectId() { return this.projectId; } /** * The start date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11. * */ @Export(name="startDate", refs={String.class}, tree="[0]") private Output startDate; /** * @return The start date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11. * */ public Output> startDate() { return Codegen.optional(this.startDate); } /** * The state of the milestone. Valid values are: `active`, `closed`. * */ @Export(name="state", refs={String.class}, tree="[0]") private Output state; /** * @return The state of the milestone. Valid values are: `active`, `closed`. * */ public Output> state() { return Codegen.optional(this.state); } /** * The title of a milestone. * */ @Export(name="title", refs={String.class}, tree="[0]") private Output title; /** * @return The title of a milestone. * */ public Output title() { return this.title; } /** * The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. * */ @Export(name="updatedAt", refs={String.class}, tree="[0]") private Output updatedAt; /** * @return The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. * */ public Output updatedAt() { return this.updatedAt; } /** * The web URL of the milestone. * */ @Export(name="webUrl", refs={String.class}, tree="[0]") private Output webUrl; /** * @return The web URL of the milestone. * */ public Output webUrl() { return this.webUrl; } /** * * @param name The _unique_ name of the resulting resource. */ public ProjectMilestone(java.lang.String name) { this(name, ProjectMilestoneArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ProjectMilestone(java.lang.String name, ProjectMilestoneArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public ProjectMilestone(java.lang.String name, ProjectMilestoneArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("gitlab:index/projectMilestone:ProjectMilestone", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ProjectMilestone(java.lang.String name, Output id, @Nullable ProjectMilestoneState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("gitlab:index/projectMilestone:ProjectMilestone", name, state, makeResourceOptions(options, id), false); } private static ProjectMilestoneArgs makeArgs(ProjectMilestoneArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ProjectMilestoneArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static ProjectMilestone get(java.lang.String name, Output id, @Nullable ProjectMilestoneState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ProjectMilestone(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy