com.pulumi.github.ActionsRepositoryAccessLevel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of github Show documentation
Show all versions of github Show documentation
A Pulumi package for creating and managing github cloud resources.
// *** 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.ActionsRepositoryAccessLevelArgs;
import com.pulumi.github.Utilities;
import com.pulumi.github.inputs.ActionsRepositoryAccessLevelState;
import java.lang.String;
import javax.annotation.Nullable;
/**
* This resource allows you to set the access level of a non-public repositories actions and reusable workflows for use in other repositories.
* You must have admin access to a repository to use this resource.
*
* ## Example Usage
* ```java
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.github.Repository;
* import com.pulumi.github.RepositoryArgs;
* import com.pulumi.github.ActionsRepositoryAccessLevel;
* import com.pulumi.github.ActionsRepositoryAccessLevelArgs;
* 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 example = new Repository("example", RepositoryArgs.builder()
* .visibility("private")
* .build());
*
* var test = new ActionsRepositoryAccessLevel("test", ActionsRepositoryAccessLevelArgs.builder()
* .accessLevel("user")
* .repository(example.name())
* .build());
*
* }
* }
* ```
*
* ## Import
*
* This resource can be imported using the name of the GitHub repository:
*
* ```sh
* $ pulumi import github:index/actionsRepositoryAccessLevel:ActionsRepositoryAccessLevel test <github_repository_name>
* ```
*
*/
@ResourceType(type="github:index/actionsRepositoryAccessLevel:ActionsRepositoryAccessLevel")
public class ActionsRepositoryAccessLevel extends com.pulumi.resources.CustomResource {
/**
* Where the actions or reusable workflows of the repository may be used. Possible values are `none`, `user`, `organization`, or `enterprise`.
*
*/
@Export(name="accessLevel", refs={String.class}, tree="[0]")
private Output accessLevel;
/**
* @return Where the actions or reusable workflows of the repository may be used. Possible values are `none`, `user`, `organization`, or `enterprise`.
*
*/
public Output accessLevel() {
return this.accessLevel;
}
/**
* The GitHub repository
*
*/
@Export(name="repository", refs={String.class}, tree="[0]")
private Output repository;
/**
* @return The GitHub repository
*
*/
public Output repository() {
return this.repository;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public ActionsRepositoryAccessLevel(String name) {
this(name, ActionsRepositoryAccessLevelArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public ActionsRepositoryAccessLevel(String name, ActionsRepositoryAccessLevelArgs 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 ActionsRepositoryAccessLevel(String name, ActionsRepositoryAccessLevelArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("github:index/actionsRepositoryAccessLevel:ActionsRepositoryAccessLevel", name, args == null ? ActionsRepositoryAccessLevelArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
}
private ActionsRepositoryAccessLevel(String name, Output id, @Nullable ActionsRepositoryAccessLevelState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("github:index/actionsRepositoryAccessLevel:ActionsRepositoryAccessLevel", 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 ActionsRepositoryAccessLevel get(String name, Output id, @Nullable ActionsRepositoryAccessLevelState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new ActionsRepositoryAccessLevel(name, id, state, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy