Viewing docs for Harness v0.11.7
published on Friday, Mar 20, 2026 by Pulumi
published on Friday, Mar 20, 2026 by Pulumi
Viewing docs for Harness v0.11.7
published on Friday, Mar 20, 2026 by Pulumi
published on Friday, Mar 20, 2026 by Pulumi
Data source for retrieving roles
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const example = harness.platform.getRoles({
identifier: "identifier",
orgId: "org_id",
projectId: "project_id",
});
import pulumi
import pulumi_harness as harness
example = harness.platform.get_roles(identifier="identifier",
org_id="org_id",
project_id="project_id")
package main
import (
"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := platform.LookupRoles(ctx, &platform.LookupRolesArgs{
Identifier: "identifier",
OrgId: pulumi.StringRef("org_id"),
ProjectId: pulumi.StringRef("project_id"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
var example = Harness.Platform.GetRoles.Invoke(new()
{
Identifier = "identifier",
OrgId = "org_id",
ProjectId = "project_id",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.PlatformFunctions;
import com.pulumi.harness.platform.inputs.GetRolesArgs;
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 example = PlatformFunctions.getRoles(GetRolesArgs.builder()
.identifier("identifier")
.orgId("org_id")
.projectId("project_id")
.build());
}
}
variables:
example:
fn::invoke:
function: harness:platform:getRoles
arguments:
identifier: identifier
orgId: org_id
projectId: project_id
Using getRoles
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 getRoles(args: GetRolesArgs, opts?: InvokeOptions): Promise<GetRolesResult>
function getRolesOutput(args: GetRolesOutputArgs, opts?: InvokeOptions): Output<GetRolesResult>def get_roles(allowed_scope_levels: Optional[Sequence[str]] = None,
identifier: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
permissions: Optional[Sequence[str]] = None,
project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRolesResult
def get_roles_output(allowed_scope_levels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
identifier: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
org_id: Optional[pulumi.Input[str]] = None,
permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
project_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRolesResult]func LookupRoles(ctx *Context, args *LookupRolesArgs, opts ...InvokeOption) (*LookupRolesResult, error)
func LookupRolesOutput(ctx *Context, args *LookupRolesOutputArgs, opts ...InvokeOption) LookupRolesResultOutput> Note: This function is named LookupRoles in the Go SDK.
public static class GetRoles
{
public static Task<GetRolesResult> InvokeAsync(GetRolesArgs args, InvokeOptions? opts = null)
public static Output<GetRolesResult> Invoke(GetRolesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRolesResult> getRoles(GetRolesArgs args, InvokeOptions options)
public static Output<GetRolesResult> getRoles(GetRolesArgs args, InvokeOptions options)
fn::invoke:
function: harness:platform/getRoles:getRoles
arguments:
# arguments dictionaryThe following arguments are supported:
- Identifier string
- Unique identifier of the resource.
- Allowed
Scope List<string>Levels - The scope levels at which this role can be used
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Permissions List<string>
- List of the permission identifiers
- Project
Id string - Unique identifier of the project.
- Identifier string
- Unique identifier of the resource.
- Allowed
Scope []stringLevels - The scope levels at which this role can be used
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Permissions []string
- List of the permission identifiers
- Project
Id string - Unique identifier of the project.
- identifier String
- Unique identifier of the resource.
- allowed
Scope List<String>Levels - The scope levels at which this role can be used
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- permissions List<String>
- List of the permission identifiers
- project
Id String - Unique identifier of the project.
- identifier string
- Unique identifier of the resource.
- allowed
Scope string[]Levels - The scope levels at which this role can be used
- name string
- Name of the resource.
- org
Id string - Unique identifier of the organization.
- permissions string[]
- List of the permission identifiers
- project
Id string - Unique identifier of the project.
- identifier str
- Unique identifier of the resource.
- allowed_
scope_ Sequence[str]levels - The scope levels at which this role can be used
- name str
- Name of the resource.
- org_
id str - Unique identifier of the organization.
- permissions Sequence[str]
- List of the permission identifiers
- project_
id str - Unique identifier of the project.
- identifier String
- Unique identifier of the resource.
- allowed
Scope List<String>Levels - The scope levels at which this role can be used
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- permissions List<String>
- List of the permission identifiers
- project
Id String - Unique identifier of the project.
getRoles Result
The following output properties are available:
- Allowed
Scope List<string>Levels - The scope levels at which this role can be used
- Description string
- Description of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Identifier string
- Unique identifier of the resource.
- List<string>
- Tags to associate with the resource.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Permissions List<string>
- List of the permission identifiers
- Project
Id string - Unique identifier of the project.
- Allowed
Scope []stringLevels - The scope levels at which this role can be used
- Description string
- Description of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Identifier string
- Unique identifier of the resource.
- []string
- Tags to associate with the resource.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Permissions []string
- List of the permission identifiers
- Project
Id string - Unique identifier of the project.
- allowed
Scope List<String>Levels - The scope levels at which this role can be used
- description String
- Description of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- identifier String
- Unique identifier of the resource.
- List<String>
- Tags to associate with the resource.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- permissions List<String>
- List of the permission identifiers
- project
Id String - Unique identifier of the project.
- allowed
Scope string[]Levels - The scope levels at which this role can be used
- description string
- Description of the resource.
- id string
- The provider-assigned unique ID for this managed resource.
- identifier string
- Unique identifier of the resource.
- string[]
- Tags to associate with the resource.
- name string
- Name of the resource.
- org
Id string - Unique identifier of the organization.
- permissions string[]
- List of the permission identifiers
- project
Id string - Unique identifier of the project.
- allowed_
scope_ Sequence[str]levels - The scope levels at which this role can be used
- description str
- Description of the resource.
- id str
- The provider-assigned unique ID for this managed resource.
- identifier str
- Unique identifier of the resource.
- Sequence[str]
- Tags to associate with the resource.
- name str
- Name of the resource.
- org_
id str - Unique identifier of the organization.
- permissions Sequence[str]
- List of the permission identifiers
- project_
id str - Unique identifier of the project.
- allowed
Scope List<String>Levels - The scope levels at which this role can be used
- description String
- Description of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- identifier String
- Unique identifier of the resource.
- List<String>
- Tags to associate with the resource.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- permissions List<String>
- List of the permission identifiers
- project
Id String - Unique identifier of the project.
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harnessTerraform Provider.
Viewing docs for Harness v0.11.7
published on Friday, Mar 20, 2026 by Pulumi
published on Friday, Mar 20, 2026 by Pulumi
