BucketArgs

data class BucketArgs(val bundleId: Output<String>? = null, val forceDelete: Output<Boolean>? = null, val name: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<BucketArgs>

Provides a lightsail bucket.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.lightsail.Bucket("test", {
name: "mytestbucket",
bundleId: "small_1_0",
});
import pulumi
import pulumi_aws as aws
test = aws.lightsail.Bucket("test",
name="mytestbucket",
bundle_id="small_1_0")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = new Aws.LightSail.Bucket("test", new()
{
Name = "mytestbucket",
BundleId = "small_1_0",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lightsail.NewBucket(ctx, "test", &lightsail.BucketArgs{
Name: pulumi.String("mytestbucket"),
BundleId: pulumi.String("small_1_0"),
})
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.lightsail.Bucket;
import com.pulumi.aws.lightsail.BucketArgs;
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 test = new Bucket("test", BucketArgs.builder()
.name("mytestbucket")
.bundleId("small_1_0")
.build());
}
}
resources:
test:
type: aws:lightsail:Bucket
properties:
name: mytestbucket
bundleId: small_1_0

Import

Using pulumi import, import aws_lightsail_bucket using the name attribute. For example:

$ pulumi import aws:lightsail/bucket:Bucket test example-bucket

Constructors

Link copied to clipboard
constructor(bundleId: Output<String>? = null, forceDelete: Output<Boolean>? = null, name: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val bundleId: Output<String>? = null

The ID of the bundle to use for the bucket. A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket. Use the get-bucket-bundles cli command to get a list of bundle IDs that you can specify.

Link copied to clipboard
val forceDelete: Output<Boolean>? = null

Force Delete non-empty buckets using pulumi destroy. AWS by default will not delete an s3 bucket which is not empty, to prevent losing bucket data and affecting other resources in lightsail. If force_delete is set to true the bucket will be deleted even when not empty.

Link copied to clipboard
val name: Output<String>? = null

The name for the bucket.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Functions

Link copied to clipboard
open override fun toJava(): BucketArgs