Directory Bucket Args
Provides an Amazon S3 Express directory bucket resource.
Example Usage
Availability Zone
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.s3.DirectoryBucket("example", {
bucket: "example--usw2-az1--x-s3",
location: {
name: "usw2-az1",
},
});
import pulumi
import pulumi_aws as aws
example = aws.s3.DirectoryBucket("example",
bucket="example--usw2-az1--x-s3",
location={
"name": "usw2-az1",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.S3.DirectoryBucket("example", new()
{
Bucket = "example--usw2-az1--x-s3",
Location = new Aws.S3.Inputs.DirectoryBucketLocationArgs
{
Name = "usw2-az1",
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := s3.NewDirectoryBucket(ctx, "example", &s3.DirectoryBucketArgs{
Bucket: pulumi.String("example--usw2-az1--x-s3"),
Location: &s3.DirectoryBucketLocationArgs{
Name: pulumi.String("usw2-az1"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.DirectoryBucket;
import com.pulumi.aws.s3.DirectoryBucketArgs;
import com.pulumi.aws.s3.inputs.DirectoryBucketLocationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new DirectoryBucket("example", DirectoryBucketArgs.builder()
.bucket("example--usw2-az1--x-s3")
.location(DirectoryBucketLocationArgs.builder()
.name("usw2-az1")
.build())
.build());
}
}
resources:
example:
type: aws:s3:DirectoryBucket
properties:
bucket: example--usw2-az1--x-s3
location:
name: usw2-az1
Dedicated Local Zone
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleLocalZone = new aws.s3.DirectoryBucket("example_local_zone", {
bucket: "example--usw2-xxx-lz1--x-s3",
location: {
name: "usw2-xxx-lz1",
type: "LocalZone",
},
});
import pulumi
import pulumi_aws as aws
example_local_zone = aws.s3.DirectoryBucket("example_local_zone",
bucket="example--usw2-xxx-lz1--x-s3",
location={
"name": "usw2-xxx-lz1",
"type": "LocalZone",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleLocalZone = new Aws.S3.DirectoryBucket("example_local_zone", new()
{
Bucket = "example--usw2-xxx-lz1--x-s3",
Location = new Aws.S3.Inputs.DirectoryBucketLocationArgs
{
Name = "usw2-xxx-lz1",
Type = "LocalZone",
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := s3.NewDirectoryBucket(ctx, "example_local_zone", &s3.DirectoryBucketArgs{
Bucket: pulumi.String("example--usw2-xxx-lz1--x-s3"),
Location: &s3.DirectoryBucketLocationArgs{
Name: pulumi.String("usw2-xxx-lz1"),
Type: pulumi.String("LocalZone"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.DirectoryBucket;
import com.pulumi.aws.s3.DirectoryBucketArgs;
import com.pulumi.aws.s3.inputs.DirectoryBucketLocationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleLocalZone = new DirectoryBucket("exampleLocalZone", DirectoryBucketArgs.builder()
.bucket("example--usw2-xxx-lz1--x-s3")
.location(DirectoryBucketLocationArgs.builder()
.name("usw2-xxx-lz1")
.type("LocalZone")
.build())
.build());
}
}
resources:
exampleLocalZone:
type: aws:s3:DirectoryBucket
name: example_local_zone
properties:
bucket: example--usw2-xxx-lz1--x-s3
location:
name: usw2-xxx-lz1
type: LocalZone
Import
Using pulumi import
, import S3 bucket using bucket
. For example:
$ pulumi import aws:s3/directoryBucket:DirectoryBucket example example--usw2-az1--x-s3
Constructors
Properties
Data redundancy. Valid values: SingleAvailabilityZone
, SingleLocalZone
. The default value depends on the value of the location.type
attribute.
Boolean that indicates all objects should be deleted from the bucket when the bucket is destroyed so that the bucket can be destroyed without error. These objects are not recoverable. This only deletes objects when the bucket is destroyed, not when setting this parameter to true
. Once this parameter is set to true
, there must be a successful pulumi up
run before a destroy is required to update this value in the resource state. Without a successful pulumi up
after this parameter is set, this flag will have no effect. If setting this field in the same operation that would require replacing the bucket or destroying the bucket, this flag will not work. Additionally when importing a bucket, a successful pulumi up
is required to set this value in state before it will take effect on a destroy operation.
Bucket location. See Location below for more details.