GoogleStorageBucketObject class final

Factory wrapper for google_storage_bucket_object.

Pass bucket.ref for bucket; it emits the bucket name the API wants.

body: object payload — choose exactly one of:

Example (inline content):

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

Example (file upload):

final logo = GoogleStorageBucketObject(
  'logo',
  bucket: assets.ref,
  name: TfArg.literal('static/logo.png'),
  body: StorageBucketObjectBodySource(TfArg.literal('./assets/logo.png')),
  contentType: TfArg.literal('image/png'),
);
Inheritance

Constructors

GoogleStorageBucketObject(String localName, {required RefTo<GoogleStorageBucket> bucket, required TfArg<String> name, required StorageBucketObjectBody body, TfArg<String>? contentType, TfArg<String>? cacheControl, TfArg<String>? contentDisposition, TfArg<String>? contentEncoding, TfArg<String>? contentLanguage, BucketObjectStorageClass? storageClass, RefTo<GoogleKmsCryptoKey>? kmsKeyName, TfArg<Map<String, String>>? metadata, TfArg<bool>? eventBasedHold, TfArg<bool>? temporaryHold, TfArg<bool>? forceEmptyContentType, TfArg<String>? detectMd5hash, TfArg<String>? sourceMd5hash, StorageBucketObjectContexts? contexts, TfArg<String>? deletionPolicy, StorageBucketObjectCustomerEncryption? customerEncryption, StorageBucketObjectRetention? retention, LifecycleOptions? lifecycle, List<TfAddressed>? dependsOn, StackProvider? provider, TfTimeouts? timeouts})

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
bucket → TfRef<String>
Reference to bucket attribute.
no setter
cacheControl → TfRef<String>
Reference to cache_control attribute.
no setter
content → TfRef<String>
Reference to content attribute.
no setter
contentDisposition → TfRef<String>
Reference to content_disposition attribute.
no setter
contentEncoding → TfRef<String>
Reference to content_encoding attribute.
no setter
contentLanguage → TfRef<String>
Reference to content_language attribute.
no setter
contentType → TfRef<String>
Reference to content_type attribute.
no setter
crc32c → TfRef<String>
Reference to crc32c attribute.
no setter
defaultProvider → String
The provider name a block without provider uses: by default the prefix of terraformType (google for google_pubsub_topic).
no setterinherited
deletionPolicy → TfRef<String>
Reference to deletion_policy attribute.
no setter
dependsOn → List<TfAddressed>?
Optional depends_on = [...]: the resources, data sources and module calls this block waits for, e.g. dependsOn: [api, ...apiDeps]. Terraform takes whole blocks only, so an entry is never an attribute.
finalinherited
detectMd5hash → TfRef<String>
Reference to detect_md5hash attribute.
no setter
eventBasedHold → TfRef<bool>
Reference to event_based_hold attribute.
no setter
forceEmptyContentType → TfRef<bool>
Reference to force_empty_content_type attribute.
no setter
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
kmsKeyName → TfRef<String>
Reference to kms_key_name attribute.
no setter
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
metadata → TfRef<Map<String, String>>
Reference to metadata attribute.
no setter
name → TfRef<String>
Reference to name attribute.
no setter
outputName → TfRef<String>
Reference to output_name attribute.
no setter
provider → StackProvider?
Optional Terraform provider meta-argument: the provider configuration this block uses, e.g. the aliased GoogleProvider(alias: 'eu') the Stack registered with addProvider.
finalinherited
ref → RefTo<GoogleStorageBucketObject>
A reference to this resource, for arguments typed RefTo<GoogleStorageBucketObject>.
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 setteroverride
source → TfRef<String>
Reference to source attribute.
no setter
sourceMd5hash → TfRef<String>
Reference to source_md5hash attribute.
no setter
storageClass → TfRef<String>
Reference to storage_class attribute.
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
temporaryHold → TfRef<bool>
Reference to temporary_hold attribute.
no setter
terraformType → String
Terraform resource type, e.g. google_pubsub_topic.
finalinherited
tfAddress → String
Terraform address <terraformType>.<localName>, e.g. google_pubsub_topic.orders.
no setterinherited
timeouts → TfTimeouts?
Optional timeouts { ... } block: how long Terraform waits for each operation. Provider-neutral like lifecycle — synth copies the duration strings verbatim, and terraform validate decides whether this resource's schema declares the operations set here.
finalinherited

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