1. Packages
  2. Yandex
  3. API Docs
  4. StorageObject
Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

yandex.StorageObject

Explore with Pulumi AI

yandex logo
Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

    Allows management of Yandex.Cloud Storage Object.

    Example Usage

    Example creating an object in an existing

    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 StorageObject Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new StorageObject(name: string, args: StorageObjectArgs, opts?: CustomResourceOptions);
    @overload
    def StorageObject(resource_name: str,
                      args: StorageObjectArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def StorageObject(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      bucket: Optional[str] = None,
                      key: Optional[str] = None,
                      access_key: Optional[str] = None,
                      acl: Optional[str] = None,
                      content: Optional[str] = None,
                      content_base64: Optional[str] = None,
                      content_type: Optional[str] = None,
                      secret_key: Optional[str] = None,
                      source: Optional[str] = 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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var storageObjectResource = new Yandex.StorageObject("storageObjectResource", new()
    {
        Bucket = "string",
        Key = "string",
        AccessKey = "string",
        Acl = "string",
        Content = "string",
        ContentBase64 = "string",
        ContentType = "string",
        SecretKey = "string",
        Source = "string",
    });
    
    example, err := yandex.NewStorageObject(ctx, "storageObjectResource", &yandex.StorageObjectArgs{
    	Bucket:        pulumi.String("string"),
    	Key:           pulumi.String("string"),
    	AccessKey:     pulumi.String("string"),
    	Acl:           pulumi.String("string"),
    	Content:       pulumi.String("string"),
    	ContentBase64: pulumi.String("string"),
    	ContentType:   pulumi.String("string"),
    	SecretKey:     pulumi.String("string"),
    	Source:        pulumi.String("string"),
    })
    
    var storageObjectResource = new StorageObject("storageObjectResource", StorageObjectArgs.builder()
        .bucket("string")
        .key("string")
        .accessKey("string")
        .acl("string")
        .content("string")
        .contentBase64("string")
        .contentType("string")
        .secretKey("string")
        .source("string")
        .build());
    
    storage_object_resource = yandex.StorageObject("storageObjectResource",
        bucket="string",
        key="string",
        access_key="string",
        acl="string",
        content="string",
        content_base64="string",
        content_type="string",
        secret_key="string",
        source="string")
    
    const storageObjectResource = new yandex.StorageObject("storageObjectResource", {
        bucket: "string",
        key: "string",
        accessKey: "string",
        acl: "string",
        content: "string",
        contentBase64: "string",
        contentType: "string",
        secretKey: "string",
        source: "string",
    });
    
    type: yandex:StorageObject
    properties:
        accessKey: string
        acl: string
        bucket: string
        content: string
        contentBase64: string
        contentType: string
        key: string
        secretKey: string
        source: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    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 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
    Yandex pulumi/pulumi-yandex
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the yandex Terraform Provider.
    yandex logo
    Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi