FusionAuth

Community
Package contributed by a community member
v0.9.7 published on Thursday, Jul 28, 2022 by Theo Gravity

getApplicationRole

# Application Role Resource

This Resource is used to create a role for an Application.

Application Roles API

Example Usage

using Pulumi;
using Fusionauth = Pulumi.Fusionauth;

class MyStack : Stack
{
    public MyStack()
    {
        var admin = Output.Create(Fusionauth.GetApplicationRole.InvokeAsync(new Fusionauth.GetApplicationRoleArgs
        {
            ApplicationId = data.Fusionauth_application.FusionAuth.Id,
            Name = "admin",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-fusionauth/sdk/go/fusionauth"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/theogravity/pulumi-fusionauth/sdk/go/fusionauth"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := fusionauth.GetApplicationRole(ctx, &GetApplicationRoleArgs{
			ApplicationId: data.Fusionauth_application.FusionAuth.Id,
			Name:          "admin",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var admin = Output.of(FusionauthFunctions.getApplicationRole(GetApplicationRoleArgs.builder()
            .applicationId(data.fusionauth_application().FusionAuth().id())
            .name("admin")
            .build()));

    }
}
import pulumi
import pulumi_fusionauth as fusionauth

admin = fusionauth.get_application_role(application_id=data["fusionauth_application"]["FusionAuth"]["id"],
    name="admin")
import * as pulumi from "@pulumi/pulumi";
import * as fusionauth from "@pulumi/fusionauth";

const admin = fusionauth.getApplicationRole({
    applicationId: data.fusionauth_application.FusionAuth.id,
    name: "admin",
});
variables:
  admin:
    Fn::Invoke:
      Function: fusionauth:getApplicationRole
      Arguments:
        applicationId: ${data.fusionauth_application.FusionAuth.id}
        name: admin

Using getApplicationRole

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 getApplicationRole(args: GetApplicationRoleArgs, opts?: InvokeOptions): Promise<GetApplicationRoleResult>
function getApplicationRoleOutput(args: GetApplicationRoleOutputArgs, opts?: InvokeOptions): Output<GetApplicationRoleResult>
def get_application_role(application_id: Optional[str] = None,
                         name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetApplicationRoleResult
def get_application_role_output(application_id: Optional[pulumi.Input[str]] = None,
                         name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetApplicationRoleResult]
func GetApplicationRole(ctx *Context, args *GetApplicationRoleArgs, opts ...InvokeOption) (*GetApplicationRoleResult, error)
func GetApplicationRoleOutput(ctx *Context, args *GetApplicationRoleOutputArgs, opts ...InvokeOption) GetApplicationRoleResultOutput

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

public static class GetApplicationRole 
{
    public static Task<GetApplicationRoleResult> InvokeAsync(GetApplicationRoleArgs args, InvokeOptions? opts = null)
    public static Output<GetApplicationRoleResult> Invoke(GetApplicationRoleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetApplicationRoleResult> getApplicationRole(GetApplicationRoleArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: fusionauth:index/getApplicationRole:getApplicationRole
  Arguments:
    # Arguments dictionary

The following arguments are supported:

ApplicationId string

ID of the application that this role is for.

Name string

The name of the Role.

ApplicationId string

ID of the application that this role is for.

Name string

The name of the Role.

applicationId String

ID of the application that this role is for.

name String

The name of the Role.

applicationId string

ID of the application that this role is for.

name string

The name of the Role.

application_id str

ID of the application that this role is for.

name str

The name of the Role.

applicationId String

ID of the application that this role is for.

name String

The name of the Role.

getApplicationRole Result

The following output properties are available:

ApplicationId string
Id string

The provider-assigned unique ID for this managed resource.

Name string
ApplicationId string
Id string

The provider-assigned unique ID for this managed resource.

Name string
applicationId String
id String

The provider-assigned unique ID for this managed resource.

name String
applicationId string
id string

The provider-assigned unique ID for this managed resource.

name string
application_id str
id str

The provider-assigned unique ID for this managed resource.

name str
applicationId String
id String

The provider-assigned unique ID for this managed resource.

name String

Package Details

Repository
https://github.com/theogravity/pulumi-fusionauth
License
MIT
Notes

This Pulumi package is based on the fusionauth Terraform Provider.