feat: EC2 UI polished + storage persisting

This commit is contained in:
Zakaria
2026-09-25 18:18:33 -04:00
parent 1b129e9dcf
commit 093afb9b2b
40 changed files with 2586 additions and 102 deletions
@@ -30,6 +30,8 @@ import type {
S3LambdaTriggerOverview,
EventBridgeLambdaTriggerInput,
EventBridgeLambdaTriggerOverview,
EventBridgeRuleInput,
EventBridgeRuleOverview,
SqsLambdaEventSourceMappingInput,
SqsLambdaEventSourceMappingOverview,
DatabaseSnapshot,
@@ -42,6 +44,10 @@ import type {
KmsEncryptInput,
KmsEncryptResult,
NoSqlItem,
PublishNotificationInput,
PublishNotificationResult,
SnsSubscriptionInput,
SnsSubscriptionOverview,
ResourceQuery,
ServerlessInvokeResult,
SqlConnectionInput,
@@ -310,6 +316,24 @@ export class CloudProxyService {
await adapter.deleteEventBridgeLambdaTrigger(functionName, triggerId)
}
async listEventBridgeRules(cloud: CloudProvider, eventBusId: string): Promise<EventBridgeRuleOverview[]> {
const adapter = this.requireAdapter(cloud, 'events')
if (!adapter.listEventBridgeRules) throw new NotSupportedError(`EventBridge rules are not supported for ${cloud}`)
return adapter.listEventBridgeRules(eventBusId)
}
async createEventBridgeRule(cloud: CloudProvider, eventBusId: string, input: EventBridgeRuleInput): Promise<EventBridgeRuleOverview> {
const adapter = this.requireAdapter(cloud, 'events')
if (!adapter.createEventBridgeRule) throw new NotSupportedError(`EventBridge rules are not supported for ${cloud}`)
return adapter.createEventBridgeRule(eventBusId, input)
}
async deleteEventBridgeRule(cloud: CloudProvider, eventBusId: string, ruleName: string): Promise<void> {
const adapter = this.requireAdapter(cloud, 'events')
if (!adapter.deleteEventBridgeRule) throw new NotSupportedError(`EventBridge rules are not supported for ${cloud}`)
await adapter.deleteEventBridgeRule(eventBusId, ruleName)
}
async createSqsLambdaEventSourceMapping(cloud: CloudProvider, input: SqsLambdaEventSourceMappingInput): Promise<SqsLambdaEventSourceMappingOverview> {
const adapter = this.requireAdapter(cloud, 'serverless')
if (!adapter.createSqsLambdaEventSourceMapping) throw new NotSupportedError(`SQS Lambda event source mappings are not supported for ${cloud}`)
@@ -360,6 +384,29 @@ export class CloudProxyService {
if (!adapter.invoke) throw new NotSupportedError(`${cloud}/${service} invoke is not supported`)
return adapter.invoke(id, payload)
}
async publishNotification(cloud: CloudProvider, topicArn: string, input: PublishNotificationInput): Promise<PublishNotificationResult> {
const adapter = this.requireAdapter(cloud, 'notifications')
if (!adapter.publish) throw new NotSupportedError(`Publishing notifications is not supported for ${cloud}`)
return adapter.publish(topicArn, input)
}
async createSnsSubscription(cloud: CloudProvider, topicArn: string, input: SnsSubscriptionInput): Promise<SnsSubscriptionOverview> {
const adapter = this.requireAdapter(cloud, 'notifications')
if (!adapter.createSnsSubscription) throw new NotSupportedError(`SNS subscriptions are not supported for ${cloud}`)
return adapter.createSnsSubscription(topicArn, input)
}
async listSnsSubscriptions(cloud: CloudProvider, topicArn: string): Promise<SnsSubscriptionOverview[]> {
const adapter = this.requireAdapter(cloud, 'notifications')
if (!adapter.listSnsSubscriptions) throw new NotSupportedError(`SNS subscriptions are not supported for ${cloud}`)
return adapter.listSnsSubscriptions(topicArn)
}
async deleteSnsSubscription(cloud: CloudProvider, subscriptionArn: string): Promise<void> {
const adapter = this.requireAdapter(cloud, 'notifications')
if (!adapter.deleteSnsSubscription) throw new NotSupportedError(`SNS subscriptions are not supported for ${cloud}`)
await adapter.deleteSnsSubscription(subscriptionArn)
}
async listObjects(cloud: CloudProvider, service: CloudServiceType, resourceId: string, prefix?: string): Promise<StorageObjectList> {
const adapter = this.requireAdapter(cloud, service)
if (!adapter.listObjects) throw new NotSupportedError(`Object listing is not supported for ${cloud}/${service}`)