Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

Opsgenie

v1.1.0 published on Thursday, Nov 11, 2021 by Pulumi

CustomRole

Manages custom user roles within Opsgenie.

Example Usage

using Pulumi;
using Opsgenie = Pulumi.Opsgenie;

class MyStack : Stack
{
    public MyStack()
    {
        var test = new Opsgenie.CustomRole("test", new Opsgenie.CustomRoleArgs
        {
            DisallowedRights = 
            {
                "profile-edit",
                "contacts-edit",
            },
            ExtendedRole = "user",
            GrantedRights = 
            {
                "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
	})
}
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",
});

Create a 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)
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.

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 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

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 str
The provider-assigned unique ID for this managed resource.

Look up an 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)
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.

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 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.

Package Details

Repository
https://github.com/pulumi/pulumi-opsgenie
License
Apache-2.0
Notes
This Pulumi package is based on the opsgenie Terraform Provider.