feat: add SQS + EventBridge
This commit is contained in:
@@ -122,7 +122,24 @@ export function awsServerlessSchema(): ServiceSchema {
|
||||
span: true,
|
||||
},
|
||||
],
|
||||
actions: ['list', 'create', 'inspect', 'delete'],
|
||||
actions: ['list', 'create', 'update', 'inspect', 'delete'],
|
||||
updateFields: [
|
||||
{name: 'runtime', label: 'Runtime', type: 'select', required: true, valuePath: 'metadata.runtime', options: [
|
||||
{label: 'Node.js 22.x', value: 'nodejs22.x'}, {label: 'Node.js 20.x', value: 'nodejs20.x'},
|
||||
{label: 'Node.js 18.x', value: 'nodejs18.x'}, {label: 'Python 3.12', value: 'python3.12'},
|
||||
{label: 'Python 3.11', value: 'python3.11'},
|
||||
]},
|
||||
{name: 'handler', label: 'Handler', type: 'text', required: true, valuePath: 'metadata.handler'},
|
||||
{name: 'memorySize', label: 'Memory Size', type: 'text', required: false, valuePath: 'metadata.memorySize'},
|
||||
{name: 'timeout', label: 'Timeout', type: 'text', required: false, valuePath: 'metadata.timeout'},
|
||||
{name: 'description', label: 'Description', type: 'text', required: false, valuePath: 'metadata.description'},
|
||||
{name: 'environment', label: 'Environment Variables', type: 'key-value', required: false, valuePath: 'metadata.environment', span: true,
|
||||
description: 'Available to the function as process.env in Node.js or os.environ in Python.'},
|
||||
{name: 'code', label: 'Handler Source', type: 'textarea', required: false, valuePath: 'metadata.code', span: true,
|
||||
description: 'Current handler source. Editing and saving replaces this handler file in the deployment package.'},
|
||||
{name: 'zipFile', label: 'Replacement ZIP Deployment Package', type: 'file', required: false,
|
||||
accept: '.zip,application/zip', span: true, description: 'Uploads this ZIP instead of replacement source.'},
|
||||
],
|
||||
filters: serverlessFilters,
|
||||
columns: serverlessColumns,
|
||||
capabilities: {
|
||||
|
||||
@@ -71,7 +71,7 @@ export interface CloudServiceStatus {
|
||||
errorCode: string | null
|
||||
}
|
||||
|
||||
export type FieldType = 'text' | 'textarea' | 'password' | 'select' | 'file'
|
||||
export type FieldType = 'text' | 'textarea' | 'password' | 'select' | 'file' | 'key-value'
|
||||
|
||||
export interface FieldSchema {
|
||||
name: string
|
||||
@@ -491,6 +491,62 @@ export interface ApiGatewayRoutesResult {
|
||||
stages: string[]
|
||||
}
|
||||
|
||||
export interface ApiGatewayDeleteRouteInput {
|
||||
resourceId: string
|
||||
path: string
|
||||
method: string
|
||||
stage: string
|
||||
}
|
||||
|
||||
export interface S3LambdaTriggerInput {
|
||||
functionName: string
|
||||
events: string[]
|
||||
prefix?: string
|
||||
suffix?: string
|
||||
}
|
||||
|
||||
export interface S3LambdaTriggerOverview {
|
||||
id: string
|
||||
functionName: string
|
||||
functionArn: string
|
||||
events: string[]
|
||||
prefix: string | null
|
||||
suffix: string | null
|
||||
}
|
||||
|
||||
export interface EventBridgeLambdaTriggerInput {
|
||||
ruleName: string
|
||||
scheduleExpression: string
|
||||
functionName: string
|
||||
}
|
||||
|
||||
export interface EventBridgeLambdaTriggerOverview {
|
||||
id: string
|
||||
ruleName: string
|
||||
ruleArn: string
|
||||
functionName: string
|
||||
functionArn: string
|
||||
scheduleExpression: string
|
||||
state: string | null
|
||||
}
|
||||
|
||||
export interface SqsLambdaEventSourceMappingInput {
|
||||
functionName: string
|
||||
queueArn: string
|
||||
batchSize?: number
|
||||
}
|
||||
|
||||
export interface SqsLambdaEventSourceMappingOverview {
|
||||
id: string
|
||||
uuid: string
|
||||
functionName: string
|
||||
functionArn: string | null
|
||||
queueArn: string
|
||||
batchSize: number | null
|
||||
state: string | null
|
||||
stateTransitionReason: string | null
|
||||
}
|
||||
|
||||
export type KmsEncryptionAlgorithm =
|
||||
| 'SYMMETRIC_DEFAULT'
|
||||
| 'RSAES_OAEP_SHA_1'
|
||||
@@ -555,6 +611,16 @@ export interface CloudServiceAdapter {
|
||||
createApiGatewayLambdaRoute?(apiId: string, input: ApiGatewayLambdaRouteInput): Promise<ApiGatewayLambdaRouteResult>
|
||||
testApiGatewayRoute?(apiId: string, input: ApiGatewayTestRouteInput): Promise<ApiGatewayTestRouteResult>
|
||||
listApiGatewayRoutes?(apiId: string): Promise<ApiGatewayRoutesResult>
|
||||
deleteApiGatewayRoute?(apiId: string, input: ApiGatewayDeleteRouteInput): Promise<void>
|
||||
createS3LambdaTrigger?(bucketName: string, input: S3LambdaTriggerInput): Promise<S3LambdaTriggerOverview>
|
||||
listS3LambdaTriggers?(bucketName: string): Promise<S3LambdaTriggerOverview[]>
|
||||
deleteS3LambdaTrigger?(bucketName: string, triggerId: string): Promise<void>
|
||||
createEventBridgeLambdaTrigger?(input: EventBridgeLambdaTriggerInput): Promise<EventBridgeLambdaTriggerOverview>
|
||||
listEventBridgeLambdaTriggers?(functionName: string): Promise<EventBridgeLambdaTriggerOverview[]>
|
||||
deleteEventBridgeLambdaTrigger?(functionName: string, triggerId: string): Promise<void>
|
||||
createSqsLambdaEventSourceMapping?(input: SqsLambdaEventSourceMappingInput): Promise<SqsLambdaEventSourceMappingOverview>
|
||||
listSqsLambdaEventSourceMappings?(functionName: string): Promise<SqsLambdaEventSourceMappingOverview[]>
|
||||
deleteSqsLambdaEventSourceMapping?(functionName: string, mappingId: string): Promise<void>
|
||||
encrypt?(id: string, input: KmsEncryptInput): Promise<KmsEncryptResult>
|
||||
decrypt?(id: string, input: KmsDecryptInput): Promise<KmsDecryptResult>
|
||||
// Lifecycle verbs. Optional because most categories have no notion of them;
|
||||
|
||||
Reference in New Issue
Block a user