EventRelayConfig

Represents the configuration of an event relay, which relays platform events and change data capture events from Salesforce to Amazon EventBridge.

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

EventRelayConfig components have the suffix .eventRelay and are stored in the eventRelays folder.

Version 

Introduced in API version 56.0.

Special Access Rules 

  • You must have the Customize Application permission to deploy and retrieve this type.
  • You can update only the state and relayOption fields and not eventChannel or destinationResourceName.

Fields 

destinationResourceName 

  • Type: string
  • Required: Yes
  • Description: Required. The developer name of the named credential, which stores the AWS account information. The destinationResourceName value contains the callout: prefix. For example: callout:MyRelayNamedCredential

eventChannel 

  • Type: string
  • Required: Yes
  • Description: Required. The full name of the event channel used in the event relay. For example: MyRelayChannel__chn

label 

  • Type: string
  • Required: No
  • Description: The label for the event relay. The label is displayed in the user interface. Make sure you use a meaningful label that describes your event relay and try to make it unique.

relayOption 

  • Type: string (enumeration of type string)
  • Required: No
  • Description: A JSON-encoded string that contains an option for resuming an event relay after the system recovers from an error. This option is used if the event relay can’t resume after the last relayed event. The options available are:
  • Possible values:
    • {“ReplayRecovery”:“LATEST”} — (Default) Start relaying events from new events received in the event bus. Use this option if you aren’t interested in missed events while the relay was down.
    • {“ReplayRecovery”:“EARLIEST”} — Resend all events stored in the event bus and relay new events thereafter. The event bus stores events for up to three days. Use this option if you want to reprocess all stored events and catch up on missed events.

state 

  • Type: EventRelayAdminState (enumeration of type string)
  • Required: No
  • Description: The execution state of the event relay.
  • Possible values:
    • RUN — The event relay is running and actively relaying event messages from Salesforce to Amazon EventBridge.

    • PAUSE — An administrator paused the event relay. No events are relayed to Amazon EventBridge during this status. All current state information is saved.

    • STOP — (Default) The event relay is stopped and no events are relayed to Amazon EventBridge. All current state information is deleted.

      The event relay is created with a default state of STOP if you don’t specify this field. If you specify this field when creating an event relay, the only valid value you can set is STOP.

    • DELETE — Reserved for future use.

usageType 

  • Type: EventRelayUsageType (enumeration of type string)
  • Required: No
  • Description: Reserved for future use.

Declarative Metadata Sample Definition 

The following is an example of an EventRelayConfig component with the file name Carbon_Comparison_Relay.eventRelay.

1<?xml version="1.0" encoding="UTF-8"?>
2<EventRelayConfig xmlns="http://soap.sforce.com/2006/04/metadata">
3    <destinationResourceName>callout:AWS_Account</destinationResourceName>
4    <eventChannel>Carbon_Comparison_Channel__chn</eventChannel>
5    <label>Carbon Comparison Relay</label>
6    <relayOption>{\"ReplayRecovery\":\"LATEST\"}</relayOption>
7    <state>STOP</state>
8</EventRelayConfig>

The following is an example package.xml that references the previous definition.

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <types>
4        <members>Carbon_Comparison_Relay</members>
5        <name>EventRelayConfig</name>
6    </types>
7    <version>68.0</version>
8</Package>

Wildcard Support in the Manifest File 

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.