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

com.pulumi.github.OrganizationSettings Maven / Gradle / Ivy

// *** 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.github;

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.github.OrganizationSettingsArgs;
import com.pulumi.github.Utilities;
import com.pulumi.github.inputs.OrganizationSettingsState;
import java.lang.Boolean;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * This resource allows you to create and manage settings for a GitHub Organization.
 * 
 * ## Example Usage
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.github.OrganizationSettings;
 * import com.pulumi.github.OrganizationSettingsArgs;
 * 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 test = new OrganizationSettings("test", OrganizationSettingsArgs.builder()        
 *             .advancedSecurityEnabledForNewRepositories(false)
 *             .billingEmail("[email protected]")
 *             .blog("https://example.com")
 *             .company("Test Company")
 *             .defaultRepositoryPermission("read")
 *             .dependabotAlertsEnabledForNewRepositories(false)
 *             .dependabotSecurityUpdatesEnabledForNewRepositories(false)
 *             .dependencyGraphEnabledForNewRepositories(false)
 *             .description("Test Description")
 *             .email("[email protected]")
 *             .hasOrganizationProjects(true)
 *             .hasRepositoryProjects(true)
 *             .location("Test Location")
 *             .membersCanCreateInternalRepositories(true)
 *             .membersCanCreatePages(true)
 *             .membersCanCreatePrivatePages(true)
 *             .membersCanCreatePrivateRepositories(true)
 *             .membersCanCreatePublicPages(true)
 *             .membersCanCreatePublicRepositories(true)
 *             .membersCanCreateRepositories(true)
 *             .membersCanForkPrivateRepositories(true)
 *             .secretScanningEnabledForNewRepositories(false)
 *             .secretScanningPushProtectionEnabledForNewRepositories(false)
 *             .twitterUsername("Test")
 *             .webCommitSignoffRequired(true)
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * Organization settings can be imported using the `id` of the organization. The `id` of the organization can be found using the [get an organization](https://docs.github.com/en/rest/orgs/orgs#get-an-organization) API.
 * 
 * ```sh
 *  $ pulumi import github:index/organizationSettings:OrganizationSettings test 123456789
 * ```
 * 
 */
@ResourceType(type="github:index/organizationSettings:OrganizationSettings")
public class OrganizationSettings extends com.pulumi.resources.CustomResource {
    /**
     * Whether or not advanced security is enabled for new repositories. Defaults to `false`.
     * 
     */
    @Export(name="advancedSecurityEnabledForNewRepositories", type=Boolean.class, parameters={})
    private Output advancedSecurityEnabledForNewRepositories;

    /**
     * @return Whether or not advanced security is enabled for new repositories. Defaults to `false`.
     * 
     */
    public Output> advancedSecurityEnabledForNewRepositories() {
        return Codegen.optional(this.advancedSecurityEnabledForNewRepositories);
    }
    /**
     * The billing email address for the organization.
     * 
     */
    @Export(name="billingEmail", type=String.class, parameters={})
    private Output billingEmail;

    /**
     * @return The billing email address for the organization.
     * 
     */
    public Output billingEmail() {
        return this.billingEmail;
    }
    /**
     * The blog URL for the organization.
     * 
     */
    @Export(name="blog", type=String.class, parameters={})
    private Output blog;

    /**
     * @return The blog URL for the organization.
     * 
     */
    public Output> blog() {
        return Codegen.optional(this.blog);
    }
    /**
     * The company name for the organization.
     * 
     */
    @Export(name="company", type=String.class, parameters={})
    private Output company;

    /**
     * @return The company name for the organization.
     * 
     */
    public Output> company() {
        return Codegen.optional(this.company);
    }
    /**
     * The default permission for organization members to create new repositories. Can be one of `read`, `write`, `admin`, or `none`. Defaults to `read`.
     * 
     */
    @Export(name="defaultRepositoryPermission", type=String.class, parameters={})
    private Output defaultRepositoryPermission;

    /**
     * @return The default permission for organization members to create new repositories. Can be one of `read`, `write`, `admin`, or `none`. Defaults to `read`.
     * 
     */
    public Output> defaultRepositoryPermission() {
        return Codegen.optional(this.defaultRepositoryPermission);
    }
    /**
     * Whether or not dependabot alerts are enabled for new repositories. Defaults to `false`.
     * 
     */
    @Export(name="dependabotAlertsEnabledForNewRepositories", type=Boolean.class, parameters={})
    private Output dependabotAlertsEnabledForNewRepositories;

    /**
     * @return Whether or not dependabot alerts are enabled for new repositories. Defaults to `false`.
     * 
     */
    public Output> dependabotAlertsEnabledForNewRepositories() {
        return Codegen.optional(this.dependabotAlertsEnabledForNewRepositories);
    }
    /**
     * Whether or not dependabot security updates are enabled for new repositories. Defaults to `false`.
     * 
     */
    @Export(name="dependabotSecurityUpdatesEnabledForNewRepositories", type=Boolean.class, parameters={})
    private Output dependabotSecurityUpdatesEnabledForNewRepositories;

    /**
     * @return Whether or not dependabot security updates are enabled for new repositories. Defaults to `false`.
     * 
     */
    public Output> dependabotSecurityUpdatesEnabledForNewRepositories() {
        return Codegen.optional(this.dependabotSecurityUpdatesEnabledForNewRepositories);
    }
    /**
     * Whether or not dependency graph is enabled for new repositories. Defaults to `false`.
     * 
     */
    @Export(name="dependencyGraphEnabledForNewRepositories", type=Boolean.class, parameters={})
    private Output dependencyGraphEnabledForNewRepositories;

    /**
     * @return Whether or not dependency graph is enabled for new repositories. Defaults to `false`.
     * 
     */
    public Output> dependencyGraphEnabledForNewRepositories() {
        return Codegen.optional(this.dependencyGraphEnabledForNewRepositories);
    }
    /**
     * The description for the organization.
     * 
     */
    @Export(name="description", type=String.class, parameters={})
    private Output description;

    /**
     * @return The description for the organization.
     * 
     */
    public Output> description() {
        return Codegen.optional(this.description);
    }
    /**
     * The email address for the organization.
     * 
     */
    @Export(name="email", type=String.class, parameters={})
    private Output email;

    /**
     * @return The email address for the organization.
     * 
     */
    public Output> email() {
        return Codegen.optional(this.email);
    }
    /**
     * Whether or not organization projects are enabled for the organization.
     * 
     */
    @Export(name="hasOrganizationProjects", type=Boolean.class, parameters={})
    private Output hasOrganizationProjects;

    /**
     * @return Whether or not organization projects are enabled for the organization.
     * 
     */
    public Output> hasOrganizationProjects() {
        return Codegen.optional(this.hasOrganizationProjects);
    }
    /**
     * Whether or not repository projects are enabled for the organization.
     * 
     */
    @Export(name="hasRepositoryProjects", type=Boolean.class, parameters={})
    private Output hasRepositoryProjects;

    /**
     * @return Whether or not repository projects are enabled for the organization.
     * 
     */
    public Output> hasRepositoryProjects() {
        return Codegen.optional(this.hasRepositoryProjects);
    }
    /**
     * The location for the organization.
     * 
     */
    @Export(name="location", type=String.class, parameters={})
    private Output location;

    /**
     * @return The location for the organization.
     * 
     */
    public Output> location() {
        return Codegen.optional(this.location);
    }
    /**
     * Whether or not organization members can create new internal repositories. For Enterprise Organizations only.
     * 
     */
    @Export(name="membersCanCreateInternalRepositories", type=Boolean.class, parameters={})
    private Output membersCanCreateInternalRepositories;

    /**
     * @return Whether or not organization members can create new internal repositories. For Enterprise Organizations only.
     * 
     */
    public Output> membersCanCreateInternalRepositories() {
        return Codegen.optional(this.membersCanCreateInternalRepositories);
    }
    /**
     * Whether or not organization members can create new pages. Defaults to `true`.
     * 
     */
    @Export(name="membersCanCreatePages", type=Boolean.class, parameters={})
    private Output membersCanCreatePages;

    /**
     * @return Whether or not organization members can create new pages. Defaults to `true`.
     * 
     */
    public Output> membersCanCreatePages() {
        return Codegen.optional(this.membersCanCreatePages);
    }
    /**
     * Whether or not organization members can create new private pages. Defaults to `true`.
     * 
     */
    @Export(name="membersCanCreatePrivatePages", type=Boolean.class, parameters={})
    private Output membersCanCreatePrivatePages;

    /**
     * @return Whether or not organization members can create new private pages. Defaults to `true`.
     * 
     */
    public Output> membersCanCreatePrivatePages() {
        return Codegen.optional(this.membersCanCreatePrivatePages);
    }
    /**
     * Whether or not organization members can create new private repositories. Defaults to `true`.
     * 
     */
    @Export(name="membersCanCreatePrivateRepositories", type=Boolean.class, parameters={})
    private Output membersCanCreatePrivateRepositories;

    /**
     * @return Whether or not organization members can create new private repositories. Defaults to `true`.
     * 
     */
    public Output> membersCanCreatePrivateRepositories() {
        return Codegen.optional(this.membersCanCreatePrivateRepositories);
    }
    /**
     * Whether or not organization members can create new public pages. Defaults to `true`.
     * 
     */
    @Export(name="membersCanCreatePublicPages", type=Boolean.class, parameters={})
    private Output membersCanCreatePublicPages;

    /**
     * @return Whether or not organization members can create new public pages. Defaults to `true`.
     * 
     */
    public Output> membersCanCreatePublicPages() {
        return Codegen.optional(this.membersCanCreatePublicPages);
    }
    /**
     * Whether or not organization members can create new public repositories. Defaults to `true`.
     * 
     */
    @Export(name="membersCanCreatePublicRepositories", type=Boolean.class, parameters={})
    private Output membersCanCreatePublicRepositories;

    /**
     * @return Whether or not organization members can create new public repositories. Defaults to `true`.
     * 
     */
    public Output> membersCanCreatePublicRepositories() {
        return Codegen.optional(this.membersCanCreatePublicRepositories);
    }
    /**
     * Whether or not organization members can create new repositories. Defaults to `true`.
     * 
     */
    @Export(name="membersCanCreateRepositories", type=Boolean.class, parameters={})
    private Output membersCanCreateRepositories;

    /**
     * @return Whether or not organization members can create new repositories. Defaults to `true`.
     * 
     */
    public Output> membersCanCreateRepositories() {
        return Codegen.optional(this.membersCanCreateRepositories);
    }
    /**
     * Whether or not organization members can fork private repositories. Defaults to `false`.
     * 
     */
    @Export(name="membersCanForkPrivateRepositories", type=Boolean.class, parameters={})
    private Output membersCanForkPrivateRepositories;

    /**
     * @return Whether or not organization members can fork private repositories. Defaults to `false`.
     * 
     */
    public Output> membersCanForkPrivateRepositories() {
        return Codegen.optional(this.membersCanForkPrivateRepositories);
    }
    /**
     * The name for the organization.
     * 
     */
    @Export(name="name", type=String.class, parameters={})
    private Output name;

    /**
     * @return The name for the organization.
     * 
     */
    public Output name() {
        return this.name;
    }
    /**
     * Whether or not secret scanning is enabled for new repositories. Defaults to `false`.
     * 
     */
    @Export(name="secretScanningEnabledForNewRepositories", type=Boolean.class, parameters={})
    private Output secretScanningEnabledForNewRepositories;

    /**
     * @return Whether or not secret scanning is enabled for new repositories. Defaults to `false`.
     * 
     */
    public Output> secretScanningEnabledForNewRepositories() {
        return Codegen.optional(this.secretScanningEnabledForNewRepositories);
    }
    /**
     * Whether or not secret scanning push protection is enabled for new repositories. Defaults to `false`.
     * 
     */
    @Export(name="secretScanningPushProtectionEnabledForNewRepositories", type=Boolean.class, parameters={})
    private Output secretScanningPushProtectionEnabledForNewRepositories;

    /**
     * @return Whether or not secret scanning push protection is enabled for new repositories. Defaults to `false`.
     * 
     */
    public Output> secretScanningPushProtectionEnabledForNewRepositories() {
        return Codegen.optional(this.secretScanningPushProtectionEnabledForNewRepositories);
    }
    /**
     * The Twitter username for the organization.
     * 
     */
    @Export(name="twitterUsername", type=String.class, parameters={})
    private Output twitterUsername;

    /**
     * @return The Twitter username for the organization.
     * 
     */
    public Output> twitterUsername() {
        return Codegen.optional(this.twitterUsername);
    }
    /**
     * Whether or not commit signatures are required for commits to the organization. Defaults to `false`.
     * 
     */
    @Export(name="webCommitSignoffRequired", type=Boolean.class, parameters={})
    private Output webCommitSignoffRequired;

    /**
     * @return Whether or not commit signatures are required for commits to the organization. Defaults to `false`.
     * 
     */
    public Output> webCommitSignoffRequired() {
        return Codegen.optional(this.webCommitSignoffRequired);
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public OrganizationSettings(String name) {
        this(name, OrganizationSettingsArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public OrganizationSettings(String name, OrganizationSettingsArgs 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 OrganizationSettings(String name, OrganizationSettingsArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("github:index/organizationSettings:OrganizationSettings", name, args == null ? OrganizationSettingsArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private OrganizationSettings(String name, Output id, @Nullable OrganizationSettingsState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("github:index/organizationSettings:OrganizationSettings", name, state, makeResourceOptions(options, id));
    }

    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 OrganizationSettings get(String name, Output id, @Nullable OrganizationSettingsState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new OrganizationSettings(name, id, state, options);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy