1. Packages
  2. FusionAuth
  3. API Docs
  4. FusionAuthEntity
FusionAuth v6.0.2 published on Sunday, Feb 9, 2025 by Theo Gravity

fusionauth.FusionAuthEntity

Explore with Pulumi AI

# Entity Resource

Entities are arbitrary objects which can be modeled in FusionAuth. Anything which is not a user but might need permissions managed by FusionAuth is a possible entity. Examples might include devices, cars, computers, customers, companies, etc.

FusionAuth’s Entity Management has the following major concepts:

  • Entity Types categorize Entities. An Entity Type could be Device, API or Company.
  • Permissions are defined on an Entity Type. These are arbitrary strings which can fit the business domain. A Permission could be read, write, or file-lawsuit.
  • Entities are instances of a single type. An Entity could be a nest device, an Email API or Raviga.
  • Entities can have Grants. Grants are relationships between a target Entity and one of two other types: a recipient Entity or a User. Grants can have zero or more Permissions associated with them.

You can use the Client Credentials grant to see if an Entity has permission to access another Entity.

Entity API

Create FusionAuthEntity Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new FusionAuthEntity(name: string, args: FusionAuthEntityArgs, opts?: CustomResourceOptions);
@overload
def FusionAuthEntity(resource_name: str,
                     args: FusionAuthEntityArgs,
                     opts: Optional[ResourceOptions] = None)

@overload
def FusionAuthEntity(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     entity_type_id: Optional[str] = None,
                     client_id: Optional[str] = None,
                     client_secret: Optional[str] = None,
                     data: Optional[str] = None,
                     entity_id: Optional[str] = None,
                     name: Optional[str] = None,
                     tenant_id: Optional[str] = None)
func NewFusionAuthEntity(ctx *Context, name string, args FusionAuthEntityArgs, opts ...ResourceOption) (*FusionAuthEntity, error)
public FusionAuthEntity(string name, FusionAuthEntityArgs args, CustomResourceOptions? opts = null)
public FusionAuthEntity(String name, FusionAuthEntityArgs args)
public FusionAuthEntity(String name, FusionAuthEntityArgs args, CustomResourceOptions options)
type: fusionauth:FusionAuthEntity
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

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

Constructor example

The following reference example uses placeholder values for all input properties.

var fusionAuthEntityResource = new Fusionauth.FusionAuthEntity("fusionAuthEntityResource", new()
{
    EntityTypeId = "string",
    ClientId = "string",
    ClientSecret = "string",
    Data = "string",
    EntityId = "string",
    Name = "string",
    TenantId = "string",
});
Copy
example, err := fusionauth.NewFusionAuthEntity(ctx, "fusionAuthEntityResource", &fusionauth.FusionAuthEntityArgs{
	EntityTypeId: pulumi.String("string"),
	ClientId:     pulumi.String("string"),
	ClientSecret: pulumi.String("string"),
	Data:         pulumi.String("string"),
	EntityId:     pulumi.String("string"),
	Name:         pulumi.String("string"),
	TenantId:     pulumi.String("string"),
})
Copy
var fusionAuthEntityResource = new FusionAuthEntity("fusionAuthEntityResource", FusionAuthEntityArgs.builder()
    .entityTypeId("string")
    .clientId("string")
    .clientSecret("string")
    .data("string")
    .entityId("string")
    .name("string")
    .tenantId("string")
    .build());
Copy
fusion_auth_entity_resource = fusionauth.FusionAuthEntity("fusionAuthEntityResource",
    entity_type_id="string",
    client_id="string",
    client_secret="string",
    data="string",
    entity_id="string",
    name="string",
    tenant_id="string")
Copy
const fusionAuthEntityResource = new fusionauth.FusionAuthEntity("fusionAuthEntityResource", {
    entityTypeId: "string",
    clientId: "string",
    clientSecret: "string",
    data: "string",
    entityId: "string",
    name: "string",
    tenantId: "string",
});
Copy
type: fusionauth:FusionAuthEntity
properties:
    clientId: string
    clientSecret: string
    data: string
    entityId: string
    entityTypeId: string
    name: string
    tenantId: string
Copy

FusionAuthEntity Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The FusionAuthEntity resource accepts the following input properties:

EntityTypeId This property is required. string
The ID of the Entity Type. Types are consulted for permission checks.
ClientId string
The OAuth 2.0 client ID. If you leave this blank on create, the value of the Entity ID will be used. Must be a UUID.
ClientSecret string
The OAuth 2.0 client secret. If you leave this blank on create, a secure secret will be generated for you. If you leave this blank during an update, the previous value will be maintained. For both create and update you can provide a value and it will be stored.
Data string
An object that can hold any information about the Entity that should be persisted. Please review the limits on data field types as you plan for and build your custom data schema. Must be a JSON serialised string.
EntityId Changes to this property will trigger replacement. string
The ID to use for the new Entity. If not specified a secure random UUID will be generated.
Name string
A descriptive name for the Entity (i.e. "Raviga" or "Email Service").
TenantId Changes to this property will trigger replacement. string

The unique ID of the tenant used to scope this API request.

For more information see: FusionAuth Entity Management API Overview

EntityTypeId This property is required. string
The ID of the Entity Type. Types are consulted for permission checks.
ClientId string
The OAuth 2.0 client ID. If you leave this blank on create, the value of the Entity ID will be used. Must be a UUID.
ClientSecret string
The OAuth 2.0 client secret. If you leave this blank on create, a secure secret will be generated for you. If you leave this blank during an update, the previous value will be maintained. For both create and update you can provide a value and it will be stored.
Data string
An object that can hold any information about the Entity that should be persisted. Please review the limits on data field types as you plan for and build your custom data schema. Must be a JSON serialised string.
EntityId Changes to this property will trigger replacement. string
The ID to use for the new Entity. If not specified a secure random UUID will be generated.
Name string
A descriptive name for the Entity (i.e. "Raviga" or "Email Service").
TenantId Changes to this property will trigger replacement. string

The unique ID of the tenant used to scope this API request.

For more information see: FusionAuth Entity Management API Overview

entityTypeId This property is required. String
The ID of the Entity Type. Types are consulted for permission checks.
clientId String
The OAuth 2.0 client ID. If you leave this blank on create, the value of the Entity ID will be used. Must be a UUID.
clientSecret String
The OAuth 2.0 client secret. If you leave this blank on create, a secure secret will be generated for you. If you leave this blank during an update, the previous value will be maintained. For both create and update you can provide a value and it will be stored.
data String
An object that can hold any information about the Entity that should be persisted. Please review the limits on data field types as you plan for and build your custom data schema. Must be a JSON serialised string.
entityId Changes to this property will trigger replacement. String
The ID to use for the new Entity. If not specified a secure random UUID will be generated.
name String
A descriptive name for the Entity (i.e. "Raviga" or "Email Service").
tenantId Changes to this property will trigger replacement. String

The unique ID of the tenant used to scope this API request.

For more information see: FusionAuth Entity Management API Overview

entityTypeId This property is required. string
The ID of the Entity Type. Types are consulted for permission checks.
clientId string
The OAuth 2.0 client ID. If you leave this blank on create, the value of the Entity ID will be used. Must be a UUID.
clientSecret string
The OAuth 2.0 client secret. If you leave this blank on create, a secure secret will be generated for you. If you leave this blank during an update, the previous value will be maintained. For both create and update you can provide a value and it will be stored.
data string
An object that can hold any information about the Entity that should be persisted. Please review the limits on data field types as you plan for and build your custom data schema. Must be a JSON serialised string.
entityId Changes to this property will trigger replacement. string
The ID to use for the new Entity. If not specified a secure random UUID will be generated.
name string
A descriptive name for the Entity (i.e. "Raviga" or "Email Service").
tenantId Changes to this property will trigger replacement. string

The unique ID of the tenant used to scope this API request.

For more information see: FusionAuth Entity Management API Overview

entity_type_id This property is required. str
The ID of the Entity Type. Types are consulted for permission checks.
client_id str
The OAuth 2.0 client ID. If you leave this blank on create, the value of the Entity ID will be used. Must be a UUID.
client_secret str
The OAuth 2.0 client secret. If you leave this blank on create, a secure secret will be generated for you. If you leave this blank during an update, the previous value will be maintained. For both create and update you can provide a value and it will be stored.
data str
An object that can hold any information about the Entity that should be persisted. Please review the limits on data field types as you plan for and build your custom data schema. Must be a JSON serialised string.
entity_id Changes to this property will trigger replacement. str
The ID to use for the new Entity. If not specified a secure random UUID will be generated.
name str
A descriptive name for the Entity (i.e. "Raviga" or "Email Service").
tenant_id Changes to this property will trigger replacement. str

The unique ID of the tenant used to scope this API request.

For more information see: FusionAuth Entity Management API Overview

entityTypeId This property is required. String
The ID of the Entity Type. Types are consulted for permission checks.
clientId String
The OAuth 2.0 client ID. If you leave this blank on create, the value of the Entity ID will be used. Must be a UUID.
clientSecret String
The OAuth 2.0 client secret. If you leave this blank on create, a secure secret will be generated for you. If you leave this blank during an update, the previous value will be maintained. For both create and update you can provide a value and it will be stored.
data String
An object that can hold any information about the Entity that should be persisted. Please review the limits on data field types as you plan for and build your custom data schema. Must be a JSON serialised string.
entityId Changes to this property will trigger replacement. String
The ID to use for the new Entity. If not specified a secure random UUID will be generated.
name String
A descriptive name for the Entity (i.e. "Raviga" or "Email Service").
tenantId Changes to this property will trigger replacement. String

The unique ID of the tenant used to scope this API request.

For more information see: FusionAuth Entity Management API Overview

Outputs

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

Get an existing FusionAuthEntity 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?: FusionAuthEntityState, opts?: CustomResourceOptions): FusionAuthEntity
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        client_id: Optional[str] = None,
        client_secret: Optional[str] = None,
        data: Optional[str] = None,
        entity_id: Optional[str] = None,
        entity_type_id: Optional[str] = None,
        name: Optional[str] = None,
        tenant_id: Optional[str] = None) -> FusionAuthEntity
func GetFusionAuthEntity(ctx *Context, name string, id IDInput, state *FusionAuthEntityState, opts ...ResourceOption) (*FusionAuthEntity, error)
public static FusionAuthEntity Get(string name, Input<string> id, FusionAuthEntityState? state, CustomResourceOptions? opts = null)
public static FusionAuthEntity get(String name, Output<String> id, FusionAuthEntityState state, CustomResourceOptions options)
resources:  _:    type: fusionauth:FusionAuthEntity    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ClientId string
The OAuth 2.0 client ID. If you leave this blank on create, the value of the Entity ID will be used. Must be a UUID.
ClientSecret string
The OAuth 2.0 client secret. If you leave this blank on create, a secure secret will be generated for you. If you leave this blank during an update, the previous value will be maintained. For both create and update you can provide a value and it will be stored.
Data string
An object that can hold any information about the Entity that should be persisted. Please review the limits on data field types as you plan for and build your custom data schema. Must be a JSON serialised string.
EntityId Changes to this property will trigger replacement. string
The ID to use for the new Entity. If not specified a secure random UUID will be generated.
EntityTypeId string
The ID of the Entity Type. Types are consulted for permission checks.
Name string
A descriptive name for the Entity (i.e. "Raviga" or "Email Service").
TenantId Changes to this property will trigger replacement. string

The unique ID of the tenant used to scope this API request.

For more information see: FusionAuth Entity Management API Overview

ClientId string
The OAuth 2.0 client ID. If you leave this blank on create, the value of the Entity ID will be used. Must be a UUID.
ClientSecret string
The OAuth 2.0 client secret. If you leave this blank on create, a secure secret will be generated for you. If you leave this blank during an update, the previous value will be maintained. For both create and update you can provide a value and it will be stored.
Data string
An object that can hold any information about the Entity that should be persisted. Please review the limits on data field types as you plan for and build your custom data schema. Must be a JSON serialised string.
EntityId Changes to this property will trigger replacement. string
The ID to use for the new Entity. If not specified a secure random UUID will be generated.
EntityTypeId string
The ID of the Entity Type. Types are consulted for permission checks.
Name string
A descriptive name for the Entity (i.e. "Raviga" or "Email Service").
TenantId Changes to this property will trigger replacement. string

The unique ID of the tenant used to scope this API request.

For more information see: FusionAuth Entity Management API Overview

clientId String
The OAuth 2.0 client ID. If you leave this blank on create, the value of the Entity ID will be used. Must be a UUID.
clientSecret String
The OAuth 2.0 client secret. If you leave this blank on create, a secure secret will be generated for you. If you leave this blank during an update, the previous value will be maintained. For both create and update you can provide a value and it will be stored.
data String
An object that can hold any information about the Entity that should be persisted. Please review the limits on data field types as you plan for and build your custom data schema. Must be a JSON serialised string.
entityId Changes to this property will trigger replacement. String
The ID to use for the new Entity. If not specified a secure random UUID will be generated.
entityTypeId String
The ID of the Entity Type. Types are consulted for permission checks.
name String
A descriptive name for the Entity (i.e. "Raviga" or "Email Service").
tenantId Changes to this property will trigger replacement. String

The unique ID of the tenant used to scope this API request.

For more information see: FusionAuth Entity Management API Overview

clientId string
The OAuth 2.0 client ID. If you leave this blank on create, the value of the Entity ID will be used. Must be a UUID.
clientSecret string
The OAuth 2.0 client secret. If you leave this blank on create, a secure secret will be generated for you. If you leave this blank during an update, the previous value will be maintained. For both create and update you can provide a value and it will be stored.
data string
An object that can hold any information about the Entity that should be persisted. Please review the limits on data field types as you plan for and build your custom data schema. Must be a JSON serialised string.
entityId Changes to this property will trigger replacement. string
The ID to use for the new Entity. If not specified a secure random UUID will be generated.
entityTypeId string
The ID of the Entity Type. Types are consulted for permission checks.
name string
A descriptive name for the Entity (i.e. "Raviga" or "Email Service").
tenantId Changes to this property will trigger replacement. string

The unique ID of the tenant used to scope this API request.

For more information see: FusionAuth Entity Management API Overview

client_id str
The OAuth 2.0 client ID. If you leave this blank on create, the value of the Entity ID will be used. Must be a UUID.
client_secret str
The OAuth 2.0 client secret. If you leave this blank on create, a secure secret will be generated for you. If you leave this blank during an update, the previous value will be maintained. For both create and update you can provide a value and it will be stored.
data str
An object that can hold any information about the Entity that should be persisted. Please review the limits on data field types as you plan for and build your custom data schema. Must be a JSON serialised string.
entity_id Changes to this property will trigger replacement. str
The ID to use for the new Entity. If not specified a secure random UUID will be generated.
entity_type_id str
The ID of the Entity Type. Types are consulted for permission checks.
name str
A descriptive name for the Entity (i.e. "Raviga" or "Email Service").
tenant_id Changes to this property will trigger replacement. str

The unique ID of the tenant used to scope this API request.

For more information see: FusionAuth Entity Management API Overview

clientId String
The OAuth 2.0 client ID. If you leave this blank on create, the value of the Entity ID will be used. Must be a UUID.
clientSecret String
The OAuth 2.0 client secret. If you leave this blank on create, a secure secret will be generated for you. If you leave this blank during an update, the previous value will be maintained. For both create and update you can provide a value and it will be stored.
data String
An object that can hold any information about the Entity that should be persisted. Please review the limits on data field types as you plan for and build your custom data schema. Must be a JSON serialised string.
entityId Changes to this property will trigger replacement. String
The ID to use for the new Entity. If not specified a secure random UUID will be generated.
entityTypeId String
The ID of the Entity Type. Types are consulted for permission checks.
name String
A descriptive name for the Entity (i.e. "Raviga" or "Email Service").
tenantId Changes to this property will trigger replacement. String

The unique ID of the tenant used to scope this API request.

For more information see: FusionAuth Entity Management API Overview

Package Details

Repository
fusionauth theogravity/pulumi-fusionauth
License
MIT
Notes
This Pulumi package is based on the fusionauth Terraform Provider.