aws.s3.BucketObjectv2
Explore with Pulumi AI
Provides an S3 object resource.
Example Usage
Uploading a file to a bucket
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as std from "@pulumi/std";
const object = new aws.s3.BucketObjectv2("object", {
bucket: "your_bucket_name",
key: "new_object_key",
source: new pulumi.asset.FileAsset("path/to/file"),
etag: std.filemd5({
input: "path/to/file",
}).then(invoke => invoke.result),
});
import pulumi
import pulumi_aws as aws
import pulumi_std as std
object = aws.s3.BucketObjectv2("object",
bucket="your_bucket_name",
key="new_object_key",
source=pulumi.FileAsset("path/to/file"),
etag=std.filemd5(input="path/to/file").result)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
invokeFilemd5, err := std.Filemd5(ctx, &std.Filemd5Args{
Input: "path/to/file",
}, nil)
if err != nil {
return err
}
_, err = s3.NewBucketObjectv2(ctx, "object", &s3.BucketObjectv2Args{
Bucket: pulumi.Any("your_bucket_name"),
Key: pulumi.String("new_object_key"),
Source: pulumi.NewFileAsset("path/to/file"),
Etag: pulumi.String(invokeFilemd5.Result),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var @object = new Aws.S3.BucketObjectv2("object", new()
{
Bucket = "your_bucket_name",
Key = "new_object_key",
Source = new FileAsset("path/to/file"),
Etag = Std.Filemd5.Invoke(new()
{
Input = "path/to/file",
}).Apply(invoke => invoke.Result),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketObjectv2;
import com.pulumi.aws.s3.BucketObjectv2Args;
import com.pulumi.asset.FileAsset;
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 object = new BucketObjectv2("object", BucketObjectv2Args.builder()
.bucket("your_bucket_name")
.key("new_object_key")
.source(new FileAsset("path/to/file"))
.etag(StdFunctions.filemd5(Filemd5Args.builder()
.input("path/to/file")
.build()).result())
.build());
}
}
resources:
object:
type: aws:s3:BucketObjectv2
properties:
bucket: your_bucket_name
key: new_object_key
source:
fn::FileAsset: path/to/file
etag:
fn::invoke:
Function: std:filemd5
Arguments:
input: path/to/file
Return: result
Encrypting with KMS Key
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const examplekms = new aws.kms.Key("examplekms", {
description: "KMS key 1",
deletionWindowInDays: 7,
});
const examplebucket = new aws.s3.BucketV2("examplebucket", {bucket: "examplebuckettftest"});
const example = new aws.s3.BucketAclV2("example", {
bucket: examplebucket.id,
acl: "private",
});
const exampleBucketObjectv2 = new aws.s3.BucketObjectv2("example", {
key: "someobject",
bucket: examplebucket.id,
source: new pulumi.asset.FileAsset("index.html"),
kmsKeyId: examplekms.arn,
});
import pulumi
import pulumi_aws as aws
examplekms = aws.kms.Key("examplekms",
description="KMS key 1",
deletion_window_in_days=7)
examplebucket = aws.s3.BucketV2("examplebucket", bucket="examplebuckettftest")
example = aws.s3.BucketAclV2("example",
bucket=examplebucket.id,
acl="private")
example_bucket_objectv2 = aws.s3.BucketObjectv2("example",
key="someobject",
bucket=examplebucket.id,
source=pulumi.FileAsset("index.html"),
kms_key_id=examplekms.arn)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms"
"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 {
examplekms, err := kms.NewKey(ctx, "examplekms", &kms.KeyArgs{
Description: pulumi.String("KMS key 1"),
DeletionWindowInDays: pulumi.Int(7),
})
if err != nil {
return err
}
examplebucket, err := s3.NewBucketV2(ctx, "examplebucket", &s3.BucketV2Args{
Bucket: pulumi.String("examplebuckettftest"),
})
if err != nil {
return err
}
_, err = s3.NewBucketAclV2(ctx, "example", &s3.BucketAclV2Args{
Bucket: examplebucket.ID(),
Acl: pulumi.String("private"),
})
if err != nil {
return err
}
_, err = s3.NewBucketObjectv2(ctx, "example", &s3.BucketObjectv2Args{
Key: pulumi.String("someobject"),
Bucket: examplebucket.ID(),
Source: pulumi.NewFileAsset("index.html"),
KmsKeyId: examplekms.Arn,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var examplekms = new Aws.Kms.Key("examplekms", new()
{
Description = "KMS key 1",
DeletionWindowInDays = 7,
});
var examplebucket = new Aws.S3.BucketV2("examplebucket", new()
{
Bucket = "examplebuckettftest",
});
var example = new Aws.S3.BucketAclV2("example", new()
{
Bucket = examplebucket.Id,
Acl = "private",
});
var exampleBucketObjectv2 = new Aws.S3.BucketObjectv2("example", new()
{
Key = "someobject",
Bucket = examplebucket.Id,
Source = new FileAsset("index.html"),
KmsKeyId = examplekms.Arn,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.kms.Key;
import com.pulumi.aws.kms.KeyArgs;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.s3.BucketV2Args;
import com.pulumi.aws.s3.BucketAclV2;
import com.pulumi.aws.s3.BucketAclV2Args;
import com.pulumi.aws.s3.BucketObjectv2;
import com.pulumi.aws.s3.BucketObjectv2Args;
import com.pulumi.asset.FileAsset;
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 examplekms = new Key("examplekms", KeyArgs.builder()
.description("KMS key 1")
.deletionWindowInDays(7)
.build());
var examplebucket = new BucketV2("examplebucket", BucketV2Args.builder()
.bucket("examplebuckettftest")
.build());
var example = new BucketAclV2("example", BucketAclV2Args.builder()
.bucket(examplebucket.id())
.acl("private")
.build());
var exampleBucketObjectv2 = new BucketObjectv2("exampleBucketObjectv2", BucketObjectv2Args.builder()
.key("someobject")
.bucket(examplebucket.id())
.source(new FileAsset("index.html"))
.kmsKeyId(examplekms.arn())
.build());
}
}
resources:
examplekms:
type: aws:kms:Key
properties:
description: KMS key 1
deletionWindowInDays: 7
examplebucket:
type: aws:s3:BucketV2
properties:
bucket: examplebuckettftest
example:
type: aws:s3:BucketAclV2
properties:
bucket: ${examplebucket.id}
acl: private
exampleBucketObjectv2:
type: aws:s3:BucketObjectv2
name: example
properties:
key: someobject
bucket: ${examplebucket.id}
source:
fn::FileAsset: index.html
kmsKeyId: ${examplekms.arn}
Server Side Encryption with S3 Default Master Key
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const examplebucket = new aws.s3.BucketV2("examplebucket", {bucket: "examplebuckettftest"});
const example = new aws.s3.BucketAclV2("example", {
bucket: examplebucket.id,
acl: "private",
});
const exampleBucketObjectv2 = new aws.s3.BucketObjectv2("example", {
key: "someobject",
bucket: examplebucket.id,
source: new pulumi.asset.FileAsset("index.html"),
serverSideEncryption: "aws:kms",
});
import pulumi
import pulumi_aws as aws
examplebucket = aws.s3.BucketV2("examplebucket", bucket="examplebuckettftest")
example = aws.s3.BucketAclV2("example",
bucket=examplebucket.id,
acl="private")
example_bucket_objectv2 = aws.s3.BucketObjectv2("example",
key="someobject",
bucket=examplebucket.id,
source=pulumi.FileAsset("index.html"),
server_side_encryption="aws:kms")
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 {
examplebucket, err := s3.NewBucketV2(ctx, "examplebucket", &s3.BucketV2Args{
Bucket: pulumi.String("examplebuckettftest"),
})
if err != nil {
return err
}
_, err = s3.NewBucketAclV2(ctx, "example", &s3.BucketAclV2Args{
Bucket: examplebucket.ID(),
Acl: pulumi.String("private"),
})
if err != nil {
return err
}
_, err = s3.NewBucketObjectv2(ctx, "example", &s3.BucketObjectv2Args{
Key: pulumi.String("someobject"),
Bucket: examplebucket.ID(),
Source: pulumi.NewFileAsset("index.html"),
ServerSideEncryption: pulumi.String("aws:kms"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var examplebucket = new Aws.S3.BucketV2("examplebucket", new()
{
Bucket = "examplebuckettftest",
});
var example = new Aws.S3.BucketAclV2("example", new()
{
Bucket = examplebucket.Id,
Acl = "private",
});
var exampleBucketObjectv2 = new Aws.S3.BucketObjectv2("example", new()
{
Key = "someobject",
Bucket = examplebucket.Id,
Source = new FileAsset("index.html"),
ServerSideEncryption = "aws:kms",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.s3.BucketV2Args;
import com.pulumi.aws.s3.BucketAclV2;
import com.pulumi.aws.s3.BucketAclV2Args;
import com.pulumi.aws.s3.BucketObjectv2;
import com.pulumi.aws.s3.BucketObjectv2Args;
import com.pulumi.asset.FileAsset;
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 examplebucket = new BucketV2("examplebucket", BucketV2Args.builder()
.bucket("examplebuckettftest")
.build());
var example = new BucketAclV2("example", BucketAclV2Args.builder()
.bucket(examplebucket.id())
.acl("private")
.build());
var exampleBucketObjectv2 = new BucketObjectv2("exampleBucketObjectv2", BucketObjectv2Args.builder()
.key("someobject")
.bucket(examplebucket.id())
.source(new FileAsset("index.html"))
.serverSideEncryption("aws:kms")
.build());
}
}
resources:
examplebucket:
type: aws:s3:BucketV2
properties:
bucket: examplebuckettftest
example:
type: aws:s3:BucketAclV2
properties:
bucket: ${examplebucket.id}
acl: private
exampleBucketObjectv2:
type: aws:s3:BucketObjectv2
name: example
properties:
key: someobject
bucket: ${examplebucket.id}
source:
fn::FileAsset: index.html
serverSideEncryption: aws:kms
Server Side Encryption with AWS-Managed Key
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const examplebucket = new aws.s3.BucketV2("examplebucket", {bucket: "examplebuckettftest"});
const example = new aws.s3.BucketAclV2("example", {
bucket: examplebucket.id,
acl: "private",
});
const exampleBucketObjectv2 = new aws.s3.BucketObjectv2("example", {
key: "someobject",
bucket: examplebucket.id,
source: new pulumi.asset.FileAsset("index.html"),
serverSideEncryption: "AES256",
});
import pulumi
import pulumi_aws as aws
examplebucket = aws.s3.BucketV2("examplebucket", bucket="examplebuckettftest")
example = aws.s3.BucketAclV2("example",
bucket=examplebucket.id,
acl="private")
example_bucket_objectv2 = aws.s3.BucketObjectv2("example",
key="someobject",
bucket=examplebucket.id,
source=pulumi.FileAsset("index.html"),
server_side_encryption="AES256")
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 {
examplebucket, err := s3.NewBucketV2(ctx, "examplebucket", &s3.BucketV2Args{
Bucket: pulumi.String("examplebuckettftest"),
})
if err != nil {
return err
}
_, err = s3.NewBucketAclV2(ctx, "example", &s3.BucketAclV2Args{
Bucket: examplebucket.ID(),
Acl: pulumi.String("private"),
})
if err != nil {
return err
}
_, err = s3.NewBucketObjectv2(ctx, "example", &s3.BucketObjectv2Args{
Key: pulumi.String("someobject"),
Bucket: examplebucket.ID(),
Source: pulumi.NewFileAsset("index.html"),
ServerSideEncryption: pulumi.String("AES256"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var examplebucket = new Aws.S3.BucketV2("examplebucket", new()
{
Bucket = "examplebuckettftest",
});
var example = new Aws.S3.BucketAclV2("example", new()
{
Bucket = examplebucket.Id,
Acl = "private",
});
var exampleBucketObjectv2 = new Aws.S3.BucketObjectv2("example", new()
{
Key = "someobject",
Bucket = examplebucket.Id,
Source = new FileAsset("index.html"),
ServerSideEncryption = "AES256",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.s3.BucketV2Args;
import com.pulumi.aws.s3.BucketAclV2;
import com.pulumi.aws.s3.BucketAclV2Args;
import com.pulumi.aws.s3.BucketObjectv2;
import com.pulumi.aws.s3.BucketObjectv2Args;
import com.pulumi.asset.FileAsset;
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 examplebucket = new BucketV2("examplebucket", BucketV2Args.builder()
.bucket("examplebuckettftest")
.build());
var example = new BucketAclV2("example", BucketAclV2Args.builder()
.bucket(examplebucket.id())
.acl("private")
.build());
var exampleBucketObjectv2 = new BucketObjectv2("exampleBucketObjectv2", BucketObjectv2Args.builder()
.key("someobject")
.bucket(examplebucket.id())
.source(new FileAsset("index.html"))
.serverSideEncryption("AES256")
.build());
}
}
resources:
examplebucket:
type: aws:s3:BucketV2
properties:
bucket: examplebuckettftest
example:
type: aws:s3:BucketAclV2
properties:
bucket: ${examplebucket.id}
acl: private
exampleBucketObjectv2:
type: aws:s3:BucketObjectv2
name: example
properties:
key: someobject
bucket: ${examplebucket.id}
source:
fn::FileAsset: index.html
serverSideEncryption: AES256
S3 Object Lock
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const examplebucket = new aws.s3.BucketV2("examplebucket", {
bucket: "examplebuckettftest",
objectLockEnabled: true,
});
const example = new aws.s3.BucketAclV2("example", {
bucket: examplebucket.id,
acl: "private",
});
const exampleBucketVersioningV2 = new aws.s3.BucketVersioningV2("example", {
bucket: examplebucket.id,
versioningConfiguration: {
status: "Enabled",
},
});
const examplebucketObject = new aws.s3.BucketObjectv2("examplebucket_object", {
key: "someobject",
bucket: examplebucket.id,
source: new pulumi.asset.FileAsset("important.txt"),
objectLockLegalHoldStatus: "ON",
objectLockMode: "GOVERNANCE",
objectLockRetainUntilDate: "2021-12-31T23:59:60Z",
forceDestroy: true,
}, {
dependsOn: [exampleBucketVersioningV2],
});
import pulumi
import pulumi_aws as aws
examplebucket = aws.s3.BucketV2("examplebucket",
bucket="examplebuckettftest",
object_lock_enabled=True)
example = aws.s3.BucketAclV2("example",
bucket=examplebucket.id,
acl="private")
example_bucket_versioning_v2 = aws.s3.BucketVersioningV2("example",
bucket=examplebucket.id,
versioning_configuration={
"status": "Enabled",
})
examplebucket_object = aws.s3.BucketObjectv2("examplebucket_object",
key="someobject",
bucket=examplebucket.id,
source=pulumi.FileAsset("important.txt"),
object_lock_legal_hold_status="ON",
object_lock_mode="GOVERNANCE",
object_lock_retain_until_date="2021-12-31T23:59:60Z",
force_destroy=True,
opts = pulumi.ResourceOptions(depends_on=[example_bucket_versioning_v2]))
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 {
examplebucket, err := s3.NewBucketV2(ctx, "examplebucket", &s3.BucketV2Args{
Bucket: pulumi.String("examplebuckettftest"),
ObjectLockEnabled: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = s3.NewBucketAclV2(ctx, "example", &s3.BucketAclV2Args{
Bucket: examplebucket.ID(),
Acl: pulumi.String("private"),
})
if err != nil {
return err
}
exampleBucketVersioningV2, err := s3.NewBucketVersioningV2(ctx, "example", &s3.BucketVersioningV2Args{
Bucket: examplebucket.ID(),
VersioningConfiguration: &s3.BucketVersioningV2VersioningConfigurationArgs{
Status: pulumi.String("Enabled"),
},
})
if err != nil {
return err
}
_, err = s3.NewBucketObjectv2(ctx, "examplebucket_object", &s3.BucketObjectv2Args{
Key: pulumi.String("someobject"),
Bucket: examplebucket.ID(),
Source: pulumi.NewFileAsset("important.txt"),
ObjectLockLegalHoldStatus: pulumi.String("ON"),
ObjectLockMode: pulumi.String("GOVERNANCE"),
ObjectLockRetainUntilDate: pulumi.String("2021-12-31T23:59:60Z"),
ForceDestroy: pulumi.Bool(true),
}, pulumi.DependsOn([]pulumi.Resource{
exampleBucketVersioningV2,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var examplebucket = new Aws.S3.BucketV2("examplebucket", new()
{
Bucket = "examplebuckettftest",
ObjectLockEnabled = true,
});
var example = new Aws.S3.BucketAclV2("example", new()
{
Bucket = examplebucket.Id,
Acl = "private",
});
var exampleBucketVersioningV2 = new Aws.S3.BucketVersioningV2("example", new()
{
Bucket = examplebucket.Id,
VersioningConfiguration = new Aws.S3.Inputs.BucketVersioningV2VersioningConfigurationArgs
{
Status = "Enabled",
},
});
var examplebucketObject = new Aws.S3.BucketObjectv2("examplebucket_object", new()
{
Key = "someobject",
Bucket = examplebucket.Id,
Source = new FileAsset("important.txt"),
ObjectLockLegalHoldStatus = "ON",
ObjectLockMode = "GOVERNANCE",
ObjectLockRetainUntilDate = "2021-12-31T23:59:60Z",
ForceDestroy = true,
}, new CustomResourceOptions
{
DependsOn =
{
exampleBucketVersioningV2,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.s3.BucketV2Args;
import com.pulumi.aws.s3.BucketAclV2;
import com.pulumi.aws.s3.BucketAclV2Args;
import com.pulumi.aws.s3.BucketVersioningV2;
import com.pulumi.aws.s3.BucketVersioningV2Args;
import com.pulumi.aws.s3.inputs.BucketVersioningV2VersioningConfigurationArgs;
import com.pulumi.aws.s3.BucketObjectv2;
import com.pulumi.aws.s3.BucketObjectv2Args;
import com.pulumi.resources.CustomResourceOptions;
import com.pulumi.asset.FileAsset;
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 examplebucket = new BucketV2("examplebucket", BucketV2Args.builder()
.bucket("examplebuckettftest")
.objectLockEnabled(true)
.build());
var example = new BucketAclV2("example", BucketAclV2Args.builder()
.bucket(examplebucket.id())
.acl("private")
.build());
var exampleBucketVersioningV2 = new BucketVersioningV2("exampleBucketVersioningV2", BucketVersioningV2Args.builder()
.bucket(examplebucket.id())
.versioningConfiguration(BucketVersioningV2VersioningConfigurationArgs.builder()
.status("Enabled")
.build())
.build());
var examplebucketObject = new BucketObjectv2("examplebucketObject", BucketObjectv2Args.builder()
.key("someobject")
.bucket(examplebucket.id())
.source(new FileAsset("important.txt"))
.objectLockLegalHoldStatus("ON")
.objectLockMode("GOVERNANCE")
.objectLockRetainUntilDate("2021-12-31T23:59:60Z")
.forceDestroy(true)
.build(), CustomResourceOptions.builder()
.dependsOn(exampleBucketVersioningV2)
.build());
}
}
resources:
examplebucket:
type: aws:s3:BucketV2
properties:
bucket: examplebuckettftest
objectLockEnabled: true
example:
type: aws:s3:BucketAclV2
properties:
bucket: ${examplebucket.id}
acl: private
exampleBucketVersioningV2:
type: aws:s3:BucketVersioningV2
name: example
properties:
bucket: ${examplebucket.id}
versioningConfiguration:
status: Enabled
examplebucketObject:
type: aws:s3:BucketObjectv2
name: examplebucket_object
properties:
key: someobject
bucket: ${examplebucket.id}
source:
fn::FileAsset: important.txt
objectLockLegalHoldStatus: ON
objectLockMode: GOVERNANCE
objectLockRetainUntilDate: 2021-12-31T23:59:60Z
forceDestroy: true
options:
dependson:
- ${exampleBucketVersioningV2}
Ignoring Provider default_tags
S3 objects support a maximum of 10 tags.
If the resource’s own tags
and the provider-level default_tags
would together lead to more than 10 tags on an S3 object, use the override_provider
configuration block to suppress any provider-level default_tags
.
S3 objects stored in Amazon S3 Express directory buckets do not support tags, so any provider-level
default_tags
must be suppressed.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const examplebucket = new aws.s3.BucketV2("examplebucket", {bucket: "examplebuckettftest"});
const examplebucketObject = new aws.s3.BucketObjectv2("examplebucket_object", {
key: "someobject",
bucket: examplebucket.id,
source: new pulumi.asset.FileAsset("important.txt"),
tags: {
Env: "test",
},
overrideProvider: {
defaultTags: {
tags: {},
},
},
});
import pulumi
import pulumi_aws as aws
examplebucket = aws.s3.BucketV2("examplebucket", bucket="examplebuckettftest")
examplebucket_object = aws.s3.BucketObjectv2("examplebucket_object",
key="someobject",
bucket=examplebucket.id,
source=pulumi.FileAsset("important.txt"),
tags={
"Env": "test",
},
override_provider={
"default_tags": {
"tags": {},
},
})
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 {
examplebucket, err := s3.NewBucketV2(ctx, "examplebucket", &s3.BucketV2Args{
Bucket: pulumi.String("examplebuckettftest"),
})
if err != nil {
return err
}
_, err = s3.NewBucketObjectv2(ctx, "examplebucket_object", &s3.BucketObjectv2Args{
Key: pulumi.String("someobject"),
Bucket: examplebucket.ID(),
Source: pulumi.NewFileAsset("important.txt"),
Tags: pulumi.StringMap{
"Env": pulumi.String("test"),
},
OverrideProvider: &s3.BucketObjectv2OverrideProviderArgs{
DefaultTags: &s3.BucketObjectv2OverrideProviderDefaultTagsArgs{
Tags: pulumi.StringMap{},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var examplebucket = new Aws.S3.BucketV2("examplebucket", new()
{
Bucket = "examplebuckettftest",
});
var examplebucketObject = new Aws.S3.BucketObjectv2("examplebucket_object", new()
{
Key = "someobject",
Bucket = examplebucket.Id,
Source = new FileAsset("important.txt"),
Tags =
{
{ "Env", "test" },
},
OverrideProvider = new Aws.S3.Inputs.BucketObjectv2OverrideProviderArgs
{
DefaultTags = new Aws.S3.Inputs.BucketObjectv2OverrideProviderDefaultTagsArgs
{
Tags = null,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.s3.BucketV2Args;
import com.pulumi.aws.s3.BucketObjectv2;
import com.pulumi.aws.s3.BucketObjectv2Args;
import com.pulumi.aws.s3.inputs.BucketObjectv2OverrideProviderArgs;
import com.pulumi.aws.s3.inputs.BucketObjectv2OverrideProviderDefaultTagsArgs;
import com.pulumi.asset.FileAsset;
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 examplebucket = new BucketV2("examplebucket", BucketV2Args.builder()
.bucket("examplebuckettftest")
.build());
var examplebucketObject = new BucketObjectv2("examplebucketObject", BucketObjectv2Args.builder()
.key("someobject")
.bucket(examplebucket.id())
.source(new FileAsset("important.txt"))
.tags(Map.of("Env", "test"))
.overrideProvider(BucketObjectv2OverrideProviderArgs.builder()
.defaultTags(BucketObjectv2OverrideProviderDefaultTagsArgs.builder()
.tags()
.build())
.build())
.build());
}
}
resources:
examplebucket:
type: aws:s3:BucketV2
properties:
bucket: examplebuckettftest
examplebucketObject:
type: aws:s3:BucketObjectv2
name: examplebucket_object
properties:
key: someobject
bucket: ${examplebucket.id}
source:
fn::FileAsset: important.txt
tags:
Env: test
overrideProvider:
defaultTags:
tags: {}
Create BucketObjectv2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BucketObjectv2(name: string, args: BucketObjectv2Args, opts?: CustomResourceOptions);
@overload
def BucketObjectv2(resource_name: str,
args: BucketObjectv2Args,
opts: Optional[ResourceOptions] = None)
@overload
def BucketObjectv2(resource_name: str,
opts: Optional[ResourceOptions] = None,
bucket: Optional[str] = None,
force_destroy: Optional[bool] = None,
content: Optional[str] = None,
key: Optional[str] = None,
checksum_algorithm: Optional[str] = None,
kms_key_id: Optional[str] = None,
content_base64: Optional[str] = None,
content_disposition: Optional[str] = None,
metadata: Optional[Mapping[str, str]] = None,
content_language: Optional[str] = None,
content_type: Optional[str] = None,
etag: Optional[str] = None,
acl: Optional[str] = None,
cache_control: Optional[str] = None,
bucket_key_enabled: Optional[bool] = None,
content_encoding: Optional[str] = None,
object_lock_legal_hold_status: Optional[str] = None,
object_lock_mode: Optional[str] = None,
object_lock_retain_until_date: Optional[str] = None,
override_provider: Optional[BucketObjectv2OverrideProviderArgs] = None,
server_side_encryption: Optional[str] = None,
source: Optional[Union[pulumi.Asset, pulumi.Archive]] = None,
source_hash: Optional[str] = None,
storage_class: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
website_redirect: Optional[str] = None)
func NewBucketObjectv2(ctx *Context, name string, args BucketObjectv2Args, opts ...ResourceOption) (*BucketObjectv2, error)
public BucketObjectv2(string name, BucketObjectv2Args args, CustomResourceOptions? opts = null)
public BucketObjectv2(String name, BucketObjectv2Args args)
public BucketObjectv2(String name, BucketObjectv2Args args, CustomResourceOptions options)
type: aws:s3:BucketObjectv2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args BucketObjectv2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args BucketObjectv2Args
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args BucketObjectv2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BucketObjectv2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BucketObjectv2Args
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var bucketObjectv2Resource = new Aws.S3.BucketObjectv2("bucketObjectv2Resource", new()
{
Bucket = "string",
ForceDestroy = false,
Content = "string",
Key = "string",
ChecksumAlgorithm = "string",
KmsKeyId = "string",
ContentBase64 = "string",
ContentDisposition = "string",
Metadata =
{
{ "string", "string" },
},
ContentLanguage = "string",
ContentType = "string",
Etag = "string",
Acl = "string",
CacheControl = "string",
BucketKeyEnabled = false,
ContentEncoding = "string",
ObjectLockLegalHoldStatus = "string",
ObjectLockMode = "string",
ObjectLockRetainUntilDate = "string",
OverrideProvider = new Aws.S3.Inputs.BucketObjectv2OverrideProviderArgs
{
DefaultTags = new Aws.S3.Inputs.BucketObjectv2OverrideProviderDefaultTagsArgs
{
Tags =
{
{ "string", "string" },
},
},
},
ServerSideEncryption = "string",
Source = new StringAsset("content"),
SourceHash = "string",
StorageClass = "string",
Tags =
{
{ "string", "string" },
},
WebsiteRedirect = "string",
});
example, err := s3.NewBucketObjectv2(ctx, "bucketObjectv2Resource", &s3.BucketObjectv2Args{
Bucket: pulumi.Any("string"),
ForceDestroy: pulumi.Bool(false),
Content: pulumi.String("string"),
Key: pulumi.String("string"),
ChecksumAlgorithm: pulumi.String("string"),
KmsKeyId: pulumi.String("string"),
ContentBase64: pulumi.String("string"),
ContentDisposition: pulumi.String("string"),
Metadata: pulumi.StringMap{
"string": pulumi.String("string"),
},
ContentLanguage: pulumi.String("string"),
ContentType: pulumi.String("string"),
Etag: pulumi.String("string"),
Acl: pulumi.String("string"),
CacheControl: pulumi.String("string"),
BucketKeyEnabled: pulumi.Bool(false),
ContentEncoding: pulumi.String("string"),
ObjectLockLegalHoldStatus: pulumi.String("string"),
ObjectLockMode: pulumi.String("string"),
ObjectLockRetainUntilDate: pulumi.String("string"),
OverrideProvider: &s3.BucketObjectv2OverrideProviderArgs{
DefaultTags: &s3.BucketObjectv2OverrideProviderDefaultTagsArgs{
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
},
ServerSideEncryption: pulumi.String("string"),
Source: pulumi.NewStringAsset("content"),
SourceHash: pulumi.String("string"),
StorageClass: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
WebsiteRedirect: pulumi.String("string"),
})
var bucketObjectv2Resource = new BucketObjectv2("bucketObjectv2Resource", BucketObjectv2Args.builder()
.bucket("string")
.forceDestroy(false)
.content("string")
.key("string")
.checksumAlgorithm("string")
.kmsKeyId("string")
.contentBase64("string")
.contentDisposition("string")
.metadata(Map.of("string", "string"))
.contentLanguage("string")
.contentType("string")
.etag("string")
.acl("string")
.cacheControl("string")
.bucketKeyEnabled(false)
.contentEncoding("string")
.objectLockLegalHoldStatus("string")
.objectLockMode("string")
.objectLockRetainUntilDate("string")
.overrideProvider(BucketObjectv2OverrideProviderArgs.builder()
.defaultTags(BucketObjectv2OverrideProviderDefaultTagsArgs.builder()
.tags(Map.of("string", "string"))
.build())
.build())
.serverSideEncryption("string")
.source(new StringAsset("content"))
.sourceHash("string")
.storageClass("string")
.tags(Map.of("string", "string"))
.websiteRedirect("string")
.build());
bucket_objectv2_resource = aws.s3.BucketObjectv2("bucketObjectv2Resource",
bucket="string",
force_destroy=False,
content="string",
key="string",
checksum_algorithm="string",
kms_key_id="string",
content_base64="string",
content_disposition="string",
metadata={
"string": "string",
},
content_language="string",
content_type="string",
etag="string",
acl="string",
cache_control="string",
bucket_key_enabled=False,
content_encoding="string",
object_lock_legal_hold_status="string",
object_lock_mode="string",
object_lock_retain_until_date="string",
override_provider={
"default_tags": {
"tags": {
"string": "string",
},
},
},
server_side_encryption="string",
source=pulumi.StringAsset("content"),
source_hash="string",
storage_class="string",
tags={
"string": "string",
},
website_redirect="string")
const bucketObjectv2Resource = new aws.s3.BucketObjectv2("bucketObjectv2Resource", {
bucket: "string",
forceDestroy: false,
content: "string",
key: "string",
checksumAlgorithm: "string",
kmsKeyId: "string",
contentBase64: "string",
contentDisposition: "string",
metadata: {
string: "string",
},
contentLanguage: "string",
contentType: "string",
etag: "string",
acl: "string",
cacheControl: "string",
bucketKeyEnabled: false,
contentEncoding: "string",
objectLockLegalHoldStatus: "string",
objectLockMode: "string",
objectLockRetainUntilDate: "string",
overrideProvider: {
defaultTags: {
tags: {
string: "string",
},
},
},
serverSideEncryption: "string",
source: new pulumi.asset.StringAsset("content"),
sourceHash: "string",
storageClass: "string",
tags: {
string: "string",
},
websiteRedirect: "string",
});
type: aws:s3:BucketObjectv2
properties:
acl: string
bucket: string
bucketKeyEnabled: false
cacheControl: string
checksumAlgorithm: string
content: string
contentBase64: string
contentDisposition: string
contentEncoding: string
contentLanguage: string
contentType: string
etag: string
forceDestroy: false
key: string
kmsKeyId: string
metadata:
string: string
objectLockLegalHoldStatus: string
objectLockMode: string
objectLockRetainUntilDate: string
overrideProvider:
defaultTags:
tags:
string: string
serverSideEncryption: string
source:
fn::StringAsset: content
sourceHash: string
storageClass: string
tags:
string: string
websiteRedirect: string
BucketObjectv2 Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The BucketObjectv2 resource accepts the following input properties:
- Bucket string | string
- Name of the bucket to put the file in. Alternatively, an S3 access point ARN can be specified.
- Acl string
- Canned ACL to apply. Valid values are
private
,public-read
,public-read-write
,aws-exec-read
,authenticated-read
,bucket-owner-read
, andbucket-owner-full-control
. - Bucket
Key boolEnabled - Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
- Cache
Control string - Caching behavior along the request/reply chain Read w3c cache_control for further details.
- Checksum
Algorithm string - Indicates the algorithm used to create the checksum for the object. If a value is specified and the object is encrypted with KMS, you must have permission to use the
kms:Decrypt
action. Valid values:CRC32
,CRC32C
,SHA1
,SHA256
. - Content string
- Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
- Content
Base64 string - Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the
gzipbase64
function with small text strings. For larger objects, usesource
to stream the content from a disk file. - Content
Disposition string - Presentational information for the object. Read w3c content_disposition for further information.
- Content
Encoding string - Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.
- Content
Language string - Language the content is in e.g., en-US or en-GB.
- Content
Type string - Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
- Etag string
- Triggers updates when the value changes. This attribute is not compatible with KMS encryption,
kms_key_id
orserver_side_encryption = "aws:kms"
, also if an object is larger than 16 MB, the AWS Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest (seesource_hash
instead). - Force
Destroy bool - Whether to allow the object to be deleted by removing any legal hold on any object version. Default is
false
. This value should be set totrue
only if the bucket has S3 object lock enabled. - Key string
Name of the object once it is in the bucket.
The following arguments are optional:
- Kms
Key stringId - ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the
aws.kms.Key
resource, use thearn
attribute. If referencing theaws.kms.Alias
data source or resource, use thetarget_key_arn
attribute. The provider will only perform drift detection if a configuration value is provided. - Metadata Dictionary<string, string>
- Map of keys/values to provision metadata (will be automatically prefixed by
x-amz-meta-
, note that only lowercase label are currently supported by the AWS Go API). - Object
Lock stringLegal Hold Status - Legal hold status that you want to apply to the specified object. Valid values are
ON
andOFF
. - Object
Lock stringMode - Object lock retention mode that you want to apply to this object. Valid values are
GOVERNANCE
andCOMPLIANCE
. - Object
Lock stringRetain Until Date - Date and time, in RFC3339 format, when this object's object lock will expire.
- Override
Provider BucketObjectv2Override Provider - Override provider-level configuration options. See Override Provider below for more details.
- Server
Side stringEncryption - Server-side encryption of the object in S3. Valid values are "
AES256
" and "aws:kms
". - Source
Asset
Or Archive - Path to a file that will be read and uploaded as raw bytes for the object content.
- Source
Hash string - Triggers updates like
etag
but useful to addressetag
encryption limitations. (The value is only stored in state and not saved by AWS.) - Storage
Class string - Storage Class for the object. Defaults to "
STANDARD
". - Dictionary<string, string>
- Map of tags to assign to the object. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Website
Redirect string Target URL for website redirect.
If no content is provided through
source
,content
orcontent_base64
, then the object will be empty.Note: The provider ignores all leading
/
s in the object'skey
and treats multiple/
s in the rest of the object'skey
as a single/
, so values of/index.html
andindex.html
correspond to the same S3 object as dofirst//second///third//
andfirst/second/third/
.
- Bucket string | string
- Name of the bucket to put the file in. Alternatively, an S3 access point ARN can be specified.
- Acl string
- Canned ACL to apply. Valid values are
private
,public-read
,public-read-write
,aws-exec-read
,authenticated-read
,bucket-owner-read
, andbucket-owner-full-control
. - Bucket
Key boolEnabled - Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
- Cache
Control string - Caching behavior along the request/reply chain Read w3c cache_control for further details.
- Checksum
Algorithm string - Indicates the algorithm used to create the checksum for the object. If a value is specified and the object is encrypted with KMS, you must have permission to use the
kms:Decrypt
action. Valid values:CRC32
,CRC32C
,SHA1
,SHA256
. - Content string
- Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
- Content
Base64 string - Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the
gzipbase64
function with small text strings. For larger objects, usesource
to stream the content from a disk file. - Content
Disposition string - Presentational information for the object. Read w3c content_disposition for further information.
- Content
Encoding string - Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.
- Content
Language string - Language the content is in e.g., en-US or en-GB.
- Content
Type string - Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
- Etag string
- Triggers updates when the value changes. This attribute is not compatible with KMS encryption,
kms_key_id
orserver_side_encryption = "aws:kms"
, also if an object is larger than 16 MB, the AWS Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest (seesource_hash
instead). - Force
Destroy bool - Whether to allow the object to be deleted by removing any legal hold on any object version. Default is
false
. This value should be set totrue
only if the bucket has S3 object lock enabled. - Key string
Name of the object once it is in the bucket.
The following arguments are optional:
- Kms
Key stringId - ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the
aws.kms.Key
resource, use thearn
attribute. If referencing theaws.kms.Alias
data source or resource, use thetarget_key_arn
attribute. The provider will only perform drift detection if a configuration value is provided. - Metadata map[string]string
- Map of keys/values to provision metadata (will be automatically prefixed by
x-amz-meta-
, note that only lowercase label are currently supported by the AWS Go API). - Object
Lock stringLegal Hold Status - Legal hold status that you want to apply to the specified object. Valid values are
ON
andOFF
. - Object
Lock stringMode - Object lock retention mode that you want to apply to this object. Valid values are
GOVERNANCE
andCOMPLIANCE
. - Object
Lock stringRetain Until Date - Date and time, in RFC3339 format, when this object's object lock will expire.
- Override
Provider BucketObjectv2Override Provider Args - Override provider-level configuration options. See Override Provider below for more details.
- Server
Side stringEncryption - Server-side encryption of the object in S3. Valid values are "
AES256
" and "aws:kms
". - Source
pulumi.
Asset Or Archive - Path to a file that will be read and uploaded as raw bytes for the object content.
- Source
Hash string - Triggers updates like
etag
but useful to addressetag
encryption limitations. (The value is only stored in state and not saved by AWS.) - Storage
Class string - Storage Class for the object. Defaults to "
STANDARD
". - map[string]string
- Map of tags to assign to the object. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Website
Redirect string Target URL for website redirect.
If no content is provided through
source
,content
orcontent_base64
, then the object will be empty.Note: The provider ignores all leading
/
s in the object'skey
and treats multiple/
s in the rest of the object'skey
as a single/
, so values of/index.html
andindex.html
correspond to the same S3 object as dofirst//second///third//
andfirst/second/third/
.
- bucket String | String
- Name of the bucket to put the file in. Alternatively, an S3 access point ARN can be specified.
- acl String
- Canned ACL to apply. Valid values are
private
,public-read
,public-read-write
,aws-exec-read
,authenticated-read
,bucket-owner-read
, andbucket-owner-full-control
. - bucket
Key BooleanEnabled - Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
- cache
Control String - Caching behavior along the request/reply chain Read w3c cache_control for further details.
- checksum
Algorithm String - Indicates the algorithm used to create the checksum for the object. If a value is specified and the object is encrypted with KMS, you must have permission to use the
kms:Decrypt
action. Valid values:CRC32
,CRC32C
,SHA1
,SHA256
. - content String
- Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
- content
Base64 String - Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the
gzipbase64
function with small text strings. For larger objects, usesource
to stream the content from a disk file. - content
Disposition String - Presentational information for the object. Read w3c content_disposition for further information.
- content
Encoding String - Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.
- content
Language String - Language the content is in e.g., en-US or en-GB.
- content
Type String - Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
- etag String
- Triggers updates when the value changes. This attribute is not compatible with KMS encryption,
kms_key_id
orserver_side_encryption = "aws:kms"
, also if an object is larger than 16 MB, the AWS Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest (seesource_hash
instead). - force
Destroy Boolean - Whether to allow the object to be deleted by removing any legal hold on any object version. Default is
false
. This value should be set totrue
only if the bucket has S3 object lock enabled. - key String
Name of the object once it is in the bucket.
The following arguments are optional:
- kms
Key StringId - ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the
aws.kms.Key
resource, use thearn
attribute. If referencing theaws.kms.Alias
data source or resource, use thetarget_key_arn
attribute. The provider will only perform drift detection if a configuration value is provided. - metadata Map<String,String>
- Map of keys/values to provision metadata (will be automatically prefixed by
x-amz-meta-
, note that only lowercase label are currently supported by the AWS Go API). - object
Lock StringLegal Hold Status - Legal hold status that you want to apply to the specified object. Valid values are
ON
andOFF
. - object
Lock StringMode - Object lock retention mode that you want to apply to this object. Valid values are
GOVERNANCE
andCOMPLIANCE
. - object
Lock StringRetain Until Date - Date and time, in RFC3339 format, when this object's object lock will expire.
- override
Provider BucketObjectv2Override Provider - Override provider-level configuration options. See Override Provider below for more details.
- server
Side StringEncryption - Server-side encryption of the object in S3. Valid values are "
AES256
" and "aws:kms
". - source
Asset
Or Archive - Path to a file that will be read and uploaded as raw bytes for the object content.
- source
Hash String - Triggers updates like
etag
but useful to addressetag
encryption limitations. (The value is only stored in state and not saved by AWS.) - storage
Class String - Storage Class for the object. Defaults to "
STANDARD
". - Map<String,String>
- Map of tags to assign to the object. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - website
Redirect String Target URL for website redirect.
If no content is provided through
source
,content
orcontent_base64
, then the object will be empty.Note: The provider ignores all leading
/
s in the object'skey
and treats multiple/
s in the rest of the object'skey
as a single/
, so values of/index.html
andindex.html
correspond to the same S3 object as dofirst//second///third//
andfirst/second/third/
.
- bucket string | Bucket
- Name of the bucket to put the file in. Alternatively, an S3 access point ARN can be specified.
- acl string
- Canned ACL to apply. Valid values are
private
,public-read
,public-read-write
,aws-exec-read
,authenticated-read
,bucket-owner-read
, andbucket-owner-full-control
. - bucket
Key booleanEnabled - Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
- cache
Control string - Caching behavior along the request/reply chain Read w3c cache_control for further details.
- checksum
Algorithm string - Indicates the algorithm used to create the checksum for the object. If a value is specified and the object is encrypted with KMS, you must have permission to use the
kms:Decrypt
action. Valid values:CRC32
,CRC32C
,SHA1
,SHA256
. - content string
- Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
- content
Base64 string - Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the
gzipbase64
function with small text strings. For larger objects, usesource
to stream the content from a disk file. - content
Disposition string - Presentational information for the object. Read w3c content_disposition for further information.
- content
Encoding string - Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.
- content
Language string - Language the content is in e.g., en-US or en-GB.
- content
Type string - Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
- etag string
- Triggers updates when the value changes. This attribute is not compatible with KMS encryption,
kms_key_id
orserver_side_encryption = "aws:kms"
, also if an object is larger than 16 MB, the AWS Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest (seesource_hash
instead). - force
Destroy boolean - Whether to allow the object to be deleted by removing any legal hold on any object version. Default is
false
. This value should be set totrue
only if the bucket has S3 object lock enabled. - key string
Name of the object once it is in the bucket.
The following arguments are optional:
- kms
Key stringId - ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the
aws.kms.Key
resource, use thearn
attribute. If referencing theaws.kms.Alias
data source or resource, use thetarget_key_arn
attribute. The provider will only perform drift detection if a configuration value is provided. - metadata {[key: string]: string}
- Map of keys/values to provision metadata (will be automatically prefixed by
x-amz-meta-
, note that only lowercase label are currently supported by the AWS Go API). - object
Lock stringLegal Hold Status - Legal hold status that you want to apply to the specified object. Valid values are
ON
andOFF
. - object
Lock stringMode - Object lock retention mode that you want to apply to this object. Valid values are
GOVERNANCE
andCOMPLIANCE
. - object
Lock stringRetain Until Date - Date and time, in RFC3339 format, when this object's object lock will expire.
- override
Provider BucketObjectv2Override Provider - Override provider-level configuration options. See Override Provider below for more details.
- server
Side stringEncryption - Server-side encryption of the object in S3. Valid values are "
AES256
" and "aws:kms
". - source
pulumi.asset.
Asset | pulumi.asset. Archive - Path to a file that will be read and uploaded as raw bytes for the object content.
- source
Hash string - Triggers updates like
etag
but useful to addressetag
encryption limitations. (The value is only stored in state and not saved by AWS.) - storage
Class string - Storage Class for the object. Defaults to "
STANDARD
". - {[key: string]: string}
- Map of tags to assign to the object. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - website
Redirect string Target URL for website redirect.
If no content is provided through
source
,content
orcontent_base64
, then the object will be empty.Note: The provider ignores all leading
/
s in the object'skey
and treats multiple/
s in the rest of the object'skey
as a single/
, so values of/index.html
andindex.html
correspond to the same S3 object as dofirst//second///third//
andfirst/second/third/
.
- bucket str | str
- Name of the bucket to put the file in. Alternatively, an S3 access point ARN can be specified.
- acl str
- Canned ACL to apply. Valid values are
private
,public-read
,public-read-write
,aws-exec-read
,authenticated-read
,bucket-owner-read
, andbucket-owner-full-control
. - bucket_
key_ boolenabled - Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
- cache_
control str - Caching behavior along the request/reply chain Read w3c cache_control for further details.
- checksum_
algorithm str - Indicates the algorithm used to create the checksum for the object. If a value is specified and the object is encrypted with KMS, you must have permission to use the
kms:Decrypt
action. Valid values:CRC32
,CRC32C
,SHA1
,SHA256
. - content str
- Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
- content_
base64 str - Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the
gzipbase64
function with small text strings. For larger objects, usesource
to stream the content from a disk file. - content_
disposition str - Presentational information for the object. Read w3c content_disposition for further information.
- content_
encoding str - Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.
- content_
language str - Language the content is in e.g., en-US or en-GB.
- content_
type str - Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
- etag str
- Triggers updates when the value changes. This attribute is not compatible with KMS encryption,
kms_key_id
orserver_side_encryption = "aws:kms"
, also if an object is larger than 16 MB, the AWS Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest (seesource_hash
instead). - force_
destroy bool - Whether to allow the object to be deleted by removing any legal hold on any object version. Default is
false
. This value should be set totrue
only if the bucket has S3 object lock enabled. - key str
Name of the object once it is in the bucket.
The following arguments are optional:
- kms_
key_ strid - ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the
aws.kms.Key
resource, use thearn
attribute. If referencing theaws.kms.Alias
data source or resource, use thetarget_key_arn
attribute. The provider will only perform drift detection if a configuration value is provided. - metadata Mapping[str, str]
- Map of keys/values to provision metadata (will be automatically prefixed by
x-amz-meta-
, note that only lowercase label are currently supported by the AWS Go API). - object_
lock_ strlegal_ hold_ status - Legal hold status that you want to apply to the specified object. Valid values are
ON
andOFF
. - object_
lock_ strmode - Object lock retention mode that you want to apply to this object. Valid values are
GOVERNANCE
andCOMPLIANCE
. - object_
lock_ strretain_ until_ date - Date and time, in RFC3339 format, when this object's object lock will expire.
- override_
provider BucketObjectv2Override Provider Args - Override provider-level configuration options. See Override Provider below for more details.
- server_
side_ strencryption - Server-side encryption of the object in S3. Valid values are "
AES256
" and "aws:kms
". - source
Union[pulumi.
Asset, pulumi. Archive] - Path to a file that will be read and uploaded as raw bytes for the object content.
- source_
hash str - Triggers updates like
etag
but useful to addressetag
encryption limitations. (The value is only stored in state and not saved by AWS.) - storage_
class str - Storage Class for the object. Defaults to "
STANDARD
". - Mapping[str, str]
- Map of tags to assign to the object. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - website_
redirect str Target URL for website redirect.
If no content is provided through
source
,content
orcontent_base64
, then the object will be empty.Note: The provider ignores all leading
/
s in the object'skey
and treats multiple/
s in the rest of the object'skey
as a single/
, so values of/index.html
andindex.html
correspond to the same S3 object as dofirst//second///third//
andfirst/second/third/
.
- bucket String |
- Name of the bucket to put the file in. Alternatively, an S3 access point ARN can be specified.
- acl String
- Canned ACL to apply. Valid values are
private
,public-read
,public-read-write
,aws-exec-read
,authenticated-read
,bucket-owner-read
, andbucket-owner-full-control
. - bucket
Key BooleanEnabled - Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
- cache
Control String - Caching behavior along the request/reply chain Read w3c cache_control for further details.
- checksum
Algorithm String - Indicates the algorithm used to create the checksum for the object. If a value is specified and the object is encrypted with KMS, you must have permission to use the
kms:Decrypt
action. Valid values:CRC32
,CRC32C
,SHA1
,SHA256
. - content String
- Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
- content
Base64 String - Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the
gzipbase64
function with small text strings. For larger objects, usesource
to stream the content from a disk file. - content
Disposition String - Presentational information for the object. Read w3c content_disposition for further information.
- content
Encoding String - Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.
- content
Language String - Language the content is in e.g., en-US or en-GB.
- content
Type String - Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
- etag String
- Triggers updates when the value changes. This attribute is not compatible with KMS encryption,
kms_key_id
orserver_side_encryption = "aws:kms"
, also if an object is larger than 16 MB, the AWS Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest (seesource_hash
instead). - force
Destroy Boolean - Whether to allow the object to be deleted by removing any legal hold on any object version. Default is
false
. This value should be set totrue
only if the bucket has S3 object lock enabled. - key String
Name of the object once it is in the bucket.
The following arguments are optional:
- kms
Key StringId - ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the
aws.kms.Key
resource, use thearn
attribute. If referencing theaws.kms.Alias
data source or resource, use thetarget_key_arn
attribute. The provider will only perform drift detection if a configuration value is provided. - metadata Map<String>
- Map of keys/values to provision metadata (will be automatically prefixed by
x-amz-meta-
, note that only lowercase label are currently supported by the AWS Go API). - object
Lock StringLegal Hold Status - Legal hold status that you want to apply to the specified object. Valid values are
ON
andOFF
. - object
Lock StringMode - Object lock retention mode that you want to apply to this object. Valid values are
GOVERNANCE
andCOMPLIANCE
. - object
Lock StringRetain Until Date - Date and time, in RFC3339 format, when this object's object lock will expire.
- override
Provider Property Map - Override provider-level configuration options. See Override Provider below for more details.
- server
Side StringEncryption - Server-side encryption of the object in S3. Valid values are "
AES256
" and "aws:kms
". - source Asset
- Path to a file that will be read and uploaded as raw bytes for the object content.
- source
Hash String - Triggers updates like
etag
but useful to addressetag
encryption limitations. (The value is only stored in state and not saved by AWS.) - storage
Class String - Storage Class for the object. Defaults to "
STANDARD
". - Map<String>
- Map of tags to assign to the object. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - website
Redirect String Target URL for website redirect.
If no content is provided through
source
,content
orcontent_base64
, then the object will be empty.Note: The provider ignores all leading
/
s in the object'skey
and treats multiple/
s in the rest of the object'skey
as a single/
, so values of/index.html
andindex.html
correspond to the same S3 object as dofirst//second///third//
andfirst/second/third/
.
Outputs
All input properties are implicitly available as output properties. Additionally, the BucketObjectv2 resource produces the following output properties:
- Arn string
- ARN of the object.
- Checksum
Crc32 string - The base64-encoded, 32-bit CRC32 checksum of the object.
- Checksum
Crc32c string - The base64-encoded, 32-bit CRC32C checksum of the object.
- Checksum
Sha1 string - The base64-encoded, 160-bit SHA-1 digest of the object.
- Checksum
Sha256 string - The base64-encoded, 256-bit SHA-256 digest of the object.
- Id string
- The provider-assigned unique ID for this managed resource.
- Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Version
Id string - Unique version ID value for the object, if bucket versioning is enabled.
- Arn string
- ARN of the object.
- Checksum
Crc32 string - The base64-encoded, 32-bit CRC32 checksum of the object.
- Checksum
Crc32c string - The base64-encoded, 32-bit CRC32C checksum of the object.
- Checksum
Sha1 string - The base64-encoded, 160-bit SHA-1 digest of the object.
- Checksum
Sha256 string - The base64-encoded, 256-bit SHA-256 digest of the object.
- Id string
- The provider-assigned unique ID for this managed resource.
- map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Version
Id string - Unique version ID value for the object, if bucket versioning is enabled.
- arn String
- ARN of the object.
- checksum
Crc32 String - The base64-encoded, 32-bit CRC32 checksum of the object.
- checksum
Crc32c String - The base64-encoded, 32-bit CRC32C checksum of the object.
- checksum
Sha1 String - The base64-encoded, 160-bit SHA-1 digest of the object.
- checksum
Sha256 String - The base64-encoded, 256-bit SHA-256 digest of the object.
- id String
- The provider-assigned unique ID for this managed resource.
- Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - version
Id String - Unique version ID value for the object, if bucket versioning is enabled.
- arn string
- ARN of the object.
- checksum
Crc32 string - The base64-encoded, 32-bit CRC32 checksum of the object.
- checksum
Crc32c string - The base64-encoded, 32-bit CRC32C checksum of the object.
- checksum
Sha1 string - The base64-encoded, 160-bit SHA-1 digest of the object.
- checksum
Sha256 string - The base64-encoded, 256-bit SHA-256 digest of the object.
- id string
- The provider-assigned unique ID for this managed resource.
- {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - version
Id string - Unique version ID value for the object, if bucket versioning is enabled.
- arn str
- ARN of the object.
- checksum_
crc32 str - The base64-encoded, 32-bit CRC32 checksum of the object.
- checksum_
crc32c str - The base64-encoded, 32-bit CRC32C checksum of the object.
- checksum_
sha1 str - The base64-encoded, 160-bit SHA-1 digest of the object.
- checksum_
sha256 str - The base64-encoded, 256-bit SHA-256 digest of the object.
- id str
- The provider-assigned unique ID for this managed resource.
- Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - version_
id str - Unique version ID value for the object, if bucket versioning is enabled.
- arn String
- ARN of the object.
- checksum
Crc32 String - The base64-encoded, 32-bit CRC32 checksum of the object.
- checksum
Crc32c String - The base64-encoded, 32-bit CRC32C checksum of the object.
- checksum
Sha1 String - The base64-encoded, 160-bit SHA-1 digest of the object.
- checksum
Sha256 String - The base64-encoded, 256-bit SHA-256 digest of the object.
- id String
- The provider-assigned unique ID for this managed resource.
- Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - version
Id String - Unique version ID value for the object, if bucket versioning is enabled.
Look up Existing BucketObjectv2 Resource
Get an existing BucketObjectv2 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: BucketObjectv2State, opts?: CustomResourceOptions): BucketObjectv2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
acl: Optional[str] = None,
arn: Optional[str] = None,
bucket: Optional[str] = None,
bucket_key_enabled: Optional[bool] = None,
cache_control: Optional[str] = None,
checksum_algorithm: Optional[str] = None,
checksum_crc32: Optional[str] = None,
checksum_crc32c: Optional[str] = None,
checksum_sha1: Optional[str] = None,
checksum_sha256: Optional[str] = None,
content: Optional[str] = None,
content_base64: Optional[str] = None,
content_disposition: Optional[str] = None,
content_encoding: Optional[str] = None,
content_language: Optional[str] = None,
content_type: Optional[str] = None,
etag: Optional[str] = None,
force_destroy: Optional[bool] = None,
key: Optional[str] = None,
kms_key_id: Optional[str] = None,
metadata: Optional[Mapping[str, str]] = None,
object_lock_legal_hold_status: Optional[str] = None,
object_lock_mode: Optional[str] = None,
object_lock_retain_until_date: Optional[str] = None,
override_provider: Optional[BucketObjectv2OverrideProviderArgs] = None,
server_side_encryption: Optional[str] = None,
source: Optional[Union[pulumi.Asset, pulumi.Archive]] = None,
source_hash: Optional[str] = None,
storage_class: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
version_id: Optional[str] = None,
website_redirect: Optional[str] = None) -> BucketObjectv2
func GetBucketObjectv2(ctx *Context, name string, id IDInput, state *BucketObjectv2State, opts ...ResourceOption) (*BucketObjectv2, error)
public static BucketObjectv2 Get(string name, Input<string> id, BucketObjectv2State? state, CustomResourceOptions? opts = null)
public static BucketObjectv2 get(String name, Output<String> id, BucketObjectv2State state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Acl string
- Canned ACL to apply. Valid values are
private
,public-read
,public-read-write
,aws-exec-read
,authenticated-read
,bucket-owner-read
, andbucket-owner-full-control
. - Arn string
- ARN of the object.
- Bucket string | string
- Name of the bucket to put the file in. Alternatively, an S3 access point ARN can be specified.
- Bucket
Key boolEnabled - Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
- Cache
Control string - Caching behavior along the request/reply chain Read w3c cache_control for further details.
- Checksum
Algorithm string - Indicates the algorithm used to create the checksum for the object. If a value is specified and the object is encrypted with KMS, you must have permission to use the
kms:Decrypt
action. Valid values:CRC32
,CRC32C
,SHA1
,SHA256
. - Checksum
Crc32 string - The base64-encoded, 32-bit CRC32 checksum of the object.
- Checksum
Crc32c string - The base64-encoded, 32-bit CRC32C checksum of the object.
- Checksum
Sha1 string - The base64-encoded, 160-bit SHA-1 digest of the object.
- Checksum
Sha256 string - The base64-encoded, 256-bit SHA-256 digest of the object.
- Content string
- Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
- Content
Base64 string - Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the
gzipbase64
function with small text strings. For larger objects, usesource
to stream the content from a disk file. - Content
Disposition string - Presentational information for the object. Read w3c content_disposition for further information.
- Content
Encoding string - Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.
- Content
Language string - Language the content is in e.g., en-US or en-GB.
- Content
Type string - Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
- Etag string
- Triggers updates when the value changes. This attribute is not compatible with KMS encryption,
kms_key_id
orserver_side_encryption = "aws:kms"
, also if an object is larger than 16 MB, the AWS Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest (seesource_hash
instead). - Force
Destroy bool - Whether to allow the object to be deleted by removing any legal hold on any object version. Default is
false
. This value should be set totrue
only if the bucket has S3 object lock enabled. - Key string
Name of the object once it is in the bucket.
The following arguments are optional:
- Kms
Key stringId - ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the
aws.kms.Key
resource, use thearn
attribute. If referencing theaws.kms.Alias
data source or resource, use thetarget_key_arn
attribute. The provider will only perform drift detection if a configuration value is provided. - Metadata Dictionary<string, string>
- Map of keys/values to provision metadata (will be automatically prefixed by
x-amz-meta-
, note that only lowercase label are currently supported by the AWS Go API). - Object
Lock stringLegal Hold Status - Legal hold status that you want to apply to the specified object. Valid values are
ON
andOFF
. - Object
Lock stringMode - Object lock retention mode that you want to apply to this object. Valid values are
GOVERNANCE
andCOMPLIANCE
. - Object
Lock stringRetain Until Date - Date and time, in RFC3339 format, when this object's object lock will expire.
- Override
Provider BucketObjectv2Override Provider - Override provider-level configuration options. See Override Provider below for more details.
- Server
Side stringEncryption - Server-side encryption of the object in S3. Valid values are "
AES256
" and "aws:kms
". - Source
Asset
Or Archive - Path to a file that will be read and uploaded as raw bytes for the object content.
- Source
Hash string - Triggers updates like
etag
but useful to addressetag
encryption limitations. (The value is only stored in state and not saved by AWS.) - Storage
Class string - Storage Class for the object. Defaults to "
STANDARD
". - Dictionary<string, string>
- Map of tags to assign to the object. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Version
Id string - Unique version ID value for the object, if bucket versioning is enabled.
- Website
Redirect string Target URL for website redirect.
If no content is provided through
source
,content
orcontent_base64
, then the object will be empty.Note: The provider ignores all leading
/
s in the object'skey
and treats multiple/
s in the rest of the object'skey
as a single/
, so values of/index.html
andindex.html
correspond to the same S3 object as dofirst//second///third//
andfirst/second/third/
.
- Acl string
- Canned ACL to apply. Valid values are
private
,public-read
,public-read-write
,aws-exec-read
,authenticated-read
,bucket-owner-read
, andbucket-owner-full-control
. - Arn string
- ARN of the object.
- Bucket string | string
- Name of the bucket to put the file in. Alternatively, an S3 access point ARN can be specified.
- Bucket
Key boolEnabled - Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
- Cache
Control string - Caching behavior along the request/reply chain Read w3c cache_control for further details.
- Checksum
Algorithm string - Indicates the algorithm used to create the checksum for the object. If a value is specified and the object is encrypted with KMS, you must have permission to use the
kms:Decrypt
action. Valid values:CRC32
,CRC32C
,SHA1
,SHA256
. - Checksum
Crc32 string - The base64-encoded, 32-bit CRC32 checksum of the object.
- Checksum
Crc32c string - The base64-encoded, 32-bit CRC32C checksum of the object.
- Checksum
Sha1 string - The base64-encoded, 160-bit SHA-1 digest of the object.
- Checksum
Sha256 string - The base64-encoded, 256-bit SHA-256 digest of the object.
- Content string
- Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
- Content
Base64 string - Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the
gzipbase64
function with small text strings. For larger objects, usesource
to stream the content from a disk file. - Content
Disposition string - Presentational information for the object. Read w3c content_disposition for further information.
- Content
Encoding string - Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.
- Content
Language string - Language the content is in e.g., en-US or en-GB.
- Content
Type string - Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
- Etag string
- Triggers updates when the value changes. This attribute is not compatible with KMS encryption,
kms_key_id
orserver_side_encryption = "aws:kms"
, also if an object is larger than 16 MB, the AWS Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest (seesource_hash
instead). - Force
Destroy bool - Whether to allow the object to be deleted by removing any legal hold on any object version. Default is
false
. This value should be set totrue
only if the bucket has S3 object lock enabled. - Key string
Name of the object once it is in the bucket.
The following arguments are optional:
- Kms
Key stringId - ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the
aws.kms.Key
resource, use thearn
attribute. If referencing theaws.kms.Alias
data source or resource, use thetarget_key_arn
attribute. The provider will only perform drift detection if a configuration value is provided. - Metadata map[string]string
- Map of keys/values to provision metadata (will be automatically prefixed by
x-amz-meta-
, note that only lowercase label are currently supported by the AWS Go API). - Object
Lock stringLegal Hold Status - Legal hold status that you want to apply to the specified object. Valid values are
ON
andOFF
. - Object
Lock stringMode - Object lock retention mode that you want to apply to this object. Valid values are
GOVERNANCE
andCOMPLIANCE
. - Object
Lock stringRetain Until Date - Date and time, in RFC3339 format, when this object's object lock will expire.
- Override
Provider BucketObjectv2Override Provider Args - Override provider-level configuration options. See Override Provider below for more details.
- Server
Side stringEncryption - Server-side encryption of the object in S3. Valid values are "
AES256
" and "aws:kms
". - Source
pulumi.
Asset Or Archive - Path to a file that will be read and uploaded as raw bytes for the object content.
- Source
Hash string - Triggers updates like
etag
but useful to addressetag
encryption limitations. (The value is only stored in state and not saved by AWS.) - Storage
Class string - Storage Class for the object. Defaults to "
STANDARD
". - map[string]string
- Map of tags to assign to the object. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Version
Id string - Unique version ID value for the object, if bucket versioning is enabled.
- Website
Redirect string Target URL for website redirect.
If no content is provided through
source
,content
orcontent_base64
, then the object will be empty.Note: The provider ignores all leading
/
s in the object'skey
and treats multiple/
s in the rest of the object'skey
as a single/
, so values of/index.html
andindex.html
correspond to the same S3 object as dofirst//second///third//
andfirst/second/third/
.
- acl String
- Canned ACL to apply. Valid values are
private
,public-read
,public-read-write
,aws-exec-read
,authenticated-read
,bucket-owner-read
, andbucket-owner-full-control
. - arn String
- ARN of the object.
- bucket String | String
- Name of the bucket to put the file in. Alternatively, an S3 access point ARN can be specified.
- bucket
Key BooleanEnabled - Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
- cache
Control String - Caching behavior along the request/reply chain Read w3c cache_control for further details.
- checksum
Algorithm String - Indicates the algorithm used to create the checksum for the object. If a value is specified and the object is encrypted with KMS, you must have permission to use the
kms:Decrypt
action. Valid values:CRC32
,CRC32C
,SHA1
,SHA256
. - checksum
Crc32 String - The base64-encoded, 32-bit CRC32 checksum of the object.
- checksum
Crc32c String - The base64-encoded, 32-bit CRC32C checksum of the object.
- checksum
Sha1 String - The base64-encoded, 160-bit SHA-1 digest of the object.
- checksum
Sha256 String - The base64-encoded, 256-bit SHA-256 digest of the object.
- content String
- Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
- content
Base64 String - Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the
gzipbase64
function with small text strings. For larger objects, usesource
to stream the content from a disk file. - content
Disposition String - Presentational information for the object. Read w3c content_disposition for further information.
- content
Encoding String - Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.
- content
Language String - Language the content is in e.g., en-US or en-GB.
- content
Type String - Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
- etag String
- Triggers updates when the value changes. This attribute is not compatible with KMS encryption,
kms_key_id
orserver_side_encryption = "aws:kms"
, also if an object is larger than 16 MB, the AWS Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest (seesource_hash
instead). - force
Destroy Boolean - Whether to allow the object to be deleted by removing any legal hold on any object version. Default is
false
. This value should be set totrue
only if the bucket has S3 object lock enabled. - key String
Name of the object once it is in the bucket.
The following arguments are optional:
- kms
Key StringId - ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the
aws.kms.Key
resource, use thearn
attribute. If referencing theaws.kms.Alias
data source or resource, use thetarget_key_arn
attribute. The provider will only perform drift detection if a configuration value is provided. - metadata Map<String,String>
- Map of keys/values to provision metadata (will be automatically prefixed by
x-amz-meta-
, note that only lowercase label are currently supported by the AWS Go API). - object
Lock StringLegal Hold Status - Legal hold status that you want to apply to the specified object. Valid values are
ON
andOFF
. - object
Lock StringMode - Object lock retention mode that you want to apply to this object. Valid values are
GOVERNANCE
andCOMPLIANCE
. - object
Lock StringRetain Until Date - Date and time, in RFC3339 format, when this object's object lock will expire.
- override
Provider BucketObjectv2Override Provider - Override provider-level configuration options. See Override Provider below for more details.
- server
Side StringEncryption - Server-side encryption of the object in S3. Valid values are "
AES256
" and "aws:kms
". - source
Asset
Or Archive - Path to a file that will be read and uploaded as raw bytes for the object content.
- source
Hash String - Triggers updates like
etag
but useful to addressetag
encryption limitations. (The value is only stored in state and not saved by AWS.) - storage
Class String - Storage Class for the object. Defaults to "
STANDARD
". - Map<String,String>
- Map of tags to assign to the object. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - version
Id String - Unique version ID value for the object, if bucket versioning is enabled.
- website
Redirect String Target URL for website redirect.
If no content is provided through
source
,content
orcontent_base64
, then the object will be empty.Note: The provider ignores all leading
/
s in the object'skey
and treats multiple/
s in the rest of the object'skey
as a single/
, so values of/index.html
andindex.html
correspond to the same S3 object as dofirst//second///third//
andfirst/second/third/
.
- acl string
- Canned ACL to apply. Valid values are
private
,public-read
,public-read-write
,aws-exec-read
,authenticated-read
,bucket-owner-read
, andbucket-owner-full-control
. - arn string
- ARN of the object.
- bucket string | Bucket
- Name of the bucket to put the file in. Alternatively, an S3 access point ARN can be specified.
- bucket
Key booleanEnabled - Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
- cache
Control string - Caching behavior along the request/reply chain Read w3c cache_control for further details.
- checksum
Algorithm string - Indicates the algorithm used to create the checksum for the object. If a value is specified and the object is encrypted with KMS, you must have permission to use the
kms:Decrypt
action. Valid values:CRC32
,CRC32C
,SHA1
,SHA256
. - checksum
Crc32 string - The base64-encoded, 32-bit CRC32 checksum of the object.
- checksum
Crc32c string - The base64-encoded, 32-bit CRC32C checksum of the object.
- checksum
Sha1 string - The base64-encoded, 160-bit SHA-1 digest of the object.
- checksum
Sha256 string - The base64-encoded, 256-bit SHA-256 digest of the object.
- content string
- Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
- content
Base64 string - Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the
gzipbase64
function with small text strings. For larger objects, usesource
to stream the content from a disk file. - content
Disposition string - Presentational information for the object. Read w3c content_disposition for further information.
- content
Encoding string - Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.
- content
Language string - Language the content is in e.g., en-US or en-GB.
- content
Type string - Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
- etag string
- Triggers updates when the value changes. This attribute is not compatible with KMS encryption,
kms_key_id
orserver_side_encryption = "aws:kms"
, also if an object is larger than 16 MB, the AWS Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest (seesource_hash
instead). - force
Destroy boolean - Whether to allow the object to be deleted by removing any legal hold on any object version. Default is
false
. This value should be set totrue
only if the bucket has S3 object lock enabled. - key string
Name of the object once it is in the bucket.
The following arguments are optional:
- kms
Key stringId - ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the
aws.kms.Key
resource, use thearn
attribute. If referencing theaws.kms.Alias
data source or resource, use thetarget_key_arn
attribute. The provider will only perform drift detection if a configuration value is provided. - metadata {[key: string]: string}
- Map of keys/values to provision metadata (will be automatically prefixed by
x-amz-meta-
, note that only lowercase label are currently supported by the AWS Go API). - object
Lock stringLegal Hold Status - Legal hold status that you want to apply to the specified object. Valid values are
ON
andOFF
. - object
Lock stringMode - Object lock retention mode that you want to apply to this object. Valid values are
GOVERNANCE
andCOMPLIANCE
. - object
Lock stringRetain Until Date - Date and time, in RFC3339 format, when this object's object lock will expire.
- override
Provider BucketObjectv2Override Provider - Override provider-level configuration options. See Override Provider below for more details.
- server
Side stringEncryption - Server-side encryption of the object in S3. Valid values are "
AES256
" and "aws:kms
". - source
pulumi.asset.
Asset | pulumi.asset. Archive - Path to a file that will be read and uploaded as raw bytes for the object content.
- source
Hash string - Triggers updates like
etag
but useful to addressetag
encryption limitations. (The value is only stored in state and not saved by AWS.) - storage
Class string - Storage Class for the object. Defaults to "
STANDARD
". - {[key: string]: string}
- Map of tags to assign to the object. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - version
Id string - Unique version ID value for the object, if bucket versioning is enabled.
- website
Redirect string Target URL for website redirect.
If no content is provided through
source
,content
orcontent_base64
, then the object will be empty.Note: The provider ignores all leading
/
s in the object'skey
and treats multiple/
s in the rest of the object'skey
as a single/
, so values of/index.html
andindex.html
correspond to the same S3 object as dofirst//second///third//
andfirst/second/third/
.
- acl str
- Canned ACL to apply. Valid values are
private
,public-read
,public-read-write
,aws-exec-read
,authenticated-read
,bucket-owner-read
, andbucket-owner-full-control
. - arn str
- ARN of the object.
- bucket str | str
- Name of the bucket to put the file in. Alternatively, an S3 access point ARN can be specified.
- bucket_
key_ boolenabled - Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
- cache_
control str - Caching behavior along the request/reply chain Read w3c cache_control for further details.
- checksum_
algorithm str - Indicates the algorithm used to create the checksum for the object. If a value is specified and the object is encrypted with KMS, you must have permission to use the
kms:Decrypt
action. Valid values:CRC32
,CRC32C
,SHA1
,SHA256
. - checksum_
crc32 str - The base64-encoded, 32-bit CRC32 checksum of the object.
- checksum_
crc32c str - The base64-encoded, 32-bit CRC32C checksum of the object.
- checksum_
sha1 str - The base64-encoded, 160-bit SHA-1 digest of the object.
- checksum_
sha256 str - The base64-encoded, 256-bit SHA-256 digest of the object.
- content str
- Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
- content_
base64 str - Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the
gzipbase64
function with small text strings. For larger objects, usesource
to stream the content from a disk file. - content_
disposition str - Presentational information for the object. Read w3c content_disposition for further information.
- content_
encoding str - Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.
- content_
language str - Language the content is in e.g., en-US or en-GB.
- content_
type str - Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
- etag str
- Triggers updates when the value changes. This attribute is not compatible with KMS encryption,
kms_key_id
orserver_side_encryption = "aws:kms"
, also if an object is larger than 16 MB, the AWS Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest (seesource_hash
instead). - force_
destroy bool - Whether to allow the object to be deleted by removing any legal hold on any object version. Default is
false
. This value should be set totrue
only if the bucket has S3 object lock enabled. - key str
Name of the object once it is in the bucket.
The following arguments are optional:
- kms_
key_ strid - ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the
aws.kms.Key
resource, use thearn
attribute. If referencing theaws.kms.Alias
data source or resource, use thetarget_key_arn
attribute. The provider will only perform drift detection if a configuration value is provided. - metadata Mapping[str, str]
- Map of keys/values to provision metadata (will be automatically prefixed by
x-amz-meta-
, note that only lowercase label are currently supported by the AWS Go API). - object_
lock_ strlegal_ hold_ status - Legal hold status that you want to apply to the specified object. Valid values are
ON
andOFF
. - object_
lock_ strmode - Object lock retention mode that you want to apply to this object. Valid values are
GOVERNANCE
andCOMPLIANCE
. - object_
lock_ strretain_ until_ date - Date and time, in RFC3339 format, when this object's object lock will expire.
- override_
provider BucketObjectv2Override Provider Args - Override provider-level configuration options. See Override Provider below for more details.
- server_
side_ strencryption - Server-side encryption of the object in S3. Valid values are "
AES256
" and "aws:kms
". - source
Union[pulumi.
Asset, pulumi. Archive] - Path to a file that will be read and uploaded as raw bytes for the object content.
- source_
hash str - Triggers updates like
etag
but useful to addressetag
encryption limitations. (The value is only stored in state and not saved by AWS.) - storage_
class str - Storage Class for the object. Defaults to "
STANDARD
". - Mapping[str, str]
- Map of tags to assign to the object. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - version_
id str - Unique version ID value for the object, if bucket versioning is enabled.
- website_
redirect str Target URL for website redirect.
If no content is provided through
source
,content
orcontent_base64
, then the object will be empty.Note: The provider ignores all leading
/
s in the object'skey
and treats multiple/
s in the rest of the object'skey
as a single/
, so values of/index.html
andindex.html
correspond to the same S3 object as dofirst//second///third//
andfirst/second/third/
.
- acl String
- Canned ACL to apply. Valid values are
private
,public-read
,public-read-write
,aws-exec-read
,authenticated-read
,bucket-owner-read
, andbucket-owner-full-control
. - arn String
- ARN of the object.
- bucket String |
- Name of the bucket to put the file in. Alternatively, an S3 access point ARN can be specified.
- bucket
Key BooleanEnabled - Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
- cache
Control String - Caching behavior along the request/reply chain Read w3c cache_control for further details.
- checksum
Algorithm String - Indicates the algorithm used to create the checksum for the object. If a value is specified and the object is encrypted with KMS, you must have permission to use the
kms:Decrypt
action. Valid values:CRC32
,CRC32C
,SHA1
,SHA256
. - checksum
Crc32 String - The base64-encoded, 32-bit CRC32 checksum of the object.
- checksum
Crc32c String - The base64-encoded, 32-bit CRC32C checksum of the object.
- checksum
Sha1 String - The base64-encoded, 160-bit SHA-1 digest of the object.
- checksum
Sha256 String - The base64-encoded, 256-bit SHA-256 digest of the object.
- content String
- Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
- content
Base64 String - Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the
gzipbase64
function with small text strings. For larger objects, usesource
to stream the content from a disk file. - content
Disposition String - Presentational information for the object. Read w3c content_disposition for further information.
- content
Encoding String - Content encodings that have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.
- content
Language String - Language the content is in e.g., en-US or en-GB.
- content
Type String - Standard MIME type describing the format of the object data, e.g., application/octet-stream. All Valid MIME Types are valid for this input.
- etag String
- Triggers updates when the value changes. This attribute is not compatible with KMS encryption,
kms_key_id
orserver_side_encryption = "aws:kms"
, also if an object is larger than 16 MB, the AWS Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest (seesource_hash
instead). - force
Destroy Boolean - Whether to allow the object to be deleted by removing any legal hold on any object version. Default is
false
. This value should be set totrue
only if the bucket has S3 object lock enabled. - key String
Name of the object once it is in the bucket.
The following arguments are optional:
- kms
Key StringId - ARN of the KMS Key to use for object encryption. If the S3 Bucket has server-side encryption enabled, that value will automatically be used. If referencing the
aws.kms.Key
resource, use thearn
attribute. If referencing theaws.kms.Alias
data source or resource, use thetarget_key_arn
attribute. The provider will only perform drift detection if a configuration value is provided. - metadata Map<String>
- Map of keys/values to provision metadata (will be automatically prefixed by
x-amz-meta-
, note that only lowercase label are currently supported by the AWS Go API). - object
Lock StringLegal Hold Status - Legal hold status that you want to apply to the specified object. Valid values are
ON
andOFF
. - object
Lock StringMode - Object lock retention mode that you want to apply to this object. Valid values are
GOVERNANCE
andCOMPLIANCE
. - object
Lock StringRetain Until Date - Date and time, in RFC3339 format, when this object's object lock will expire.
- override
Provider Property Map - Override provider-level configuration options. See Override Provider below for more details.
- server
Side StringEncryption - Server-side encryption of the object in S3. Valid values are "
AES256
" and "aws:kms
". - source Asset
- Path to a file that will be read and uploaded as raw bytes for the object content.
- source
Hash String - Triggers updates like
etag
but useful to addressetag
encryption limitations. (The value is only stored in state and not saved by AWS.) - storage
Class String - Storage Class for the object. Defaults to "
STANDARD
". - Map<String>
- Map of tags to assign to the object. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - version
Id String - Unique version ID value for the object, if bucket versioning is enabled.
- website
Redirect String Target URL for website redirect.
If no content is provided through
source
,content
orcontent_base64
, then the object will be empty.Note: The provider ignores all leading
/
s in the object'skey
and treats multiple/
s in the rest of the object'skey
as a single/
, so values of/index.html
andindex.html
correspond to the same S3 object as dofirst//second///third//
andfirst/second/third/
.
Supporting Types
BucketObjectv2OverrideProvider, BucketObjectv2OverrideProviderArgs
- Bucket
Objectv2Override Provider Default Tags - Override the provider
default_tags
configuration block.
- Bucket
Objectv2Override Provider Default Tags - Override the provider
default_tags
configuration block.
- Bucket
Objectv2Override Provider Default Tags - Override the provider
default_tags
configuration block.
- Bucket
Objectv2Override Provider Default Tags - Override the provider
default_tags
configuration block.
- Bucket
Objectv2Override Provider Default Tags - Override the provider
default_tags
configuration block.
- Property Map
- Override the provider
default_tags
configuration block.
BucketObjectv2OverrideProviderDefaultTags, BucketObjectv2OverrideProviderDefaultTagsArgs
- Dictionary<string, string>
- Map of tags to assign to the object. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- map[string]string
- Map of tags to assign to the object. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String,String>
- Map of tags to assign to the object. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- {[key: string]: string}
- Map of tags to assign to the object. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- Mapping[str, str]
- Map of tags to assign to the object. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String>
- Map of tags to assign to the object. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Import
Import using S3 URL syntax:
Using pulumi import
to import objects using the id
or S3 URL. For example:
Import using the id
, which is the bucket name and the key together:
$ pulumi import aws:s3/bucketObjectv2:BucketObjectv2 example some-bucket-name/some/key.txt
Import using S3 URL syntax:
$ pulumi import aws:s3/bucketObjectv2:BucketObjectv2 example s3://some-bucket-name/some/key.txt
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.