1. Registry
  2. Packages
  3. Zenduty Provider
  4. API Docs
  5. getAccountRole
Viewing docs for zenduty 2.0.0
published on Friday, Aug 14, 2026 by zenduty
Viewing docs for zenduty 2.0.0
published on Friday, Aug 14, 2026 by zenduty

    zenduty.AccountRole lists the custom account roles of the account.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as zenduty from "@pulumi/zenduty";
    
    const accountRoles = zenduty.getAccountRole({});
    export const roleNames = accountRoles.then(accountRoles => accountRoles.roles.map(__item => __item.name));
    
    import pulumi
    import pulumi_zenduty as zenduty
    
    account_roles = zenduty.get_account_role()
    pulumi.export("roleNames", [__item.name for __item in account_roles.roles])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/zenduty/v2/zenduty"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    accountRoles, err := zenduty.LookupAccountRole(ctx, &zenduty.LookupAccountRoleArgs{
    }, nil);
    if err != nil {
    return err
    }
    ctx.Export("roleNames", pulumi.StringArray(%!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:3,11-37)))
    return nil
    })
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zenduty = Pulumi.Zenduty;
    
    return await Deployment.RunAsync(() => 
    {
        var accountRoles = Zenduty.GetAccountRole.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["roleNames"] = accountRoles.Apply(getAccountRoleResult => getAccountRoleResult.Roles).Select(__item => __item.Name).ToList(),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.zenduty.ZendutyFunctions;
    import com.pulumi.zenduty.inputs.GetAccountRoleArgs;
    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) {
            final var accountRoles = ZendutyFunctions.getAccountRole(GetAccountRoleArgs.builder()
                .build());
    
            ctx.export("roleNames", accountRoles.roles().stream().map(element -> element.name()).collect(toList()));
        }
    }
    
    Example coming soon!
    
    Example coming soon!
    

    Using getAccountRole

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getAccountRole(args: GetAccountRoleArgs, opts?: InvokeOptions): Promise<GetAccountRoleResult>
    function getAccountRoleOutput(args: GetAccountRoleOutputArgs, opts?: InvokeOutputOptions): Output<GetAccountRoleResult>
    def get_account_role(id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetAccountRoleResult
    def get_account_role_output(id: pulumi.Input[Optional[str]] = None,
                         opts: Optional[InvokeOutputOptions] = None) -> Output[GetAccountRoleResult]
    func LookupAccountRole(ctx *Context, args *LookupAccountRoleArgs, opts ...InvokeOption) (*LookupAccountRoleResult, error)
    func LookupAccountRoleOutput(ctx *Context, args *LookupAccountRoleOutputArgs, opts ...InvokeOption) LookupAccountRoleResultOutput

    > Note: This function is named LookupAccountRole in the Go SDK.

    public static class GetAccountRole 
    {
        public static Task<GetAccountRoleResult> InvokeAsync(GetAccountRoleArgs args, InvokeOptions? opts = null)
        public static Output<GetAccountRoleResult> Invoke(GetAccountRoleInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetAccountRoleResult> Invoke(GetAccountRoleInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetAccountRoleResult> getAccountRole(GetAccountRoleArgs args, InvokeOptions options)
    public static Output<GetAccountRoleResult> getAccountRole(GetAccountRoleArgs args, InvokeOptions options)
    public static Output<GetAccountRoleResult> getAccountRole(GetAccountRoleArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: zenduty:index/getAccountRole:getAccountRole
      arguments:
        # arguments dictionary
    data "zenduty_get_account_role" "name" {
        # arguments
    }

    The following arguments are supported:

    Id string
    Id string
    id string
    id String
    id string
    id str
    id String

    getAccountRole Result

    The following output properties are available:

    Id string
    Roles List<GetAccountRoleRole>
    The list of custom account roles, each with:
    Id string
    Roles []GetAccountRoleRole
    The list of custom account roles, each with:
    id string
    roles list(object)
    The list of custom account roles, each with:
    id String
    roles List<GetAccountRoleRole>
    The list of custom account roles, each with:
    id string
    roles GetAccountRoleRole[]
    The list of custom account roles, each with:
    id str
    roles Sequence[GetAccountRoleRole]
    The list of custom account roles, each with:
    id String
    roles List<Property Map>
    The list of custom account roles, each with:

    Supporting Types

    GetAccountRoleRole

    Description string
    The description of the role.
    Name string
    The name of the role.
    Permissions List<string>
    The list of permissions granted to the role.
    UniqueId string
    The unique_id of the role.
    Description string
    The description of the role.
    Name string
    The name of the role.
    Permissions []string
    The list of permissions granted to the role.
    UniqueId string
    The unique_id of the role.
    description string
    The description of the role.
    name string
    The name of the role.
    permissions list(string)
    The list of permissions granted to the role.
    unique_id string
    The unique_id of the role.
    description String
    The description of the role.
    name String
    The name of the role.
    permissions List<String>
    The list of permissions granted to the role.
    uniqueId String
    The unique_id of the role.
    description string
    The description of the role.
    name string
    The name of the role.
    permissions string[]
    The list of permissions granted to the role.
    uniqueId string
    The unique_id of the role.
    description str
    The description of the role.
    name str
    The name of the role.
    permissions Sequence[str]
    The list of permissions granted to the role.
    unique_id str
    The unique_id of the role.
    description String
    The description of the role.
    name String
    The name of the role.
    permissions List<String>
    The list of permissions granted to the role.
    uniqueId String
    The unique_id of the role.

    Package Details

    Repository
    zenduty zenduty/terraform-provider-zenduty
    License
    Notes
    This Pulumi package is based on the zenduty Terraform Provider.
    Viewing docs for zenduty 2.0.0
    published on Friday, Aug 14, 2026 by zenduty

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial