1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. oss
  5. BucketObject
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.oss.BucketObject

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    Provides a resource to put a object(content or file) to a oss bucket.

    Example Usage

    Uploading a file to a bucket

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const _default = new random.index.Integer("default", {
        max: 99999,
        min: 10000,
    });
    const defaultBucket = new alicloud.oss.Bucket("default", {
        bucket: `terraform-example-${_default.result}`,
        acl: "private",
    });
    const defaultBucketObject = new alicloud.oss.BucketObject("default", {
        bucket: defaultBucket.bucket,
        key: "example_key",
        source: "./main.tf",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    default = random.index.Integer("default",
        max=99999,
        min=10000)
    default_bucket = alicloud.oss.Bucket("default",
        bucket=f"terraform-example-{default['result']}",
        acl="private")
    default_bucket_object = alicloud.oss.BucketObject("default",
        bucket=default_bucket.bucket,
        key="example_key",
        source="./main.tf")
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Max: 99999,
    			Min: 10000,
    		})
    		if err != nil {
    			return err
    		}
    		defaultBucket, err := oss.NewBucket(ctx, "default", &oss.BucketArgs{
    			Bucket: pulumi.String(fmt.Sprintf("terraform-example-%v", _default.Result)),
    			Acl:    pulumi.String("private"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucketObject(ctx, "default", &oss.BucketObjectArgs{
    			Bucket: defaultBucket.Bucket,
    			Key:    pulumi.String("example_key"),
    			Source: pulumi.String("./main.tf"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Random.Index.Integer("default", new()
        {
            Max = 99999,
            Min = 10000,
        });
    
        var defaultBucket = new AliCloud.Oss.Bucket("default", new()
        {
            BucketName = $"terraform-example-{@default.Result}",
            Acl = "private",
        });
    
        var defaultBucketObject = new AliCloud.Oss.BucketObject("default", new()
        {
            Bucket = defaultBucket.BucketName,
            Key = "example_key",
            Source = "./main.tf",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.integer;
    import com.pulumi.random.IntegerArgs;
    import com.pulumi.alicloud.oss.Bucket;
    import com.pulumi.alicloud.oss.BucketArgs;
    import com.pulumi.alicloud.oss.BucketObject;
    import com.pulumi.alicloud.oss.BucketObjectArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var default_ = new Integer("default", IntegerArgs.builder()
                .max(99999)
                .min(10000)
                .build());
    
            var defaultBucket = new Bucket("defaultBucket", BucketArgs.builder()
                .bucket(String.format("terraform-example-%s", default_.result()))
                .acl("private")
                .build());
    
            var defaultBucketObject = new BucketObject("defaultBucketObject", BucketObjectArgs.builder()
                .bucket(defaultBucket.bucket())
                .key("example_key")
                .source("./main.tf")
                .build());
    
        }
    }
    
    resources:
      default:
        type: random:integer
        properties:
          max: 99999
          min: 10000
      defaultBucket:
        type: alicloud:oss:Bucket
        name: default
        properties:
          bucket: terraform-example-${default.result}
          acl: private
      defaultBucketObject:
        type: alicloud:oss:BucketObject
        name: default
        properties:
          bucket: ${defaultBucket.bucket}
          key: example_key
          source: ./main.tf
    

    Uploading a content to a bucket

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const _default = new random.index.Integer("default", {
        max: 99999,
        min: 10000,
    });
    const defaultBucket = new alicloud.oss.Bucket("default", {
        bucket: `terraform-example-${_default.result}`,
        acl: "private",
    });
    const defaultBucketObject = new alicloud.oss.BucketObject("default", {
        bucket: defaultBucket.bucket,
        key: "example_key",
        content: "the content that you want to upload.",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    default = random.index.Integer("default",
        max=99999,
        min=10000)
    default_bucket = alicloud.oss.Bucket("default",
        bucket=f"terraform-example-{default['result']}",
        acl="private")
    default_bucket_object = alicloud.oss.BucketObject("default",
        bucket=default_bucket.bucket,
        key="example_key",
        content="the content that you want to upload.")
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Max: 99999,
    			Min: 10000,
    		})
    		if err != nil {
    			return err
    		}
    		defaultBucket, err := oss.NewBucket(ctx, "default", &oss.BucketArgs{
    			Bucket: pulumi.String(fmt.Sprintf("terraform-example-%v", _default.Result)),
    			Acl:    pulumi.String("private"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucketObject(ctx, "default", &oss.BucketObjectArgs{
    			Bucket:  defaultBucket.Bucket,
    			Key:     pulumi.String("example_key"),
    			Content: pulumi.String("the content that you want to upload."),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Random.Index.Integer("default", new()
        {
            Max = 99999,
            Min = 10000,
        });
    
        var defaultBucket = new AliCloud.Oss.Bucket("default", new()
        {
            BucketName = $"terraform-example-{@default.Result}",
            Acl = "private",
        });
    
        var defaultBucketObject = new AliCloud.Oss.BucketObject("default", new()
        {
            Bucket = defaultBucket.BucketName,
            Key = "example_key",
            Content = "the content that you want to upload.",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.integer;
    import com.pulumi.random.IntegerArgs;
    import com.pulumi.alicloud.oss.Bucket;
    import com.pulumi.alicloud.oss.BucketArgs;
    import com.pulumi.alicloud.oss.BucketObject;
    import com.pulumi.alicloud.oss.BucketObjectArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var default_ = new Integer("default", IntegerArgs.builder()
                .max(99999)
                .min(10000)
                .build());
    
            var defaultBucket = new Bucket("defaultBucket", BucketArgs.builder()
                .bucket(String.format("terraform-example-%s", default_.result()))
                .acl("private")
                .build());
    
            var defaultBucketObject = new BucketObject("defaultBucketObject", BucketObjectArgs.builder()
                .bucket(defaultBucket.bucket())
                .key("example_key")
                .content("the content that you want to upload.")
                .build());
    
        }
    }
    
    resources:
      default:
        type: random:integer
        properties:
          max: 99999
          min: 10000
      defaultBucket:
        type: alicloud:oss:Bucket
        name: default
        properties:
          bucket: terraform-example-${default.result}
          acl: private
      defaultBucketObject:
        type: alicloud:oss:BucketObject
        name: default
        properties:
          bucket: ${defaultBucket.bucket}
          key: example_key
          content: the content that you want to upload.
    

    Create BucketObject Resource

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

    Constructor syntax

    new BucketObject(name: string, args: BucketObjectArgs, opts?: CustomResourceOptions);
    @overload
    def BucketObject(resource_name: str,
                     args: BucketObjectArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def BucketObject(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     key: Optional[str] = None,
                     bucket: Optional[str] = None,
                     content: Optional[str] = None,
                     acl: Optional[str] = None,
                     content_disposition: Optional[str] = None,
                     content_encoding: Optional[str] = None,
                     content_md5: Optional[str] = None,
                     content_type: Optional[str] = None,
                     expires: Optional[str] = None,
                     cache_control: Optional[str] = None,
                     kms_key_id: Optional[str] = None,
                     server_side_encryption: Optional[str] = None,
                     source: Optional[str] = None)
    func NewBucketObject(ctx *Context, name string, args BucketObjectArgs, opts ...ResourceOption) (*BucketObject, error)
    public BucketObject(string name, BucketObjectArgs args, CustomResourceOptions? opts = null)
    public BucketObject(String name, BucketObjectArgs args)
    public BucketObject(String name, BucketObjectArgs args, CustomResourceOptions options)
    
    type: alicloud:oss:BucketObject
    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 BucketObjectArgs
    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 BucketObjectArgs
    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 BucketObjectArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BucketObjectArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BucketObjectArgs
    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 bucketObjectResource = new AliCloud.Oss.BucketObject("bucketObjectResource", new()
    {
        Key = "string",
        Bucket = "string",
        Content = "string",
        Acl = "string",
        ContentDisposition = "string",
        ContentEncoding = "string",
        ContentMd5 = "string",
        ContentType = "string",
        Expires = "string",
        CacheControl = "string",
        KmsKeyId = "string",
        ServerSideEncryption = "string",
        Source = "string",
    });
    
    example, err := oss.NewBucketObject(ctx, "bucketObjectResource", &oss.BucketObjectArgs{
    	Key:                  pulumi.String("string"),
    	Bucket:               pulumi.String("string"),
    	Content:              pulumi.String("string"),
    	Acl:                  pulumi.String("string"),
    	ContentDisposition:   pulumi.String("string"),
    	ContentEncoding:      pulumi.String("string"),
    	ContentMd5:           pulumi.String("string"),
    	ContentType:          pulumi.String("string"),
    	Expires:              pulumi.String("string"),
    	CacheControl:         pulumi.String("string"),
    	KmsKeyId:             pulumi.String("string"),
    	ServerSideEncryption: pulumi.String("string"),
    	Source:               pulumi.String("string"),
    })
    
    var bucketObjectResource = new BucketObject("bucketObjectResource", BucketObjectArgs.builder()
        .key("string")
        .bucket("string")
        .content("string")
        .acl("string")
        .contentDisposition("string")
        .contentEncoding("string")
        .contentMd5("string")
        .contentType("string")
        .expires("string")
        .cacheControl("string")
        .kmsKeyId("string")
        .serverSideEncryption("string")
        .source("string")
        .build());
    
    bucket_object_resource = alicloud.oss.BucketObject("bucketObjectResource",
        key="string",
        bucket="string",
        content="string",
        acl="string",
        content_disposition="string",
        content_encoding="string",
        content_md5="string",
        content_type="string",
        expires="string",
        cache_control="string",
        kms_key_id="string",
        server_side_encryption="string",
        source="string")
    
    const bucketObjectResource = new alicloud.oss.BucketObject("bucketObjectResource", {
        key: "string",
        bucket: "string",
        content: "string",
        acl: "string",
        contentDisposition: "string",
        contentEncoding: "string",
        contentMd5: "string",
        contentType: "string",
        expires: "string",
        cacheControl: "string",
        kmsKeyId: "string",
        serverSideEncryption: "string",
        source: "string",
    });
    
    type: alicloud:oss:BucketObject
    properties:
        acl: string
        bucket: string
        cacheControl: string
        content: string
        contentDisposition: string
        contentEncoding: string
        contentMd5: string
        contentType: string
        expires: string
        key: string
        kmsKeyId: string
        serverSideEncryption: string
        source: string
    

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

    Bucket string
    The name of the bucket to put the file in.
    Key string
    The name of the object once it is in the bucket.
    Acl string
    The canned ACL to apply. Defaults to "private".
    CacheControl string
    Specifies caching behavior along the request/reply chain. Read RFC2616 Cache-Control for further details.
    Content string
    The literal content being uploaded to the bucket.
    ContentDisposition string
    Specifies presentational information for the object. Read RFC2616 Content-Disposition for further details.
    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 RFC2616 Content-Encoding for further details.
    ContentMd5 string
    The MD5 value of the content. Read MD5 for computing method.
    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.
    Expires string
    Specifies expire date for the the request/response. Read RFC2616 Expires for further details.
    KmsKeyId string

    Specifies the primary key managed by KMS. This parameter is valid when the value of server_side_encryption is set to KMS.

    Either source or content must be provided to specify the bucket content. These two arguments are mutually-exclusive.

    ServerSideEncryption string
    Specifies server-side encryption of the object in OSS. Valid values are AES256, KMS. Default value is AES256.
    Source string
    The path to the source file being uploaded to the bucket.
    Bucket string
    The name of the bucket to put the file in.
    Key string
    The name of the object once it is in the bucket.
    Acl string
    The canned ACL to apply. Defaults to "private".
    CacheControl string
    Specifies caching behavior along the request/reply chain. Read RFC2616 Cache-Control for further details.
    Content string
    The literal content being uploaded to the bucket.
    ContentDisposition string
    Specifies presentational information for the object. Read RFC2616 Content-Disposition for further details.
    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 RFC2616 Content-Encoding for further details.
    ContentMd5 string
    The MD5 value of the content. Read MD5 for computing method.
    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.
    Expires string
    Specifies expire date for the the request/response. Read RFC2616 Expires for further details.
    KmsKeyId string

    Specifies the primary key managed by KMS. This parameter is valid when the value of server_side_encryption is set to KMS.

    Either source or content must be provided to specify the bucket content. These two arguments are mutually-exclusive.

    ServerSideEncryption string
    Specifies server-side encryption of the object in OSS. Valid values are AES256, KMS. Default value is AES256.
    Source string
    The path to the source file being uploaded to the bucket.
    bucket String
    The name of the bucket to put the file in.
    key String
    The name of the object once it is in the bucket.
    acl String
    The canned ACL to apply. Defaults to "private".
    cacheControl String
    Specifies caching behavior along the request/reply chain. Read RFC2616 Cache-Control for further details.
    content String
    The literal content being uploaded to the bucket.
    contentDisposition String
    Specifies presentational information for the object. Read RFC2616 Content-Disposition for further details.
    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 RFC2616 Content-Encoding for further details.
    contentMd5 String
    The MD5 value of the content. Read MD5 for computing method.
    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.
    expires String
    Specifies expire date for the the request/response. Read RFC2616 Expires for further details.
    kmsKeyId String

    Specifies the primary key managed by KMS. This parameter is valid when the value of server_side_encryption is set to KMS.

    Either source or content must be provided to specify the bucket content. These two arguments are mutually-exclusive.

    serverSideEncryption String
    Specifies server-side encryption of the object in OSS. Valid values are AES256, KMS. Default value is AES256.
    source String
    The path to the source file being uploaded to the bucket.
    bucket string
    The name of the bucket to put the file in.
    key string
    The name of the object once it is in the bucket.
    acl string
    The canned ACL to apply. Defaults to "private".
    cacheControl string
    Specifies caching behavior along the request/reply chain. Read RFC2616 Cache-Control for further details.
    content string
    The literal content being uploaded to the bucket.
    contentDisposition string
    Specifies presentational information for the object. Read RFC2616 Content-Disposition for further details.
    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 RFC2616 Content-Encoding for further details.
    contentMd5 string
    The MD5 value of the content. Read MD5 for computing method.
    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.
    expires string
    Specifies expire date for the the request/response. Read RFC2616 Expires for further details.
    kmsKeyId string

    Specifies the primary key managed by KMS. This parameter is valid when the value of server_side_encryption is set to KMS.

    Either source or content must be provided to specify the bucket content. These two arguments are mutually-exclusive.

    serverSideEncryption string
    Specifies server-side encryption of the object in OSS. Valid values are AES256, KMS. Default value is AES256.
    source string
    The path to the source file being uploaded to the bucket.
    bucket str
    The name of the bucket to put the file in.
    key str
    The name of the object once it is in the bucket.
    acl str
    The canned ACL to apply. Defaults to "private".
    cache_control str
    Specifies caching behavior along the request/reply chain. Read RFC2616 Cache-Control for further details.
    content str
    The literal content being uploaded to the bucket.
    content_disposition str
    Specifies presentational information for the object. Read RFC2616 Content-Disposition for further details.
    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 RFC2616 Content-Encoding for further details.
    content_md5 str
    The MD5 value of the content. Read MD5 for computing method.
    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.
    expires str
    Specifies expire date for the the request/response. Read RFC2616 Expires for further details.
    kms_key_id str

    Specifies the primary key managed by KMS. This parameter is valid when the value of server_side_encryption is set to KMS.

    Either source or content must be provided to specify the bucket content. These two arguments are mutually-exclusive.

    server_side_encryption str
    Specifies server-side encryption of the object in OSS. Valid values are AES256, KMS. Default value is AES256.
    source str
    The path to the source file being uploaded to the bucket.
    bucket String
    The name of the bucket to put the file in.
    key String
    The name of the object once it is in the bucket.
    acl String
    The canned ACL to apply. Defaults to "private".
    cacheControl String
    Specifies caching behavior along the request/reply chain. Read RFC2616 Cache-Control for further details.
    content String
    The literal content being uploaded to the bucket.
    contentDisposition String
    Specifies presentational information for the object. Read RFC2616 Content-Disposition for further details.
    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 RFC2616 Content-Encoding for further details.
    contentMd5 String
    The MD5 value of the content. Read MD5 for computing method.
    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.
    expires String
    Specifies expire date for the the request/response. Read RFC2616 Expires for further details.
    kmsKeyId String

    Specifies the primary key managed by KMS. This parameter is valid when the value of server_side_encryption is set to KMS.

    Either source or content must be provided to specify the bucket content. These two arguments are mutually-exclusive.

    serverSideEncryption String
    Specifies server-side encryption of the object in OSS. Valid values are AES256, KMS. Default value is AES256.
    source String
    The path to the source file being uploaded to the bucket.

    Outputs

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

    ContentLength string
    the content length of request.
    Etag string
    the ETag generated for the object (an MD5 sum of the object content).
    Id string
    The provider-assigned unique ID for this managed resource.
    VersionId string
    A unique version ID value for the object, if bucket versioning is enabled.
    ContentLength string
    the content length of request.
    Etag string
    the ETag generated for the object (an MD5 sum of the object content).
    Id string
    The provider-assigned unique ID for this managed resource.
    VersionId string
    A unique version ID value for the object, if bucket versioning is enabled.
    contentLength String
    the content length of request.
    etag String
    the ETag generated for the object (an MD5 sum of the object content).
    id String
    The provider-assigned unique ID for this managed resource.
    versionId String
    A unique version ID value for the object, if bucket versioning is enabled.
    contentLength string
    the content length of request.
    etag string
    the ETag generated for the object (an MD5 sum of the object content).
    id string
    The provider-assigned unique ID for this managed resource.
    versionId string
    A unique version ID value for the object, if bucket versioning is enabled.
    content_length str
    the content length of request.
    etag str
    the ETag generated for the object (an MD5 sum of the object content).
    id str
    The provider-assigned unique ID for this managed resource.
    version_id str
    A unique version ID value for the object, if bucket versioning is enabled.
    contentLength String
    the content length of request.
    etag String
    the ETag generated for the object (an MD5 sum of the object content).
    id String
    The provider-assigned unique ID for this managed resource.
    versionId String
    A unique version ID value for the object, if bucket versioning is enabled.

    Look up Existing BucketObject Resource

    Get an existing BucketObject 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?: BucketObjectState, opts?: CustomResourceOptions): BucketObject
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            acl: Optional[str] = None,
            bucket: Optional[str] = None,
            cache_control: Optional[str] = None,
            content: Optional[str] = None,
            content_disposition: Optional[str] = None,
            content_encoding: Optional[str] = None,
            content_length: Optional[str] = None,
            content_md5: Optional[str] = None,
            content_type: Optional[str] = None,
            etag: Optional[str] = None,
            expires: Optional[str] = None,
            key: Optional[str] = None,
            kms_key_id: Optional[str] = None,
            server_side_encryption: Optional[str] = None,
            source: Optional[str] = None,
            version_id: Optional[str] = None) -> BucketObject
    func GetBucketObject(ctx *Context, name string, id IDInput, state *BucketObjectState, opts ...ResourceOption) (*BucketObject, error)
    public static BucketObject Get(string name, Input<string> id, BucketObjectState? state, CustomResourceOptions? opts = null)
    public static BucketObject get(String name, Output<String> id, BucketObjectState 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:
    Acl string
    The canned ACL to apply. Defaults to "private".
    Bucket string
    The name of the bucket to put the file in.
    CacheControl string
    Specifies caching behavior along the request/reply chain. Read RFC2616 Cache-Control for further details.
    Content string
    The literal content being uploaded to the bucket.
    ContentDisposition string
    Specifies presentational information for the object. Read RFC2616 Content-Disposition for further details.
    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 RFC2616 Content-Encoding for further details.
    ContentLength string
    the content length of request.
    ContentMd5 string
    The MD5 value of the content. Read MD5 for computing method.
    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
    the ETag generated for the object (an MD5 sum of the object content).
    Expires string
    Specifies expire date for the the request/response. Read RFC2616 Expires for further details.
    Key string
    The name of the object once it is in the bucket.
    KmsKeyId string

    Specifies the primary key managed by KMS. This parameter is valid when the value of server_side_encryption is set to KMS.

    Either source or content must be provided to specify the bucket content. These two arguments are mutually-exclusive.

    ServerSideEncryption string
    Specifies server-side encryption of the object in OSS. Valid values are AES256, KMS. Default value is AES256.
    Source string
    The path to the source file being uploaded to the bucket.
    VersionId string
    A unique version ID value for the object, if bucket versioning is enabled.
    Acl string
    The canned ACL to apply. Defaults to "private".
    Bucket string
    The name of the bucket to put the file in.
    CacheControl string
    Specifies caching behavior along the request/reply chain. Read RFC2616 Cache-Control for further details.
    Content string
    The literal content being uploaded to the bucket.
    ContentDisposition string
    Specifies presentational information for the object. Read RFC2616 Content-Disposition for further details.
    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 RFC2616 Content-Encoding for further details.
    ContentLength string
    the content length of request.
    ContentMd5 string
    The MD5 value of the content. Read MD5 for computing method.
    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
    the ETag generated for the object (an MD5 sum of the object content).
    Expires string
    Specifies expire date for the the request/response. Read RFC2616 Expires for further details.
    Key string
    The name of the object once it is in the bucket.
    KmsKeyId string

    Specifies the primary key managed by KMS. This parameter is valid when the value of server_side_encryption is set to KMS.

    Either source or content must be provided to specify the bucket content. These two arguments are mutually-exclusive.

    ServerSideEncryption string
    Specifies server-side encryption of the object in OSS. Valid values are AES256, KMS. Default value is AES256.
    Source string
    The path to the source file being uploaded to the bucket.
    VersionId string
    A unique version ID value for the object, if bucket versioning is enabled.
    acl String
    The canned ACL to apply. Defaults to "private".
    bucket String
    The name of the bucket to put the file in.
    cacheControl String
    Specifies caching behavior along the request/reply chain. Read RFC2616 Cache-Control for further details.
    content String
    The literal content being uploaded to the bucket.
    contentDisposition String
    Specifies presentational information for the object. Read RFC2616 Content-Disposition for further details.
    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 RFC2616 Content-Encoding for further details.
    contentLength String
    the content length of request.
    contentMd5 String
    The MD5 value of the content. Read MD5 for computing method.
    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
    the ETag generated for the object (an MD5 sum of the object content).
    expires String
    Specifies expire date for the the request/response. Read RFC2616 Expires for further details.
    key String
    The name of the object once it is in the bucket.
    kmsKeyId String

    Specifies the primary key managed by KMS. This parameter is valid when the value of server_side_encryption is set to KMS.

    Either source or content must be provided to specify the bucket content. These two arguments are mutually-exclusive.

    serverSideEncryption String
    Specifies server-side encryption of the object in OSS. Valid values are AES256, KMS. Default value is AES256.
    source String
    The path to the source file being uploaded to the bucket.
    versionId String
    A unique version ID value for the object, if bucket versioning is enabled.
    acl string
    The canned ACL to apply. Defaults to "private".
    bucket string
    The name of the bucket to put the file in.
    cacheControl string
    Specifies caching behavior along the request/reply chain. Read RFC2616 Cache-Control for further details.
    content string
    The literal content being uploaded to the bucket.
    contentDisposition string
    Specifies presentational information for the object. Read RFC2616 Content-Disposition for further details.
    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 RFC2616 Content-Encoding for further details.
    contentLength string
    the content length of request.
    contentMd5 string
    The MD5 value of the content. Read MD5 for computing method.
    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
    the ETag generated for the object (an MD5 sum of the object content).
    expires string
    Specifies expire date for the the request/response. Read RFC2616 Expires for further details.
    key string
    The name of the object once it is in the bucket.
    kmsKeyId string

    Specifies the primary key managed by KMS. This parameter is valid when the value of server_side_encryption is set to KMS.

    Either source or content must be provided to specify the bucket content. These two arguments are mutually-exclusive.

    serverSideEncryption string
    Specifies server-side encryption of the object in OSS. Valid values are AES256, KMS. Default value is AES256.
    source string
    The path to the source file being uploaded to the bucket.
    versionId string
    A unique version ID value for the object, if bucket versioning is enabled.
    acl str
    The canned ACL to apply. Defaults to "private".
    bucket str
    The name of the bucket to put the file in.
    cache_control str
    Specifies caching behavior along the request/reply chain. Read RFC2616 Cache-Control for further details.
    content str
    The literal content being uploaded to the bucket.
    content_disposition str
    Specifies presentational information for the object. Read RFC2616 Content-Disposition for further details.
    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 RFC2616 Content-Encoding for further details.
    content_length str
    the content length of request.
    content_md5 str
    The MD5 value of the content. Read MD5 for computing method.
    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
    the ETag generated for the object (an MD5 sum of the object content).
    expires str
    Specifies expire date for the the request/response. Read RFC2616 Expires for further details.
    key str
    The name of the object once it is in the bucket.
    kms_key_id str

    Specifies the primary key managed by KMS. This parameter is valid when the value of server_side_encryption is set to KMS.

    Either source or content must be provided to specify the bucket content. These two arguments are mutually-exclusive.

    server_side_encryption str
    Specifies server-side encryption of the object in OSS. Valid values are AES256, KMS. Default value is AES256.
    source str
    The path to the source file being uploaded to the bucket.
    version_id str
    A unique version ID value for the object, if bucket versioning is enabled.
    acl String
    The canned ACL to apply. Defaults to "private".
    bucket String
    The name of the bucket to put the file in.
    cacheControl String
    Specifies caching behavior along the request/reply chain. Read RFC2616 Cache-Control for further details.
    content String
    The literal content being uploaded to the bucket.
    contentDisposition String
    Specifies presentational information for the object. Read RFC2616 Content-Disposition for further details.
    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 RFC2616 Content-Encoding for further details.
    contentLength String
    the content length of request.
    contentMd5 String
    The MD5 value of the content. Read MD5 for computing method.
    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
    the ETag generated for the object (an MD5 sum of the object content).
    expires String
    Specifies expire date for the the request/response. Read RFC2616 Expires for further details.
    key String
    The name of the object once it is in the bucket.
    kmsKeyId String

    Specifies the primary key managed by KMS. This parameter is valid when the value of server_side_encryption is set to KMS.

    Either source or content must be provided to specify the bucket content. These two arguments are mutually-exclusive.

    serverSideEncryption String
    Specifies server-side encryption of the object in OSS. Valid values are AES256, KMS. Default value is AES256.
    source String
    The path to the source file being uploaded to the bucket.
    versionId String
    A unique version ID value for the object, if bucket versioning is enabled.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi