yandex.StorageBucket
Explore with Pulumi AI
Allows management of Yandex.Cloud Storage Bucket.
Note: Your need to provide static access key (Access and Secret) to create storage client to work with Storage Service. To create them you need Service Account and proper permissions.
Example Usage
Simple Private Bucket
using Pulumi;
using Yandex = Pulumi.Yandex;
class MyStack : Stack
{
public MyStack()
{
var folderId = "<folder-id>";
// Create SA
var sa = new Yandex.IamServiceAccount("sa", new Yandex.IamServiceAccountArgs
{
FolderId = folderId,
});
// Grant permissions
var sa_editor = new Yandex.ResourcemanagerFolderIamMember("sa-editor", new Yandex.ResourcemanagerFolderIamMemberArgs
{
FolderId = folderId,
Role = "storage.editor",
Member = sa.Id.Apply(id => $"serviceAccount:{id}"),
});
// Create Static Access Keys
var sa_static_key = new Yandex.IamServiceAccountStaticAccessKey("sa-static-key", new Yandex.IamServiceAccountStaticAccessKeyArgs
{
ServiceAccountId = sa.Id,
Description = "static access key for object storage",
});
// Use keys to create bucket
var test = new Yandex.StorageBucket("test", new Yandex.StorageBucketArgs
{
AccessKey = sa_static_key.AccessKey,
SecretKey = sa_static_key.SecretKey,
Bucket = "tf-test-bucket",
});
}
}
package main
import (
"fmt"
"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
folderId := "<folder-id>"
sa, err := yandex.NewIamServiceAccount(ctx, "sa", &yandex.IamServiceAccountArgs{
FolderId: pulumi.String(folderId),
})
if err != nil {
return err
}
_, err = yandex.NewResourcemanagerFolderIamMember(ctx, "sa-editor", &yandex.ResourcemanagerFolderIamMemberArgs{
FolderId: pulumi.String(folderId),
Role: pulumi.String("storage.editor"),
Member: sa.ID().ApplyT(func(id string) (string, error) {
return fmt.Sprintf("%v%v", "serviceAccount:", id), nil
}).(pulumi.StringOutput),
})
if err != nil {
return err
}
_, err = yandex.NewIamServiceAccountStaticAccessKey(ctx, "sa-static-key", &yandex.IamServiceAccountStaticAccessKeyArgs{
ServiceAccountId: sa.ID(),
Description: pulumi.String("static access key for object storage"),
})
if err != nil {
return err
}
_, err = yandex.NewStorageBucket(ctx, "test", &yandex.StorageBucketArgs{
AccessKey: sa_static_key.AccessKey,
SecretKey: sa_static_key.SecretKey,
Bucket: pulumi.String("tf-test-bucket"),
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_yandex as yandex
folder_id = "<folder-id>"
# Create SA
sa = yandex.IamServiceAccount("sa", folder_id=folder_id)
# Grant permissions
sa_editor = yandex.ResourcemanagerFolderIamMember("sa-editor",
folder_id=folder_id,
role="storage.editor",
member=sa.id.apply(lambda id: f"serviceAccount:{id}"))
# Create Static Access Keys
sa_static_key = yandex.IamServiceAccountStaticAccessKey("sa-static-key",
service_account_id=sa.id,
description="static access key for object storage")
# Use keys to create bucket
test = yandex.StorageBucket("test",
access_key=sa_static_key.access_key,
secret_key=sa_static_key.secret_key,
bucket="tf-test-bucket")
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";
const folderId = "<folder-id>";
// Create SA
const sa = new yandex.IamServiceAccount("sa", {folderId: folderId});
// Grant permissions
const sa_editor = new yandex.ResourcemanagerFolderIamMember("sa-editor", {
folderId: folderId,
role: "storage.editor",
member: pulumi.interpolate`serviceAccount:${sa.id}`,
});
// Create Static Access Keys
const sa_static_key = new yandex.IamServiceAccountStaticAccessKey("sa-static-key", {
serviceAccountId: sa.id,
description: "static access key for object storage",
});
// Use keys to create bucket
const test = new yandex.StorageBucket("test", {
accessKey: sa_static_key.accessKey,
secretKey: sa_static_key.secretKey,
bucket: "tf-test-bucket",
});
Coming soon!
Static Website Hosting
using Pulumi;
using Yandex = Pulumi.Yandex;
class MyStack : Stack
{
public MyStack()
{
var test = new Yandex.StorageBucket("test", new Yandex.StorageBucketArgs
{
Acl = "public-read",
Bucket = "storage-website-test.hashicorp.com",
Website = new Yandex.Inputs.StorageBucketWebsiteArgs
{
ErrorDocument = "error.html",
IndexDocument = "index.html",
RoutingRules = @"[{
""Condition"": {
""KeyPrefixEquals"": ""docs/""
},
""Redirect"": {
""ReplaceKeyPrefixWith"": ""documents/""
}
}]
",
},
});
}
}
package main
import (
"fmt"
"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := yandex.NewStorageBucket(ctx, "test", &yandex.StorageBucketArgs{
Acl: pulumi.String("public-read"),
Bucket: pulumi.String("storage-website-test.hashicorp.com"),
Website: &StorageBucketWebsiteArgs{
ErrorDocument: pulumi.String("error.html"),
IndexDocument: pulumi.String("index.html"),
RoutingRules: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v", "[{\n", " \"Condition\": {\n", " \"KeyPrefixEquals\": \"docs/\"\n", " },\n", " \"Redirect\": {\n", " \"ReplaceKeyPrefixWith\": \"documents/\"\n", " }\n", "}]\n", "\n")),
},
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_yandex as yandex
test = yandex.StorageBucket("test",
acl="public-read",
bucket="storage-website-test.hashicorp.com",
website=yandex.StorageBucketWebsiteArgs(
error_document="error.html",
index_document="index.html",
routing_rules="""[{
"Condition": {
"KeyPrefixEquals": "docs/"
},
"Redirect": {
"ReplaceKeyPrefixWith": "documents/"
}
}]
""",
))
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";
const test = new yandex.StorageBucket("test", {
acl: "public-read",
bucket: "storage-website-test.hashicorp.com",
website: {
errorDocument: "error.html",
indexDocument: "index.html",
routingRules: `[{
"Condition": {
"KeyPrefixEquals": "docs/"
},
"Redirect": {
"ReplaceKeyPrefixWith": "documents/"
}
}]
`,
},
});
Coming soon!
Using ACL policy grants
using Pulumi;
using Yandex = Pulumi.Yandex;
class MyStack : Stack
{
public MyStack()
{
var test = new Yandex.StorageBucket("test", new Yandex.StorageBucketArgs
{
Bucket = "mybucket",
Grants =
{
new Yandex.Inputs.StorageBucketGrantArgs
{
Id = "myuser",
Permissions =
{
"FULL_CONTROL",
},
Type = "CanonicalUser",
},
new Yandex.Inputs.StorageBucketGrantArgs
{
Permissions =
{
"READ",
"WRITE",
},
Type = "Group",
Uri = "http://acs.amazonaws.com/groups/global/AllUsers",
},
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := yandex.NewStorageBucket(ctx, "test", &yandex.StorageBucketArgs{
Bucket: pulumi.String("mybucket"),
Grants: StorageBucketGrantArray{
&StorageBucketGrantArgs{
Id: pulumi.String("myuser"),
Permissions: pulumi.StringArray{
pulumi.String("FULL_CONTROL"),
},
Type: pulumi.String("CanonicalUser"),
},
&StorageBucketGrantArgs{
Permissions: pulumi.StringArray{
pulumi.String("READ"),
pulumi.String("WRITE"),
},
Type: pulumi.String("Group"),
Uri: pulumi.String("http://acs.amazonaws.com/groups/global/AllUsers"),
},
},
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_yandex as yandex
test = yandex.StorageBucket("test",
bucket="mybucket",
grants=[
yandex.StorageBucketGrantArgs(
id="myuser",
permissions=["FULL_CONTROL"],
type="CanonicalUser",
),
yandex.StorageBucketGrantArgs(
permissions=[
"READ",
"WRITE",
],
type="Group",
uri="http://acs.amazonaws.com/groups/global/AllUsers",
),
])
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";
const test = new yandex.StorageBucket("test", {
bucket: "mybucket",
grants: [
{
id: "myuser",
permissions: ["FULL_CONTROL"],
type: "CanonicalUser",
},
{
permissions: [
"READ",
"WRITE",
],
type: "Group",
uri: "http://acs.amazonaws.com/groups/global/AllUsers",
},
],
});
Coming soon!
Using CORS
using Pulumi;
using Yandex = Pulumi.Yandex;
class MyStack : Stack
{
public MyStack()
{
var storageBucket = new Yandex.StorageBucket("storageBucket", new Yandex.StorageBucketArgs
{
Acl = "public-read",
Bucket = "s3-website-test.hashicorp.com",
CorsRules =
{
new Yandex.Inputs.StorageBucketCorsRuleArgs
{
AllowedHeaders =
{
"*",
},
AllowedMethods =
{
"PUT",
"POST",
},
AllowedOrigins =
{
"https://s3-website-test.hashicorp.com",
},
ExposeHeaders =
{
"ETag",
},
MaxAgeSeconds = 3000,
},
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := yandex.NewStorageBucket(ctx, "storageBucket", &yandex.StorageBucketArgs{
Acl: pulumi.String("public-read"),
Bucket: pulumi.String("s3-website-test.hashicorp.com"),
CorsRules: StorageBucketCorsRuleArray{
&StorageBucketCorsRuleArgs{
AllowedHeaders: pulumi.StringArray{
pulumi.String("*"),
},
AllowedMethods: pulumi.StringArray{
pulumi.String("PUT"),
pulumi.String("POST"),
},
AllowedOrigins: pulumi.StringArray{
pulumi.String("https://s3-website-test.hashicorp.com"),
},
ExposeHeaders: pulumi.StringArray{
pulumi.String("ETag"),
},
MaxAgeSeconds: pulumi.Int(3000),
},
},
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_yandex as yandex
storage_bucket = yandex.StorageBucket("storageBucket",
acl="public-read",
bucket="s3-website-test.hashicorp.com",
cors_rules=[yandex.StorageBucketCorsRuleArgs(
allowed_headers=["*"],
allowed_methods=[
"PUT",
"POST",
],
allowed_origins=["https://s3-website-test.hashicorp.com"],
expose_headers=["ETag"],
max_age_seconds=3000,
)])
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";
const storageBucket = new yandex.StorageBucket("b", {
acl: "public-read",
bucket: "s3-website-test.hashicorp.com",
corsRules: [{
allowedHeaders: ["*"],
allowedMethods: [
"PUT",
"POST",
],
allowedOrigins: ["https://s3-website-test.hashicorp.com"],
exposeHeaders: ["ETag"],
maxAgeSeconds: 3000,
}],
});
Coming soon!
Using versioning
using Pulumi;
using Yandex = Pulumi.Yandex;
class MyStack : Stack
{
public MyStack()
{
var storageBucket = new Yandex.StorageBucket("storageBucket", new Yandex.StorageBucketArgs
{
Acl = "private",
Bucket = "my-tf-test-bucket",
Versioning = new Yandex.Inputs.StorageBucketVersioningArgs
{
Enabled = true,
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := yandex.NewStorageBucket(ctx, "storageBucket", &yandex.StorageBucketArgs{
Acl: pulumi.String("private"),
Bucket: pulumi.String("my-tf-test-bucket"),
Versioning: &StorageBucketVersioningArgs{
Enabled: pulumi.Bool(true),
},
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_yandex as yandex
storage_bucket = yandex.StorageBucket("storageBucket",
acl="private",
bucket="my-tf-test-bucket",
versioning=yandex.StorageBucketVersioningArgs(
enabled=True,
))
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";
const storageBucket = new yandex.StorageBucket("b", {
acl: "private",
bucket: "my-tf-test-bucket",
versioning: {
enabled: true,
},
});
Coming soon!
Enable Logging
using Pulumi;
using Yandex = Pulumi.Yandex;
class MyStack : Stack
{
public MyStack()
{
var logBucket = new Yandex.StorageBucket("logBucket", new Yandex.StorageBucketArgs
{
Bucket = "my-tf-log-bucket",
});
var storageBucket = new Yandex.StorageBucket("storageBucket", new Yandex.StorageBucketArgs
{
Bucket = "my-tf-test-bucket",
Acl = "private",
Loggings =
{
new Yandex.Inputs.StorageBucketLoggingArgs
{
TargetBucket = logBucket.Id,
TargetPrefix = "log/",
},
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
logBucket, err := yandex.NewStorageBucket(ctx, "logBucket", &yandex.StorageBucketArgs{
Bucket: pulumi.String("my-tf-log-bucket"),
})
if err != nil {
return err
}
_, err = yandex.NewStorageBucket(ctx, "storageBucket", &yandex.StorageBucketArgs{
Bucket: pulumi.String("my-tf-test-bucket"),
Acl: pulumi.String("private"),
Loggings: StorageBucketLoggingArray{
&StorageBucketLoggingArgs{
TargetBucket: logBucket.ID(),
TargetPrefix: pulumi.String("log/"),
},
},
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_yandex as yandex
log_bucket = yandex.StorageBucket("logBucket", bucket="my-tf-log-bucket")
storage_bucket = yandex.StorageBucket("storageBucket",
bucket="my-tf-test-bucket",
acl="private",
loggings=[yandex.StorageBucketLoggingArgs(
target_bucket=log_bucket.id,
target_prefix="log/",
)])
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";
const logBucket = new yandex.StorageBucket("logBucket", {bucket: "my-tf-log-bucket"});
const storageBucket = new yandex.StorageBucket("storageBucket", {
bucket: "my-tf-test-bucket",
acl: "private",
loggings: [{
targetBucket: logBucket.id,
targetPrefix: "log/",
}],
});
Coming soon!
Using object lifecycle
using Pulumi;
using Yandex = Pulumi.Yandex;
class MyStack : Stack
{
public MyStack()
{
var bucket = new Yandex.StorageBucket("bucket", new Yandex.StorageBucketArgs
{
Acl = "private",
Bucket = "my-bucket",
LifecycleRules =
{
new Yandex.Inputs.StorageBucketLifecycleRuleArgs
{
Enabled = true,
Expiration = new Yandex.Inputs.StorageBucketLifecycleRuleExpirationArgs
{
Days = 90,
},
Id = "log",
Prefix = "log/",
Transitions =
{
new Yandex.Inputs.StorageBucketLifecycleRuleTransitionArgs
{
Days = 30,
StorageClass = "COLD",
},
},
},
new Yandex.Inputs.StorageBucketLifecycleRuleArgs
{
Enabled = true,
Expiration = new Yandex.Inputs.StorageBucketLifecycleRuleExpirationArgs
{
Date = "2020-12-21",
},
Id = "tmp",
Prefix = "tmp/",
},
},
});
var versioningBucket = new Yandex.StorageBucket("versioningBucket", new Yandex.StorageBucketArgs
{
Acl = "private",
Bucket = "my-versioning-bucket",
LifecycleRules =
{
new Yandex.Inputs.StorageBucketLifecycleRuleArgs
{
Enabled = true,
NoncurrentVersionExpiration = new Yandex.Inputs.StorageBucketLifecycleRuleNoncurrentVersionExpirationArgs
{
Days = 90,
},
NoncurrentVersionTransitions =
{
new Yandex.Inputs.StorageBucketLifecycleRuleNoncurrentVersionTransitionArgs
{
Days = 30,
StorageClass = "COLD",
},
},
Prefix = "config/",
},
},
Versioning = new Yandex.Inputs.StorageBucketVersioningArgs
{
Enabled = true,
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := yandex.NewStorageBucket(ctx, "bucket", &yandex.StorageBucketArgs{
Acl: pulumi.String("private"),
Bucket: pulumi.String("my-bucket"),
LifecycleRules: StorageBucketLifecycleRuleArray{
&StorageBucketLifecycleRuleArgs{
Enabled: pulumi.Bool(true),
Expiration: &StorageBucketLifecycleRuleExpirationArgs{
Days: pulumi.Int(90),
},
Id: pulumi.String("log"),
Prefix: pulumi.String("log/"),
Transitions: StorageBucketLifecycleRuleTransitionArray{
&StorageBucketLifecycleRuleTransitionArgs{
Days: pulumi.Int(30),
StorageClass: pulumi.String("COLD"),
},
},
},
&StorageBucketLifecycleRuleArgs{
Enabled: pulumi.Bool(true),
Expiration: &StorageBucketLifecycleRuleExpirationArgs{
Date: pulumi.String("2020-12-21"),
},
Id: pulumi.String("tmp"),
Prefix: pulumi.String("tmp/"),
},
},
})
if err != nil {
return err
}
_, err = yandex.NewStorageBucket(ctx, "versioningBucket", &yandex.StorageBucketArgs{
Acl: pulumi.String("private"),
Bucket: pulumi.String("my-versioning-bucket"),
LifecycleRules: StorageBucketLifecycleRuleArray{
&StorageBucketLifecycleRuleArgs{
Enabled: pulumi.Bool(true),
NoncurrentVersionExpiration: &StorageBucketLifecycleRuleNoncurrentVersionExpirationArgs{
Days: pulumi.Int(90),
},
NoncurrentVersionTransitions: StorageBucketLifecycleRuleNoncurrentVersionTransitionArray{
&StorageBucketLifecycleRuleNoncurrentVersionTransitionArgs{
Days: pulumi.Int(30),
StorageClass: pulumi.String("COLD"),
},
},
Prefix: pulumi.String("config/"),
},
},
Versioning: &StorageBucketVersioningArgs{
Enabled: pulumi.Bool(true),
},
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_yandex as yandex
bucket = yandex.StorageBucket("bucket",
acl="private",
bucket="my-bucket",
lifecycle_rules=[
yandex.StorageBucketLifecycleRuleArgs(
enabled=True,
expiration=yandex.StorageBucketLifecycleRuleExpirationArgs(
days=90,
),
id="log",
prefix="log/",
transitions=[yandex.StorageBucketLifecycleRuleTransitionArgs(
days=30,
storage_class="COLD",
)],
),
yandex.StorageBucketLifecycleRuleArgs(
enabled=True,
expiration=yandex.StorageBucketLifecycleRuleExpirationArgs(
date="2020-12-21",
),
id="tmp",
prefix="tmp/",
),
])
versioning_bucket = yandex.StorageBucket("versioningBucket",
acl="private",
bucket="my-versioning-bucket",
lifecycle_rules=[yandex.StorageBucketLifecycleRuleArgs(
enabled=True,
noncurrent_version_expiration=yandex.StorageBucketLifecycleRuleNoncurrentVersionExpirationArgs(
days=90,
),
noncurrent_version_transitions=[yandex.StorageBucketLifecycleRuleNoncurrentVersionTransitionArgs(
days=30,
storage_class="COLD",
)],
prefix="config/",
)],
versioning=yandex.StorageBucketVersioningArgs(
enabled=True,
))
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";
const bucket = new yandex.StorageBucket("bucket", {
acl: "private",
bucket: "my-bucket",
lifecycleRules: [
{
enabled: true,
expiration: {
days: 90,
},
id: "log",
prefix: "log/",
transitions: [{
days: 30,
storageClass: "COLD",
}],
},
{
enabled: true,
expiration: {
date: "2020-12-21",
},
id: "tmp",
prefix: "tmp/",
},
],
});
const versioningBucket = new yandex.StorageBucket("versioning_bucket", {
acl: "private",
bucket: "my-versioning-bucket",
lifecycleRules: [{
enabled: true,
noncurrentVersionExpiration: {
days: 90,
},
noncurrentVersionTransitions: [{
days: 30,
storageClass: "COLD",
}],
prefix: "config/",
}],
versioning: {
enabled: true,
},
});
Coming soon!
Using SSE
using Pulumi;
using Yandex = Pulumi.Yandex;
class MyStack : Stack
{
public MyStack()
{
var key_a = new Yandex.KmsSymmetricKey("key-a", new Yandex.KmsSymmetricKeyArgs
{
Description = "description for key",
DefaultAlgorithm = "AES_128",
RotationPeriod = "8760h",
});
// equal to 1 year
var test = new Yandex.StorageBucket("test", new Yandex.StorageBucketArgs
{
Bucket = "mybucket",
ServerSideEncryptionConfiguration = new Yandex.Inputs.StorageBucketServerSideEncryptionConfigurationArgs
{
Rule = new Yandex.Inputs.StorageBucketServerSideEncryptionConfigurationRuleArgs
{
ApplyServerSideEncryptionByDefault = new Yandex.Inputs.StorageBucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultArgs
{
KmsMasterKeyId = key_a.Id,
SseAlgorithm = "aws:kms",
},
},
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := yandex.NewKmsSymmetricKey(ctx, "key-a", &yandex.KmsSymmetricKeyArgs{
Description: pulumi.String("description for key"),
DefaultAlgorithm: pulumi.String("AES_128"),
RotationPeriod: pulumi.String("8760h"),
})
if err != nil {
return err
}
_, err = yandex.NewStorageBucket(ctx, "test", &yandex.StorageBucketArgs{
Bucket: pulumi.String("mybucket"),
ServerSideEncryptionConfiguration: &StorageBucketServerSideEncryptionConfigurationArgs{
Rule: &StorageBucketServerSideEncryptionConfigurationRuleArgs{
ApplyServerSideEncryptionByDefault: &StorageBucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultArgs{
KmsMasterKeyId: key_a.ID(),
SseAlgorithm: pulumi.String("aws:kms"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_yandex as yandex
key_a = yandex.KmsSymmetricKey("key-a",
description="description for key",
default_algorithm="AES_128",
rotation_period="8760h")
# equal to 1 year
test = yandex.StorageBucket("test",
bucket="mybucket",
server_side_encryption_configuration=yandex.StorageBucketServerSideEncryptionConfigurationArgs(
rule=yandex.StorageBucketServerSideEncryptionConfigurationRuleArgs(
apply_server_side_encryption_by_default=yandex.StorageBucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultArgs(
kms_master_key_id=key_a.id,
sse_algorithm="aws:kms",
),
),
))
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";
const key_a = new yandex.KmsSymmetricKey("key-a", {
description: "description for key",
defaultAlgorithm: "AES_128",
rotationPeriod: "8760h",
});
// equal to 1 year
const test = new yandex.StorageBucket("test", {
bucket: "mybucket",
serverSideEncryptionConfiguration: {
rule: {
applyServerSideEncryptionByDefault: {
kmsMasterKeyId: key_a.id,
sseAlgorithm: "aws:kms",
},
},
},
});
Coming soon!
Bucket Policy
using Pulumi;
using Yandex = Pulumi.Yandex;
class MyStack : Stack
{
public MyStack()
{
var storageBucket = new Yandex.StorageBucket("storageBucket", new Yandex.StorageBucketArgs
{
Bucket = "my-policy-bucket",
Policy = @"{
""Version"": ""2012-10-17"",
""Statement"": [
{
""Effect"": ""Allow"",
""Principal"": ""*"",
""Action"": ""s3:*"",
""Resource"": [
""arn:aws:s3:::my-policy-bucket/*"",
""arn:aws:s3:::my-policy-bucket""
]
},
{
""Effect"": ""Deny"",
""Principal"": ""*"",
""Action"": ""s3:PutObject"",
""Resource"": [
""arn:aws:s3:::my-policy-bucket/*"",
""arn:aws:s3:::my-policy-bucket""
]
}
]
}
",
});
}
}
package main
import (
"fmt"
"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := yandex.NewStorageBucket(ctx, "storageBucket", &yandex.StorageBucketArgs{
Bucket: pulumi.String("my-policy-bucket"),
Policy: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", " \"Version\": \"2012-10-17\",\n", " \"Statement\": [\n", " {\n", " \"Effect\": \"Allow\",\n", " \"Principal\": \"*\",\n", " \"Action\": \"s3:*\",\n", " \"Resource\": [\n", " \"arn:aws:s3:::my-policy-bucket/*\",\n", " \"arn:aws:s3:::my-policy-bucket\"\n", " ]\n", " },\n", " {\n", " \"Effect\": \"Deny\",\n", " \"Principal\": \"*\",\n", " \"Action\": \"s3:PutObject\",\n", " \"Resource\": [\n", " \"arn:aws:s3:::my-policy-bucket/*\",\n", " \"arn:aws:s3:::my-policy-bucket\"\n", " ]\n", " }\n", " ]\n", "}\n", "\n")),
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_yandex as yandex
storage_bucket = yandex.StorageBucket("storageBucket",
bucket="my-policy-bucket",
policy="""{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::my-policy-bucket/*",
"arn:aws:s3:::my-policy-bucket"
]
},
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:PutObject",
"Resource": [
"arn:aws:s3:::my-policy-bucket/*",
"arn:aws:s3:::my-policy-bucket"
]
}
]
}
""")
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";
const storageBucket = new yandex.StorageBucket("b", {
bucket: "my-policy-bucket",
policy: `{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::my-policy-bucket/*",
"arn:aws:s3:::my-policy-bucket"
]
},
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:PutObject",
"Resource": [
"arn:aws:s3:::my-policy-bucket/*",
"arn:aws:s3:::my-policy-bucket"
]
}
]
}
`,
});
Coming soon!
All settings example
using Pulumi;
using Yandex = Pulumi.Yandex;
class MyStack : Stack
{
public MyStack()
{
var logBucket = new Yandex.StorageBucket("logBucket", new Yandex.StorageBucketArgs
{
Bucket = "my-tf-log-bucket",
LifecycleRules =
{
new Yandex.Inputs.StorageBucketLifecycleRuleArgs
{
Id = "cleanupoldlogs",
Enabled = true,
Expiration = new Yandex.Inputs.StorageBucketLifecycleRuleExpirationArgs
{
Days = 365,
},
},
},
});
var key_a = new Yandex.KmsSymmetricKey("key-a", new Yandex.KmsSymmetricKeyArgs
{
Description = "description for key",
DefaultAlgorithm = "AES_128",
RotationPeriod = "8760h",
});
// equal to 1 year
var allSettings = new Yandex.StorageBucket("allSettings", new Yandex.StorageBucketArgs
{
Bucket = "example-tf-settings-bucket",
Website = new Yandex.Inputs.StorageBucketWebsiteArgs
{
IndexDocument = "index.html",
ErrorDocument = "error.html",
},
LifecycleRules =
{
new Yandex.Inputs.StorageBucketLifecycleRuleArgs
{
Id = "test",
Enabled = true,
Prefix = "prefix/",
Expiration = new Yandex.Inputs.StorageBucketLifecycleRuleExpirationArgs
{
Days = 30,
},
},
new Yandex.Inputs.StorageBucketLifecycleRuleArgs
{
Id = "log",
Enabled = true,
Prefix = "log/",
Transitions =
{
new Yandex.Inputs.StorageBucketLifecycleRuleTransitionArgs
{
Days = 30,
StorageClass = "COLD",
},
},
Expiration = new Yandex.Inputs.StorageBucketLifecycleRuleExpirationArgs
{
Days = 90,
},
},
new Yandex.Inputs.StorageBucketLifecycleRuleArgs
{
Id = "everything180",
Prefix = "",
Enabled = true,
Expiration = new Yandex.Inputs.StorageBucketLifecycleRuleExpirationArgs
{
Days = 180,
},
},
new Yandex.Inputs.StorageBucketLifecycleRuleArgs
{
Id = "cleanupoldversions",
Prefix = "config/",
Enabled = true,
NoncurrentVersionTransitions =
{
new Yandex.Inputs.StorageBucketLifecycleRuleNoncurrentVersionTransitionArgs
{
Days = 30,
StorageClass = "COLD",
},
},
NoncurrentVersionExpiration = new Yandex.Inputs.StorageBucketLifecycleRuleNoncurrentVersionExpirationArgs
{
Days = 90,
},
},
new Yandex.Inputs.StorageBucketLifecycleRuleArgs
{
Id = "abortmultiparts",
Prefix = "",
Enabled = true,
AbortIncompleteMultipartUploadDays = 7,
},
},
CorsRules =
{
new Yandex.Inputs.StorageBucketCorsRuleArgs
{
AllowedHeaders =
{
"*",
},
AllowedMethods =
{
"GET",
"PUT",
},
AllowedOrigins =
{
"https://storage-cloud.example.com",
},
ExposeHeaders =
{
"ETag",
},
MaxAgeSeconds = 3000,
},
},
Versioning = new Yandex.Inputs.StorageBucketVersioningArgs
{
Enabled = true,
},
ServerSideEncryptionConfiguration = new Yandex.Inputs.StorageBucketServerSideEncryptionConfigurationArgs
{
Rule = new Yandex.Inputs.StorageBucketServerSideEncryptionConfigurationRuleArgs
{
ApplyServerSideEncryptionByDefault = new Yandex.Inputs.StorageBucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultArgs
{
KmsMasterKeyId = key_a.Id,
SseAlgorithm = "aws:kms",
},
},
},
Loggings =
{
new Yandex.Inputs.StorageBucketLoggingArgs
{
TargetBucket = logBucket.Id,
TargetPrefix = "tf-logs/",
},
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
logBucket, err := yandex.NewStorageBucket(ctx, "logBucket", &yandex.StorageBucketArgs{
Bucket: pulumi.String("my-tf-log-bucket"),
LifecycleRules: StorageBucketLifecycleRuleArray{
&StorageBucketLifecycleRuleArgs{
Id: pulumi.String("cleanupoldlogs"),
Enabled: pulumi.Bool(true),
Expiration: &StorageBucketLifecycleRuleExpirationArgs{
Days: pulumi.Int(365),
},
},
},
})
if err != nil {
return err
}
_, err = yandex.NewKmsSymmetricKey(ctx, "key-a", &yandex.KmsSymmetricKeyArgs{
Description: pulumi.String("description for key"),
DefaultAlgorithm: pulumi.String("AES_128"),
RotationPeriod: pulumi.String("8760h"),
})
if err != nil {
return err
}
_, err = yandex.NewStorageBucket(ctx, "allSettings", &yandex.StorageBucketArgs{
Bucket: pulumi.String("example-tf-settings-bucket"),
Website: &StorageBucketWebsiteArgs{
IndexDocument: pulumi.String("index.html"),
ErrorDocument: pulumi.String("error.html"),
},
LifecycleRules: StorageBucketLifecycleRuleArray{
&StorageBucketLifecycleRuleArgs{
Id: pulumi.String("test"),
Enabled: pulumi.Bool(true),
Prefix: pulumi.String("prefix/"),
Expiration: &StorageBucketLifecycleRuleExpirationArgs{
Days: pulumi.Int(30),
},
},
&StorageBucketLifecycleRuleArgs{
Id: pulumi.String("log"),
Enabled: pulumi.Bool(true),
Prefix: pulumi.String("log/"),
Transitions: StorageBucketLifecycleRuleTransitionArray{
&StorageBucketLifecycleRuleTransitionArgs{
Days: pulumi.Int(30),
StorageClass: pulumi.String("COLD"),
},
},
Expiration: &StorageBucketLifecycleRuleExpirationArgs{
Days: pulumi.Int(90),
},
},
&StorageBucketLifecycleRuleArgs{
Id: pulumi.String("everything180"),
Prefix: pulumi.String(""),
Enabled: pulumi.Bool(true),
Expiration: &StorageBucketLifecycleRuleExpirationArgs{
Days: pulumi.Int(180),
},
},
&StorageBucketLifecycleRuleArgs{
Id: pulumi.String("cleanupoldversions"),
Prefix: pulumi.String("config/"),
Enabled: pulumi.Bool(true),
NoncurrentVersionTransitions: StorageBucketLifecycleRuleNoncurrentVersionTransitionArray{
&StorageBucketLifecycleRuleNoncurrentVersionTransitionArgs{
Days: pulumi.Int(30),
StorageClass: pulumi.String("COLD"),
},
},
NoncurrentVersionExpiration: &StorageBucketLifecycleRuleNoncurrentVersionExpirationArgs{
Days: pulumi.Int(90),
},
},
&StorageBucketLifecycleRuleArgs{
Id: pulumi.String("abortmultiparts"),
Prefix: pulumi.String(""),
Enabled: pulumi.Bool(true),
AbortIncompleteMultipartUploadDays: pulumi.Int(7),
},
},
CorsRules: StorageBucketCorsRuleArray{
&StorageBucketCorsRuleArgs{
AllowedHeaders: pulumi.StringArray{
pulumi.String("*"),
},
AllowedMethods: pulumi.StringArray{
pulumi.String("GET"),
pulumi.String("PUT"),
},
AllowedOrigins: pulumi.StringArray{
pulumi.String("https://storage-cloud.example.com"),
},
ExposeHeaders: pulumi.StringArray{
pulumi.String("ETag"),
},
MaxAgeSeconds: pulumi.Int(3000),
},
},
Versioning: &StorageBucketVersioningArgs{
Enabled: pulumi.Bool(true),
},
ServerSideEncryptionConfiguration: &StorageBucketServerSideEncryptionConfigurationArgs{
Rule: &StorageBucketServerSideEncryptionConfigurationRuleArgs{
ApplyServerSideEncryptionByDefault: &StorageBucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultArgs{
KmsMasterKeyId: key_a.ID(),
SseAlgorithm: pulumi.String("aws:kms"),
},
},
},
Loggings: StorageBucketLoggingArray{
&StorageBucketLoggingArgs{
TargetBucket: logBucket.ID(),
TargetPrefix: pulumi.String("tf-logs/"),
},
},
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_yandex as yandex
log_bucket = yandex.StorageBucket("logBucket",
bucket="my-tf-log-bucket",
lifecycle_rules=[yandex.StorageBucketLifecycleRuleArgs(
id="cleanupoldlogs",
enabled=True,
expiration=yandex.StorageBucketLifecycleRuleExpirationArgs(
days=365,
),
)])
key_a = yandex.KmsSymmetricKey("key-a",
description="description for key",
default_algorithm="AES_128",
rotation_period="8760h")
# equal to 1 year
all_settings = yandex.StorageBucket("allSettings",
bucket="example-tf-settings-bucket",
website=yandex.StorageBucketWebsiteArgs(
index_document="index.html",
error_document="error.html",
),
lifecycle_rules=[
yandex.StorageBucketLifecycleRuleArgs(
id="test",
enabled=True,
prefix="prefix/",
expiration=yandex.StorageBucketLifecycleRuleExpirationArgs(
days=30,
),
),
yandex.StorageBucketLifecycleRuleArgs(
id="log",
enabled=True,
prefix="log/",
transitions=[yandex.StorageBucketLifecycleRuleTransitionArgs(
days=30,
storage_class="COLD",
)],
expiration=yandex.StorageBucketLifecycleRuleExpirationArgs(
days=90,
),
),
yandex.StorageBucketLifecycleRuleArgs(
id="everything180",
prefix="",
enabled=True,
expiration=yandex.StorageBucketLifecycleRuleExpirationArgs(
days=180,
),
),
yandex.StorageBucketLifecycleRuleArgs(
id="cleanupoldversions",
prefix="config/",
enabled=True,
noncurrent_version_transitions=[yandex.StorageBucketLifecycleRuleNoncurrentVersionTransitionArgs(
days=30,
storage_class="COLD",
)],
noncurrent_version_expiration=yandex.StorageBucketLifecycleRuleNoncurrentVersionExpirationArgs(
days=90,
),
),
yandex.StorageBucketLifecycleRuleArgs(
id="abortmultiparts",
prefix="",
enabled=True,
abort_incomplete_multipart_upload_days=7,
),
],
cors_rules=[yandex.StorageBucketCorsRuleArgs(
allowed_headers=["*"],
allowed_methods=[
"GET",
"PUT",
],
allowed_origins=["https://storage-cloud.example.com"],
expose_headers=["ETag"],
max_age_seconds=3000,
)],
versioning=yandex.StorageBucketVersioningArgs(
enabled=True,
),
server_side_encryption_configuration=yandex.StorageBucketServerSideEncryptionConfigurationArgs(
rule=yandex.StorageBucketServerSideEncryptionConfigurationRuleArgs(
apply_server_side_encryption_by_default=yandex.StorageBucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultArgs(
kms_master_key_id=key_a.id,
sse_algorithm="aws:kms",
),
),
),
loggings=[yandex.StorageBucketLoggingArgs(
target_bucket=log_bucket.id,
target_prefix="tf-logs/",
)])
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";
const logBucket = new yandex.StorageBucket("logBucket", {
bucket: "my-tf-log-bucket",
lifecycleRules: [{
id: "cleanupoldlogs",
enabled: true,
expiration: {
days: 365,
},
}],
});
const key_a = new yandex.KmsSymmetricKey("key-a", {
description: "description for key",
defaultAlgorithm: "AES_128",
rotationPeriod: "8760h",
});
// equal to 1 year
const allSettings = new yandex.StorageBucket("allSettings", {
bucket: "example-tf-settings-bucket",
website: {
indexDocument: "index.html",
errorDocument: "error.html",
},
lifecycleRules: [
{
id: "test",
enabled: true,
prefix: "prefix/",
expiration: {
days: 30,
},
},
{
id: "log",
enabled: true,
prefix: "log/",
transitions: [{
days: 30,
storageClass: "COLD",
}],
expiration: {
days: 90,
},
},
{
id: "everything180",
prefix: "",
enabled: true,
expiration: {
days: 180,
},
},
{
id: "cleanupoldversions",
prefix: "config/",
enabled: true,
noncurrentVersionTransitions: [{
days: 30,
storageClass: "COLD",
}],
noncurrentVersionExpiration: {
days: 90,
},
},
{
id: "abortmultiparts",
prefix: "",
enabled: true,
abortIncompleteMultipartUploadDays: 7,
},
],
corsRules: [{
allowedHeaders: ["*"],
allowedMethods: [
"GET",
"PUT",
],
allowedOrigins: ["https://storage-cloud.example.com"],
exposeHeaders: ["ETag"],
maxAgeSeconds: 3000,
}],
versioning: {
enabled: true,
},
serverSideEncryptionConfiguration: {
rule: {
applyServerSideEncryptionByDefault: {
kmsMasterKeyId: key_a.id,
sseAlgorithm: "aws:kms",
},
},
},
loggings: [{
targetBucket: logBucket.id,
targetPrefix: "tf-logs/",
}],
});
Coming soon!
Create StorageBucket Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new StorageBucket(name: string, args?: StorageBucketArgs, opts?: CustomResourceOptions);
@overload
def StorageBucket(resource_name: str,
args: Optional[StorageBucketArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def StorageBucket(resource_name: str,
opts: Optional[ResourceOptions] = None,
access_key: Optional[str] = None,
acl: Optional[str] = None,
bucket: Optional[str] = None,
bucket_prefix: Optional[str] = None,
cors_rules: Optional[Sequence[StorageBucketCorsRuleArgs]] = None,
force_destroy: Optional[bool] = None,
grants: Optional[Sequence[StorageBucketGrantArgs]] = None,
lifecycle_rules: Optional[Sequence[StorageBucketLifecycleRuleArgs]] = None,
loggings: Optional[Sequence[StorageBucketLoggingArgs]] = None,
policy: Optional[str] = None,
secret_key: Optional[str] = None,
server_side_encryption_configuration: Optional[StorageBucketServerSideEncryptionConfigurationArgs] = None,
versioning: Optional[StorageBucketVersioningArgs] = None,
website: Optional[StorageBucketWebsiteArgs] = None,
website_domain: Optional[str] = None,
website_endpoint: Optional[str] = None)
func NewStorageBucket(ctx *Context, name string, args *StorageBucketArgs, opts ...ResourceOption) (*StorageBucket, error)
public StorageBucket(string name, StorageBucketArgs? args = null, CustomResourceOptions? opts = null)
public StorageBucket(String name, StorageBucketArgs args)
public StorageBucket(String name, StorageBucketArgs args, CustomResourceOptions options)
type: yandex:StorageBucket
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 StorageBucketArgs
- 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 StorageBucketArgs
- 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 StorageBucketArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args StorageBucketArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args StorageBucketArgs
- 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 storageBucketResource = new Yandex.StorageBucket("storageBucketResource", new()
{
AccessKey = "string",
Acl = "string",
Bucket = "string",
BucketPrefix = "string",
CorsRules = new[]
{
new Yandex.Inputs.StorageBucketCorsRuleArgs
{
AllowedMethods = new[]
{
"string",
},
AllowedOrigins = new[]
{
"string",
},
AllowedHeaders = new[]
{
"string",
},
ExposeHeaders = new[]
{
"string",
},
MaxAgeSeconds = 0,
},
},
ForceDestroy = false,
Grants = new[]
{
new Yandex.Inputs.StorageBucketGrantArgs
{
Permissions = new[]
{
"string",
},
Type = "string",
Id = "string",
Uri = "string",
},
},
LifecycleRules = new[]
{
new Yandex.Inputs.StorageBucketLifecycleRuleArgs
{
Enabled = false,
AbortIncompleteMultipartUploadDays = 0,
Expiration = new Yandex.Inputs.StorageBucketLifecycleRuleExpirationArgs
{
Date = "string",
Days = 0,
ExpiredObjectDeleteMarker = false,
},
Id = "string",
NoncurrentVersionExpiration = new Yandex.Inputs.StorageBucketLifecycleRuleNoncurrentVersionExpirationArgs
{
Days = 0,
},
NoncurrentVersionTransitions = new[]
{
new Yandex.Inputs.StorageBucketLifecycleRuleNoncurrentVersionTransitionArgs
{
StorageClass = "string",
Days = 0,
},
},
Prefix = "string",
Transitions = new[]
{
new Yandex.Inputs.StorageBucketLifecycleRuleTransitionArgs
{
StorageClass = "string",
Date = "string",
Days = 0,
},
},
},
},
Loggings = new[]
{
new Yandex.Inputs.StorageBucketLoggingArgs
{
TargetBucket = "string",
TargetPrefix = "string",
},
},
Policy = "string",
SecretKey = "string",
ServerSideEncryptionConfiguration = new Yandex.Inputs.StorageBucketServerSideEncryptionConfigurationArgs
{
Rule = new Yandex.Inputs.StorageBucketServerSideEncryptionConfigurationRuleArgs
{
ApplyServerSideEncryptionByDefault = new Yandex.Inputs.StorageBucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultArgs
{
KmsMasterKeyId = "string",
SseAlgorithm = "string",
},
},
},
Versioning = new Yandex.Inputs.StorageBucketVersioningArgs
{
Enabled = false,
},
Website = new Yandex.Inputs.StorageBucketWebsiteArgs
{
ErrorDocument = "string",
IndexDocument = "string",
RedirectAllRequestsTo = "string",
RoutingRules = "string",
},
WebsiteDomain = "string",
WebsiteEndpoint = "string",
});
example, err := yandex.NewStorageBucket(ctx, "storageBucketResource", &yandex.StorageBucketArgs{
AccessKey: pulumi.String("string"),
Acl: pulumi.String("string"),
Bucket: pulumi.String("string"),
BucketPrefix: pulumi.String("string"),
CorsRules: yandex.StorageBucketCorsRuleArray{
&yandex.StorageBucketCorsRuleArgs{
AllowedMethods: pulumi.StringArray{
pulumi.String("string"),
},
AllowedOrigins: pulumi.StringArray{
pulumi.String("string"),
},
AllowedHeaders: pulumi.StringArray{
pulumi.String("string"),
},
ExposeHeaders: pulumi.StringArray{
pulumi.String("string"),
},
MaxAgeSeconds: pulumi.Int(0),
},
},
ForceDestroy: pulumi.Bool(false),
Grants: yandex.StorageBucketGrantArray{
&yandex.StorageBucketGrantArgs{
Permissions: pulumi.StringArray{
pulumi.String("string"),
},
Type: pulumi.String("string"),
Id: pulumi.String("string"),
Uri: pulumi.String("string"),
},
},
LifecycleRules: yandex.StorageBucketLifecycleRuleArray{
&yandex.StorageBucketLifecycleRuleArgs{
Enabled: pulumi.Bool(false),
AbortIncompleteMultipartUploadDays: pulumi.Int(0),
Expiration: &yandex.StorageBucketLifecycleRuleExpirationArgs{
Date: pulumi.String("string"),
Days: pulumi.Int(0),
ExpiredObjectDeleteMarker: pulumi.Bool(false),
},
Id: pulumi.String("string"),
NoncurrentVersionExpiration: &yandex.StorageBucketLifecycleRuleNoncurrentVersionExpirationArgs{
Days: pulumi.Int(0),
},
NoncurrentVersionTransitions: yandex.StorageBucketLifecycleRuleNoncurrentVersionTransitionArray{
&yandex.StorageBucketLifecycleRuleNoncurrentVersionTransitionArgs{
StorageClass: pulumi.String("string"),
Days: pulumi.Int(0),
},
},
Prefix: pulumi.String("string"),
Transitions: yandex.StorageBucketLifecycleRuleTransitionArray{
&yandex.StorageBucketLifecycleRuleTransitionArgs{
StorageClass: pulumi.String("string"),
Date: pulumi.String("string"),
Days: pulumi.Int(0),
},
},
},
},
Loggings: yandex.StorageBucketLoggingArray{
&yandex.StorageBucketLoggingArgs{
TargetBucket: pulumi.String("string"),
TargetPrefix: pulumi.String("string"),
},
},
Policy: pulumi.String("string"),
SecretKey: pulumi.String("string"),
ServerSideEncryptionConfiguration: &yandex.StorageBucketServerSideEncryptionConfigurationArgs{
Rule: &yandex.StorageBucketServerSideEncryptionConfigurationRuleArgs{
ApplyServerSideEncryptionByDefault: &yandex.StorageBucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultArgs{
KmsMasterKeyId: pulumi.String("string"),
SseAlgorithm: pulumi.String("string"),
},
},
},
Versioning: &yandex.StorageBucketVersioningArgs{
Enabled: pulumi.Bool(false),
},
Website: &yandex.StorageBucketWebsiteArgs{
ErrorDocument: pulumi.String("string"),
IndexDocument: pulumi.String("string"),
RedirectAllRequestsTo: pulumi.String("string"),
RoutingRules: pulumi.String("string"),
},
WebsiteDomain: pulumi.String("string"),
WebsiteEndpoint: pulumi.String("string"),
})
var storageBucketResource = new StorageBucket("storageBucketResource", StorageBucketArgs.builder()
.accessKey("string")
.acl("string")
.bucket("string")
.bucketPrefix("string")
.corsRules(StorageBucketCorsRuleArgs.builder()
.allowedMethods("string")
.allowedOrigins("string")
.allowedHeaders("string")
.exposeHeaders("string")
.maxAgeSeconds(0)
.build())
.forceDestroy(false)
.grants(StorageBucketGrantArgs.builder()
.permissions("string")
.type("string")
.id("string")
.uri("string")
.build())
.lifecycleRules(StorageBucketLifecycleRuleArgs.builder()
.enabled(false)
.abortIncompleteMultipartUploadDays(0)
.expiration(StorageBucketLifecycleRuleExpirationArgs.builder()
.date("string")
.days(0)
.expiredObjectDeleteMarker(false)
.build())
.id("string")
.noncurrentVersionExpiration(StorageBucketLifecycleRuleNoncurrentVersionExpirationArgs.builder()
.days(0)
.build())
.noncurrentVersionTransitions(StorageBucketLifecycleRuleNoncurrentVersionTransitionArgs.builder()
.storageClass("string")
.days(0)
.build())
.prefix("string")
.transitions(StorageBucketLifecycleRuleTransitionArgs.builder()
.storageClass("string")
.date("string")
.days(0)
.build())
.build())
.loggings(StorageBucketLoggingArgs.builder()
.targetBucket("string")
.targetPrefix("string")
.build())
.policy("string")
.secretKey("string")
.serverSideEncryptionConfiguration(StorageBucketServerSideEncryptionConfigurationArgs.builder()
.rule(StorageBucketServerSideEncryptionConfigurationRuleArgs.builder()
.applyServerSideEncryptionByDefault(StorageBucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultArgs.builder()
.kmsMasterKeyId("string")
.sseAlgorithm("string")
.build())
.build())
.build())
.versioning(StorageBucketVersioningArgs.builder()
.enabled(false)
.build())
.website(StorageBucketWebsiteArgs.builder()
.errorDocument("string")
.indexDocument("string")
.redirectAllRequestsTo("string")
.routingRules("string")
.build())
.websiteDomain("string")
.websiteEndpoint("string")
.build());
storage_bucket_resource = yandex.StorageBucket("storageBucketResource",
access_key="string",
acl="string",
bucket="string",
bucket_prefix="string",
cors_rules=[yandex.StorageBucketCorsRuleArgs(
allowed_methods=["string"],
allowed_origins=["string"],
allowed_headers=["string"],
expose_headers=["string"],
max_age_seconds=0,
)],
force_destroy=False,
grants=[yandex.StorageBucketGrantArgs(
permissions=["string"],
type="string",
id="string",
uri="string",
)],
lifecycle_rules=[yandex.StorageBucketLifecycleRuleArgs(
enabled=False,
abort_incomplete_multipart_upload_days=0,
expiration=yandex.StorageBucketLifecycleRuleExpirationArgs(
date="string",
days=0,
expired_object_delete_marker=False,
),
id="string",
noncurrent_version_expiration=yandex.StorageBucketLifecycleRuleNoncurrentVersionExpirationArgs(
days=0,
),
noncurrent_version_transitions=[yandex.StorageBucketLifecycleRuleNoncurrentVersionTransitionArgs(
storage_class="string",
days=0,
)],
prefix="string",
transitions=[yandex.StorageBucketLifecycleRuleTransitionArgs(
storage_class="string",
date="string",
days=0,
)],
)],
loggings=[yandex.StorageBucketLoggingArgs(
target_bucket="string",
target_prefix="string",
)],
policy="string",
secret_key="string",
server_side_encryption_configuration=yandex.StorageBucketServerSideEncryptionConfigurationArgs(
rule=yandex.StorageBucketServerSideEncryptionConfigurationRuleArgs(
apply_server_side_encryption_by_default=yandex.StorageBucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultArgs(
kms_master_key_id="string",
sse_algorithm="string",
),
),
),
versioning=yandex.StorageBucketVersioningArgs(
enabled=False,
),
website=yandex.StorageBucketWebsiteArgs(
error_document="string",
index_document="string",
redirect_all_requests_to="string",
routing_rules="string",
),
website_domain="string",
website_endpoint="string")
const storageBucketResource = new yandex.StorageBucket("storageBucketResource", {
accessKey: "string",
acl: "string",
bucket: "string",
bucketPrefix: "string",
corsRules: [{
allowedMethods: ["string"],
allowedOrigins: ["string"],
allowedHeaders: ["string"],
exposeHeaders: ["string"],
maxAgeSeconds: 0,
}],
forceDestroy: false,
grants: [{
permissions: ["string"],
type: "string",
id: "string",
uri: "string",
}],
lifecycleRules: [{
enabled: false,
abortIncompleteMultipartUploadDays: 0,
expiration: {
date: "string",
days: 0,
expiredObjectDeleteMarker: false,
},
id: "string",
noncurrentVersionExpiration: {
days: 0,
},
noncurrentVersionTransitions: [{
storageClass: "string",
days: 0,
}],
prefix: "string",
transitions: [{
storageClass: "string",
date: "string",
days: 0,
}],
}],
loggings: [{
targetBucket: "string",
targetPrefix: "string",
}],
policy: "string",
secretKey: "string",
serverSideEncryptionConfiguration: {
rule: {
applyServerSideEncryptionByDefault: {
kmsMasterKeyId: "string",
sseAlgorithm: "string",
},
},
},
versioning: {
enabled: false,
},
website: {
errorDocument: "string",
indexDocument: "string",
redirectAllRequestsTo: "string",
routingRules: "string",
},
websiteDomain: "string",
websiteEndpoint: "string",
});
type: yandex:StorageBucket
properties:
accessKey: string
acl: string
bucket: string
bucketPrefix: string
corsRules:
- allowedHeaders:
- string
allowedMethods:
- string
allowedOrigins:
- string
exposeHeaders:
- string
maxAgeSeconds: 0
forceDestroy: false
grants:
- id: string
permissions:
- string
type: string
uri: string
lifecycleRules:
- abortIncompleteMultipartUploadDays: 0
enabled: false
expiration:
date: string
days: 0
expiredObjectDeleteMarker: false
id: string
noncurrentVersionExpiration:
days: 0
noncurrentVersionTransitions:
- days: 0
storageClass: string
prefix: string
transitions:
- date: string
days: 0
storageClass: string
loggings:
- targetBucket: string
targetPrefix: string
policy: string
secretKey: string
serverSideEncryptionConfiguration:
rule:
applyServerSideEncryptionByDefault:
kmsMasterKeyId: string
sseAlgorithm: string
versioning:
enabled: false
website:
errorDocument: string
indexDocument: string
redirectAllRequestsTo: string
routingRules: string
websiteDomain: string
websiteEndpoint: string
StorageBucket Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The StorageBucket resource accepts the following input properties:
- Access
Key string - The access key to use when applying changes. If omitted,
storage_access_key
specified in provider config is used. - Acl string
- The predefined ACL to apply. Defaults to
private
. Conflicts withgrant
. - Bucket string
- Bucket
Prefix string - Creates a unique bucket name beginning with the specified prefix. Conflicts with
bucket
. - Cors
Rules List<StorageBucket Cors Rule> - A rule of Cross-Origin Resource Sharing (documented below).
- Force
Destroy bool - A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable.
- Grants
List<Storage
Bucket Grant> - An ACL policy grant. Conflicts with
acl
. - Lifecycle
Rules List<StorageBucket Lifecycle Rule> - A configuration of object lifecycle management (documented below).
- Loggings
List<Storage
Bucket Logging> - A settings of bucket logging (documented below).
- Policy string
- Secret
Key string - The secret key to use when applying changes. If omitted,
storage_secret_key
specified in provider config is used. - Server
Side StorageEncryption Configuration Bucket Server Side Encryption Configuration - A configuration of server-side encryption for the bucket (documented below)
- Versioning
Storage
Bucket Versioning - A state of versioning (documented below)
- Website
Storage
Bucket Website - A website object (documented below).
- Website
Domain string - The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- Website
Endpoint string - The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- Access
Key string - The access key to use when applying changes. If omitted,
storage_access_key
specified in provider config is used. - Acl string
- The predefined ACL to apply. Defaults to
private
. Conflicts withgrant
. - Bucket string
- Bucket
Prefix string - Creates a unique bucket name beginning with the specified prefix. Conflicts with
bucket
. - Cors
Rules []StorageBucket Cors Rule Args - A rule of Cross-Origin Resource Sharing (documented below).
- Force
Destroy bool - A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable.
- Grants
[]Storage
Bucket Grant Args - An ACL policy grant. Conflicts with
acl
. - Lifecycle
Rules []StorageBucket Lifecycle Rule Args - A configuration of object lifecycle management (documented below).
- Loggings
[]Storage
Bucket Logging Args - A settings of bucket logging (documented below).
- Policy string
- Secret
Key string - The secret key to use when applying changes. If omitted,
storage_secret_key
specified in provider config is used. - Server
Side StorageEncryption Configuration Bucket Server Side Encryption Configuration Args - A configuration of server-side encryption for the bucket (documented below)
- Versioning
Storage
Bucket Versioning Args - A state of versioning (documented below)
- Website
Storage
Bucket Website Args - A website object (documented below).
- Website
Domain string - The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- Website
Endpoint string - The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- access
Key String - The access key to use when applying changes. If omitted,
storage_access_key
specified in provider config is used. - acl String
- The predefined ACL to apply. Defaults to
private
. Conflicts withgrant
. - bucket String
- bucket
Prefix String - Creates a unique bucket name beginning with the specified prefix. Conflicts with
bucket
. - cors
Rules List<StorageBucket Cors Rule> - A rule of Cross-Origin Resource Sharing (documented below).
- force
Destroy Boolean - A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable.
- grants
List<Storage
Bucket Grant> - An ACL policy grant. Conflicts with
acl
. - lifecycle
Rules List<StorageBucket Lifecycle Rule> - A configuration of object lifecycle management (documented below).
- loggings
List<Storage
Bucket Logging> - A settings of bucket logging (documented below).
- policy String
- secret
Key String - The secret key to use when applying changes. If omitted,
storage_secret_key
specified in provider config is used. - server
Side StorageEncryption Configuration Bucket Server Side Encryption Configuration - A configuration of server-side encryption for the bucket (documented below)
- versioning
Storage
Bucket Versioning - A state of versioning (documented below)
- website
Storage
Bucket Website - A website object (documented below).
- website
Domain String - The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- website
Endpoint String - The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- access
Key string - The access key to use when applying changes. If omitted,
storage_access_key
specified in provider config is used. - acl string
- The predefined ACL to apply. Defaults to
private
. Conflicts withgrant
. - bucket string
- bucket
Prefix string - Creates a unique bucket name beginning with the specified prefix. Conflicts with
bucket
. - cors
Rules StorageBucket Cors Rule[] - A rule of Cross-Origin Resource Sharing (documented below).
- force
Destroy boolean - A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable.
- grants
Storage
Bucket Grant[] - An ACL policy grant. Conflicts with
acl
. - lifecycle
Rules StorageBucket Lifecycle Rule[] - A configuration of object lifecycle management (documented below).
- loggings
Storage
Bucket Logging[] - A settings of bucket logging (documented below).
- policy string
- secret
Key string - The secret key to use when applying changes. If omitted,
storage_secret_key
specified in provider config is used. - server
Side StorageEncryption Configuration Bucket Server Side Encryption Configuration - A configuration of server-side encryption for the bucket (documented below)
- versioning
Storage
Bucket Versioning - A state of versioning (documented below)
- website
Storage
Bucket Website - A website object (documented below).
- website
Domain string - The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- website
Endpoint string - The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- access_
key str - The access key to use when applying changes. If omitted,
storage_access_key
specified in provider config is used. - acl str
- The predefined ACL to apply. Defaults to
private
. Conflicts withgrant
. - bucket str
- bucket_
prefix str - Creates a unique bucket name beginning with the specified prefix. Conflicts with
bucket
. - cors_
rules Sequence[StorageBucket Cors Rule Args] - A rule of Cross-Origin Resource Sharing (documented below).
- force_
destroy bool - A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable.
- grants
Sequence[Storage
Bucket Grant Args] - An ACL policy grant. Conflicts with
acl
. - lifecycle_
rules Sequence[StorageBucket Lifecycle Rule Args] - A configuration of object lifecycle management (documented below).
- loggings
Sequence[Storage
Bucket Logging Args] - A settings of bucket logging (documented below).
- policy str
- secret_
key str - The secret key to use when applying changes. If omitted,
storage_secret_key
specified in provider config is used. - server_
side_ Storageencryption_ configuration Bucket Server Side Encryption Configuration Args - A configuration of server-side encryption for the bucket (documented below)
- versioning
Storage
Bucket Versioning Args - A state of versioning (documented below)
- website
Storage
Bucket Website Args - A website object (documented below).
- website_
domain str - The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- website_
endpoint str - The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- access
Key String - The access key to use when applying changes. If omitted,
storage_access_key
specified in provider config is used. - acl String
- The predefined ACL to apply. Defaults to
private
. Conflicts withgrant
. - bucket String
- bucket
Prefix String - Creates a unique bucket name beginning with the specified prefix. Conflicts with
bucket
. - cors
Rules List<Property Map> - A rule of Cross-Origin Resource Sharing (documented below).
- force
Destroy Boolean - A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable.
- grants List<Property Map>
- An ACL policy grant. Conflicts with
acl
. - lifecycle
Rules List<Property Map> - A configuration of object lifecycle management (documented below).
- loggings List<Property Map>
- A settings of bucket logging (documented below).
- policy String
- secret
Key String - The secret key to use when applying changes. If omitted,
storage_secret_key
specified in provider config is used. - server
Side Property MapEncryption Configuration - A configuration of server-side encryption for the bucket (documented below)
- versioning Property Map
- A state of versioning (documented below)
- website Property Map
- A website object (documented below).
- website
Domain String - The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- website
Endpoint String - The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
Outputs
All input properties are implicitly available as output properties. Additionally, the StorageBucket resource produces the following output properties:
- Bucket
Domain stringName - The bucket domain name.
- Id string
- The provider-assigned unique ID for this managed resource.
- Bucket
Domain stringName - The bucket domain name.
- Id string
- The provider-assigned unique ID for this managed resource.
- bucket
Domain StringName - The bucket domain name.
- id String
- The provider-assigned unique ID for this managed resource.
- bucket
Domain stringName - The bucket domain name.
- id string
- The provider-assigned unique ID for this managed resource.
- bucket_
domain_ strname - The bucket domain name.
- id str
- The provider-assigned unique ID for this managed resource.
- bucket
Domain StringName - The bucket domain name.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing StorageBucket Resource
Get an existing StorageBucket 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?: StorageBucketState, opts?: CustomResourceOptions): StorageBucket
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_key: Optional[str] = None,
acl: Optional[str] = None,
bucket: Optional[str] = None,
bucket_domain_name: Optional[str] = None,
bucket_prefix: Optional[str] = None,
cors_rules: Optional[Sequence[StorageBucketCorsRuleArgs]] = None,
force_destroy: Optional[bool] = None,
grants: Optional[Sequence[StorageBucketGrantArgs]] = None,
lifecycle_rules: Optional[Sequence[StorageBucketLifecycleRuleArgs]] = None,
loggings: Optional[Sequence[StorageBucketLoggingArgs]] = None,
policy: Optional[str] = None,
secret_key: Optional[str] = None,
server_side_encryption_configuration: Optional[StorageBucketServerSideEncryptionConfigurationArgs] = None,
versioning: Optional[StorageBucketVersioningArgs] = None,
website: Optional[StorageBucketWebsiteArgs] = None,
website_domain: Optional[str] = None,
website_endpoint: Optional[str] = None) -> StorageBucket
func GetStorageBucket(ctx *Context, name string, id IDInput, state *StorageBucketState, opts ...ResourceOption) (*StorageBucket, error)
public static StorageBucket Get(string name, Input<string> id, StorageBucketState? state, CustomResourceOptions? opts = null)
public static StorageBucket get(String name, Output<String> id, StorageBucketState 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.
- Access
Key string - The access key to use when applying changes. If omitted,
storage_access_key
specified in provider config is used. - Acl string
- The predefined ACL to apply. Defaults to
private
. Conflicts withgrant
. - Bucket string
- Bucket
Domain stringName - The bucket domain name.
- Bucket
Prefix string - Creates a unique bucket name beginning with the specified prefix. Conflicts with
bucket
. - Cors
Rules List<StorageBucket Cors Rule> - A rule of Cross-Origin Resource Sharing (documented below).
- Force
Destroy bool - A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable.
- Grants
List<Storage
Bucket Grant> - An ACL policy grant. Conflicts with
acl
. - Lifecycle
Rules List<StorageBucket Lifecycle Rule> - A configuration of object lifecycle management (documented below).
- Loggings
List<Storage
Bucket Logging> - A settings of bucket logging (documented below).
- Policy string
- Secret
Key string - The secret key to use when applying changes. If omitted,
storage_secret_key
specified in provider config is used. - Server
Side StorageEncryption Configuration Bucket Server Side Encryption Configuration - A configuration of server-side encryption for the bucket (documented below)
- Versioning
Storage
Bucket Versioning - A state of versioning (documented below)
- Website
Storage
Bucket Website - A website object (documented below).
- Website
Domain string - The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- Website
Endpoint string - The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- Access
Key string - The access key to use when applying changes. If omitted,
storage_access_key
specified in provider config is used. - Acl string
- The predefined ACL to apply. Defaults to
private
. Conflicts withgrant
. - Bucket string
- Bucket
Domain stringName - The bucket domain name.
- Bucket
Prefix string - Creates a unique bucket name beginning with the specified prefix. Conflicts with
bucket
. - Cors
Rules []StorageBucket Cors Rule Args - A rule of Cross-Origin Resource Sharing (documented below).
- Force
Destroy bool - A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable.
- Grants
[]Storage
Bucket Grant Args - An ACL policy grant. Conflicts with
acl
. - Lifecycle
Rules []StorageBucket Lifecycle Rule Args - A configuration of object lifecycle management (documented below).
- Loggings
[]Storage
Bucket Logging Args - A settings of bucket logging (documented below).
- Policy string
- Secret
Key string - The secret key to use when applying changes. If omitted,
storage_secret_key
specified in provider config is used. - Server
Side StorageEncryption Configuration Bucket Server Side Encryption Configuration Args - A configuration of server-side encryption for the bucket (documented below)
- Versioning
Storage
Bucket Versioning Args - A state of versioning (documented below)
- Website
Storage
Bucket Website Args - A website object (documented below).
- Website
Domain string - The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- Website
Endpoint string - The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- access
Key String - The access key to use when applying changes. If omitted,
storage_access_key
specified in provider config is used. - acl String
- The predefined ACL to apply. Defaults to
private
. Conflicts withgrant
. - bucket String
- bucket
Domain StringName - The bucket domain name.
- bucket
Prefix String - Creates a unique bucket name beginning with the specified prefix. Conflicts with
bucket
. - cors
Rules List<StorageBucket Cors Rule> - A rule of Cross-Origin Resource Sharing (documented below).
- force
Destroy Boolean - A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable.
- grants
List<Storage
Bucket Grant> - An ACL policy grant. Conflicts with
acl
. - lifecycle
Rules List<StorageBucket Lifecycle Rule> - A configuration of object lifecycle management (documented below).
- loggings
List<Storage
Bucket Logging> - A settings of bucket logging (documented below).
- policy String
- secret
Key String - The secret key to use when applying changes. If omitted,
storage_secret_key
specified in provider config is used. - server
Side StorageEncryption Configuration Bucket Server Side Encryption Configuration - A configuration of server-side encryption for the bucket (documented below)
- versioning
Storage
Bucket Versioning - A state of versioning (documented below)
- website
Storage
Bucket Website - A website object (documented below).
- website
Domain String - The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- website
Endpoint String - The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- access
Key string - The access key to use when applying changes. If omitted,
storage_access_key
specified in provider config is used. - acl string
- The predefined ACL to apply. Defaults to
private
. Conflicts withgrant
. - bucket string
- bucket
Domain stringName - The bucket domain name.
- bucket
Prefix string - Creates a unique bucket name beginning with the specified prefix. Conflicts with
bucket
. - cors
Rules StorageBucket Cors Rule[] - A rule of Cross-Origin Resource Sharing (documented below).
- force
Destroy boolean - A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable.
- grants
Storage
Bucket Grant[] - An ACL policy grant. Conflicts with
acl
. - lifecycle
Rules StorageBucket Lifecycle Rule[] - A configuration of object lifecycle management (documented below).
- loggings
Storage
Bucket Logging[] - A settings of bucket logging (documented below).
- policy string
- secret
Key string - The secret key to use when applying changes. If omitted,
storage_secret_key
specified in provider config is used. - server
Side StorageEncryption Configuration Bucket Server Side Encryption Configuration - A configuration of server-side encryption for the bucket (documented below)
- versioning
Storage
Bucket Versioning - A state of versioning (documented below)
- website
Storage
Bucket Website - A website object (documented below).
- website
Domain string - The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- website
Endpoint string - The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- access_
key str - The access key to use when applying changes. If omitted,
storage_access_key
specified in provider config is used. - acl str
- The predefined ACL to apply. Defaults to
private
. Conflicts withgrant
. - bucket str
- bucket_
domain_ strname - The bucket domain name.
- bucket_
prefix str - Creates a unique bucket name beginning with the specified prefix. Conflicts with
bucket
. - cors_
rules Sequence[StorageBucket Cors Rule Args] - A rule of Cross-Origin Resource Sharing (documented below).
- force_
destroy bool - A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable.
- grants
Sequence[Storage
Bucket Grant Args] - An ACL policy grant. Conflicts with
acl
. - lifecycle_
rules Sequence[StorageBucket Lifecycle Rule Args] - A configuration of object lifecycle management (documented below).
- loggings
Sequence[Storage
Bucket Logging Args] - A settings of bucket logging (documented below).
- policy str
- secret_
key str - The secret key to use when applying changes. If omitted,
storage_secret_key
specified in provider config is used. - server_
side_ Storageencryption_ configuration Bucket Server Side Encryption Configuration Args - A configuration of server-side encryption for the bucket (documented below)
- versioning
Storage
Bucket Versioning Args - A state of versioning (documented below)
- website
Storage
Bucket Website Args - A website object (documented below).
- website_
domain str - The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- website_
endpoint str - The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- access
Key String - The access key to use when applying changes. If omitted,
storage_access_key
specified in provider config is used. - acl String
- The predefined ACL to apply. Defaults to
private
. Conflicts withgrant
. - bucket String
- bucket
Domain StringName - The bucket domain name.
- bucket
Prefix String - Creates a unique bucket name beginning with the specified prefix. Conflicts with
bucket
. - cors
Rules List<Property Map> - A rule of Cross-Origin Resource Sharing (documented below).
- force
Destroy Boolean - A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable.
- grants List<Property Map>
- An ACL policy grant. Conflicts with
acl
. - lifecycle
Rules List<Property Map> - A configuration of object lifecycle management (documented below).
- loggings List<Property Map>
- A settings of bucket logging (documented below).
- policy String
- secret
Key String - The secret key to use when applying changes. If omitted,
storage_secret_key
specified in provider config is used. - server
Side Property MapEncryption Configuration - A configuration of server-side encryption for the bucket (documented below)
- versioning Property Map
- A state of versioning (documented below)
- website Property Map
- A website object (documented below).
- website
Domain String - The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
- website
Endpoint String - The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
Supporting Types
StorageBucketCorsRule, StorageBucketCorsRuleArgs
- Allowed
Methods List<string> - Specifies which methods are allowed. Can be
GET
,PUT
,POST
,DELETE
orHEAD
. - Allowed
Origins List<string> - Specifies which origins are allowed.
- Allowed
Headers List<string> - Specifies which headers are allowed.
- Expose
Headers List<string> - Specifies expose header in the response.
- Max
Age intSeconds - Specifies time in seconds that browser can cache the response for a preflight request.
- Allowed
Methods []string - Specifies which methods are allowed. Can be
GET
,PUT
,POST
,DELETE
orHEAD
. - Allowed
Origins []string - Specifies which origins are allowed.
- Allowed
Headers []string - Specifies which headers are allowed.
- Expose
Headers []string - Specifies expose header in the response.
- Max
Age intSeconds - Specifies time in seconds that browser can cache the response for a preflight request.
- allowed
Methods List<String> - Specifies which methods are allowed. Can be
GET
,PUT
,POST
,DELETE
orHEAD
. - allowed
Origins List<String> - Specifies which origins are allowed.
- allowed
Headers List<String> - Specifies which headers are allowed.
- expose
Headers List<String> - Specifies expose header in the response.
- max
Age IntegerSeconds - Specifies time in seconds that browser can cache the response for a preflight request.
- allowed
Methods string[] - Specifies which methods are allowed. Can be
GET
,PUT
,POST
,DELETE
orHEAD
. - allowed
Origins string[] - Specifies which origins are allowed.
- allowed
Headers string[] - Specifies which headers are allowed.
- expose
Headers string[] - Specifies expose header in the response.
- max
Age numberSeconds - Specifies time in seconds that browser can cache the response for a preflight request.
- allowed_
methods Sequence[str] - Specifies which methods are allowed. Can be
GET
,PUT
,POST
,DELETE
orHEAD
. - allowed_
origins Sequence[str] - Specifies which origins are allowed.
- allowed_
headers Sequence[str] - Specifies which headers are allowed.
- expose_
headers Sequence[str] - Specifies expose header in the response.
- max_
age_ intseconds - Specifies time in seconds that browser can cache the response for a preflight request.
- allowed
Methods List<String> - Specifies which methods are allowed. Can be
GET
,PUT
,POST
,DELETE
orHEAD
. - allowed
Origins List<String> - Specifies which origins are allowed.
- allowed
Headers List<String> - Specifies which headers are allowed.
- expose
Headers List<String> - Specifies expose header in the response.
- max
Age NumberSeconds - Specifies time in seconds that browser can cache the response for a preflight request.
StorageBucketGrant, StorageBucketGrantArgs
- Permissions List<string>
- Type string
- Id string
- Unique identifier for the rule. Must be less than or equal to 255 characters in length.
- Uri string
- Permissions []string
- Type string
- Id string
- Unique identifier for the rule. Must be less than or equal to 255 characters in length.
- Uri string
- permissions List<String>
- type String
- id String
- Unique identifier for the rule. Must be less than or equal to 255 characters in length.
- uri String
- permissions string[]
- type string
- id string
- Unique identifier for the rule. Must be less than or equal to 255 characters in length.
- uri string
- permissions Sequence[str]
- type str
- id str
- Unique identifier for the rule. Must be less than or equal to 255 characters in length.
- uri str
- permissions List<String>
- type String
- id String
- Unique identifier for the rule. Must be less than or equal to 255 characters in length.
- uri String
StorageBucketLifecycleRule, StorageBucketLifecycleRuleArgs
- Enabled bool
- Specifies lifecycle rule status.
- Abort
Incomplete intMultipart Upload Days - Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
- Expiration
Storage
Bucket Lifecycle Rule Expiration - Specifies a period in the object's expire (documented below).
- Id string
- Unique identifier for the rule. Must be less than or equal to 255 characters in length.
- Noncurrent
Version StorageExpiration Bucket Lifecycle Rule Noncurrent Version Expiration - Specifies when noncurrent object versions expire (documented below).
- Noncurrent
Version List<StorageTransitions Bucket Lifecycle Rule Noncurrent Version Transition> - Specifies when noncurrent object versions transitions (documented below).
- Prefix string
- Object key prefix identifying one or more objects to which the rule applies.
- Transitions
List<Storage
Bucket Lifecycle Rule Transition> - Specifies a period in the object's transitions (documented below).
- Enabled bool
- Specifies lifecycle rule status.
- Abort
Incomplete intMultipart Upload Days - Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
- Expiration
Storage
Bucket Lifecycle Rule Expiration - Specifies a period in the object's expire (documented below).
- Id string
- Unique identifier for the rule. Must be less than or equal to 255 characters in length.
- Noncurrent
Version StorageExpiration Bucket Lifecycle Rule Noncurrent Version Expiration - Specifies when noncurrent object versions expire (documented below).
- Noncurrent
Version []StorageTransitions Bucket Lifecycle Rule Noncurrent Version Transition - Specifies when noncurrent object versions transitions (documented below).
- Prefix string
- Object key prefix identifying one or more objects to which the rule applies.
- Transitions
[]Storage
Bucket Lifecycle Rule Transition - Specifies a period in the object's transitions (documented below).
- enabled Boolean
- Specifies lifecycle rule status.
- abort
Incomplete IntegerMultipart Upload Days - Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
- expiration
Storage
Bucket Lifecycle Rule Expiration - Specifies a period in the object's expire (documented below).
- id String
- Unique identifier for the rule. Must be less than or equal to 255 characters in length.
- noncurrent
Version StorageExpiration Bucket Lifecycle Rule Noncurrent Version Expiration - Specifies when noncurrent object versions expire (documented below).
- noncurrent
Version List<StorageTransitions Bucket Lifecycle Rule Noncurrent Version Transition> - Specifies when noncurrent object versions transitions (documented below).
- prefix String
- Object key prefix identifying one or more objects to which the rule applies.
- transitions
List<Storage
Bucket Lifecycle Rule Transition> - Specifies a period in the object's transitions (documented below).
- enabled boolean
- Specifies lifecycle rule status.
- abort
Incomplete numberMultipart Upload Days - Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
- expiration
Storage
Bucket Lifecycle Rule Expiration - Specifies a period in the object's expire (documented below).
- id string
- Unique identifier for the rule. Must be less than or equal to 255 characters in length.
- noncurrent
Version StorageExpiration Bucket Lifecycle Rule Noncurrent Version Expiration - Specifies when noncurrent object versions expire (documented below).
- noncurrent
Version StorageTransitions Bucket Lifecycle Rule Noncurrent Version Transition[] - Specifies when noncurrent object versions transitions (documented below).
- prefix string
- Object key prefix identifying one or more objects to which the rule applies.
- transitions
Storage
Bucket Lifecycle Rule Transition[] - Specifies a period in the object's transitions (documented below).
- enabled bool
- Specifies lifecycle rule status.
- abort_
incomplete_ intmultipart_ upload_ days - Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
- expiration
Storage
Bucket Lifecycle Rule Expiration - Specifies a period in the object's expire (documented below).
- id str
- Unique identifier for the rule. Must be less than or equal to 255 characters in length.
- noncurrent_
version_ Storageexpiration Bucket Lifecycle Rule Noncurrent Version Expiration - Specifies when noncurrent object versions expire (documented below).
- noncurrent_
version_ Sequence[Storagetransitions Bucket Lifecycle Rule Noncurrent Version Transition] - Specifies when noncurrent object versions transitions (documented below).
- prefix str
- Object key prefix identifying one or more objects to which the rule applies.
- transitions
Sequence[Storage
Bucket Lifecycle Rule Transition] - Specifies a period in the object's transitions (documented below).
- enabled Boolean
- Specifies lifecycle rule status.
- abort
Incomplete NumberMultipart Upload Days - Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
- expiration Property Map
- Specifies a period in the object's expire (documented below).
- id String
- Unique identifier for the rule. Must be less than or equal to 255 characters in length.
- noncurrent
Version Property MapExpiration - Specifies when noncurrent object versions expire (documented below).
- noncurrent
Version List<Property Map>Transitions - Specifies when noncurrent object versions transitions (documented below).
- prefix String
- Object key prefix identifying one or more objects to which the rule applies.
- transitions List<Property Map>
- Specifies a period in the object's transitions (documented below).
StorageBucketLifecycleRuleExpiration, StorageBucketLifecycleRuleExpirationArgs
- Date string
- Specifies the date after which you want the corresponding action to take effect.
- Days int
- Specifies the number of days after object creation when the specific rule action takes effect.
- Expired
Object boolDelete Marker - On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct Object Storage to delete expired object delete markers.
- Date string
- Specifies the date after which you want the corresponding action to take effect.
- Days int
- Specifies the number of days after object creation when the specific rule action takes effect.
- Expired
Object boolDelete Marker - On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct Object Storage to delete expired object delete markers.
- date String
- Specifies the date after which you want the corresponding action to take effect.
- days Integer
- Specifies the number of days after object creation when the specific rule action takes effect.
- expired
Object BooleanDelete Marker - On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct Object Storage to delete expired object delete markers.
- date string
- Specifies the date after which you want the corresponding action to take effect.
- days number
- Specifies the number of days after object creation when the specific rule action takes effect.
- expired
Object booleanDelete Marker - On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct Object Storage to delete expired object delete markers.
- date str
- Specifies the date after which you want the corresponding action to take effect.
- days int
- Specifies the number of days after object creation when the specific rule action takes effect.
- expired_
object_ booldelete_ marker - On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct Object Storage to delete expired object delete markers.
- date String
- Specifies the date after which you want the corresponding action to take effect.
- days Number
- Specifies the number of days after object creation when the specific rule action takes effect.
- expired
Object BooleanDelete Marker - On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct Object Storage to delete expired object delete markers.
StorageBucketLifecycleRuleNoncurrentVersionExpiration, StorageBucketLifecycleRuleNoncurrentVersionExpirationArgs
- Days int
- Specifies the number of days noncurrent object versions expire.
- Days int
- Specifies the number of days noncurrent object versions expire.
- days Integer
- Specifies the number of days noncurrent object versions expire.
- days number
- Specifies the number of days noncurrent object versions expire.
- days int
- Specifies the number of days noncurrent object versions expire.
- days Number
- Specifies the number of days noncurrent object versions expire.
StorageBucketLifecycleRuleNoncurrentVersionTransition, StorageBucketLifecycleRuleNoncurrentVersionTransitionArgs
- Storage
Class string - Specifies the storage class to which you want the noncurrent object versions to transition. Can only be
COLD
orSTANDARD_IA
. - Days int
- Specifies the number of days noncurrent object versions transition.
- Storage
Class string - Specifies the storage class to which you want the noncurrent object versions to transition. Can only be
COLD
orSTANDARD_IA
. - Days int
- Specifies the number of days noncurrent object versions transition.
- storage
Class String - Specifies the storage class to which you want the noncurrent object versions to transition. Can only be
COLD
orSTANDARD_IA
. - days Integer
- Specifies the number of days noncurrent object versions transition.
- storage
Class string - Specifies the storage class to which you want the noncurrent object versions to transition. Can only be
COLD
orSTANDARD_IA
. - days number
- Specifies the number of days noncurrent object versions transition.
- storage_
class str - Specifies the storage class to which you want the noncurrent object versions to transition. Can only be
COLD
orSTANDARD_IA
. - days int
- Specifies the number of days noncurrent object versions transition.
- storage
Class String - Specifies the storage class to which you want the noncurrent object versions to transition. Can only be
COLD
orSTANDARD_IA
. - days Number
- Specifies the number of days noncurrent object versions transition.
StorageBucketLifecycleRuleTransition, StorageBucketLifecycleRuleTransitionArgs
- Storage
Class string - Specifies the storage class to which you want the object to transition. Can only be
COLD
orSTANDARD_IA
. - Date string
- Specifies the date after which you want the corresponding action to take effect.
- Days int
- Specifies the number of days after object creation when the specific rule action takes effect.
- Storage
Class string - Specifies the storage class to which you want the object to transition. Can only be
COLD
orSTANDARD_IA
. - Date string
- Specifies the date after which you want the corresponding action to take effect.
- Days int
- Specifies the number of days after object creation when the specific rule action takes effect.
- storage
Class String - Specifies the storage class to which you want the object to transition. Can only be
COLD
orSTANDARD_IA
. - date String
- Specifies the date after which you want the corresponding action to take effect.
- days Integer
- Specifies the number of days after object creation when the specific rule action takes effect.
- storage
Class string - Specifies the storage class to which you want the object to transition. Can only be
COLD
orSTANDARD_IA
. - date string
- Specifies the date after which you want the corresponding action to take effect.
- days number
- Specifies the number of days after object creation when the specific rule action takes effect.
- storage_
class str - Specifies the storage class to which you want the object to transition. Can only be
COLD
orSTANDARD_IA
. - date str
- Specifies the date after which you want the corresponding action to take effect.
- days int
- Specifies the number of days after object creation when the specific rule action takes effect.
- storage
Class String - Specifies the storage class to which you want the object to transition. Can only be
COLD
orSTANDARD_IA
. - date String
- Specifies the date after which you want the corresponding action to take effect.
- days Number
- Specifies the number of days after object creation when the specific rule action takes effect.
StorageBucketLogging, StorageBucketLoggingArgs
- Target
Bucket string - The name of the bucket that will receive the log objects.
- Target
Prefix string - To specify a key prefix for log objects.
- Target
Bucket string - The name of the bucket that will receive the log objects.
- Target
Prefix string - To specify a key prefix for log objects.
- target
Bucket String - The name of the bucket that will receive the log objects.
- target
Prefix String - To specify a key prefix for log objects.
- target
Bucket string - The name of the bucket that will receive the log objects.
- target
Prefix string - To specify a key prefix for log objects.
- target_
bucket str - The name of the bucket that will receive the log objects.
- target_
prefix str - To specify a key prefix for log objects.
- target
Bucket String - The name of the bucket that will receive the log objects.
- target
Prefix String - To specify a key prefix for log objects.
StorageBucketServerSideEncryptionConfiguration, StorageBucketServerSideEncryptionConfigurationArgs
- Rule
Storage
Bucket Server Side Encryption Configuration Rule - A single object for server-side encryption by default configuration. (documented below)
- Rule
Storage
Bucket Server Side Encryption Configuration Rule - A single object for server-side encryption by default configuration. (documented below)
- rule
Storage
Bucket Server Side Encryption Configuration Rule - A single object for server-side encryption by default configuration. (documented below)
- rule
Storage
Bucket Server Side Encryption Configuration Rule - A single object for server-side encryption by default configuration. (documented below)
- rule
Storage
Bucket Server Side Encryption Configuration Rule - A single object for server-side encryption by default configuration. (documented below)
- rule Property Map
- A single object for server-side encryption by default configuration. (documented below)
StorageBucketServerSideEncryptionConfigurationRule, StorageBucketServerSideEncryptionConfigurationRuleArgs
- Apply
Server StorageSide Encryption By Default Bucket Server Side Encryption Configuration Rule Apply Server Side Encryption By Default - A single object for setting server-side encryption by default. (documented below)
- Apply
Server StorageSide Encryption By Default Bucket Server Side Encryption Configuration Rule Apply Server Side Encryption By Default - A single object for setting server-side encryption by default. (documented below)
- apply
Server StorageSide Encryption By Default Bucket Server Side Encryption Configuration Rule Apply Server Side Encryption By Default - A single object for setting server-side encryption by default. (documented below)
- apply
Server StorageSide Encryption By Default Bucket Server Side Encryption Configuration Rule Apply Server Side Encryption By Default - A single object for setting server-side encryption by default. (documented below)
- apply_
server_ Storageside_ encryption_ by_ default Bucket Server Side Encryption Configuration Rule Apply Server Side Encryption By Default - A single object for setting server-side encryption by default. (documented below)
- apply
Server Property MapSide Encryption By Default - A single object for setting server-side encryption by default. (documented below)
StorageBucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefault, StorageBucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultArgs
- Kms
Master stringKey Id - The KMS master key ID used for the SSE-KMS encryption.
- Sse
Algorithm string - The server-side encryption algorithm to use. Single valid value is
aws:kms
- Kms
Master stringKey Id - The KMS master key ID used for the SSE-KMS encryption.
- Sse
Algorithm string - The server-side encryption algorithm to use. Single valid value is
aws:kms
- kms
Master StringKey Id - The KMS master key ID used for the SSE-KMS encryption.
- sse
Algorithm String - The server-side encryption algorithm to use. Single valid value is
aws:kms
- kms
Master stringKey Id - The KMS master key ID used for the SSE-KMS encryption.
- sse
Algorithm string - The server-side encryption algorithm to use. Single valid value is
aws:kms
- kms_
master_ strkey_ id - The KMS master key ID used for the SSE-KMS encryption.
- sse_
algorithm str - The server-side encryption algorithm to use. Single valid value is
aws:kms
- kms
Master StringKey Id - The KMS master key ID used for the SSE-KMS encryption.
- sse
Algorithm String - The server-side encryption algorithm to use. Single valid value is
aws:kms
StorageBucketVersioning, StorageBucketVersioningArgs
- Enabled bool
- Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket.
- Enabled bool
- Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket.
- enabled Boolean
- Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket.
- enabled boolean
- Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket.
- enabled bool
- Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket.
- enabled Boolean
- Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket.
StorageBucketWebsite, StorageBucketWebsiteArgs
- Error
Document string - An absolute path to the document to return in case of a 4XX error.
- Index
Document string - Storage returns this index document when requests are made to the root domain or any of the subfolders.
- Redirect
All stringRequests To - A hostname to redirect all website requests for this bucket to. Hostname can optionally be prefixed with a protocol (
http://
orhttps://
) to use when redirecting requests. The default is the protocol that is used in the original request. - Routing
Rules string - A json array containing routing rules describing redirect behavior and when redirects are applied.
- Error
Document string - An absolute path to the document to return in case of a 4XX error.
- Index
Document string - Storage returns this index document when requests are made to the root domain or any of the subfolders.
- Redirect
All stringRequests To - A hostname to redirect all website requests for this bucket to. Hostname can optionally be prefixed with a protocol (
http://
orhttps://
) to use when redirecting requests. The default is the protocol that is used in the original request. - Routing
Rules string - A json array containing routing rules describing redirect behavior and when redirects are applied.
- error
Document String - An absolute path to the document to return in case of a 4XX error.
- index
Document String - Storage returns this index document when requests are made to the root domain or any of the subfolders.
- redirect
All StringRequests To - A hostname to redirect all website requests for this bucket to. Hostname can optionally be prefixed with a protocol (
http://
orhttps://
) to use when redirecting requests. The default is the protocol that is used in the original request. - routing
Rules String - A json array containing routing rules describing redirect behavior and when redirects are applied.
- error
Document string - An absolute path to the document to return in case of a 4XX error.
- index
Document string - Storage returns this index document when requests are made to the root domain or any of the subfolders.
- redirect
All stringRequests To - A hostname to redirect all website requests for this bucket to. Hostname can optionally be prefixed with a protocol (
http://
orhttps://
) to use when redirecting requests. The default is the protocol that is used in the original request. - routing
Rules string - A json array containing routing rules describing redirect behavior and when redirects are applied.
- error_
document str - An absolute path to the document to return in case of a 4XX error.
- index_
document str - Storage returns this index document when requests are made to the root domain or any of the subfolders.
- redirect_
all_ strrequests_ to - A hostname to redirect all website requests for this bucket to. Hostname can optionally be prefixed with a protocol (
http://
orhttps://
) to use when redirecting requests. The default is the protocol that is used in the original request. - routing_
rules str - A json array containing routing rules describing redirect behavior and when redirects are applied.
- error
Document String - An absolute path to the document to return in case of a 4XX error.
- index
Document String - Storage returns this index document when requests are made to the root domain or any of the subfolders.
- redirect
All StringRequests To - A hostname to redirect all website requests for this bucket to. Hostname can optionally be prefixed with a protocol (
http://
orhttps://
) to use when redirecting requests. The default is the protocol that is used in the original request. - routing
Rules String - A json array containing routing rules describing redirect behavior and when redirects are applied.
Import
Storage bucket can be imported using the bucket
, e.g.
$ pulumi import yandex:index/storageBucket:StorageBucket bucket bucket-name
false
in state. If you’ve set it to true
in config, run terraform apply
to update the value set in state. If you delete this resource before updating the value, objects in the bucket will not be destroyed.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Yandex pulumi/pulumi-yandex
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
yandex
Terraform Provider.