FusionAuth

v0.9.7 published on Thursday, Jul 28, 2022 by Theo Gravity

FusionAuthApplicationRole

# Application Role Resource

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

Application Roles API

Example Usage

using Pulumi;
using Fusionauth = theogravity.Fusionauth;

class MyStack : Stack
{
    public MyStack()
    {
        var myAppAdminRole = new Fusionauth.FusionAuthApplicationRole("myAppAdminRole", new Fusionauth.FusionAuthApplicationRoleArgs
        {
            ApplicationId = fusionauth_application.My_app.Id,
            Description = "",
            IsDefault = false,
            IsSuperRole = true,
        });
    }

}
package main

import (
	"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.NewFusionAuthApplicationRole(ctx, "myAppAdminRole", &fusionauth.FusionAuthApplicationRoleArgs{
			ApplicationId: pulumi.Any(fusionauth_application.My_app.Id),
			Description:   pulumi.String(""),
			IsDefault:     pulumi.Bool(false),
			IsSuperRole:   pulumi.Bool(true),
		})
		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) {
        var myAppAdminRole = new FusionAuthApplicationRole("myAppAdminRole", FusionAuthApplicationRoleArgs.builder()        
            .applicationId(fusionauth_application.my_app().id())
            .description("")
            .isDefault(false)
            .isSuperRole(true)
            .build());

    }
}
import pulumi
import theogravity_pulumi-fusionauth as fusionauth

my_app_admin_role = fusionauth.FusionAuthApplicationRole("myAppAdminRole",
    application_id=fusionauth_application["my_app"]["id"],
    description="",
    is_default=False,
    is_super_role=True)
import * as pulumi from "@pulumi/pulumi";
import * as pulumi_fusionauth from "pulumi-fusionauth";

const myAppAdminRole = new fusionauth.FusionAuthApplicationRole("myAppAdminRole", {
    applicationId: fusionauth_application.my_app.id,
    description: "",
    isDefault: false,
    isSuperRole: true,
});
resources:
  myAppAdminRole:
    type: fusionauth:FusionAuthApplicationRole
    properties:
      applicationId: ${fusionauth_application.my_app.id}
      description:
      isDefault: false
      isSuperRole: true

Create a FusionAuthApplicationRole Resource

new FusionAuthApplicationRole(name: string, args: FusionAuthApplicationRoleArgs, opts?: CustomResourceOptions);
@overload
def FusionAuthApplicationRole(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              application_id: Optional[str] = None,
                              description: Optional[str] = None,
                              is_default: Optional[bool] = None,
                              is_super_role: Optional[bool] = None,
                              name: Optional[str] = None)
@overload
def FusionAuthApplicationRole(resource_name: str,
                              args: FusionAuthApplicationRoleArgs,
                              opts: Optional[ResourceOptions] = None)
func NewFusionAuthApplicationRole(ctx *Context, name string, args FusionAuthApplicationRoleArgs, opts ...ResourceOption) (*FusionAuthApplicationRole, error)
public FusionAuthApplicationRole(string name, FusionAuthApplicationRoleArgs args, CustomResourceOptions? opts = null)
public FusionAuthApplicationRole(String name, FusionAuthApplicationRoleArgs args)
public FusionAuthApplicationRole(String name, FusionAuthApplicationRoleArgs args, CustomResourceOptions options)
type: fusionauth:FusionAuthApplicationRole
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args FusionAuthApplicationRoleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args FusionAuthApplicationRoleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args FusionAuthApplicationRoleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args FusionAuthApplicationRoleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args FusionAuthApplicationRoleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

FusionAuthApplicationRole Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The FusionAuthApplicationRole resource accepts the following input properties:

ApplicationId string

ID of the application that this role is for.

Description string

A description for the role.

IsDefault bool

Whether or not the Role is a default role. A default role is automatically assigned to a user during registration if no roles are provided.

IsSuperRole bool

Whether or not the Role is a considered to be a super user role. This is a marker to indicate that it supersedes all other roles. FusionAuth will attempt to enforce this contract when using the web UI, it is not enforced programmatically when using the API.

Name string

The name of the Role.

ApplicationId string

ID of the application that this role is for.

Description string

A description for the role.

IsDefault bool

Whether or not the Role is a default role. A default role is automatically assigned to a user during registration if no roles are provided.

IsSuperRole bool

Whether or not the Role is a considered to be a super user role. This is a marker to indicate that it supersedes all other roles. FusionAuth will attempt to enforce this contract when using the web UI, it is not enforced programmatically when using the API.

Name string

The name of the Role.

applicationId String

ID of the application that this role is for.

description String

A description for the role.

isDefault Boolean

Whether or not the Role is a default role. A default role is automatically assigned to a user during registration if no roles are provided.

isSuperRole Boolean

Whether or not the Role is a considered to be a super user role. This is a marker to indicate that it supersedes all other roles. FusionAuth will attempt to enforce this contract when using the web UI, it is not enforced programmatically when using the API.

name String

The name of the Role.

applicationId string

ID of the application that this role is for.

description string

A description for the role.

isDefault boolean

Whether or not the Role is a default role. A default role is automatically assigned to a user during registration if no roles are provided.

isSuperRole boolean

Whether or not the Role is a considered to be a super user role. This is a marker to indicate that it supersedes all other roles. FusionAuth will attempt to enforce this contract when using the web UI, it is not enforced programmatically when using the API.

name string

The name of the Role.

application_id str

ID of the application that this role is for.

description str

A description for the role.

is_default bool

Whether or not the Role is a default role. A default role is automatically assigned to a user during registration if no roles are provided.

is_super_role bool

Whether or not the Role is a considered to be a super user role. This is a marker to indicate that it supersedes all other roles. FusionAuth will attempt to enforce this contract when using the web UI, it is not enforced programmatically when using the API.

name str

The name of the Role.

applicationId String

ID of the application that this role is for.

description String

A description for the role.

isDefault Boolean

Whether or not the Role is a default role. A default role is automatically assigned to a user during registration if no roles are provided.

isSuperRole Boolean

Whether or not the Role is a considered to be a super user role. This is a marker to indicate that it supersedes all other roles. FusionAuth will attempt to enforce this contract when using the web UI, it is not enforced programmatically when using the API.

name String

The name of the Role.

Outputs

All input properties are implicitly available as output properties. Additionally, the FusionAuthApplicationRole resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing FusionAuthApplicationRole Resource

Get an existing FusionAuthApplicationRole resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: FusionAuthApplicationRoleState, opts?: CustomResourceOptions): FusionAuthApplicationRole
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        application_id: Optional[str] = None,
        description: Optional[str] = None,
        is_default: Optional[bool] = None,
        is_super_role: Optional[bool] = None,
        name: Optional[str] = None) -> FusionAuthApplicationRole
func GetFusionAuthApplicationRole(ctx *Context, name string, id IDInput, state *FusionAuthApplicationRoleState, opts ...ResourceOption) (*FusionAuthApplicationRole, error)
public static FusionAuthApplicationRole Get(string name, Input<string> id, FusionAuthApplicationRoleState? state, CustomResourceOptions? opts = null)
public static FusionAuthApplicationRole get(String name, Output<String> id, FusionAuthApplicationRoleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ApplicationId string

ID of the application that this role is for.

Description string

A description for the role.

IsDefault bool

Whether or not the Role is a default role. A default role is automatically assigned to a user during registration if no roles are provided.

IsSuperRole bool

Whether or not the Role is a considered to be a super user role. This is a marker to indicate that it supersedes all other roles. FusionAuth will attempt to enforce this contract when using the web UI, it is not enforced programmatically when using the API.

Name string

The name of the Role.

ApplicationId string

ID of the application that this role is for.

Description string

A description for the role.

IsDefault bool

Whether or not the Role is a default role. A default role is automatically assigned to a user during registration if no roles are provided.

IsSuperRole bool

Whether or not the Role is a considered to be a super user role. This is a marker to indicate that it supersedes all other roles. FusionAuth will attempt to enforce this contract when using the web UI, it is not enforced programmatically when using the API.

Name string

The name of the Role.

applicationId String

ID of the application that this role is for.

description String

A description for the role.

isDefault Boolean

Whether or not the Role is a default role. A default role is automatically assigned to a user during registration if no roles are provided.

isSuperRole Boolean

Whether or not the Role is a considered to be a super user role. This is a marker to indicate that it supersedes all other roles. FusionAuth will attempt to enforce this contract when using the web UI, it is not enforced programmatically when using the API.

name String

The name of the Role.

applicationId string

ID of the application that this role is for.

description string

A description for the role.

isDefault boolean

Whether or not the Role is a default role. A default role is automatically assigned to a user during registration if no roles are provided.

isSuperRole boolean

Whether or not the Role is a considered to be a super user role. This is a marker to indicate that it supersedes all other roles. FusionAuth will attempt to enforce this contract when using the web UI, it is not enforced programmatically when using the API.

name string

The name of the Role.

application_id str

ID of the application that this role is for.

description str

A description for the role.

is_default bool

Whether or not the Role is a default role. A default role is automatically assigned to a user during registration if no roles are provided.

is_super_role bool

Whether or not the Role is a considered to be a super user role. This is a marker to indicate that it supersedes all other roles. FusionAuth will attempt to enforce this contract when using the web UI, it is not enforced programmatically when using the API.

name str

The name of the Role.

applicationId String

ID of the application that this role is for.

description String

A description for the role.

isDefault Boolean

Whether or not the Role is a default role. A default role is automatically assigned to a user during registration if no roles are provided.

isSuperRole Boolean

Whether or not the Role is a considered to be a super user role. This is a marker to indicate that it supersedes all other roles. FusionAuth will attempt to enforce this contract when using the web UI, it is not enforced programmatically when using the API.

name String

The name of the Role.

Package Details

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

This Pulumi package is based on the fusionauth Terraform Provider.