Viewing docs for Pulumi Cloud v1.5.0
published on Monday, Oct 19, 2026 by Pulumi
published on Monday, Oct 19, 2026 by Pulumi
Viewing docs for Pulumi Cloud v1.5.0
published on Monday, Oct 19, 2026 by Pulumi
published on Monday, Oct 19, 2026 by Pulumi
Lists the roles in a Pulumi Cloud organization, including both built-in and custom roles, sorted by name. To look up a single role by the name shown in the Pulumi Cloud console, use getOrganizationRole.
Example Usage
List all roles
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using PulumiService = Pulumi.PulumiService;
return await Deployment.RunAsync(() =>
{
var allRoles = PulumiService.GetOrganizationRoles.Invoke(new()
{
OrganizationName = "my-org",
});
return new Dictionary<string, object?>
{
["roles"] = allRoles.Apply(getOrganizationRolesResult => getOrganizationRolesResult.Roles),
};
});
package main
import (
"github.com/pulumi/pulumi-pulumiservice/sdk/go/pulumiservice"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
allRoles := pulumiservice.GetOrganizationRolesOutput(ctx, pulumiservice.GetOrganizationRolesOutputArgs{
OrganizationName: pulumi.String("my-org"),
}, nil)
ctx.Export("roles", allRoles.ApplyT(func(allRoles pulumiservice.GetOrganizationRolesResult) ([]pulumiservice.OrganizationRoleInfo, error) {
return allRoles.Roles.([]pulumiservice.OrganizationRoleInfo), nil
}).(pulumi.ArrayOutput))
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.pulumiservice.PulumiserviceFunctions;
import com.pulumi.pulumiservice.inputs.GetOrganizationRolesArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 allRoles = PulumiserviceFunctions.getOrganizationRoles(GetOrganizationRolesArgs.builder()
.organizationName("my-org")
.build());
ctx.export("roles", allRoles.applyValue(_allRoles -> _allRoles.roles()));
}
}
import * as pulumi from "@pulumi/pulumi";
import * as pulumiservice from "@pulumi/pulumiservice";
const allRoles = pulumiservice.getOrganizationRolesOutput({
organizationName: "my-org",
});
export const roles = allRoles.apply(allRoles => allRoles.roles);
import pulumi
import pulumi_pulumiservice as pulumiservice
all_roles = pulumiservice.get_organization_roles_output(organization_name="my-org")
pulumi.export("roles", all_roles.roles)
variables:
allRoles:
fn::invoke:
function: pulumiservice:getOrganizationRoles
arguments:
organizationName: my-org
outputs:
roles: ${allRoles.roles}
Using getOrganizationRoles
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 getOrganizationRoles(args: GetOrganizationRolesArgs, opts?: InvokeOptions): Promise<GetOrganizationRolesResult>
function getOrganizationRolesOutput(args: GetOrganizationRolesOutputArgs, opts?: InvokeOutputOptions): Output<GetOrganizationRolesResult>def get_organization_roles(organization_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetOrganizationRolesResult
def get_organization_roles_output(organization_name: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetOrganizationRolesResult]func GetOrganizationRoles(ctx *Context, args *GetOrganizationRolesArgs, opts ...InvokeOption) (*GetOrganizationRolesResult, error)
func GetOrganizationRolesOutput(ctx *Context, args *GetOrganizationRolesOutputArgs, opts ...InvokeOption) GetOrganizationRolesResultOutput> Note: This function is named GetOrganizationRoles in the Go SDK.
public static class GetOrganizationRoles
{
public static Task<GetOrganizationRolesResult> InvokeAsync(GetOrganizationRolesArgs args, InvokeOptions? opts = null)
public static Output<GetOrganizationRolesResult> Invoke(GetOrganizationRolesInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetOrganizationRolesResult> Invoke(GetOrganizationRolesInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetOrganizationRolesResult> getOrganizationRoles(GetOrganizationRolesArgs args, InvokeOptions options)
public static Output<GetOrganizationRolesResult> getOrganizationRoles(GetOrganizationRolesArgs args, InvokeOptions options)
public static Output<GetOrganizationRolesResult> getOrganizationRoles(GetOrganizationRolesArgs args, InvokeOutputOptions options)
fn::invoke:
function: pulumiservice:getOrganizationRoles
arguments:
# arguments dictionarydata "pulumiservice_get_organization_roles" "name" {
# arguments
}The following arguments are supported:
- Organization
Name string - The name of the Pulumi organization.
- Organization
Name string - The name of the Pulumi organization.
- organization_
name string - The name of the Pulumi organization.
- organization
Name String - The name of the Pulumi organization.
- organization
Name string - The name of the Pulumi organization.
- organization_
name str - The name of the Pulumi organization.
- organization
Name String - The name of the Pulumi organization.
getOrganizationRoles Result
The following output properties are available:
- Roles
List<Pulumi.
Pulumi Service. Outputs. Organization Role Info> - The organization's roles, built-in and custom, sorted by name.
- Roles
[]Organization
Role Info - The organization's roles, built-in and custom, sorted by name.
- roles list(object)
- The organization's roles, built-in and custom, sorted by name.
- roles
List<Organization
Role Info> - The organization's roles, built-in and custom, sorted by name.
- roles
Organization
Role Info[] - The organization's roles, built-in and custom, sorted by name.
- roles
Sequence[Organization
Role Info] - The organization's roles, built-in and custom, sorted by name.
- roles List<Property Map>
- The organization's roles, built-in and custom, sorted by name.
Supporting Types
OrganizationRoleInfo
- Built
In bool - Whether this is one of the roles every organization has (Admin, Member and Billing Manager), rather than a custom role.
- Name string
- The role's name, as shown in the Pulumi Cloud console.
- Role
Id string - The role's ID. Pass it to inputs that take a role ID, such as
TeamRoleAssignment.roleIdandOrganizationMember.roleId. - Description string
- The role's description, if it has one.
- Built
In bool - Whether this is one of the roles every organization has (Admin, Member and Billing Manager), rather than a custom role.
- Name string
- The role's name, as shown in the Pulumi Cloud console.
- Role
Id string - The role's ID. Pass it to inputs that take a role ID, such as
TeamRoleAssignment.roleIdandOrganizationMember.roleId. - Description string
- The role's description, if it has one.
- built_
in bool - Whether this is one of the roles every organization has (Admin, Member and Billing Manager), rather than a custom role.
- name string
- The role's name, as shown in the Pulumi Cloud console.
- role_
id string - The role's ID. Pass it to inputs that take a role ID, such as
TeamRoleAssignment.roleIdandOrganizationMember.roleId. - description string
- The role's description, if it has one.
- built
In Boolean - Whether this is one of the roles every organization has (Admin, Member and Billing Manager), rather than a custom role.
- name String
- The role's name, as shown in the Pulumi Cloud console.
- role
Id String - The role's ID. Pass it to inputs that take a role ID, such as
TeamRoleAssignment.roleIdandOrganizationMember.roleId. - description String
- The role's description, if it has one.
- built
In boolean - Whether this is one of the roles every organization has (Admin, Member and Billing Manager), rather than a custom role.
- name string
- The role's name, as shown in the Pulumi Cloud console.
- role
Id string - The role's ID. Pass it to inputs that take a role ID, such as
TeamRoleAssignment.roleIdandOrganizationMember.roleId. - description string
- The role's description, if it has one.
- built_
in bool - Whether this is one of the roles every organization has (Admin, Member and Billing Manager), rather than a custom role.
- name str
- The role's name, as shown in the Pulumi Cloud console.
- role_
id str - The role's ID. Pass it to inputs that take a role ID, such as
TeamRoleAssignment.roleIdandOrganizationMember.roleId. - description str
- The role's description, if it has one.
- built
In Boolean - Whether this is one of the roles every organization has (Admin, Member and Billing Manager), rather than a custom role.
- name String
- The role's name, as shown in the Pulumi Cloud console.
- role
Id String - The role's ID. Pass it to inputs that take a role ID, such as
TeamRoleAssignment.roleIdandOrganizationMember.roleId. - description String
- The role's description, if it has one.
Package Details
- Repository
- pulumiservice pulumi/pulumi-pulumiservice
- License
- Apache-2.0
Viewing docs for Pulumi Cloud v1.5.0
published on Monday, Oct 19, 2026 by Pulumi
published on Monday, Oct 19, 2026 by Pulumi