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

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

There is a newer version: 8.4.0
Show 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.GroupLabelArgs;
import com.pulumi.gitlab.Utilities;
import com.pulumi.gitlab.inputs.GroupLabelState;
import java.lang.Integer;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * The `gitlab.GroupLabel` resource allows to manage the lifecycle of labels within a group.
 * 
 * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/user/project/labels.html#group-labels)
 * 
 * ## 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.GroupLabel;
 * import com.pulumi.gitlab.GroupLabelArgs;
 * 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 fixme = new GroupLabel("fixme", GroupLabelArgs.builder()
 *             .group("example")
 *             .name("fixme")
 *             .description("issue with failing tests")
 *             .color("#ffcc00")
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Gitlab group labels can be imported using an id made up of `{group_id}:{group_label_id}`, e.g. * * ```sh * $ pulumi import gitlab:index/groupLabel:GroupLabel example 12345:fixme * ``` * */ @ResourceType(type="gitlab:index/groupLabel:GroupLabel") public class GroupLabel extends com.pulumi.resources.CustomResource { /** * The color of the label given in 6-digit hex notation with leading '#' sign (e.g. #FFAABB) or one of the [CSS color names](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Color_keywords). * */ @Export(name="color", refs={String.class}, tree="[0]") private Output color; /** * @return The color of the label given in 6-digit hex notation with leading '#' sign (e.g. #FFAABB) or one of the [CSS color names](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Color_keywords). * */ public Output color() { return this.color; } /** * The description of the label. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return The description of the label. * */ public Output> description() { return Codegen.optional(this.description); } /** * The name or id of the group to add the label to. * */ @Export(name="group", refs={String.class}, tree="[0]") private Output group; /** * @return The name or id of the group to add the label to. * */ public Output group() { return this.group; } /** * The id of the group label. * */ @Export(name="labelId", refs={Integer.class}, tree="[0]") private Output labelId; /** * @return The id of the group label. * */ public Output labelId() { return this.labelId; } /** * The name of the label. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the label. * */ public Output name() { return this.name; } /** * * @param name The _unique_ name of the resulting resource. */ public GroupLabel(java.lang.String name) { this(name, GroupLabelArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public GroupLabel(java.lang.String name, GroupLabelArgs 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 GroupLabel(java.lang.String name, GroupLabelArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("gitlab:index/groupLabel:GroupLabel", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private GroupLabel(java.lang.String name, Output id, @Nullable GroupLabelState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("gitlab:index/groupLabel:GroupLabel", name, state, makeResourceOptions(options, id), false); } private static GroupLabelArgs makeArgs(GroupLabelArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? GroupLabelArgs.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 GroupLabel get(java.lang.String name, Output id, @Nullable GroupLabelState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new GroupLabel(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy