1. Registry
  2. Packages
  3. Cloudfoundry Provider
  4. API Docs
  5. getOrgRoles
Viewing docs for cloudfoundry 1.18.0
published on Monday, Nov 2, 2026 by cloudfoundry
cloudfoundry
Viewing docs for cloudfoundry 1.18.0
published on Monday, Nov 2, 2026 by cloudfoundry

    Gets information on Cloud Foundry roles within an Organization.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudfoundry from "@pulumi/cloudfoundry";
    
    const roles = cloudfoundry.getOrgRoles({
        org: "02c0cc92-6ecc-44b1-b7b2-096ca19ee143",
    });
    
    import pulumi
    import pulumi_cloudfoundry as cloudfoundry
    
    roles = cloudfoundry.get_org_roles(org="02c0cc92-6ecc-44b1-b7b2-096ca19ee143")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/cloudfoundry/cloudfoundry"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudfoundry.GetOrgRoles(ctx, &cloudfoundry.GetOrgRolesArgs{
    			Org: "02c0cc92-6ecc-44b1-b7b2-096ca19ee143",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudfoundry = Pulumi.Cloudfoundry;
    
    return await Deployment.RunAsync(() => 
    {
        var roles = Cloudfoundry.GetOrgRoles.Invoke(new()
        {
            Org = "02c0cc92-6ecc-44b1-b7b2-096ca19ee143",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudfoundry.CloudfoundryFunctions;
    import com.pulumi.cloudfoundry.inputs.GetOrgRolesArgs;
    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 roles = CloudfoundryFunctions.getOrgRoles(GetOrgRolesArgs.builder()
                .org("02c0cc92-6ecc-44b1-b7b2-096ca19ee143")
                .build());
    
        }
    }
    
    variables:
      roles:
        fn::invoke:
          function: cloudfoundry:getOrgRoles
          arguments:
            org: 02c0cc92-6ecc-44b1-b7b2-096ca19ee143
    
    Example coming soon!
    

    Using getOrgRoles

    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 getOrgRoles(args: GetOrgRolesArgs, opts?: InvokeOptions): Promise<GetOrgRolesResult>
    function getOrgRolesOutput(args: GetOrgRolesOutputArgs, opts?: InvokeOutputOptions): Output<GetOrgRolesResult>
    def get_org_roles(org: Optional[str] = None,
                      type: Optional[str] = None,
                      user: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetOrgRolesResult
    def get_org_roles_output(org: pulumi.Input[Optional[str]] = None,
                      type: pulumi.Input[Optional[str]] = None,
                      user: pulumi.Input[Optional[str]] = None,
                      opts: Optional[InvokeOutputOptions] = None) -> Output[GetOrgRolesResult]
    func GetOrgRoles(ctx *Context, args *GetOrgRolesArgs, opts ...InvokeOption) (*GetOrgRolesResult, error)
    func GetOrgRolesOutput(ctx *Context, args *GetOrgRolesOutputArgs, opts ...InvokeOption) GetOrgRolesResultOutput

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

    public static class GetOrgRoles 
    {
        public static Task<GetOrgRolesResult> InvokeAsync(GetOrgRolesArgs args, InvokeOptions? opts = null)
        public static Output<GetOrgRolesResult> Invoke(GetOrgRolesInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetOrgRolesResult> Invoke(GetOrgRolesInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetOrgRolesResult> getOrgRoles(GetOrgRolesArgs args, InvokeOptions options)
    public static Output<GetOrgRolesResult> getOrgRoles(GetOrgRolesArgs args, InvokeOptions options)
    public static Output<GetOrgRolesResult> getOrgRoles(GetOrgRolesArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: cloudfoundry:index/getOrgRoles:getOrgRoles
      arguments:
        # arguments dictionary
    data "cloudfoundry_get_org_roles" "name" {
        # arguments
    }

    The following arguments are supported:

    Org string
    The guid of the org the role is assigned to
    Type string
    Valid org role type to filter for; see Valid role types
    User string
    The guid of the cloudfoundry user the role is assigned to for filtering
    Org string
    The guid of the org the role is assigned to
    Type string
    Valid org role type to filter for; see Valid role types
    User string
    The guid of the cloudfoundry user the role is assigned to for filtering
    org string
    The guid of the org the role is assigned to
    type string
    Valid org role type to filter for; see Valid role types
    user string
    The guid of the cloudfoundry user the role is assigned to for filtering
    org String
    The guid of the org the role is assigned to
    type String
    Valid org role type to filter for; see Valid role types
    user String
    The guid of the cloudfoundry user the role is assigned to for filtering
    org string
    The guid of the org the role is assigned to
    type string
    Valid org role type to filter for; see Valid role types
    user string
    The guid of the cloudfoundry user the role is assigned to for filtering
    org str
    The guid of the org the role is assigned to
    type str
    Valid org role type to filter for; see Valid role types
    user str
    The guid of the cloudfoundry user the role is assigned to for filtering
    org String
    The guid of the org the role is assigned to
    type String
    Valid org role type to filter for; see Valid role types
    user String
    The guid of the cloudfoundry user the role is assigned to for filtering

    getOrgRoles Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Org string
    The guid of the org the role is assigned to
    Roles List<GetOrgRolesRole>
    The list of org roles
    Type string
    Valid org role type to filter for; see Valid role types
    User string
    The guid of the cloudfoundry user the role is assigned to for filtering
    Id string
    The provider-assigned unique ID for this managed resource.
    Org string
    The guid of the org the role is assigned to
    Roles []GetOrgRolesRole
    The list of org roles
    Type string
    Valid org role type to filter for; see Valid role types
    User string
    The guid of the cloudfoundry user the role is assigned to for filtering
    id string
    The provider-assigned unique ID for this managed resource.
    org string
    The guid of the org the role is assigned to
    roles list(object)
    The list of org roles
    type string
    Valid org role type to filter for; see Valid role types
    user string
    The guid of the cloudfoundry user the role is assigned to for filtering
    id String
    The provider-assigned unique ID for this managed resource.
    org String
    The guid of the org the role is assigned to
    roles List<GetOrgRolesRole>
    The list of org roles
    type String
    Valid org role type to filter for; see Valid role types
    user String
    The guid of the cloudfoundry user the role is assigned to for filtering
    id string
    The provider-assigned unique ID for this managed resource.
    org string
    The guid of the org the role is assigned to
    roles GetOrgRolesRole[]
    The list of org roles
    type string
    Valid org role type to filter for; see Valid role types
    user string
    The guid of the cloudfoundry user the role is assigned to for filtering
    id str
    The provider-assigned unique ID for this managed resource.
    org str
    The guid of the org the role is assigned to
    roles Sequence[GetOrgRolesRole]
    The list of org roles
    type str
    Valid org role type to filter for; see Valid role types
    user str
    The guid of the cloudfoundry user the role is assigned to for filtering
    id String
    The provider-assigned unique ID for this managed resource.
    org String
    The guid of the org the role is assigned to
    roles List<Property Map>
    The list of org roles
    type String
    Valid org role type to filter for; see Valid role types
    user String
    The guid of the cloudfoundry user the role is assigned to for filtering

    Supporting Types

    GetOrgRolesRole

    CreatedAt string
    The date and time when the resource was created in RFC3339 format.
    Id string
    The guid for the role
    Org string
    The guid of the organization the role is assigned to
    Type string
    role type
    UpdatedAt string
    The date and time when the resource was updated in RFC3339 format.
    User string
    The guid of the cloudfoundry user the role is assigned to
    CreatedAt string
    The date and time when the resource was created in RFC3339 format.
    Id string
    The guid for the role
    Org string
    The guid of the organization the role is assigned to
    Type string
    role type
    UpdatedAt string
    The date and time when the resource was updated in RFC3339 format.
    User string
    The guid of the cloudfoundry user the role is assigned to
    created_at string
    The date and time when the resource was created in RFC3339 format.
    id string
    The guid for the role
    org string
    The guid of the organization the role is assigned to
    type string
    role type
    updated_at string
    The date and time when the resource was updated in RFC3339 format.
    user string
    The guid of the cloudfoundry user the role is assigned to
    createdAt String
    The date and time when the resource was created in RFC3339 format.
    id String
    The guid for the role
    org String
    The guid of the organization the role is assigned to
    type String
    role type
    updatedAt String
    The date and time when the resource was updated in RFC3339 format.
    user String
    The guid of the cloudfoundry user the role is assigned to
    createdAt string
    The date and time when the resource was created in RFC3339 format.
    id string
    The guid for the role
    org string
    The guid of the organization the role is assigned to
    type string
    role type
    updatedAt string
    The date and time when the resource was updated in RFC3339 format.
    user string
    The guid of the cloudfoundry user the role is assigned to
    created_at str
    The date and time when the resource was created in RFC3339 format.
    id str
    The guid for the role
    org str
    The guid of the organization the role is assigned to
    type str
    role type
    updated_at str
    The date and time when the resource was updated in RFC3339 format.
    user str
    The guid of the cloudfoundry user the role is assigned to
    createdAt String
    The date and time when the resource was created in RFC3339 format.
    id String
    The guid for the role
    org String
    The guid of the organization the role is assigned to
    type String
    role type
    updatedAt String
    The date and time when the resource was updated in RFC3339 format.
    user String
    The guid of the cloudfoundry user the role is assigned to

    Package Details

    Repository
    cloudfoundry cloudfoundry/terraform-provider-cloudfoundry
    License
    Notes
    This Pulumi package is based on the cloudfoundry Terraform Provider.
    cloudfoundry
    Viewing docs for cloudfoundry 1.18.0
    published on Monday, Nov 2, 2026 by cloudfoundry

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial