Yandex

Pulumi Official
Package maintained by Pulumi
v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

StorageBucket

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 a StorageBucket Resource

new StorageBucket(name: string, args?: StorageBucketArgs, opts?: CustomResourceOptions);
@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)
@overload
def StorageBucket(resource_name: str,
                  args: Optional[StorageBucketArgs] = None,
                  opts: Optional[ResourceOptions] = 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.

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.

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:

AccessKey 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 with grant.

Bucket string
BucketPrefix string

Creates a unique bucket name beginning with the specified prefix. Conflicts with bucket.

CorsRules List<StorageBucketCorsRuleArgs>

A rule of Cross-Origin Resource Sharing (documented below).

ForceDestroy 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<StorageBucketGrantArgs>

An ACL policy grant. Conflicts with acl.

LifecycleRules List<StorageBucketLifecycleRuleArgs>

A configuration of object lifecycle management (documented below).

Loggings List<StorageBucketLoggingArgs>

A settings of bucket logging (documented below).

Policy string
SecretKey string

The secret key to use when applying changes. If omitted, storage_secret_key specified in provider config is used.

ServerSideEncryptionConfiguration StorageBucketServerSideEncryptionConfigurationArgs

A configuration of server-side encryption for the bucket (documented below)

Versioning StorageBucketVersioningArgs

A state of versioning (documented below)

Website StorageBucketWebsiteArgs

A website object (documented below).

WebsiteDomain string

The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

WebsiteEndpoint string

The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

AccessKey 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 with grant.

Bucket string
BucketPrefix string

Creates a unique bucket name beginning with the specified prefix. Conflicts with bucket.

CorsRules []StorageBucketCorsRuleArgs

A rule of Cross-Origin Resource Sharing (documented below).

ForceDestroy 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 []StorageBucketGrantArgs

An ACL policy grant. Conflicts with acl.

LifecycleRules []StorageBucketLifecycleRuleArgs

A configuration of object lifecycle management (documented below).

Loggings []StorageBucketLoggingArgs

A settings of bucket logging (documented below).

Policy string
SecretKey string

The secret key to use when applying changes. If omitted, storage_secret_key specified in provider config is used.

ServerSideEncryptionConfiguration StorageBucketServerSideEncryptionConfigurationArgs

A configuration of server-side encryption for the bucket (documented below)

Versioning StorageBucketVersioningArgs

A state of versioning (documented below)

Website StorageBucketWebsiteArgs

A website object (documented below).

WebsiteDomain string

The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

WebsiteEndpoint string

The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

accessKey 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 with grant.

bucket String
bucketPrefix String

Creates a unique bucket name beginning with the specified prefix. Conflicts with bucket.

corsRules ListBucketCorsRuleArgs>

A rule of Cross-Origin Resource Sharing (documented below).

forceDestroy 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 ListBucketGrantArgs>

An ACL policy grant. Conflicts with acl.

lifecycleRules ListBucketLifecycleRuleArgs>

A configuration of object lifecycle management (documented below).

loggings ListBucketLoggingArgs>

A settings of bucket logging (documented below).

policy String
secretKey String

The secret key to use when applying changes. If omitted, storage_secret_key specified in provider config is used.

serverSideEncryptionConfiguration StorageBucketServerSideEncryptionConfigurationArgs

A configuration of server-side encryption for the bucket (documented below)

versioning StorageBucketVersioningArgs

A state of versioning (documented below)

website StorageBucketWebsiteArgs

A website object (documented below).

websiteDomain String

The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

websiteEndpoint String

The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

accessKey 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 with grant.

bucket string
bucketPrefix string

Creates a unique bucket name beginning with the specified prefix. Conflicts with bucket.

corsRules StorageBucketCorsRuleArgs[]

A rule of Cross-Origin Resource Sharing (documented below).

forceDestroy 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 StorageBucketGrantArgs[]

An ACL policy grant. Conflicts with acl.

lifecycleRules StorageBucketLifecycleRuleArgs[]

A configuration of object lifecycle management (documented below).

loggings StorageBucketLoggingArgs[]

A settings of bucket logging (documented below).

policy string
secretKey string

The secret key to use when applying changes. If omitted, storage_secret_key specified in provider config is used.

serverSideEncryptionConfiguration StorageBucketServerSideEncryptionConfigurationArgs

A configuration of server-side encryption for the bucket (documented below)

versioning StorageBucketVersioningArgs

A state of versioning (documented below)

website StorageBucketWebsiteArgs

A website object (documented below).

websiteDomain string

The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

websiteEndpoint 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 with grant.

bucket str
bucket_prefix str

Creates a unique bucket name beginning with the specified prefix. Conflicts with bucket.

cors_rules Sequence[StorageBucketCorsRuleArgs]

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[StorageBucketGrantArgs]

An ACL policy grant. Conflicts with acl.

lifecycle_rules Sequence[StorageBucketLifecycleRuleArgs]

A configuration of object lifecycle management (documented below).

loggings Sequence[StorageBucketLoggingArgs]

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_encryption_configuration StorageBucketServerSideEncryptionConfigurationArgs

A configuration of server-side encryption for the bucket (documented below)

versioning StorageBucketVersioningArgs

A state of versioning (documented below)

website StorageBucketWebsiteArgs

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.

accessKey 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 with grant.

bucket String
bucketPrefix String

Creates a unique bucket name beginning with the specified prefix. Conflicts with bucket.

corsRules List

A rule of Cross-Origin Resource Sharing (documented below).

forceDestroy 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

An ACL policy grant. Conflicts with acl.

lifecycleRules List

A configuration of object lifecycle management (documented below).

loggings List

A settings of bucket logging (documented below).

policy String
secretKey String

The secret key to use when applying changes. If omitted, storage_secret_key specified in provider config is used.

serverSideEncryptionConfiguration Property Map

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).

websiteDomain String

The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

websiteEndpoint 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:

BucketDomainName string

The bucket domain name.

Id string

The provider-assigned unique ID for this managed resource.

BucketDomainName string

The bucket domain name.

Id string

The provider-assigned unique ID for this managed resource.

bucketDomainName String

The bucket domain name.

id String

The provider-assigned unique ID for this managed resource.

bucketDomainName string

The bucket domain name.

id string

The provider-assigned unique ID for this managed resource.

bucket_domain_name str

The bucket domain name.

id str

The provider-assigned unique ID for this managed resource.

bucketDomainName String

The bucket domain name.

id String

The provider-assigned unique ID for this managed resource.

Look up an 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.
The following state arguments are supported:
AccessKey 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 with grant.

Bucket string
BucketDomainName string

The bucket domain name.

BucketPrefix string

Creates a unique bucket name beginning with the specified prefix. Conflicts with bucket.

CorsRules List<StorageBucketCorsRuleArgs>

A rule of Cross-Origin Resource Sharing (documented below).

ForceDestroy 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<StorageBucketGrantArgs>

An ACL policy grant. Conflicts with acl.

LifecycleRules List<StorageBucketLifecycleRuleArgs>

A configuration of object lifecycle management (documented below).

Loggings List<StorageBucketLoggingArgs>

A settings of bucket logging (documented below).

Policy string
SecretKey string

The secret key to use when applying changes. If omitted, storage_secret_key specified in provider config is used.

ServerSideEncryptionConfiguration StorageBucketServerSideEncryptionConfigurationArgs

A configuration of server-side encryption for the bucket (documented below)

Versioning StorageBucketVersioningArgs

A state of versioning (documented below)

Website StorageBucketWebsiteArgs

A website object (documented below).

WebsiteDomain string

The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

WebsiteEndpoint string

The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

AccessKey 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 with grant.

Bucket string
BucketDomainName string

The bucket domain name.

BucketPrefix string

Creates a unique bucket name beginning with the specified prefix. Conflicts with bucket.

CorsRules []StorageBucketCorsRuleArgs

A rule of Cross-Origin Resource Sharing (documented below).

ForceDestroy 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 []StorageBucketGrantArgs

An ACL policy grant. Conflicts with acl.

LifecycleRules []StorageBucketLifecycleRuleArgs

A configuration of object lifecycle management (documented below).

Loggings []StorageBucketLoggingArgs

A settings of bucket logging (documented below).

Policy string
SecretKey string

The secret key to use when applying changes. If omitted, storage_secret_key specified in provider config is used.

ServerSideEncryptionConfiguration StorageBucketServerSideEncryptionConfigurationArgs

A configuration of server-side encryption for the bucket (documented below)

Versioning StorageBucketVersioningArgs

A state of versioning (documented below)

Website StorageBucketWebsiteArgs

A website object (documented below).

WebsiteDomain string

The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

WebsiteEndpoint string

The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

accessKey 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 with grant.

bucket String
bucketDomainName String

The bucket domain name.

bucketPrefix String

Creates a unique bucket name beginning with the specified prefix. Conflicts with bucket.

corsRules ListBucketCorsRuleArgs>

A rule of Cross-Origin Resource Sharing (documented below).

forceDestroy 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 ListBucketGrantArgs>

An ACL policy grant. Conflicts with acl.

lifecycleRules ListBucketLifecycleRuleArgs>

A configuration of object lifecycle management (documented below).

loggings ListBucketLoggingArgs>

A settings of bucket logging (documented below).

policy String
secretKey String

The secret key to use when applying changes. If omitted, storage_secret_key specified in provider config is used.

serverSideEncryptionConfiguration StorageBucketServerSideEncryptionConfigurationArgs

A configuration of server-side encryption for the bucket (documented below)

versioning StorageBucketVersioningArgs

A state of versioning (documented below)

website StorageBucketWebsiteArgs

A website object (documented below).

websiteDomain String

The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

websiteEndpoint String

The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

accessKey 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 with grant.

bucket string
bucketDomainName string

The bucket domain name.

bucketPrefix string

Creates a unique bucket name beginning with the specified prefix. Conflicts with bucket.

corsRules StorageBucketCorsRuleArgs[]

A rule of Cross-Origin Resource Sharing (documented below).

forceDestroy 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 StorageBucketGrantArgs[]

An ACL policy grant. Conflicts with acl.

lifecycleRules StorageBucketLifecycleRuleArgs[]

A configuration of object lifecycle management (documented below).

loggings StorageBucketLoggingArgs[]

A settings of bucket logging (documented below).

policy string
secretKey string

The secret key to use when applying changes. If omitted, storage_secret_key specified in provider config is used.

serverSideEncryptionConfiguration StorageBucketServerSideEncryptionConfigurationArgs

A configuration of server-side encryption for the bucket (documented below)

versioning StorageBucketVersioningArgs

A state of versioning (documented below)

website StorageBucketWebsiteArgs

A website object (documented below).

websiteDomain string

The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

websiteEndpoint 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 with grant.

bucket str
bucket_domain_name str

The bucket domain name.

bucket_prefix str

Creates a unique bucket name beginning with the specified prefix. Conflicts with bucket.

cors_rules Sequence[StorageBucketCorsRuleArgs]

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[StorageBucketGrantArgs]

An ACL policy grant. Conflicts with acl.

lifecycle_rules Sequence[StorageBucketLifecycleRuleArgs]

A configuration of object lifecycle management (documented below).

loggings Sequence[StorageBucketLoggingArgs]

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_encryption_configuration StorageBucketServerSideEncryptionConfigurationArgs

A configuration of server-side encryption for the bucket (documented below)

versioning StorageBucketVersioningArgs

A state of versioning (documented below)

website StorageBucketWebsiteArgs

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.

accessKey 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 with grant.

bucket String
bucketDomainName String

The bucket domain name.

bucketPrefix String

Creates a unique bucket name beginning with the specified prefix. Conflicts with bucket.

corsRules List

A rule of Cross-Origin Resource Sharing (documented below).

forceDestroy 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

An ACL policy grant. Conflicts with acl.

lifecycleRules List

A configuration of object lifecycle management (documented below).

loggings List

A settings of bucket logging (documented below).

policy String
secretKey String

The secret key to use when applying changes. If omitted, storage_secret_key specified in provider config is used.

serverSideEncryptionConfiguration Property Map

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).

websiteDomain String

The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

websiteEndpoint String

The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

Supporting Types

StorageBucketCorsRule

AllowedMethods List<string>

Specifies which methods are allowed. Can be GET, PUT, POST, DELETE or HEAD.

AllowedOrigins List<string>

Specifies which origins are allowed.

AllowedHeaders List<string>

Specifies which headers are allowed.

ExposeHeaders List<string>

Specifies expose header in the response.

MaxAgeSeconds int

Specifies time in seconds that browser can cache the response for a preflight request.

AllowedMethods []string

Specifies which methods are allowed. Can be GET, PUT, POST, DELETE or HEAD.

AllowedOrigins []string

Specifies which origins are allowed.

AllowedHeaders []string

Specifies which headers are allowed.

ExposeHeaders []string

Specifies expose header in the response.

MaxAgeSeconds int

Specifies time in seconds that browser can cache the response for a preflight request.

allowedMethods List

Specifies which methods are allowed. Can be GET, PUT, POST, DELETE or HEAD.

allowedOrigins List

Specifies which origins are allowed.

allowedHeaders List

Specifies which headers are allowed.

exposeHeaders List

Specifies expose header in the response.

maxAgeSeconds Integer

Specifies time in seconds that browser can cache the response for a preflight request.

allowedMethods string[]

Specifies which methods are allowed. Can be GET, PUT, POST, DELETE or HEAD.

allowedOrigins string[]

Specifies which origins are allowed.

allowedHeaders string[]

Specifies which headers are allowed.

exposeHeaders string[]

Specifies expose header in the response.

maxAgeSeconds number

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 or HEAD.

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_seconds int

Specifies time in seconds that browser can cache the response for a preflight request.

allowedMethods List

Specifies which methods are allowed. Can be GET, PUT, POST, DELETE or HEAD.

allowedOrigins List

Specifies which origins are allowed.

allowedHeaders List

Specifies which headers are allowed.

exposeHeaders List

Specifies expose header in the response.

maxAgeSeconds Number

Specifies time in seconds that browser can cache the response for a preflight request.

StorageBucketGrant

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
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
type String
id String

Unique identifier for the rule. Must be less than or equal to 255 characters in length.

uri String

StorageBucketLifecycleRule

Enabled bool

Specifies lifecycle rule status.

AbortIncompleteMultipartUploadDays int

Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.

Expiration StorageBucketLifecycleRuleExpiration

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.

NoncurrentVersionExpiration StorageBucketLifecycleRuleNoncurrentVersionExpiration

Specifies when noncurrent object versions expire (documented below).

NoncurrentVersionTransitions List<StorageBucketLifecycleRuleNoncurrentVersionTransition>

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<StorageBucketLifecycleRuleTransition>

Specifies a period in the object's transitions (documented below).

Enabled bool

Specifies lifecycle rule status.

AbortIncompleteMultipartUploadDays int

Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.

Expiration StorageBucketLifecycleRuleExpiration

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.

NoncurrentVersionExpiration StorageBucketLifecycleRuleNoncurrentVersionExpiration

Specifies when noncurrent object versions expire (documented below).

NoncurrentVersionTransitions []StorageBucketLifecycleRuleNoncurrentVersionTransition

Specifies when noncurrent object versions transitions (documented below).

Prefix string

Object key prefix identifying one or more objects to which the rule applies.

Transitions []StorageBucketLifecycleRuleTransition

Specifies a period in the object's transitions (documented below).

enabled Boolean

Specifies lifecycle rule status.

abortIncompleteMultipartUploadDays Integer

Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.

expiration StorageBucketLifecycleRuleExpiration

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.

noncurrentVersionExpiration StorageBucketLifecycleRuleNoncurrentVersionExpiration

Specifies when noncurrent object versions expire (documented below).

noncurrentVersionTransitions ListBucketLifecycleRuleNoncurrentVersionTransition>

Specifies when noncurrent object versions transitions (documented below).

prefix String

Object key prefix identifying one or more objects to which the rule applies.

transitions ListBucketLifecycleRuleTransition>

Specifies a period in the object's transitions (documented below).

enabled boolean

Specifies lifecycle rule status.

abortIncompleteMultipartUploadDays number

Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.

expiration StorageBucketLifecycleRuleExpiration

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.

noncurrentVersionExpiration StorageBucketLifecycleRuleNoncurrentVersionExpiration

Specifies when noncurrent object versions expire (documented below).

noncurrentVersionTransitions StorageBucketLifecycleRuleNoncurrentVersionTransition[]

Specifies when noncurrent object versions transitions (documented below).

prefix string

Object key prefix identifying one or more objects to which the rule applies.

transitions StorageBucketLifecycleRuleTransition[]

Specifies a period in the object's transitions (documented below).

enabled bool

Specifies lifecycle rule status.

abort_incomplete_multipart_upload_days int

Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.

expiration StorageBucketLifecycleRuleExpiration

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_expiration StorageBucketLifecycleRuleNoncurrentVersionExpiration

Specifies when noncurrent object versions expire (documented below).

noncurrent_version_transitions Sequence[StorageBucketLifecycleRuleNoncurrentVersionTransition]

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[StorageBucketLifecycleRuleTransition]

Specifies a period in the object's transitions (documented below).

enabled Boolean

Specifies lifecycle rule status.

abortIncompleteMultipartUploadDays Number

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.

noncurrentVersionExpiration Property Map

Specifies when noncurrent object versions expire (documented below).

noncurrentVersionTransitions List

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

Specifies a period in the object's transitions (documented below).

StorageBucketLifecycleRuleExpiration

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.

ExpiredObjectDeleteMarker bool

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.

ExpiredObjectDeleteMarker bool

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.

expiredObjectDeleteMarker Boolean

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.

expiredObjectDeleteMarker boolean

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_delete_marker bool

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.

expiredObjectDeleteMarker Boolean

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

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

StorageClass string

Specifies the storage class to which you want the noncurrent object versions to transition. Can only be COLD or STANDARD_IA.

Days int

Specifies the number of days noncurrent object versions transition.

StorageClass string

Specifies the storage class to which you want the noncurrent object versions to transition. Can only be COLD or STANDARD_IA.

Days int

Specifies the number of days noncurrent object versions transition.

storageClass String

Specifies the storage class to which you want the noncurrent object versions to transition. Can only be COLD or STANDARD_IA.

days Integer

Specifies the number of days noncurrent object versions transition.

storageClass string

Specifies the storage class to which you want the noncurrent object versions to transition. Can only be COLD or STANDARD_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 or STANDARD_IA.

days int

Specifies the number of days noncurrent object versions transition.

storageClass String

Specifies the storage class to which you want the noncurrent object versions to transition. Can only be COLD or STANDARD_IA.

days Number

Specifies the number of days noncurrent object versions transition.

StorageBucketLifecycleRuleTransition

StorageClass string

Specifies the storage class to which you want the object to transition. Can only be COLD or STANDARD_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.

StorageClass string

Specifies the storage class to which you want the object to transition. Can only be COLD or STANDARD_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.

storageClass String

Specifies the storage class to which you want the object to transition. Can only be COLD or STANDARD_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.

storageClass string

Specifies the storage class to which you want the object to transition. Can only be COLD or STANDARD_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 or STANDARD_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.

storageClass String

Specifies the storage class to which you want the object to transition. Can only be COLD or STANDARD_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

TargetBucket string

The name of the bucket that will receive the log objects.

TargetPrefix string

To specify a key prefix for log objects.

TargetBucket string

The name of the bucket that will receive the log objects.

TargetPrefix string

To specify a key prefix for log objects.

targetBucket String

The name of the bucket that will receive the log objects.

targetPrefix String

To specify a key prefix for log objects.

targetBucket string

The name of the bucket that will receive the log objects.

targetPrefix 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.

targetBucket String

The name of the bucket that will receive the log objects.

targetPrefix String

To specify a key prefix for log objects.

StorageBucketServerSideEncryptionConfiguration

Rule StorageBucketServerSideEncryptionConfigurationRule

A single object for server-side encryption by default configuration. (documented below)

Rule StorageBucketServerSideEncryptionConfigurationRule

A single object for server-side encryption by default configuration. (documented below)

rule StorageBucketServerSideEncryptionConfigurationRule

A single object for server-side encryption by default configuration. (documented below)

rule StorageBucketServerSideEncryptionConfigurationRule

A single object for server-side encryption by default configuration. (documented below)

rule StorageBucketServerSideEncryptionConfigurationRule

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

ApplyServerSideEncryptionByDefault StorageBucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefault

A single object for setting server-side encryption by default. (documented below)

ApplyServerSideEncryptionByDefault StorageBucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefault

A single object for setting server-side encryption by default. (documented below)

applyServerSideEncryptionByDefault StorageBucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefault

A single object for setting server-side encryption by default. (documented below)

applyServerSideEncryptionByDefault StorageBucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefault

A single object for setting server-side encryption by default. (documented below)

apply_server_side_encryption_by_default StorageBucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefault

A single object for setting server-side encryption by default. (documented below)

applyServerSideEncryptionByDefault Property Map

A single object for setting server-side encryption by default. (documented below)

StorageBucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefault

KmsMasterKeyId string

The KMS master key ID used for the SSE-KMS encryption.

SseAlgorithm string

The server-side encryption algorithm to use. Single valid value is aws:kms

KmsMasterKeyId string

The KMS master key ID used for the SSE-KMS encryption.

SseAlgorithm string

The server-side encryption algorithm to use. Single valid value is aws:kms

kmsMasterKeyId String

The KMS master key ID used for the SSE-KMS encryption.

sseAlgorithm String

The server-side encryption algorithm to use. Single valid value is aws:kms

kmsMasterKeyId string

The KMS master key ID used for the SSE-KMS encryption.

sseAlgorithm string

The server-side encryption algorithm to use. Single valid value is aws:kms

kms_master_key_id str

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

kmsMasterKeyId String

The KMS master key ID used for the SSE-KMS encryption.

sseAlgorithm String

The server-side encryption algorithm to use. Single valid value is aws:kms

StorageBucketVersioning

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

ErrorDocument string

An absolute path to the document to return in case of a 4XX error.

IndexDocument string

Storage returns this index document when requests are made to the root domain or any of the subfolders.

RedirectAllRequestsTo string

A hostname to redirect all website requests for this bucket to. Hostname can optionally be prefixed with a protocol (http:// or https://) to use when redirecting requests. The default is the protocol that is used in the original request.

RoutingRules string

A json array containing routing rules describing redirect behavior and when redirects are applied.

ErrorDocument string

An absolute path to the document to return in case of a 4XX error.

IndexDocument string

Storage returns this index document when requests are made to the root domain or any of the subfolders.

RedirectAllRequestsTo string

A hostname to redirect all website requests for this bucket to. Hostname can optionally be prefixed with a protocol (http:// or https://) to use when redirecting requests. The default is the protocol that is used in the original request.

RoutingRules string

A json array containing routing rules describing redirect behavior and when redirects are applied.

errorDocument String

An absolute path to the document to return in case of a 4XX error.

indexDocument String

Storage returns this index document when requests are made to the root domain or any of the subfolders.

redirectAllRequestsTo String

A hostname to redirect all website requests for this bucket to. Hostname can optionally be prefixed with a protocol (http:// or https://) to use when redirecting requests. The default is the protocol that is used in the original request.

routingRules String

A json array containing routing rules describing redirect behavior and when redirects are applied.

errorDocument string

An absolute path to the document to return in case of a 4XX error.

indexDocument string

Storage returns this index document when requests are made to the root domain or any of the subfolders.

redirectAllRequestsTo string

A hostname to redirect all website requests for this bucket to. Hostname can optionally be prefixed with a protocol (http:// or https://) to use when redirecting requests. The default is the protocol that is used in the original request.

routingRules 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_requests_to str

A hostname to redirect all website requests for this bucket to. Hostname can optionally be prefixed with a protocol (http:// or https://) 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.

errorDocument String

An absolute path to the document to return in case of a 4XX error.

indexDocument String

Storage returns this index document when requests are made to the root domain or any of the subfolders.

redirectAllRequestsTo String

A hostname to redirect all website requests for this bucket to. Hostname can optionally be prefixed with a protocol (http:// or https://) to use when redirecting requests. The default is the protocol that is used in the original request.

routingRules 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.

Package Details

Repository
https://github.com/pulumi/pulumi-yandex
License
Apache-2.0
Notes

This Pulumi package is based on the yandex Terraform Provider.