GoogleStorageBucketObject class final

Factory wrapper for google_storage_bucket_object.

Pass TfArg.ref(bucket.nameRef) for bucket — NOT bucket.id (id is {bucket-name} for buckets but the API wants just the name).

body: object payload — choose exactly one of:

Example (inline content):

final assets = GoogleStorageBucket(
  localName: 'assets',
  name: TfArg.literal('my-app-assets-prod'),
  location: TfArg.literal('ASIA-NORTHEAST1'),
);
final config = GoogleStorageBucketObject(
  localName: 'config',
  bucket: TfArg.ref(assets.nameRef),
  name: TfArg.literal('config/app.json'),
  body: StorageBucketObjectBucketObjectFromContent(
    content: TfArg.literal('{"feature_x": true}'),
  ),
  contentType: TfArg.literal('application/json'),
  storageClass: TfArg.literal(BucketObjectStorageClass.standard),
);

Example (file upload):

final logo = GoogleStorageBucketObject(
  localName: 'logo',
  bucket: TfArg.ref(assets.nameRef),
  name: TfArg.literal('static/logo.png'),
  body: StorageBucketObjectBucketObjectFromSource(source: TfArg.literal('./assets/logo.png')),
  contentType: TfArg.literal('image/png'),
);

Constructors

GoogleStorageBucketObject({required String localName, required TfArg<String> bucket, required TfArg<String> name, required StorageBucketObjectBucketObjectContent body, TfArg<String>? contentType, TfArg<String>? cacheControl, TfArg<String>? contentDisposition, TfArg<String>? contentEncoding, TfArg<String>? contentLanguage, TfArg<BucketObjectStorageClass>? storageClass, TfArg<String>? kmsKeyName, TfArg<Map<String, String>>? metadata, TfArg<bool>? eventBasedHold, TfArg<bool>? temporaryHold, TfArg<bool>? forceEmptyContentType, TfArg<String>? detectMd5hash, TfArg<String>? sourceMd5hash, TfArg<String>? deletionPolicy, StorageBucketObjectCustomerEncryption? customerEncryption, StorageBucketObjectBucketObjectRetention? retention, LifecycleOptions? lifecycle, List<DependencyTarget>? dependsOn})

Properties

argMap Map<String, TfArg?>
Argument-name → TfArg map. Keys are snake_case (Terraform JSON name). Synth emits these keys directly; the factory is responsible for the camelCase → snake_case translation at construction time.
finalinherited
crc32c → TfRef<String>
Reference to crc32c attribute.
no setter
dependsOn List<DependencyTarget>?
Optional depends_on = [...]. Each entry is a DependencyTarget — either a wholesale resource (rendered as bare address) or an explicit TfRef (rendered via bareAddress).
finalinherited
generation → TfRef<num>
Reference to generation attribute.
no setter
hashCode int
The hash code for this object.
no setterinherited
id → TfRef<String>
Reference to id attribute.
no setter
kind → ResourceKind
Always ResourceKind.resource. Overridden by Data.
no setterinherited
lifecycle → LifecycleOptions?
Optional lifecycle { ... } block.
finalinherited
localName String
User-supplied local name within a Stack.
finalinherited
md5hash → TfRef<String>
Reference to md5hash attribute.
no setter
md5hexhash → TfRef<String>
Reference to md5hexhash attribute.
no setter
Reference to media_link attribute.
no setter
nameRef → TfRef<String>
Reference to name attribute.
no setter
outputName → TfRef<String>
Reference to output_name attribute.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
Reference to self_link attribute.
no setter
sensitiveFields Set<String>
Field names that are @Sensitive per the IR-derived per-resource constant. Curated factories override with a baked-in static const Set<String> (file-private in v0.5+).
no setter
supportsDeletionProtection bool
Capability flag: true when this resource's underlying Terraform schema has a deletion_protection boolean attribute that the synth-time devMode flow can flip to false. Defaults to false; the codegen emitter overrides this to true for wrappers whose schema includes the attribute.
no setterinherited
terraformType String
Terraform resource type, e.g. google_pubsub_topic.
finalinherited
tfAddress String
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

tfType → const String