feat: Cloudformation + RDS
This commit is contained in:
@@ -23,6 +23,12 @@ export interface CollectionPage<T> {
|
||||
* round-trip a cursor to a different resource or collection.
|
||||
*/
|
||||
nextCursor: string | null
|
||||
/** Provider-reported result count for this page. */
|
||||
count?: number
|
||||
/** Provider-reported number of records examined before filtering. */
|
||||
scannedCount?: number
|
||||
/** Provider-reported capacity consumed by this request. */
|
||||
consumedCapacity?: number
|
||||
}
|
||||
|
||||
export interface PageQuery {
|
||||
@@ -30,6 +36,8 @@ export interface PageQuery {
|
||||
limit?: number
|
||||
}
|
||||
|
||||
export type ItemQuery = string | Record<string, unknown>
|
||||
|
||||
/** The middle level: a log stream, a Cosmos container, a BigQuery table. */
|
||||
export interface ChildCollection {
|
||||
id: string
|
||||
@@ -61,7 +69,7 @@ export interface DocumentStoreAdapter {
|
||||
getItem?(resourceId: string, collectionId: string, itemId: string): Promise<ChildItem | null>
|
||||
putItem?(resourceId: string, collectionId: string, body: Record<string, unknown>): Promise<ChildItem>
|
||||
deleteItem?(resourceId: string, collectionId: string, itemId: string, partitionKey?: string | null): Promise<void>
|
||||
queryItems?(resourceId: string, collectionId: string, query: string): Promise<CollectionPage<ChildItem>>
|
||||
queryItems?(resourceId: string, collectionId: string, query: ItemQuery, page?: PageQuery): Promise<CollectionPage<ChildItem>>
|
||||
}
|
||||
|
||||
/** Flat store: the resource is the collection. */
|
||||
@@ -70,7 +78,7 @@ export interface ItemStoreAdapter {
|
||||
getItem?(resourceId: string, itemId: string): Promise<ChildItem | null>
|
||||
putItem?(resourceId: string, body: Record<string, unknown>): Promise<ChildItem>
|
||||
deleteItem?(resourceId: string, itemId: string, partitionKey?: string | null): Promise<void>
|
||||
queryItems?(resourceId: string, query: string): Promise<CollectionPage<ChildItem>>
|
||||
queryItems?(resourceId: string, query: ItemQuery, page?: PageQuery): Promise<CollectionPage<ChildItem>>
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@ const cloudformationFilters: FieldSchema[] = [
|
||||
const cloudformationResourceActions: CapabilitySchema<ResourceActionName>[] = [
|
||||
{name: 'list', label: 'List stacks', enabled: true, status: 'available', runtimeRequired: true},
|
||||
{name: 'create', label: 'Create stack', enabled: true, status: 'available', runtimeRequired: true},
|
||||
{name: 'update', label: 'Update stack', enabled: true, status: 'available', runtimeRequired: true},
|
||||
{name: 'delete', label: 'Delete stack', enabled: true, status: 'available', runtimeRequired: true},
|
||||
{name: 'inspect', label: 'Inspect stack', enabled: true, status: 'available', runtimeRequired: false},
|
||||
]
|
||||
@@ -38,18 +39,19 @@ export function awsCloudformationSchema(): ServiceSchema {
|
||||
{
|
||||
name: 'templateBody',
|
||||
label: 'Template Body',
|
||||
type: 'text',
|
||||
type: 'textarea',
|
||||
required: true,
|
||||
span: true,
|
||||
description: 'Single-line CloudFormation template JSON — the console form has no multi-line editor yet.',
|
||||
description: 'CloudFormation JSON or YAML template.',
|
||||
},
|
||||
],
|
||||
actions: ['list', 'create', 'delete', 'inspect'],
|
||||
actions: ['list', 'create', 'update', 'delete', 'inspect'],
|
||||
capabilities: {
|
||||
resourceActions: cloudformationResourceActions,
|
||||
},
|
||||
filters: cloudformationFilters,
|
||||
columns: cloudformationColumns,
|
||||
updateFields: [{name: 'templateBody', label: 'Template Body', type: 'textarea', required: true, span: true, valuePath: 'metadata.templateBody'}],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -83,6 +83,12 @@ export function awsDynamoDbSchema(): ServiceSchema {
|
||||
{name: 'delete', label: 'Delete table', enabled: true, status: 'available', runtimeRequired: true},
|
||||
{name: 'inspect', label: 'Inspect table', enabled: true, status: 'available', runtimeRequired: true},
|
||||
],
|
||||
itemActions: [
|
||||
{name: 'list', label: 'List items', enabled: true, status: 'available', runtimeRequired: true},
|
||||
{name: 'query', label: 'Scan or query items', enabled: true, status: 'available', runtimeRequired: true},
|
||||
{name: 'put', label: 'Put item', enabled: true, status: 'available', runtimeRequired: true},
|
||||
{name: 'delete', label: 'Delete item', enabled: true, status: 'available', runtimeRequired: true},
|
||||
],
|
||||
},
|
||||
filters: dynamodbFilters,
|
||||
columns: dynamodbColumns,
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
// This type-only cycle with serviceCatalog.ts is erased at compile time.
|
||||
import type {CloudServiceType, ServiceGroup} from './serviceCatalog'
|
||||
import type {
|
||||
ChildItem,
|
||||
CollectionActionName,
|
||||
CollectionPage,
|
||||
DocumentStoreAdapter,
|
||||
ItemActionName,
|
||||
ItemStoreAdapter,
|
||||
PageQuery,
|
||||
} from './childCollections'
|
||||
|
||||
export type {CloudServiceType, ServiceGroup}
|
||||
@@ -321,10 +324,45 @@ export interface LogsInsightsQueryResult {
|
||||
rows: Array<Record<string, string>>
|
||||
}
|
||||
|
||||
export interface NoSqlItem {
|
||||
id: string
|
||||
key: Record<string, unknown>
|
||||
document: Record<string, unknown>
|
||||
/** Mirrors FilterLogEvents: epoch milliseconds and optional cross-stream filtering. */
|
||||
export interface LogsFilterInput {
|
||||
filterPattern?: string
|
||||
logStreamNames?: string[]
|
||||
startTime?: number
|
||||
endTime?: number
|
||||
}
|
||||
|
||||
export interface SqsMessageAttribute {
|
||||
dataType: string
|
||||
stringValue?: string
|
||||
binaryValue?: string
|
||||
}
|
||||
|
||||
export interface SqsMessage {
|
||||
messageId: string
|
||||
receiptHandle: string
|
||||
body: string
|
||||
attributes: Record<string, string>
|
||||
messageAttributes: Record<string, SqsMessageAttribute>
|
||||
}
|
||||
|
||||
export interface SqsSendMessageInput {
|
||||
messageBody: string
|
||||
messageAttributes?: Record<string, SqsMessageAttribute>
|
||||
messageGroupId?: string
|
||||
messageDeduplicationId?: string
|
||||
}
|
||||
|
||||
export interface SqsReceiveMessagesInput {
|
||||
maxNumberOfMessages?: number
|
||||
}
|
||||
|
||||
export interface SqsMoveTaskInput {
|
||||
destinationArn?: string
|
||||
}
|
||||
|
||||
export interface SqsMoveTaskResult {
|
||||
taskHandle: string
|
||||
}
|
||||
|
||||
/** Provider-neutral representation of a managed Kubernetes node pool. */
|
||||
@@ -476,6 +514,8 @@ export interface SnsSubscriptionOverview {
|
||||
|
||||
export interface ApiGatewayLambdaRouteInput {
|
||||
path: string
|
||||
parentResourceId?: string
|
||||
pathPart?: string
|
||||
method: string
|
||||
stage: string
|
||||
functionName: string
|
||||
@@ -530,7 +570,16 @@ export interface ApiGatewayRouteOverview {
|
||||
integrationType: string | null
|
||||
}
|
||||
|
||||
export interface ApiGatewayResourceOverview {
|
||||
resourceId: string
|
||||
parentId: string | null
|
||||
path: string
|
||||
pathPart: string | null
|
||||
methods: ApiGatewayRouteOverview[]
|
||||
}
|
||||
|
||||
export interface ApiGatewayRoutesResult {
|
||||
resources: ApiGatewayResourceOverview[]
|
||||
routes: ApiGatewayRouteOverview[]
|
||||
stages: string[]
|
||||
}
|
||||
@@ -612,6 +661,22 @@ export interface EventBridgeRuleOverview extends EventBridgeRuleInput {
|
||||
state: 'ENABLED' | 'DISABLED'
|
||||
}
|
||||
|
||||
export interface EventBridgePutEventInput {
|
||||
source: string
|
||||
detailType: string
|
||||
detail: string
|
||||
resources?: string[]
|
||||
}
|
||||
|
||||
export interface EventBridgePutEventResult {
|
||||
eventId: string | null
|
||||
errorCode: string | null
|
||||
errorMessage: string | null
|
||||
}
|
||||
|
||||
export interface CloudFormationChangeSetInput { name: string; templateBody: string; parameters?: Record<string, string>; capabilities?: string[] }
|
||||
export interface CloudFormationChangeSet { name: string; id: string; status: string | null; executionStatus: string | null; changes: Array<{action: string | null; logicalResourceId: string | null; resourceType: string | null}> }
|
||||
|
||||
export interface SqsLambdaEventSourceMappingInput {
|
||||
functionName: string
|
||||
queueArn: string
|
||||
@@ -714,6 +779,12 @@ export interface CloudServiceAdapter {
|
||||
listEventBridgeRules?(eventBusId: string): Promise<EventBridgeRuleOverview[]>
|
||||
createEventBridgeRule?(eventBusId: string, input: EventBridgeRuleInput): Promise<EventBridgeRuleOverview>
|
||||
deleteEventBridgeRule?(eventBusId: string, ruleName: string): Promise<void>
|
||||
putEventBridgeEvent?(eventBusId: string, input: EventBridgePutEventInput): Promise<EventBridgePutEventResult>
|
||||
listCloudFormationChangeSets?(stackName: string): Promise<CloudFormationChangeSet[]>
|
||||
createCloudFormationChangeSet?(stackName: string, input: CloudFormationChangeSetInput): Promise<CloudFormationChangeSet>
|
||||
executeCloudFormationChangeSet?(stackName: string, changeSetName: string): Promise<void>
|
||||
deleteCloudFormationChangeSet?(stackName: string, changeSetName: string): Promise<void>
|
||||
updateCloudFormationTerminationProtection?(stackName: string, enabled: boolean): Promise<void>
|
||||
createSqsLambdaEventSourceMapping?(input: SqsLambdaEventSourceMappingInput): Promise<SqsLambdaEventSourceMappingOverview>
|
||||
listSqsLambdaEventSourceMappings?(functionName: string): Promise<SqsLambdaEventSourceMappingOverview[]>
|
||||
deleteSqsLambdaEventSourceMapping?(functionName: string, mappingId: string): Promise<void>
|
||||
@@ -751,8 +822,12 @@ export interface CloudServiceAdapter {
|
||||
listSqlTables?(serverId: string, connection: SqlConnectionInput): Promise<SqlTable[]>
|
||||
querySql?(serverId: string, connection: SqlConnectionInput, query: string): Promise<SqlQueryResult>
|
||||
queryLogs?(logGroupName: string, input: LogsInsightsQueryInput): Promise<LogsInsightsQueryResult>
|
||||
listNoSqlItems?(resourceId: string): Promise<NoSqlItem[]>
|
||||
putNoSqlItem?(resourceId: string, document: Record<string, unknown>): Promise<NoSqlItem>
|
||||
filterLogEvents?(logGroupName: string, input: LogsFilterInput, page?: PageQuery): Promise<CollectionPage<ChildItem>>
|
||||
sendSqsMessage?(queueId: string, input: SqsSendMessageInput): Promise<{messageId: string}>
|
||||
receiveSqsMessages?(queueId: string, input: SqsReceiveMessagesInput): Promise<SqsMessage[]>
|
||||
deleteSqsMessage?(queueId: string, receiptHandle: string): Promise<void>
|
||||
purgeSqsQueue?(queueId: string): Promise<void>
|
||||
startSqsMoveTask?(queueId: string, input: SqsMoveTaskInput): Promise<SqsMoveTaskResult>
|
||||
listKubernetesNodegroups?(clusterId: string): Promise<KubernetesNodegroup[]>
|
||||
createKubernetesNodegroup?(clusterId: string, input: CreateKubernetesNodegroupInput): Promise<KubernetesNodegroup>
|
||||
deleteKubernetesNodegroup?(clusterId: string, nodegroupId: string): Promise<void>
|
||||
|
||||
Reference in New Issue
Block a user