Skip to content

Commit 03f956b

Browse files
ready to deploy (#3187)
1 parent 5357349 commit 03f956b

File tree

17 files changed

+733
-1064
lines changed

17 files changed

+733
-1064
lines changed

packages/destination-actions/src/destinations/amazon-eventbridge/__tests__/index.test.ts

Lines changed: 0 additions & 50 deletions
This file was deleted.

packages/destination-actions/src/destinations/amazon-eventbridge/functions.ts

Lines changed: 0 additions & 93 deletions
This file was deleted.

packages/destination-actions/src/destinations/amazon-eventbridge/functionsv2.ts

Lines changed: 0 additions & 103 deletions
This file was deleted.

packages/destination-actions/src/destinations/amazon-eventbridge/generated-types.ts

Lines changed: 3 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/destination-actions/src/destinations/amazon-eventbridge/index.ts

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import type { DestinationDefinition } from '@segment/actions-core'
22
import type { Settings } from './generated-types'
33
import { DEFAULT_REQUEST_TIMEOUT } from '@segment/actions-core'
4-
54
import send from './send'
65

7-
import sendV2 from './sendV2'
8-
96
const destination: DestinationDefinition<Settings> = {
107
name: 'Amazon Eventbridge',
118
slug: 'actions-amazon-eventbridge',
@@ -15,18 +12,16 @@ const destination: DestinationDefinition<Settings> = {
1512
authentication: {
1613
scheme: 'custom',
1714
fields: {
18-
awsAccountId: {
15+
accountId: {
1916
type: 'string',
2017
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.`,
2319
required: true
2420
},
25-
awsRegion: {
21+
region: {
2622
type: 'string',
2723
label: 'AWS Region',
2824
description: 'The AWS region that the event bus belongs to.',
29-
disabledInputMethods: ['enrichment', 'function', 'variable'],
3025
required: true,
3126
choices: [
3227
{ label: 'us-east-1', value: 'us-east-1' },
@@ -45,30 +40,6 @@ const destination: DestinationDefinition<Settings> = {
4540
{ label: 'ca-central-1', value: 'ca-central-1' },
4641
{ label: 'eu-central-1', value: 'eu-central-1' }
4742
]
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.')
7243
}
7344
}
7445
},
@@ -78,8 +49,7 @@ const destination: DestinationDefinition<Settings> = {
7849
}
7950
},
8051
actions: {
81-
send,
82-
sendV2
52+
send
8353
}
8454
}
8555

0 commit comments

Comments
 (0)