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

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

There is a newer version: 6.4.0-alpha.1731735876
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.ActionsOrganizationSecretRepositoriesArgs;
import com.pulumi.github.Utilities;
import com.pulumi.github.inputs.ActionsOrganizationSecretRepositoriesState;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import javax.annotation.Nullable;

/**
 * This resource allows you to manage repository allow list for existing GitHub Actions secrets within your GitHub organization.
 * You must have write access to an organization secret to use this resource.
 * 
 * This resource is only applicable when `visibility` of the existing organization secret has been set to `selected`.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.github.GithubFunctions;
 * import com.pulumi.github.inputs.GetRepositoryArgs;
 * import com.pulumi.github.ActionsOrganizationSecretRepositories;
 * import com.pulumi.github.ActionsOrganizationSecretRepositoriesArgs;
 * 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) {
 *         final var repo = GithubFunctions.getRepository(GetRepositoryArgs.builder()
 *             .fullName("my-org/repo")
 *             .build());
 * 
 *         var orgSecretRepos = new ActionsOrganizationSecretRepositories("orgSecretRepos", ActionsOrganizationSecretRepositoriesArgs.builder()
 *             .secretName("existing_secret_name")
 *             .selectedRepositoryIds(repo.applyValue(getRepositoryResult -> getRepositoryResult.repoId()))
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * This resource can be imported using an ID made up of the secret name: * * ```sh * $ pulumi import github:index/actionsOrganizationSecretRepositories:ActionsOrganizationSecretRepositories test_secret_repos test_secret_name * ``` * */ @ResourceType(type="github:index/actionsOrganizationSecretRepositories:ActionsOrganizationSecretRepositories") public class ActionsOrganizationSecretRepositories extends com.pulumi.resources.CustomResource { /** * Name of the existing secret * */ @Export(name="secretName", refs={String.class}, tree="[0]") private Output secretName; /** * @return Name of the existing secret * */ public Output secretName() { return this.secretName; } /** * An array of repository ids that can access the organization secret. * */ @Export(name="selectedRepositoryIds", refs={List.class,Integer.class}, tree="[0,1]") private Output> selectedRepositoryIds; /** * @return An array of repository ids that can access the organization secret. * */ public Output> selectedRepositoryIds() { return this.selectedRepositoryIds; } /** * * @param name The _unique_ name of the resulting resource. */ public ActionsOrganizationSecretRepositories(java.lang.String name) { this(name, ActionsOrganizationSecretRepositoriesArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ActionsOrganizationSecretRepositories(java.lang.String name, ActionsOrganizationSecretRepositoriesArgs 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 ActionsOrganizationSecretRepositories(java.lang.String name, ActionsOrganizationSecretRepositoriesArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("github:index/actionsOrganizationSecretRepositories:ActionsOrganizationSecretRepositories", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ActionsOrganizationSecretRepositories(java.lang.String name, Output id, @Nullable ActionsOrganizationSecretRepositoriesState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("github:index/actionsOrganizationSecretRepositories:ActionsOrganizationSecretRepositories", name, state, makeResourceOptions(options, id), false); } private static ActionsOrganizationSecretRepositoriesArgs makeArgs(ActionsOrganizationSecretRepositoriesArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ActionsOrganizationSecretRepositoriesArgs.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 ActionsOrganizationSecretRepositories get(java.lang.String name, Output id, @Nullable ActionsOrganizationSecretRepositoriesState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ActionsOrganizationSecretRepositories(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy