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

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

There is a newer version: 6.3.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.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.AppInstallationRepositoriesArgs;
import com.pulumi.github.Utilities;
import com.pulumi.github.inputs.AppInstallationRepositoriesState;
import java.lang.String;
import java.util.List;
import javax.annotation.Nullable;

/**
 * > **Note**: This resource is not compatible with the GitHub App Installation authentication method.
 * 
 * This resource manages relationships between app installations and repositories
 * in your GitHub organization.
 * 
 * Creating this resource installs a particular app on multiple repositories.
 * 
 * The app installation and the repositories must all belong to the same
 * organization on GitHub. Note: you can review your organization's installations
 * by the following the instructions at this
 * [link](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/reviewing-your-organizations-installed-integrations).
 * 
 * ## Import
 * 
 * GitHub App Installation Repositories can be imported
 * using an ID made up of `installation_id`, e.g.
 * 
 * ```sh
 * $ pulumi import github:index/appInstallationRepositories:AppInstallationRepositories some_app_repos 1234567
 * ```
 * 
 */
@ResourceType(type="github:index/appInstallationRepositories:AppInstallationRepositories")
public class AppInstallationRepositories extends com.pulumi.resources.CustomResource {
    /**
     * The GitHub app installation id.
     * 
     */
    @Export(name="installationId", refs={String.class}, tree="[0]")
    private Output installationId;

    /**
     * @return The GitHub app installation id.
     * 
     */
    public Output installationId() {
        return this.installationId;
    }
    /**
     * A list of repository names to install the app on.
     * 
     * > **Note**: Due to how GitHub implements app installations, apps cannot be installed with no repositories selected. Therefore deleting this resource will leave one repository with the app installed. Manually uninstall the app or set the installation to all repositories via the GUI as after deleting this resource.
     * 
     */
    @Export(name="selectedRepositories", refs={List.class,String.class}, tree="[0,1]")
    private Output> selectedRepositories;

    /**
     * @return A list of repository names to install the app on.
     * 
     * > **Note**: Due to how GitHub implements app installations, apps cannot be installed with no repositories selected. Therefore deleting this resource will leave one repository with the app installed. Manually uninstall the app or set the installation to all repositories via the GUI as after deleting this resource.
     * 
     */
    public Output> selectedRepositories() {
        return this.selectedRepositories;
    }

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

    private AppInstallationRepositories(java.lang.String name, Output id, @Nullable AppInstallationRepositoriesState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("github:index/appInstallationRepositories:AppInstallationRepositories", name, state, makeResourceOptions(options, id), false);
    }

    private static AppInstallationRepositoriesArgs makeArgs(AppInstallationRepositoriesArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        if (options != null && options.getUrn().isPresent()) {
            return null;
        }
        return args == null ? AppInstallationRepositoriesArgs.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 AppInstallationRepositories get(java.lang.String name, Output id, @Nullable AppInstallationRepositoriesState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new AppInstallationRepositories(name, id, state, options);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy