@ts-cloud/aws-types 0.2.1

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