github.OrganizationRoleUser
Manage an association between an organization role and a user.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = new github.OrganizationRoleUser("example", {
roleId: 1234,
login: "example-user",
});
import pulumi
import pulumi_github as github
example = github.OrganizationRoleUser("example",
role_id=1234,
login="example-user")
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.NewOrganizationRoleUser(ctx, "example", &github.OrganizationRoleUserArgs{
RoleId: pulumi.Int(1234),
Login: pulumi.String("example-user"),
})
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.OrganizationRoleUser("example", new()
{
RoleId = 1234,
Login = "example-user",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.OrganizationRoleUser;
import com.pulumi.github.OrganizationRoleUserArgs;
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 OrganizationRoleUser("example", OrganizationRoleUserArgs.builder()
.roleId(1234)
.login("example-user")
.build());
}
}
resources:
example:
type: github:OrganizationRoleUser
properties:
roleId: 1234
login: example-user
Create OrganizationRoleUser Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OrganizationRoleUser(name: string, args: OrganizationRoleUserArgs, opts?: CustomResourceOptions);@overload
def OrganizationRoleUser(resource_name: str,
args: OrganizationRoleUserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def OrganizationRoleUser(resource_name: str,
opts: Optional[ResourceOptions] = None,
login: Optional[str] = None,
role_id: Optional[int] = None)func NewOrganizationRoleUser(ctx *Context, name string, args OrganizationRoleUserArgs, opts ...ResourceOption) (*OrganizationRoleUser, error)public OrganizationRoleUser(string name, OrganizationRoleUserArgs args, CustomResourceOptions? opts = null)
public OrganizationRoleUser(String name, OrganizationRoleUserArgs args)
public OrganizationRoleUser(String name, OrganizationRoleUserArgs args, CustomResourceOptions options)
type: github:OrganizationRoleUser
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 OrganizationRoleUserArgs
- 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 OrganizationRoleUserArgs
- 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 OrganizationRoleUserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OrganizationRoleUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OrganizationRoleUserArgs
- 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 organizationRoleUserResource = new Github.OrganizationRoleUser("organizationRoleUserResource", new()
{
Login = "string",
RoleId = 0,
});
example, err := github.NewOrganizationRoleUser(ctx, "organizationRoleUserResource", &github.OrganizationRoleUserArgs{
Login: pulumi.String("string"),
RoleId: pulumi.Int(0),
})
var organizationRoleUserResource = new OrganizationRoleUser("organizationRoleUserResource", OrganizationRoleUserArgs.builder()
.login("string")
.roleId(0)
.build());
organization_role_user_resource = github.OrganizationRoleUser("organizationRoleUserResource",
login="string",
role_id=0)
const organizationRoleUserResource = new github.OrganizationRoleUser("organizationRoleUserResource", {
login: "string",
roleId: 0,
});
type: github:OrganizationRoleUser
properties:
login: string
roleId: 0
OrganizationRoleUser 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 OrganizationRoleUser resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the OrganizationRoleUser 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 OrganizationRoleUser Resource
Get an existing OrganizationRoleUser 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?: OrganizationRoleUserState, opts?: CustomResourceOptions): OrganizationRoleUser@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
login: Optional[str] = None,
role_id: Optional[int] = None) -> OrganizationRoleUserfunc GetOrganizationRoleUser(ctx *Context, name string, id IDInput, state *OrganizationRoleUserState, opts ...ResourceOption) (*OrganizationRoleUser, error)public static OrganizationRoleUser Get(string name, Input<string> id, OrganizationRoleUserState? state, CustomResourceOptions? opts = null)public static OrganizationRoleUser get(String name, Output<String> id, OrganizationRoleUserState state, CustomResourceOptions options)resources: _: type: github:OrganizationRoleUser 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.
Import
An organization role user association can be imported using the role ID and the user login separated by a :.
$ pulumi import github:index/organizationRoleUser:OrganizationRoleUser example "1234:example-user"
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.
