1. Packages
  2. Zitadel
  3. API Docs
  4. getProjectRole
zitadel v0.1.8 published on Thursday, May 30, 2024 by pulumiverse

zitadel.getProjectRole

Explore with Pulumi AI

zitadel logo
zitadel v0.1.8 published on Thursday, May 30, 2024 by pulumiverse

    Datasource representing the project roles, which can be given as authorizations to users.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zitadel = Pulumi.Zitadel;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = Zitadel.GetProjectRole.Invoke(new()
        {
            OrgId = data.Zitadel_org.Default.Id,
            ProjectId = data.Zitadel_project.Default.Id,
            RoleKey = "key",
        });
    
        return new Dictionary<string, object?>
        {
            ["projectRole"] = @default,
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-zitadel/sdk/go/zitadel"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_default, err := zitadel.LookupProjectRole(ctx, &zitadel.LookupProjectRoleArgs{
    			OrgId:     data.Zitadel_org.Default.Id,
    			ProjectId: data.Zitadel_project.Default.Id,
    			RoleKey:   "key",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("projectRole", _default)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.zitadel.ZitadelFunctions;
    import com.pulumi.zitadel.inputs.GetProjectRoleArgs;
    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 default = ZitadelFunctions.getProjectRole(GetProjectRoleArgs.builder()
                .orgId(data.zitadel_org().default().id())
                .projectId(data.zitadel_project().default().id())
                .roleKey("key")
                .build());
    
            ctx.export("projectRole", default_);
        }
    }
    
    import pulumi
    import pulumi_zitadel as zitadel
    
    default = zitadel.get_project_role(org_id=data["zitadel_org"]["default"]["id"],
        project_id=data["zitadel_project"]["default"]["id"],
        role_key="key")
    pulumi.export("projectRole", default)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as zitadel from "@pulumi/zitadel";
    
    const default = zitadel.getProjectRole({
        orgId: data.zitadel_org["default"].id,
        projectId: data.zitadel_project["default"].id,
        roleKey: "key",
    });
    export const projectRole = _default;
    
    variables:
      default:
        fn::invoke:
          Function: zitadel:getProjectRole
          Arguments:
            orgId: ${data.zitadel_org.default.id}
            projectId: ${data.zitadel_project.default.id}
            roleKey: key
    outputs:
      projectRole: ${default}
    

    Using getProjectRole

    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 getProjectRole(args: GetProjectRoleArgs, opts?: InvokeOptions): Promise<GetProjectRoleResult>
    function getProjectRoleOutput(args: GetProjectRoleOutputArgs, opts?: InvokeOptions): Output<GetProjectRoleResult>
    def get_project_role(org_id: Optional[str] = None,
                         project_id: Optional[str] = None,
                         role_key: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetProjectRoleResult
    def get_project_role_output(org_id: Optional[pulumi.Input[str]] = None,
                         project_id: Optional[pulumi.Input[str]] = None,
                         role_key: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetProjectRoleResult]
    func LookupProjectRole(ctx *Context, args *LookupProjectRoleArgs, opts ...InvokeOption) (*LookupProjectRoleResult, error)
    func LookupProjectRoleOutput(ctx *Context, args *LookupProjectRoleOutputArgs, opts ...InvokeOption) LookupProjectRoleResultOutput

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

    public static class GetProjectRole 
    {
        public static Task<GetProjectRoleResult> InvokeAsync(GetProjectRoleArgs args, InvokeOptions? opts = null)
        public static Output<GetProjectRoleResult> Invoke(GetProjectRoleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetProjectRoleResult> getProjectRole(GetProjectRoleArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: zitadel:index/getProjectRole:getProjectRole
      arguments:
        # arguments dictionary

    The following arguments are supported:

    OrgId string
    ID of the organization
    ProjectId string
    ID of the project
    RoleKey string
    Key used for project role
    OrgId string
    ID of the organization
    ProjectId string
    ID of the project
    RoleKey string
    Key used for project role
    orgId String
    ID of the organization
    projectId String
    ID of the project
    roleKey String
    Key used for project role
    orgId string
    ID of the organization
    projectId string
    ID of the project
    roleKey string
    Key used for project role
    org_id str
    ID of the organization
    project_id str
    ID of the project
    role_key str
    Key used for project role
    orgId String
    ID of the organization
    projectId String
    ID of the project
    roleKey String
    Key used for project role

    getProjectRole Result

    The following output properties are available:

    DisplayName string
    Name used for project role
    Group string
    Group used for project role
    Id string
    The provider-assigned unique ID for this managed resource.
    OrgId string
    ID of the organization
    ProjectId string
    ID of the project
    RoleKey string
    Key used for project role
    DisplayName string
    Name used for project role
    Group string
    Group used for project role
    Id string
    The provider-assigned unique ID for this managed resource.
    OrgId string
    ID of the organization
    ProjectId string
    ID of the project
    RoleKey string
    Key used for project role
    displayName String
    Name used for project role
    group String
    Group used for project role
    id String
    The provider-assigned unique ID for this managed resource.
    orgId String
    ID of the organization
    projectId String
    ID of the project
    roleKey String
    Key used for project role
    displayName string
    Name used for project role
    group string
    Group used for project role
    id string
    The provider-assigned unique ID for this managed resource.
    orgId string
    ID of the organization
    projectId string
    ID of the project
    roleKey string
    Key used for project role
    display_name str
    Name used for project role
    group str
    Group used for project role
    id str
    The provider-assigned unique ID for this managed resource.
    org_id str
    ID of the organization
    project_id str
    ID of the project
    role_key str
    Key used for project role
    displayName String
    Name used for project role
    group String
    Group used for project role
    id String
    The provider-assigned unique ID for this managed resource.
    orgId String
    ID of the organization
    projectId String
    ID of the project
    roleKey String
    Key used for project role

    Package Details

    Repository
    zitadel pulumiverse/pulumi-zitadel
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the zitadel Terraform Provider.
    zitadel logo
    zitadel v0.1.8 published on Thursday, May 30, 2024 by pulumiverse