Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

ObjectStorageBucket

Provides a Linode Object Storage Bucket resource. This can be used to create, modify, and delete Linodes Object Storage Buckets.

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
    public MyStack()
    {
        var primary = Output.Create(Linode.GetObjectStorageCluster.InvokeAsync(new Linode.GetObjectStorageClusterArgs
        {
            Id = "us-east-1",
        }));
        var foobar = new Linode.ObjectStorageBucket("foobar", new Linode.ObjectStorageBucketArgs
        {
            Cluster = primary.Apply(primary => primary.Id),
            Label = "%s",
        });
    }

}
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-linode/sdk/v3/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		primary, err := linode.GetObjectStorageCluster(ctx, &GetObjectStorageClusterArgs{
			Id: "us-east-1",
		}, nil)
		if err != nil {
			return err
		}
		_, err = linode.NewObjectStorageBucket(ctx, "foobar", &linode.ObjectStorageBucketArgs{
			Cluster: pulumi.String(primary.Id),
			Label:   pulumi.String(fmt.Sprintf("%v%v", "%", "s")),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_linode as linode

primary = linode.get_object_storage_cluster(id="us-east-1")
foobar = linode.ObjectStorageBucket("foobar",
    cluster=primary.id,
    label="%s")
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";

const primary = linode.getObjectStorageCluster({
    id: "us-east-1",
});
const foobar = new linode.ObjectStorageBucket("foobar", {
    cluster: primary.then(primary => primary.id),
    label: `%s`,
});

Create a ObjectStorageBucket Resource

new ObjectStorageBucket(name: string, args: ObjectStorageBucketArgs, opts?: CustomResourceOptions);
@overload
def ObjectStorageBucket(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        access_key: Optional[str] = None,
                        acl: Optional[str] = None,
                        cert: Optional[ObjectStorageBucketCertArgs] = None,
                        cluster: Optional[str] = None,
                        cors_enabled: Optional[bool] = None,
                        label: Optional[str] = None,
                        lifecycle_rules: Optional[Sequence[ObjectStorageBucketLifecycleRuleArgs]] = None,
                        secret_key: Optional[str] = None,
                        versioning: Optional[bool] = None)
@overload
def ObjectStorageBucket(resource_name: str,
                        args: ObjectStorageBucketArgs,
                        opts: Optional[ResourceOptions] = None)
func NewObjectStorageBucket(ctx *Context, name string, args ObjectStorageBucketArgs, opts ...ResourceOption) (*ObjectStorageBucket, error)
public ObjectStorageBucket(string name, ObjectStorageBucketArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ObjectStorageBucketArgs
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 ObjectStorageBucketArgs
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 ObjectStorageBucketArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ObjectStorageBucketArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ObjectStorageBucket 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 ObjectStorageBucket resource accepts the following input properties:

Cluster string
The cluster of the Linode Object Storage Bucket.
Label string
The label of the Linode Object Storage Bucket.
AccessKey string
The access key to authenticate with.
Acl string
The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
Cert ObjectStorageBucketCertArgs
The cert used by this Object Storage Bucket.
CorsEnabled bool
If true, the bucket will have CORS enabled for all origins.
LifecycleRules List<ObjectStorageBucketLifecycleRuleArgs>
Lifecycle rules to be applied to the bucket.
SecretKey string
The secret key to authenticate with.
Versioning bool
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires access_key and secret_key)
Cluster string
The cluster of the Linode Object Storage Bucket.
Label string
The label of the Linode Object Storage Bucket.
AccessKey string
The access key to authenticate with.
Acl string
The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
Cert ObjectStorageBucketCertArgs
The cert used by this Object Storage Bucket.
CorsEnabled bool
If true, the bucket will have CORS enabled for all origins.
LifecycleRules []ObjectStorageBucketLifecycleRuleArgs
Lifecycle rules to be applied to the bucket.
SecretKey string
The secret key to authenticate with.
Versioning bool
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires access_key and secret_key)
cluster string
The cluster of the Linode Object Storage Bucket.
label string
The label of the Linode Object Storage Bucket.
accessKey string
The access key to authenticate with.
acl string
The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
cert ObjectStorageBucketCertArgs
The cert used by this Object Storage Bucket.
corsEnabled boolean
If true, the bucket will have CORS enabled for all origins.
lifecycleRules ObjectStorageBucketLifecycleRuleArgs[]
Lifecycle rules to be applied to the bucket.
secretKey string
The secret key to authenticate with.
versioning boolean
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires access_key and secret_key)
cluster str
The cluster of the Linode Object Storage Bucket.
label str
The label of the Linode Object Storage Bucket.
access_key str
The access key to authenticate with.
acl str
The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
cert ObjectStorageBucketCertArgs
The cert used by this Object Storage Bucket.
cors_enabled bool
If true, the bucket will have CORS enabled for all origins.
lifecycle_rules Sequence[ObjectStorageBucketLifecycleRuleArgs]
Lifecycle rules to be applied to the bucket.
secret_key str
The secret key to authenticate with.
versioning bool
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires access_key and secret_key)

Outputs

All input properties are implicitly available as output properties. Additionally, the ObjectStorageBucket resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing ObjectStorageBucket Resource

Get an existing ObjectStorageBucket 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?: ObjectStorageBucketState, opts?: CustomResourceOptions): ObjectStorageBucket
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_key: Optional[str] = None,
        acl: Optional[str] = None,
        cert: Optional[ObjectStorageBucketCertArgs] = None,
        cluster: Optional[str] = None,
        cors_enabled: Optional[bool] = None,
        label: Optional[str] = None,
        lifecycle_rules: Optional[Sequence[ObjectStorageBucketLifecycleRuleArgs]] = None,
        secret_key: Optional[str] = None,
        versioning: Optional[bool] = None) -> ObjectStorageBucket
func GetObjectStorageBucket(ctx *Context, name string, id IDInput, state *ObjectStorageBucketState, opts ...ResourceOption) (*ObjectStorageBucket, error)
public static ObjectStorageBucket Get(string name, Input<string> id, ObjectStorageBucketState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

AccessKey string
The access key to authenticate with.
Acl string
The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
Cert ObjectStorageBucketCertArgs
The cert used by this Object Storage Bucket.
Cluster string
The cluster of the Linode Object Storage Bucket.
CorsEnabled bool
If true, the bucket will have CORS enabled for all origins.
Label string
The label of the Linode Object Storage Bucket.
LifecycleRules List<ObjectStorageBucketLifecycleRuleArgs>
Lifecycle rules to be applied to the bucket.
SecretKey string
The secret key to authenticate with.
Versioning bool
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires access_key and secret_key)
AccessKey string
The access key to authenticate with.
Acl string
The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
Cert ObjectStorageBucketCertArgs
The cert used by this Object Storage Bucket.
Cluster string
The cluster of the Linode Object Storage Bucket.
CorsEnabled bool
If true, the bucket will have CORS enabled for all origins.
Label string
The label of the Linode Object Storage Bucket.
LifecycleRules []ObjectStorageBucketLifecycleRuleArgs
Lifecycle rules to be applied to the bucket.
SecretKey string
The secret key to authenticate with.
Versioning bool
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires access_key and secret_key)
accessKey string
The access key to authenticate with.
acl string
The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
cert ObjectStorageBucketCertArgs
The cert used by this Object Storage Bucket.
cluster string
The cluster of the Linode Object Storage Bucket.
corsEnabled boolean
If true, the bucket will have CORS enabled for all origins.
label string
The label of the Linode Object Storage Bucket.
lifecycleRules ObjectStorageBucketLifecycleRuleArgs[]
Lifecycle rules to be applied to the bucket.
secretKey string
The secret key to authenticate with.
versioning boolean
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires access_key and secret_key)
access_key str
The access key to authenticate with.
acl str
The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
cert ObjectStorageBucketCertArgs
The cert used by this Object Storage Bucket.
cluster str
The cluster of the Linode Object Storage Bucket.
cors_enabled bool
If true, the bucket will have CORS enabled for all origins.
label str
The label of the Linode Object Storage Bucket.
lifecycle_rules Sequence[ObjectStorageBucketLifecycleRuleArgs]
Lifecycle rules to be applied to the bucket.
secret_key str
The secret key to authenticate with.
versioning bool
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires access_key and secret_key)

Supporting Types

ObjectStorageBucketCert

Certificate string
The Base64 encoded and PEM formatted SSL certificate.
PrivateKey string
The private key associated with the TLS/SSL certificate.
Certificate string
The Base64 encoded and PEM formatted SSL certificate.
PrivateKey string
The private key associated with the TLS/SSL certificate.
certificate string
The Base64 encoded and PEM formatted SSL certificate.
privateKey string
The private key associated with the TLS/SSL certificate.
certificate str
The Base64 encoded and PEM formatted SSL certificate.
private_key str
The private key associated with the TLS/SSL certificate.

ObjectStorageBucketLifecycleRule

Enabled bool
Specifies whether the lifecycle rule is active.
AbortIncompleteMultipartUploadDays int
Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
Expiration ObjectStorageBucketLifecycleRuleExpiration
Id string
The unique identifier for the rule.
NoncurrentVersionExpiration ObjectStorageBucketLifecycleRuleNoncurrentVersionExpiration
Prefix string
The object key prefix identifying one or more objects to which the rule applies.
Enabled bool
Specifies whether the lifecycle rule is active.
AbortIncompleteMultipartUploadDays int
Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
Expiration ObjectStorageBucketLifecycleRuleExpiration
Id string
The unique identifier for the rule.
NoncurrentVersionExpiration ObjectStorageBucketLifecycleRuleNoncurrentVersionExpiration
Prefix string
The object key prefix identifying one or more objects to which the rule applies.
enabled boolean
Specifies whether the lifecycle rule is active.
abortIncompleteMultipartUploadDays number
Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
expiration ObjectStorageBucketLifecycleRuleExpiration
id string
The unique identifier for the rule.
noncurrentVersionExpiration ObjectStorageBucketLifecycleRuleNoncurrentVersionExpiration
prefix string
The object key prefix identifying one or more objects to which the rule applies.
enabled bool
Specifies whether the lifecycle rule is active.
abort_incomplete_multipart_upload_days int
Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
expiration ObjectStorageBucketLifecycleRuleExpiration
id str
The unique identifier for the rule.
noncurrent_version_expiration ObjectStorageBucketLifecycleRuleNoncurrentVersionExpiration
prefix str
The object key prefix identifying one or more objects to which the rule applies.

ObjectStorageBucketLifecycleRuleExpiration

Date string
Specifies the date after which you want the corresponding action to take effect.
Days int
Specifies the number of days non-current object versions expire.
ExpiredObjectDeleteMarker bool
On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct Linode Object Storage to delete expired object delete markers. This cannot be specified with Days or Date in a Lifecycle Expiration Policy.
Date string
Specifies the date after which you want the corresponding action to take effect.
Days int
Specifies the number of days non-current object versions expire.
ExpiredObjectDeleteMarker bool
On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct Linode Object Storage to delete expired object delete markers. This cannot be specified with Days or Date in a Lifecycle Expiration Policy.
date string
Specifies the date after which you want the corresponding action to take effect.
days number
Specifies the number of days non-current object versions expire.
expiredObjectDeleteMarker boolean
On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct Linode Object Storage to delete expired object delete markers. This cannot be specified with Days or Date in a Lifecycle Expiration Policy.
date str
Specifies the date after which you want the corresponding action to take effect.
days int
Specifies the number of days non-current object versions expire.
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 Linode Object Storage to delete expired object delete markers. This cannot be specified with Days or Date in a Lifecycle Expiration Policy.

ObjectStorageBucketLifecycleRuleNoncurrentVersionExpiration

Days int
Specifies the number of days non-current object versions expire.
Days int
Specifies the number of days non-current object versions expire.
days number
Specifies the number of days non-current object versions expire.
days int
Specifies the number of days non-current object versions expire.

Import

Linodes Object Storage Buckets can be imported using the resource id which is made of cluster:label, e.g.

 $ pulumi import linode:index/objectStorageBucket:ObjectStorageBucket mybucket us-east-1:foobar

Package Details

Repository
https://github.com/pulumi/pulumi-linode
License
Apache-2.0
Notes
This Pulumi package is based on the linode Terraform Provider.