New-FilesEventSubscription

Create Event Subscription.

Syntax

New-FilesEventSubscription [-EventChannelId <System.Int64>] [-WorkspaceId <System.Int64>] [-ApplyToAllWorkspaces <System.Boolean>] -Name <System.String> [-Subject <System.String>] [-Message <System.String>] [-MessageOnly <System.Boolean>] [-Enabled <System.Boolean>] [-EventTypes <System.String[]>] [-Filter <System.Collections.IDictionary>] [-DeliveryPolicy <System.Collections.IDictionary>] [-EventTargetIds <System.Int64[]>] [-Connection <FilesCom.PowerShell.FilesConnection>] [-WorkspaceScope <System.Int64>] [-NoWorkspaceScope] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

Create Event Subscription.

The command supports -WhatIf, which describes the change without sending it to Files.com, and -Confirm, which asks before sending it.

Examples

Example 1: Create Event Subscription

New-FilesEventSubscription -Name 'example' -EventChannelId 1 -WorkspaceId 1

Writes the event subscription returned.

Example 2: Preview the change

New-FilesEventSubscription -Name 'example' -EventChannelId 1 -WorkspaceId 1 -WhatIf

Describes the change without sending anything to Files.com.

Parameters

-EventChannelId

Event Channel ID

  • Type: System.Int64
  • Parameter sets: (All)

-WorkspaceId

Workspace ID. 0 means the default workspace or site-wide.

  • Type: System.Int64
  • Parameter sets: (All)

-ApplyToAllWorkspaces

If true, this default-workspace subscription applies to events from all workspaces.

  • Type: System.Boolean
  • Parameter sets: (All)

-Name

Event Subscription name.

  • Type: System.String
  • Parameter sets: (All) (required)

-Subject

Custom subject line to use for notification emails.

  • Type: System.String
  • Parameter sets: (All)

-Message

Custom message to include in notification emails.

  • Type: System.String
  • Parameter sets: (All)

-MessageOnly

If true, notification email bodies contain only the custom message, omitting event details and the review button. Requires a custom message, defaults to false, and does not affect non-email targets.

  • Type: System.Boolean
  • Parameter sets: (All)

-Enabled

Whether this Event Subscription can dispatch events.

  • Type: System.Boolean
  • Parameter sets: (All)

-EventTypes

Event type strings matched by this subscription. Blank means all event types. Valid values: automation_run.canceled.v1, automation_run.failure.v1, automation_run.failure_will_retry.v1, automation_run.partial_failure.v1, automation_run.partial_failure_will_retry.v1, automation_run.skipped.v1, automation_run.success.v1, expectation_evaluation.invalid.v1, expectation_evaluation.late.v1, expectation_evaluation.missing.v1, expectation_evaluation.success.v1, expectation_incident.acknowledged.v1, expectation_incident.open.v1, expectation_incident.resolved.v1, expectation_incident.snoozed.v1, external_event.client_log.failure.v1, external_event.client_log.partial_failure.v1, external_event.client_log.skipped.v1, external_event.client_log.success.v1, pending_work_event.failure.v1, pending_work_event.partial_failure.v1, pending_work_event.skipped.v1, pending_work_event.success.v1, siem_http_destination_event.failure.v1, siem_http_destination_event.partial_failure.v1, siem_http_destination_event.skipped.v1, siem_http_destination_event.success.v1, sso_event.ldap_login.failure.v1, sso_event.ldap_login.partial_failure.v1, sso_event.ldap_login.skipped.v1, sso_event.ldap_login.success.v1, sso_event.ldap_sync.failure.v1, sso_event.ldap_sync.partial_failure.v1, sso_event.ldap_sync.skipped.v1, sso_event.ldap_sync.success.v1, sso_event.saml_login.failure.v1, sso_event.saml_login.partial_failure.v1, sso_event.saml_login.skipped.v1, sso_event.saml_login.success.v1, sync_run.failure.v1, sync_run.partial_failure.v1, sync_run.skipped.v1, sync_run.success.v1, user_security_event.lockout.v1

  • Type: System.String[]
  • Parameter sets: (All)

-Filter

Conditions on event fields that an event must meet to be delivered, keyed by dot-notation field path. All conditions must match. Give a hashtable or PSCustomObject; keys keep their case and values their types.

  • Type: System.Collections.IDictionary
  • Parameter sets: (All)

-DeliveryPolicy

Event Subscription delivery policy. Give a hashtable or PSCustomObject; keys keep their case and values their types.

  • Type: System.Collections.IDictionary
  • Parameter sets: (All)

-EventTargetIds

Event Target IDs this subscription sends to.

  • Type: System.Int64[]
  • Parameter sets: (All)

-Connection

The connection to use, from Connect-FilesAccount. Defaults to the connection of the -InputObject or -Continuation given, and otherwise to the current runspace's default connection.

  • Type: FilesCom.PowerShell.FilesConnection
  • Parameter sets: (All)

-WorkspaceScope

Runs this command's requests in this workspace, including workspace 0, instead of the connection's or, for an -InputObject, instead of the workspace the object was read in. The connection and the object are unchanged.

  • Type: System.Int64
  • Parameter sets: (All)

-NoWorkspaceScope

Runs this command's requests in no workspace, even if the connection has one. The connection itself is unchanged.

  • Type: System.Management.Automation.SwitchParameter
  • Parameter sets: (All)

-Confirm

Prompts you for confirmation before running the cmdlet.

  • Type: System.Management.Automation.SwitchParameter
  • Confirm impact: Medium. At the default $ConfirmPreference of High, the command runs without asking; -Confirm makes it ask before each change.

-WhatIf

Shows what the cmdlet would change without sending anything to Files.com.

  • Type: System.Management.Automation.SwitchParameter

Common Parameters

This cmdlet supports the PowerShell common parameters, such as -Verbose and -ErrorAction.

Inputs

None. The command takes no pipeline input.

Outputs

  • FilesCom.PowerShell.Models.EventSubscription: the event subscription as Files.com returned it.

Notes

Failures are written as error records with IDs such as Files.NotFound or Files.Authentication. Run Get-Help about_FilesCom for connections, paging, errors and previewing changes.