or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

core-compute.mdindex.mdsecurity.mdserverless.mdstorage.md

storage.mddocs/

0

# Storage Services

1

2

Complete storage solutions including S3 object storage, EBS block storage, EFS file systems, and backup services for all data storage needs.

3

4

## Capabilities

5

6

### S3 (Simple Storage Service)

7

8

Create and manage S3 buckets and objects for scalable object storage.

9

10

```typescript { .api }

11

/**

12

* Creates an S3 bucket

13

*/

14

class s3.Bucket extends pulumi.CustomResource {

15

constructor(name: string, args?: s3.BucketArgs, opts?: pulumi.ResourceOptions);

16

17

/** The name of the bucket */

18

public readonly bucket!: pulumi.Output<string>;

19

/** The ARN of the bucket */

20

public readonly arn!: pulumi.Output<string>;

21

/** The bucket domain name */

22

public readonly bucketDomainName!: pulumi.Output<string>;

23

/** The bucket regional domain name */

24

public readonly bucketRegionalDomainName!: pulumi.Output<string>;

25

/** The hosted zone ID for this bucket's region */

26

public readonly hostedZoneId!: pulumi.Output<string>;

27

/** The region this bucket resides in */

28

public readonly region!: pulumi.Output<string>;

29

/** The website endpoint */

30

public readonly websiteEndpoint!: pulumi.Output<string>;

31

/** The website domain */

32

public readonly websiteDomain!: pulumi.Output<string>;

33

/** Resource tags */

34

public readonly tags!: pulumi.Output<{[key: string]: string}>;

35

}

36

37

interface s3.BucketArgs {

38

/** The name of the bucket */

39

bucket?: pulumi.Input<string>;

40

/** The canned ACL to apply */

41

acl?: pulumi.Input<string>;

42

/** The CORS configuration */

43

corsRules?: pulumi.Input<pulumi.Input<s3.BucketCorsRule>[]>;

44

/** The website configuration */

45

website?: pulumi.Input<s3.BucketWebsite>;

46

/** The versioning configuration */

47

versioning?: pulumi.Input<s3.BucketVersioning>;

48

/** The logging configuration */

49

logging?: pulumi.Input<s3.BucketLogging>;

50

/** The lifecycle configuration */

51

lifecycleRules?: pulumi.Input<pulumi.Input<s3.BucketLifecycleRule>[]>;

52

/** Server-side encryption configuration */

53

serverSideEncryptionConfiguration?: pulumi.Input<s3.BucketServerSideEncryptionConfiguration>;

54

/** Whether to force destroy the bucket */

55

forceDestroy?: pulumi.Input<boolean>;

56

/** Resource tags */

57

tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

58

}

59

```

60

61

**Usage Example:**

62

63

```typescript

64

import * as aws from "@pulumi/aws";

65

66

// Create an S3 bucket with encryption

67

const bucket = new aws.s3.Bucket("my-bucket", {

68

bucket: "my-company-data-bucket",

69

acl: "private",

70

versioning: {

71

enabled: true,

72

},

73

serverSideEncryptionConfiguration: {

74

rule: {

75

applyServerSideEncryptionByDefault: {

76

sseAlgorithm: "AES256",

77

},

78

},

79

},

80

lifecycleRules: [{

81

id: "delete-old-versions",

82

enabled: true,

83

noncurrentVersionExpiration: {

84

days: 90,

85

},

86

}],

87

tags: {

88

Environment: "Production",

89

Purpose: "Data Storage",

90

},

91

});

92

93

// Create a bucket object

94

const object = new aws.s3.BucketObject("my-object", {

95

bucket: bucket.id,

96

key: "data/sample.json",

97

source: new pulumi.asset.FileAsset("./sample.json"),

98

contentType: "application/json",

99

});

100

101

export const bucketName = bucket.id;

102

export const bucketArn = bucket.arn;

103

```

104

105

### S3 Bucket Objects

106

107

Upload and manage objects within S3 buckets.

108

109

```typescript { .api }

110

/**

111

* Creates an S3 bucket object

112

*/

113

class s3.BucketObject extends pulumi.CustomResource {

114

constructor(name: string, args: s3.BucketObjectArgs, opts?: pulumi.ResourceOptions);

115

116

/** The bucket name */

117

public readonly bucket!: pulumi.Output<string>;

118

/** The object key */

119

public readonly key!: pulumi.Output<string>;

120

/** The ETag generated for the object */

121

public readonly etag!: pulumi.Output<string>;

122

/** The size of the object in bytes */

123

public readonly size!: pulumi.Output<number>;

124

/** The content type of the object */

125

public readonly contentType!: pulumi.Output<string>;

126

/** The server-side encryption algorithm used */

127

public readonly serverSideEncryption!: pulumi.Output<string>;

128

/** The version ID of the object */

129

public readonly versionId!: pulumi.Output<string>;

130

/** Resource tags */

131

public readonly tags!: pulumi.Output<{[key: string]: string}>;

132

}

133

134

interface s3.BucketObjectArgs {

135

/** The bucket to put the object in */

136

bucket: pulumi.Input<string>;

137

/** The object key */

138

key: pulumi.Input<string>;

139

/** The object source */

140

source?: pulumi.Input<pulumi.asset.Asset | pulumi.asset.Archive>;

141

/** The literal string value to use as the object content */

142

content?: pulumi.Input<string>;

143

/** The base64-encoded data that will be decoded and uploaded */

144

contentBase64?: pulumi.Input<string>;

145

/** The content type of the object */

146

contentType?: pulumi.Input<string>;

147

/** The canned ACL to apply */

148

acl?: pulumi.Input<string>;

149

/** The server-side encryption algorithm to use */

150

serverSideEncryption?: pulumi.Input<string>;

151

/** The AWS KMS Key ARN to use for encryption */

152

kmsKeyId?: pulumi.Input<string>;

153

/** Resource tags */

154

tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

155

}

156

```

157

158

### EBS (Elastic Block Store)

159

160

Create and manage EBS volumes for persistent block storage.

161

162

```typescript { .api }

163

/**

164

* Creates an EBS volume

165

*/

166

class ebs.Volume extends pulumi.CustomResource {

167

constructor(name: string, args: ebs.VolumeArgs, opts?: pulumi.ResourceOptions);

168

169

/** The volume ID */

170

public readonly id!: pulumi.Output<string>;

171

/** The volume ARN */

172

public readonly arn!: pulumi.Output<string>;

173

/** The size of the volume in GiBs */

174

public readonly size!: pulumi.Output<number>;

175

/** The volume type */

176

public readonly type!: pulumi.Output<string>;

177

/** The availability zone */

178

public readonly availabilityZone!: pulumi.Output<string>;

179

/** Whether the volume is encrypted */

180

public readonly encrypted!: pulumi.Output<boolean>;

181

/** The snapshot ID */

182

public readonly snapshotId!: pulumi.Output<string>;

183

/** The IOPS for the volume */

184

public readonly iops!: pulumi.Output<number>;

185

/** The throughput for the volume */

186

public readonly throughput!: pulumi.Output<number>;

187

/** Resource tags */

188

public readonly tags!: pulumi.Output<{[key: string]: string}>;

189

}

190

191

interface ebs.VolumeArgs {

192

/** The availability zone */

193

availabilityZone: pulumi.Input<string>;

194

/** The size of the volume in GiBs */

195

size?: pulumi.Input<number>;

196

/** The snapshot ID to restore from */

197

snapshotId?: pulumi.Input<string>;

198

/** The volume type */

199

type?: pulumi.Input<string>;

200

/** Whether to encrypt the volume */

201

encrypted?: pulumi.Input<boolean>;

202

/** The ARN of the AWS Key Management Service key */

203

kmsKeyId?: pulumi.Input<string>;

204

/** The IOPS for the volume */

205

iops?: pulumi.Input<number>;

206

/** The throughput for the volume */

207

throughput?: pulumi.Input<number>;

208

/** Whether the volume should be destroyed on instance termination */

209

finalSnapshot?: pulumi.Input<boolean>;

210

/** Resource tags */

211

tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

212

}

213

```

214

215

### EBS Snapshots

216

217

Create and manage EBS volume snapshots for backup and recovery.

218

219

```typescript { .api }

220

/**

221

* Creates an EBS snapshot

222

*/

223

class ebs.Snapshot extends pulumi.CustomResource {

224

constructor(name: string, args: ebs.SnapshotArgs, opts?: pulumi.ResourceOptions);

225

226

/** The snapshot ID */

227

public readonly id!: pulumi.Output<string>;

228

/** The snapshot ARN */

229

public readonly arn!: pulumi.Output<string>;

230

/** The description of the snapshot */

231

public readonly description!: pulumi.Output<string>;

232

/** The volume ID */

233

public readonly volumeId!: pulumi.Output<string>;

234

/** The size of the volume in GiBs */

235

public readonly volumeSize!: pulumi.Output<number>;

236

/** Whether the snapshot is encrypted */

237

public readonly encrypted!: pulumi.Output<boolean>;

238

/** The AWS Key Management Service key ID */

239

public readonly kmsKeyId!: pulumi.Output<string>;

240

/** The data encryption key ID */

241

public readonly dataEncryptionKeyId!: pulumi.Output<string>;

242

/** The snapshot state */

243

public readonly state!: pulumi.Output<string>;

244

/** Resource tags */

245

public readonly tags!: pulumi.Output<{[key: string]: string}>;

246

}

247

248

interface ebs.SnapshotArgs {

249

/** The volume ID to snapshot */

250

volumeId: pulumi.Input<string>;

251

/** The description of the snapshot */

252

description?: pulumi.Input<string>;

253

/** Whether to enable outposts integration */

254

outpostArn?: pulumi.Input<string>;

255

/** The storage tier for the snapshot */

256

storageTier?: pulumi.Input<string>;

257

/** Temporary restore days */

258

permanentRestore?: pulumi.Input<boolean>;

259

/** Temporary restore days */

260

temporaryRestoreDays?: pulumi.Input<number>;

261

/** Resource tags */

262

tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

263

}

264

```

265

266

### EFS (Elastic File System)

267

268

Create and manage EFS file systems for scalable network file storage.

269

270

```typescript { .api }

271

/**

272

* Creates an EFS file system

273

*/

274

class efs.FileSystem extends pulumi.CustomResource {

275

constructor(name: string, args?: efs.FileSystemArgs, opts?: pulumi.ResourceOptions);

276

277

/** The file system ID */

278

public readonly id!: pulumi.Output<string>;

279

/** The file system ARN */

280

public readonly arn!: pulumi.Output<string>;

281

/** The DNS name for the file system */

282

public readonly dnsName!: pulumi.Output<string>;

283

/** The performance mode of the file system */

284

public readonly performanceMode!: pulumi.Output<string>;

285

/** The throughput mode of the file system */

286

public readonly throughputMode!: pulumi.Output<string>;

287

/** The provisioned throughput in MiBps */

288

public readonly provisionedThroughputInMibps!: pulumi.Output<number>;

289

/** Whether the file system is encrypted */

290

public readonly encrypted!: pulumi.Output<boolean>;

291

/** The ARN of the AWS Key Management Service key */

292

public readonly kmsKeyId!: pulumi.Output<string>;

293

/** The creation token */

294

public readonly creationToken!: pulumi.Output<string>;

295

/** The file system size in bytes */

296

public readonly sizeInBytes!: pulumi.Output<efs.FileSystemSizeInBytes>;

297

/** Resource tags */

298

public readonly tags!: pulumi.Output<{[key: string]: string}>;

299

}

300

301

interface efs.FileSystemArgs {

302

/** The creation token */

303

creationToken?: pulumi.Input<string>;

304

/** The performance mode */

305

performanceMode?: pulumi.Input<string>;

306

/** The throughput mode */

307

throughputMode?: pulumi.Input<string>;

308

/** The provisioned throughput in MiBps */

309

provisionedThroughputInMibps?: pulumi.Input<number>;

310

/** Whether to encrypt the file system */

311

encrypted?: pulumi.Input<boolean>;

312

/** The ARN of the AWS Key Management Service key */

313

kmsKeyId?: pulumi.Input<string>;

314

/** Lifecycle policy */

315

lifecyclePolicy?: pulumi.Input<pulumi.Input<efs.FileSystemLifecyclePolicy>[]>;

316

/** Resource tags */

317

tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

318

}

319

```

320

321

### EFS Mount Targets

322

323

Create and manage EFS mount targets for subnet access.

324

325

```typescript { .api }

326

/**

327

* Creates an EFS mount target

328

*/

329

class efs.MountTarget extends pulumi.CustomResource {

330

constructor(name: string, args: efs.MountTargetArgs, opts?: pulumi.ResourceOptions);

331

332

/** The mount target ID */

333

public readonly id!: pulumi.Output<string>;

334

/** The DNS name for the mount target */

335

public readonly dnsName!: pulumi.Output<string>;

336

/** The file system ARN */

337

public readonly fileSystemArn!: pulumi.Output<string>;

338

/** The file system ID */

339

public readonly fileSystemId!: pulumi.Output<string>;

340

/** The IP address of the mount target */

341

public readonly ipAddress!: pulumi.Output<string>;

342

/** The subnet ID */

343

public readonly subnetId!: pulumi.Output<string>;

344

/** The network interface ID */

345

public readonly networkInterfaceId!: pulumi.Output<string>;

346

/** The availability zone ID */

347

public readonly availabilityZoneId!: pulumi.Output<string>;

348

/** The availability zone name */

349

public readonly availabilityZoneName!: pulumi.Output<string>;

350

/** The security groups */

351

public readonly securityGroups!: pulumi.Output<string[]>;

352

}

353

354

interface efs.MountTargetArgs {

355

/** The file system ID */

356

fileSystemId: pulumi.Input<string>;

357

/** The subnet ID */

358

subnetId: pulumi.Input<string>;

359

/** The IP address for the mount target */

360

ipAddress?: pulumi.Input<string>;

361

/** The security groups */

362

securityGroups?: pulumi.Input<pulumi.Input<string>[]>;

363

}

364

```

365

366

### Storage Gateway

367

368

Create and manage storage gateways for hybrid cloud storage.

369

370

```typescript { .api }

371

/**

372

* Creates a storage gateway

373

*/

374

class storagegateway.Gateway extends pulumi.CustomResource {

375

constructor(name: string, args: storagegateway.GatewayArgs, opts?: pulumi.ResourceOptions);

376

377

/** The gateway ARN */

378

public readonly arn!: pulumi.Output<string>;

379

/** The gateway ID */

380

public readonly gatewayId!: pulumi.Output<string>;

381

/** The gateway name */

382

public readonly gatewayName!: pulumi.Output<string>;

383

/** The gateway type */

384

public readonly gatewayType!: pulumi.Output<string>;

385

/** The gateway timezone */

386

public readonly gatewayTimezone!: pulumi.Output<string>;

387

/** The gateway VPC endpoint */

388

public readonly gatewayVpcEndpoint!: pulumi.Output<string>;

389

/** The host environment */

390

public readonly hostEnvironment!: pulumi.Output<string>;

391

/** Resource tags */

392

public readonly tags!: pulumi.Output<{[key: string]: string}>;

393

}

394

395

interface storagegateway.GatewayArgs {

396

/** The gateway name */

397

gatewayName: pulumi.Input<string>;

398

/** The gateway timezone */

399

gatewayTimezone: pulumi.Input<string>;

400

/** The gateway type */

401

gatewayType: pulumi.Input<string>;

402

/** The activation key */

403

activationKey?: pulumi.Input<string>;

404

/** The gateway IP address */

405

gatewayIpAddress?: pulumi.Input<string>;

406

/** The gateway VPC endpoint */

407

gatewayVpcEndpoint?: pulumi.Input<string>;

408

/** CloudWatch log group ARN */

409

cloudwatchLogGroupArn?: pulumi.Input<string>;

410

/** SMB settings */

411

smbActiveDirectorySettings?: pulumi.Input<storagegateway.GatewaySmbActiveDirectorySettings>;

412

/** SMB guest password */

413

smbGuestPassword?: pulumi.Input<string>;

414

/** SMB security strategy */

415

smbSecurityStrategy?: pulumi.Input<string>;

416

/** Average download rate limit */

417

averageDownloadRateLimitInBitsPerSec?: pulumi.Input<number>;

418

/** Average upload rate limit */

419

averageUploadRateLimitInBitsPerSec?: pulumi.Input<number>;

420

/** Resource tags */

421

tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

422

}

423

```

424

425

### Data Source Functions

426

427

Query existing storage resources.

428

429

```typescript { .api }

430

/**

431

* Get information about an S3 bucket

432

*/

433

function s3.getBucket(args: s3.GetBucketArgs): Promise<s3.GetBucketResult>;

434

435

/**

436

* Get information about S3 bucket objects

437

*/

438

function s3.getBucketObjects(args: s3.GetBucketObjectsArgs): Promise<s3.GetBucketObjectsResult>;

439

440

/**

441

* Get information about an EBS volume

442

*/

443

function ebs.getVolume(args?: ebs.GetVolumeArgs): Promise<ebs.GetVolumeResult>;

444

445

/**

446

* Get information about EBS snapshots

447

*/

448

function ebs.getSnapshots(args?: ebs.GetSnapshotsArgs): Promise<ebs.GetSnapshotsResult>;

449

450

/**

451

* Get information about an EFS file system

452

*/

453

function efs.getFileSystem(args?: efs.GetFileSystemArgs): Promise<efs.GetFileSystemResult>;

454

455

/**

456

* Get information about EFS mount targets

457

*/

458

function efs.getMountTargets(args: efs.GetMountTargetsArgs): Promise<efs.GetMountTargetsResult>;

459

```

460

461

## Types

462

463

```typescript { .api }

464

interface s3.BucketCorsRule {

465

/** Allowed headers */

466

allowedHeaders?: pulumi.Input<pulumi.Input<string>[]>;

467

/** Allowed methods */

468

allowedMethods: pulumi.Input<pulumi.Input<string>[]>;

469

/** Allowed origins */

470

allowedOrigins: pulumi.Input<pulumi.Input<string>[]>;

471

/** Exposed headers */

472

exposeHeaders?: pulumi.Input<pulumi.Input<string>[]>;

473

/** Max age seconds */

474

maxAgeSeconds?: pulumi.Input<number>;

475

}

476

477

interface s3.BucketWebsite {

478

/** The index document */

479

indexDocument?: pulumi.Input<string>;

480

/** The error document */

481

errorDocument?: pulumi.Input<string>;

482

/** The redirect all requests to */

483

redirectAllRequestsTo?: pulumi.Input<string>;

484

/** Routing rules */

485

routingRules?: pulumi.Input<string>;

486

}

487

488

interface s3.BucketVersioning {

489

/** Whether versioning is enabled */

490

enabled?: pulumi.Input<boolean>;

491

/** Whether MFA delete is enabled */

492

mfaDelete?: pulumi.Input<boolean>;

493

}

494

495

interface s3.BucketLifecycleRule {

496

/** Rule ID */

497

id?: pulumi.Input<string>;

498

/** Whether rule is enabled */

499

enabled: pulumi.Input<boolean>;

500

/** Object key prefix */

501

prefix?: pulumi.Input<string>;

502

/** Object tags */

503

tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

504

/** Expiration configuration */

505

expiration?: pulumi.Input<s3.BucketLifecycleRuleExpiration>;

506

/** Noncurrent version expiration */

507

noncurrentVersionExpiration?: pulumi.Input<s3.BucketLifecycleRuleNoncurrentVersionExpiration>;

508

/** Transition configuration */

509

transitions?: pulumi.Input<pulumi.Input<s3.BucketLifecycleRuleTransition>[]>;

510

}

511

512

interface efs.FileSystemSizeInBytes {

513

/** The latest known metered size in bytes */

514

value: number;

515

/** The time at which the size was determined */

516

timestamp?: string;

517

/** The latest known metered size for the Infrequent Access storage class in bytes */

518

valueInIa?: number;

519

/** The latest known metered size for the Standard storage class in bytes */

520

valueInStandard?: number;

521

}

522

523

interface efs.FileSystemLifecyclePolicy {

524

/** The transition to IA */

525

transitionToIa?: pulumi.Input<string>;

526

/** The transition to primary storage class */

527

transitionToPrimaryStorageClass?: pulumi.Input<string>;

528

}

529

```