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

com.pulumi.gitlab.ProjectPushRules 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.ProjectPushRulesArgs;
import com.pulumi.gitlab.Utilities;
import com.pulumi.gitlab.inputs.ProjectPushRulesState;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import javax.annotation.Nullable;

/**
 * ## 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.ProjectPushRules;
 * import com.pulumi.gitlab.ProjectPushRulesArgs;
 * 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 }{{@code
 *     public static void main(String[] args) }{{@code
 *         Pulumi.run(App::stack);
 *     }}{@code
 * 
 *     public static void stack(Context ctx) }{{@code
 *         var sample = new ProjectPushRules("sample", ProjectPushRulesArgs.builder()
 *             .project(42)
 *             .authorEmailRegex("}{@literal @}{@code gitlab.com$")
 *             .branchNameRegex("(feat|fix)\\/*")
 *             .commitCommitterCheck(true)
 *             .commitCommitterNameCheck(true)
 *             .commitMessageNegativeRegex("ssh\\:\\/\\/")
 *             .commitMessageRegex("(feat|fix):.*")
 *             .denyDeleteTag(false)
 *             .fileNameRegex("(jar|exe)$")
 *             .maxFileSize(4)
 *             .memberCheck(true)
 *             .preventSecrets(true)
 *             .rejectUnsignedCommits(false)
 *             .build());
 * 
 *     }}{@code
 * }}{@code
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Gitlab project push rules can be imported with a key composed of `<project_id>`, e.g. * * ```sh * $ pulumi import gitlab:index/projectPushRules:ProjectPushRules sample "42" * ``` * */ @ResourceType(type="gitlab:index/projectPushRules:ProjectPushRules") public class ProjectPushRules extends com.pulumi.resources.CustomResource { /** * All commit author emails must match this regex, e.g. `{@literal @}my-company.com$`. * */ @Export(name="authorEmailRegex", refs={String.class}, tree="[0]") private Output authorEmailRegex; /** * @return All commit author emails must match this regex, e.g. `{@literal @}my-company.com$`. * */ public Output authorEmailRegex() { return this.authorEmailRegex; } /** * All branch names must match this regex, e.g. `(feature|hotfix)\/*`. * */ @Export(name="branchNameRegex", refs={String.class}, tree="[0]") private Output branchNameRegex; /** * @return All branch names must match this regex, e.g. `(feature|hotfix)\/*`. * */ public Output branchNameRegex() { return this.branchNameRegex; } /** * Users can only push commits to this repository that were committed with one of their own verified emails. * */ @Export(name="commitCommitterCheck", refs={Boolean.class}, tree="[0]") private Output commitCommitterCheck; /** * @return Users can only push commits to this repository that were committed with one of their own verified emails. * */ public Output commitCommitterCheck() { return this.commitCommitterCheck; } /** * Users can only push commits to this repository if the commit author name is consistent with their GitLab account name. * */ @Export(name="commitCommitterNameCheck", refs={Boolean.class}, tree="[0]") private Output commitCommitterNameCheck; /** * @return Users can only push commits to this repository if the commit author name is consistent with their GitLab account name. * */ public Output commitCommitterNameCheck() { return this.commitCommitterNameCheck; } /** * No commit message is allowed to match this regex, e.g. `ssh\:\/\/`. * */ @Export(name="commitMessageNegativeRegex", refs={String.class}, tree="[0]") private Output commitMessageNegativeRegex; /** * @return No commit message is allowed to match this regex, e.g. `ssh\:\/\/`. * */ public Output commitMessageNegativeRegex() { return this.commitMessageNegativeRegex; } /** * All commit messages must match this regex, e.g. `Fixed \d+\..*`. * */ @Export(name="commitMessageRegex", refs={String.class}, tree="[0]") private Output commitMessageRegex; /** * @return All commit messages must match this regex, e.g. `Fixed \d+\..*`. * */ public Output commitMessageRegex() { return this.commitMessageRegex; } /** * Deny deleting a tag. * */ @Export(name="denyDeleteTag", refs={Boolean.class}, tree="[0]") private Output denyDeleteTag; /** * @return Deny deleting a tag. * */ public Output denyDeleteTag() { return this.denyDeleteTag; } /** * All committed filenames must not match this regex, e.g. `(jar|exe)$`. * */ @Export(name="fileNameRegex", refs={String.class}, tree="[0]") private Output fileNameRegex; /** * @return All committed filenames must not match this regex, e.g. `(jar|exe)$`. * */ public Output fileNameRegex() { return this.fileNameRegex; } /** * Maximum file size (MB). * */ @Export(name="maxFileSize", refs={Integer.class}, tree="[0]") private Output maxFileSize; /** * @return Maximum file size (MB). * */ public Output maxFileSize() { return this.maxFileSize; } /** * Restrict commits by author (email) to existing GitLab users. * */ @Export(name="memberCheck", refs={Boolean.class}, tree="[0]") private Output memberCheck; /** * @return Restrict commits by author (email) to existing GitLab users. * */ public Output memberCheck() { return this.memberCheck; } /** * GitLab will reject any files that are likely to contain secrets. * */ @Export(name="preventSecrets", refs={Boolean.class}, tree="[0]") private Output preventSecrets; /** * @return GitLab will reject any files that are likely to contain secrets. * */ public Output preventSecrets() { return this.preventSecrets; } /** * The ID or URL-encoded path of the project. * */ @Export(name="project", refs={String.class}, tree="[0]") private Output project; /** * @return The ID or URL-encoded path of the project. * */ public Output project() { return this.project; } /** * Reject commit when it’s not DCO certified. * */ @Export(name="rejectNonDcoCommits", refs={Boolean.class}, tree="[0]") private Output rejectNonDcoCommits; /** * @return Reject commit when it’s not DCO certified. * */ public Output rejectNonDcoCommits() { return this.rejectNonDcoCommits; } /** * Reject commit when it’s not signed. * */ @Export(name="rejectUnsignedCommits", refs={Boolean.class}, tree="[0]") private Output rejectUnsignedCommits; /** * @return Reject commit when it’s not signed. * */ public Output rejectUnsignedCommits() { return this.rejectUnsignedCommits; } /** * * @param name The _unique_ name of the resulting resource. */ public ProjectPushRules(java.lang.String name) { this(name, ProjectPushRulesArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ProjectPushRules(java.lang.String name, ProjectPushRulesArgs 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 ProjectPushRules(java.lang.String name, ProjectPushRulesArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("gitlab:index/projectPushRules:ProjectPushRules", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ProjectPushRules(java.lang.String name, Output id, @Nullable ProjectPushRulesState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("gitlab:index/projectPushRules:ProjectPushRules", name, state, makeResourceOptions(options, id), false); } private static ProjectPushRulesArgs makeArgs(ProjectPushRulesArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ProjectPushRulesArgs.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 ProjectPushRules get(java.lang.String name, Output id, @Nullable ProjectPushRulesState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ProjectPushRules(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy