Yandex

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

StorageObject

Allows management of Yandex.Cloud Storage Object.

Example Usage

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var cute_cat_picture = new Yandex.StorageObject("cute-cat-picture", new Yandex.StorageObjectArgs
        {
            Bucket = "cat-pictures",
            Key = "cute-cat",
            Source = "/images/cats/cute-cat.jpg",
        });
    }

}
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.NewStorageObject(ctx, "cute-cat-picture", &yandex.StorageObjectArgs{
			Bucket: pulumi.String("cat-pictures"),
			Key:    pulumi.String("cute-cat"),
			Source: pulumi.String("/images/cats/cute-cat.jpg"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_yandex as yandex

cute_cat_picture = yandex.StorageObject("cute-cat-picture",
    bucket="cat-pictures",
    key="cute-cat",
    source="/images/cats/cute-cat.jpg")
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const cute_cat_picture = new yandex.StorageObject("cute-cat-picture", {
    bucket: "cat-pictures",
    key: "cute-cat",
    source: "/images/cats/cute-cat.jpg",
});

Coming soon!

Create a StorageObject Resource

new StorageObject(name: string, args: StorageObjectArgs, opts?: CustomResourceOptions);
@overload
def StorageObject(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  access_key: Optional[str] = None,
                  acl: Optional[str] = None,
                  bucket: Optional[str] = None,
                  content: Optional[str] = None,
                  content_base64: Optional[str] = None,
                  content_type: Optional[str] = None,
                  key: Optional[str] = None,
                  secret_key: Optional[str] = None,
                  source: Optional[str] = None)
@overload
def StorageObject(resource_name: str,
                  args: StorageObjectArgs,
                  opts: Optional[ResourceOptions] = None)
func NewStorageObject(ctx *Context, name string, args StorageObjectArgs, opts ...ResourceOption) (*StorageObject, error)
public StorageObject(string name, StorageObjectArgs args, CustomResourceOptions? opts = null)
public StorageObject(String name, StorageObjectArgs args)
public StorageObject(String name, StorageObjectArgs args, CustomResourceOptions options)
type: yandex:StorageObject
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args StorageObjectArgs
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 StorageObjectArgs
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 StorageObjectArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args StorageObjectArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args StorageObjectArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

Bucket string

The name of the containing bucket.

Key string

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

AccessKey string

The access key to use when applying changes. If omitted, storage_access_key specified in config is used.

Acl string

The predefined ACL to apply. Defaults to private.

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.

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.

SecretKey string

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

Source string

The path to a file that will be read and uploaded as raw bytes for the object content.

Bucket string

The name of the containing bucket.

Key string

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

AccessKey string

The access key to use when applying changes. If omitted, storage_access_key specified in config is used.

Acl string

The predefined ACL to apply. Defaults to private.

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.

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.

SecretKey string

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

Source string

The path to a file that will be read and uploaded as raw bytes for the object content.

bucket String

The name of the containing bucket.

key String

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

accessKey String

The access key to use when applying changes. If omitted, storage_access_key specified in config is used.

acl String

The predefined ACL to apply. Defaults to private.

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.

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.

secretKey String

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

source String

The path to a file that will be read and uploaded as raw bytes for the object content.

bucket string

The name of the containing bucket.

key string

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

accessKey string

The access key to use when applying changes. If omitted, storage_access_key specified in config is used.

acl string

The predefined ACL to apply. Defaults to private.

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.

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.

secretKey string

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

source string

The path to a file that will be read and uploaded as raw bytes for the object content.

bucket str

The name of the containing bucket.

key str

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

access_key str

The access key to use when applying changes. If omitted, storage_access_key specified in config is used.

acl str

The predefined ACL to apply. Defaults to private.

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

secret_key str

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

source str

The path to a file that will be read and uploaded as raw bytes for the object content.

bucket String

The name of the containing bucket.

key String

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

accessKey String

The access key to use when applying changes. If omitted, storage_access_key specified in config is used.

acl String

The predefined ACL to apply. Defaults to private.

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.

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.

secretKey String

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

source String

The path to a file that will be read and uploaded as raw bytes for the object content.

Outputs

All input properties are implicitly available as output properties. Additionally, the StorageObject 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 string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing StorageObject Resource

Get an existing StorageObject 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?: StorageObjectState, opts?: CustomResourceOptions): StorageObject
@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,
        content: Optional[str] = None,
        content_base64: Optional[str] = None,
        content_type: Optional[str] = None,
        key: Optional[str] = None,
        secret_key: Optional[str] = None,
        source: Optional[str] = None) -> StorageObject
func GetStorageObject(ctx *Context, name string, id IDInput, state *StorageObjectState, opts ...ResourceOption) (*StorageObject, error)
public static StorageObject Get(string name, Input<string> id, StorageObjectState? state, CustomResourceOptions? opts = null)
public static StorageObject get(String name, Output<String> id, StorageObjectState 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 config is used.

Acl string

The predefined ACL to apply. Defaults to private.

Bucket string

The name of the containing bucket.

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.

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.

Key string

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

SecretKey string

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

Source string

The path to a file that will be read and uploaded as raw bytes for the object content.

AccessKey string

The access key to use when applying changes. If omitted, storage_access_key specified in config is used.

Acl string

The predefined ACL to apply. Defaults to private.

Bucket string

The name of the containing bucket.

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.

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.

Key string

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

SecretKey string

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

Source string

The path to a file that will be read and uploaded as raw bytes for the object content.

accessKey String

The access key to use when applying changes. If omitted, storage_access_key specified in config is used.

acl String

The predefined ACL to apply. Defaults to private.

bucket String

The name of the containing bucket.

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.

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.

key String

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

secretKey String

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

source String

The path to a file that will be read and uploaded as raw bytes for the object content.

accessKey string

The access key to use when applying changes. If omitted, storage_access_key specified in config is used.

acl string

The predefined ACL to apply. Defaults to private.

bucket string

The name of the containing bucket.

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.

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.

key string

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

secretKey string

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

source string

The path to a file that will be read and uploaded as raw bytes for the object content.

access_key str

The access key to use when applying changes. If omitted, storage_access_key specified in config is used.

acl str

The predefined ACL to apply. Defaults to private.

bucket str

The name of the containing bucket.

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

key str

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

secret_key str

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

source str

The path to a file that will be read and uploaded as raw bytes for the object content.

accessKey String

The access key to use when applying changes. If omitted, storage_access_key specified in config is used.

acl String

The predefined ACL to apply. Defaults to private.

bucket String

The name of the containing bucket.

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.

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.

key String

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

secretKey String

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

source String

The path to a file that will be read and uploaded as raw bytes for the object content.

Package Details

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

This Pulumi package is based on the yandex Terraform Provider.