1. Packages
  2. Zenduty Provider
  3. API Docs
  4. AccountRole
zenduty 1.0.4 published on Wednesday, Apr 2, 2025 by zenduty

zenduty.AccountRole

Explore with Pulumi AI

Provides a Zenduty CustomRole Resource. This allows CustomRole(rbac) to be created, updated, deleted.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as zenduty from "@pulumi/zenduty";

const sre = new zenduty.AccountRole("sre", {
    description: "view all incidents in account",
    permissions: ["incident_read"],
});
Copy
import pulumi
import pulumi_zenduty as zenduty

sre = zenduty.AccountRole("sre",
    description="view all incidents in account",
    permissions=["incident_read"])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/zenduty/zenduty"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := zenduty.NewAccountRole(ctx, "sre", &zenduty.AccountRoleArgs{
			Description: pulumi.String("view all incidents in account"),
			Permissions: pulumi.StringArray{
				pulumi.String("incident_read"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zenduty = Pulumi.Zenduty;

return await Deployment.RunAsync(() => 
{
    var sre = new Zenduty.AccountRole("sre", new()
    {
        Description = "view all incidents in account",
        Permissions = new[]
        {
            "incident_read",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zenduty.AccountRole;
import com.pulumi.zenduty.AccountRoleArgs;
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 sre = new AccountRole("sre", AccountRoleArgs.builder()
            .description("view all incidents in account")
            .permissions("incident_read")
            .build());

    }
}
Copy
resources:
  sre:
    type: zenduty:AccountRole
    properties:
      description: view all incidents in account
      permissions:
        - incident_read
Copy

Create AccountRole Resource

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

Constructor syntax

new AccountRole(name: string, args: AccountRoleArgs, opts?: CustomResourceOptions);
@overload
def AccountRole(resource_name: str,
                args: AccountRoleArgs,
                opts: Optional[ResourceOptions] = None)

@overload
def AccountRole(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                description: Optional[str] = None,
                permissions: Optional[Sequence[str]] = None,
                account_role_id: Optional[str] = None,
                name: Optional[str] = None)
func NewAccountRole(ctx *Context, name string, args AccountRoleArgs, opts ...ResourceOption) (*AccountRole, error)
public AccountRole(string name, AccountRoleArgs args, CustomResourceOptions? opts = null)
public AccountRole(String name, AccountRoleArgs args)
public AccountRole(String name, AccountRoleArgs args, CustomResourceOptions options)
type: zenduty:AccountRole
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AccountRoleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. AccountRoleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. AccountRoleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AccountRoleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AccountRoleArgs
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 accountRoleResource = new Zenduty.AccountRole("accountRoleResource", new()
{
    Description = "string",
    Permissions = new[]
    {
        "string",
    },
    AccountRoleId = "string",
    Name = "string",
});
Copy
example, err := zenduty.NewAccountRole(ctx, "accountRoleResource", &zenduty.AccountRoleArgs{
Description: pulumi.String("string"),
Permissions: pulumi.StringArray{
pulumi.String("string"),
},
AccountRoleId: pulumi.String("string"),
Name: pulumi.String("string"),
})
Copy
var accountRoleResource = new AccountRole("accountRoleResource", AccountRoleArgs.builder()
    .description("string")
    .permissions("string")
    .accountRoleId("string")
    .name("string")
    .build());
Copy
account_role_resource = zenduty.AccountRole("accountRoleResource",
    description="string",
    permissions=["string"],
    account_role_id="string",
    name="string")
Copy
const accountRoleResource = new zenduty.AccountRole("accountRoleResource", {
    description: "string",
    permissions: ["string"],
    accountRoleId: "string",
    name: "string",
});
Copy
type: zenduty:AccountRole
properties:
    accountRoleId: string
    description: string
    name: string
    permissions:
        - string
Copy

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

Description This property is required. string
Permissions This property is required. List<string>
List of permissions this role is granted
AccountRoleId string
The UniqueID of the Zenduty Account Role.
Name string
Name of the CustomRoke
Description This property is required. string
Permissions This property is required. []string
List of permissions this role is granted
AccountRoleId string
The UniqueID of the Zenduty Account Role.
Name string
Name of the CustomRoke
description This property is required. String
permissions This property is required. List<String>
List of permissions this role is granted
accountRoleId String
The UniqueID of the Zenduty Account Role.
name String
Name of the CustomRoke
description This property is required. string
permissions This property is required. string[]
List of permissions this role is granted
accountRoleId string
The UniqueID of the Zenduty Account Role.
name string
Name of the CustomRoke
description This property is required. str
permissions This property is required. Sequence[str]
List of permissions this role is granted
account_role_id str
The UniqueID of the Zenduty Account Role.
name str
Name of the CustomRoke
description This property is required. String
permissions This property is required. List<String>
List of permissions this role is granted
accountRoleId String
The UniqueID of the Zenduty Account Role.
name String
Name of the CustomRoke

Outputs

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

Get an existing AccountRole 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?: AccountRoleState, opts?: CustomResourceOptions): AccountRole
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_role_id: Optional[str] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        permissions: Optional[Sequence[str]] = None) -> AccountRole
func GetAccountRole(ctx *Context, name string, id IDInput, state *AccountRoleState, opts ...ResourceOption) (*AccountRole, error)
public static AccountRole Get(string name, Input<string> id, AccountRoleState? state, CustomResourceOptions? opts = null)
public static AccountRole get(String name, Output<String> id, AccountRoleState state, CustomResourceOptions options)
resources:  _:    type: zenduty:AccountRole    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AccountRoleId string
The UniqueID of the Zenduty Account Role.
Description string
Name string
Name of the CustomRoke
Permissions List<string>
List of permissions this role is granted
AccountRoleId string
The UniqueID of the Zenduty Account Role.
Description string
Name string
Name of the CustomRoke
Permissions []string
List of permissions this role is granted
accountRoleId String
The UniqueID of the Zenduty Account Role.
description String
name String
Name of the CustomRoke
permissions List<String>
List of permissions this role is granted
accountRoleId string
The UniqueID of the Zenduty Account Role.
description string
name string
Name of the CustomRoke
permissions string[]
List of permissions this role is granted
account_role_id str
The UniqueID of the Zenduty Account Role.
description str
name str
Name of the CustomRoke
permissions Sequence[str]
List of permissions this role is granted
accountRoleId String
The UniqueID of the Zenduty Account Role.
description String
name String
Name of the CustomRoke
permissions List<String>
List of permissions this role is granted

Package Details

Repository
zenduty zenduty/terraform-provider-zenduty
License
Notes
This Pulumi package is based on the zenduty Terraform Provider.