feat: EC2 UI polished + storage persisting
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import type {ServiceSchema} from './types'
|
||||
|
||||
export function awsNotificationsSchema(): ServiceSchema {
|
||||
return {
|
||||
cloud: 'aws',
|
||||
service: 'notifications',
|
||||
displayName: 'Amazon SNS',
|
||||
fields: [
|
||||
{
|
||||
name: 'name',
|
||||
label: 'Topic Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
description: 'Up to 256 letters, numbers, hyphens, and underscores.',
|
||||
},
|
||||
],
|
||||
actions: ['list', 'create', 'inspect', 'delete'],
|
||||
filters: [{name: 'search', label: 'Search', type: 'text', required: false}],
|
||||
columns: [
|
||||
{name: 'name', label: 'Name'},
|
||||
{name: 'arn', label: 'Topic ARN', path: 'metadata.arn', format: 'code'},
|
||||
{name: 'type', label: 'Type'},
|
||||
],
|
||||
capabilities: {
|
||||
resourceActions: [
|
||||
{name: 'list', label: 'List topics', enabled: true, status: 'available', runtimeRequired: true},
|
||||
{name: 'create', label: 'Create topic', enabled: true, status: 'available', runtimeRequired: true},
|
||||
{name: 'delete', label: 'Delete topic', enabled: true, status: 'available', runtimeRequired: true},
|
||||
{name: 'inspect', label: 'Inspect topic', enabled: true, status: 'available', runtimeRequired: false},
|
||||
],
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -111,6 +111,13 @@ export const SERVICE_CATALOG = {
|
||||
group: 'Integration',
|
||||
order: 10,
|
||||
},
|
||||
notifications: {
|
||||
displayName: 'Notifications',
|
||||
displayNameByCloud: {aws: 'SNS'},
|
||||
iconKey: 'notifications',
|
||||
group: 'Integration',
|
||||
order: 11,
|
||||
},
|
||||
events: {
|
||||
displayName: 'Events',
|
||||
displayNameByCloud: {aws: 'EventBridge'},
|
||||
|
||||
@@ -450,6 +450,29 @@ export interface ServerlessInvokeResult {
|
||||
executionDuration?: number
|
||||
}
|
||||
|
||||
export interface PublishNotificationInput {
|
||||
message: string
|
||||
subject?: string
|
||||
messageAttributes?: Record<string, string>
|
||||
}
|
||||
|
||||
export interface PublishNotificationResult {
|
||||
messageId: string | null
|
||||
}
|
||||
|
||||
export interface SnsSubscriptionInput {
|
||||
protocol: string
|
||||
endpoint: string
|
||||
}
|
||||
|
||||
export interface SnsSubscriptionOverview {
|
||||
arn: string | null
|
||||
protocol: string
|
||||
endpoint: string
|
||||
status: 'Confirmed' | 'PendingConfirmation'
|
||||
filterPolicy: string | null
|
||||
}
|
||||
|
||||
export interface ApiGatewayLambdaRouteInput {
|
||||
path: string
|
||||
method: string
|
||||
@@ -530,6 +553,27 @@ export interface EventBridgeLambdaTriggerOverview {
|
||||
state: string | null
|
||||
}
|
||||
|
||||
export interface EventBridgeRuleTarget {
|
||||
id: string
|
||||
arn: string
|
||||
}
|
||||
|
||||
export interface EventBridgeRuleInput {
|
||||
name: string
|
||||
scheduleExpression?: string
|
||||
eventPattern?: string
|
||||
state?: 'ENABLED' | 'DISABLED'
|
||||
description?: string
|
||||
targets: EventBridgeRuleTarget[]
|
||||
}
|
||||
|
||||
export interface EventBridgeRuleOverview extends EventBridgeRuleInput {
|
||||
busName: string
|
||||
busId: string
|
||||
arn: string | null
|
||||
state: 'ENABLED' | 'DISABLED'
|
||||
}
|
||||
|
||||
export interface SqsLambdaEventSourceMappingInput {
|
||||
functionName: string
|
||||
queueArn: string
|
||||
@@ -608,6 +652,10 @@ export interface CloudServiceAdapter {
|
||||
createDatabaseSnapshot?(input: CreateDatabaseSnapshotInput): Promise<DatabaseSnapshot>
|
||||
listDatabaseOrderableInstanceClasses?(engine?: string): Promise<string[]>
|
||||
invoke?(id: string, payload: string): Promise<ServerlessInvokeResult>
|
||||
publish?(id: string, input: PublishNotificationInput): Promise<PublishNotificationResult>
|
||||
createSnsSubscription?(topicArn: string, input: SnsSubscriptionInput): Promise<SnsSubscriptionOverview>
|
||||
listSnsSubscriptions?(topicArn: string): Promise<SnsSubscriptionOverview[]>
|
||||
deleteSnsSubscription?(subscriptionArn: string): Promise<void>
|
||||
createApiGatewayLambdaRoute?(apiId: string, input: ApiGatewayLambdaRouteInput): Promise<ApiGatewayLambdaRouteResult>
|
||||
testApiGatewayRoute?(apiId: string, input: ApiGatewayTestRouteInput): Promise<ApiGatewayTestRouteResult>
|
||||
listApiGatewayRoutes?(apiId: string): Promise<ApiGatewayRoutesResult>
|
||||
@@ -618,6 +666,9 @@ export interface CloudServiceAdapter {
|
||||
createEventBridgeLambdaTrigger?(input: EventBridgeLambdaTriggerInput): Promise<EventBridgeLambdaTriggerOverview>
|
||||
listEventBridgeLambdaTriggers?(functionName: string): Promise<EventBridgeLambdaTriggerOverview[]>
|
||||
deleteEventBridgeLambdaTrigger?(functionName: string, triggerId: string): Promise<void>
|
||||
listEventBridgeRules?(eventBusId: string): Promise<EventBridgeRuleOverview[]>
|
||||
createEventBridgeRule?(eventBusId: string, input: EventBridgeRuleInput): Promise<EventBridgeRuleOverview>
|
||||
deleteEventBridgeRule?(eventBusId: string, ruleName: string): Promise<void>
|
||||
createSqsLambdaEventSourceMapping?(input: SqsLambdaEventSourceMappingInput): Promise<SqsLambdaEventSourceMappingOverview>
|
||||
listSqsLambdaEventSourceMappings?(functionName: string): Promise<SqsLambdaEventSourceMappingOverview[]>
|
||||
deleteSqsLambdaEventSourceMapping?(functionName: string, mappingId: string): Promise<void>
|
||||
|
||||
Reference in New Issue
Block a user