Set-FilesEventSubscription

Update Event Subscription.

Syntax

Id (Default)

Set-FilesEventSubscription [-Id] <System.Int64> [-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>]

InputObject

Set-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[]>] -InputObject <FilesCom.PowerShell.Models.EventSubscription> [-Connection <FilesCom.PowerShell.FilesConnection>] [-WorkspaceScope <System.Int64>] [-NoWorkspaceScope] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

Update Event Subscription.

The command accepts event subscriptions from the pipeline as -InputObject, and uses each one's Id and the connection that fetched it.

When given -InputObject, the command updates that object with the values Files.com returns and writes it.

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

Examples

Example 1: Update Event Subscription

Set-FilesEventSubscription -Id 1 -EventChannelId 1 -WorkspaceId 1

Writes the event subscription as Files.com returns it.

Example 2: Act on event subscriptions from the pipeline

Get-FilesEventSubscription -Id 1 | Set-FilesEventSubscription -EventChannelId 1 -WorkspaceId 1

Takes the event subscription from the pipeline and uses its Id and connection.

Example 3: Preview the change

Set-FilesEventSubscription -Id 1 -EventChannelId 1 -WorkspaceId 1 -WhatIf

Describes the change without sending anything to Files.com.

Parameters

-Id

Event Subscription ID.

  • Type: System.Int64
  • Parameter sets: Id (required, position 0)

-EventChannelId

Event Channel ID

  • Type: System.Int64
  • Parameter sets: Id, InputObject

-WorkspaceId

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

  • Type: System.Int64
  • Parameter sets: Id, InputObject

-ApplyToAllWorkspaces

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

  • Type: System.Boolean
  • Parameter sets: Id, InputObject

-Name

Event Subscription name.

  • Type: System.String
  • Parameter sets: Id, InputObject

-Subject

Custom subject line to use for notification emails.

  • Type: System.String
  • Parameter sets: Id, InputObject

-Message

Custom message to include in notification emails.

  • Type: System.String
  • Parameter sets: Id, InputObject

-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: Id, InputObject

-Enabled

Whether this Event Subscription can dispatch events.

  • Type: System.Boolean
  • Parameter sets: Id, InputObject

-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: Id, InputObject

-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: Id, InputObject

-DeliveryPolicy

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

  • Type: System.Collections.IDictionary
  • Parameter sets: Id, InputObject

-EventTargetIds

Event Target IDs this subscription sends to.

  • Type: System.Int64[]
  • Parameter sets: Id, InputObject

-InputObject

The event subscription to act on, such as one written by another command of the module, from the pipeline. The command uses its Id and the connection that fetched it.

  • Type: FilesCom.PowerShell.Models.EventSubscription
  • Parameter sets: InputObject (required)

-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

  • FilesCom.PowerShell.Models.EventSubscription: a event subscription from another command of the module, as -InputObject.

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.