Show / Hide Table of Contents

Class BucketObject

Creates a new object inside an existing bucket in Google cloud storage service (GCS). ACLs can be applied using the gcp.storage.ObjectACL resource. For more information see the official documentation and API.

Example Usage

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var picture = new Gcp.Storage.BucketObject("picture", new Gcp.Storage.BucketObjectArgs
    {
        Bucket = "image-store",
        Source = new FileAsset("/images/nature/garden-tiger-moth.jpg"),
    });
}

}
Inheritance
System.Object
Resource
CustomResource
BucketObject
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.Storage
Assembly: Pulumi.Gcp.dll
Syntax
public class BucketObject : CustomResource

Constructors

View Source

BucketObject(String, BucketObjectArgs, CustomResourceOptions)

Create a BucketObject resource with the given unique name, arguments, and options.

Declaration
public BucketObject(string name, BucketObjectArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

BucketObjectArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Bucket

The name of the containing bucket.

Declaration
public Output<string> Bucket { get; }
Property Value
Type Description
Output<System.String>
View Source

CacheControl

Cache-Control directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600

Declaration
public Output<string> CacheControl { get; }
Property Value
Type Description
Output<System.String>
View Source

Content

Data as string to be uploaded. Must be defined if source is not. Note: The content field is marked as sensitive.

Declaration
public Output<string> Content { get; }
Property Value
Type Description
Output<System.String>
View Source

ContentDisposition

Content-Disposition of the object data.

Declaration
public Output<string> ContentDisposition { get; }
Property Value
Type Description
Output<System.String>
View Source

ContentEncoding

Content-Encoding of the object data.

Declaration
public Output<string> ContentEncoding { get; }
Property Value
Type Description
Output<System.String>
View Source

ContentLanguage

Content-Language of the object data.

Declaration
public Output<string> ContentLanguage { get; }
Property Value
Type Description
Output<System.String>
View Source

ContentType

Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".

Declaration
public Output<string> ContentType { get; }
Property Value
Type Description
Output<System.String>
View Source

Crc32c

(Computed) Base 64 CRC32 hash of the uploaded data.

Declaration
public Output<string> Crc32c { get; }
Property Value
Type Description
Output<System.String>
View Source

DetectMd5hash

Declaration
public Output<string> DetectMd5hash { get; }
Property Value
Type Description
Output<System.String>
View Source

Md5hash

(Computed) Base 64 MD5 hash of the uploaded data.

Declaration
public Output<string> Md5hash { get; }
Property Value
Type Description
Output<System.String>
View Source

Metadata

User-provided metadata, in key/value pairs.

Declaration
public Output<ImmutableDictionary<string, string>> Metadata { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>>
View Source

Name

The name of the object. If you're interpolating the name of this object, see output_name instead.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

OutputName

(Computed) The name of the object. Use this field in interpolations with gcp.storage.ObjectACL to recreate gcp.storage.ObjectACL resources when your gcp.storage.BucketObject is recreated.

Declaration
public Output<string> OutputName { get; }
Property Value
Type Description
Output<System.String>
View Source

SelfLink

(Computed) A url reference to this object.

Declaration
public Output<string> SelfLink { get; }
Property Value
Type Description
Output<System.String>
View Source

Source

A path to the data you want to upload. Must be defined if content is not.

Declaration
public Output<AssetOrArchive> Source { get; }
Property Value
Type Description
Output<AssetOrArchive>
View Source

StorageClass

The StorageClass of the new bucket object. Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE. If not provided, this defaults to the bucket's default storage class or to a standard class.

Declaration
public Output<string> StorageClass { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, BucketObjectState, CustomResourceOptions)

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

Declaration
public static BucketObject Get(string name, Input<string> id, BucketObjectState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

BucketObjectState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
BucketObject
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.