@stacksjs/ts-cloud-aws-types 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.ts DELETED
@@ -1,328 +0,0 @@
1
- /**
2
- * AWS CloudFormation Resource Type Definitions
3
- * These types are lightweight definitions without AWS SDK dependencies
4
- */
5
-
6
- // CloudFormation Template Structure
7
- export interface CloudFormationTemplate {
8
- AWSTemplateFormatVersion?: '2010-09-09'
9
- Description?: string
10
- Parameters?: Record<string, CloudFormationParameter>
11
- Mappings?: Record<string, unknown>
12
- Conditions?: Record<string, unknown>
13
- Resources: Record<string, CloudFormationResource>
14
- Outputs?: Record<string, CloudFormationOutput>
15
- }
16
-
17
- export interface CloudFormationParameter {
18
- Type: 'String' | 'Number' | 'List<Number>' | 'CommaDelimitedList'
19
- Default?: unknown
20
- Description?: string
21
- AllowedValues?: unknown[]
22
- AllowedPattern?: string
23
- MinLength?: number
24
- MaxLength?: number
25
- MinValue?: number
26
- MaxValue?: number
27
- }
28
-
29
- export interface CloudFormationResource {
30
- Type: string
31
- Properties?: Record<string, unknown>
32
- DependsOn?: string | string[]
33
- Condition?: string
34
- DeletionPolicy?: 'Delete' | 'Retain' | 'Snapshot'
35
- UpdateReplacePolicy?: 'Delete' | 'Retain' | 'Snapshot'
36
- }
37
-
38
- export interface CloudFormationOutput {
39
- Description?: string
40
- Value: unknown
41
- Export?: {
42
- Name: string
43
- }
44
- }
45
-
46
- // CloudFormation Intrinsic Functions
47
- export interface IntrinsicFunctions {
48
- Ref: (logicalName: string) => { Ref: string }
49
- GetAtt: (logicalName: string, attributeName: string) => { 'Fn::GetAtt': [string, string] }
50
- Sub: (template: string, variables?: Record<string, unknown>) => { 'Fn::Sub': string | [string, Record<string, unknown>] }
51
- Join: (delimiter: string, values: unknown[]) => { 'Fn::Join': [string, unknown[]] }
52
- Select: (index: number, list: unknown[]) => { 'Fn::Select': [number, unknown[]] }
53
- Split: (delimiter: string, source: string) => { 'Fn::Split': [string, string] }
54
- GetAZs: (region?: string) => { 'Fn::GetAZs': string }
55
- ImportValue: (name: string) => { 'Fn::ImportValue': string }
56
- If: (condition: string, trueValue: unknown, falseValue: unknown) => { 'Fn::If': [string, unknown, unknown] }
57
- }
58
-
59
- // S3 Types
60
- export interface S3Bucket extends CloudFormationResource {
61
- Type: 'AWS::S3::Bucket'
62
- Properties?: {
63
- BucketName?: string
64
- AccessControl?: 'Private' | 'PublicRead' | 'PublicReadWrite' | 'AuthenticatedRead'
65
- BucketEncryption?: {
66
- ServerSideEncryptionConfiguration: Array<{
67
- ServerSideEncryptionByDefault: {
68
- SSEAlgorithm: 'AES256' | 'aws:kms'
69
- KMSMasterKeyID?: string
70
- }
71
- }>
72
- }
73
- VersioningConfiguration?: {
74
- Status: 'Enabled' | 'Suspended'
75
- }
76
- WebsiteConfiguration?: {
77
- IndexDocument?: string
78
- ErrorDocument?: string
79
- RedirectAllRequestsTo?: {
80
- HostName: string
81
- Protocol?: string
82
- }
83
- }
84
- Tags?: Array<{
85
- Key: string
86
- Value: string
87
- }>
88
- LifecycleConfiguration?: {
89
- Rules: Array<{
90
- Id: string
91
- Status: 'Enabled' | 'Disabled'
92
- ExpirationInDays?: number
93
- Transitions?: Array<{
94
- TransitionInDays: number
95
- StorageClass: string
96
- }>
97
- }>
98
- }
99
- PublicAccessBlockConfiguration?: {
100
- BlockPublicAcls?: boolean
101
- BlockPublicPolicy?: boolean
102
- IgnorePublicAcls?: boolean
103
- RestrictPublicBuckets?: boolean
104
- }
105
- CorsConfiguration?: {
106
- CorsRules: Array<{
107
- AllowedOrigins: string[]
108
- AllowedMethods: string[]
109
- AllowedHeaders?: string[]
110
- MaxAge?: number
111
- }>
112
- }
113
- NotificationConfiguration?: {
114
- LambdaConfigurations?: Array<{
115
- Event: string
116
- Function: string
117
- Filter?: {
118
- S3Key?: {
119
- Rules?: Array<{
120
- Name: string
121
- Value: string
122
- }>
123
- }
124
- }
125
- }>
126
- }
127
- }
128
- }
129
-
130
- export interface S3BucketPolicy extends CloudFormationResource {
131
- Type: 'AWS::S3::BucketPolicy'
132
- Properties: {
133
- Bucket: string | { Ref: string }
134
- PolicyDocument: {
135
- Version: '2012-10-17'
136
- Statement: Array<{
137
- Sid?: string
138
- Effect: 'Allow' | 'Deny'
139
- Principal: unknown
140
- Action: string | string[]
141
- Resource: string | string[]
142
- Condition?: unknown
143
- }>
144
- }
145
- }
146
- }
147
-
148
- // CloudFront Cache Behavior Type
149
- export interface CloudFrontCacheBehavior {
150
- TargetOriginId: string
151
- ViewerProtocolPolicy: 'allow-all' | 'https-only' | 'redirect-to-https'
152
- AllowedMethods?: string[]
153
- CachedMethods?: string[]
154
- CachePolicyId?: string
155
- Compress?: boolean
156
- LambdaFunctionAssociations?: Array<{
157
- EventType: 'origin-request' | 'origin-response' | 'viewer-request' | 'viewer-response'
158
- LambdaFunctionARN: string
159
- }>
160
- // TTL settings
161
- DefaultTTL?: number
162
- MaxTTL?: number
163
- MinTTL?: number
164
- // Forwarded values (legacy, but still used)
165
- ForwardedValues?: {
166
- QueryString?: boolean
167
- Headers?: string[]
168
- Cookies?: {
169
- Forward: string
170
- WhitelistedNames?: string[]
171
- }
172
- }
173
- // Path pattern for cache behaviors
174
- PathPattern?: string
175
- }
176
-
177
- // CloudFront Origin Type
178
- export interface CloudFrontOrigin {
179
- Id: string
180
- DomainName: string
181
- OriginPath?: string
182
- S3OriginConfig?: {
183
- OriginAccessIdentity?: string
184
- }
185
- CustomOriginConfig?: {
186
- HTTPPort?: number
187
- HTTPSPort?: number
188
- OriginProtocolPolicy: 'http-only' | 'https-only' | 'match-viewer'
189
- OriginSSLProtocols?: string[]
190
- OriginReadTimeout?: number
191
- OriginKeepaliveTimeout?: number
192
- }
193
- OriginAccessControlId?: string
194
- OriginCustomHeaders?: Array<{
195
- HeaderName: string
196
- HeaderValue: string
197
- }>
198
- }
199
-
200
- // CloudFront Types
201
- export interface CloudFrontDistribution extends CloudFormationResource {
202
- Type: 'AWS::CloudFront::Distribution'
203
- Properties: {
204
- DistributionConfig: {
205
- Enabled: boolean
206
- Comment?: string
207
- DefaultRootObject?: string
208
- Origins: CloudFrontOrigin[]
209
- DefaultCacheBehavior: CloudFrontCacheBehavior
210
- CacheBehaviors?: CloudFrontCacheBehavior[]
211
- PriceClass?: string
212
- ViewerCertificate?: {
213
- AcmCertificateArn?: string
214
- CloudFrontDefaultCertificate?: boolean
215
- MinimumProtocolVersion?: string
216
- SslSupportMethod?: string
217
- }
218
- Aliases?: string[]
219
- CustomErrorResponses?: Array<{
220
- ErrorCode: number
221
- ResponseCode?: number
222
- ResponsePagePath?: string
223
- }>
224
- HttpVersion?: 'http1.1' | 'http2' | 'http2and3' | 'http3'
225
- }
226
- }
227
- }
228
-
229
- export interface CloudFrontOriginAccessControl extends CloudFormationResource {
230
- Type: 'AWS::CloudFront::OriginAccessControl'
231
- Properties: {
232
- OriginAccessControlConfig: {
233
- Name: string
234
- Description?: string
235
- OriginAccessControlOriginType: 's3' | 'mediastore'
236
- SigningBehavior: 'always' | 'never' | 'no-override'
237
- SigningProtocol: 'sigv4'
238
- }
239
- }
240
- }
241
-
242
- export interface CloudFrontFunction extends CloudFormationResource {
243
- Type: 'AWS::CloudFront::Function'
244
- Properties: {
245
- Name: string
246
- FunctionCode: string
247
- FunctionConfig: {
248
- Comment?: string
249
- Runtime: 'cloudfront-js-1.0' | 'cloudfront-js-2.0'
250
- KeyValueStoreAssociations?: Array<{
251
- KeyValueStoreARN: string
252
- }>
253
- }
254
- AutoPublish?: boolean
255
- }
256
- }
257
-
258
- // Step Functions Types
259
- export interface StepFunctionsStateMachine extends CloudFormationResource {
260
- Type: 'AWS::StepFunctions::StateMachine'
261
- Properties: {
262
- StateMachineName?: string
263
- StateMachineType?: 'STANDARD' | 'EXPRESS'
264
- Definition?: Record<string, unknown>
265
- DefinitionString?: string
266
- DefinitionS3Location?: {
267
- Bucket: string
268
- Key: string
269
- Version?: string
270
- }
271
- DefinitionSubstitutions?: Record<string, string>
272
- RoleArn: string | { 'Fn::GetAtt': [string, string] } | { Ref: string }
273
- LoggingConfiguration?: {
274
- Destinations?: Array<{
275
- CloudWatchLogsLogGroup?: {
276
- LogGroupArn: string | { 'Fn::GetAtt': [string, string] }
277
- }
278
- }>
279
- IncludeExecutionData?: boolean
280
- Level?: 'ALL' | 'ERROR' | 'FATAL' | 'OFF'
281
- }
282
- TracingConfiguration?: {
283
- Enabled?: boolean
284
- }
285
- Tags?: Array<{
286
- Key: string
287
- Value: string
288
- }>
289
- }
290
- }
291
-
292
- // Export all AWS CloudFormation resource types
293
- export * from './route53'
294
- export * from './ec2'
295
- export * from './iam'
296
- export * from './lambda'
297
- export * from './ecs'
298
- export * from './ecr'
299
- export * from './alb'
300
- export * from './rds'
301
- export * from './dynamodb'
302
- export * from './apigateway'
303
- export * from './sns'
304
- export * from './ses'
305
- export * from './sqs'
306
- export * from './eventbridge'
307
- export * from './cloudwatch'
308
- export * from './kms'
309
- export * from './acm'
310
- export * from './efs'
311
- export * from './waf'
312
- export * from './elasticache'
313
- export * from './secrets-manager'
314
- export * from './autoscaling'
315
- export * from './ssm'
316
- export * from './backup'
317
- export * from './opensearch'
318
- export * from './rds-proxy'
319
- export * from './globalaccelerator'
320
- export * from './appsync'
321
- export * from './athena'
322
- export * from './kinesis'
323
- export * from './glue'
324
- export * from './connect'
325
- export * from './pinpoint'
326
- export * from './common'
327
- export * from './cognito'
328
- export * from './codedeploy'
package/src/kinesis.ts DELETED
@@ -1,261 +0,0 @@
1
- /**
2
- * AWS Kinesis Types
3
- * CloudFormation resource types for AWS Kinesis (data streaming)
4
- */
5
-
6
- import type { Tag } from './common'
7
-
8
- export interface Stream {
9
- Type: 'AWS::Kinesis::Stream'
10
- Properties: {
11
- Name?: string
12
- ShardCount?: number
13
- RetentionPeriodHours?: number // 24-8760 (1-365 days)
14
-
15
- // Stream mode
16
- StreamModeDetails?: {
17
- StreamMode: 'PROVISIONED' | 'ON_DEMAND'
18
- }
19
-
20
- // Encryption
21
- StreamEncryption?: {
22
- EncryptionType: 'KMS'
23
- KeyId: string | { Ref: string }
24
- }
25
-
26
- Tags?: Tag[]
27
- }
28
- DeletionPolicy?: 'Delete' | 'Retain'
29
- UpdateReplacePolicy?: 'Delete' | 'Retain'
30
- }
31
-
32
- export interface StreamConsumer {
33
- Type: 'AWS::Kinesis::StreamConsumer'
34
- Properties: {
35
- StreamARN: string | { 'Fn::GetAtt': [string, string] }
36
- ConsumerName: string
37
- }
38
- DependsOn?: string | string[]
39
- }
40
-
41
- // Kinesis Data Firehose
42
- export interface DeliveryStream {
43
- Type: 'AWS::KinesisFirehose::DeliveryStream'
44
- Properties: {
45
- DeliveryStreamName?: string
46
- DeliveryStreamType?: 'DirectPut' | 'KinesisStreamAsSource'
47
-
48
- // Source configuration (if Type = KinesisStreamAsSource)
49
- KinesisStreamSourceConfiguration?: {
50
- KinesisStreamARN: string | { 'Fn::GetAtt': [string, string] }
51
- RoleARN: string | { Ref: string }
52
- }
53
-
54
- // S3 destination
55
- S3DestinationConfiguration?: {
56
- BucketARN: string | { 'Fn::GetAtt': [string, string] }
57
- RoleARN: string | { Ref: string }
58
- Prefix?: string
59
- ErrorOutputPrefix?: string
60
- BufferingHints?: {
61
- IntervalInSeconds?: number
62
- SizeInMBs?: number
63
- }
64
- CompressionFormat?: 'UNCOMPRESSED' | 'GZIP' | 'ZIP' | 'Snappy' | 'HADOOP_SNAPPY'
65
- EncryptionConfiguration?: {
66
- NoEncryptionConfig?: 'NoEncryption'
67
- KMSEncryptionConfig?: {
68
- AWSKMSKeyARN: string | { Ref: string }
69
- }
70
- }
71
- CloudWatchLoggingOptions?: {
72
- Enabled?: boolean
73
- LogGroupName?: string
74
- LogStreamName?: string
75
- }
76
- }
77
-
78
- // Extended S3 destination
79
- ExtendedS3DestinationConfiguration?: {
80
- BucketARN: string | { 'Fn::GetAtt': [string, string] }
81
- RoleARN: string | { Ref: string }
82
- Prefix?: string
83
- ErrorOutputPrefix?: string
84
- BufferingHints?: {
85
- IntervalInSeconds?: number
86
- SizeInMBs?: number
87
- }
88
- CompressionFormat?: 'UNCOMPRESSED' | 'GZIP' | 'ZIP' | 'Snappy' | 'HADOOP_SNAPPY'
89
- EncryptionConfiguration?: {
90
- NoEncryptionConfig?: 'NoEncryption'
91
- KMSEncryptionConfig?: {
92
- AWSKMSKeyARN: string | { Ref: string }
93
- }
94
- }
95
- CloudWatchLoggingOptions?: {
96
- Enabled?: boolean
97
- LogGroupName?: string
98
- LogStreamName?: string
99
- }
100
- DataFormatConversionConfiguration?: {
101
- Enabled?: boolean
102
- SchemaConfiguration?: {
103
- DatabaseName?: string
104
- TableName?: string
105
- Region?: string
106
- RoleARN?: string | { Ref: string }
107
- }
108
- InputFormatConfiguration?: {
109
- Deserializer?: {
110
- OpenXJsonSerDe?: Record<string, any>
111
- HiveJsonSerDe?: Record<string, any>
112
- }
113
- }
114
- OutputFormatConfiguration?: {
115
- Serializer?: {
116
- ParquetSerDe?: Record<string, any>
117
- OrcSerDe?: Record<string, any>
118
- }
119
- }
120
- }
121
- DynamicPartitioningConfiguration?: {
122
- Enabled?: boolean
123
- RetryOptions?: {
124
- DurationInSeconds?: number
125
- }
126
- }
127
- ProcessingConfiguration?: {
128
- Enabled?: boolean
129
- Processors?: Array<{
130
- Type: 'Lambda'
131
- Parameters?: Array<{
132
- ParameterName: string
133
- ParameterValue: string
134
- }>
135
- }>
136
- }
137
- }
138
-
139
- // Elasticsearch destination
140
- ElasticsearchDestinationConfiguration?: {
141
- DomainARN: string | { 'Fn::GetAtt': [string, string] }
142
- IndexName: string
143
- RoleARN: string | { Ref: string }
144
- TypeName?: string
145
- IndexRotationPeriod?: 'NoRotation' | 'OneHour' | 'OneDay' | 'OneWeek' | 'OneMonth'
146
- BufferingHints?: {
147
- IntervalInSeconds?: number
148
- SizeInMBs?: number
149
- }
150
- RetryOptions?: {
151
- DurationInSeconds?: number
152
- }
153
- S3BackupMode?: 'FailedDocumentsOnly' | 'AllDocuments'
154
- S3Configuration: {
155
- BucketARN: string | { 'Fn::GetAtt': [string, string] }
156
- RoleARN: string | { Ref: string }
157
- Prefix?: string
158
- }
159
- CloudWatchLoggingOptions?: {
160
- Enabled?: boolean
161
- LogGroupName?: string
162
- LogStreamName?: string
163
- }
164
- }
165
-
166
- // OpenSearch destination
167
- AmazonopensearchserviceDestinationConfiguration?: {
168
- DomainARN: string | { 'Fn::GetAtt': [string, string] }
169
- IndexName: string
170
- RoleARN: string | { Ref: string }
171
- TypeName?: string
172
- IndexRotationPeriod?: 'NoRotation' | 'OneHour' | 'OneDay' | 'OneWeek' | 'OneMonth'
173
- BufferingHints?: {
174
- IntervalInSeconds?: number
175
- SizeInMBs?: number
176
- }
177
- RetryOptions?: {
178
- DurationInSeconds?: number
179
- }
180
- S3BackupMode?: 'FailedDocumentsOnly' | 'AllDocuments'
181
- S3Configuration: {
182
- BucketARN: string | { 'Fn::GetAtt': [string, string] }
183
- RoleARN: string | { Ref: string }
184
- Prefix?: string
185
- }
186
- CloudWatchLoggingOptions?: {
187
- Enabled?: boolean
188
- LogGroupName?: string
189
- LogStreamName?: string
190
- }
191
- }
192
-
193
- // Redshift destination
194
- RedshiftDestinationConfiguration?: {
195
- ClusterJDBCURL: string
196
- CopyCommand: {
197
- DataTableName: string
198
- CopyOptions?: string
199
- DataTableColumns?: string
200
- }
201
- Username: string
202
- Password: string
203
- RoleARN: string | { Ref: string }
204
- S3Configuration: {
205
- BucketARN: string | { 'Fn::GetAtt': [string, string] }
206
- RoleARN: string | { Ref: string }
207
- Prefix?: string
208
- }
209
- CloudWatchLoggingOptions?: {
210
- Enabled?: boolean
211
- LogGroupName?: string
212
- LogStreamName?: string
213
- }
214
- }
215
-
216
- Tags?: Tag[]
217
- }
218
- DeletionPolicy?: 'Delete' | 'Retain'
219
- UpdateReplacePolicy?: 'Delete' | 'Retain'
220
- }
221
-
222
- // Kinesis Data Analytics
223
- export interface Application {
224
- Type: 'AWS::KinesisAnalytics::Application'
225
- Properties: {
226
- ApplicationName?: string
227
- ApplicationDescription?: string
228
- ApplicationCode?: string
229
- Inputs: Array<{
230
- NamePrefix: string
231
- InputSchema: {
232
- RecordColumns: Array<{
233
- Name: string
234
- SqlType: string
235
- Mapping?: string
236
- }>
237
- RecordFormat: {
238
- RecordFormatType: 'CSV' | 'JSON'
239
- MappingParameters?: {
240
- CSVMappingParameters?: {
241
- RecordRowDelimiter: string
242
- RecordColumnDelimiter: string
243
- }
244
- JSONMappingParameters?: {
245
- RecordRowPath: string
246
- }
247
- }
248
- }
249
- RecordEncoding?: string
250
- }
251
- KinesisStreamsInput?: {
252
- ResourceARN: string | { 'Fn::GetAtt': [string, string] }
253
- RoleARN: string | { Ref: string }
254
- }
255
- KinesisFirehoseInput?: {
256
- ResourceARN: string | { 'Fn::GetAtt': [string, string] }
257
- RoleARN: string | { Ref: string }
258
- }
259
- }>
260
- }
261
- }
package/src/kms.ts DELETED
@@ -1,35 +0,0 @@
1
- import type { CloudFormationResource } from './index'
2
-
3
- export interface KMSKey extends CloudFormationResource {
4
- Type: 'AWS::KMS::Key'
5
- Properties: {
6
- Description?: string
7
- Enabled?: boolean
8
- EnableKeyRotation?: boolean
9
- KeyPolicy: {
10
- Version: '2012-10-17'
11
- Statement: Array<{
12
- Sid?: string
13
- Effect: 'Allow' | 'Deny'
14
- Principal: unknown
15
- Action: string | string[]
16
- Resource: string | string[]
17
- }>
18
- }
19
- KeySpec?: 'SYMMETRIC_DEFAULT' | 'RSA_2048' | 'RSA_3072' | 'RSA_4096' | 'ECC_NIST_P256' | 'ECC_NIST_P384' | 'ECC_NIST_P521' | 'ECC_SECG_P256K1'
20
- KeyUsage?: 'ENCRYPT_DECRYPT' | 'SIGN_VERIFY'
21
- MultiRegion?: boolean
22
- Tags?: Array<{
23
- Key: string
24
- Value: string
25
- }>
26
- }
27
- }
28
-
29
- export interface KMSAlias extends CloudFormationResource {
30
- Type: 'AWS::KMS::Alias'
31
- Properties: {
32
- AliasName: string
33
- TargetKeyId: string | { Ref: string }
34
- }
35
- }
package/src/lambda.ts DELETED
@@ -1,42 +0,0 @@
1
- import type { CloudFormationResource } from './index'
2
-
3
- export interface LambdaFunction extends CloudFormationResource {
4
- Type: 'AWS::Lambda::Function'
5
- Properties: {
6
- FunctionName?: string
7
- Description?: string
8
- Runtime: string
9
- Role: string | { 'Fn::GetAtt': [string, string] }
10
- Handler: string
11
- Code: {
12
- S3Bucket?: string
13
- S3Key?: string
14
- ZipFile?: string
15
- }
16
- Timeout?: number
17
- MemorySize?: number
18
- Environment?: {
19
- Variables: Record<string, string>
20
- }
21
- VpcConfig?: {
22
- SecurityGroupIds: string[]
23
- SubnetIds: string[]
24
- }
25
- Layers?: string[]
26
- Tags?: Array<{
27
- Key: string
28
- Value: string
29
- }>
30
- }
31
- }
32
-
33
- export interface LambdaPermission extends CloudFormationResource {
34
- Type: 'AWS::Lambda::Permission'
35
- Properties: {
36
- FunctionName: string | { Ref: string }
37
- Action: string
38
- Principal: string
39
- SourceArn?: string
40
- SourceAccount?: string
41
- }
42
- }