Skip to content

googleStorageBucketObject

Gets an existing object inside an existing bucket in Google Cloud Storage service (GCS). See the official documentation and API.

Example Usage

Example picture stored within a folder.

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.dataGoogleStorageBucketObject.DataGoogleStorageBucketObject(
  this,
  "picture",
  {
    bucket: "image-store",
    name: "folder/butterfly01.jpg",
  }
);

Argument Reference

The following arguments are supported:

  • bucket - (Required) The name of the containing bucket.

  • name - (Required) The name of the object.

Attributes Reference

The following attributes are exported:

  • cacheControl - (Computed) 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

  • contentDisposition - (Computed) Content-Disposition of the object data.

  • contentEncoding - (Computed) Content-Encoding of the object data.

  • contentLanguage - (Computed) Content-Language of the object data.

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

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

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

  • selfLink - (Computed) A url reference to this object.

  • storageClass - (Computed) The StorageClass of the new bucket object. Supported values include: multiRegional, regional, nearline, coldline, archive. If not provided, this defaults to the bucket's default storage class or to a standard class.

  • mediaLink - (Computed) A url reference to download this object.

  • eventBasedHold - (Computed) 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).

  • temporaryHold - (Computed) Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.

  • detectMd5Hash - (Computed) Detect changes to local file or changes made outside of Terraform to the file stored on the server. MD5 hash of the data, encoded using base64. This field is not present for composite objects. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.