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

com.pulumi.gitlab.GroupBadge 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.GroupBadgeArgs;
import com.pulumi.gitlab.Utilities;
import com.pulumi.gitlab.inputs.GroupBadgeState;
import java.lang.String;
import javax.annotation.Nullable;

/**
 * The `gitlab.GroupBadge` resource allows to manage the lifecycle of group badges.
 * 
 * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/user/project/badges.html#group-badges)
 * 
 * ## 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.Group;
 * import com.pulumi.gitlab.GroupArgs;
 * import com.pulumi.gitlab.GroupBadge;
 * import com.pulumi.gitlab.GroupBadgeArgs;
 * 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 foo = new Group("foo", GroupArgs.builder()
 *             .name("foo-group")
 *             .build());
 * 
 *         var example = new GroupBadge("example", GroupBadgeArgs.builder()
 *             .group(foo.id())
 *             .linkUrl("https://example.com/badge-123")
 *             .imageUrl("https://example.com/badge-123.svg")
 *             .build());
 * 
 *         // Pipeline status badges with placeholders will be enabled for each project
 *         var gitlabPipeline = new GroupBadge("gitlabPipeline", GroupBadgeArgs.builder()
 *             .group(foo.id())
 *             .linkUrl("https://gitlab.example.com/%{project_path}/-/pipelines?ref=%{default_branch}")
 *             .imageUrl("https://gitlab.example.com/%{project_path}/badges/%{default_branch}/pipeline.svg")
 *             .build());
 * 
 *         // Test coverage report badges with placeholders will be enabled for each project
 *         var gitlabCoverage = new GroupBadge("gitlabCoverage", GroupBadgeArgs.builder()
 *             .group(foo.id())
 *             .linkUrl("https://gitlab.example.com/%{project_path}/-/jobs")
 *             .imageUrl("https://gitlab.example.com/%{project_path}/badges/%{default_branch}/coverage.svg")
 *             .build());
 * 
 *         // Latest release badges with placeholders will be enabled for each project
 *         var gitlabRelease = new GroupBadge("gitlabRelease", GroupBadgeArgs.builder()
 *             .group(foo.id())
 *             .linkUrl("https://gitlab.example.com/%{project_path}/-/releases")
 *             .imageUrl("https://gitlab.example.com/%{project_path}/-/badges/release.svg")
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * GitLab group badges can be imported using an id made up of `{group_id}:{badge_id}`, e.g. * * ```sh * $ pulumi import gitlab:index/groupBadge:GroupBadge foo 1:3 * ``` * */ @ResourceType(type="gitlab:index/groupBadge:GroupBadge") public class GroupBadge extends com.pulumi.resources.CustomResource { /** * The id of the group to add the badge to. * */ @Export(name="group", refs={String.class}, tree="[0]") private Output group; /** * @return The id of the group to add the badge to. * */ public Output group() { return this.group; } /** * The image url which will be presented on group overview. * */ @Export(name="imageUrl", refs={String.class}, tree="[0]") private Output imageUrl; /** * @return The image url which will be presented on group overview. * */ public Output imageUrl() { return this.imageUrl; } /** * The url linked with the badge. * */ @Export(name="linkUrl", refs={String.class}, tree="[0]") private Output linkUrl; /** * @return The url linked with the badge. * */ public Output linkUrl() { return this.linkUrl; } /** * The name of the badge. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the badge. * */ public Output name() { return this.name; } /** * The image_url argument rendered (in case of use of placeholders). * */ @Export(name="renderedImageUrl", refs={String.class}, tree="[0]") private Output renderedImageUrl; /** * @return The image_url argument rendered (in case of use of placeholders). * */ public Output renderedImageUrl() { return this.renderedImageUrl; } /** * The link_url argument rendered (in case of use of placeholders). * */ @Export(name="renderedLinkUrl", refs={String.class}, tree="[0]") private Output renderedLinkUrl; /** * @return The link_url argument rendered (in case of use of placeholders). * */ public Output renderedLinkUrl() { return this.renderedLinkUrl; } /** * * @param name The _unique_ name of the resulting resource. */ public GroupBadge(java.lang.String name) { this(name, GroupBadgeArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public GroupBadge(java.lang.String name, GroupBadgeArgs 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 GroupBadge(java.lang.String name, GroupBadgeArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("gitlab:index/groupBadge:GroupBadge", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private GroupBadge(java.lang.String name, Output id, @Nullable GroupBadgeState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("gitlab:index/groupBadge:GroupBadge", name, state, makeResourceOptions(options, id), false); } private static GroupBadgeArgs makeArgs(GroupBadgeArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? GroupBadgeArgs.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 GroupBadge get(java.lang.String name, Output id, @Nullable GroupBadgeState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new GroupBadge(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy