github.OrganizationRepositoryRole
Manage a custom organization repository role.
Note: Custom organization repository roles are currently only available in GitHub Enterprise Cloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = new github.OrganizationRepositoryRole("example", {
name: "example",
baseRole: "read",
permissions: [
"add_assignee",
"add_label",
],
});
import pulumi
import pulumi_github as github
example = github.OrganizationRepositoryRole("example",
name="example",
base_role="read",
permissions=[
"add_assignee",
"add_label",
])
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 {
_, err := github.NewOrganizationRepositoryRole(ctx, "example", &github.OrganizationRepositoryRoleArgs{
Name: pulumi.String("example"),
BaseRole: pulumi.String("read"),
Permissions: pulumi.StringArray{
pulumi.String("add_assignee"),
pulumi.String("add_label"),
},
})
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.OrganizationRepositoryRole("example", new()
{
Name = "example",
BaseRole = "read",
Permissions = new[]
{
"add_assignee",
"add_label",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.OrganizationRepositoryRole;
import com.pulumi.github.OrganizationRepositoryRoleArgs;
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 OrganizationRepositoryRole("example", OrganizationRepositoryRoleArgs.builder()
.name("example")
.baseRole("read")
.permissions(
"add_assignee",
"add_label")
.build());
}
}
resources:
example:
type: github:OrganizationRepositoryRole
properties:
name: example
baseRole: read
permissions:
- add_assignee
- add_label
Create OrganizationRepositoryRole Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OrganizationRepositoryRole(name: string, args: OrganizationRepositoryRoleArgs, opts?: CustomResourceOptions);@overload
def OrganizationRepositoryRole(resource_name: str,
args: OrganizationRepositoryRoleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def OrganizationRepositoryRole(resource_name: str,
opts: Optional[ResourceOptions] = None,
base_role: Optional[str] = None,
permissions: Optional[Sequence[str]] = None,
description: Optional[str] = None,
name: Optional[str] = None)func NewOrganizationRepositoryRole(ctx *Context, name string, args OrganizationRepositoryRoleArgs, opts ...ResourceOption) (*OrganizationRepositoryRole, error)public OrganizationRepositoryRole(string name, OrganizationRepositoryRoleArgs args, CustomResourceOptions? opts = null)
public OrganizationRepositoryRole(String name, OrganizationRepositoryRoleArgs args)
public OrganizationRepositoryRole(String name, OrganizationRepositoryRoleArgs args, CustomResourceOptions options)
type: github:OrganizationRepositoryRole
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 OrganizationRepositoryRoleArgs
- 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 OrganizationRepositoryRoleArgs
- 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 OrganizationRepositoryRoleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OrganizationRepositoryRoleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OrganizationRepositoryRoleArgs
- 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 organizationRepositoryRoleResource = new Github.OrganizationRepositoryRole("organizationRepositoryRoleResource", new()
{
BaseRole = "string",
Permissions = new[]
{
"string",
},
Description = "string",
Name = "string",
});
example, err := github.NewOrganizationRepositoryRole(ctx, "organizationRepositoryRoleResource", &github.OrganizationRepositoryRoleArgs{
BaseRole: pulumi.String("string"),
Permissions: pulumi.StringArray{
pulumi.String("string"),
},
Description: pulumi.String("string"),
Name: pulumi.String("string"),
})
var organizationRepositoryRoleResource = new OrganizationRepositoryRole("organizationRepositoryRoleResource", OrganizationRepositoryRoleArgs.builder()
.baseRole("string")
.permissions("string")
.description("string")
.name("string")
.build());
organization_repository_role_resource = github.OrganizationRepositoryRole("organizationRepositoryRoleResource",
base_role="string",
permissions=["string"],
description="string",
name="string")
const organizationRepositoryRoleResource = new github.OrganizationRepositoryRole("organizationRepositoryRoleResource", {
baseRole: "string",
permissions: ["string"],
description: "string",
name: "string",
});
type: github:OrganizationRepositoryRole
properties:
baseRole: string
description: string
name: string
permissions:
- string
OrganizationRepositoryRole 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 OrganizationRepositoryRole resource accepts the following input properties:
- Base
Role string - The system role from which this role inherits permissions.
- Permissions List<string>
- The permissions included in this role.
- Description string
- The description of the organization repository role.
- Name string
- The name of the organization repository role.
- Base
Role string - The system role from which this role inherits permissions.
- Permissions []string
- The permissions included in this role.
- Description string
- The description of the organization repository role.
- Name string
- The name of the organization repository role.
- base
Role String - The system role from which this role inherits permissions.
- permissions List<String>
- The permissions included in this role.
- description String
- The description of the organization repository role.
- name String
- The name of the organization repository role.
- base
Role string - The system role from which this role inherits permissions.
- permissions string[]
- The permissions included in this role.
- description string
- The description of the organization repository role.
- name string
- The name of the organization repository role.
- base_
role str - The system role from which this role inherits permissions.
- permissions Sequence[str]
- The permissions included in this role.
- description str
- The description of the organization repository role.
- name str
- The name of the organization repository role.
- base
Role String - The system role from which this role inherits permissions.
- permissions List<String>
- The permissions included in this role.
- description String
- The description of the organization repository role.
- name String
- The name of the organization repository role.
Outputs
All input properties are implicitly available as output properties. Additionally, the OrganizationRepositoryRole resource produces the following output properties:
Look up Existing OrganizationRepositoryRole Resource
Get an existing OrganizationRepositoryRole 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?: OrganizationRepositoryRoleState, opts?: CustomResourceOptions): OrganizationRepositoryRole@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
base_role: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
permissions: Optional[Sequence[str]] = None,
role_id: Optional[int] = None) -> OrganizationRepositoryRolefunc GetOrganizationRepositoryRole(ctx *Context, name string, id IDInput, state *OrganizationRepositoryRoleState, opts ...ResourceOption) (*OrganizationRepositoryRole, error)public static OrganizationRepositoryRole Get(string name, Input<string> id, OrganizationRepositoryRoleState? state, CustomResourceOptions? opts = null)public static OrganizationRepositoryRole get(String name, Output<String> id, OrganizationRepositoryRoleState state, CustomResourceOptions options)resources: _: type: github:OrganizationRepositoryRole get: id: ${id}- 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.
- Base
Role string - The system role from which this role inherits permissions.
- Description string
- The description of the organization repository role.
- Name string
- The name of the organization repository role.
- Permissions List<string>
- The permissions included in this role.
- Role
Id int - The ID of the organization repository role.
- Base
Role string - The system role from which this role inherits permissions.
- Description string
- The description of the organization repository role.
- Name string
- The name of the organization repository role.
- Permissions []string
- The permissions included in this role.
- Role
Id int - The ID of the organization repository role.
- base
Role String - The system role from which this role inherits permissions.
- description String
- The description of the organization repository role.
- name String
- The name of the organization repository role.
- permissions List<String>
- The permissions included in this role.
- role
Id Integer - The ID of the organization repository role.
- base
Role string - The system role from which this role inherits permissions.
- description string
- The description of the organization repository role.
- name string
- The name of the organization repository role.
- permissions string[]
- The permissions included in this role.
- role
Id number - The ID of the organization repository role.
- base_
role str - The system role from which this role inherits permissions.
- description str
- The description of the organization repository role.
- name str
- The name of the organization repository role.
- permissions Sequence[str]
- The permissions included in this role.
- role_
id int - The ID of the organization repository role.
- base
Role String - The system role from which this role inherits permissions.
- description String
- The description of the organization repository role.
- name String
- The name of the organization repository role.
- permissions List<String>
- The permissions included in this role.
- role
Id Number - The ID of the organization repository role.
Import
A custom organization repository role can be imported using its ID.
$ pulumi import github:index/organizationRepositoryRole:OrganizationRepositoryRole example 1234
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
githubTerraform Provider.
