1. Packages
  2. Github Provider
  3. API Docs
  4. ActionsRepositoryAccessLevel
GitHub v6.4.0 published on Thursday, Nov 21, 2024 by Pulumi

github.ActionsRepositoryAccessLevel

Explore with Pulumi AI

github logo
GitHub v6.4.0 published on Thursday, Nov 21, 2024 by Pulumi

    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

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const example = new github.Repository("example", {
        name: "my-repository",
        visibility: "private",
    });
    const test = new github.ActionsRepositoryAccessLevel("test", {
        accessLevel: "user",
        repository: example.name,
    });
    
    import pulumi
    import pulumi_github as github
    
    example = github.Repository("example",
        name="my-repository",
        visibility="private")
    test = github.ActionsRepositoryAccessLevel("test",
        access_level="user",
        repository=example.name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-github/sdk/v6/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{
    			Name:       pulumi.String("my-repository"),
    			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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Github = Pulumi.Github;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Github.Repository("example", new()
        {
            Name = "my-repository",
            Visibility = "private",
        });
    
        var test = new Github.ActionsRepositoryAccessLevel("test", new()
        {
            AccessLevel = "user",
            Repository = example.Name,
        });
    
    });
    
    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()
                .name("my-repository")
                .visibility("private")
                .build());
    
            var test = new ActionsRepositoryAccessLevel("test", ActionsRepositoryAccessLevelArgs.builder()
                .accessLevel("user")
                .repository(example.name())
                .build());
    
        }
    }
    
    resources:
      example:
        type: github:Repository
        properties:
          name: my-repository
          visibility: private
      test:
        type: github:ActionsRepositoryAccessLevel
        properties:
          accessLevel: user
          repository: ${example.name}
    

    Create ActionsRepositoryAccessLevel Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ActionsRepositoryAccessLevel(name: string, args: ActionsRepositoryAccessLevelArgs, opts?: CustomResourceOptions);
    @overload
    def ActionsRepositoryAccessLevel(resource_name: str,
                                     args: ActionsRepositoryAccessLevelArgs,
                                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def ActionsRepositoryAccessLevel(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     access_level: Optional[str] = None,
                                     repository: Optional[str] = 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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var actionsRepositoryAccessLevelResource = new Github.ActionsRepositoryAccessLevel("actionsRepositoryAccessLevelResource", new()
    {
        AccessLevel = "string",
        Repository = "string",
    });
    
    example, err := github.NewActionsRepositoryAccessLevel(ctx, "actionsRepositoryAccessLevelResource", &github.ActionsRepositoryAccessLevelArgs{
    	AccessLevel: pulumi.String("string"),
    	Repository:  pulumi.String("string"),
    })
    
    var actionsRepositoryAccessLevelResource = new ActionsRepositoryAccessLevel("actionsRepositoryAccessLevelResource", ActionsRepositoryAccessLevelArgs.builder()
        .accessLevel("string")
        .repository("string")
        .build());
    
    actions_repository_access_level_resource = github.ActionsRepositoryAccessLevel("actionsRepositoryAccessLevelResource",
        access_level="string",
        repository="string")
    
    const actionsRepositoryAccessLevelResource = new github.ActionsRepositoryAccessLevel("actionsRepositoryAccessLevelResource", {
        accessLevel: "string",
        repository: "string",
    });
    
    type: github:ActionsRepositoryAccessLevel
    properties:
        accessLevel: string
        repository: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ActionsRepositoryAccessLevel resource accepts the following input properties:

    AccessLevel string
    Where the actions or reusable workflows of the repository may be used. Possible values are none, user, organization, or enterprise.
    Repository string
    The GitHub repository
    AccessLevel string
    Where the actions or reusable workflows of the repository may be used. Possible values are none, user, organization, or enterprise.
    Repository string
    The GitHub repository
    accessLevel String
    Where the actions or reusable workflows of the repository may be used. Possible values are none, user, organization, or enterprise.
    repository String
    The GitHub repository
    accessLevel string
    Where the actions or reusable workflows of the repository may be used. Possible values are none, user, organization, or enterprise.
    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, or enterprise.
    repository str
    The GitHub repository
    accessLevel String
    Where the actions or reusable workflows of the repository may be used. Possible values are none, user, organization, or enterprise.
    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.
    The following state arguments are supported:
    AccessLevel string
    Where the actions or reusable workflows of the repository may be used. Possible values are none, user, organization, or enterprise.
    Repository string
    The GitHub repository
    AccessLevel string
    Where the actions or reusable workflows of the repository may be used. Possible values are none, user, organization, or enterprise.
    Repository string
    The GitHub repository
    accessLevel String
    Where the actions or reusable workflows of the repository may be used. Possible values are none, user, organization, or enterprise.
    repository String
    The GitHub repository
    accessLevel string
    Where the actions or reusable workflows of the repository may be used. Possible values are none, user, organization, or enterprise.
    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, or enterprise.
    repository str
    The GitHub repository
    accessLevel String
    Where the actions or reusable workflows of the repository may be used. Possible values are none, user, organization, or enterprise.
    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 my-repository
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    GitHub pulumi/pulumi-github
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the github Terraform Provider.
    github logo
    GitHub v6.4.0 published on Thursday, Nov 21, 2024 by Pulumi