1
1
import type { DestinationDefinition } from '@segment/actions-core'
2
2
import type { Settings } from './generated-types'
3
3
import { DEFAULT_REQUEST_TIMEOUT } from '@segment/actions-core'
4
-
5
4
import send from './send'
6
5
7
- import sendV2 from './sendV2'
8
-
9
6
const destination : DestinationDefinition < Settings > = {
10
7
name : 'Amazon Eventbridge' ,
11
8
slug : 'actions-amazon-eventbridge' ,
@@ -15,18 +12,16 @@ const destination: DestinationDefinition<Settings> = {
15
12
authentication : {
16
13
scheme : 'custom' ,
17
14
fields : {
18
- awsAccountId : {
15
+ accountId : {
19
16
type : 'string' ,
20
17
label : 'AWS Account ID' ,
21
- description : `The AWS Account ID that the event bus belongs to.
22
- This is used to generate the ARN for the event bus.` ,
18
+ description : `The AWS Account ID that the event bus belongs to. This is used to generate the ARN for the event bus.` ,
23
19
required : true
24
20
} ,
25
- awsRegion : {
21
+ region : {
26
22
type : 'string' ,
27
23
label : 'AWS Region' ,
28
24
description : 'The AWS region that the event bus belongs to.' ,
29
- disabledInputMethods : [ 'enrichment' , 'function' , 'variable' ] ,
30
25
required : true ,
31
26
choices : [
32
27
{ label : 'us-east-1' , value : 'us-east-1' } ,
@@ -45,30 +40,6 @@ const destination: DestinationDefinition<Settings> = {
45
40
{ label : 'ca-central-1' , value : 'ca-central-1' } ,
46
41
{ label : 'eu-central-1' , value : 'eu-central-1' }
47
42
]
48
- } ,
49
- partnerEventSourceName : {
50
- type : 'string' ,
51
- label : 'Partner Event Source Name' ,
52
- description : 'The name of the partner event source to use for the event bus.' ,
53
- required : true ,
54
- default : 'segment.com' ,
55
- choices : [
56
- { label : 'segment.com' , value : 'aws.partner/segment.com' } ,
57
- { label : 'segment.com.test' , value : 'aws.partner/segment.com.test' }
58
- ]
59
- } ,
60
- createPartnerEventSource : {
61
- type : 'boolean' ,
62
- label : 'Create Partner Event Source' ,
63
- description : `If enabled, Segment will check whether Partner Source identified by Segment source ID
64
- exists in EventBridge.
65
- If Partner Source does not exist, Segment will create a new Partner Source.` ,
66
- default : false
67
- }
68
- } ,
69
- testAuthentication : async ( _request , { settings } ) => {
70
- if ( ! settings . awsAccountId || ! settings . awsRegion ) {
71
- throw new Error ( 'AWS Account ID and Region are required.' )
72
43
}
73
44
}
74
45
} ,
@@ -78,8 +49,7 @@ const destination: DestinationDefinition<Settings> = {
78
49
}
79
50
} ,
80
51
actions : {
81
- send,
82
- sendV2
52
+ send
83
53
}
84
54
}
85
55
0 commit comments