1. Packages
  2. Opsgenie
  3. API Docs
  4. CustomRole
Opsgenie v1.3.6 published on Tuesday, Feb 27, 2024 by Pulumi

opsgenie.CustomRole

Explore with Pulumi AI

opsgenie logo
Opsgenie v1.3.6 published on Tuesday, Feb 27, 2024 by Pulumi

    Manages custom user roles within Opsgenie.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opsgenie = Pulumi.Opsgenie;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Opsgenie.CustomRole("test", new()
        {
            DisallowedRights = new[]
            {
                "profile-edit",
                "contacts-edit",
            },
            ExtendedRole = "user",
            GrantedRights = new[]
            {
                "alert-delete",
            },
            RoleName = "genierole",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-opsgenie/sdk/go/opsgenie"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opsgenie.NewCustomRole(ctx, "test", &opsgenie.CustomRoleArgs{
    			DisallowedRights: pulumi.StringArray{
    				pulumi.String("profile-edit"),
    				pulumi.String("contacts-edit"),
    			},
    			ExtendedRole: pulumi.String("user"),
    			GrantedRights: pulumi.StringArray{
    				pulumi.String("alert-delete"),
    			},
    			RoleName: pulumi.String("genierole"),
    		})
    		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.opsgenie.CustomRole;
    import com.pulumi.opsgenie.CustomRoleArgs;
    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 test = new CustomRole("test", CustomRoleArgs.builder()        
                .disallowedRights(            
                    "profile-edit",
                    "contacts-edit")
                .extendedRole("user")
                .grantedRights("alert-delete")
                .roleName("genierole")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_opsgenie as opsgenie
    
    test = opsgenie.CustomRole("test",
        disallowed_rights=[
            "profile-edit",
            "contacts-edit",
        ],
        extended_role="user",
        granted_rights=["alert-delete"],
        role_name="genierole")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as opsgenie from "@pulumi/opsgenie";
    
    const test = new opsgenie.CustomRole("test", {
        disallowedRights: [
            "profile-edit",
            "contacts-edit",
        ],
        extendedRole: "user",
        grantedRights: ["alert-delete"],
        roleName: "genierole",
    });
    
    resources:
      test:
        type: opsgenie:CustomRole
        properties:
          disallowedRights:
            - profile-edit
            - contacts-edit
          extendedRole: user
          grantedRights:
            - alert-delete
          roleName: genierole
    

    Create CustomRole Resource

    new CustomRole(name: string, args: CustomRoleArgs, opts?: CustomResourceOptions);
    @overload
    def CustomRole(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   disallowed_rights: Optional[Sequence[str]] = None,
                   extended_role: Optional[str] = None,
                   granted_rights: Optional[Sequence[str]] = None,
                   role_name: Optional[str] = None)
    @overload
    def CustomRole(resource_name: str,
                   args: CustomRoleArgs,
                   opts: Optional[ResourceOptions] = None)
    func NewCustomRole(ctx *Context, name string, args CustomRoleArgs, opts ...ResourceOption) (*CustomRole, error)
    public CustomRole(string name, CustomRoleArgs args, CustomResourceOptions? opts = null)
    public CustomRole(String name, CustomRoleArgs args)
    public CustomRole(String name, CustomRoleArgs args, CustomResourceOptions options)
    
    type: opsgenie:CustomRole
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args CustomRoleArgs
    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 CustomRoleArgs
    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 CustomRoleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CustomRoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CustomRoleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    CustomRole 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 CustomRole resource accepts the following input properties:

    RoleName string
    Name of the custom role.
    DisallowedRights List<string>
    The rights this role cannot have. For allowed values please refer User Right Prerequisites
    ExtendedRole string
    The role from which this role has been derived. Allowed Values: "user", "observer", "stakeholder".
    GrantedRights List<string>
    The rights granted to this role. For allowed values please refer User Right Prerequisites
    RoleName string
    Name of the custom role.
    DisallowedRights []string
    The rights this role cannot have. For allowed values please refer User Right Prerequisites
    ExtendedRole string
    The role from which this role has been derived. Allowed Values: "user", "observer", "stakeholder".
    GrantedRights []string
    The rights granted to this role. For allowed values please refer User Right Prerequisites
    roleName String
    Name of the custom role.
    disallowedRights List<String>
    The rights this role cannot have. For allowed values please refer User Right Prerequisites
    extendedRole String
    The role from which this role has been derived. Allowed Values: "user", "observer", "stakeholder".
    grantedRights List<String>
    The rights granted to this role. For allowed values please refer User Right Prerequisites
    roleName string
    Name of the custom role.
    disallowedRights string[]
    The rights this role cannot have. For allowed values please refer User Right Prerequisites
    extendedRole string
    The role from which this role has been derived. Allowed Values: "user", "observer", "stakeholder".
    grantedRights string[]
    The rights granted to this role. For allowed values please refer User Right Prerequisites
    role_name str
    Name of the custom role.
    disallowed_rights Sequence[str]
    The rights this role cannot have. For allowed values please refer User Right Prerequisites
    extended_role str
    The role from which this role has been derived. Allowed Values: "user", "observer", "stakeholder".
    granted_rights Sequence[str]
    The rights granted to this role. For allowed values please refer User Right Prerequisites
    roleName String
    Name of the custom role.
    disallowedRights List<String>
    The rights this role cannot have. For allowed values please refer User Right Prerequisites
    extendedRole String
    The role from which this role has been derived. Allowed Values: "user", "observer", "stakeholder".
    grantedRights List<String>
    The rights granted to this role. For allowed values please refer User Right Prerequisites

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CustomRole 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 CustomRole Resource

    Get an existing CustomRole 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?: CustomRoleState, opts?: CustomResourceOptions): CustomRole
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            disallowed_rights: Optional[Sequence[str]] = None,
            extended_role: Optional[str] = None,
            granted_rights: Optional[Sequence[str]] = None,
            role_name: Optional[str] = None) -> CustomRole
    func GetCustomRole(ctx *Context, name string, id IDInput, state *CustomRoleState, opts ...ResourceOption) (*CustomRole, error)
    public static CustomRole Get(string name, Input<string> id, CustomRoleState? state, CustomResourceOptions? opts = null)
    public static CustomRole get(String name, Output<String> id, CustomRoleState 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:
    DisallowedRights List<string>
    The rights this role cannot have. For allowed values please refer User Right Prerequisites
    ExtendedRole string
    The role from which this role has been derived. Allowed Values: "user", "observer", "stakeholder".
    GrantedRights List<string>
    The rights granted to this role. For allowed values please refer User Right Prerequisites
    RoleName string
    Name of the custom role.
    DisallowedRights []string
    The rights this role cannot have. For allowed values please refer User Right Prerequisites
    ExtendedRole string
    The role from which this role has been derived. Allowed Values: "user", "observer", "stakeholder".
    GrantedRights []string
    The rights granted to this role. For allowed values please refer User Right Prerequisites
    RoleName string
    Name of the custom role.
    disallowedRights List<String>
    The rights this role cannot have. For allowed values please refer User Right Prerequisites
    extendedRole String
    The role from which this role has been derived. Allowed Values: "user", "observer", "stakeholder".
    grantedRights List<String>
    The rights granted to this role. For allowed values please refer User Right Prerequisites
    roleName String
    Name of the custom role.
    disallowedRights string[]
    The rights this role cannot have. For allowed values please refer User Right Prerequisites
    extendedRole string
    The role from which this role has been derived. Allowed Values: "user", "observer", "stakeholder".
    grantedRights string[]
    The rights granted to this role. For allowed values please refer User Right Prerequisites
    roleName string
    Name of the custom role.
    disallowed_rights Sequence[str]
    The rights this role cannot have. For allowed values please refer User Right Prerequisites
    extended_role str
    The role from which this role has been derived. Allowed Values: "user", "observer", "stakeholder".
    granted_rights Sequence[str]
    The rights granted to this role. For allowed values please refer User Right Prerequisites
    role_name str
    Name of the custom role.
    disallowedRights List<String>
    The rights this role cannot have. For allowed values please refer User Right Prerequisites
    extendedRole String
    The role from which this role has been derived. Allowed Values: "user", "observer", "stakeholder".
    grantedRights List<String>
    The rights granted to this role. For allowed values please refer User Right Prerequisites
    roleName String
    Name of the custom role.

    Package Details

    Repository
    Opsgenie pulumi/pulumi-opsgenie
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the opsgenie Terraform Provider.
    opsgenie logo
    Opsgenie v1.3.6 published on Tuesday, Feb 27, 2024 by Pulumi