1. Packages
  2. Harness
  3. API Docs
  4. platform
  5. getRoles
Harness v0.1.2 published on Friday, Jul 19, 2024 by Pulumi

harness.platform.getRoles

Explore with Pulumi AI

harness logo
Harness v0.1.2 published on Friday, Jul 19, 2024 by Pulumi

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: harness:platform/getRoles:getRoles
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Identifier string
    Unique identifier of the resource.
    AllowedScopeLevels List<string>
    The scope levels at which this role can be used
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    Permissions List<string>
    List of the permission identifiers
    ProjectId string
    Unique identifier of the project.
    Identifier string
    Unique identifier of the resource.
    AllowedScopeLevels []string
    The scope levels at which this role can be used
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    Permissions []string
    List of the permission identifiers
    ProjectId string
    Unique identifier of the project.
    identifier String
    Unique identifier of the resource.
    allowedScopeLevels List<String>
    The scope levels at which this role can be used
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    permissions List<String>
    List of the permission identifiers
    projectId String
    Unique identifier of the project.
    identifier string
    Unique identifier of the resource.
    allowedScopeLevels string[]
    The scope levels at which this role can be used
    name string
    Name of the resource.
    orgId string
    Unique identifier of the organization.
    permissions string[]
    List of the permission identifiers
    projectId string
    Unique identifier of the project.
    identifier str
    Unique identifier of the resource.
    allowed_scope_levels Sequence[str]
    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.
    allowedScopeLevels List<String>
    The scope levels at which this role can be used
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    permissions List<String>
    List of the permission identifiers
    projectId String
    Unique identifier of the project.

    getRoles Result

    The following output properties are available:

    AllowedScopeLevels List<string>
    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.
    Tags List<string>
    Tags to associate with the resource.
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    Permissions List<string>
    List of the permission identifiers
    ProjectId string
    Unique identifier of the project.
    AllowedScopeLevels []string
    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.
    Tags []string
    Tags to associate with the resource.
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    Permissions []string
    List of the permission identifiers
    ProjectId string
    Unique identifier of the project.
    allowedScopeLevels List<String>
    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.
    tags List<String>
    Tags to associate with the resource.
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    permissions List<String>
    List of the permission identifiers
    projectId String
    Unique identifier of the project.
    allowedScopeLevels string[]
    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.
    tags string[]
    Tags to associate with the resource.
    name string
    Name of the resource.
    orgId string
    Unique identifier of the organization.
    permissions string[]
    List of the permission identifiers
    projectId string
    Unique identifier of the project.
    allowed_scope_levels Sequence[str]
    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.
    tags 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.
    allowedScopeLevels List<String>
    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.
    tags List<String>
    Tags to associate with the resource.
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    permissions List<String>
    List of the permission identifiers
    projectId 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 harness Terraform Provider.
    harness logo
    Harness v0.1.2 published on Friday, Jul 19, 2024 by Pulumi