Want to learn about running containers in Lambda? Join our free hands-on workshop. Register Now

ObjectStorageObject

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

Example Usage

Uploading plaintext to a bucket

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
    public MyStack()
    {
        var @object = new Linode.ObjectStorageObject("object", new Linode.ObjectStorageObjectArgs
        {
            Bucket = "my-bucket",
            Cluster = "us-east-1",
            Key = "my-object",
            SecretKey = linode_object_storage_key.My_key.Secret_key,
            AccessKey = linode_object_storage_key.My_key.Access_key,
            Content = "This is the content of the Object...",
            ContentType = "text/plain",
            ContentLanguage = "en",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-linode/sdk/v2/go/linode"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := linode.NewObjectStorageObject(ctx, "object", &linode.ObjectStorageObjectArgs{
            Bucket:          pulumi.String("my-bucket"),
            Cluster:         pulumi.String("us-east-1"),
            Key:             pulumi.String("my-object"),
            SecretKey:       pulumi.Any(linode_object_storage_key.My_key.Secret_key),
            AccessKey:       pulumi.Any(linode_object_storage_key.My_key.Access_key),
            Content:         pulumi.String("This is the content of the Object..."),
            ContentType:     pulumi.String("text/plain"),
            ContentLanguage: pulumi.String("en"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_linode as linode

object = linode.ObjectStorageObject("object",
    bucket="my-bucket",
    cluster="us-east-1",
    key="my-object",
    secret_key=linode_object_storage_key["my_key"]["secret_key"],
    access_key=linode_object_storage_key["my_key"]["access_key"],
    content="This is the content of the Object...",
    content_type="text/plain",
    content_language="en")
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";

const object = new linode.ObjectStorageObject("object", {
    bucket: "my-bucket",
    cluster: "us-east-1",
    key: "my-object",
    secretKey: linode_object_storage_key.my_key.secret_key,
    accessKey: linode_object_storage_key.my_key.access_key,
    content: "This is the content of the Object...",
    contentType: "text/plain",
    contentLanguage: "en",
});

Create a ObjectStorageObject Resource

def ObjectStorageObject(resource_name: str, opts: Optional[ResourceOptions] = None, access_key: Optional[str] = None, acl: Optional[str] = None, bucket: Optional[str] = None, cache_control: Optional[str] = None, cluster: Optional[str] = None, content: Optional[str] = None, content_base64: Optional[str] = None, content_disposition: Optional[str] = None, content_encoding: Optional[str] = None, content_language: Optional[str] = None, content_type: Optional[str] = None, etag: Optional[str] = None, force_destroy: Optional[bool] = None, key: Optional[str] = None, metadata: Optional[Mapping[str, str]] = None, secret_key: Optional[str] = None, source: Optional[str] = None, website_redirect: Optional[str] = None)
name string
The unique name of the resource.
args ObjectStorageObjectArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ObjectStorageObjectArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ObjectStorageObjectArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ObjectStorageObject Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ObjectStorageObject resource accepts the following input properties:

AccessKey string

The access key to authenticate with.

Bucket string

The name of the bucket to put the object in.

Cluster string

The cluster the bucket is in.

Key string

They name of the object once it is in the bucket.

SecretKey string

The secret key to authenitcate with.

Acl string

The canned ACL to apply. Can be either private or public-read (defaults to private).

CacheControl string

Specifies caching behavior along the request/reply chain Read w3c cache_control for further details.

Content string

Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.

ContentBase64 string

Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the gzipbase64 function with small text strings. For larger objects, use source to stream the content from a disk file.

ContentDisposition string

Specifies presentational information for the object. Read w3c content_disposition for further information.

ContentEncoding string

Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.

ContentLanguage string

The language the content is in e.g. en-US or en-GB.

ContentType string

A standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.

Etag string
ForceDestroy bool

Allow the object to be deleted regardless of any legal hold or object lock (defaults to false).

Metadata Dictionary<string, string>

A map of keys/values to provision metadata.

Source string

The path to a file that will be read and uploaded as raw bytes for the object content. The path must either be relative to the root module or absolute.

WebsiteRedirect string

Specifies a target URL for website redirect.

AccessKey string

The access key to authenticate with.

Bucket string

The name of the bucket to put the object in.

Cluster string

The cluster the bucket is in.

Key string

They name of the object once it is in the bucket.

SecretKey string

The secret key to authenitcate with.

Acl string

The canned ACL to apply. Can be either private or public-read (defaults to private).

CacheControl string

Specifies caching behavior along the request/reply chain Read w3c cache_control for further details.

Content string

Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.

ContentBase64 string

Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the gzipbase64 function with small text strings. For larger objects, use source to stream the content from a disk file.

ContentDisposition string

Specifies presentational information for the object. Read w3c content_disposition for further information.

ContentEncoding string

Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.

ContentLanguage string

The language the content is in e.g. en-US or en-GB.

ContentType string

A standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.

Etag string
ForceDestroy bool

Allow the object to be deleted regardless of any legal hold or object lock (defaults to false).

Metadata map[string]string

A map of keys/values to provision metadata.

Source string

The path to a file that will be read and uploaded as raw bytes for the object content. The path must either be relative to the root module or absolute.

WebsiteRedirect string

Specifies a target URL for website redirect.

accessKey string

The access key to authenticate with.

bucket string

The name of the bucket to put the object in.

cluster string

The cluster the bucket is in.

key string

They name of the object once it is in the bucket.

secretKey string

The secret key to authenitcate with.

acl string

The canned ACL to apply. Can be either private or public-read (defaults to private).

cacheControl string

Specifies caching behavior along the request/reply chain Read w3c cache_control for further details.

content string

Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.

contentBase64 string

Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the gzipbase64 function with small text strings. For larger objects, use source to stream the content from a disk file.

contentDisposition string

Specifies presentational information for the object. Read w3c content_disposition for further information.

contentEncoding string

Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.

contentLanguage string

The language the content is in e.g. en-US or en-GB.

contentType string

A standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.

etag string
forceDestroy boolean

Allow the object to be deleted regardless of any legal hold or object lock (defaults to false).

metadata {[key: string]: string}

A map of keys/values to provision metadata.

source string

The path to a file that will be read and uploaded as raw bytes for the object content. The path must either be relative to the root module or absolute.

websiteRedirect string

Specifies a target URL for website redirect.

access_key str

The access key to authenticate with.

bucket str

The name of the bucket to put the object in.

cluster str

The cluster the bucket is in.

key str

They name of the object once it is in the bucket.

secret_key str

The secret key to authenitcate with.

acl str

The canned ACL to apply. Can be either private or public-read (defaults to private).

cache_control str

Specifies caching behavior along the request/reply chain Read w3c cache_control for further details.

content str

Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.

content_base64 str

Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the gzipbase64 function with small text strings. For larger objects, use source to stream the content from a disk file.

content_disposition str

Specifies presentational information for the object. Read w3c content_disposition for further information.

content_encoding str

Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.

content_language str

The language the content is in e.g. en-US or en-GB.

content_type str

A standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.

etag str
force_destroy bool

Allow the object to be deleted regardless of any legal hold or object lock (defaults to false).

metadata Mapping[str, str]

A map of keys/values to provision metadata.

source str

The path to a file that will be read and uploaded as raw bytes for the object content. The path must either be relative to the root module or absolute.

website_redirect str

Specifies a target URL for website redirect.

Outputs

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

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

A unique version ID value for the object.

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

A unique version ID value for the object.

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

A unique version ID value for the object.

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

A unique version ID value for the object.

Look up an Existing ObjectStorageObject Resource

Get an existing ObjectStorageObject resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

@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, cache_control: Optional[str] = None, cluster: Optional[str] = None, content: Optional[str] = None, content_base64: Optional[str] = None, content_disposition: Optional[str] = None, content_encoding: Optional[str] = None, content_language: Optional[str] = None, content_type: Optional[str] = None, etag: Optional[str] = None, force_destroy: Optional[bool] = None, key: Optional[str] = None, metadata: Optional[Mapping[str, str]] = None, secret_key: Optional[str] = None, source: Optional[str] = None, version_id: Optional[str] = None, website_redirect: Optional[str] = None) -> ObjectStorageObject
func GetObjectStorageObject(ctx *Context, name string, id IDInput, state *ObjectStorageObjectState, opts ...ResourceOption) (*ObjectStorageObject, error)
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 canned ACL to apply. Can be either private or public-read (defaults to private).

Bucket string

The name of the bucket to put the object in.

CacheControl string

Specifies caching behavior along the request/reply chain Read w3c cache_control for further details.

Cluster string

The cluster the bucket is in.

Content string

Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.

ContentBase64 string

Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the gzipbase64 function with small text strings. For larger objects, use source to stream the content from a disk file.

ContentDisposition string

Specifies presentational information for the object. Read w3c content_disposition for further information.

ContentEncoding string

Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.

ContentLanguage string

The language the content is in e.g. en-US or en-GB.

ContentType string

A standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.

Etag string
ForceDestroy bool

Allow the object to be deleted regardless of any legal hold or object lock (defaults to false).

Key string

They name of the object once it is in the bucket.

Metadata Dictionary<string, string>

A map of keys/values to provision metadata.

SecretKey string

The secret key to authenitcate with.

Source string

The path to a file that will be read and uploaded as raw bytes for the object content. The path must either be relative to the root module or absolute.

VersionId string

A unique version ID value for the object.

WebsiteRedirect string

Specifies a target URL for website redirect.

AccessKey string

The access key to authenticate with.

Acl string

The canned ACL to apply. Can be either private or public-read (defaults to private).

Bucket string

The name of the bucket to put the object in.

CacheControl string

Specifies caching behavior along the request/reply chain Read w3c cache_control for further details.

Cluster string

The cluster the bucket is in.

Content string

Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.

ContentBase64 string

Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the gzipbase64 function with small text strings. For larger objects, use source to stream the content from a disk file.

ContentDisposition string

Specifies presentational information for the object. Read w3c content_disposition for further information.

ContentEncoding string

Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.

ContentLanguage string

The language the content is in e.g. en-US or en-GB.

ContentType string

A standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.

Etag string
ForceDestroy bool

Allow the object to be deleted regardless of any legal hold or object lock (defaults to false).

Key string

They name of the object once it is in the bucket.

Metadata map[string]string

A map of keys/values to provision metadata.

SecretKey string

The secret key to authenitcate with.

Source string

The path to a file that will be read and uploaded as raw bytes for the object content. The path must either be relative to the root module or absolute.

VersionId string

A unique version ID value for the object.

WebsiteRedirect string

Specifies a target URL for website redirect.

accessKey string

The access key to authenticate with.

acl string

The canned ACL to apply. Can be either private or public-read (defaults to private).

bucket string

The name of the bucket to put the object in.

cacheControl string

Specifies caching behavior along the request/reply chain Read w3c cache_control for further details.

cluster string

The cluster the bucket is in.

content string

Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.

contentBase64 string

Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the gzipbase64 function with small text strings. For larger objects, use source to stream the content from a disk file.

contentDisposition string

Specifies presentational information for the object. Read w3c content_disposition for further information.

contentEncoding string

Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.

contentLanguage string

The language the content is in e.g. en-US or en-GB.

contentType string

A standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.

etag string
forceDestroy boolean

Allow the object to be deleted regardless of any legal hold or object lock (defaults to false).

key string

They name of the object once it is in the bucket.

metadata {[key: string]: string}

A map of keys/values to provision metadata.

secretKey string

The secret key to authenitcate with.

source string

The path to a file that will be read and uploaded as raw bytes for the object content. The path must either be relative to the root module or absolute.

versionId string

A unique version ID value for the object.

websiteRedirect string

Specifies a target URL for website redirect.

access_key str

The access key to authenticate with.

acl str

The canned ACL to apply. Can be either private or public-read (defaults to private).

bucket str

The name of the bucket to put the object in.

cache_control str

Specifies caching behavior along the request/reply chain Read w3c cache_control for further details.

cluster str

The cluster the bucket is in.

content str

Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.

content_base64 str

Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the gzipbase64 function with small text strings. For larger objects, use source to stream the content from a disk file.

content_disposition str

Specifies presentational information for the object. Read w3c content_disposition for further information.

content_encoding str

Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.

content_language str

The language the content is in e.g. en-US or en-GB.

content_type str

A standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.

etag str
force_destroy bool

Allow the object to be deleted regardless of any legal hold or object lock (defaults to false).

key str

They name of the object once it is in the bucket.

metadata Mapping[str, str]

A map of keys/values to provision metadata.

secret_key str

The secret key to authenitcate with.

source str

The path to a file that will be read and uploaded as raw bytes for the object content. The path must either be relative to the root module or absolute.

version_id str

A unique version ID value for the object.

website_redirect str

Specifies a target URL for website redirect.

Package Details

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