feat: MSK, MSK CONNECT and SES
This commit is contained in:
@@ -43,6 +43,10 @@ import type {
|
||||
CloudFormationChangeSetInput,
|
||||
SqsLambdaEventSourceMappingInput,
|
||||
SqsLambdaEventSourceMappingOverview,
|
||||
KinesisPutRecordInput,
|
||||
KinesisRecord,
|
||||
LambdaEventSourceMappingInput,
|
||||
LambdaEventSourceMappingOverview,
|
||||
SqsMessage,
|
||||
SqsMoveTaskInput,
|
||||
SqsMoveTaskResult,
|
||||
@@ -439,6 +443,42 @@ export class CloudProxyService {
|
||||
await adapter.deleteSqsLambdaEventSourceMapping(functionName, mappingId)
|
||||
}
|
||||
|
||||
async putKinesisRecord(cloud: CloudProvider, streamName: string, input: KinesisPutRecordInput): Promise<{sequenceNumber: string; shardId: string}> {
|
||||
const adapter = this.requireAdapter(cloud, 'kinesis')
|
||||
if (!adapter.putKinesisRecord) throw new NotSupportedError(`Kinesis record production is not supported for ${cloud}`)
|
||||
return adapter.putKinesisRecord(streamName, input)
|
||||
}
|
||||
|
||||
async listKinesisRecords(cloud: CloudProvider, streamName: string): Promise<KinesisRecord[]> {
|
||||
const adapter = this.requireAdapter(cloud, 'kinesis')
|
||||
if (!adapter.listKinesisRecords) throw new NotSupportedError(`Kinesis record inspection is not supported for ${cloud}`)
|
||||
return adapter.listKinesisRecords(streamName)
|
||||
}
|
||||
|
||||
async createLambdaEventSourceMapping(cloud: CloudProvider, input: LambdaEventSourceMappingInput): Promise<LambdaEventSourceMappingOverview> {
|
||||
const adapter = this.requireAdapter(cloud, 'serverless')
|
||||
if (!adapter.createLambdaEventSourceMapping) throw new NotSupportedError(`Lambda event source mappings are not supported for ${cloud}`)
|
||||
return adapter.createLambdaEventSourceMapping(input)
|
||||
}
|
||||
|
||||
async listLambdaEventSourceMappings(cloud: CloudProvider, filter?: {functionName?: string; eventSourceArn?: string}): Promise<LambdaEventSourceMappingOverview[]> {
|
||||
const adapter = this.requireAdapter(cloud, 'serverless')
|
||||
if (!adapter.listLambdaEventSourceMappings) throw new NotSupportedError(`Lambda event source mappings are not supported for ${cloud}`)
|
||||
return adapter.listLambdaEventSourceMappings(filter)
|
||||
}
|
||||
|
||||
async updateLambdaEventSourceMapping(cloud: CloudProvider, mappingId: string, input: {batchSize?: number; enabled?: boolean}): Promise<LambdaEventSourceMappingOverview> {
|
||||
const adapter = this.requireAdapter(cloud, 'serverless')
|
||||
if (!adapter.updateLambdaEventSourceMapping) throw new NotSupportedError(`Lambda event source mappings are not supported for ${cloud}`)
|
||||
return adapter.updateLambdaEventSourceMapping(mappingId, input)
|
||||
}
|
||||
|
||||
async deleteLambdaEventSourceMapping(cloud: CloudProvider, mappingId: string): Promise<void> {
|
||||
const adapter = this.requireAdapter(cloud, 'serverless')
|
||||
if (!adapter.deleteLambdaEventSourceMapping) throw new NotSupportedError(`Lambda event source mappings are not supported for ${cloud}`)
|
||||
await adapter.deleteLambdaEventSourceMapping(mappingId)
|
||||
}
|
||||
|
||||
async sendSqsMessage(cloud: CloudProvider, queueId: string, input: SqsSendMessageInput): Promise<{messageId: string}> {
|
||||
const adapter = this.requireAdapter(cloud, 'messaging')
|
||||
if (!adapter.sendSqsMessage) throw new NotSupportedError(`SQS message sending is not supported for ${cloud}`)
|
||||
|
||||
Reference in New Issue
Block a user