github.ActionsRepositoryAccessLevel
Explore with Pulumi AI
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
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = new Github.Repository("example", new()
{
Visibility = "private",
});
var test = new Github.ActionsRepositoryAccessLevel("test", new()
{
AccessLevel = "user",
Repository = example.Name,
});
});
package main
import (
"github.com/pulumi/pulumi-github/sdk/v5/go/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := github.NewRepository(ctx, "example", &github.RepositoryArgs{
Visibility: pulumi.String("private"),
})
if err != nil {
return err
}
_, err = github.NewActionsRepositoryAccessLevel(ctx, "test", &github.ActionsRepositoryAccessLevelArgs{
AccessLevel: pulumi.String("user"),
Repository: example.Name,
})
if err != nil {
return err
}
return nil
})
}
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 pulumi
import pulumi_github as github
example = github.Repository("example", visibility="private")
test = github.ActionsRepositoryAccessLevel("test",
access_level="user",
repository=example.name)
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = new github.Repository("example", {visibility: "private"});
const test = new github.ActionsRepositoryAccessLevel("test", {
accessLevel: "user",
repository: example.name,
});
resources:
example:
type: github:Repository
properties:
visibility: private
test:
type: github:ActionsRepositoryAccessLevel
properties:
accessLevel: user
repository: ${example.name}
Create ActionsRepositoryAccessLevel Resource
new ActionsRepositoryAccessLevel(name: string, args: ActionsRepositoryAccessLevelArgs, opts?: CustomResourceOptions);
@overload
def ActionsRepositoryAccessLevel(resource_name: str,
opts: Optional[ResourceOptions] = None,
access_level: Optional[str] = None,
repository: Optional[str] = None)
@overload
def ActionsRepositoryAccessLevel(resource_name: str,
args: ActionsRepositoryAccessLevelArgs,
opts: Optional[ResourceOptions] = None)
func NewActionsRepositoryAccessLevel(ctx *Context, name string, args ActionsRepositoryAccessLevelArgs, opts ...ResourceOption) (*ActionsRepositoryAccessLevel, error)
public ActionsRepositoryAccessLevel(string name, ActionsRepositoryAccessLevelArgs args, CustomResourceOptions? opts = null)
public ActionsRepositoryAccessLevel(String name, ActionsRepositoryAccessLevelArgs args)
public ActionsRepositoryAccessLevel(String name, ActionsRepositoryAccessLevelArgs args, CustomResourceOptions options)
type: github:ActionsRepositoryAccessLevel
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ActionsRepositoryAccessLevelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ActionsRepositoryAccessLevelArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ActionsRepositoryAccessLevelArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ActionsRepositoryAccessLevelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ActionsRepositoryAccessLevelArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ActionsRepositoryAccessLevel Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ActionsRepositoryAccessLevel resource accepts the following input properties:
- Access
Level string Where the actions or reusable workflows of the repository may be used. Possible values are
none
,user
,organization
, orenterprise
.- Repository string
The GitHub repository
- Access
Level string Where the actions or reusable workflows of the repository may be used. Possible values are
none
,user
,organization
, orenterprise
.- Repository string
The GitHub repository
- access
Level String Where the actions or reusable workflows of the repository may be used. Possible values are
none
,user
,organization
, orenterprise
.- repository String
The GitHub repository
- access
Level string Where the actions or reusable workflows of the repository may be used. Possible values are
none
,user
,organization
, orenterprise
.- repository string
The GitHub repository
- access_
level str Where the actions or reusable workflows of the repository may be used. Possible values are
none
,user
,organization
, orenterprise
.- repository str
The GitHub repository
- access
Level String Where the actions or reusable workflows of the repository may be used. Possible values are
none
,user
,organization
, orenterprise
.- repository String
The GitHub repository
Outputs
All input properties are implicitly available as output properties. Additionally, the ActionsRepositoryAccessLevel resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing ActionsRepositoryAccessLevel Resource
Get an existing ActionsRepositoryAccessLevel resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ActionsRepositoryAccessLevelState, opts?: CustomResourceOptions): ActionsRepositoryAccessLevel
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_level: Optional[str] = None,
repository: Optional[str] = None) -> ActionsRepositoryAccessLevel
func GetActionsRepositoryAccessLevel(ctx *Context, name string, id IDInput, state *ActionsRepositoryAccessLevelState, opts ...ResourceOption) (*ActionsRepositoryAccessLevel, error)
public static ActionsRepositoryAccessLevel Get(string name, Input<string> id, ActionsRepositoryAccessLevelState? state, CustomResourceOptions? opts = null)
public static ActionsRepositoryAccessLevel get(String name, Output<String> id, ActionsRepositoryAccessLevelState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Access
Level string Where the actions or reusable workflows of the repository may be used. Possible values are
none
,user
,organization
, orenterprise
.- Repository string
The GitHub repository
- Access
Level string Where the actions or reusable workflows of the repository may be used. Possible values are
none
,user
,organization
, orenterprise
.- Repository string
The GitHub repository
- access
Level String Where the actions or reusable workflows of the repository may be used. Possible values are
none
,user
,organization
, orenterprise
.- repository String
The GitHub repository
- access
Level string Where the actions or reusable workflows of the repository may be used. Possible values are
none
,user
,organization
, orenterprise
.- repository string
The GitHub repository
- access_
level str Where the actions or reusable workflows of the repository may be used. Possible values are
none
,user
,organization
, orenterprise
.- repository str
The GitHub repository
- access
Level String Where the actions or reusable workflows of the repository may be used. Possible values are
none
,user
,organization
, orenterprise
.- repository String
The GitHub repository
Import
This resource can be imported using the name of the GitHub repository
$ pulumi import github:index/actionsRepositoryAccessLevel:ActionsRepositoryAccessLevel test <github_repository_name>
Package Details
- Repository
- GitHub pulumi/pulumi-github
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
github
Terraform Provider.