1. Packages
  2. Harness Provider
  3. API Docs
  4. platform
  5. getRoleAssignments
Harness v0.7.3 published on Friday, Apr 18, 2025 by Pulumi

harness.platform.getRoleAssignments

Explore with Pulumi AI

Example Usage

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

const example = harness.platform.getRoleAssignments({
    identifier: "identifier",
    orgId: "org_id",
    projectId: "project_id",
});
Copy
import pulumi
import pulumi_harness as harness

example = harness.platform.get_role_assignments(identifier="identifier",
    org_id="org_id",
    project_id="project_id")
Copy
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.LookupRoleAssignments(ctx, &platform.LookupRoleAssignmentsArgs{
			Identifier: "identifier",
			OrgId:      pulumi.StringRef("org_id"),
			ProjectId:  pulumi.StringRef("project_id"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;

return await Deployment.RunAsync(() => 
{
    var example = Harness.Platform.GetRoleAssignments.Invoke(new()
    {
        Identifier = "identifier",
        OrgId = "org_id",
        ProjectId = "project_id",
    });

});
Copy
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.GetRoleAssignmentsArgs;
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.getRoleAssignments(GetRoleAssignmentsArgs.builder()
            .identifier("identifier")
            .orgId("org_id")
            .projectId("project_id")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: harness:platform:getRoleAssignments
      arguments:
        identifier: identifier
        orgId: org_id
        projectId: project_id
Copy

Using getRoleAssignments

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 getRoleAssignments(args: GetRoleAssignmentsArgs, opts?: InvokeOptions): Promise<GetRoleAssignmentsResult>
function getRoleAssignmentsOutput(args: GetRoleAssignmentsOutputArgs, opts?: InvokeOptions): Output<GetRoleAssignmentsResult>
Copy
def get_role_assignments(identifier: Optional[str] = None,
                         org_id: Optional[str] = None,
                         project_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetRoleAssignmentsResult
def get_role_assignments_output(identifier: Optional[pulumi.Input[str]] = None,
                         org_id: Optional[pulumi.Input[str]] = None,
                         project_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetRoleAssignmentsResult]
Copy
func LookupRoleAssignments(ctx *Context, args *LookupRoleAssignmentsArgs, opts ...InvokeOption) (*LookupRoleAssignmentsResult, error)
func LookupRoleAssignmentsOutput(ctx *Context, args *LookupRoleAssignmentsOutputArgs, opts ...InvokeOption) LookupRoleAssignmentsResultOutput
Copy

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

public static class GetRoleAssignments 
{
    public static Task<GetRoleAssignmentsResult> InvokeAsync(GetRoleAssignmentsArgs args, InvokeOptions? opts = null)
    public static Output<GetRoleAssignmentsResult> Invoke(GetRoleAssignmentsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetRoleAssignmentsResult> getRoleAssignments(GetRoleAssignmentsArgs args, InvokeOptions options)
public static Output<GetRoleAssignmentsResult> getRoleAssignments(GetRoleAssignmentsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: harness:platform/getRoleAssignments:getRoleAssignments
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Identifier This property is required. string
Identifier for role assignment.
OrgId string
Org identifier.
ProjectId string
Project Identifier
Identifier This property is required. string
Identifier for role assignment.
OrgId string
Org identifier.
ProjectId string
Project Identifier
identifier This property is required. String
Identifier for role assignment.
orgId String
Org identifier.
projectId String
Project Identifier
identifier This property is required. string
Identifier for role assignment.
orgId string
Org identifier.
projectId string
Project Identifier
identifier This property is required. str
Identifier for role assignment.
org_id str
Org identifier.
project_id str
Project Identifier
identifier This property is required. String
Identifier for role assignment.
orgId String
Org identifier.
projectId String
Project Identifier

getRoleAssignments Result

The following output properties are available:

Disabled bool
The disabled attribute in the role assignment resource controls the status of the role assignment. Setting disabled to false activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, setting disabled to true deactivates the role, revoking the entity's permissions and action capabilities. Default value should be false.
Id string
The provider-assigned unique ID for this managed resource.
Identifier string
Identifier for role assignment.
Managed bool
Specifies whether the role assignment is managed by Harness. Setting managed to true means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it to false indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should be false.
Principals List<GetRoleAssignmentsPrincipal>
Principal.
ResourceGroupIdentifier string
Resource group identifier.
RoleIdentifier string
Role identifier.
OrgId string
Org identifier.
ProjectId string
Project Identifier
Disabled bool
The disabled attribute in the role assignment resource controls the status of the role assignment. Setting disabled to false activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, setting disabled to true deactivates the role, revoking the entity's permissions and action capabilities. Default value should be false.
Id string
The provider-assigned unique ID for this managed resource.
Identifier string
Identifier for role assignment.
Managed bool
Specifies whether the role assignment is managed by Harness. Setting managed to true means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it to false indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should be false.
Principals []GetRoleAssignmentsPrincipal
Principal.
ResourceGroupIdentifier string
Resource group identifier.
RoleIdentifier string
Role identifier.
OrgId string
Org identifier.
ProjectId string
Project Identifier
disabled Boolean
The disabled attribute in the role assignment resource controls the status of the role assignment. Setting disabled to false activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, setting disabled to true deactivates the role, revoking the entity's permissions and action capabilities. Default value should be false.
id String
The provider-assigned unique ID for this managed resource.
identifier String
Identifier for role assignment.
managed Boolean
Specifies whether the role assignment is managed by Harness. Setting managed to true means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it to false indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should be false.
principals List<GetRoleAssignmentsPrincipal>
Principal.
resourceGroupIdentifier String
Resource group identifier.
roleIdentifier String
Role identifier.
orgId String
Org identifier.
projectId String
Project Identifier
disabled boolean
The disabled attribute in the role assignment resource controls the status of the role assignment. Setting disabled to false activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, setting disabled to true deactivates the role, revoking the entity's permissions and action capabilities. Default value should be false.
id string
The provider-assigned unique ID for this managed resource.
identifier string
Identifier for role assignment.
managed boolean
Specifies whether the role assignment is managed by Harness. Setting managed to true means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it to false indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should be false.
principals GetRoleAssignmentsPrincipal[]
Principal.
resourceGroupIdentifier string
Resource group identifier.
roleIdentifier string
Role identifier.
orgId string
Org identifier.
projectId string
Project Identifier
disabled bool
The disabled attribute in the role assignment resource controls the status of the role assignment. Setting disabled to false activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, setting disabled to true deactivates the role, revoking the entity's permissions and action capabilities. Default value should be false.
id str
The provider-assigned unique ID for this managed resource.
identifier str
Identifier for role assignment.
managed bool
Specifies whether the role assignment is managed by Harness. Setting managed to true means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it to false indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should be false.
principals Sequence[GetRoleAssignmentsPrincipal]
Principal.
resource_group_identifier str
Resource group identifier.
role_identifier str
Role identifier.
org_id str
Org identifier.
project_id str
Project Identifier
disabled Boolean
The disabled attribute in the role assignment resource controls the status of the role assignment. Setting disabled to false activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, setting disabled to true deactivates the role, revoking the entity's permissions and action capabilities. Default value should be false.
id String
The provider-assigned unique ID for this managed resource.
identifier String
Identifier for role assignment.
managed Boolean
Specifies whether the role assignment is managed by Harness. Setting managed to true means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it to false indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should be false.
principals List<Property Map>
Principal.
resourceGroupIdentifier String
Resource group identifier.
roleIdentifier String
Role identifier.
orgId String
Org identifier.
projectId String
Project Identifier

Supporting Types

GetRoleAssignmentsPrincipal

Identifier This property is required. string
Identifier.
ScopeLevel This property is required. string
Scope level.
Type This property is required. string
Type.
Identifier This property is required. string
Identifier.
ScopeLevel This property is required. string
Scope level.
Type This property is required. string
Type.
identifier This property is required. String
Identifier.
scopeLevel This property is required. String
Scope level.
type This property is required. String
Type.
identifier This property is required. string
Identifier.
scopeLevel This property is required. string
Scope level.
type This property is required. string
Type.
identifier This property is required. str
Identifier.
scope_level This property is required. str
Scope level.
type This property is required. str
Type.
identifier This property is required. String
Identifier.
scopeLevel This property is required. String
Scope level.
type This property is required. String
Type.

Package Details

Repository
harness pulumi/pulumi-harness
License
Apache-2.0
Notes
This Pulumi package is based on the harness Terraform Provider.