Bucket Access Key
Provides a lightsail bucket access key. This is a set of credentials that allow API requests to be made to the 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",
});
const testLightsailBucketAccessKeyAccessKey = new aws.index.LightsailBucketAccessKeyAccessKey("test", {bucketName: testAwsLightsailBucketAccessKey.id});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
test = aws.lightsail.Bucket("test",
name="mytestbucket",
bundle_id="small_1_0")
test_lightsail_bucket_access_key_access_key = aws.index.LightsailBucketAccessKeyAccessKey("test", bucket_name=test_aws_lightsail_bucket_access_key.id)
Content copied to clipboard
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",
});
var testLightsailBucketAccessKeyAccessKey = new Aws.Index.LightsailBucketAccessKeyAccessKey("test", new()
{
BucketName = testAwsLightsailBucketAccessKey.Id,
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
"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
}
_, err = aws.NewLightsailBucketAccessKeyAccessKey(ctx, "test", &aws.LightsailBucketAccessKeyAccessKeyArgs{
BucketName: testAwsLightsailBucketAccessKey.Id,
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
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 com.pulumi.aws.lightsailBucketAccessKeyAccessKey;
import com.pulumi.aws.LightsailBucketAccessKeyAccessKeyArgs;
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());
var testLightsailBucketAccessKeyAccessKey = new LightsailBucketAccessKeyAccessKey("testLightsailBucketAccessKeyAccessKey", LightsailBucketAccessKeyAccessKeyArgs.builder()
.bucketName(testAwsLightsailBucketAccessKey.id())
.build());
}
}
Content copied to clipboard
resources:
test:
type: aws:lightsail:Bucket
properties:
name: mytestbucket
bundleId: small_1_0
testLightsailBucketAccessKeyAccessKey:
type: aws:lightsailBucketAccessKeyAccessKey
name: test
properties:
bucketName: ${testAwsLightsailBucketAccessKey.id}
Content copied to clipboard
Import
Using pulumi import
, import aws_lightsail_bucket_access_key
using the id
attribute. For example:
$ pulumi import aws:lightsail/bucketAccessKey:BucketAccessKey test example-bucket,AKIAIOSFODNN7EXAMPLE
Content copied to clipboard
Properties
Link copied to clipboard
The ID of the access key.
Link copied to clipboard
The name of the bucket that the new access key will belong to, and grant access to.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
The secret access key used to sign requests. This attribute is not available for imported resources. Note that this will be written to the state file.