FusionAuth

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

FusionAuthEntityType

# Entity Type Resource

Entity Types categorize Entities. For example, an Entity Type could be Device, API or Company.

Entity Type API

Example Usage

using System.Collections.Generic;
using System.Text.Json;
using Pulumi;
using Fusionauth = theogravity.Fusionauth;

class MyStack : Stack
{
    public MyStack()
    {
        var company = new Fusionauth.FusionAuthEntityType("company", new Fusionauth.FusionAuthEntityTypeArgs
        {
            Data = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                { "createdBy", "jared@fusionauth.io" },
            }),
            JwtConfiguration = new Fusionauth.Inputs.FusionAuthEntityTypeJwtConfigurationArgs
            {
                AccessTokenKeyId = "a7516c7c-6234-4021-b0b4-8870c807aeb2",
                Enabled = true,
                TimeToLiveInSeconds = 3600,
            },
        });
    }

}
package main

import (
	"encoding/json"

	"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 {
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"createdBy": "jared@fusionauth.io",
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		_, err := fusionauth.NewFusionAuthEntityType(ctx, "company", &fusionauth.FusionAuthEntityTypeArgs{
			Data: pulumi.String(json0),
			JwtConfiguration: &FusionAuthEntityTypeJwtConfigurationArgs{
				AccessTokenKeyId:    pulumi.String("a7516c7c-6234-4021-b0b4-8870c807aeb2"),
				Enabled:             pulumi.Bool(true),
				TimeToLiveInSeconds: pulumi.Int(3600),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
import static com.pulumi.codegen.internal.Serialization.*;

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

    public static void stack(Context ctx) {
        var company = new FusionAuthEntityType("company", FusionAuthEntityTypeArgs.builder()        
            .data(serializeJson(
                jsonObject(
                    jsonProperty("createdBy", "jared@fusionauth.io")
                )))
            .jwtConfiguration(FusionAuthEntityTypeJwtConfigurationArgs.builder()
                .accessTokenKeyId("a7516c7c-6234-4021-b0b4-8870c807aeb2")
                .enabled(true)
                .timeToLiveInSeconds(3600)
                .build())
            .build());

    }
}
import pulumi
import json
import theogravity_pulumi-fusionauth as fusionauth

company = fusionauth.FusionAuthEntityType("company",
    data=json.dumps({
        "createdBy": "jared@fusionauth.io",
    }),
    jwt_configuration=fusionauth.FusionAuthEntityTypeJwtConfigurationArgs(
        access_token_key_id="a7516c7c-6234-4021-b0b4-8870c807aeb2",
        enabled=True,
        time_to_live_in_seconds=3600,
    ))
import * as pulumi from "@pulumi/pulumi";
import * as pulumi_fusionauth from "pulumi-fusionauth";

const company = new fusionauth.FusionAuthEntityType("company", {
    data: JSON.stringify({
        createdBy: "jared@fusionauth.io",
    }),
    jwtConfiguration: {
        accessTokenKeyId: "a7516c7c-6234-4021-b0b4-8870c807aeb2",
        enabled: true,
        timeToLiveInSeconds: 3600,
    },
});
resources:
  company:
    type: fusionauth:FusionAuthEntityType
    properties:
      data:
        Fn::ToJSON:
          createdBy: jared@fusionauth.io
      jwtConfiguration:
        accessTokenKeyId: a7516c7c-6234-4021-b0b4-8870c807aeb2
        enabled: true
        timeToLiveInSeconds: 3600

Create a FusionAuthEntityType Resource

new FusionAuthEntityType(name: string, args?: FusionAuthEntityTypeArgs, opts?: CustomResourceOptions);
@overload
def FusionAuthEntityType(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         data: Optional[str] = None,
                         entity_type_id: Optional[str] = None,
                         jwt_configuration: Optional[FusionAuthEntityTypeJwtConfigurationArgs] = None,
                         name: Optional[str] = None)
@overload
def FusionAuthEntityType(resource_name: str,
                         args: Optional[FusionAuthEntityTypeArgs] = None,
                         opts: Optional[ResourceOptions] = None)
func NewFusionAuthEntityType(ctx *Context, name string, args *FusionAuthEntityTypeArgs, opts ...ResourceOption) (*FusionAuthEntityType, error)
public FusionAuthEntityType(string name, FusionAuthEntityTypeArgs? args = null, CustomResourceOptions? opts = null)
public FusionAuthEntityType(String name, FusionAuthEntityTypeArgs args)
public FusionAuthEntityType(String name, FusionAuthEntityTypeArgs args, CustomResourceOptions options)
type: fusionauth:FusionAuthEntityType
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args FusionAuthEntityTypeArgs
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 FusionAuthEntityTypeArgs
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 FusionAuthEntityTypeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args FusionAuthEntityTypeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args FusionAuthEntityTypeArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

FusionAuthEntityType 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 FusionAuthEntityType resource accepts the following input properties:

Data string

An object that can hold any information about the Entity Type that should be persisted. Must be a JSON string.

EntityTypeId string

The ID to use for the new Entity Type. If not specified a secure random UUID will be generated.

JwtConfiguration theogravity.Fusionauth.Inputs.FusionAuthEntityTypeJwtConfigurationArgs

A block to configure JSON Web Token (JWT) options.

Name string

A descriptive name for the entity type (i.e. Customer or Email_Service).

Data string

An object that can hold any information about the Entity Type that should be persisted. Must be a JSON string.

EntityTypeId string

The ID to use for the new Entity Type. If not specified a secure random UUID will be generated.

JwtConfiguration FusionAuthEntityTypeJwtConfigurationArgs

A block to configure JSON Web Token (JWT) options.

Name string

A descriptive name for the entity type (i.e. Customer or Email_Service).

data String

An object that can hold any information about the Entity Type that should be persisted. Must be a JSON string.

entityTypeId String

The ID to use for the new Entity Type. If not specified a secure random UUID will be generated.

jwtConfiguration FusionAuthEntityTypeJwtConfigurationArgs

A block to configure JSON Web Token (JWT) options.

name String

A descriptive name for the entity type (i.e. Customer or Email_Service).

data string

An object that can hold any information about the Entity Type that should be persisted. Must be a JSON string.

entityTypeId string

The ID to use for the new Entity Type. If not specified a secure random UUID will be generated.

jwtConfiguration FusionAuthEntityTypeJwtConfigurationArgs

A block to configure JSON Web Token (JWT) options.

name string

A descriptive name for the entity type (i.e. Customer or Email_Service).

data str

An object that can hold any information about the Entity Type that should be persisted. Must be a JSON string.

entity_type_id str

The ID to use for the new Entity Type. If not specified a secure random UUID will be generated.

jwt_configuration FusionAuthEntityTypeJwtConfigurationArgs

A block to configure JSON Web Token (JWT) options.

name str

A descriptive name for the entity type (i.e. Customer or Email_Service).

data String

An object that can hold any information about the Entity Type that should be persisted. Must be a JSON string.

entityTypeId String

The ID to use for the new Entity Type. If not specified a secure random UUID will be generated.

jwtConfiguration Property Map

A block to configure JSON Web Token (JWT) options.

name String

A descriptive name for the entity type (i.e. Customer or Email_Service).

Outputs

All input properties are implicitly available as output properties. Additionally, the FusionAuthEntityType 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 FusionAuthEntityType Resource

Get an existing FusionAuthEntityType 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?: FusionAuthEntityTypeState, opts?: CustomResourceOptions): FusionAuthEntityType
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        data: Optional[str] = None,
        entity_type_id: Optional[str] = None,
        jwt_configuration: Optional[FusionAuthEntityTypeJwtConfigurationArgs] = None,
        name: Optional[str] = None) -> FusionAuthEntityType
func GetFusionAuthEntityType(ctx *Context, name string, id IDInput, state *FusionAuthEntityTypeState, opts ...ResourceOption) (*FusionAuthEntityType, error)
public static FusionAuthEntityType Get(string name, Input<string> id, FusionAuthEntityTypeState? state, CustomResourceOptions? opts = null)
public static FusionAuthEntityType get(String name, Output<String> id, FusionAuthEntityTypeState 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:
Data string

An object that can hold any information about the Entity Type that should be persisted. Must be a JSON string.

EntityTypeId string

The ID to use for the new Entity Type. If not specified a secure random UUID will be generated.

JwtConfiguration theogravity.Fusionauth.Inputs.FusionAuthEntityTypeJwtConfigurationArgs

A block to configure JSON Web Token (JWT) options.

Name string

A descriptive name for the entity type (i.e. Customer or Email_Service).

Data string

An object that can hold any information about the Entity Type that should be persisted. Must be a JSON string.

EntityTypeId string

The ID to use for the new Entity Type. If not specified a secure random UUID will be generated.

JwtConfiguration FusionAuthEntityTypeJwtConfigurationArgs

A block to configure JSON Web Token (JWT) options.

Name string

A descriptive name for the entity type (i.e. Customer or Email_Service).

data String

An object that can hold any information about the Entity Type that should be persisted. Must be a JSON string.

entityTypeId String

The ID to use for the new Entity Type. If not specified a secure random UUID will be generated.

jwtConfiguration FusionAuthEntityTypeJwtConfigurationArgs

A block to configure JSON Web Token (JWT) options.

name String

A descriptive name for the entity type (i.e. Customer or Email_Service).

data string

An object that can hold any information about the Entity Type that should be persisted. Must be a JSON string.

entityTypeId string

The ID to use for the new Entity Type. If not specified a secure random UUID will be generated.

jwtConfiguration FusionAuthEntityTypeJwtConfigurationArgs

A block to configure JSON Web Token (JWT) options.

name string

A descriptive name for the entity type (i.e. Customer or Email_Service).

data str

An object that can hold any information about the Entity Type that should be persisted. Must be a JSON string.

entity_type_id str

The ID to use for the new Entity Type. If not specified a secure random UUID will be generated.

jwt_configuration FusionAuthEntityTypeJwtConfigurationArgs

A block to configure JSON Web Token (JWT) options.

name str

A descriptive name for the entity type (i.e. Customer or Email_Service).

data String

An object that can hold any information about the Entity Type that should be persisted. Must be a JSON string.

entityTypeId String

The ID to use for the new Entity Type. If not specified a secure random UUID will be generated.

jwtConfiguration Property Map

A block to configure JSON Web Token (JWT) options.

name String

A descriptive name for the entity type (i.e. Customer or Email_Service).

Supporting Types

FusionAuthEntityTypeJwtConfiguration

AccessTokenKeyId string

The unique ID of the signing key used to sign the access token. Required when enabled is set to true.

Enabled bool

Indicates if this application is using the JWT configuration defined here or the global JWT configuration defined by the Tenant. If this is false the signing algorithm configured in the Tenant will be used. If true the signing algorithm defined in this application will be used.

TimeToLiveInSeconds int

The length of time in seconds the JWT will live before it is expired and no longer valid. Required when enabled is set to true.

AccessTokenKeyId string

The unique ID of the signing key used to sign the access token. Required when enabled is set to true.

Enabled bool

Indicates if this application is using the JWT configuration defined here or the global JWT configuration defined by the Tenant. If this is false the signing algorithm configured in the Tenant will be used. If true the signing algorithm defined in this application will be used.

TimeToLiveInSeconds int

The length of time in seconds the JWT will live before it is expired and no longer valid. Required when enabled is set to true.

accessTokenKeyId String

The unique ID of the signing key used to sign the access token. Required when enabled is set to true.

enabled Boolean

Indicates if this application is using the JWT configuration defined here or the global JWT configuration defined by the Tenant. If this is false the signing algorithm configured in the Tenant will be used. If true the signing algorithm defined in this application will be used.

timeToLiveInSeconds Integer

The length of time in seconds the JWT will live before it is expired and no longer valid. Required when enabled is set to true.

accessTokenKeyId string

The unique ID of the signing key used to sign the access token. Required when enabled is set to true.

enabled boolean

Indicates if this application is using the JWT configuration defined here or the global JWT configuration defined by the Tenant. If this is false the signing algorithm configured in the Tenant will be used. If true the signing algorithm defined in this application will be used.

timeToLiveInSeconds number

The length of time in seconds the JWT will live before it is expired and no longer valid. Required when enabled is set to true.

access_token_key_id str

The unique ID of the signing key used to sign the access token. Required when enabled is set to true.

enabled bool

Indicates if this application is using the JWT configuration defined here or the global JWT configuration defined by the Tenant. If this is false the signing algorithm configured in the Tenant will be used. If true the signing algorithm defined in this application will be used.

time_to_live_in_seconds int

The length of time in seconds the JWT will live before it is expired and no longer valid. Required when enabled is set to true.

accessTokenKeyId String

The unique ID of the signing key used to sign the access token. Required when enabled is set to true.

enabled Boolean

Indicates if this application is using the JWT configuration defined here or the global JWT configuration defined by the Tenant. If this is false the signing algorithm configured in the Tenant will be used. If true the signing algorithm defined in this application will be used.

timeToLiveInSeconds Number

The length of time in seconds the JWT will live before it is expired and no longer valid. Required when enabled is set to true.

Package Details

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

This Pulumi package is based on the fusionauth Terraform Provider.