@stacksjs/ts-cloud 0.1.2 → 0.1.5
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/README.md +98 -13
- package/dist/aws/acm.d.ts +129 -0
- package/dist/aws/application-autoscaling.d.ts +282 -0
- package/dist/aws/bedrock.d.ts +2292 -0
- package/dist/aws/client.d.ts +79 -0
- package/dist/aws/cloudformation.d.ts +105 -0
- package/dist/aws/cloudfront.d.ts +265 -0
- package/dist/aws/cloudwatch-logs.d.ts +48 -0
- package/dist/aws/comprehend.d.ts +505 -0
- package/dist/aws/connect.d.ts +377 -0
- package/dist/aws/deploy-imap.d.ts +14 -0
- package/dist/aws/dynamodb.d.ts +176 -0
- package/dist/aws/ec2.d.ts +272 -0
- package/dist/aws/ecr.d.ts +149 -0
- package/dist/aws/ecs.d.ts +162 -0
- package/dist/aws/elasticache.d.ts +71 -0
- package/dist/aws/elbv2.d.ts +248 -0
- package/dist/aws/email.d.ts +175 -0
- package/dist/aws/eventbridge.d.ts +142 -0
- package/dist/aws/iam.d.ts +638 -0
- package/dist/aws/imap-server.d.ts +119 -0
- package/{src/aws/index.ts → dist/aws/index.d.ts} +62 -83
- package/{src/aws/kendra.ts → dist/aws/kendra.d.ts} +71 -386
- package/dist/aws/lambda.d.ts +232 -0
- package/dist/aws/opensearch.d.ts +87 -0
- package/dist/aws/personalize.d.ts +516 -0
- package/dist/aws/polly.d.ts +214 -0
- package/dist/aws/rds.d.ts +240 -0
- package/dist/aws/rekognition.d.ts +543 -0
- package/dist/aws/route53-domains.d.ts +113 -0
- package/dist/aws/route53.d.ts +215 -0
- package/dist/aws/s3.d.ts +212 -0
- package/dist/aws/scheduler.d.ts +140 -0
- package/dist/aws/secrets-manager.d.ts +170 -0
- package/dist/aws/ses.d.ts +288 -0
- package/dist/aws/setup-phone.d.ts +0 -0
- package/dist/aws/setup-sms.d.ts +115 -0
- package/dist/aws/sms.d.ts +304 -0
- package/dist/aws/smtp-server.d.ts +61 -0
- package/dist/aws/sns.d.ts +117 -0
- package/dist/aws/sqs.d.ts +65 -0
- package/dist/aws/ssm.d.ts +179 -0
- package/dist/aws/sts.d.ts +15 -0
- package/dist/aws/support.d.ts +104 -0
- package/dist/aws/test-imap.d.ts +0 -0
- package/dist/aws/textract.d.ts +403 -0
- package/dist/aws/transcribe.d.ts +60 -0
- package/dist/aws/translate.d.ts +358 -0
- package/dist/aws/voice.d.ts +219 -0
- package/dist/bin/cli.js +1724 -0
- package/dist/config.d.ts +7 -0
- package/dist/deploy/index.d.ts +2 -0
- package/dist/deploy/static-site-external-dns.d.ts +51 -0
- package/dist/deploy/static-site.d.ts +71 -0
- package/dist/dns/cloudflare.d.ts +52 -0
- package/dist/dns/godaddy.d.ts +38 -0
- package/dist/dns/index.d.ts +45 -0
- package/dist/dns/porkbun.d.ts +18 -0
- package/dist/dns/route53-adapter.d.ts +38 -0
- package/{src/dns/types.ts → dist/dns/types.d.ts} +26 -63
- package/dist/dns/validator.d.ts +78 -0
- package/dist/generators/index.d.ts +1 -0
- package/dist/generators/infrastructure.d.ts +30 -0
- package/{src/index.ts → dist/index.d.ts} +70 -93
- package/dist/index.js +7881 -0
- package/dist/push/apns.d.ts +60 -0
- package/dist/push/fcm.d.ts +117 -0
- package/dist/push/index.d.ts +14 -0
- package/dist/security/pre-deploy-scanner.d.ts +69 -0
- package/dist/ssl/acme-client.d.ts +67 -0
- package/dist/ssl/index.d.ts +2 -0
- package/dist/ssl/letsencrypt.d.ts +48 -0
- package/dist/types.d.ts +1 -0
- package/dist/utils/cli.d.ts +123 -0
- package/dist/validation/index.d.ts +1 -0
- package/dist/validation/template.d.ts +23 -0
- package/package.json +8 -8
- package/bin/cli.ts +0 -133
- package/bin/commands/analytics.ts +0 -328
- package/bin/commands/api.ts +0 -379
- package/bin/commands/assets.ts +0 -221
- package/bin/commands/audit.ts +0 -501
- package/bin/commands/backup.ts +0 -682
- package/bin/commands/cache.ts +0 -294
- package/bin/commands/cdn.ts +0 -281
- package/bin/commands/config.ts +0 -202
- package/bin/commands/container.ts +0 -105
- package/bin/commands/cost.ts +0 -208
- package/bin/commands/database.ts +0 -401
- package/bin/commands/deploy.ts +0 -674
- package/bin/commands/domain.ts +0 -397
- package/bin/commands/email.ts +0 -423
- package/bin/commands/environment.ts +0 -285
- package/bin/commands/events.ts +0 -424
- package/bin/commands/firewall.ts +0 -145
- package/bin/commands/function.ts +0 -116
- package/bin/commands/generate.ts +0 -280
- package/bin/commands/git.ts +0 -139
- package/bin/commands/iam.ts +0 -464
- package/bin/commands/index.ts +0 -48
- package/bin/commands/init.ts +0 -120
- package/bin/commands/logs.ts +0 -148
- package/bin/commands/network.ts +0 -579
- package/bin/commands/notify.ts +0 -489
- package/bin/commands/queue.ts +0 -407
- package/bin/commands/scheduler.ts +0 -370
- package/bin/commands/secrets.ts +0 -54
- package/bin/commands/server.ts +0 -629
- package/bin/commands/shared.ts +0 -97
- package/bin/commands/ssl.ts +0 -138
- package/bin/commands/stack.ts +0 -325
- package/bin/commands/status.ts +0 -385
- package/bin/commands/storage.ts +0 -450
- package/bin/commands/team.ts +0 -96
- package/bin/commands/tunnel.ts +0 -489
- package/bin/commands/utils.ts +0 -202
- package/build.ts +0 -15
- package/cloud +0 -2
- package/src/aws/acm.ts +0 -768
- package/src/aws/application-autoscaling.ts +0 -845
- package/src/aws/bedrock.ts +0 -4074
- package/src/aws/client.ts +0 -878
- package/src/aws/cloudformation.ts +0 -896
- package/src/aws/cloudfront.ts +0 -1531
- package/src/aws/cloudwatch-logs.ts +0 -154
- package/src/aws/comprehend.ts +0 -839
- package/src/aws/connect.ts +0 -1056
- package/src/aws/deploy-imap.ts +0 -384
- package/src/aws/dynamodb.ts +0 -340
- package/src/aws/ec2.ts +0 -1385
- package/src/aws/ecr.ts +0 -621
- package/src/aws/ecs.ts +0 -615
- package/src/aws/elasticache.ts +0 -301
- package/src/aws/elbv2.ts +0 -942
- package/src/aws/email.ts +0 -928
- package/src/aws/eventbridge.ts +0 -248
- package/src/aws/iam.ts +0 -1689
- package/src/aws/imap-server.ts +0 -2100
- package/src/aws/lambda.ts +0 -786
- package/src/aws/opensearch.ts +0 -158
- package/src/aws/personalize.ts +0 -977
- package/src/aws/polly.ts +0 -559
- package/src/aws/rds.ts +0 -888
- package/src/aws/rekognition.ts +0 -846
- package/src/aws/route53-domains.ts +0 -359
- package/src/aws/route53.ts +0 -1046
- package/src/aws/s3.ts +0 -2318
- package/src/aws/scheduler.ts +0 -571
- package/src/aws/secrets-manager.ts +0 -769
- package/src/aws/ses.ts +0 -1081
- package/src/aws/setup-phone.ts +0 -104
- package/src/aws/setup-sms.ts +0 -580
- package/src/aws/sms.ts +0 -1735
- package/src/aws/smtp-server.ts +0 -531
- package/src/aws/sns.ts +0 -758
- package/src/aws/sqs.ts +0 -382
- package/src/aws/ssm.ts +0 -807
- package/src/aws/sts.ts +0 -92
- package/src/aws/support.ts +0 -391
- package/src/aws/test-imap.ts +0 -86
- package/src/aws/textract.ts +0 -780
- package/src/aws/transcribe.ts +0 -108
- package/src/aws/translate.ts +0 -641
- package/src/aws/voice.ts +0 -1379
- package/src/config.ts +0 -35
- package/src/deploy/index.ts +0 -7
- package/src/deploy/static-site-external-dns.ts +0 -906
- package/src/deploy/static-site.ts +0 -1125
- package/src/dns/godaddy.ts +0 -412
- package/src/dns/index.ts +0 -183
- package/src/dns/porkbun.ts +0 -362
- package/src/dns/route53-adapter.ts +0 -414
- package/src/dns/validator.ts +0 -369
- package/src/generators/index.ts +0 -5
- package/src/generators/infrastructure.ts +0 -1660
- package/src/push/apns.ts +0 -452
- package/src/push/fcm.ts +0 -506
- package/src/push/index.ts +0 -58
- package/src/ssl/acme-client.ts +0 -478
- package/src/ssl/index.ts +0 -7
- package/src/ssl/letsencrypt.ts +0 -747
- package/src/types.ts +0 -2
- package/src/utils/cli.ts +0 -398
- package/src/validation/index.ts +0 -5
- package/src/validation/template.ts +0 -405
- package/test/index.test.ts +0 -128
- package/tsconfig.json +0 -18
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { AWSClient } from './client';
|
|
2
|
+
export declare interface HostedZone {
|
|
3
|
+
Id: string
|
|
4
|
+
Name: string
|
|
5
|
+
CallerReference?: string
|
|
6
|
+
Config?: {
|
|
7
|
+
Comment?: string
|
|
8
|
+
PrivateZone?: boolean
|
|
9
|
+
}
|
|
10
|
+
ResourceRecordSetCount?: number
|
|
11
|
+
}
|
|
12
|
+
export declare interface ResourceRecordSet {
|
|
13
|
+
Name: string
|
|
14
|
+
Type: string
|
|
15
|
+
TTL?: number
|
|
16
|
+
ResourceRecords?: { Value: string }[]
|
|
17
|
+
AliasTarget?: {
|
|
18
|
+
HostedZoneId: string
|
|
19
|
+
DNSName: string
|
|
20
|
+
EvaluateTargetHealth: boolean
|
|
21
|
+
}
|
|
22
|
+
SetIdentifier?: string
|
|
23
|
+
Weight?: number
|
|
24
|
+
Region?: string
|
|
25
|
+
GeoLocation?: {
|
|
26
|
+
ContinentCode?: string
|
|
27
|
+
CountryCode?: string
|
|
28
|
+
SubdivisionCode?: string
|
|
29
|
+
}
|
|
30
|
+
Failover?: 'PRIMARY' | 'SECONDARY'
|
|
31
|
+
HealthCheckId?: string
|
|
32
|
+
}
|
|
33
|
+
export declare interface DelegationSet {
|
|
34
|
+
Id?: string
|
|
35
|
+
CallerReference?: string
|
|
36
|
+
NameServers: string[]
|
|
37
|
+
}
|
|
38
|
+
export declare interface CreateHostedZoneResult {
|
|
39
|
+
HostedZone: HostedZone
|
|
40
|
+
ChangeInfo: {
|
|
41
|
+
Id: string
|
|
42
|
+
Status: string
|
|
43
|
+
SubmittedAt: string
|
|
44
|
+
}
|
|
45
|
+
DelegationSet: DelegationSet
|
|
46
|
+
Location: string
|
|
47
|
+
}
|
|
48
|
+
export declare interface ListHostedZonesResult {
|
|
49
|
+
HostedZones: HostedZone[]
|
|
50
|
+
IsTruncated: boolean
|
|
51
|
+
MaxItems: string
|
|
52
|
+
Marker?: string
|
|
53
|
+
NextMarker?: string
|
|
54
|
+
}
|
|
55
|
+
export declare interface GetHostedZoneResult {
|
|
56
|
+
HostedZone: HostedZone
|
|
57
|
+
DelegationSet: DelegationSet
|
|
58
|
+
VPCs?: { VPCId: string, VPCRegion: string }[]
|
|
59
|
+
}
|
|
60
|
+
export declare interface ListResourceRecordSetsResult {
|
|
61
|
+
ResourceRecordSets: ResourceRecordSet[]
|
|
62
|
+
IsTruncated: boolean
|
|
63
|
+
MaxItems: string
|
|
64
|
+
NextRecordName?: string
|
|
65
|
+
NextRecordType?: string
|
|
66
|
+
NextRecordIdentifier?: string
|
|
67
|
+
}
|
|
68
|
+
export declare interface ChangeResourceRecordSetsResult {
|
|
69
|
+
ChangeInfo: {
|
|
70
|
+
Id: string
|
|
71
|
+
Status: string
|
|
72
|
+
SubmittedAt: string
|
|
73
|
+
Comment?: string
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export declare interface Change {
|
|
77
|
+
Action: 'CREATE' | 'DELETE' | 'UPSERT'
|
|
78
|
+
ResourceRecordSet: ResourceRecordSet
|
|
79
|
+
}
|
|
80
|
+
export declare interface ChangeBatch {
|
|
81
|
+
Comment?: string
|
|
82
|
+
Changes: Change[]
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Route53 Client for DNS management
|
|
86
|
+
*/
|
|
87
|
+
export declare class Route53Client {
|
|
88
|
+
private client: AWSClient;
|
|
89
|
+
private region: string;
|
|
90
|
+
constructor(region?: string);
|
|
91
|
+
createHostedZone(params: {
|
|
92
|
+
Name: string
|
|
93
|
+
CallerReference?: string
|
|
94
|
+
HostedZoneConfig?: {
|
|
95
|
+
Comment?: string
|
|
96
|
+
PrivateZone?: boolean
|
|
97
|
+
}
|
|
98
|
+
VPC?: {
|
|
99
|
+
VPCRegion: string
|
|
100
|
+
VPCId: string
|
|
101
|
+
}
|
|
102
|
+
DelegationSetId?: string
|
|
103
|
+
}): Promise<CreateHostedZoneResult>;
|
|
104
|
+
listHostedZones(params?: {
|
|
105
|
+
Marker?: string
|
|
106
|
+
MaxItems?: string
|
|
107
|
+
}): Promise<ListHostedZonesResult>;
|
|
108
|
+
listHostedZonesByName(params?: {
|
|
109
|
+
DNSName?: string
|
|
110
|
+
HostedZoneId?: string
|
|
111
|
+
MaxItems?: string
|
|
112
|
+
}): Promise<ListHostedZonesResult>;
|
|
113
|
+
getHostedZone(params: {
|
|
114
|
+
Id: string
|
|
115
|
+
}): Promise<GetHostedZoneResult>;
|
|
116
|
+
deleteHostedZone(params: {
|
|
117
|
+
Id: string
|
|
118
|
+
}): Promise<void>;
|
|
119
|
+
listResourceRecordSets(params: {
|
|
120
|
+
HostedZoneId: string
|
|
121
|
+
StartRecordName?: string
|
|
122
|
+
StartRecordType?: string
|
|
123
|
+
StartRecordIdentifier?: string
|
|
124
|
+
MaxItems?: string
|
|
125
|
+
}): Promise<ListResourceRecordSetsResult>;
|
|
126
|
+
changeResourceRecordSets(params: {
|
|
127
|
+
HostedZoneId: string
|
|
128
|
+
ChangeBatch: ChangeBatch
|
|
129
|
+
}): Promise<ChangeResourceRecordSetsResult>;
|
|
130
|
+
private escapeXml(str: string): string;
|
|
131
|
+
private parseCreateHostedZoneResponse(result: any): CreateHostedZoneResult;
|
|
132
|
+
private parseListHostedZonesResponse(result: any): ListHostedZonesResult;
|
|
133
|
+
private parseGetHostedZoneResponse(result: any): GetHostedZoneResult;
|
|
134
|
+
private parseListResourceRecordSetsResponse(result: any): ListResourceRecordSetsResult;
|
|
135
|
+
private parseChangeResourceRecordSetsResponse(result: any): ChangeResourceRecordSetsResult;
|
|
136
|
+
private parseHostedZone(hz: any): HostedZone;
|
|
137
|
+
private parseDelegationSet(ds: any): DelegationSet;
|
|
138
|
+
private parseResourceRecordSet(rs: any): ResourceRecordSet;
|
|
139
|
+
findHostedZoneByName(domainName: string): Promise<HostedZone | null>;
|
|
140
|
+
createARecord(params: {
|
|
141
|
+
HostedZoneId: string
|
|
142
|
+
Name: string
|
|
143
|
+
Value: string | string[]
|
|
144
|
+
TTL?: number
|
|
145
|
+
}): Promise<ChangeResourceRecordSetsResult>;
|
|
146
|
+
createCnameRecord(params: {
|
|
147
|
+
HostedZoneId: string
|
|
148
|
+
Name: string
|
|
149
|
+
Value: string
|
|
150
|
+
TTL?: number
|
|
151
|
+
}): Promise<ChangeResourceRecordSetsResult>;
|
|
152
|
+
createAliasRecord(params: {
|
|
153
|
+
HostedZoneId: string
|
|
154
|
+
Name: string
|
|
155
|
+
TargetHostedZoneId: string
|
|
156
|
+
TargetDNSName: string
|
|
157
|
+
EvaluateTargetHealth?: boolean
|
|
158
|
+
Type?: 'A' | 'AAAA'
|
|
159
|
+
}): Promise<ChangeResourceRecordSetsResult>;
|
|
160
|
+
createTxtRecord(params: {
|
|
161
|
+
HostedZoneId: string
|
|
162
|
+
Name: string
|
|
163
|
+
Value: string | string[]
|
|
164
|
+
TTL?: number
|
|
165
|
+
}): Promise<ChangeResourceRecordSetsResult>;
|
|
166
|
+
createMxRecord(params: {
|
|
167
|
+
HostedZoneId: string
|
|
168
|
+
Name: string
|
|
169
|
+
Values: Array<{ priority: number, mailServer: string }>
|
|
170
|
+
TTL?: number
|
|
171
|
+
}): Promise<ChangeResourceRecordSetsResult>;
|
|
172
|
+
deleteRecord(params: {
|
|
173
|
+
HostedZoneId: string
|
|
174
|
+
RecordSet: ResourceRecordSet
|
|
175
|
+
}): Promise<ChangeResourceRecordSetsResult>;
|
|
176
|
+
waitForChange(changeId: string, maxAttempts?: any, delayMs?: any): Promise<boolean>;
|
|
177
|
+
findOrCreateHostedZone(params: {
|
|
178
|
+
domainName: string
|
|
179
|
+
comment?: string
|
|
180
|
+
privateZone?: boolean
|
|
181
|
+
vpc?: {
|
|
182
|
+
VPCRegion: string
|
|
183
|
+
VPCId: string
|
|
184
|
+
}
|
|
185
|
+
}): Promise<{
|
|
186
|
+
hostedZone: HostedZone
|
|
187
|
+
nameServers: string[]
|
|
188
|
+
isNew: boolean
|
|
189
|
+
}>;
|
|
190
|
+
static getRootDomain(domain: string): string;
|
|
191
|
+
findHostedZoneForDomain(domain: string): Promise<HostedZone | null>;
|
|
192
|
+
ensureHostedZone(params: {
|
|
193
|
+
domainName: string
|
|
194
|
+
comment?: string
|
|
195
|
+
}): Promise<{
|
|
196
|
+
hostedZoneId: string
|
|
197
|
+
nameServers: string[]
|
|
198
|
+
isNew: boolean
|
|
199
|
+
action: 'found' | 'created'
|
|
200
|
+
}>;
|
|
201
|
+
setupDomainDns(params: {
|
|
202
|
+
domain: string
|
|
203
|
+
createIfNotExists?: boolean
|
|
204
|
+
}): Promise<{
|
|
205
|
+
success: boolean
|
|
206
|
+
hostedZoneId: string | null
|
|
207
|
+
nameServers: string[]
|
|
208
|
+
isNew: boolean
|
|
209
|
+
message: string
|
|
210
|
+
}>;
|
|
211
|
+
static readonly CloudFrontHostedZoneId: any;
|
|
212
|
+
static readonly S3WebsiteHostedZoneIds: Record<string, string>;
|
|
213
|
+
static readonly ALBHostedZoneIds: Record<string, string>;
|
|
214
|
+
static readonly APIGatewayHostedZoneIds: Record<string, string>;
|
|
215
|
+
}
|
package/dist/aws/s3.d.ts
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { AWSClient } from './client';
|
|
2
|
+
export declare interface S3SyncOptions {
|
|
3
|
+
source: string
|
|
4
|
+
bucket: string
|
|
5
|
+
prefix?: string
|
|
6
|
+
delete?: boolean
|
|
7
|
+
acl?: 'private' | 'public-read' | 'public-read-write' | 'authenticated-read'
|
|
8
|
+
cacheControl?: string
|
|
9
|
+
contentType?: string
|
|
10
|
+
metadata?: Record<string, string>
|
|
11
|
+
exclude?: string[]
|
|
12
|
+
include?: string[]
|
|
13
|
+
dryRun?: boolean
|
|
14
|
+
}
|
|
15
|
+
export declare interface S3CopyOptions {
|
|
16
|
+
source: string
|
|
17
|
+
bucket: string
|
|
18
|
+
key: string
|
|
19
|
+
acl?: 'private' | 'public-read' | 'public-read-write' | 'authenticated-read'
|
|
20
|
+
cacheControl?: string
|
|
21
|
+
contentType?: string
|
|
22
|
+
metadata?: Record<string, string>
|
|
23
|
+
}
|
|
24
|
+
export declare interface S3ListOptions {
|
|
25
|
+
bucket: string
|
|
26
|
+
prefix?: string
|
|
27
|
+
maxKeys?: number
|
|
28
|
+
}
|
|
29
|
+
export declare interface S3Object {
|
|
30
|
+
Key: string
|
|
31
|
+
LastModified: string
|
|
32
|
+
Size: number
|
|
33
|
+
ETag?: string
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* S3 client using direct API calls
|
|
37
|
+
*/
|
|
38
|
+
export declare class S3Client {
|
|
39
|
+
private client: AWSClient;
|
|
40
|
+
private region: string;
|
|
41
|
+
constructor(region?: string, profile?: string);
|
|
42
|
+
private getCredentials(): { accessKeyId: string, secretAccessKey: string, sessionToken?: string };
|
|
43
|
+
private loadCredentialsFromFile(): { accessKeyId: string, secretAccessKey: string, sessionToken?: string } | null;
|
|
44
|
+
listBuckets(): Promise<{ Buckets: Array<{ Name: string, CreationDate?: string }> }>;
|
|
45
|
+
createBucket(bucket: string, options?: { acl?: string }): Promise<void>;
|
|
46
|
+
deleteBucket(bucket: string): Promise<void>;
|
|
47
|
+
emptyAndDeleteBucket(bucket: string): Promise<void>;
|
|
48
|
+
listAllObjects(options: S3ListOptions): Promise<S3Object[]>;
|
|
49
|
+
list(options: S3ListOptions): Promise<S3Object[]>;
|
|
50
|
+
putObject(options: {
|
|
51
|
+
bucket: string
|
|
52
|
+
key: string
|
|
53
|
+
body: string | Buffer | Uint8Array
|
|
54
|
+
acl?: string
|
|
55
|
+
cacheControl?: string
|
|
56
|
+
contentType?: string
|
|
57
|
+
metadata?: Record<string, string>
|
|
58
|
+
}): Promise<void>;
|
|
59
|
+
getObject(bucket: string, key: string): Promise<string>;
|
|
60
|
+
copyObject(options: {
|
|
61
|
+
sourceBucket: string
|
|
62
|
+
sourceKey: string
|
|
63
|
+
destinationBucket: string
|
|
64
|
+
destinationKey: string
|
|
65
|
+
contentType?: string
|
|
66
|
+
metadata?: Record<string, string>
|
|
67
|
+
metadataDirective?: 'COPY' | 'REPLACE'
|
|
68
|
+
}): Promise<void>;
|
|
69
|
+
deleteObject(bucket: string, key: string): Promise<void>;
|
|
70
|
+
deleteObjects(bucket: string, keys: string[]): Promise<void>;
|
|
71
|
+
bucketExists(bucket: string): Promise<boolean>;
|
|
72
|
+
copy(options: S3CopyOptions): Promise<void>;
|
|
73
|
+
sync(options: S3SyncOptions): Promise<void>;
|
|
74
|
+
delete(bucket: string, key: string): Promise<void>;
|
|
75
|
+
deletePrefix(bucket: string, prefix: string): Promise<void>;
|
|
76
|
+
getBucketSize(bucket: string, prefix?: string): Promise<number>;
|
|
77
|
+
private listFilesRecursive(dir: string): Promise<string[]>;
|
|
78
|
+
putBucketPolicy(bucket: string, policy: object | string): Promise<void>;
|
|
79
|
+
getBucketPolicy(bucket: string): Promise<object | null>;
|
|
80
|
+
deleteBucketPolicy(bucket: string): Promise<void>;
|
|
81
|
+
headBucket(bucket: string): Promise<{ exists: boolean; region?: string }>;
|
|
82
|
+
headObject(bucket: string, key: string): Promise<{
|
|
83
|
+
ContentLength?: number
|
|
84
|
+
ContentType?: string
|
|
85
|
+
ETag?: string
|
|
86
|
+
LastModified?: string
|
|
87
|
+
Metadata?: Record<string, string>
|
|
88
|
+
} | null>;
|
|
89
|
+
getObjectBuffer(bucket: string, key: string): Promise<Buffer>;
|
|
90
|
+
getObjectJson<T = any>(bucket: string, key: string): Promise<T>;
|
|
91
|
+
putObjectJson(bucket: string, key: string, data: any, options?: {
|
|
92
|
+
acl?: string
|
|
93
|
+
cacheControl?: string
|
|
94
|
+
metadata?: Record<string, string>
|
|
95
|
+
}): Promise<void>;
|
|
96
|
+
getBucketVersioning(bucket: string): Promise<{ Status?: 'Enabled' | 'Suspended' }>;
|
|
97
|
+
putBucketVersioning(bucket: string, status: 'Enabled' | 'Suspended'): Promise<void>;
|
|
98
|
+
getBucketLifecycleConfiguration(bucket: string): Promise<any>;
|
|
99
|
+
putBucketLifecycleConfiguration(bucket: string, rules: Array<{
|
|
100
|
+
ID: string
|
|
101
|
+
Status: 'Enabled' | 'Disabled'
|
|
102
|
+
Filter?: { Prefix?: string }
|
|
103
|
+
Expiration?: { Days?: number; Date?: string }
|
|
104
|
+
Transitions?: Array<{ Days?: number; StorageClass: string }>
|
|
105
|
+
NoncurrentVersionExpiration?: { NoncurrentDays: number }
|
|
106
|
+
}>): Promise<void>;
|
|
107
|
+
deleteBucketLifecycleConfiguration(bucket: string): Promise<void>;
|
|
108
|
+
getBucketCors(bucket: string): Promise<any>;
|
|
109
|
+
putBucketCors(bucket: string, rules: Array<{
|
|
110
|
+
AllowedOrigins: string[]
|
|
111
|
+
AllowedMethods: string[]
|
|
112
|
+
AllowedHeaders?: string[]
|
|
113
|
+
ExposeHeaders?: string[]
|
|
114
|
+
MaxAgeSeconds?: number
|
|
115
|
+
}>): Promise<void>;
|
|
116
|
+
deleteBucketCors(bucket: string): Promise<void>;
|
|
117
|
+
getBucketEncryption(bucket: string): Promise<any>;
|
|
118
|
+
putBucketEncryption(bucket: string, sseAlgorithm: 'AES256' | 'aws:kms', kmsKeyId?: string): Promise<void>;
|
|
119
|
+
deleteBucketEncryption(bucket: string): Promise<void>;
|
|
120
|
+
getBucketTagging(bucket: string): Promise<Array<{ Key: string; Value: string }>>;
|
|
121
|
+
putBucketTagging(bucket: string, tags: Array<{ Key: string; Value: string }>): Promise<void>;
|
|
122
|
+
deleteBucketTagging(bucket: string): Promise<void>;
|
|
123
|
+
getObjectTagging(bucket: string, key: string): Promise<Array<{ Key: string; Value: string }>>;
|
|
124
|
+
putObjectTagging(bucket: string, key: string, tags: Array<{ Key: string; Value: string }>): Promise<void>;
|
|
125
|
+
deleteObjectTagging(bucket: string, key: string): Promise<void>;
|
|
126
|
+
getBucketAcl(bucket: string): Promise<any>;
|
|
127
|
+
putBucketAcl(bucket: string, acl: 'private' | 'public-read' | 'public-read-write' | 'authenticated-read'): Promise<void>;
|
|
128
|
+
getObjectAcl(bucket: string, key: string): Promise<any>;
|
|
129
|
+
putObjectAcl(bucket: string, key: string, acl: 'private' | 'public-read' | 'public-read-write' | 'authenticated-read'): Promise<void>;
|
|
130
|
+
getBucketLocation(bucket: string): Promise<string>;
|
|
131
|
+
getBucketLogging(bucket: string): Promise<any>;
|
|
132
|
+
putBucketLogging(bucket: string, targetBucket: string, targetPrefix: string): Promise<void>;
|
|
133
|
+
getBucketNotificationConfiguration(bucket: string): Promise<any>;
|
|
134
|
+
putBucketNotificationConfiguration(bucket: string, config: {
|
|
135
|
+
LambdaFunctionConfigurations?: Array<{
|
|
136
|
+
Id?: string
|
|
137
|
+
LambdaFunctionArn: string
|
|
138
|
+
Events: string[]
|
|
139
|
+
Filter?: { Key?: { FilterRules: Array<{ Name: string; Value: string }> } }
|
|
140
|
+
}>
|
|
141
|
+
TopicConfigurations?: Array<{
|
|
142
|
+
Id?: string
|
|
143
|
+
TopicArn: string
|
|
144
|
+
Events: string[]
|
|
145
|
+
Filter?: { Key?: { FilterRules: Array<{ Name: string; Value: string }> } }
|
|
146
|
+
}>
|
|
147
|
+
QueueConfigurations?: Array<{
|
|
148
|
+
Id?: string
|
|
149
|
+
QueueArn: string
|
|
150
|
+
Events: string[]
|
|
151
|
+
Filter?: { Key?: { FilterRules: Array<{ Name: string; Value: string }> } }
|
|
152
|
+
}>
|
|
153
|
+
}): Promise<void>;
|
|
154
|
+
getBucketWebsite(bucket: string): Promise<any>;
|
|
155
|
+
putBucketWebsite(bucket: string, config: {
|
|
156
|
+
IndexDocument: string
|
|
157
|
+
ErrorDocument?: string
|
|
158
|
+
RedirectAllRequestsTo?: { HostName: string; Protocol?: string }
|
|
159
|
+
}): Promise<void>;
|
|
160
|
+
deleteBucketWebsite(bucket: string): Promise<void>;
|
|
161
|
+
getBucketReplication(bucket: string): Promise<any>;
|
|
162
|
+
deleteBucketReplication(bucket: string): Promise<void>;
|
|
163
|
+
getPublicAccessBlock(bucket: string): Promise<any>;
|
|
164
|
+
putPublicAccessBlock(bucket: string, config: {
|
|
165
|
+
BlockPublicAcls?: boolean
|
|
166
|
+
IgnorePublicAcls?: boolean
|
|
167
|
+
BlockPublicPolicy?: boolean
|
|
168
|
+
RestrictPublicBuckets?: boolean
|
|
169
|
+
}): Promise<void>;
|
|
170
|
+
deletePublicAccessBlock(bucket: string): Promise<void>;
|
|
171
|
+
generatePresignedGetUrl(bucket: string, key: string, expiresInSeconds?: number): string;
|
|
172
|
+
generatePresignedPutUrl(bucket: string, key: string, contentType: string, expiresInSeconds?: number): string;
|
|
173
|
+
createMultipartUpload(bucket: string, key: string, options?: {
|
|
174
|
+
contentType?: string
|
|
175
|
+
metadata?: Record<string, string>
|
|
176
|
+
}): Promise<{ UploadId: string }>;
|
|
177
|
+
uploadPart(bucket: string, key: string, uploadId: string, partNumber: number, body: Buffer): Promise<{ ETag: string }>;
|
|
178
|
+
completeMultipartUpload(bucket: string, key: string, uploadId: string, parts: Array<{ PartNumber: number; ETag: string }>): Promise<void>;
|
|
179
|
+
abortMultipartUpload(bucket: string, key: string, uploadId: string): Promise<void>;
|
|
180
|
+
listMultipartUploads(bucket: string): Promise<Array<{ Key: string; UploadId: string; Initiated: string }>>;
|
|
181
|
+
restoreObject(bucket: string, key: string, days: number, tier?: 'Standard' | 'Bulk' | 'Expedited'): Promise<void>;
|
|
182
|
+
selectObjectContent(bucket: string, key: string, expression: string, inputFormat: 'CSV' | 'JSON' | 'Parquet', outputFormat?: 'CSV' | 'JSON'): Promise<string>;
|
|
183
|
+
getSignedUrl(options: {
|
|
184
|
+
bucket: string
|
|
185
|
+
key: string
|
|
186
|
+
expiresIn?: number
|
|
187
|
+
operation?: 'getObject' | 'putObject'
|
|
188
|
+
}): Promise<string>;
|
|
189
|
+
listObjects(options: {
|
|
190
|
+
bucket: string
|
|
191
|
+
prefix?: string
|
|
192
|
+
maxKeys?: number
|
|
193
|
+
continuationToken?: string
|
|
194
|
+
}): Promise<{
|
|
195
|
+
objects: S3Object[]
|
|
196
|
+
nextContinuationToken?: string
|
|
197
|
+
}>;
|
|
198
|
+
emptyBucket(bucket: string): Promise<{ deletedCount: number }>;
|
|
199
|
+
listObjectVersions(options: {
|
|
200
|
+
bucket: string
|
|
201
|
+
prefix?: string
|
|
202
|
+
keyMarker?: string
|
|
203
|
+
versionIdMarker?: string
|
|
204
|
+
maxKeys?: number
|
|
205
|
+
}): Promise<{
|
|
206
|
+
versions: Array<{ Key: string; VersionId: string; IsLatest: boolean }>
|
|
207
|
+
deleteMarkers: Array<{ Key: string; VersionId: string; IsLatest: boolean }>
|
|
208
|
+
nextKeyMarker?: string
|
|
209
|
+
nextVersionIdMarker?: string
|
|
210
|
+
}>;
|
|
211
|
+
deleteObjectVersions(bucket: string, objects: Array<{ Key: string; VersionId?: string }>): Promise<void>;
|
|
212
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { AWSClient } from './client';
|
|
2
|
+
export declare interface Schedule {
|
|
3
|
+
Name: string
|
|
4
|
+
Arn?: string
|
|
5
|
+
State?: 'ENABLED' | 'DISABLED'
|
|
6
|
+
ScheduleExpression?: string
|
|
7
|
+
ScheduleExpressionTimezone?: string
|
|
8
|
+
Target?: {
|
|
9
|
+
Arn: string
|
|
10
|
+
RoleArn: string
|
|
11
|
+
Input?: string
|
|
12
|
+
}
|
|
13
|
+
FlexibleTimeWindow?: {
|
|
14
|
+
Mode: 'OFF' | 'FLEXIBLE'
|
|
15
|
+
MaximumWindowInMinutes?: number
|
|
16
|
+
}
|
|
17
|
+
GroupName?: string
|
|
18
|
+
Description?: string
|
|
19
|
+
StartDate?: string
|
|
20
|
+
EndDate?: string
|
|
21
|
+
CreationDate?: string
|
|
22
|
+
LastModificationDate?: string
|
|
23
|
+
}
|
|
24
|
+
export declare interface CreateScheduleInput {
|
|
25
|
+
Name: string
|
|
26
|
+
GroupName?: string
|
|
27
|
+
ScheduleExpression: string
|
|
28
|
+
ScheduleExpressionTimezone?: string
|
|
29
|
+
Description?: string
|
|
30
|
+
State?: 'ENABLED' | 'DISABLED'
|
|
31
|
+
FlexibleTimeWindow: {
|
|
32
|
+
Mode: 'OFF' | 'FLEXIBLE'
|
|
33
|
+
MaximumWindowInMinutes?: number
|
|
34
|
+
}
|
|
35
|
+
Target: {
|
|
36
|
+
Arn: string
|
|
37
|
+
RoleArn: string
|
|
38
|
+
Input?: string
|
|
39
|
+
}
|
|
40
|
+
StartDate?: Date
|
|
41
|
+
EndDate?: Date
|
|
42
|
+
}
|
|
43
|
+
export declare interface UpdateScheduleInput {
|
|
44
|
+
Name: string
|
|
45
|
+
GroupName?: string
|
|
46
|
+
ScheduleExpression?: string
|
|
47
|
+
ScheduleExpressionTimezone?: string
|
|
48
|
+
Description?: string
|
|
49
|
+
State?: 'ENABLED' | 'DISABLED'
|
|
50
|
+
FlexibleTimeWindow?: {
|
|
51
|
+
Mode: 'OFF' | 'FLEXIBLE'
|
|
52
|
+
MaximumWindowInMinutes?: number
|
|
53
|
+
}
|
|
54
|
+
Target?: {
|
|
55
|
+
Arn: string
|
|
56
|
+
RoleArn: string
|
|
57
|
+
Input?: string
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export declare interface ScheduleGroup {
|
|
61
|
+
Name: string
|
|
62
|
+
Arn?: string
|
|
63
|
+
State?: string
|
|
64
|
+
CreationDate?: string
|
|
65
|
+
LastModificationDate?: string
|
|
66
|
+
}
|
|
67
|
+
export declare interface CreateScheduleOptions {
|
|
68
|
+
name: string
|
|
69
|
+
scheduleExpression: string
|
|
70
|
+
targetArn: string
|
|
71
|
+
roleArn: string
|
|
72
|
+
input?: string
|
|
73
|
+
groupName?: string
|
|
74
|
+
state?: 'ENABLED' | 'DISABLED'
|
|
75
|
+
description?: string
|
|
76
|
+
flexibleTimeWindow?: {
|
|
77
|
+
mode: 'OFF' | 'FLEXIBLE'
|
|
78
|
+
maxWindowMinutes?: number
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
export declare interface SchedulerRule {
|
|
82
|
+
Name: string
|
|
83
|
+
Arn: string
|
|
84
|
+
EventPattern?: string
|
|
85
|
+
ScheduleExpression?: string
|
|
86
|
+
State: 'ENABLED' | 'DISABLED'
|
|
87
|
+
Description?: string
|
|
88
|
+
}
|
|
89
|
+
export declare interface SchedulerTarget {
|
|
90
|
+
Id: string
|
|
91
|
+
Arn: string
|
|
92
|
+
RoleArn?: string
|
|
93
|
+
Input?: string
|
|
94
|
+
InputPath?: string
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* EventBridge Scheduler management using direct API calls
|
|
98
|
+
*/
|
|
99
|
+
export declare class SchedulerClient {
|
|
100
|
+
private client: AWSClient;
|
|
101
|
+
private region: string;
|
|
102
|
+
constructor(region?: string, profile?: string);
|
|
103
|
+
createRule(options: {
|
|
104
|
+
name: string
|
|
105
|
+
scheduleExpression: string
|
|
106
|
+
description?: string
|
|
107
|
+
state?: 'ENABLED' | 'DISABLED'
|
|
108
|
+
}): Promise<{ RuleArn: string }>;
|
|
109
|
+
putTargets(ruleName: string, targets: SchedulerTarget[]): Promise<void>;
|
|
110
|
+
listRules(namePrefix?: string): Promise<{ Rules: SchedulerRule[] }>;
|
|
111
|
+
describeRule(name: string): Promise<SchedulerRule>;
|
|
112
|
+
listTargetsByRule(ruleName: string): Promise<{ Targets: SchedulerTarget[] }>;
|
|
113
|
+
deleteRule(name: string, force?: boolean): Promise<void>;
|
|
114
|
+
removeTargets(ruleName: string, targetIds: string[]): Promise<void>;
|
|
115
|
+
enableRule(name: string): Promise<void>;
|
|
116
|
+
disableRule(name: string): Promise<void>;
|
|
117
|
+
createLambdaSchedule(options: {
|
|
118
|
+
name: string
|
|
119
|
+
scheduleExpression: string
|
|
120
|
+
functionArn: string
|
|
121
|
+
description?: string
|
|
122
|
+
input?: string
|
|
123
|
+
}): Promise<{ RuleArn: string }>;
|
|
124
|
+
createEcsSchedule(options: {
|
|
125
|
+
name: string
|
|
126
|
+
scheduleExpression: string
|
|
127
|
+
clusterArn: string
|
|
128
|
+
taskDefinitionArn: string
|
|
129
|
+
roleArn: string
|
|
130
|
+
subnets: string[]
|
|
131
|
+
securityGroups?: string[]
|
|
132
|
+
description?: string
|
|
133
|
+
}): Promise<{ RuleArn: string }>;
|
|
134
|
+
listSchedules(options?: { GroupName?: string; NamePrefix?: string; State?: string }): Promise<{ Schedules: Schedule[] }>;
|
|
135
|
+
getSchedule(options: { Name: string; GroupName?: string }): Promise<Schedule | null>;
|
|
136
|
+
createSchedule(input: CreateScheduleInput): Promise<{ ScheduleArn: string }>;
|
|
137
|
+
updateSchedule(input: UpdateScheduleInput): Promise<{ ScheduleArn: string }>;
|
|
138
|
+
deleteSchedule(options: { Name: string; GroupName?: string }): Promise<void>;
|
|
139
|
+
listScheduleGroups(options?: { NamePrefix?: string }): Promise<{ ScheduleGroups: ScheduleGroup[] }>;
|
|
140
|
+
}
|