RealmEvents
# keycloak..RealmEvents
Allows for managing Realm Events settings within Keycloak.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as keycloak from "@pulumi/keycloak";
const realm = new keycloak.Realm("realm", {
realm: "test",
});
const realmEvents = new keycloak.RealmEvents("realm_events", {
adminEventsDetailsEnabled: true,
adminEventsEnabled: true,
// When omitted or left empty, keycloak will enable all event types
enabledEventTypes: [
"LOGIN",
"LOGOUT",
],
eventsEnabled: true,
eventsExpiration: 3600,
eventsListeners: ["jboss-logging"],
realmId: realm.id,
});import pulumi
import pulumi_keycloak as keycloak
realm = keycloak.Realm("realm", realm="test")
realm_events = keycloak.RealmEvents("realmEvents",
admin_events_details_enabled=True,
admin_events_enabled=True,
enabled_event_types=[
"LOGIN",
"LOGOUT",
],
events_enabled=True,
events_expiration=3600,
events_listeners=["jboss-logging"],
realm_id=realm.id)using Pulumi;
using Keycloak = Pulumi.Keycloak;
class MyStack : Stack
{
public MyStack()
{
var realm = new Keycloak.Realm("realm", new Keycloak.RealmArgs
{
Realm = "test",
});
var realmEvents = new Keycloak.RealmEvents("realmEvents", new Keycloak.RealmEventsArgs
{
AdminEventsDetailsEnabled = true,
AdminEventsEnabled = true,
EnabledEventTypes =
{
"LOGIN",
"LOGOUT",
},
EventsEnabled = true,
EventsExpiration = 3600,
EventsListeners =
{
"jboss-logging",
},
RealmId = realm.Id,
});
}
}
Argument Reference
The following arguments are supported:
realm_id- (Required) The name of the realm the event settings apply to.admin_events_enabled- (Optional) When true, admin events are saved to the database, making them available through the admin console. Defaults tofalse.admin_events_details_enabled- (Optional) When true, saved admin events will included detailed information for create/update requests. Defaults tofalse.events_enabled- (Optional) When true, events fromenabled_event_typesare saved to the database, making them available through the admin console. Defaults tofalse.events_expiration- (Optional) The amount of time in seconds events will be saved in the database. Defaults to0or never.enabled_event_types- (Optional) The event types that will be saved to the database. Omitting this field enables all event types. Defaults to[]or all event types.events_listeners- (Optional) The event listeners that events should be sent to. Defaults to[]or none. Note that new realms enable thejboss-logginglistener by default, and this resource will remove that unless it is specified.
Create a RealmEvents Resource
new RealmEvents(name: string, args: RealmEventsArgs, opts?: CustomResourceOptions);def RealmEvents(resource_name, opts=None, admin_events_details_enabled=None, admin_events_enabled=None, enabled_event_types=None, events_enabled=None, events_expiration=None, events_listeners=None, realm_id=None, __props__=None);func NewRealmEvents(ctx *Context, name string, args RealmEventsArgs, opts ...ResourceOption) (*RealmEvents, error)public RealmEvents(string name, RealmEventsArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args RealmEventsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RealmEventsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RealmEventsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
RealmEvents Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The RealmEvents resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the RealmEvents resource produces the following output properties:
Look up an Existing RealmEvents Resource
Get an existing RealmEvents 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?: RealmEventsState, opts?: CustomResourceOptions): RealmEventsstatic get(resource_name, id, opts=None, admin_events_details_enabled=None, admin_events_enabled=None, enabled_event_types=None, events_enabled=None, events_expiration=None, events_listeners=None, realm_id=None, __props__=None);func GetRealmEvents(ctx *Context, name string, id IDInput, state *RealmEventsState, opts ...ResourceOption) (*RealmEvents, error)public static RealmEvents Get(string name, Input<string> id, RealmEventsState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
Package Details
- Repository
- https://github.com/pulumi/pulumi-keycloak
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
keycloakTerraform Provider.