gcp.storage.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.
A datasource can be used to retrieve the data of the stored object:
- gcp.storage.getBucketObjectContent: Retrieves the content within a specified bucket object in Google Cloud Storage Service (GCS)
Example Usage
Example creating a public object in an existing image-store bucket.
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const picture = new gcp.storage.BucketObject("picture", {
    name: "butterfly01",
    source: new pulumi.asset.FileAsset("/images/nature/garden-tiger-moth.jpg"),
    bucket: "image-store",
});
import pulumi
import pulumi_gcp as gcp
picture = gcp.storage.BucketObject("picture",
    name="butterfly01",
    source=pulumi.FileAsset("/images/nature/garden-tiger-moth.jpg"),
    bucket="image-store")
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := storage.NewBucketObject(ctx, "picture", &storage.BucketObjectArgs{
			Name:   pulumi.String("butterfly01"),
			Source: pulumi.NewFileAsset("/images/nature/garden-tiger-moth.jpg"),
			Bucket: pulumi.String("image-store"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var picture = new Gcp.Storage.BucketObject("picture", new()
    {
        Name = "butterfly01",
        Source = new FileAsset("/images/nature/garden-tiger-moth.jpg"),
        Bucket = "image-store",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.storage.BucketObject;
import com.pulumi.gcp.storage.BucketObjectArgs;
import com.pulumi.asset.FileAsset;
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 picture = new BucketObject("picture", BucketObjectArgs.builder()
            .name("butterfly01")
            .source(new FileAsset("/images/nature/garden-tiger-moth.jpg"))
            .bucket("image-store")
            .build());
    }
}
resources:
  picture:
    type: gcp:storage:BucketObject
    properties:
      name: butterfly01
      source:
        fn::FileAsset: /images/nature/garden-tiger-moth.jpg
      bucket: image-store
Example creating an empty folder in an existing image-store bucket.
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const emptyFolder = new gcp.storage.BucketObject("empty_folder", {
    name: "empty_folder/",
    content: " ",
    bucket: "image-store",
});
import pulumi
import pulumi_gcp as gcp
empty_folder = gcp.storage.BucketObject("empty_folder",
    name="empty_folder/",
    content=" ",
    bucket="image-store")
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := storage.NewBucketObject(ctx, "empty_folder", &storage.BucketObjectArgs{
			Name:    pulumi.String("empty_folder/"),
			Content: pulumi.String(" "),
			Bucket:  pulumi.String("image-store"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var emptyFolder = new Gcp.Storage.BucketObject("empty_folder", new()
    {
        Name = "empty_folder/",
        Content = " ",
        Bucket = "image-store",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.storage.BucketObject;
import com.pulumi.gcp.storage.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 emptyFolder = new BucketObject("emptyFolder", BucketObjectArgs.builder()
            .name("empty_folder/")
            .content(" ")
            .bucket("image-store")
            .build());
    }
}
resources:
  emptyFolder:
    type: gcp:storage:BucketObject
    name: empty_folder
    properties:
      name: empty_folder/
      content: ' '
      bucket: image-store
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,
                 bucket: Optional[str] = None,
                 cache_control: Optional[str] = None,
                 content: Optional[str] = None,
                 content_disposition: Optional[str] = None,
                 content_encoding: Optional[str] = None,
                 content_language: Optional[str] = None,
                 content_type: Optional[str] = None,
                 customer_encryption: Optional[BucketObjectCustomerEncryptionArgs] = None,
                 deletion_policy: Optional[str] = None,
                 detect_md5hash: Optional[str] = None,
                 event_based_hold: Optional[bool] = None,
                 force_empty_content_type: Optional[bool] = None,
                 kms_key_name: Optional[str] = None,
                 metadata: Optional[Mapping[str, str]] = None,
                 name: Optional[str] = None,
                 retention: Optional[BucketObjectRetentionArgs] = None,
                 source: Optional[Union[pulumi.Asset, pulumi.Archive]] = None,
                 source_md5hash: Optional[str] = None,
                 storage_class: Optional[str] = None,
                 temporary_hold: Optional[bool] = 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: gcp:storage: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 Gcp.Storage.BucketObject("bucketObjectResource", new()
{
    Bucket = "string",
    CacheControl = "string",
    Content = "string",
    ContentDisposition = "string",
    ContentEncoding = "string",
    ContentLanguage = "string",
    ContentType = "string",
    CustomerEncryption = new Gcp.Storage.Inputs.BucketObjectCustomerEncryptionArgs
    {
        EncryptionKey = "string",
        EncryptionAlgorithm = "string",
    },
    DeletionPolicy = "string",
    DetectMd5hash = "string",
    EventBasedHold = false,
    ForceEmptyContentType = false,
    KmsKeyName = "string",
    Metadata = 
    {
        { "string", "string" },
    },
    Name = "string",
    Retention = new Gcp.Storage.Inputs.BucketObjectRetentionArgs
    {
        Mode = "string",
        RetainUntilTime = "string",
    },
    Source = new StringAsset("content"),
    SourceMd5hash = "string",
    StorageClass = "string",
    TemporaryHold = false,
});
example, err := storage.NewBucketObject(ctx, "bucketObjectResource", &storage.BucketObjectArgs{
	Bucket:             pulumi.String("string"),
	CacheControl:       pulumi.String("string"),
	Content:            pulumi.String("string"),
	ContentDisposition: pulumi.String("string"),
	ContentEncoding:    pulumi.String("string"),
	ContentLanguage:    pulumi.String("string"),
	ContentType:        pulumi.String("string"),
	CustomerEncryption: &storage.BucketObjectCustomerEncryptionArgs{
		EncryptionKey:       pulumi.String("string"),
		EncryptionAlgorithm: pulumi.String("string"),
	},
	DeletionPolicy:        pulumi.String("string"),
	DetectMd5hash:         pulumi.String("string"),
	EventBasedHold:        pulumi.Bool(false),
	ForceEmptyContentType: pulumi.Bool(false),
	KmsKeyName:            pulumi.String("string"),
	Metadata: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Name: pulumi.String("string"),
	Retention: &storage.BucketObjectRetentionArgs{
		Mode:            pulumi.String("string"),
		RetainUntilTime: pulumi.String("string"),
	},
	Source:        pulumi.NewStringAsset("content"),
	SourceMd5hash: pulumi.String("string"),
	StorageClass:  pulumi.String("string"),
	TemporaryHold: pulumi.Bool(false),
})
var bucketObjectResource = new BucketObject("bucketObjectResource", BucketObjectArgs.builder()
    .bucket("string")
    .cacheControl("string")
    .content("string")
    .contentDisposition("string")
    .contentEncoding("string")
    .contentLanguage("string")
    .contentType("string")
    .customerEncryption(BucketObjectCustomerEncryptionArgs.builder()
        .encryptionKey("string")
        .encryptionAlgorithm("string")
        .build())
    .deletionPolicy("string")
    .detectMd5hash("string")
    .eventBasedHold(false)
    .forceEmptyContentType(false)
    .kmsKeyName("string")
    .metadata(Map.of("string", "string"))
    .name("string")
    .retention(BucketObjectRetentionArgs.builder()
        .mode("string")
        .retainUntilTime("string")
        .build())
    .source(new StringAsset("content"))
    .sourceMd5hash("string")
    .storageClass("string")
    .temporaryHold(false)
    .build());
bucket_object_resource = gcp.storage.BucketObject("bucketObjectResource",
    bucket="string",
    cache_control="string",
    content="string",
    content_disposition="string",
    content_encoding="string",
    content_language="string",
    content_type="string",
    customer_encryption={
        "encryption_key": "string",
        "encryption_algorithm": "string",
    },
    deletion_policy="string",
    detect_md5hash="string",
    event_based_hold=False,
    force_empty_content_type=False,
    kms_key_name="string",
    metadata={
        "string": "string",
    },
    name="string",
    retention={
        "mode": "string",
        "retain_until_time": "string",
    },
    source=pulumi.StringAsset("content"),
    source_md5hash="string",
    storage_class="string",
    temporary_hold=False)
const bucketObjectResource = new gcp.storage.BucketObject("bucketObjectResource", {
    bucket: "string",
    cacheControl: "string",
    content: "string",
    contentDisposition: "string",
    contentEncoding: "string",
    contentLanguage: "string",
    contentType: "string",
    customerEncryption: {
        encryptionKey: "string",
        encryptionAlgorithm: "string",
    },
    deletionPolicy: "string",
    detectMd5hash: "string",
    eventBasedHold: false,
    forceEmptyContentType: false,
    kmsKeyName: "string",
    metadata: {
        string: "string",
    },
    name: "string",
    retention: {
        mode: "string",
        retainUntilTime: "string",
    },
    source: new pulumi.asset.StringAsset("content"),
    sourceMd5hash: "string",
    storageClass: "string",
    temporaryHold: false,
});
type: gcp:storage:BucketObject
properties:
    bucket: string
    cacheControl: string
    content: string
    contentDisposition: string
    contentEncoding: string
    contentLanguage: string
    contentType: string
    customerEncryption:
        encryptionAlgorithm: string
        encryptionKey: string
    deletionPolicy: string
    detectMd5hash: string
    eventBasedHold: false
    forceEmptyContentType: false
    kmsKeyName: string
    metadata:
        string: string
    name: string
    retention:
        mode: string
        retainUntilTime: string
    source:
        fn::StringAsset: content
    sourceMd5hash: string
    storageClass: string
    temporaryHold: false
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The BucketObject resource accepts the following input properties:
- Bucket string
- The name of the containing bucket.
- CacheControl string
- 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
- Content string
- Data as stringto be uploaded. Must be defined ifsourceis not. Note: Thecontentfield is marked as sensitive.
- ContentDisposition string
- Content-Disposition of the object data.
- ContentEncoding string
- Content-Encoding of the object data.
- ContentLanguage string
- Content-Language of the object data.
- ContentType string
- Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- CustomerEncryption BucketObject Customer Encryption 
- Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- DeletionPolicy string
- DetectMd5hash string
- EventBased boolHold 
- Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- ForceEmpty boolContent Type 
- When set to true, it ensure the object's Content-Type is empty.
- KmsKey stringName 
- The resource name of the Cloud KMS key that will be used to encrypt the object.
- Metadata Dictionary<string, string>
- User-provided metadata, in key/value pairs. - One of the following is required: 
- Name string
- The name of the object. If you're interpolating the name of this object, see output_nameinstead.
- Retention
BucketObject Retention 
- The object retention settings for the object. The retention settings allow an object to be retained until a provided date. Structure is documented below.
- Source
AssetOr Archive 
- A path to the data you want to upload. Must be defined
if contentis not.
- SourceMd5hash string
- User-provided md5hash to trigger replacement of object in storage bucket, Must be Base 64 MD5 hash of the object data. The usual way to set this is filemd5("file.zip"), where "file.zip" is the local filename
- StorageClass string
- The StorageClass of the new bucket object.
Supported values include: MULTI_REGIONAL,REGIONAL,NEARLINE,COLDLINE,ARCHIVE. If not provided, this defaults to the bucket's default storage class or to a standard class.
- TemporaryHold bool
- Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- Bucket string
- The name of the containing bucket.
- CacheControl string
- 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
- Content string
- Data as stringto be uploaded. Must be defined ifsourceis not. Note: Thecontentfield is marked as sensitive.
- ContentDisposition string
- Content-Disposition of the object data.
- ContentEncoding string
- Content-Encoding of the object data.
- ContentLanguage string
- Content-Language of the object data.
- ContentType string
- Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- CustomerEncryption BucketObject Customer Encryption Args 
- Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- DeletionPolicy string
- DetectMd5hash string
- EventBased boolHold 
- Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- ForceEmpty boolContent Type 
- When set to true, it ensure the object's Content-Type is empty.
- KmsKey stringName 
- The resource name of the Cloud KMS key that will be used to encrypt the object.
- Metadata map[string]string
- User-provided metadata, in key/value pairs. - One of the following is required: 
- Name string
- The name of the object. If you're interpolating the name of this object, see output_nameinstead.
- Retention
BucketObject Retention Args 
- The object retention settings for the object. The retention settings allow an object to be retained until a provided date. Structure is documented below.
- Source
pulumi.Asset Or Archive 
- A path to the data you want to upload. Must be defined
if contentis not.
- SourceMd5hash string
- User-provided md5hash to trigger replacement of object in storage bucket, Must be Base 64 MD5 hash of the object data. The usual way to set this is filemd5("file.zip"), where "file.zip" is the local filename
- StorageClass string
- The StorageClass of the new bucket object.
Supported values include: MULTI_REGIONAL,REGIONAL,NEARLINE,COLDLINE,ARCHIVE. If not provided, this defaults to the bucket's default storage class or to a standard class.
- TemporaryHold bool
- Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- bucket String
- The name of the containing bucket.
- cacheControl String
- 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
- content String
- Data as stringto be uploaded. Must be defined ifsourceis not. Note: Thecontentfield is marked as sensitive.
- contentDisposition String
- Content-Disposition of the object data.
- contentEncoding String
- Content-Encoding of the object data.
- contentLanguage String
- Content-Language of the object data.
- contentType String
- Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- customerEncryption BucketObject Customer Encryption 
- Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- deletionPolicy String
- detectMd5hash String
- eventBased BooleanHold 
- Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- forceEmpty BooleanContent Type 
- When set to true, it ensure the object's Content-Type is empty.
- kmsKey StringName 
- The resource name of the Cloud KMS key that will be used to encrypt the object.
- metadata Map<String,String>
- User-provided metadata, in key/value pairs. - One of the following is required: 
- name String
- The name of the object. If you're interpolating the name of this object, see output_nameinstead.
- retention
BucketObject Retention 
- The object retention settings for the object. The retention settings allow an object to be retained until a provided date. Structure is documented below.
- source
AssetOr Archive 
- A path to the data you want to upload. Must be defined
if contentis not.
- sourceMd5hash String
- User-provided md5hash to trigger replacement of object in storage bucket, Must be Base 64 MD5 hash of the object data. The usual way to set this is filemd5("file.zip"), where "file.zip" is the local filename
- storageClass String
- The StorageClass of the new bucket object.
Supported values include: MULTI_REGIONAL,REGIONAL,NEARLINE,COLDLINE,ARCHIVE. If not provided, this defaults to the bucket's default storage class or to a standard class.
- temporaryHold Boolean
- Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- bucket string
- The name of the containing bucket.
- cacheControl string
- 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
- content string
- Data as stringto be uploaded. Must be defined ifsourceis not. Note: Thecontentfield is marked as sensitive.
- contentDisposition string
- Content-Disposition of the object data.
- contentEncoding string
- Content-Encoding of the object data.
- contentLanguage string
- Content-Language of the object data.
- contentType string
- Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- customerEncryption BucketObject Customer Encryption 
- Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- deletionPolicy string
- detectMd5hash string
- eventBased booleanHold 
- Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- forceEmpty booleanContent Type 
- When set to true, it ensure the object's Content-Type is empty.
- kmsKey stringName 
- The resource name of the Cloud KMS key that will be used to encrypt the object.
- metadata {[key: string]: string}
- User-provided metadata, in key/value pairs. - One of the following is required: 
- name string
- The name of the object. If you're interpolating the name of this object, see output_nameinstead.
- retention
BucketObject Retention 
- The object retention settings for the object. The retention settings allow an object to be retained until a provided date. Structure is documented below.
- source
pulumi.asset.Asset | pulumi.asset. Archive 
- A path to the data you want to upload. Must be defined
if contentis not.
- sourceMd5hash string
- User-provided md5hash to trigger replacement of object in storage bucket, Must be Base 64 MD5 hash of the object data. The usual way to set this is filemd5("file.zip"), where "file.zip" is the local filename
- storageClass string
- The StorageClass of the new bucket object.
Supported values include: MULTI_REGIONAL,REGIONAL,NEARLINE,COLDLINE,ARCHIVE. If not provided, this defaults to the bucket's default storage class or to a standard class.
- temporaryHold boolean
- Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- bucket str
- The name of the containing bucket.
- cache_control str
- 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
- content str
- Data as stringto be uploaded. Must be defined ifsourceis not. Note: Thecontentfield is marked as sensitive.
- content_disposition str
- Content-Disposition of the object data.
- content_encoding str
- Content-Encoding of the object data.
- content_language str
- Content-Language of the object data.
- content_type str
- Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- customer_encryption BucketObject Customer Encryption Args 
- Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- deletion_policy str
- detect_md5hash str
- event_based_ boolhold 
- Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- force_empty_ boolcontent_ type 
- When set to true, it ensure the object's Content-Type is empty.
- kms_key_ strname 
- The resource name of the Cloud KMS key that will be used to encrypt the object.
- metadata Mapping[str, str]
- User-provided metadata, in key/value pairs. - One of the following is required: 
- name str
- The name of the object. If you're interpolating the name of this object, see output_nameinstead.
- retention
BucketObject Retention Args 
- The object retention settings for the object. The retention settings allow an object to be retained until a provided date. Structure is documented below.
- source
Union[pulumi.Asset, pulumi. Archive] 
- A path to the data you want to upload. Must be defined
if contentis not.
- source_md5hash str
- User-provided md5hash to trigger replacement of object in storage bucket, Must be Base 64 MD5 hash of the object data. The usual way to set this is filemd5("file.zip"), where "file.zip" is the local filename
- storage_class str
- The StorageClass of the new bucket object.
Supported values include: MULTI_REGIONAL,REGIONAL,NEARLINE,COLDLINE,ARCHIVE. If not provided, this defaults to the bucket's default storage class or to a standard class.
- temporary_hold bool
- Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- bucket String
- The name of the containing bucket.
- cacheControl String
- 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
- content String
- Data as stringto be uploaded. Must be defined ifsourceis not. Note: Thecontentfield is marked as sensitive.
- contentDisposition String
- Content-Disposition of the object data.
- contentEncoding String
- Content-Encoding of the object data.
- contentLanguage String
- Content-Language of the object data.
- contentType String
- Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- customerEncryption Property Map
- Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- deletionPolicy String
- detectMd5hash String
- eventBased BooleanHold 
- Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- forceEmpty BooleanContent Type 
- When set to true, it ensure the object's Content-Type is empty.
- kmsKey StringName 
- The resource name of the Cloud KMS key that will be used to encrypt the object.
- metadata Map<String>
- User-provided metadata, in key/value pairs. - One of the following is required: 
- name String
- The name of the object. If you're interpolating the name of this object, see output_nameinstead.
- retention Property Map
- The object retention settings for the object. The retention settings allow an object to be retained until a provided date. Structure is documented below.
- source Asset
- A path to the data you want to upload. Must be defined
if contentis not.
- sourceMd5hash String
- User-provided md5hash to trigger replacement of object in storage bucket, Must be Base 64 MD5 hash of the object data. The usual way to set this is filemd5("file.zip"), where "file.zip" is the local filename
- storageClass String
- The StorageClass of the new bucket object.
Supported values include: MULTI_REGIONAL,REGIONAL,NEARLINE,COLDLINE,ARCHIVE. If not provided, this defaults to the bucket's default storage class or to a standard class.
- temporaryHold Boolean
- Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
Outputs
All input properties are implicitly available as output properties. Additionally, the BucketObject resource produces the following output properties:
- Crc32c string
- (Computed) Base 64 CRC32 hash of the uploaded data.
- Generation int
- (Computed) The content generation of this object. Used for object versioning and soft delete.
- Id string
- The provider-assigned unique ID for this managed resource.
- Md5hash string
- (Computed) Base 64 MD5 hash of the uploaded data.
- Md5hexhash string
- (Computed) Hex value of md5hash`
- MediaLink string
- (Computed) A url reference to download this object.
- OutputName string
- (Computed) The name of the object. Use this field in interpolations with gcp.storage.ObjectACLto recreategcp.storage.ObjectACLresources when yourgcp.storage.BucketObjectis recreated.
- SelfLink string
- (Computed) A url reference to this object.
- Crc32c string
- (Computed) Base 64 CRC32 hash of the uploaded data.
- Generation int
- (Computed) The content generation of this object. Used for object versioning and soft delete.
- Id string
- The provider-assigned unique ID for this managed resource.
- Md5hash string
- (Computed) Base 64 MD5 hash of the uploaded data.
- Md5hexhash string
- (Computed) Hex value of md5hash`
- MediaLink string
- (Computed) A url reference to download this object.
- OutputName string
- (Computed) The name of the object. Use this field in interpolations with gcp.storage.ObjectACLto recreategcp.storage.ObjectACLresources when yourgcp.storage.BucketObjectis recreated.
- SelfLink string
- (Computed) A url reference to this object.
- crc32c String
- (Computed) Base 64 CRC32 hash of the uploaded data.
- generation Integer
- (Computed) The content generation of this object. Used for object versioning and soft delete.
- id String
- The provider-assigned unique ID for this managed resource.
- md5hash String
- (Computed) Base 64 MD5 hash of the uploaded data.
- md5hexhash String
- (Computed) Hex value of md5hash`
- mediaLink String
- (Computed) A url reference to download this object.
- outputName String
- (Computed) The name of the object. Use this field in interpolations with gcp.storage.ObjectACLto recreategcp.storage.ObjectACLresources when yourgcp.storage.BucketObjectis recreated.
- selfLink String
- (Computed) A url reference to this object.
- crc32c string
- (Computed) Base 64 CRC32 hash of the uploaded data.
- generation number
- (Computed) The content generation of this object. Used for object versioning and soft delete.
- id string
- The provider-assigned unique ID for this managed resource.
- md5hash string
- (Computed) Base 64 MD5 hash of the uploaded data.
- md5hexhash string
- (Computed) Hex value of md5hash`
- mediaLink string
- (Computed) A url reference to download this object.
- outputName string
- (Computed) The name of the object. Use this field in interpolations with gcp.storage.ObjectACLto recreategcp.storage.ObjectACLresources when yourgcp.storage.BucketObjectis recreated.
- selfLink string
- (Computed) A url reference to this object.
- crc32c str
- (Computed) Base 64 CRC32 hash of the uploaded data.
- generation int
- (Computed) The content generation of this object. Used for object versioning and soft delete.
- id str
- The provider-assigned unique ID for this managed resource.
- md5hash str
- (Computed) Base 64 MD5 hash of the uploaded data.
- md5hexhash str
- (Computed) Hex value of md5hash`
- media_link str
- (Computed) A url reference to download this object.
- output_name str
- (Computed) The name of the object. Use this field in interpolations with gcp.storage.ObjectACLto recreategcp.storage.ObjectACLresources when yourgcp.storage.BucketObjectis recreated.
- self_link str
- (Computed) A url reference to this object.
- crc32c String
- (Computed) Base 64 CRC32 hash of the uploaded data.
- generation Number
- (Computed) The content generation of this object. Used for object versioning and soft delete.
- id String
- The provider-assigned unique ID for this managed resource.
- md5hash String
- (Computed) Base 64 MD5 hash of the uploaded data.
- md5hexhash String
- (Computed) Hex value of md5hash`
- mediaLink String
- (Computed) A url reference to download this object.
- outputName String
- (Computed) The name of the object. Use this field in interpolations with gcp.storage.ObjectACLto recreategcp.storage.ObjectACLresources when yourgcp.storage.BucketObjectis recreated.
- selfLink String
- (Computed) A url reference to this object.
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,
        bucket: Optional[str] = None,
        cache_control: Optional[str] = None,
        content: Optional[str] = None,
        content_disposition: Optional[str] = None,
        content_encoding: Optional[str] = None,
        content_language: Optional[str] = None,
        content_type: Optional[str] = None,
        crc32c: Optional[str] = None,
        customer_encryption: Optional[BucketObjectCustomerEncryptionArgs] = None,
        deletion_policy: Optional[str] = None,
        detect_md5hash: Optional[str] = None,
        event_based_hold: Optional[bool] = None,
        force_empty_content_type: Optional[bool] = None,
        generation: Optional[int] = None,
        kms_key_name: Optional[str] = None,
        md5hash: Optional[str] = None,
        md5hexhash: Optional[str] = None,
        media_link: Optional[str] = None,
        metadata: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        output_name: Optional[str] = None,
        retention: Optional[BucketObjectRetentionArgs] = None,
        self_link: Optional[str] = None,
        source: Optional[Union[pulumi.Asset, pulumi.Archive]] = None,
        source_md5hash: Optional[str] = None,
        storage_class: Optional[str] = None,
        temporary_hold: Optional[bool] = None) -> BucketObjectfunc 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)resources:  _:    type: gcp:storage:BucketObject    get:      id: ${id}- 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.
- Bucket string
- The name of the containing bucket.
- CacheControl string
- 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
- Content string
- Data as stringto be uploaded. Must be defined ifsourceis not. Note: Thecontentfield is marked as sensitive.
- ContentDisposition string
- Content-Disposition of the object data.
- ContentEncoding string
- Content-Encoding of the object data.
- ContentLanguage string
- Content-Language of the object data.
- ContentType string
- Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- Crc32c string
- (Computed) Base 64 CRC32 hash of the uploaded data.
- CustomerEncryption BucketObject Customer Encryption 
- Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- DeletionPolicy string
- DetectMd5hash string
- EventBased boolHold 
- Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- ForceEmpty boolContent Type 
- When set to true, it ensure the object's Content-Type is empty.
- Generation int
- (Computed) The content generation of this object. Used for object versioning and soft delete.
- KmsKey stringName 
- The resource name of the Cloud KMS key that will be used to encrypt the object.
- Md5hash string
- (Computed) Base 64 MD5 hash of the uploaded data.
- Md5hexhash string
- (Computed) Hex value of md5hash`
- MediaLink string
- (Computed) A url reference to download this object.
- Metadata Dictionary<string, string>
- User-provided metadata, in key/value pairs. - One of the following is required: 
- Name string
- The name of the object. If you're interpolating the name of this object, see output_nameinstead.
- OutputName string
- (Computed) The name of the object. Use this field in interpolations with gcp.storage.ObjectACLto recreategcp.storage.ObjectACLresources when yourgcp.storage.BucketObjectis recreated.
- Retention
BucketObject Retention 
- The object retention settings for the object. The retention settings allow an object to be retained until a provided date. Structure is documented below.
- SelfLink string
- (Computed) A url reference to this object.
- Source
AssetOr Archive 
- A path to the data you want to upload. Must be defined
if contentis not.
- SourceMd5hash string
- User-provided md5hash to trigger replacement of object in storage bucket, Must be Base 64 MD5 hash of the object data. The usual way to set this is filemd5("file.zip"), where "file.zip" is the local filename
- StorageClass string
- The StorageClass of the new bucket object.
Supported values include: MULTI_REGIONAL,REGIONAL,NEARLINE,COLDLINE,ARCHIVE. If not provided, this defaults to the bucket's default storage class or to a standard class.
- TemporaryHold bool
- Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- Bucket string
- The name of the containing bucket.
- CacheControl string
- 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
- Content string
- Data as stringto be uploaded. Must be defined ifsourceis not. Note: Thecontentfield is marked as sensitive.
- ContentDisposition string
- Content-Disposition of the object data.
- ContentEncoding string
- Content-Encoding of the object data.
- ContentLanguage string
- Content-Language of the object data.
- ContentType string
- Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- Crc32c string
- (Computed) Base 64 CRC32 hash of the uploaded data.
- CustomerEncryption BucketObject Customer Encryption Args 
- Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- DeletionPolicy string
- DetectMd5hash string
- EventBased boolHold 
- Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- ForceEmpty boolContent Type 
- When set to true, it ensure the object's Content-Type is empty.
- Generation int
- (Computed) The content generation of this object. Used for object versioning and soft delete.
- KmsKey stringName 
- The resource name of the Cloud KMS key that will be used to encrypt the object.
- Md5hash string
- (Computed) Base 64 MD5 hash of the uploaded data.
- Md5hexhash string
- (Computed) Hex value of md5hash`
- MediaLink string
- (Computed) A url reference to download this object.
- Metadata map[string]string
- User-provided metadata, in key/value pairs. - One of the following is required: 
- Name string
- The name of the object. If you're interpolating the name of this object, see output_nameinstead.
- OutputName string
- (Computed) The name of the object. Use this field in interpolations with gcp.storage.ObjectACLto recreategcp.storage.ObjectACLresources when yourgcp.storage.BucketObjectis recreated.
- Retention
BucketObject Retention Args 
- The object retention settings for the object. The retention settings allow an object to be retained until a provided date. Structure is documented below.
- SelfLink string
- (Computed) A url reference to this object.
- Source
pulumi.Asset Or Archive 
- A path to the data you want to upload. Must be defined
if contentis not.
- SourceMd5hash string
- User-provided md5hash to trigger replacement of object in storage bucket, Must be Base 64 MD5 hash of the object data. The usual way to set this is filemd5("file.zip"), where "file.zip" is the local filename
- StorageClass string
- The StorageClass of the new bucket object.
Supported values include: MULTI_REGIONAL,REGIONAL,NEARLINE,COLDLINE,ARCHIVE. If not provided, this defaults to the bucket's default storage class or to a standard class.
- TemporaryHold bool
- Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- bucket String
- The name of the containing bucket.
- cacheControl String
- 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
- content String
- Data as stringto be uploaded. Must be defined ifsourceis not. Note: Thecontentfield is marked as sensitive.
- contentDisposition String
- Content-Disposition of the object data.
- contentEncoding String
- Content-Encoding of the object data.
- contentLanguage String
- Content-Language of the object data.
- contentType String
- Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- crc32c String
- (Computed) Base 64 CRC32 hash of the uploaded data.
- customerEncryption BucketObject Customer Encryption 
- Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- deletionPolicy String
- detectMd5hash String
- eventBased BooleanHold 
- Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- forceEmpty BooleanContent Type 
- When set to true, it ensure the object's Content-Type is empty.
- generation Integer
- (Computed) The content generation of this object. Used for object versioning and soft delete.
- kmsKey StringName 
- The resource name of the Cloud KMS key that will be used to encrypt the object.
- md5hash String
- (Computed) Base 64 MD5 hash of the uploaded data.
- md5hexhash String
- (Computed) Hex value of md5hash`
- mediaLink String
- (Computed) A url reference to download this object.
- metadata Map<String,String>
- User-provided metadata, in key/value pairs. - One of the following is required: 
- name String
- The name of the object. If you're interpolating the name of this object, see output_nameinstead.
- outputName String
- (Computed) The name of the object. Use this field in interpolations with gcp.storage.ObjectACLto recreategcp.storage.ObjectACLresources when yourgcp.storage.BucketObjectis recreated.
- retention
BucketObject Retention 
- The object retention settings for the object. The retention settings allow an object to be retained until a provided date. Structure is documented below.
- selfLink String
- (Computed) A url reference to this object.
- source
AssetOr Archive 
- A path to the data you want to upload. Must be defined
if contentis not.
- sourceMd5hash String
- User-provided md5hash to trigger replacement of object in storage bucket, Must be Base 64 MD5 hash of the object data. The usual way to set this is filemd5("file.zip"), where "file.zip" is the local filename
- storageClass String
- The StorageClass of the new bucket object.
Supported values include: MULTI_REGIONAL,REGIONAL,NEARLINE,COLDLINE,ARCHIVE. If not provided, this defaults to the bucket's default storage class or to a standard class.
- temporaryHold Boolean
- Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- bucket string
- The name of the containing bucket.
- cacheControl string
- 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
- content string
- Data as stringto be uploaded. Must be defined ifsourceis not. Note: Thecontentfield is marked as sensitive.
- contentDisposition string
- Content-Disposition of the object data.
- contentEncoding string
- Content-Encoding of the object data.
- contentLanguage string
- Content-Language of the object data.
- contentType string
- Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- crc32c string
- (Computed) Base 64 CRC32 hash of the uploaded data.
- customerEncryption BucketObject Customer Encryption 
- Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- deletionPolicy string
- detectMd5hash string
- eventBased booleanHold 
- Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- forceEmpty booleanContent Type 
- When set to true, it ensure the object's Content-Type is empty.
- generation number
- (Computed) The content generation of this object. Used for object versioning and soft delete.
- kmsKey stringName 
- The resource name of the Cloud KMS key that will be used to encrypt the object.
- md5hash string
- (Computed) Base 64 MD5 hash of the uploaded data.
- md5hexhash string
- (Computed) Hex value of md5hash`
- mediaLink string
- (Computed) A url reference to download this object.
- metadata {[key: string]: string}
- User-provided metadata, in key/value pairs. - One of the following is required: 
- name string
- The name of the object. If you're interpolating the name of this object, see output_nameinstead.
- outputName string
- (Computed) The name of the object. Use this field in interpolations with gcp.storage.ObjectACLto recreategcp.storage.ObjectACLresources when yourgcp.storage.BucketObjectis recreated.
- retention
BucketObject Retention 
- The object retention settings for the object. The retention settings allow an object to be retained until a provided date. Structure is documented below.
- selfLink string
- (Computed) A url reference to this object.
- source
pulumi.asset.Asset | pulumi.asset. Archive 
- A path to the data you want to upload. Must be defined
if contentis not.
- sourceMd5hash string
- User-provided md5hash to trigger replacement of object in storage bucket, Must be Base 64 MD5 hash of the object data. The usual way to set this is filemd5("file.zip"), where "file.zip" is the local filename
- storageClass string
- The StorageClass of the new bucket object.
Supported values include: MULTI_REGIONAL,REGIONAL,NEARLINE,COLDLINE,ARCHIVE. If not provided, this defaults to the bucket's default storage class or to a standard class.
- temporaryHold boolean
- Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- bucket str
- The name of the containing bucket.
- cache_control str
- 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
- content str
- Data as stringto be uploaded. Must be defined ifsourceis not. Note: Thecontentfield is marked as sensitive.
- content_disposition str
- Content-Disposition of the object data.
- content_encoding str
- Content-Encoding of the object data.
- content_language str
- Content-Language of the object data.
- content_type str
- Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- crc32c str
- (Computed) Base 64 CRC32 hash of the uploaded data.
- customer_encryption BucketObject Customer Encryption Args 
- Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- deletion_policy str
- detect_md5hash str
- event_based_ boolhold 
- Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- force_empty_ boolcontent_ type 
- When set to true, it ensure the object's Content-Type is empty.
- generation int
- (Computed) The content generation of this object. Used for object versioning and soft delete.
- kms_key_ strname 
- The resource name of the Cloud KMS key that will be used to encrypt the object.
- md5hash str
- (Computed) Base 64 MD5 hash of the uploaded data.
- md5hexhash str
- (Computed) Hex value of md5hash`
- media_link str
- (Computed) A url reference to download this object.
- metadata Mapping[str, str]
- User-provided metadata, in key/value pairs. - One of the following is required: 
- name str
- The name of the object. If you're interpolating the name of this object, see output_nameinstead.
- output_name str
- (Computed) The name of the object. Use this field in interpolations with gcp.storage.ObjectACLto recreategcp.storage.ObjectACLresources when yourgcp.storage.BucketObjectis recreated.
- retention
BucketObject Retention Args 
- The object retention settings for the object. The retention settings allow an object to be retained until a provided date. Structure is documented below.
- self_link str
- (Computed) A url reference to this object.
- source
Union[pulumi.Asset, pulumi. Archive] 
- A path to the data you want to upload. Must be defined
if contentis not.
- source_md5hash str
- User-provided md5hash to trigger replacement of object in storage bucket, Must be Base 64 MD5 hash of the object data. The usual way to set this is filemd5("file.zip"), where "file.zip" is the local filename
- storage_class str
- The StorageClass of the new bucket object.
Supported values include: MULTI_REGIONAL,REGIONAL,NEARLINE,COLDLINE,ARCHIVE. If not provided, this defaults to the bucket's default storage class or to a standard class.
- temporary_hold bool
- Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- bucket String
- The name of the containing bucket.
- cacheControl String
- 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
- content String
- Data as stringto be uploaded. Must be defined ifsourceis not. Note: Thecontentfield is marked as sensitive.
- contentDisposition String
- Content-Disposition of the object data.
- contentEncoding String
- Content-Encoding of the object data.
- contentLanguage String
- Content-Language of the object data.
- contentType String
- Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- crc32c String
- (Computed) Base 64 CRC32 hash of the uploaded data.
- customerEncryption Property Map
- Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- deletionPolicy String
- detectMd5hash String
- eventBased BooleanHold 
- Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- forceEmpty BooleanContent Type 
- When set to true, it ensure the object's Content-Type is empty.
- generation Number
- (Computed) The content generation of this object. Used for object versioning and soft delete.
- kmsKey StringName 
- The resource name of the Cloud KMS key that will be used to encrypt the object.
- md5hash String
- (Computed) Base 64 MD5 hash of the uploaded data.
- md5hexhash String
- (Computed) Hex value of md5hash`
- mediaLink String
- (Computed) A url reference to download this object.
- metadata Map<String>
- User-provided metadata, in key/value pairs. - One of the following is required: 
- name String
- The name of the object. If you're interpolating the name of this object, see output_nameinstead.
- outputName String
- (Computed) The name of the object. Use this field in interpolations with gcp.storage.ObjectACLto recreategcp.storage.ObjectACLresources when yourgcp.storage.BucketObjectis recreated.
- retention Property Map
- The object retention settings for the object. The retention settings allow an object to be retained until a provided date. Structure is documented below.
- selfLink String
- (Computed) A url reference to this object.
- source Asset
- A path to the data you want to upload. Must be defined
if contentis not.
- sourceMd5hash String
- User-provided md5hash to trigger replacement of object in storage bucket, Must be Base 64 MD5 hash of the object data. The usual way to set this is filemd5("file.zip"), where "file.zip" is the local filename
- storageClass String
- The StorageClass of the new bucket object.
Supported values include: MULTI_REGIONAL,REGIONAL,NEARLINE,COLDLINE,ARCHIVE. If not provided, this defaults to the bucket's default storage class or to a standard class.
- temporaryHold Boolean
- Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
Supporting Types
BucketObjectCustomerEncryption, BucketObjectCustomerEncryptionArgs        
- EncryptionKey string
- Base64 encoded Customer-Supplied Encryption Key.
- EncryptionAlgorithm string
- Encryption algorithm. Default: AES256
- EncryptionKey string
- Base64 encoded Customer-Supplied Encryption Key.
- EncryptionAlgorithm string
- Encryption algorithm. Default: AES256
- encryptionKey String
- Base64 encoded Customer-Supplied Encryption Key.
- encryptionAlgorithm String
- Encryption algorithm. Default: AES256
- encryptionKey string
- Base64 encoded Customer-Supplied Encryption Key.
- encryptionAlgorithm string
- Encryption algorithm. Default: AES256
- encryption_key str
- Base64 encoded Customer-Supplied Encryption Key.
- encryption_algorithm str
- Encryption algorithm. Default: AES256
- encryptionKey String
- Base64 encoded Customer-Supplied Encryption Key.
- encryptionAlgorithm String
- Encryption algorithm. Default: AES256
BucketObjectRetention, BucketObjectRetentionArgs      
- Mode string
- The retention policy mode. Either LockedorUnlocked.
- RetainUntil stringTime 
- The time to retain the object until in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
- Mode string
- The retention policy mode. Either LockedorUnlocked.
- RetainUntil stringTime 
- The time to retain the object until in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
- mode String
- The retention policy mode. Either LockedorUnlocked.
- retainUntil StringTime 
- The time to retain the object until in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
- mode string
- The retention policy mode. Either LockedorUnlocked.
- retainUntil stringTime 
- The time to retain the object until in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
- mode str
- The retention policy mode. Either LockedorUnlocked.
- retain_until_ strtime 
- The time to retain the object until in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
- mode String
- The retention policy mode. Either LockedorUnlocked.
- retainUntil StringTime 
- The time to retain the object until in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Import
This resource does not support import.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the google-betaTerraform Provider.
